/* 手札のカードと対戦盤面。味方は青、相手は赤で統一し、どちらの側かを色で分かるようにする。 */
:root {
  --me: #4aa8ff;
  --foe: #ff6b6b;
  /* 画面の高さから、手札・帯・真ん中を引いた残りをキャラの絵に回す */
  --art-unit: max(42px, calc(31.5vh - 188px));
  --card-h: clamp(118px, 21vh, 250px);
  --evc-h: clamp(46px, 9.5vh, 112px);
}

/* ---- 能力値の札 ---- */
.s-str { --p: var(--str); } .s-spd { --p: var(--spd); } .s-int { --p: var(--int); } .s-gut { --p: var(--gut); } .s-sen { --p: var(--sen); } .s-num { --p: #667; }
.pc { display: inline-grid; place-items: center; min-width: 17px; height: 17px; padding: 0 2px; border-radius: 4px; background: var(--p); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; }
.st { display: flex; flex-direction: column; align-items: center; justify-content: center; background: color-mix(in srgb, var(--p) 16%, #fff); color: var(--p); border-radius: 4px; font-weight: 700; line-height: 1.05; min-width: 0; }
.st i { font-style: normal; font-size: .62em; font-weight: 700; opacity: .9; }
.st.hot { background: var(--p); color: #fff; outline: 2px solid #fff; box-shadow: 0 0 8px var(--p); z-index: 1; }
.formula { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 1px 6px; font-size: 12px; font-weight: 700; }
.fgroup { display: inline-flex; align-items: center; gap: 2px; }
.formula b { font-size: 11px; }
.formula .fa { color: #ff9c8f; } .formula .fd { color: #8fd0ff; }
.card .formula .fa { color: #c43a2d; } .card .formula .fd { color: #1c6fb8; }

/* ---- 手札 ---- */
.card-hand { width: calc(var(--card-h) * .7); height: var(--card-h); flex: none; cursor: pointer; transition: transform .12s; }
.card-hand .art { height: 42%; font-size: 26px; flex: none; }
.card-hand .nm { font-size: clamp(12px, 1.5vh, 16px); font-weight: 700; line-height: 1.2; padding: 3px 5px 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-hand .sub { font-size: clamp(10px, 1.2vh, 13px); line-height: 1.25; color: var(--ink-dim); padding: 0 5px; overflow: hidden; flex: 1; min-height: 0; }
.card-hand .mini-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; padding: 0 3px 3px; font-size: clamp(11px, 1.5vh, 16px); }
.card-hand .ki-tag { position: absolute; top: 3px; right: 3px; z-index: 1; background: rgba(0, 0, 0, .72); color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 99px; font-weight: 700; }
.card-hand.idle { filter: brightness(.68) saturate(.7); }
.card-hand.has-action { transform: translateY(-3px); }
.card-hand:hover { transform: translateY(-5px); }

/* ---- 盤面の骨組み ---- */
#board {
  height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) clamp(220px, 16vw, 300px); grid-template-rows: minmax(0, 1fr) auto;
  background: linear-gradient(rgba(10, 24, 26, .78), rgba(10, 24, 26, .9)), url("/static/art/bg_board.webp") center / cover no-repeat, var(--board);
}
.table { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; justify-content: space-between; min-height: 0; padding: 6px 8px; gap: 6px; overflow-y: auto; }
.sidepanel { grid-column: 2; grid-row: 1 / span 2; border-left: 1px solid var(--board-line); display: flex; flex-direction: column; min-height: 0; background: rgba(0, 0, 0, .3); }
.handbar { grid-column: 1; grid-row: 2; border-top: 1px solid var(--board-line); background: rgba(0, 0, 0, .42); min-width: 0; }
.hand > :first-child { margin-left: auto; }
.hand > :last-child { margin-right: auto; }
.hand { display: flex; gap: 7px; overflow-x: auto; padding: 6px 10px 8px; scrollbar-width: thin; min-height: calc(var(--card-h) + 14px); }

.side { display: flex; flex-direction: column; gap: 5px; padding: 5px 6px; border-radius: 12px; border: 2px solid transparent; transition: border-color .25s, box-shadow .25s; }
.side.opp { background: rgba(255, 90, 90, .1); }
.side.mine { background: rgba(70, 160, 255, .11); }
.side.opp.active { border-color: var(--foe); box-shadow: 0 0 18px rgba(255, 90, 90, .4); }
.side.mine.active { border-color: var(--me); box-shadow: 0 0 18px rgba(74, 168, 255, .45); }

/* ---- プレイヤーの帯 ---- */
.pbar { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--chalk-dim); min-width: 0; }
.pface { position: relative; width: 30px; height: 30px; border-radius: 50%; overflow: hidden; flex: none; border: 2px solid var(--chalk-dim); background: #33424a; }
.side.opp .pface { border-color: var(--foe); } .side.mine .pface { border-color: var(--me); }
.pbar .who { color: var(--chalk); font-weight: 700; font-size: 14px; max-width: 30%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order { flex: none; padding: 2px 9px; border-radius: 6px; font-weight: 700; font-size: 13px; line-height: 1.3; letter-spacing: .05em; }
.order.first { background: var(--accent); color: var(--accent-ink); }
.order.second { background: #dfe7ee; color: #22303a; }
.turn-pill { flex: none; padding: 2px 9px; border-radius: 99px; font-weight: 700; font-size: 12.5px; color: #fff; animation: pillglow 1.4s infinite; white-space: nowrap; }
.side.mine .turn-pill { background: var(--me); } .side.opp .turn-pill { background: var(--foe); }
@keyframes pillglow { 50% { filter: brightness(1.25); } }
.cnt { display: inline-flex; align-items: center; gap: 4px; flex: none; font-weight: 700; color: var(--chalk); background: none; border: 0; padding: 0; font-size: 13px; }
.cnt small { font-size: 11px; font-weight: 500; color: var(--chalk-dim); }
.cnt.trash { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ic { display: inline-block; width: 11px; height: 15px; border-radius: 2px; border: 1.5px solid var(--chalk-dim); }
.hand-ic { background: #6f8fa8; transform: rotate(-8deg); }
.deck-ic { background: #6f8fa8; box-shadow: 2px 2px 0 #4c6476, 4px 4px 0 #36495a; }
.trash-ic { width: 13px; height: 14px; background: transparent; border-radius: 1px 1px 4px 4px; border-top-width: 3px; }
.kills { display: inline-flex; align-items: center; gap: 3px; color: var(--chalk-dim); font-size: 12px; font-weight: 700; flex: none; }
.stars i { font-style: normal; color: rgba(255, 255, 255, .22); font-size: 13px; }
.stars i.on { color: var(--accent); text-shadow: 0 0 6px rgba(240, 180, 41, .8); }
.off { color: #ffb3ac; font-weight: 700; flex: none; }
.show-log { display: none; }

/* ---- 場のキャラ ---- */
.units { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.unit {
  position: relative; background: var(--paper); color: var(--ink); border: 2px solid var(--c); border-radius: 9px; padding: 0; text-align: left;
  overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, filter .2s, opacity .2s; cursor: pointer; min-width: 0;
}
.unit.empty { background: rgba(255, 255, 255, .03); border: 1px dashed var(--board-line); cursor: default; min-height: calc(var(--art-unit) + 62px); }
.uart { position: relative; height: var(--art-unit); background: linear-gradient(150deg, var(--c), #222); flex: none; }
.ribbon { position: absolute; left: 0; font-size: 10.5px; font-weight: 700; padding: 1px 6px 1px 4px; border-radius: 0 6px 6px 0; color: #fff; white-space: nowrap; }
.ribbon.lead { top: 2px; background: var(--accent); color: var(--accent-ink); }
.ribbon.role { bottom: 2px; background: #fff; color: #b1232e; }
.tag-ex { position: absolute; inset: 0; display: grid; place-items: center; }
.tag-ex b { font-size: clamp(12px, 1.7vh, 18px); color: #fff; background: rgba(0, 0, 0, .74); padding: 1px 10px; border-radius: 5px; letter-spacing: .12em; }
.uitem-n { position: absolute; right: 2px; bottom: 2px; background: #8a6d3b; color: #fff; font-size: 10px; padding: 0 5px; border-radius: 99px; font-weight: 700; }
.uname { font-size: clamp(12.5px, 1.6vh, 17px); font-weight: 700; line-height: 1.2; padding: 2px 5px 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--c); color: #fff; }
.ustats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; padding: 2px; font-size: clamp(14px, 2vh, 21px); }
.ukibox { display: flex; align-items: center; gap: 4px; padding: 0 4px 3px; }
.uki { flex: 1; display: flex; gap: 1px; height: 8px; min-width: 0; }
.uki i { flex: 1; background: #d9cfb6; border-radius: 1.5px; }
.uki i.on { background: var(--ok); }
.uki i.low { background: var(--danger); }
.ukn { font-size: 11px; font-weight: 700; flex: none; }
.unit.exhausted { transform: rotate(2.5deg) scale(.96); }
.unit.exhausted .uart { filter: saturate(.2) brightness(.6); }
.unit.exhausted .uname { background: #667; }
.unit.leader { box-shadow: 0 0 0 2px var(--accent); }
.unit.in-battle { box-shadow: 0 0 0 3px #fff, 0 0 16px 4px rgba(255, 255, 255, .6); transform: none; z-index: 1; }
.unit.dim { opacity: .42; }
.unit.hit { animation: shake .4s; }
@keyframes shake { 20% { transform: translateX(-5px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } }
.selectable { outline: 3px solid var(--accent); outline-offset: 1px; animation: pulse 1.1s infinite; z-index: 1; }
.has-action { box-shadow: 0 0 0 2px var(--accent), 0 0 14px rgba(240, 180, 41, .85); }
.unit.has-action { box-shadow: 0 0 0 2px var(--accent), 0 0 12px rgba(240, 180, 41, .75); }
@keyframes pulse { 50% { outline-color: rgba(240, 180, 41, .25); } }
.card-hand.mull-pick { outline: 4px solid var(--danger); outline-offset: -2px; }
.card-hand.mull-pick::after { content: ""; position: absolute; inset: 0; background: rgba(30, 20, 30, .45); pointer-events: none; }
.hand-info { position: absolute; z-index: 3; right: 4px; bottom: 4px; padding: 3px 9px; border-radius: 99px; background: #fff; color: #1f5f8b; border: 2px solid #1f5f8b; font-size: 12px; font-weight: 700; line-height: 1.2; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }
.hand-info:hover, .hand-info:focus-visible { background: #1f5f8b; color: #fff; outline: none; }
@media (max-width: 700px) { .hand-info { font-size: 11px; padding: 4px 8px; } }
.mull-tag { position: absolute; z-index: 2; top: 40%; left: 50%; transform: translateX(-50%) rotate(-8deg); background: var(--danger); color: #fff; font-weight: 700; font-size: 15px; padding: 2px 10px; border-radius: 6px; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); pointer-events: none; }
.new-card { animation: pop .32s ease-out; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }

/* ---- 真ん中: 種目エリア ---- */
.arena { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 270px) minmax(0, 1fr); gap: 8px; align-items: stretch; padding: 5px 6px; border-radius: 12px; background: rgba(0, 0, 0, .3); border-block: 1px dashed rgba(242, 239, 228, .28); }
.slots { display: flex; flex-direction: column; gap: 3px; min-width: 0; justify-content: center; }
.slots-label { font-size: 11.5px; font-weight: 700; }
.slots.opp .slots-label { color: #ff9e9e; } .slots.mine .slots-label { color: #9ccfff; }
.slots-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.evc { position: relative; display: block; height: var(--evc-h); border-radius: 8px; overflow: hidden; padding: 0; color: #fff; text-align: left; background: #27483a; border: 2px solid #5fb37e; min-width: 0; }
.slots.opp .evc { border-color: #d98080; } .slots.mine .evc { border-color: #79b9ec; }
.evc .art-img { object-position: 50% 35%; }
.evc-body { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px; padding: 2px 4px; background: linear-gradient(transparent 5%, rgba(0, 0, 0, .86) 72%); }
.evc-name { font-size: clamp(12.5px, 1.6vh, 17px); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px #000; }
.evc .formula { font-size: 11px; gap: 0 4px; }
.evc .pc { min-width: 15px; height: 15px; font-size: 10px; }
.evc.empty { display: grid; place-items: center; background: rgba(255, 255, 255, .03); border: 1px dashed var(--board-line) !important; color: rgba(242, 239, 228, .35); font-size: 11px; }
.evc.used { filter: grayscale(.9) brightness(.65); }
.stamp { position: absolute; top: 3px; right: 3px; background: rgba(0, 0, 0, .8); font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 4px; }
.evc.chosen { outline: 3px solid #fff; box-shadow: 0 0 14px rgba(255, 255, 255, .7); filter: none; }

.arena-center { display: flex; flex-direction: column; gap: 4px; justify-content: center; min-width: 0; }
.turnboard { text-align: center; border-radius: 9px; padding: 3px 6px; background: rgba(255, 255, 255, .06); }
.turnboard.mine { background: rgba(74, 168, 255, .22); } .turnboard.opp { background: rgba(255, 107, 107, .2); }
.tb-no { font-size: 11.5px; color: var(--chalk-dim); font-weight: 700; }
.tb-who { font-family: "Klee One", sans-serif; font-size: 21px; line-height: 1.15; }
.turnboard.mine .tb-who { color: #bfe0ff; } .turnboard.opp .tb-who { color: #ffc4c4; }
.steps { display: flex; justify-content: center; gap: 2px; font-size: 10.5px; margin-top: 2px; }
.steps span { padding: 0 5px; border-radius: 4px; color: rgba(242, 239, 228, .45); font-weight: 700; }
.steps span.on { background: var(--accent); color: var(--accent-ink); }
.field-chip { position: relative; overflow: hidden; display: block; width: 100%; height: 30px; border-radius: 7px; border: 1px solid #7f8ed6; background: #2c3564; color: #fff; padding: 0; text-align: left; font-weight: 700; font-size: 12.5px; }
.field-chip .art-img { opacity: .35; object-position: 50% 50%; }
.field-chip > span { position: relative; padding: 0 7px; line-height: 28px; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
.field-chip small { font-size: 10px; margin-right: 5px; color: #cdd5ff; }
.stack-list { display: flex; flex-direction: column-reverse; gap: 2px; font-size: 12px; }
.stack-item { display: flex; align-items: center; gap: 5px; background: rgba(255, 255, 255, .1); border-radius: 6px; padding: 1px 6px 1px 2px; border-left: 3px solid var(--me); }
.stack-item.opp { border-left-color: var(--foe); }
.stack-pic { position: relative; width: 20px; height: 20px; border-radius: 4px; overflow: hidden; flex: none; background: #333; }
.stack-item.negated { text-decoration: line-through; opacity: .6; }
.legend { display: none; }

.vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px; align-items: center; }
.vs-face { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.vs-pic { position: relative; width: clamp(44px, 8.5vh, 96px); aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #333; display: grid; place-items: center; font-size: 22px; border: 3px solid #889; }
.vs-face.mine .vs-pic { border-color: var(--me); } .vs-face.opp .vs-pic { border-color: var(--foe); }
.vs-dmg { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, .78); color: #ffb0a8; font-size: 13px; font-weight: 700; line-height: 1.3; }
.vs-dmg.ko { background: var(--danger); color: #fff; font-size: 11px; }
.vs-dmg.zero { color: #bfe0ff; font-size: 11px; }
.vs-role { font-size: 10.5px; font-weight: 700; color: var(--accent); line-height: 1.2; }
.vs-nm { font-size: 11.5px; font-weight: 700; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vs-mid { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.vs-word { font-family: "Klee One", sans-serif; font-size: 22px; color: var(--accent); line-height: 1; text-shadow: 0 0 8px rgba(240, 180, 41, .7); }
.vs-type { font-size: 12px; font-weight: 700; background: #fff; color: #1b4d31; border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.vs-type.none { background: none; color: var(--chalk-dim); font-size: 10.5px; }

/* ---- 今やること ---- */
.guide { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 12px 8px; min-height: 52px; border-left: 6px solid transparent; }
.guide.mine { border-left-color: var(--accent); background: linear-gradient(90deg, rgba(240, 180, 41, .2), transparent 70%); }
.prompt { flex: 1 1 220px; font-size: clamp(15px, 1.8vh, 19px); font-weight: 700; line-height: 1.3; color: var(--chalk-dim); min-width: 0; }
.prompt.mine { color: var(--accent); }
.prompt small { display: block; font-size: clamp(12px, 1.4vh, 14px); font-weight: 500; color: var(--chalk); }
.prompt-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.prompt-actions .btn { min-height: 40px; padding: 6px 16px; font-size: 14.5px; }
.timer { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.timer[hidden] { display: none; }
.timer i { display: block; height: 100%; background: var(--accent); }
.timer i.low { background: var(--danger); }

/* ---- 進行ログ ---- */
.sidepanel h3 { font-size: 15px; padding: 10px 12px 6px; color: var(--chalk-dim); }
.log { flex: 1; overflow-y: auto; padding: 0 12px 10px; font-size: 12.5px; line-height: 1.5; color: var(--chalk-dim); }
.log div { padding: 2px 0; border-bottom: 1px dotted rgba(255, 255, 255, .08); }
.log div.turn { color: var(--accent); font-weight: 700; margin-top: 4px; }
.side-actions { padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--board-line); }
.check { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--chalk-dim); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---- カードの種類の帯 ---- */
.tband { display: flex; align-items: center; gap: 3px; padding: 1px 6px; font-size: clamp(10.5px, 1.3vh, 13px); font-weight: 700; color: #fff; line-height: 1.35; flex: none; letter-spacing: .04em; }
.tb-character { background: #47525e; } .tb-tag { background: #1f7fc4; } .tb-battle { background: #2f8a4c; }
.tb-event { background: #cf3f7d; } .tb-item { background: #9a7330; } .tb-field { background: #4a55b4; }
.tband-intr { margin-left: auto; background: #fff; color: #c2265f; border-radius: 3px; padding: 0 4px; font-size: .92em; }
.card-full .tband { font-size: 13px; padding: 3px 10px; }

.tband { flex-wrap: wrap; white-space: nowrap; }
.tband-when { flex-basis: 100%; font-weight: 500; font-size: .92em; letter-spacing: 0; }
.tband-when::before { content: "使える場面: "; opacity: .8; font-size: .9em; }
.when { display: inline-block; font-size: 11.5px; font-weight: 700; color: #1b4d6e; background: #d8ebf7; border-radius: 4px; padding: 1px 6px; }
div.when { align-self: flex-start; }
.face-skill { display: block; }
.face-skill b { color: #8a4b00; }
.face-skill .tok { width: 13px; height: 13px; font-size: 8px; vertical-align: 1px; }
.face-when { font-size: .9em; font-weight: 700; color: #1b6a9e; }
.face-none { color: #a39a86; }

/* ---- マウスを重ねた説明 ---- */
.skill-tip { position: fixed; z-index: 66; width: 270px; padding: 9px 11px; display: flex; flex-direction: column; gap: 6px; background: rgba(12, 28, 28, .97); color: var(--chalk); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .55); font-size: 13px; line-height: 1.5; pointer-events: none; }
.tip-name { font-weight: 700; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.tip-state { font-size: 11px; font-weight: 700; background: #667; color: #fff; border-radius: 4px; padding: 0 5px; }
.tip-ab b { color: var(--accent); }
.tip-when { font-size: 11px; color: #9ccfff; }
.tip-none { color: var(--chalk-dim); }
.tip-items { color: #e0c48c; font-size: 12px; }

/* ---- 手札から場へドラッグ ---- */
.drop-zone { outline: 3px dashed var(--accent); outline-offset: 2px; }
.drop-over { outline-style: solid; box-shadow: 0 0 22px rgba(240, 180, 41, .75); background-color: rgba(240, 180, 41, .14); }

/* ---- 手札 ---- */
.hand-wrap { position: relative; }
/* チュートリアルの案内（吹き出し）と、押すところの光 */
.coach { position: fixed; z-index: 75; top: 8px; left: 50%; transform: translateX(-50%); width: min(620px, calc(100vw - 16px)); display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: #fffef9; color: #2b3a55; border: 3px solid #1f5f8b; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.coach-face { position: relative; flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; border: 2px solid #1f5f8b; background: #dfe9f5; }
.coach-face .art-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.coach-body { flex: 1; min-width: 0; }
.coach-head { display: flex; align-items: center; gap: 8px; }
.coach-head b { font-size: 16px; color: #1f5f8b; }
.coach-step { font-size: 12px; color: #6c7a8d; }
.coach-min { margin-left: auto; border: 1px solid #c8d6e5; background: #fff; color: #2b3a55; border-radius: 99px; font-size: 12px; padding: 2px 10px; cursor: pointer; }
.coach-text { margin: 4px 0 6px; font-size: 14px; line-height: 1.65; }
.coach-foot { display: flex; justify-content: flex-end; }
.coach-hint { font-weight: 800; color: #d9512c; font-size: 13.5px; }
.coach-hint.wait { color: #6c7a8d; font-weight: 600; }
.coach.min { padding: 6px 10px; }
.coach.min .coach-face { width: 30px; height: 30px; }
@media (max-width: 700px) { .coach { top: 4px; padding: 8px 9px; gap: 8px; } .coach-face { width: 40px; height: 40px; } .coach-text { font-size: 13px; line-height: 1.55; } }
/* 対戦開始の演出の間、下の画面を押せないようにする覆い（押すと演出を飛ばせる） */
.intro-block { position: fixed; inset: 0; z-index: 58; cursor: pointer; background: transparent; }
.intro-skip { position: absolute; right: 14px; bottom: 14px; padding: 4px 12px; border-radius: 99px; background: rgba(255, 255, 255, .85); color: #2b3a55; font-size: 12px; font-weight: 700; opacity: 0; animation: introSkip .3s ease 1s forwards; }
@keyframes introSkip { to { opacity: 1; } }
/* 手札が横にはみ出しているときの印: 端をぼかし、「あとN枚」の矢印を出す */
.hand-wrap::before, .hand-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 34px; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .2s; }
.hand-wrap::before { left: 0; background: linear-gradient(to right, rgba(74, 46, 16, .55), transparent); }
.hand-wrap::after { right: 0; background: linear-gradient(to left, rgba(74, 46, 16, .55), transparent); }
.hand-wrap.more-l::before, .hand-wrap.more-r::after { opacity: 1; }
.hand-more { position: absolute; top: 50%; z-index: 5; transform: translateY(-50%); display: flex; align-items: center; gap: 2px; padding: 8px 8px; border: 2px solid #fff; border-radius: 12px; background: rgba(43, 58, 85, .9); color: #fff; font-size: 12px; font-weight: 700; line-height: 1.1; cursor: pointer; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); }
.hand-more b { font-size: 22px; line-height: 1; }
.hand-more span { writing-mode: vertical-rl; letter-spacing: 1px; }
.hand-more.left { left: 2px; }
.hand-more.right { right: 2px; animation: nudge 1.6s ease-in-out infinite; }
.hand-more[hidden] { display: none; }
@keyframes nudge { 0%, 100% { transform: translate(0, -50%); } 50% { transform: translate(-4px, -50%); } }
@media (prefers-reduced-motion: reduce) { .hand-more.right { animation: none; } }
.hand-hint { position: absolute; right: 12px; top: 0; font-size: 11px; color: rgba(242, 239, 228, .45); pointer-events: none; }
.hand .card-hand { touch-action: pan-x; user-select: none; -webkit-user-select: none; }
.card-hand.dragging { opacity: .25; }
.drag-ghost { position: fixed !important; left: 0; top: 0; z-index: 120; pointer-events: none; margin: 0; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); opacity: .96; transition: none !important; animation: none !important; }
.is-dragging, .is-dragging * { cursor: grabbing !important; user-select: none; -webkit-user-select: none; }

/* ---- 割り込みのポップアップ ---- */
.sheet:has(.intr-pop) { width: min(620px, 100%); border: 2px solid var(--accent); box-shadow: 0 0 34px rgba(240, 180, 41, .45); animation: intrpop .18s ease-out; }
.sheet:has(.intr-pop.use) { border-color: #ff6f8f; box-shadow: 0 0 40px rgba(255, 80, 120, .6); }
@keyframes intrpop { from { transform: scale(.9); opacity: 0; } }
.intr-pop { display: flex; flex-direction: column; gap: 10px; }
.intr-head { align-self: center; padding: 3px 18px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-family: "Klee One", sans-serif; font-size: 22px; }
.intr-pop.use .intr-head { background: #e23d67; color: #fff; }
.intr-target { display: flex; gap: 10px; padding: 8px; border-radius: 10px; background: rgba(0, 0, 0, .3); }
.intr-art { position: relative; flex: none; width: 76px; height: 76px; border-radius: 8px; overflow: hidden; background: #33424a; }
.intr-tx { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.45; }
.intr-tx b { font-size: 15px; }
.intr-tx small { color: var(--chalk-dim); font-size: 11.5px; }
.intr-q { font-size: 16px; font-weight: 700; color: var(--accent); text-align: center; }
.intr-q small { display: block; font-size: 12.5px; font-weight: 500; color: var(--chalk); }
.intr-cards { display: flex; flex-direction: column; gap: 6px; }
.intr-card { display: flex; gap: 10px; padding: 6px; text-align: left; background: #10262a; border: 2px solid var(--accent); border-radius: 10px; color: var(--chalk); }
.intr-card:hover { background: #1b3a35; box-shadow: 0 0 12px rgba(240, 180, 41, .6); }
.intr-actions { display: flex; gap: 8px; }
.intr-actions .btn.primary { flex: 1; }
.timer.pop { position: relative; height: 5px; }

/* ---- シートの中 ---- */
.intr { display: inline-block; font-size: 11.5px; font-weight: 700; color: #fff; background: #b4466f; border-radius: 4px; padding: 1px 6px; margin-left: 4px; }
div.intr { margin-left: 0; align-self: flex-start; }
.cost-help { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--ink-dim); border-top: 1px dotted #c9bd9f; padding-top: 6px; }
.cant { font-size: 13px; color: #ffcf9e; line-height: 1.5; background: rgba(255, 160, 80, .12); border-radius: 8px; padding: 8px 10px; }
.sheet:has(.type-grid) { width: min(860px, 100%); }
.type-owner { font-size: 10.5px; font-weight: 700; padding: 0 5px; margin-left: 5px; border-radius: 4px; vertical-align: 1px; color: #fff; background: var(--me); white-space: nowrap; }
.type-owner.opp { background: var(--foe); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.type-tile { display: flex; gap: 8px; text-align: left; padding: 6px; background: #10262a; border: 2px solid var(--board-line); border-radius: 10px; color: var(--chalk); min-width: 0; }
.type-tile:hover { border-color: var(--accent); }
.type-art { position: relative; width: 62px; flex: none; border-radius: 7px; overflow: hidden; background: #27483a; }
.type-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.type-name { font-weight: 700; font-size: 15px; }
.dmg-line { font-size: 12.5px; }
.dmg-line b { font-size: 17px; margin: 0 2px; }
.dmg-line.good b { color: #ff9c8f; } .dmg-line.bad b { color: #8fd0ff; }
.dmg-line em { font-style: normal; font-size: 11px; font-weight: 700; padding: 0 5px; margin-left: 4px; border-radius: 4px; background: var(--danger); color: #fff; }
.sheet .vs { background: rgba(0, 0, 0, .25); border-radius: 10px; padding: 6px; }
.pay-opt { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 2px solid var(--board-line); background: #0f2420; border-radius: 9px; color: var(--chalk); text-align: left; font-size: 14px; font-weight: 700; }
.pay-opt small { display: block; font-size: 11px; font-weight: 500; color: var(--chalk-dim); }
.pay-opt.on { border-color: var(--accent); background: rgba(240, 180, 41, .18); }
.pay-opt:disabled { opacity: .35; }
.pay-face { position: relative; width: 38px; height: 38px; border-radius: 6px; overflow: hidden; background: #333; flex: none; }
/* ベータテストの感想欄（結果画面の中） */
.fb { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 2px dashed #f0b44a; border-radius: 12px; background: rgba(255, 248, 225, .9); color: var(--ink); }
.fb-h { font-weight: 800; font-size: 15px; color: #a0522d; }
.fb-sub { font-size: 12.5px; color: var(--ink-dim, #6c7a8d); line-height: 1.5; }
.fb-moods, .fb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chip { border: 2px solid #c8d6e5; background: #fff; color: var(--ink); border-radius: 99px; padding: 5px 14px; font-weight: 700; font-size: 14px; cursor: pointer; }
.fb-chip.small { font-size: 12px; padding: 3px 10px; font-weight: 600; }
.fb-chip.on { border-color: var(--accent); background: var(--accent); color: #fff; }
.fb-text { width: 100%; border: 2px solid #c8d6e5; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; resize: vertical; background: #fff; color: var(--ink); }
.fb-row { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.fb-msg { flex: 1; font-size: 12.5px; color: var(--danger, #e5484d); }
.fb-thanks { text-align: center; font-weight: 800; color: #2f9a5a; padding: 8px 0; }
.result-face { position: relative; width: 120px; height: 120px; border-radius: 50%; overflow: hidden; margin: 0 auto; border: 3px solid var(--accent); background: #333; }

/* ---- 演出 ---- */
.fx-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 57; pointer-events: none; }
.fx-num { position: fixed; z-index: 60; font-family: "Klee One", sans-serif; font-size: 34px; font-weight: 600; pointer-events: none; animation: rise 1.05s ease-out forwards; text-shadow: 0 2px 5px #000, 0 0 2px #000; }
.fx-num.dmg { color: #ff8a7f; } .fx-num.heal { color: #8ef0b8; }
@keyframes rise { to { transform: translateY(-46px); opacity: 0; } }
.fx-banner { position: fixed; z-index: 55; left: 0; right: 0; top: 42%; transform: translateY(-50%); background: rgba(10, 25, 21, .92); color: var(--chalk); padding: 12px 22px; border-block: 2px solid var(--accent); font-family: "Klee One", sans-serif; font-size: 28px; pointer-events: none; animation: bannerfx 1.25s ease-out forwards; text-align: center; }
.fx-banner.mine { background: linear-gradient(90deg, transparent, rgba(40, 110, 190, .96) 20%, rgba(40, 110, 190, .96) 80%, transparent); border-color: transparent; }
.fx-banner.opp { background: linear-gradient(90deg, transparent, rgba(180, 50, 55, .96) 20%, rgba(180, 50, 55, .96) 80%, transparent); border-color: transparent; }
.fx-banner small { display: block; font-size: 14px; color: var(--chalk); font-family: "Zen Kaku Gothic New", sans-serif; }
@keyframes bannerfx { 0% { opacity: 0; transform: translate(-30px, -50%); } 12%, 75% { opacity: 1; transform: translate(0, -50%); } 100% { opacity: 0; } }
.fx-card { position: fixed; z-index: 58; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: none; animation: cardfx 1.65s ease-out forwards; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fx-card-cap { background: var(--foe); color: #fff; font-weight: 700; padding: 3px 14px; border-radius: 99px; }
.fx-card .card-full { width: min(250px, 66vw); box-shadow: 0 8px 40px #000; }
.fx-card .card-full .art { height: 150px; }
.fx-card .cost-help, .fx-card .role { display: none; }
@keyframes cardfx { 0% { opacity: 0; transform: translate(-50%, -44%) scale(.8); } 10%, 82% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; } }
.splash { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; pointer-events: none; background: rgba(5, 14, 16, .84); animation: splashfx 3.3s ease-out forwards; }
.coin { width: 124px; height: 124px; border-radius: 50%; display: grid; place-items: center; font-family: "Klee One", sans-serif; font-size: 72px; animation: coinflip 1.1s ease-out; box-shadow: 0 0 34px rgba(255, 255, 255, .35); }
.splash.first .coin { background: var(--accent); color: var(--accent-ink); }
.splash.second .coin { background: #dfe7ee; color: #22303a; }
@keyframes coinflip { from { transform: rotateY(1080deg) scale(.4); } }
.splash-big { font-family: "Klee One", sans-serif; font-size: 36px; }
.splash-sub { font-size: 15px; line-height: 1.6; max-width: 26em; color: var(--chalk-dim); }
@keyframes splashfx { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
.conn-lost { position: fixed; top: 8px; left: 50%; transform: translateX(-50%); z-index: 90; background: var(--danger); color: #fff; padding: 6px 14px; border-radius: 99px; font-size: 14px; font-weight: 700; }

/* ---- ホーム ---- */
.hero { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); height: clamp(100px, 18vh, 190px); border-radius: 14px; overflow: hidden; border: 1px solid var(--board-line); }
.hero > span { position: relative; overflow: hidden; }
.hero-title { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 8px; background: linear-gradient(transparent, rgba(0, 0, 0, .85)); font-family: "Klee One", sans-serif; font-size: clamp(24px, 5vw, 36px); letter-spacing: .05em; }
.ver { display: inline-block; font-family: "Zen Kaku Gothic New", sans-serif; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--chalk); background: rgba(0, 0, 0, .55); border: 1px solid rgba(242, 239, 228, .35); border-radius: 99px; padding: 0 9px; vertical-align: middle; }
.hero-title .ver { position: absolute; right: 12px; bottom: 10px; }
.logo .ver { display: table; margin: 6px auto 0; }
.hero-title small { display: block; font-size: 12px; color: var(--chalk-dim); letter-spacing: .1em; }
.deck-concept { margin: 6px 0 10px; font-size: 13px; line-height: 1.6; opacity: .85; }
.deck-face { position: relative; width: 42px; height: 42px; border-radius: 8px; overflow: hidden; flex: none; background: #333; }
/* 使うデッキ: 横スクロールではなく縦に並べる（スマホは2列、PC は幅に合わせて列を増やす） */
.deck-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; padding: 3px 2px 6px; }
@media (max-width: 700px) { .deck-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.deck-tile-pick { position: relative; width: 100%; height: clamp(104px, 15vh, 150px); border-radius: 10px; overflow: hidden; padding: 0; border: 2px solid var(--board-line); background: #27483a; color: #fff; text-align: left; transition: transform .12s; }
.deck-tile-pick:hover { transform: translateY(-3px); }
.deck-tile-pick.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent), 0 0 14px rgba(240, 180, 41, .7); }
.deck-tile-pick .dtn { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 7px 6px; background: linear-gradient(transparent, rgba(0, 0, 0, .88) 55%); font-size: 13px; font-weight: 700; line-height: 1.25; }
.seg { display: flex; gap: 0; border: 1px solid var(--board-line); border-radius: 9px; overflow: hidden; }
.seg button { flex: 1; min-height: 42px; background: #0f2420; border: 0; color: var(--chalk-dim); font-weight: 700; }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.step-h { font-size: 19px; margin-bottom: -8px; }
.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 900px) { .mode-grid { grid-template-columns: 1fr; } }
.pick-row { display: flex; align-items: center; gap: 8px; }
.pick-row .field { flex: 1; min-width: 0; }
.auth-hero { position: relative; height: 140px; display: grid; grid-template-columns: repeat(4, 1fr); border-radius: 12px; overflow: hidden; }
.auth-hero > span { position: relative; overflow: hidden; }

/* ---- Codex の部品 ---- */
.ui-img { display: block; }
.pc .ui-img { width: 12px; height: 12px; }
.pc.has-ic { display: inline-flex; align-items: center; gap: 1px; padding: 0 3px 0 2px; }
.mini-ic { display: inline-block; width: 12px; height: 12px; vertical-align: -1px; }
.ribbon .mini-ic { margin-right: 2px; }
.cnt-ic { width: 16px; height: 16px; }
.type-ic { display: inline-block; width: 11px; height: 11px; vertical-align: -1px; margin-right: 2px; }
.tag-ex .ui-img { width: min(64%, 130px); filter: brightness(2.6) drop-shadow(0 0 3px #000) drop-shadow(0 0 1px #000); }
.stamp:has(.ui-img) { background: none; padding: 0; top: 4%; right: 3%; width: 58%; max-width: 110px; }
.stamp .ui-img { width: 100%; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px #fff); }
.vs-img { width: 58px; height: auto; }
.coin:has(.coin-img) { background: none !important; box-shadow: none; }
.coin-img { width: 100%; height: 100%; }
.logo-img { width: min(440px, 100%); height: auto; margin: 0 auto; }
.hero-title .logo-img { margin: 0; width: min(340px, 74%); }
.stat .pc { display: inline-grid; margin: 0 auto; }
body { background: linear-gradient(rgba(14, 30, 30, .86), rgba(14, 30, 30, .93)), url("/static/art/bg_home.webp") center / cover fixed no-repeat, var(--board); }

/* ---- 属性の札・条件コスト・貯めたコスト ---- */
.attr-badge { display: inline-flex; align-items: center; gap: 2px; padding: 0 5px; border-radius: 99px; background: var(--p); color: #fff; font-size: .9em; font-weight: 700; line-height: 1.45; white-space: nowrap; box-shadow: 0 0 0 1px rgba(255, 255, 255, .85); }
.attr-badge .ui-img { width: 10px; height: 10px; }
.tband .attr-badge { margin-left: auto; }
.uart .attr-badge { position: absolute; right: 2px; top: 2px; font-size: 10.5px; z-index: 1; }
/* ---- 所属の札と、所属の常時スキルで上がった能力値 ---- */
.club-badge { display: inline-flex; align-items: center; padding: 0 6px; border-radius: 4px; color: #fff; font-size: .82em; font-weight: 700; line-height: 1.5; white-space: nowrap; margin-left: 3px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .8); }
.club-badge.cl-sp { background: #d9512c; }
.club-badge.cl-cu { background: #7b4bc4; }
.club-badge.cl-co { background: #1f5f8b; }
.club-badge.cl-ho { background: #2f9a5a; }
.uart .club-badge { position: absolute; right: 2px; top: 21px; font-size: 10px; padding: 0 4px; margin: 0; z-index: 1; }
.st.boost, .stat.boost b { color: #0a8f3c; font-weight: 800; }
.unit .st.boost { background: #d8f7e2; }
.st.drop, .stat.drop b { color: #c0392b; }
@media (max-width: 700px) { .uart .club-badge { font-size: 8px; top: 14px; right: 1px; padding: 0 2px; } }
.tok.cond { background: #fff !important; color: var(--p, #333); border: 2px dashed currentColor; }
.tok.cond.str { color: var(--str); } .tok.cond.spd { color: var(--spd); } .tok.cond.int { color: var(--int); } .tok.cond.gut { color: var(--gut); } .tok.cond.sen { color: var(--sen); }
.pool { display: inline-flex; align-items: center; gap: 2px; flex: none; font-size: 11px; font-weight: 700; color: #fff; }
.pool-face { display: grid; place-items: center; background: var(--paper-2); font-weight: 700; }
.theme-seg { flex: none; min-width: 170px; }
.theme-seg button { min-height: 32px; font-size: 12.5px; padding: 0 10px; white-space: nowrap; }

/* ---- 低い画面の PC ---- */
@media (min-width: 821px) and (max-height: 720px) {
  :root { --card-h: 118px; --evc-h: 46px; }
  .steps, .tb-no, .slots-label, .vs-nm, .card-hand .sub { display: none; }
  .vs-pic { width: 40px; }
  .pface { width: 24px; height: 24px; }
  .side { gap: 3px; padding: 3px 5px; }
  .guide { min-height: 46px; padding: 3px 12px 5px; }
  .field-chip { height: 24px; }
  .field-chip > span { line-height: 22px; }
}

/* ---- スマホ ---- */
@media (max-width: 820px) {
  :root { --art-unit: clamp(32px, 6.8vh, 62px); --card-h: clamp(112px, 17vh, 142px); --evc-h: clamp(40px, 6.4vh, 56px); }
  #board { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .sidepanel { display: none; }
  .sidepanel.open { display: flex; position: fixed; inset: 0; z-index: 65; background: var(--board); border: 0; }
  .show-log { display: inline-flex !important; flex: none; white-space: nowrap; min-height: 28px; padding: 2px 8px; font-size: 12px; align-items: center; }
  .table { padding: 4px; gap: 4px; }
  .side { padding: 3px; gap: 3px; border-radius: 9px; }
  .pbar { gap: 5px; font-size: 12px; }
  .pface { width: 24px; height: 24px; }
  .pbar .who { font-size: 12px; max-width: 24%; }
  .order { font-size: 11.5px; padding: 1px 6px; }
  .turn-pill { font-size: 10.5px; padding: 1px 6px; }
  .cnt { font-size: 11.5px; gap: 2px; }
  .ic { width: 9px; height: 12px; }
  .deck-ic { box-shadow: 1px 1px 0 #4c6476, 2px 2px 0 #36495a; }
  .kills, .cnt small { font-size: 0; }
  .evc .pc.has-ic .pc-t { display: none; }
  .stars i { font-size: 11px; }
  .units { gap: 2px; }
  .unit { border-radius: 6px; border-width: 1.5px; }
  .unit.empty { min-height: calc(var(--art-unit) + 46px); }
  .uname { font-size: 9.5px; padding: 1px 2px; }
  .ustats { font-size: 11px; padding: 1px; }
  .ustats .st i { display: none; }
  .ukibox { padding: 0 2px 2px; gap: 2px; }
  .uki { height: 5px; }
  .ukn { font-size: 9px; }
  .ribbon { font-size: 8.5px; padding: 0 3px 0 2px; }
  .tag-ex { font-size: 11px; }
  .uitem-n { font-size: 8px; padding: 0 3px; }
  .arena { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 3px; border-radius: 9px; }
  .slots { flex-direction: row; align-items: center; gap: 3px; }
  .slots-label { writing-mode: vertical-rl; font-size: 9.5px; line-height: 1; flex: none; letter-spacing: -.02em; }
  .slots-row { flex: 1; min-width: 0; gap: 3px; }
  .evc-name { font-size: 10.5px; }
  .evc .formula { font-size: 9.5px; }
  .evc .formula b { font-size: 9.5px; }
  .evc .pc { min-width: 13px; height: 13px; font-size: 9px; }
  .arena-center { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 3px 6px; }
  .turnboard { flex: 1 1 100%; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 2px 6px; }
  .tb-who { font-size: 15px; }
  .steps { margin: 0; }
  .vs { flex: 1 1 100%; }
  .vs-pic { width: 40px; }
  .field-chip { flex: 1 1 100%; height: 22px; font-size: 11px; }
  .field-chip > span { line-height: 20px; }
  .stack-list { flex: 1 1 100%; }
  .legend { display: flex; flex: 1 1 100%; gap: 2px; align-items: center; justify-content: center; }
  .legend small { font-size: 9.5px; color: var(--chalk-dim); margin-left: 4px; }
  .legend .pc { min-width: 13px; height: 13px; font-size: 9px; }
  .guide { padding: 4px 8px 6px; min-height: 44px; gap: 3px 8px; border-left-width: 4px; }
  .prompt { font-size: 13px; flex-basis: 100%; }
  .prompt small { font-size: 11px; }
  .prompt-actions .btn { min-height: 38px; padding: 4px 14px; font-size: 13.5px; flex: 1 1 auto; }
  .prompt-actions { flex: 1 1 100%; }
  .hand { gap: 5px; padding: 4px 6px 6px; }
  .card-hand .nm { font-size: 10.5px; padding: 2px 3px 0; }
  .card-hand .sub { font-size: 9px; padding: 0 3px; }
  .card-hand .ki-tag { font-size: 8.5px; padding: 0 3px; }
  .card-hand .mini-stats { font-size: 10px; }
  .card-hand .mini-stats .st i { display: none; }
  .tok { width: 15px; height: 15px; font-size: 9px; }
  .fx-banner { font-size: 22px; }
  .splash-big { font-size: 28px; }
  .uart .attr-badge { font-size: 8px; padding: 0 3px; right: 1px; top: 1px; }
}

/* レアリティ（効果はない） */
.card .art .rarity { position: absolute; left: 3px; bottom: 3px; z-index: 1; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 0 6px; border-radius: 4px; line-height: 1.5; color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .9); }
.rarity.r-N { background: #7a8699; }
.rarity.r-R { background: linear-gradient(135deg, #3b82c4, #5fb0e8); }
.rarity.r-SR { background: linear-gradient(135deg, #c48a12, #f2c94c, #c48a12); color: #3b2a00; }
.dk-cell .card .art .rarity { font-size: 12px; }
@media (max-width: 700px) { .card-hand .art .rarity { font-size: 8px; padding: 0 3px; } }

.unit .tag-frz { position: absolute; left: 6px; bottom: 34px; z-index: 3; padding: 1px 6px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fff; background: #5b4bb7; box-shadow: 0 1px 3px rgba(0,0,0,.35); }

/* チュートリアル: 押すところ。濃い縁＋黄色の光で、明るい所でも暗い所でも目立たせる */
.coach-hit { position: relative; z-index: 6; outline: 4px solid #ff7a1a !important; outline-offset: 3px; box-shadow: 0 0 0 7px rgba(255, 210, 63, .85), 0 0 22px 8px rgba(255, 150, 40, .7) !important; animation: coachPulse 1.1s ease-in-out infinite; }
@keyframes coachPulse { 0%, 100% { outline-color: #ff7a1a; } 50% { outline-color: #ffd23f; } }
.coach.bottom { top: auto; bottom: 8px; }
.coach.squeeze { padding: 6px 10px; }
.coach.squeeze .coach-text, .coach.squeeze .coach-lesson { display: none; }
.coach.squeeze .coach-face { width: 30px; height: 30px; }
.coach-arrow { position: fixed; z-index: 80; pointer-events: none; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; animation: coachBounce .8s ease-in-out infinite; transition: left .15s, top .15s; }
.coach-arrow span { background: #ff6a2b; color: #fff; font-weight: 900; font-size: 14px; padding: 3px 10px; border-radius: 99px; border: 2px solid #fff; box-shadow: 0 3px 10px rgba(0, 0, 0, .35); white-space: nowrap; }
.coach-arrow::after { content: ""; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 12px solid #ff6a2b; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.coach-arrow.up { transform: translate(-50%, 0); flex-direction: column-reverse; }
.coach-arrow.up::after { border-top: 0; border-bottom: 12px solid #ff6a2b; }
@keyframes coachBounce { 0%, 100% { margin-top: 0; } 50% { margin-top: -8px; } }
@media (prefers-reduced-motion: reduce) { .coach-hit, .coach-arrow { animation: none; } }
