:root {
  --felt: #0f3d2e; --felt2: #0a2a20; --gold: #e0b84a; --gold2: #8a6d1f; --ink: #f1ead8; --dim: #9fb3a8;
  --panel: rgba(8, 20, 16, .82); --line: rgba(224, 184, 74, .28); --red: #d23b3b; --pos: #7be08b; --neg: #ff7b7b;
  --card-w: 64px; --card-h: 92px;
  font-family: "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #06120e; color: var(--ink); }
body { background: radial-gradient(ellipse at 50% 30%, var(--felt) 0%, var(--felt2) 70%, #050f0b 100%) fixed; overflow-x: hidden; }
button { font: inherit; color: inherit; }
b { color: #fff3c4; }
.pos { color: var(--pos) !important; } .neg { color: var(--neg) !important; } .dim { color: var(--dim); } .small, small { font-size: .82em; }
.big { font-size: 1.25em; } .center { text-align: center; } .hot { color: #ffcf4a; }
.loading { display: grid; place-items: center; height: 100vh; color: var(--gold); letter-spacing: .3em; }
#app { min-height: 100vh; }

/* ---- buttons / chips ---- */
.btn { background: linear-gradient(#2c4a3e, #1b3128); border: 1px solid var(--line); border-radius: 8px; padding: .5em 1em; cursor: pointer; transition: .15s; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--gold); transform: translateY(-1px); box-shadow: 0 3px 10px #0007; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: linear-gradient(#f0cd63, #b88a20); color: #241a02; border-color: #ffe08a; font-weight: bold; }
.btn.danger { background: linear-gradient(#7a2626, #4a1414); }
.btn.sm { padding: .3em .7em; font-size: .85em; }
.btn.big { font-size: 1.2em; padding: .7em 2.2em; }
.chip { display: inline-block; padding: .1em .55em; border-radius: 99px; border: 1px solid var(--line); background: #0006; font-size: .78em; margin: 1px 2px; vertical-align: middle; }
.chip.rule { border-color: #e57373; color: #ffb3b3; } .chip.ok { border-color: var(--pos); color: var(--pos); } .chip.warn { border-color: #ffb74d; color: #ffcc80; }
.chip.hot { border-color: #ffcf4a; color: #ffcf4a; }
.chip.ab { border-color: #9575cd; color: #d1c4e9; cursor: help; }
button.chip.ab.act { cursor: pointer; } button.chip.ab.ready { background: #5e35b1; color: #fff; border-color: #d1c4e9; box-shadow: 0 0 10px #9575cd; animation: pulse 1.4s infinite; }
button.chip:disabled { opacity: .75; }
@keyframes pulse { 50% { box-shadow: 0 0 2px #9575cd; } }

/* ---- portraits & icons ---- */
.portrait { position: relative; width: 120px; height: 120px; border-radius: 12px; overflow: hidden; flex: none;
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--c) 70%, #fff) 0%, var(--c) 45%, #111 120%); border: 2px solid color-mix(in srgb, var(--c) 60%, var(--gold)); box-shadow: 0 4px 14px #0008; }
.portrait .ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6em; font-weight: bold; color: #fff; text-shadow: 0 2px 6px #000a; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.portrait.xs { width: 40px; height: 40px; border-radius: 8px; } .portrait.xs .ph { font-size: 1.1em; }
.portrait.sm { width: 64px; height: 64px; } .portrait.sm .ph { font-size: 1.5em; }
.portrait.md { width: 110px; height: 110px; }
.enemy-ph { --c: #5d4037; }
.icon { position: relative; display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; vertical-align: middle; }
.icon .ph { font-size: 30px; line-height: 1; }
.icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 2px 3px #000a); }
.icon.xs { width: 20px; height: 20px; } .icon.xs .ph { font-size: 15px; }
.icon.sm { width: 26px; height: 26px; } .icon.sm .ph { font-size: 19px; }
.icon.lg { width: 72px; height: 72px; } .icon.lg .ph { font-size: 46px; }

/* ---- cards ---- */
.card { position: relative; width: var(--card-w); height: var(--card-h); border-radius: 7px; background: linear-gradient(160deg, #fffef8, #efe8d6); color: #1b1b1b;
  box-shadow: 0 2px 5px #0009, inset 0 0 0 1px #0002; flex: none; user-select: none; transition: transform .12s, box-shadow .12s; }
.card .cr { position: absolute; top: 3px; left: 5px; font-weight: bold; font-size: 17px; line-height: 1; font-family: Georgia, serif; }
.card .cs { position: absolute; top: 21px; left: 6px; font-size: 13px; }
.card .cbig { position: absolute; bottom: 5px; right: 6px; font-size: 32px; line-height: 1; }
.card.red { color: #c62828; } .card.joker { background: linear-gradient(160deg, #fff7d6, #f3d78a); color: #6a1b9a; }
.card.joker .cr { font-size: 11px; letter-spacing: -.5px; } .card.joker .cbig { font-size: 30px; }
.card.back { background: repeating-linear-gradient(45deg, #7a1f1f 0 6px, #8e2a2a 6px 12px); border: 3px solid #f4ecd8; }
.card.back::after { content: '♠'; position: absolute; inset: 0; display: grid; place-items: center; color: #f4ecd8aa; font-size: 26px; }
.card.empty { background: transparent; border: 2px dashed #ffffff33; box-shadow: none; }
.card.mini { --card-w: 20px; --card-h: 28px; border-width: 2px; } .card.mini::after { font-size: 0; }
.card.mini2 { width: 40px; height: 58px; } .card.mini2 .cr { font-size: 12px; } .card.mini2 .cs { top: 15px; font-size: 10px; } .card.mini2 .cbig { font-size: 18px; }
.card.mini2.joker .cr { font-size: 7px; }
.card .ctag { position: absolute; bottom: 2px; left: 3px; font-size: 10px; background: #1565c0; color: #fff; border-radius: 3px; padding: 0 2px; }
.card.laid { outline: 2px solid #42a5f5; } .card.deadc { filter: saturate(.6) brightness(.9); }
.card.sel { transform: translateY(-16px); box-shadow: 0 0 0 3px var(--gold), 0 8px 16px #000a; }
.card.new::before { content: 'NEW'; position: absolute; top: -9px; right: -6px; background: #e53935; color: #fff; font-size: 9px; padding: 1px 4px; border-radius: 6px; z-index: 2; }
.card.locked { opacity: .55; }
.card.getting { animation: glow 1s infinite; }
@keyframes glow { 50% { box-shadow: 0 0 18px 4px #ffcf4a; } }

/* ---- bars ---- */
.bar { position: relative; height: 16px; background: #000a; border-radius: 8px; overflow: hidden; border: 1px solid #ffffff22; min-width: 120px; }
.bar .fill { height: 100%; background: linear-gradient(90deg, #43a047, #9ccc65); transition: width .6s ease; }
.bar span { position: absolute; inset: 0; font-size: 11px; display: grid; place-items: center; text-shadow: 0 1px 2px #000; }
.bar.hp .fill { background: linear-gradient(90deg, #e53935, #ff8a65); } .bar.troop .fill { background: linear-gradient(90deg, #1e88e5, #4fc3f7); }
.bar.exp { height: 8px; min-width: 80px; margin-top: 3px; } .bar.exp .fill { background: linear-gradient(90deg, #7e57c2, #b39ddb); } .bar.exp span { display: none; }

/* ---- title ---- */
.title-screen { position: relative; min-height: 100vh; display: grid; place-items: center; overflow: hidden; }
.title-bg { position: absolute; inset: 0; background: url(../assets/title.webp) center/cover no-repeat; opacity: .55; filter: saturate(1.1); }
.title-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 20%, #050f0bdd 85%); }
.title-inner { position: relative; text-align: center; padding: 2em; }
.logo { display: flex; flex-direction: column; align-items: center; gap: .1em; }
.logo-en { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.6rem, 9vw, 5.6rem); letter-spacing: .12em; font-weight: bold;
  background: linear-gradient(#fff6c8, #e0b84a 55%, #8a6d1f); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 4px 8px #000); }
.logo-jp { font-size: clamp(1.4rem, 4vw, 2.2rem); letter-spacing: .5em; color: #fff3c4; text-shadow: 0 2px 8px #000; }
.logo-sub { margin-top: .4em; color: var(--dim); letter-spacing: .2em; }
.title-cards { margin: 1.2em 0; font-size: 2.2em; letter-spacing: .4em; color: #f4ecd8; text-shadow: 0 2px 6px #000; } .title-cards .r { color: #e53935; }
.title-btns { display: flex; flex-direction: column; gap: .8em; align-items: center; }
.starter { display: grid; gap: .6em; } .starter-btn { display: flex; flex-direction: column; text-align: left; gap: .2em; white-space: normal; }

/* ---- story ---- */
#story { position: fixed; inset: 0; z-index: 50; display: none; cursor: pointer; }
#story.show { display: block; }
.story-bg { position: absolute; inset: 0; background: #000 url(../assets/story_bg.webp) center/cover; opacity: .9; }
.story-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 40%, #000c); }
.story-stage { position: absolute; inset: 0 0 30% 0; display: flex; align-items: flex-end; justify-content: center; }
.portrait.story { width: min(46vh, 360px); height: min(46vh, 360px); border-radius: 18px; animation: fadein .35s; }
.portrait.story.left { margin-right: 30vw; } .portrait.story.right { margin-left: 30vw; }
@media (max-width: 700px) { .portrait.story.left, .portrait.story.right { margin: 0; } }
.story-box { position: absolute; left: 50%; bottom: 4vh; transform: translateX(-50%); width: min(880px, 94vw); min-height: 130px; background: #050f0ce6; border: 2px solid var(--gold2); border-radius: 14px; padding: 1em 1.4em 1.8em; box-shadow: 0 8px 30px #000; }
.story-box.narr { text-align: center; font-style: italic; }
.sname { font-weight: bold; font-size: 1.1em; margin-bottom: .3em; }
.stext { font-size: 1.12em; line-height: 1.7; }
.snext { position: absolute; right: 1em; bottom: .5em; color: var(--gold); font-size: .8em; animation: blink 1s infinite; }
.skip { position: absolute; top: 1em; right: 1em; }
@keyframes blink { 50% { opacity: .3; } } @keyframes fadein { from { opacity: 0; transform: translateY(12px); } }

/* ---- modal / toast ---- */
#modal { position: fixed; inset: 0; z-index: 60; background: #000a; display: none; place-items: center; padding: 1em; }
#modal.show { display: grid; animation: fadein .15s; }
.modal-box { position: relative; background: linear-gradient(#123528, #0a2019); border: 2px solid var(--gold2); border-radius: 14px; padding: 1.2em 1.4em; max-width: min(620px, 96vw); max-height: 92vh; overflow: auto; box-shadow: 0 10px 40px #000; }
.modal-box.wide { max-width: min(980px, 98vw); }
.modal-box h2 { margin: 0 0 .6em; color: var(--gold); font-size: 1.3em; }
.modal-x { position: absolute; top: .5em; right: .6em; background: none; border: none; font-size: 1.2em; cursor: pointer; }
.mbtns { display: flex; gap: .6em; justify-content: flex-end; margin-top: 1em; flex-wrap: wrap; } .mbtns.col { flex-direction: column; }
.mbody.center p { margin: .5em 0; } .mbody .portrait { margin: 0 auto; }
.pick-row { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: .8em 0; padding-top: 16px; } .pick-row .card { cursor: pointer; }
.item-list { display: grid; gap: .5em; } .item-btn { display: flex; align-items: center; gap: .6em; text-align: left; white-space: normal; }
.help li { margin: .3em 0; } .help h3 { color: var(--gold); margin: .8em 0 .2em; font-size: 1em; }
.learn { background: #4527a055; border: 1px solid #9575cd; border-radius: 8px; padding: .5em; }
.savebox { width: 100%; height: 120px; background: #0008; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; font-size: 11px; }
#toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 6px; pointer-events: none; align-items: center; }
.toast { background: #0c241cf0; border: 1px solid var(--gold2); padding: .45em 1.1em; border-radius: 99px; box-shadow: 0 4px 14px #000a; animation: fadein .2s; transition: opacity .5s; max-width: 92vw; font-size: .92em; }
.toast.out { opacity: 0; } .toast.ab { border-color: #9575cd; background: #2a1a4ef0; } .toast.get { border-color: #ffb74d; } .toast.knock { border-color: #ffcf4a; font-weight: bold; } .toast.death { border-color: #e53935; background: #3a0e0ef0; }
.toast.big { font-size: 1.15em; padding: .7em 1.6em; border-width: 2px; }

/* ---- hub ---- */
.hub { max-width: 1100px; margin: 0 auto; padding: .6em .8em 3em; }
.hub-head { display: flex; justify-content: space-between; align-items: center; gap: 1em; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .5em .9em; }
.hh-left { display: flex; gap: .7em; align-items: center; } .hh-ch { font-weight: bold; color: var(--gold); }
.hh-gold { font-size: 1.3em; display: flex; align-items: center; gap: .3em; }
.goals { margin: .6em 0; display: flex; flex-wrap: wrap; gap: .4em .9em; align-items: center; padding: .4em .8em; background: #0005; border-radius: 10px; font-size: .9em; }
.goal.done { color: var(--pos); text-decoration: line-through; text-decoration-color: #7be08b88; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; border-bottom: 2px solid var(--gold2); }
.tab { background: #0007; border: 1px solid var(--line); border-bottom: none; border-radius: 10px 10px 0 0; padding: .55em 1em; cursor: pointer; white-space: nowrap; }
.tab.on { background: linear-gradient(#e0b84a, #8a6d1f); color: #1c1402; font-weight: bold; }
.hub-body { padding-top: .8em; display: grid; gap: .8em; }
.tip { text-align: center; margin-top: 1.5em; }
.panel, .venue { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .8em 1em; }
.panel h3, .venue h3 { margin: 0 0 .5em; color: var(--gold); font-size: 1.05em; }
.panel.leon { display: flex; gap: 1em; align-items: center; } .grow { flex: 1; min-width: 0; }
.row { display: flex; gap: .5em; flex-wrap: wrap; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: .6em; }
.gcard { display: flex; gap: .6em; align-items: center; background: #0006; border: 1px solid #ffffff1a; border-radius: 10px; padding: .55em .7em; }
.gcard > div { flex: 1; display: flex; flex-direction: column; gap: .15em; min-width: 0; }
.gcard.on { border-color: var(--gold); background: #3a300a55; } .gcard.locked { opacity: .5; }
.gcard.abil { cursor: pointer; } .gcard.abil:hover { border-color: #b39ddb; }
.gcard.r3 b { color: #ffd54f; } .gcard.r2 b { color: #b3e5fc; }
.lrow { display: flex; align-items: center; gap: .7em; padding: .5em 0; border-bottom: 1px dashed #ffffff1a; } .lrow.done { opacity: .7; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4em; }
.town-view { display: flex; flex-wrap: wrap; gap: .4em; padding: .6em; margin-bottom: .7em; min-height: 90px; border-radius: 10px;
  background: linear-gradient(#5d8a4d55, #3e5f3455), url(../assets/town_bg.webp) center/cover; align-items: flex-end; }
.tb { display: flex; flex-direction: column; align-items: center; font-size: .8em; text-shadow: 0 1px 3px #000; }
.match { background: #0006; border: 1px solid #ffffff1a; border-radius: 10px; padding: .6em; margin-top: .5em; display: flex; flex-direction: column; gap: .5em; }
.match.boss { border-color: #e53935; background: #3a0e0e88; }
.venue.boss { border-color: #e53935; }
.mopps { display: flex; gap: 1em; flex-wrap: wrap; } .mopp { display: flex; gap: .5em; align-items: center; } .mopp > div { display: flex; flex-direction: column; align-items: flex-start; }
.mmeta { display: flex; gap: .4em .9em; align-items: center; flex-wrap: wrap; font-size: .9em; } .mmeta .btn { margin-left: auto; }
.vs-screen { display: flex; align-items: center; justify-content: center; gap: .8em; margin-bottom: .8em; } .vs { font-size: 2em; font-weight: bold; color: #e53935; font-style: italic; }
.vs-info { display: grid; gap: .5em; }

/* ---- duel ---- */
.duel { display: grid; grid-template-rows: auto auto 1fr auto; min-height: 100vh; max-width: 1100px; margin: 0 auto; padding: .4em .6em; gap: .4em; position: relative; }
.d-top { display: flex; align-items: center; gap: .6em; flex-wrap: wrap; } .d-title { font-weight: bold; color: var(--gold); } .d-info { flex: 1; font-size: .9em; } .d-menu { display: flex; gap: .3em; }
.opps { display: grid; grid-template-columns: 1fr 1fr; gap: .6em; }
.seat { position: relative; display: flex; gap: .6em; background: var(--panel); border: 2px solid transparent; border-radius: 12px; padding: .5em; transition: .2s; }
.seat.turn { border-color: var(--gold); box-shadow: 0 0 16px #e0b84a55; } .seat.dead { filter: grayscale(1) brightness(.6); }
.seat-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pname { font-weight: bold; } .pname small { margin-left: .4em; font-weight: normal; }
.oya { background: #e53935; color: #fff; padding: 0 .4em; border-radius: 4px; font-size: .78em; }
.backs { display: flex; gap: 2px; }
.dead-mark { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.8em; font-weight: bold; color: #e53935; transform: rotate(-12deg); text-shadow: 0 2px 6px #000; }
.think { position: absolute; right: .6em; top: .4em; animation: blink 1s infinite; }
.table-center { display: flex; justify-content: center; align-items: center; gap: 2em; padding: 1em; border-radius: 50% / 40%; background: radial-gradient(ellipse, #165540 0%, transparent 70%); min-height: 170px; flex-wrap: wrap; }
.pile { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3em; }
.pile .card { --card-w: 76px; --card-h: 108px; } .pile .card .cr { font-size: 20px; } .pile .card .cbig { font-size: 40px; }
.pile.can { cursor: pointer; } .pile.can .card { box-shadow: 0 0 0 3px #ffcf4a, 0 0 22px #ffcf4a88; animation: glow 1.4s infinite; }
.pile .under { position: absolute; top: 3px; left: 3px; width: 76px; height: 108px; border-radius: 7px; background: #ddd5c0; box-shadow: 0 2px 5px #0009; }
.pile .card:not(.under) { position: relative; }
.pcount { font-size: .8em; color: var(--dim); }
.status-msg { flex-basis: 100%; text-align: center; font-size: .95em; min-height: 1.4em; }
.me-area { background: var(--panel); border-radius: 14px; padding: .6em; border: 2px solid transparent; }
.my-turn .me-area { border-color: var(--gold); box-shadow: 0 0 22px #e0b84a44; }
.me-info { display: flex; gap: .7em; align-items: center; } .me-stat { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.me-side { text-align: right; display: flex; flex-direction: column; gap: 3px; align-items: flex-end; } .dw { font-size: 1.05em; } .dw b { font-size: 1.4em; }
.abil-row { display: flex; flex-wrap: wrap; gap: 2px; }
.hand { display: flex; justify-content: center; gap: 12px; padding: 22px 0 6px; flex-wrap: wrap; min-height: 120px; }
.hand .meld { display: flex; gap: 3px; padding: 4px; border-radius: 9px; background: #e0b84a33; box-shadow: inset 0 0 0 1px #e0b84a88; }
.hand .deadg { display: flex; gap: 5px; padding: 4px; }
.hand .card { cursor: pointer; } .hand .card:hover { transform: translateY(-6px); } .hand .card.sel:hover { transform: translateY(-16px); }
.actions { display: flex; justify-content: center; gap: .8em; min-height: 2.6em; }
.btn.knock { background: linear-gradient(#c62828, #7f1010); border-color: #ff8a80; font-weight: bold; }
.btn.knock.hot { background: linear-gradient(#ffca28, #f57f17); color: #2a1600; animation: glow 1s infinite; }
.btn.knock.dim { opacity: .6; background: #333; border-color: #555; }
.log-panel { position: fixed; right: 0; top: 0; bottom: 0; width: min(340px, 86vw); background: #050f0cf2; border-left: 1px solid var(--gold2); padding: .6em; transform: translateX(100%); transition: .25s; z-index: 40; overflow: auto; }
.log-open .log-panel { transform: none; }
.log-panel h3 { margin: 0 0 .4em; color: var(--gold); }
.log-list { list-style: none; padding: 0; margin: 0; font-size: .82em; } .log-list li { padding: 2px 0; border-bottom: 1px solid #ffffff10; }
.log-list .round { color: var(--gold); font-weight: bold; } .log-list .ability { color: #d1c4e9; } .log-list .dmg { color: #ff8a80; } .log-list .knock { color: #ffcf4a; } .log-list .get { color: #ffb74d; } .log-list .me { color: #b3e5fc; } .log-list .sys { color: var(--dim); } .log-list .heal { color: var(--pos); } .log-list .death { color: #e53935; font-weight: bold; }
.rrows { display: grid; gap: .5em; }
.rrow { display: grid; grid-template-columns: 40px 110px 1fr 56px; gap: .5em; align-items: center; background: #0005; border-radius: 8px; padding: .3em .5em; }
.rrow.knocker { border: 1px solid var(--gold); } .rname { font-weight: bold; font-size: .9em; }
.rhand { display: flex; flex-wrap: wrap; gap: 6px; } .rhand .meld { display: flex; gap: 2px; padding: 2px; background: #e0b84a33; border-radius: 6px; } .rhand .deadg { display: flex; gap: 2px; }
.rscore { font-size: 1.2em; font-weight: bold; text-align: right; }
.events { margin: .6em 0; padding-left: 1.2em; } .lps { display: grid; gap: 4px; font-size: .85em; } .lprow { display: grid; grid-template-columns: 110px 1fr; align-items: center; }

/* ---- battle ---- */
.battle { max-width: 900px; margin: 0 auto; padding: 1em; display: flex; flex-direction: column; gap: 1em; min-height: 100vh; justify-content: center;
  background: radial-gradient(ellipse at 50% 40%, #3b2a1a55, transparent 70%); }
.btitle { text-align: center; color: var(--gold); margin: 0; }
.bfield { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1em; align-items: center; }
.bfield.flash { animation: flash .35s; } .bfield.shake { animation: shake .35s; }
@keyframes flash { 30% { filter: brightness(1.8); } } @keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
.bside { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .8em; display: flex; flex-direction: column; gap: .3em; align-items: center; }
.bside .bar { width: 100%; } .bname { font-weight: bold; } .blabel { font-size: .78em; color: var(--dim); align-self: flex-start; }
.bside.enemy { border-color: #e5737366; }
.bvs { font-size: 2em; font-weight: bold; color: #e53935; font-style: italic; text-align: center; } .bturn { font-size: .4em; color: var(--dim); font-style: normal; }
.bresult { text-align: center; min-height: 3em; background: #0006; border-radius: 10px; padding: .6em; }
.bhint { text-align: center; color: #ffe082; font-size: 1.05em; }
.btactics { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6em; }
.btn.tac { display: flex; flex-direction: column; align-items: center; padding: .8em .3em; gap: .2em; white-space: normal; }
.btn.tac .ti { font-size: 1.8em; } .btn.tac small { color: var(--dim); }
.tac-assault { border-color: #e57373 !important; } .tac-scheme { border-color: #ba68c8 !important; } .tac-guard { border-color: #64b5f6 !important; }
.btn.tac.special:not(:disabled) { background: linear-gradient(#ffca28, #e65100); color: #2a1600; animation: glow 1.2s infinite; }
.gauge { height: 8px; background: #0008; border-radius: 4px; overflow: hidden; } .gfill { height: 100%; background: linear-gradient(90deg, #ffb300, #ff6f00); transition: .4s; }

/* ---- responsive ---- */
@media (max-width: 720px) {
  :root { --card-w: 46px; --card-h: 68px; }
  .card .cr { font-size: 13px; } .card .cs { top: 16px; font-size: 10px; } .card .cbig { font-size: 22px; }
  .hand { gap: 6px; } .hand .meld { gap: 1px; padding: 2px; } .hand .deadg { gap: 2px; }
  .opps { grid-template-columns: 1fr 1fr; gap: .3em; } .seat { padding: .3em; flex-direction: column; } .seat .portrait.sm { width: 40px; height: 40px; } .seat .abil-row { display: none; } .seat .pname small { display: none; }
  .bar { min-width: 60px; }
  .pile .card { --card-w: 58px; --card-h: 84px; } .pile .under { width: 58px; height: 84px; } .table-center { min-height: 130px; padding: .4em; gap: 1em; }
  .me-info .portrait { display: none; }
  .rrow { grid-template-columns: 30px 1fr 44px; } .rrow .rname { display: none; } .rrow .portrait.xs { width: 30px; height: 30px; }
  .bfield { grid-template-columns: 1fr 1fr; } .bvs { display: none; } .btactics { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); } .grid { grid-template-columns: 1fr; }
  .panel.leon { flex-direction: column; align-items: flex-start; }
}
