
[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

:root {
  --ink: #1d1a15;
  --ink-soft: #5b544a;
  --paper: #fbf6e9;
  --paper-2: #f3ead3;
  --teal: #00916f;
  --gold-glow: rgba(255, 205, 80, .95);
  --mark-trait: #c47410;
  --mark-passive: #0f8686;
  --mark-skill: #2a5fc8;
  --mark-ultimate: #c0263b;
  --mark-special: #7a3cc2;
  --mark-combo: #2d8a37;
  --clouds: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='n' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0057' numOctaves='5' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 2.2 0 0 0 -0.85'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --clouds-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='520' height='520'%3E%3Cfilter id='m' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.0115' numOctaves='4' seed='19' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 .45 0 0 0 0 .42 0 1.9 0 0 -1.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E");
  --emblem: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cg fill='none' stroke='white' stroke-width='1.6'%3E%3Ccircle cx='50' cy='50' r='44'/%3E%3Ccircle cx='50' cy='50' r='36' stroke-dasharray='2 3'/%3E%3Cpath d='M50 8 L58 42 L92 50 L58 58 L50 92 L42 58 L8 50 L42 42 Z'/%3E%3Cpath d='M50 22 L54 46 L78 50 L54 54 L50 78 L46 54 L22 50 L46 46 Z' opacity='.7'/%3E%3C/g%3E%3C/svg%3E");
  --ui-bg: rgba(255, 255, 255, .8);
  --ui-fg: #12332b;
  --ui-line: rgba(0, 107, 82, .45);
  --ui-sub: #3d6158;
  --top-bg: linear-gradient(180deg, #00a07b, #00805f);
  --top-fg: #f4fffb;
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}

body { color: var(--ui-fg); overflow: hidden; background-color: #9fe3d6; }
body[data-bg="gf"] {
  background:
    var(--clouds) 0 0 / 700px 700px,
    var(--clouds-dark) 120px 60px / 520px 520px,
    radial-gradient(ellipse at 20% 15%, rgba(255,255,255,.75), transparent 45%),
    radial-gradient(ellipse at 85% 80%, rgba(255,255,255,.55), transparent 50%),
    linear-gradient(160deg, #7fd9c8 0%, #b9efe4 40%, #86d8ca 70%, #c6f3ea 100%);
  background-attachment: fixed;
}
body[data-bg="gf"]::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 8px; background: var(--top-bg); z-index: 5; pointer-events: none; }
body[data-bg="plain"] {
  --ui-bg: rgba(10, 34, 26, .74);
  --ui-fg: #eef7ef;
  --ui-line: rgba(220, 240, 220, .25);
  --ui-sub: #b9d2c1;
  --top-bg: linear-gradient(180deg, #17372a, #10281e);
  --top-fg: #f1f6ee;
  background: radial-gradient(ellipse at 50% 0%, rgba(80, 140, 105, .35), transparent 60%), linear-gradient(180deg, #173a2b, #0e241b);
}
button { font: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; }

.topbar { height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 12px;
  background: var(--top-bg); color: var(--top-fg); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 2px 6px rgba(0,0,0,.18); position: relative; z-index: 4; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 13px; opacity: .9; white-space: nowrap; }
.brand strong { font-weight: 700; letter-spacing: .04em; }
.brand-gem { width: 12px; height: 12px; transform: rotate(45deg); border-radius: 2px; background: radial-gradient(circle at 35% 30%, #fff, #8ff0d4 35%, #0c8a6a 75%); box-shadow: 0 0 0 1px rgba(255,255,255,.7); }
.switches { display: flex; gap: 10px; align-items: center; }
.sw { display: flex; align-items: center; gap: 2px; font-size: 12px; }
.sw .lbl { margin-right: 4px; opacity: .85; }
.sw i { font-style: normal; }
.sw .s { display: none; }
.sw button { border: 1px solid rgba(255,255,255,.55); background: rgba(255,255,255,.12); color: inherit; padding: 2px 9px; font-size: 12px; line-height: 20px; }
.sw button:first-of-type { border-radius: 999px 0 0 999px; }
.sw button:last-of-type { border-radius: 0 999px 999px 0; }
.sw button.active { background: #f4fff9; color: #00563f; font-weight: 700; }

.layout { height: calc(100vh - 36px); height: calc(100dvh - 36px); display: grid; grid-template-columns: minmax(0, 1fr) clamp(400px, 36vw, 700px); gap: 10px; padding: 8px 10px 12px; }
.board { min-height: 0; display: grid; gap: 6px; grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 1fr) auto auto; }

.player-row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 4px 14px 4px 8px; min-width: 0;
  background: var(--ui-bg); color: var(--ui-fg); border: 1px solid var(--ui-line); border-radius: 14px; font-size: 13px; }
.player-row .who { font-size: 13px; padding: 2px 10px; border-radius: 999px; background: var(--teal); color: #fff; white-space: nowrap; }
.player-row.op .who { background: #b4314a; }
.player-row strong { font-size: 16px; white-space: nowrap; min-width: 6.5em; }
.player-row .counts { margin-left: auto; color: var(--ui-sub); white-space: nowrap; font-size: 13px; }
.player-row .counts b { color: var(--ui-fg); }
.hpbox { position: relative; flex: 1 1 auto; min-width: 60px; height: 32px; border-radius: 10px; overflow: hidden;
  background: #33403d; box-shadow: inset 0 2px 4px rgba(0,0,0,.45), 0 0 0 2px rgba(255,255,255,.8); }
.hpbox i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #ff8a7a, #d23246 55%, #9d1427); transition: width .35s; }
.player-row.me .hpbox i { background: linear-gradient(180deg, #8ee8ff, #2f8ee0 55%, #1b5fae); }
.hpbox em { position: absolute; left: 12px; top: 0; line-height: 32px; font-style: normal; font-size: 13px; font-weight: 800; color: #fff; z-index: 1; }
.hpbox b { position: relative; display: block; text-align: center; font-size: 21px; line-height: 32px; color: #fff; font-weight: 900; letter-spacing: .02em; }

.turn-strip { display: flex; align-items: center; gap: 12px; padding: 5px 6px 5px 16px; min-height: 60px; min-width: 0;
  background: var(--ui-bg); border: 1px solid var(--ui-line); border-radius: 999px; color: var(--ui-fg); font-size: 14px; }
.turn-strip strong { font-size: 16px; white-space: nowrap; }
.turn-count { color: var(--ui-sub); white-space: nowrap; }
.skill-state { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: #2a5fc8; color: #fff; white-space: nowrap; }
.skill-state.used { background: #6a6a6a; }
.latest { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ui-sub); }
.end { border: 2px solid #8a5a00; border-radius: 999px; font-weight: 900; color: #3b2600; background: linear-gradient(180deg, #fff1b8, #f6c94c 45%, #d99a17);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.85), 0 0 0 2px rgba(255, 240, 190, .7), 0 4px 10px rgba(0,0,0,.3); }
.turn-strip .end { font-size: 23px; padding: 0 34px; min-height: 50px; min-width: 220px; letter-spacing: .08em; }
.end:not(:disabled) { animation: endPulse 2.4s ease-in-out infinite; }
@keyframes endPulse { 50% { box-shadow: inset 0 2px 0 rgba(255,255,255,.85), 0 0 0 3px rgba(255, 220, 110, .9), 0 0 18px rgba(255, 200, 60, .8); } }
.end:disabled { filter: grayscale(.8); opacity: .6; animation: none; }
.cancel { border: 2px solid #7a2a2a; border-radius: 999px; padding: 0 20px; min-height: 44px; font-weight: 800; font-size: 16px; background: #fff; color: #7a2a2a; }

.field { min-height: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; padding: 0 4px; --ab-rows: 4; }
.slot { min-height: 0; min-width: 0; display: flex; align-items: stretch; justify-content: center; position: relative; }
.slot.empty { border: 2px dashed var(--ui-line); border-radius: 12px; align-items: center; color: var(--ui-sub); background: rgba(255,255,255,.12); font-size: 22px; }
.slot.empty small { position: absolute; top: 6px; left: 8px; font-size: 12px; }
.slot.placeable { border-color: #ffd257; background: rgba(255, 220, 110, .22); box-shadow: 0 0 0 2px rgba(255,210,87,.6), 0 0 18px rgba(255,210,87,.6); cursor: pointer; }

.card-wrap { width: 100%; max-width: 250px; height: 100%; container-type: inline-size; cursor: pointer; position: relative; }
.card {
  --metal: linear-gradient(140deg, #f6f9fd 0%, #a3afc0 14%, #eef2f8 28%, #737f92 46%, #dfe5ee 62%, #8592a5 80%, #f2f5fa 100%);
  --metal-edge: #2b313d;
  --plate: linear-gradient(180deg, #45307a 0%, #2a1f5c 55%, #1a1640 100%);
  --gem: radial-gradient(circle at 35% 30%, #fff 0%, #9be7ff 30%, #2b6fc4 70%, #12306b 100%);
  position: relative; height: 100%; border-radius: 9px; padding: 4cqw; background: var(--metal);
  box-shadow: 0 0 0 1px var(--metal-edge), inset 0 0 0 1px rgba(255,255,255,.85), 0 5px 12px rgba(0, 0, 0, .35);
  transition: transform .15s, box-shadow .15s;
}
.card-wrap.gold .card, .hand-card.gold .card {
  --metal: linear-gradient(140deg, #fff6cf 0%, #cf9b31 14%, #ffe8a0 30%, #9a6812 48%, #f8d777 64%, #a9791f 82%, #fff0b8 100%);
  --metal-edge: #4a3006; --plate: linear-gradient(180deg, #6d1f33 0%, #4a1225 55%, #2b0a16 100%);
  --gem: radial-gradient(circle at 35% 30%, #fff 0%, #ff9fb0 30%, #c3123a 70%, #5b0618 100%);
}
.card-wrap.support .card, .hand-card.support .card {
  --metal: linear-gradient(140deg, #ecfff9 0%, #5fb9a3 14%, #d4fff2 30%, #2c7a68 48%, #bff0e2 64%, #3c8f7c 82%, #e6fff8 100%);
  --metal-edge: #0f3d33; --plate: linear-gradient(180deg, #146a5c 0%, #0d4a40 55%, #07302a 100%);
  --gem: radial-gradient(circle at 35% 30%, #fff 0%, #9cffe3 30%, #0f9b7c 70%, #064536 100%);
}
.card::before, .card::after { content: ""; position: absolute; top: 1.2cqw; width: 4.6cqw; height: 4.6cqw; min-width: 5px; min-height: 5px; transform: rotate(45deg); border-radius: 1px;
  background: var(--gem); box-shadow: 0 0 0 1px rgba(0,0,0,.55), 0 0 4px rgba(255,255,255,.6); z-index: 2; }
.card::before { left: 1.2cqw; } .card::after { right: 1.2cqw; }

.inner { position: relative; height: 100%; border-radius: 5px; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%); box-shadow: 0 0 0 1.5px rgba(30, 24, 12, .75), inset 0 1px 3px rgba(0,0,0,.28); color: var(--ink); }
.name-plate { flex: none; padding: 1.6cqw 3cqw 1.8cqw; text-align: center; background: var(--plate); color: #fff; border-bottom: 1px solid rgba(255, 230, 160, .9);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 1px 0 rgba(0,0,0,.4);
  font-weight: 800; font-size: clamp(12px, 10.5cqw, 26px); line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.name-plate.long { font-size: clamp(11px, 8.8cqw, 23px); letter-spacing: -.03em; }
.art { flex: 1 1 0; min-height: 13cqw; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 35%, hsl(var(--tone) 42% 42%), hsl(var(--tone) 40% 22%) 70%, hsl(var(--tone) 45% 12%));
  border-bottom: 1px solid rgba(30, 24, 12, .55); }
.art .emblem { position: absolute; width: min(70cqw, 92%); aspect-ratio: 1; max-height: 140%; background: var(--emblem) center / contain no-repeat; opacity: .16; }
.art .initial { position: relative; display: grid; place-items: center; width: 15cqw; height: 15cqw; min-width: 18px; min-height: 18px; border-radius: 50%;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-weight: 700; font-size: clamp(10px, 8cqw, 20px); color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.45); background: rgba(0,0,0,.18); }
.art .charge { position: absolute; right: 2cqw; top: 2cqw; display: flex; gap: 1.2cqw; }
.charge i { display: block; width: 3.6cqw; height: 3.6cqw; min-width: 6px; min-height: 6px; transform: rotate(45deg); background: #d8d1bf; box-shadow: 0 0 0 1px rgba(0,0,0,.45); }
.charge i.on { background: radial-gradient(circle at 35% 30%, #fff, #ffd56b 40%, #c28a00); box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 0 5px rgba(255,200,60,.9); }
.labels { flex: none; display: flex; gap: 1.2cqw; flex-wrap: wrap; padding: 1.4cqw 2.4cqw 0; min-height: 0; }
.labels:empty { display: none; }
.labels span { font-size: clamp(11px, 6.6cqw, 15px); line-height: 1.35; padding: 0 2cqw; border-radius: 999px; background: #e8dfc6; color: #2b2416; font-weight: 700; white-space: nowrap; }
.labels i, .d-labels i { font-style: normal; }
.labels .ls { display: none; }
.labels span.teacher, .d-labels span.teacher { background: #ffe39a; color: #4a3000; }
.labels span.support, .d-labels span.support { background: #bff3e3; color: #064536; }
.labels span.state { background: #2b2b2b; color: #fff; }
.labels span.used { background: #6c6c6c; color: #fff; }

.abilities { flex: 0 1 auto; height: calc(var(--ab-rows) * 12.6cqw + 3cqw); min-height: 13cqw; margin: 0; padding: 1.8cqw 2.4cqw 1.2cqw; list-style: none;
  display: flex; flex-direction: column; gap: 1.4cqw; overflow: hidden; }
.ab { display: flex; align-items: center; gap: 2cqw; min-width: 0; flex: none; }
.mark { flex: none; display: inline-grid; place-items: center; width: clamp(15px, 11cqw, 26px); height: clamp(15px, 11cqw, 26px); border-radius: 50%;
  color: #fff; font-weight: 800; font-size: clamp(9px, 6.6cqw, 15px); font-style: normal;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.85) 0 12%, transparent 40%), var(--c, #555); box-shadow: inset 0 -2px 3px rgba(0,0,0,.35), 0 0 0 1px rgba(0,0,0,.35); }
.mark.trait { --c: var(--mark-trait); } .mark.passive { --c: var(--mark-passive); } .mark.skill { --c: var(--mark-skill); }
.mark.ultimate { --c: var(--mark-ultimate); } .mark.special { --c: var(--mark-special); } .mark.combo { --c: var(--mark-combo); } .mark.none { --c: #7d7566; }
.ab em { font-style: normal; font-weight: 700; font-size: clamp(12px, 9.4cqw, 23px); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ab em.noname { font-weight: 500; color: var(--ink-soft); }
.more { flex: none; align-self: flex-start; font-size: clamp(11px, 7cqw, 16px); font-weight: 800; color: #fff; background: #6b5a3a; padding: 0 2.6cqw; border-radius: 999px; line-height: 1.5; }

.foot { flex: none; padding: 1.4cqw 2.4cqw 2.2cqw; background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.06)); border-top: 1px solid rgba(30, 24, 12, .2); }
.hpline { height: max(6px, 3.6cqw); border-radius: 999px; background: #3b3530; overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.5); margin-bottom: 1.4cqw; }
.hpline i { display: block; height: 100%; background: linear-gradient(180deg, #ff9b7a, #e23a4e 60%, #a3192c); transition: width .35s; }
.hpline.low i { background: linear-gradient(180deg, #ffd27a, #e88a17 60%, #a35a00); }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 1.4cqw; }
.badge { display: inline-flex; align-items: baseline; gap: 1cqw; padding: .6cqw 2.6cqw; border-radius: 2.6cqw; color: #fff; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 0 0 1px rgba(0,0,0,.5), 0 0 0 2px rgba(255, 230, 160, .7); }
.badge small { font-size: clamp(9px, 6cqw, 14px); font-weight: 800; opacity: .9; }
.badge b { font-size: clamp(14px, 11cqw, 28px); font-weight: 900; line-height: 1.1; }
.badge.hp { background: linear-gradient(170deg, #ff7f7f, #c8172f 55%, #7a0818); }
.badge.atk { background: linear-gradient(170deg, #8fc6ff, #2357c9 55%, #0d2a6e); }

.slot.selected .card { box-shadow: 0 0 0 1px var(--metal-edge), 0 0 0 3px var(--gold-glow), 0 0 22px var(--gold-glow); transform: translateY(-2px); }
.slot.targetable .card { box-shadow: 0 0 0 1px var(--metal-edge), 0 0 0 4px #ff4d6a, 0 0 24px #ff4d6a; cursor: crosshair; animation: targetPulse 1s ease-in-out infinite; }
@keyframes targetPulse { 50% { box-shadow: 0 0 0 1px var(--metal-edge), 0 0 0 4px #ffb1bf, 0 0 30px #ff4d6a; } }
.card-wrap.stunned .inner { filter: grayscale(.6) brightness(.9); }
@media (hover: hover) { .slot:not(.selected) .card-wrap:hover .card { transform: translateY(-2px); box-shadow: 0 0 0 1px var(--metal-edge), 0 0 0 2px rgba(255,230,150,.7), 0 8px 18px rgba(0,0,0,.35); } }

body[data-cardbg="gf"] .inner { background: var(--clouds) 0 0 / 260px 260px, var(--clouds-dark) 30px 10px / 200px 200px, linear-gradient(170deg, #a9ebde, #dcf9f3 55%, #b3eee3); }
body[data-cardbg="gf"] .art { background: var(--clouds) 0 0 / 180px 180px, radial-gradient(ellipse at 50% 35%, hsl(var(--tone) 45% 62%), hsl(var(--tone) 40% 38%)); }
body[data-cardbg="gf"] .labels span { background: rgba(255,255,255,.85); }
body[data-cardbg="gf"] .foot { background: rgba(255,255,255,.35); }

.hand-zone { display: flex; align-items: center; gap: 10px; padding: 3px 10px; min-height: 0; background: var(--ui-bg); border: 1px solid var(--ui-line); border-radius: 12px; }
.zone-title { font-size: 12px; color: var(--ui-sub); line-height: 1.3; text-align: center; white-space: nowrap; }
.zone-title b { display: block; font-size: 13px; color: var(--ui-fg); }
.hand { display: flex; gap: 8px; min-width: 0; overflow-x: auto; overflow-y: hidden; padding: 4px 2px; }
.place-help { font-size: 14px; font-weight: 700; color: var(--ui-fg); }
.hand-card { flex: none; width: 184px; height: 70px; position: relative; cursor: pointer; }
.hand-card .card { padding: 3px; border-radius: 7px; }
.hand-card .card::before, .hand-card .card::after { display: none; }
.hand-card .inner { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto 1fr; }
.hand-card .name-plate { grid-column: 1; font-size: 15px; padding: 3px 8px; text-align: left; }
.hand-card .foot { grid-column: 2; grid-row: 1 / span 2; display: flex; align-items: center; padding: 0 6px; border-top: 0; border-left: 1px solid rgba(30,24,12,.2); }
.hand-card .hpline, .hand-card .badge.atk, .hand-card .foot-row > span:first-child, .hand-card .art, .hand-card .labels { display: none; }
.hand-card .badge { padding: 1px 6px; border-radius: 6px; } .hand-card .badge small { font-size: 10px; } .hand-card .badge b { font-size: 18px; }
.hand-card .abilities { grid-column: 1; height: auto; flex-direction: row; flex-wrap: wrap; gap: 3px; padding: 4px 6px; min-height: 0; }
.hand-card .ab em, .hand-card .more { display: none; }
.hand-card .mark { width: 19px; height: 19px; font-size: 11px; }
.hand-card::after { content: "全文"; position: absolute; right: 4px; bottom: -2px; transform: translateY(100%); font-size: 10px; color: var(--ui-sub); opacity: 0; transition: opacity .15s; }
.hand-card:hover .card { box-shadow: 0 0 0 1px var(--metal-edge), 0 0 0 2px rgba(255,230,150,.8), 0 6px 14px rgba(0,0,0,.3); transform: translateY(-2px); }
.hand-card.selected .card { box-shadow: 0 0 0 1px var(--metal-edge), 0 0 0 3px var(--gold-glow), 0 0 16px var(--gold-glow); transform: translateY(-3px); }
.hand-empty { font-size: 13px; color: var(--ui-sub); }

.sidebar { min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) 128px; gap: 8px; }
.sidebar.log-collapsed { grid-template-rows: minmax(0, 1fr) 36px; }
.sidebar.log-collapsed .log { display: none; }
.panel { min-height: 0; border-radius: 12px; background: var(--paper); color: var(--ink); border: 1px solid rgba(0,0,0,.18); box-shadow: 0 0 0 3px rgba(255,255,255,.35), 0 6px 16px rgba(0,0,0,.18); }
body[data-bg="gf"] .panel { border-color: #1a8f74; }
.detail { display: flex; flex-direction: column; overflow: hidden; }
.empty-detail { padding: 20px; font-size: 18px; color: var(--ink-soft); line-height: 1.7; }
.d-head { flex: none; display: flex; gap: 14px; align-items: center; padding: 14px 18px 12px; border-bottom: 1px solid rgba(0,0,0,.12); background: linear-gradient(180deg, #fffdf6, #f4ecd6); border-radius: 12px 12px 0 0; }
.d-art { width: 64px; height: 64px; flex: none; border-radius: 8px; display: grid; place-items: center; position: relative; overflow: hidden;
  background: var(--emblem) center / 86% no-repeat, radial-gradient(ellipse at 50% 30%, hsl(var(--tone) 42% 42%), hsl(var(--tone) 40% 20%)); box-shadow: 0 0 0 2px #b9c2cf, 0 0 0 3px #3a404c; }
.d-art span { font: 700 24px "Hiragino Mincho ProN", serif; color: rgba(255,255,255,.85); }
.d-head h2 { margin: 0; font-size: 27px; line-height: 1.25; word-break: break-all; }
.d-stats { margin-top: 3px; font-size: 16px; color: var(--ink-soft); display: flex; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.d-stats b { color: var(--ink); font-size: 21px; }
.d-labels { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.d-labels span { font-size: 14px; padding: 1px 10px; border-radius: 999px; background: #ebe3cc; color: #3a3222; font-weight: 700; }
.d-labels .ls { display: none; }
.d-labels span.state { background: #333; color: #fff; }
.d-body { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 20px 16px; overscroll-behavior: contain; }
.d-ab { padding: 13px 0 14px; border-bottom: 1px dashed rgba(0,0,0,.16); }
.d-ab:last-child { border-bottom: 0; }
.d-ab h3 { margin: 0 0 6px; display: flex; align-items: center; gap: 9px; font-size: 22px; line-height: 1.35; flex-wrap: wrap; }
.d-ab h3 .mark { width: 28px; height: 28px; font-size: 15px; }
.d-ab .t { font-size: 14px; font-weight: 700; color: var(--ink-soft); white-space: nowrap; }
.d-ab .auto { font-size: 12px; font-weight: 700; padding: 0 7px; border-radius: 999px; border: 1px solid var(--ink-soft); color: var(--ink-soft); white-space: nowrap; margin-left: -4px; }
.d-ab .nm { font-weight: 800; word-break: break-all; }
.d-ab .nm.noname { color: var(--ink-soft); font-weight: 600; }
.d-ab .uses { font-size: 14px; padding: 1px 9px; border-radius: 999px; background: #3a3222; color: #fff; white-space: nowrap; }
.d-ab p { margin: 0; font-size: 19.5px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; }
.use-btn { margin-left: auto; border: 1px solid #1d4fa8; border-radius: 999px; padding: 4px 20px; min-height: 36px; font-weight: 800; font-size: 16px; color: #fff;
  background: linear-gradient(180deg, #6aa6ff, #2c64d0 55%, #1a429b); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); }
.use-btn.soon { background: repeating-linear-gradient(-45deg, #eeeae0 0 6px, #e2dccd 6px 12px); color: #6b6250; border: 1px dashed #9a8f74; box-shadow: none; font-weight: 700; }
.use-btn:disabled { opacity: .45; }
.use-note { display: block; width: 100%; font-size: 15px; color: #9a2b2b; font-weight: 600; }
.d-actions { flex: none; display: flex; gap: 8px; flex-wrap: wrap; padding: 8px 18px 12px; border-top: 1px solid rgba(0,0,0,.12); }
.d-actions button { border: 1px solid #7a6a4a; border-radius: 999px; padding: 6px 16px; min-height: 40px; background: #fff7e2; color: #3a2e16; font-size: 15px; font-weight: 700; }

.log-panel { display: flex; flex-direction: column; overflow: hidden; }
.panel-title { flex: none; display: flex; justify-content: space-between; align-items: center; padding: 4px 12px; min-height: 34px; font-size: 13px; font-weight: 800; border-bottom: 1px solid rgba(0,0,0,.1); }
.panel-title button { border: 1px solid rgba(0,0,0,.3); background: #fff; border-radius: 999px; font-size: 12px; padding: 2px 10px; }
.panel-title .log-toggle { border: 0; background: none; font-size: 13px; font-weight: 800; padding: 0; color: inherit; }
.log { flex: 1; overflow-y: auto; padding: 4px 12px 8px; font-size: 12.5px; line-height: 1.6; }
.log div { border-bottom: 1px dotted rgba(0,0,0,.12); padding: 1px 0 1px 6px; border-left: 3px solid transparent; }
.log div.s0 { border-left-color: #2f7fd8; } .log div.s1 { border-left-color: #c8324a; } .log div.sys { color: var(--ink-soft); }
.log .who { font-size: 11px; font-weight: 700; margin-right: 6px; padding: 0 6px; border-radius: 999px; color: #fff; }
.log .who.s0 { background: #2f7fd8; } .log .who.s1 { background: #c8324a; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 30;
  background: rgba(20, 30, 28, .92); color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 15px; transition: .2s; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sheet-backdrop, .bottom-sheet, .mobile-actions, .hint { display: none; }
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(4, 30, 24, .62); backdrop-filter: blur(5px); padding: 16px; }
.overlay-card { width: min(440px, 100%); text-align: center; padding: 26px 22px; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 0 0 2px #b9c2cf, 0 0 0 4px #3a404c, 0 18px 40px rgba(0,0,0,.4); }
.overlay-card h1 { margin: 0 0 8px; font-size: 25px; word-break: keep-all; overflow-wrap: anywhere; }
.overlay-card p { margin: 6px 0; font-size: 16px; line-height: 1.6; color: var(--ink-soft); word-break: keep-all; overflow-wrap: anywhere; }
.overlay-card button { margin-top: 14px; border: 2px solid #8a5a00; border-radius: 999px; padding: 10px 30px; min-height: 48px; font-weight: 800; font-size: 17px; color: #3b2600; background: linear-gradient(180deg, #fff1b8, #f6c94c 45%, #d99a17); }

@media (min-width: 1024px) and (max-height: 780px) {
  .layout { grid-template-columns: minmax(0, 1fr) clamp(400px, 34vw, 700px); }
  .sidebar { grid-template-rows: minmax(0, 1fr) 96px; }
  .player-row { min-height: 38px; } .hpbox { height: 28px; } .hpbox b, .hpbox em { line-height: 28px; } .hpbox b { font-size: 18px; }
  .turn-strip { min-height: 54px; } .turn-strip .end { min-height: 46px; font-size: 21px; min-width: 190px; }
  .hand-card { height: 62px; } .hand-card .name-plate { font-size: 14px; }
  .d-head h2 { font-size: 23px; } .d-ab h3 { font-size: 19px; } .d-ab p { font-size: 17px; line-height: 1.7; }
}
@media (min-width: 1700px) {
  .topbar { height: 40px; } .layout { height: calc(100vh - 40px); grid-template-columns: minmax(0, 1fr) 680px; gap: 14px; padding: 10px 14px 14px; }
  .sidebar { grid-template-rows: minmax(0, 1fr) 160px; }
  .player-row { min-height: 52px; } .player-row strong { font-size: 19px; } .player-row .counts { font-size: 15px; }
  .hpbox { height: 38px; } .hpbox b, .hpbox em { line-height: 38px; } .hpbox b { font-size: 25px; } .hpbox em { font-size: 15px; }
  .turn-strip { min-height: 68px; font-size: 16px; } .turn-strip strong { font-size: 19px; } .turn-strip .end { font-size: 27px; min-height: 58px; min-width: 270px; }
  .field { gap: 16px; }
  .hand-card { width: 220px; height: 84px; } .hand-card .name-plate { font-size: 18px; } .hand-card .badge b { font-size: 22px; } .hand-card .mark { width: 23px; height: 23px; font-size: 13px; }
  .d-head h2 { font-size: 32px; } .d-ab h3 { font-size: 26px; } .d-ab h3 .mark { width: 32px; height: 32px; font-size: 17px; }
  .d-ab p { font-size: 23px; } .d-stats { font-size: 18px; } .d-stats b { font-size: 24px; } .log { font-size: 14px; }
}

@media (max-width: 1023px) {
  .topbar { height: 52px; padding: 0 6px; }
  .brand { display: none; }
  .switches { width: 100%; justify-content: center; gap: 12px; }
  .sw .l { display: none; } .sw .s { display: inline; }
  .sw .lbl { font-size: 11px; }
  .sw button { min-height: 44px; min-width: 48px; font-size: 13px; padding: 0 10px; }
  .layout { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 52px - 72px); padding: 5px 5px 4px; }
  .sidebar { display: none; }
  .board { gap: 4px; }
  .player-row { gap: 6px; padding: 2px 8px 2px 6px; font-size: 11px; min-height: 32px; border-radius: 10px; }
  .player-row strong { font-size: 12px; min-width: 0; max-width: 30%; overflow: hidden; text-overflow: ellipsis; }
  .player-row .who { font-size: 10px; padding: 1px 6px; }
  .player-row .counts { font-size: 10px; }
  .hpbox { height: 24px; border-radius: 7px; min-width: 80px; } .hpbox em { display: none; } .hpbox b { font-size: 16px; line-height: 24px; }
  .turn-strip { min-height: 30px; gap: 6px; padding: 2px 10px; font-size: 11px; }
  .turn-strip strong { font-size: 12px; }
  .turn-strip .end, .turn-count, .latest, #cancel-top { display: none; }
  .skill-state { font-size: 10.5px; padding: 0 6px; }
  .field { gap: 4px; padding: 0; }
  .card { border-radius: 6px; padding: 3px; }
  .card::before, .card::after { display: none; }
  .name-plate { white-space: normal; font-size: 12.5px; line-height: 1.15; padding: 2px 1px 3px; overflow-wrap: anywhere; letter-spacing: -.04em; }
  .name-plate.long { font-size: 11.5px; }
  .art { min-height: 16px; }
  .art .initial { display: none; }
  .art .emblem { width: 60%; }
  .art .charge { right: 2px; top: 2px; gap: 3px; }
  .labels { padding: 2px 2px 0; gap: 2px; }
  .labels span { font-size: 10.5px; padding: 0 4px; }
  .labels .lf { display: none; } .labels .ls { display: inline; }
  .abilities { height: calc(var(--ab-rows) * 30px + 6px); min-height: 30px; padding: 3px 2px 2px; gap: 3px; }
  .ab { align-items: flex-start; gap: 2px; }
  .mark { width: 14px; height: 14px; font-size: 9.5px; margin-top: 1px; }
  .ab em { white-space: normal; font-size: 11.5px; line-height: 1.22; letter-spacing: -.05em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
  .more { font-size: 11px; padding: 0 5px; }
  .foot { padding: 2px 2px 3px; }
  .hpline { height: 5px; margin-bottom: 2px; }
  .foot-row { gap: 2px; }
  .badge { padding: 0 3px; border-radius: 4px; gap: 1px; box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 0 0 1px rgba(0,0,0,.45); }
  .badge small { display: none; }
  .badge b { font-size: 14px; letter-spacing: -.04em; }
  .hand-zone { padding: 3px 6px; gap: 6px; }
  .zone-title { font-size: 10px; } .zone-title b { font-size: 11px; }
  .hand { gap: 5px; }
  .hand-card { width: 108px; height: 54px; }
  .hand-card .name-plate { font-size: 12.5px; padding: 2px 5px; }
  .hand-card .foot { padding: 0 3px; }
  .hand-card .badge b { font-size: 14px; }
  .hand-card .abilities { padding: 3px 4px; gap: 2px; }
  .hand-card .mark { width: 15px; height: 15px; font-size: 9px; }
  .place-help { display: none; }

  .sheet-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); opacity: 0; pointer-events: none; transition: .2s; z-index: 20; }
  .sheet-backdrop.open { opacity: 1; pointer-events: auto; }
  .bottom-sheet { display: flex; flex-direction: column; position: fixed; left: 0; right: 0; bottom: 0; max-height: 82dvh; z-index: 21; background: var(--paper); color: var(--ink);
    border-radius: 16px 16px 0 0; box-shadow: 0 -8px 24px rgba(0,0,0,.3); transform: translateY(105%); transition: transform .22s; padding-bottom: 72px; }
  .bottom-sheet.open { transform: translateY(0); }
  .bottom-sheet #sheet-detail { min-height: 0; flex: 1; display: flex; flex-direction: column; overflow: hidden; }
  .sheet-close { position: absolute; right: 10px; top: 8px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(0,0,0,.25); background: #fff; font-size: 22px; line-height: 1; z-index: 2; }
  .d-head { padding: 12px 60px 10px 14px; }
  .d-head h2 { font-size: 23px; } .d-stats { font-size: 15px; } .d-stats b { font-size: 18px; }
  .d-body { padding: 4px 16px 14px; }
  .d-ab h3 { font-size: 19px; } .d-ab p { font-size: 17px; line-height: 1.75; }
  .use-btn { min-height: 44px; padding: 0 18px; font-size: 16px; }
  .d-actions button { min-height: 44px; }

  .mobile-actions { display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; height: 72px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); z-index: 25; background: var(--top-bg); }
  .mobile-actions button { flex: 1; min-height: 54px; border-radius: 999px; border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.15); color: var(--top-fg); font-weight: 700; font-size: 15px; }
  .mobile-actions .end { flex: 2.2; font-size: 22px; letter-spacing: .08em; color: #3b2600; border: 2px solid #8a5a00; background: linear-gradient(180deg, #fff1b8, #f6c94c 45%, #d99a17); }
  body[data-bg="gf"]::after { display: none; }
  .hint { display: flex; align-items: center; gap: 6px; position: fixed; left: 8px; right: 8px; top: 58px; z-index: 22; padding: 6px 6px 6px 12px; background: rgba(20, 32, 30, .92); color: #fff; border-radius: 14px; font-size: 14px; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
  .hint[hidden] { display: none !important; }
  .hint span { flex: 1; }
  .hint button { min-height: 44px; min-width: 56px; border-radius: 999px; border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.14); color: #fff; font-weight: 700; }
  .toast { bottom: 140px; }
}
@media (max-width: 1023px) and (max-height: 760px) {
  .hand-card { height: 46px; } .hand-card .abilities { display: none; }
}
@media (prefers-reduced-motion: reduce) { .end, .slot.targetable .card { animation: none !important; } * { transition-duration: .01ms !important; } }
.sp-only { display: none; }
@media (max-width: 1023px) { .pc-only { display: none; } .sp-only { display: inline; } }
@media (max-width: 370px) { .hand-card { width: 98px; } .hand { gap: 4px; } }

.more { cursor: pointer; border: 1px solid rgba(255,255,255,.5); }
@media (min-width: 1024px) and (max-height: 780px) {
  .mark { width: 13px; height: 13px; font-size: 8.5px; }
  .ab { gap: 3px; }
  .ab em { font-size: 14.5px; letter-spacing: -.03em; }
  .abilities { padding: 3px 4px 2px; gap: 2px; height: calc(var(--ab-rows) * 20px + 6px); }
  .labels span { font-size: 11px; }
  .hand-zone { padding: 2px 8px; } .hand-card { height: 56px; }
  .player-row { min-height: 34px; } .turn-strip { min-height: 50px; }
}
.abilities { height: calc(var(--ab-rows) * 13.8cqw + 3cqw); }
@media (min-width: 1024px) and (max-height: 780px) { .abilities { height: calc(var(--ab-rows) * 20px + 6px); } }
@media (max-width: 1023px) { .abilities { height: calc(var(--ab-rows) * 30px + 6px); } }

.field .abilities { height: auto; }
.ab { align-items: flex-start; }
.mark { margin-top: .15em; }
.ab em { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; line-height: 1.22; }
.art { min-height: 8px; }
.hand-card .abilities { flex-wrap: nowrap; overflow: hidden; align-items: center; }
.hand-card .more { display: inline-block; font-size: 11px; padding: 0 5px; line-height: 17px; flex: none; }
.hand-card .more[hidden] { display: none; }
.hand-card .name-plate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-row .counts { flex: none; width: 13.5em; text-align: right; margin-left: 0; }
.unsupported-line { font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-left: auto; margin-right: 8px; }
.unsupported-line.warn { color: #a33; }
@media (min-width: 1024px) {
  .sw button { min-height: 32px; }
  .panel-title { min-height: 40px; }
  .panel-title button, .panel-title .log-toggle { min-height: 32px; }
  .use-btn { min-height: 40px; }
  .d-actions button { min-height: 40px; }
}
.labels span.immune, .d-labels span.immune { background: #3b3f4a; color: #fff; }
@media (max-width: 1023px) {
  .labels span.klass { display: none; }
  .labels { flex-wrap: nowrap; overflow: hidden; }
  .ab em { -webkit-line-clamp: 3; }
  .player-row { min-height: 40px; }
  .hpbox { height: 30px; border-radius: 8px; } .hpbox b { font-size: 19px; line-height: 30px; }
  .player-row .counts { width: 8.6em; font-size: 10px; }
  .player-row strong { flex: none; width: 5.5em; max-width: none; }
  .turn-strip { flex-wrap: wrap; row-gap: 0; border-radius: 12px; }
  .turn-strip .latest { display: block; flex: 1 0 100%; font-size: 11.5px; line-height: 1.5; color: var(--ui-fg); cursor: pointer; }
  .turn-strip .latest::after { content: "　▸全部"; color: var(--ui-sub); }
  .hint { top: auto; bottom: 78px; }
  .hand { flex: 1 1 auto; }
  .hand-card { flex: 1 1 0; width: auto; min-width: 84px; max-width: 132px; }
  .hand-card .name-plate { font-size: 12px; letter-spacing: -.05em; }
  .sheet-log { font-size: 14px; }
}
@media (max-width: 1023px) {
  .player-row .counts { width: 9.8em; overflow: hidden; letter-spacing: -.03em; }
  .player-row strong { width: 4.6em; }
}

.field.c1 .ab em { -webkit-line-clamp: 1; }
.field.c2 .ab em { -webkit-line-clamp: 1; font-size: clamp(11px, 8cqw, 19px); letter-spacing: -.04em; }
.field.c2 .abilities { gap: 1px; padding-top: 2px; padding-bottom: 1px; }
.field.c2 .mark { width: clamp(12px, 9cqw, 22px); height: clamp(12px, 9cqw, 22px); }
.field.c2 .labels { display: none; }
.field.c1 .art, .field.c2 .art { min-height: 0; }
@media (max-width: 1023px) {
  .field.c1 .ab em { -webkit-line-clamp: 2; }
  .field.c2 .ab em { -webkit-line-clamp: 2; font-size: 10.5px; }
}
@media (max-width: 1023px) { .player-row strong { width: 5.8em; font-size: 10.5px; letter-spacing: -.05em; } }

.topbar { height: 26px; }
.brand { font-size: 12px; }
.layout { height: calc(100vh - 26px); height: calc(100dvh - 26px); }
@media (min-width: 1700px) { .topbar { height: 28px; } .layout { height: calc(100vh - 28px); height: calc(100dvh - 28px); } }
@media (max-width: 1023px) {
  .topbar { display: none; }
  .layout { height: calc(100dvh - 72px); padding-top: 6px; }
}

.picker { position: fixed; z-index: 28; width: 300px; max-width: calc(100vw - 16px); padding: 10px 10px 10px; border-radius: 14px; color: var(--ink);
  background: linear-gradient(180deg, #fffdf6, #f4ecd6); box-shadow: 0 0 0 2px #b9c2cf, 0 0 0 3px #3a404c, 0 14px 34px rgba(0,0,0,.4); }
.picker.mini { width: 280px; }
.pk-title { font-weight: 900; font-size: 16px; margin: 0 2px 8px; line-height: 1.3; }
.pk-help { margin: 0 2px 8px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.5; }
.pk-ab { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px; margin-bottom: 6px; padding: 4px 12px; border-radius: 12px; text-align: left;
  border: 1px solid #1d4fa8; background: linear-gradient(180deg, #ffffff, #e6eefc); color: #13254d; font-weight: 800; font-size: 16px; }
.pk-ab:hover:not(:disabled) { background: linear-gradient(180deg, #eaf2ff, #c9dbff); }
.pk-ab .mark { width: 24px; height: 24px; font-size: 13px; }
.pk-ab .pk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-ab small { font-size: 12px; font-weight: 700; color: #2a5fc8; white-space: nowrap; max-width: 46%; overflow: hidden; text-overflow: ellipsis; }
.pk-ab:disabled { opacity: .55; cursor: not-allowed; background: #efebe2; border-color: #a99f88; color: #5a5242; }
.pk-ab:disabled small { color: #9a2b2b; white-space: normal; }
.pk-ab.soon { border-style: dashed; border-color: #9a8f74; background: repeating-linear-gradient(-45deg, #f6f3ea 0 6px, #ece6d6 6px 12px); color: #4a4232; }
.pk-ab.soon small { color: #6b6250; }
.pk-row { display: flex; gap: 8px; margin-top: 2px; }
.pk-row button { flex: 1; min-height: 44px; border-radius: 999px; font-weight: 800; font-size: 15px; }
.pk-cancel { border: 1px solid #7a2a2a; background: #fff; color: #7a2a2a; }
.pk-full { border: 1px solid #7a6a4a; background: #fff7e2; color: #3a2e16; }
.pk-go { border: 2px solid #8a5a00; color: #3b2600; background: linear-gradient(180deg, #fff1b8, #f6c94c 45%, #d99a17); }

body.choosing .slot:not(.targetable) .card-wrap { filter: brightness(.38) saturate(.35); }
body.choosing .slot.empty:not(.targetable), body.choosing .hand-zone, body.choosing .turn-strip > :not(.cancel):not(.end) { opacity: .35; }
body.choosing .player-row:not(.targetable) { filter: brightness(.45) saturate(.4); }
body.choosing .player-row.targetable { cursor: crosshair; box-shadow: 0 0 0 3px #ff4d6a, 0 0 22px #ff4d6a; animation: targetPulseRow 1s ease-in-out infinite; }
@keyframes targetPulseRow { 50% { box-shadow: 0 0 0 3px #ffb1bf, 0 0 30px #ff4d6a; } }
body.choosing .slot.targetable .card-wrap { z-index: 3; }
body.choosing .sidebar { opacity: .55; }
@media (prefers-reduced-motion: reduce) { body.choosing .player-row.targetable { animation: none; } }

@media (max-width: 1023px) {
  .picker { left: 8px !important; right: 8px; bottom: 78px; top: auto !important; width: auto; max-width: none; max-height: 60dvh; overflow-y: auto; }
  .picker.mini { width: auto; }
  body.sheet-open .picker { display: none; }
}

.picker.bar { width: auto; min-width: 320px; display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; }
.picker.bar .pk-title { margin: 0; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker.bar .pk-cancel { min-height: 40px; padding: 0 20px; border-radius: 999px; font-weight: 800; flex: none; }
@media (min-width: 1024px) { body.choosing #place-help { visibility: hidden; } }
@media (max-width: 1023px) {
  .picker.bar { bottom: 78px; max-height: none; }
  .picker.bar.at-top { top: 6px !important; bottom: auto; }
  .picker.bar .pk-title { font-size: 13.5px; white-space: normal; }
  .picker.bar .pk-cancel { min-height: 44px; }
}

@media (max-width: 1023px) { .player-row .counts { width: 10.6em; font-size: 9.5px; } }
#cancel-top:disabled, #cancel-mobile:disabled, #clear-focus:disabled, #hint-cancel:disabled { opacity: .45; cursor: default; }

@media (min-width: 1024px) and (max-width: 1279px) {
  .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 8px; padding-left: 8px; padding-right: 8px; }
  .turn-strip { gap: 8px; padding-left: 12px; }
  .turn-strip strong { font-size: 15px; }
  .turn-count { font-size: 12px; }
  .skill-state { font-size: 12px; padding: 2px 8px; }
  .turn-strip .end { flex: none; min-width: 168px; padding: 0 20px; font-size: 21px; letter-spacing: .06em; }
  .field { gap: 6px; padding: 0 2px; }
  .player-row strong { min-width: 0; }
  .player-row .counts { width: 11.5em; font-size: 12px; }
}
@media (min-width: 1024px) {
  .hand-zone { min-width: 0; }
  .hand { flex: 1 1 auto; }
  .hand-card { flex: 1 1 0; width: auto; min-width: 128px; max-width: 184px; }
}
@media (min-width: 1700px) { .hand-card { max-width: 220px; } }

.field.c2 .labels { display: flex; flex-wrap: nowrap; overflow: hidden; position: relative; z-index: 1;
  height: 15px; margin-top: -15px; padding: 0 2px 2px; gap: 2px; pointer-events: none; }
.field.c2 .labels:empty { display: none; }
.field.c2 .labels span { font-size: 10px; line-height: 13px; padding: 0 4px; box-shadow: 0 0 0 1px rgba(0,0,0,.35); }
.field.c2 .labels span.klass, .field.c2 .labels span.support { display: none; }
.field.c2 .labels .lf { display: none; } .field.c2 .labels .ls { display: inline; }
.field.c2 .art { min-height: 15px; }
.field.c2 .art .initial { display: none; }
.field.c1 .art .initial { display: none; }

@media (max-width: 1279px) {
  .field .ab { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
  .field .ab .mark { display: inline-grid; vertical-align: -.18em; margin: 0 .2em 0 0; }
  .field .ab em { display: inline; -webkit-line-clamp: unset; overflow: visible; white-space: normal; }
  .field .ab { font-size: clamp(12px, 9.4cqw, 23px); line-height: 1.22; font-weight: 700; }
  .field .ab em { font-size: inherit; }
  .field.c1 .ab { -webkit-line-clamp: 1; }
  .field.c2 .ab { -webkit-line-clamp: 1; font-size: clamp(11px, 8cqw, 19px); letter-spacing: -.04em; }
}
@media (max-width: 1023px) {
  .field .ab { -webkit-line-clamp: 3; font-size: 11px; letter-spacing: -.05em; }
  .field .ab .mark { width: 13px; height: 13px; font-size: 8.5px; margin-top: 0; }
  .field.c1 .ab { -webkit-line-clamp: 2; }
  .field.c2 .ab { -webkit-line-clamp: 2; font-size: 10.5px; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  body .fx-float { font-size: 30px; padding: 5px 10px 6px; } body .fx-float.big { font-size: 34px; } body .fx-float.out { font-size: 20px; }
}
@media (max-width: 1023px) {
  body .fx-float { font-size: 16px; padding: 2px 4px 3px; border-radius: 7px; letter-spacing: -.06em;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #8a0016, 0 4px 10px rgba(120, 0, 20, .5); }
  body .fx-float.big { font-size: 18px; } body .fx-float.out { font-size: 12px; }
}

@media (min-width: 1024px) {
  .picker:not(.bar) { overflow-y: auto; }
  .picker:not(.bar):not(.mini) .pk-row { position: sticky; bottom: 0; margin: 0 -10px; padding: 6px 10px 8px; background: linear-gradient(180deg, rgba(244,236,214,.9), #f4ecd6 40%); }
}
@media (min-width: 1024px) and (max-width: 1279px), (min-width: 1024px) and (max-height: 780px) {
  .picker:not(.bar):not(.mini) { padding: 8px 8px 0; }
  .picker:not(.bar):not(.mini) .pk-title { font-size: 14.5px; margin: 0 2px 6px; }
  .picker:not(.bar):not(.mini) .pk-ab { min-height: 38px; margin-bottom: 4px; padding: 2px 10px; font-size: 14.5px; }
  .picker:not(.bar):not(.mini) .pk-row { margin: 0 -8px; padding: 6px 8px 8px; }
  .picker:not(.bar):not(.mini) .pk-row button { min-height: 38px; }
}
@media (max-width: 1023px) {
  .picker:not(.bar) { top: 58px !important; bottom: auto; max-height: 52dvh; }
  .turn-strip .latest { min-height: 32px; display: flex; align-items: center; }
}

@media (min-width: 1024px) { body[data-bg="gf"] .layout { padding-bottom: 20px; } }

.slot.empty.banned { flex-direction: column; justify-content: center; border-color: rgba(192, 57, 43, .55); background: repeating-linear-gradient(135deg, rgba(192,57,43,.10) 0 10px, rgba(192,57,43,.03) 10px 20px); }
.slot.empty.banned .ban-x { color: #c0392b; font-weight: 800; }
.slot.empty.banned .ban-text { display: block; font-style: normal; font-size: 12px; font-weight: 700; line-height: 1.35; color: #a93226; text-align: center; margin-top: 2px; }
