:root{color-scheme:light;--paper:#fff;--face:#fbf9f3;--fg:#1f2328;--muted:#6b6f76;--line:#d9dce1;--link:#2a62b8;--up:#138a4c;--down:#c8342b;--mat:#fff;--mat-edge:#1f2328;--mat-line:#dfe2e7;--mat-fg:#1f2328;--mat-muted:#6b6f76;--don-hi:#1f2328;--target:#f08a3c;--back-art:repeating-linear-gradient(45deg, #ffffff1a 0 2px, transparent 2px 5px), #283750;--don-art:url(/tsume/don.png) center / 100% 100% no-repeat, #fff}*{box-sizing:border-box}html{-webkit-text-size-adjust:100%}body{background:var(--paper);color:var(--fg);overscroll-behavior:none;flex-direction:column;min-height:100dvh;margin:0;font-family:system-ui,-apple-system,Segoe UI,Hiragino Sans,Noto Sans JP,sans-serif;font-size:14px;line-height:1.4;display:flex}button{font:inherit;color:inherit}.loading{color:var(--muted);padding:16px}.none{color:var(--muted);font-size:12px}#tsume{width:100%;max-width:480px;padding:0 8px env(safe-area-inset-bottom);-webkit-user-select:none;user-select:none;flex-direction:column;flex:1;gap:6px;margin:0 auto;display:flex}.feed,.sheet-empty{display:none}.side{display:contents}.bar{align-items:center;gap:8px;padding:4px 0 0;line-height:1.2;display:flex}.bar .back{color:var(--fg);padding:0 4px;font-size:18px;text-decoration:none}.bar .ttl{font-size:14px}.mat{background:var(--mat);border:2px solid var(--mat-edge);color:var(--mat-fg);border-radius:6px;flex-direction:column;gap:4px;padding:6px 6px 4px;display:flex}.half{flex-direction:column;gap:4px;display:flex}.lead,.chars{grid-template-columns:repeat(5,minmax(0,1fr));align-items:center;gap:5px;padding-bottom:9px;display:grid}.chars{width:90%;margin:0 auto}.lead>.life{grid-column:1/3}.lead>.tile{grid-column:3}.lead>.donpool{grid-column:4/6}.slot{aspect-ratio:63/88;border:1px solid var(--mat-line);border-radius:5px}.mat .none{color:var(--mat-muted);font-size:11px}.tile{aspect-ratio:63/88;cursor:pointer;text-align:left;background:0 0;border:none;width:100%;padding:0;position:relative;container-type:inline-size}.tile .face{position:absolute;inset:0;container-type:inline-size}.tile .card{border:1px solid var(--fg);background:var(--face);color:var(--fg);border-radius:5px;transition:box-shadow .15s,opacity .15s;position:absolute;inset:0;overflow:hidden;box-shadow:0 1px 2px #0000002e}.tile.leader .card{border-width:2px}.tile .cost{background:var(--c1);color:#fff;border-radius:50%;place-items:center;width:25cqw;height:25cqw;font-size:16cqw;font-weight:800;line-height:1;display:grid;position:absolute;top:3cqw;left:3cqw}.tile .ctr{writing-mode:vertical-rl;color:var(--muted);letter-spacing:-.02em;font-size:11cqw;font-weight:700;position:absolute;top:33cqw;left:3cqw}.tile .words{flex-direction:column;align-items:center;gap:1px;display:flex;position:absolute;top:30%;left:0;right:0}.tile .words i{white-space:nowrap;font-size:clamp(8px,13cqw,12px);font-style:normal;font-weight:700;line-height:1.15}.tile .words .blocker{color:#2d63a8}.tile .words .rush,.tile .words .doubleAttack,.tile .words .banish{color:#8a3b12}.tile .words .fx{color:var(--muted);font-weight:600}.tile .words .kind{color:var(--muted)}.tile .pw{align-items:baseline;gap:2cqw;line-height:1;display:flex;position:absolute;bottom:30cqw;left:5cqw}.tile .pw b{letter-spacing:-.04em;font-variant-numeric:tabular-nums;font-size:25cqw;font-weight:800}.tile .pw b.up{color:var(--up)}.tile .pw b.down{color:var(--down)}.tile .pw small{color:var(--muted);font-size:10cqw}.tile .nm{text-align:center;height:27cqw;line-height:27cqw;font-size:clamp(9px, min(18cqw, calc(90cqw / var(--len,4))), 16px);white-space:nowrap;text-overflow:ellipsis;background:linear-gradient(90deg, var(--c1) 50%, var(--c2) 50%);color:#fff;padding:0 3cqw;font-weight:700;display:block;position:absolute;bottom:0;left:0;right:0;overflow:hidden}.tile.rested .face{aspect-ratio:63/88;width:71.5909%;inset:50% auto auto 50%;transform:translate(-50%,-50%)rotate(90deg)}.tile.rested .card{opacity:.78;filter:saturate(.6)}.tile.rested .words{display:none}.tile.target .card{opacity:1;filter:none;box-shadow:0 0 0 2px var(--target), 0 0 12px 2px #f08a3cbf;animation:1s infinite alternate pulse}.tile.attacking .card,.tile.in-battle .card{box-shadow:0 0 0 2px #7fb2ff,0 0 10px 1px #7fb2ff99}.tile.defending .card{box-shadow:0 0 0 2px #ff6b5e,0 0 10px 1px #ff6b5e99}@keyframes pulse{to{box-shadow:0 0 0 2px var(--target), 0 0 4px 0 #f08a3c4d}}.tile .dons{height:22%;position:absolute;bottom:-10%;left:6%;right:6%}.tile .dons .donc{top:0;bottom:0;left:calc(var(--i) * 14cqw);border-radius:3px;width:34cqw;position:absolute}.tile .dons b{color:#fff;background:var(--fg);border-radius:3px;padding:1px 3px;font-size:clamp(9px,13cqw,12px);font-weight:800;line-height:1;position:absolute;bottom:-2px;right:-2px}.donc{background:var(--don-art);border-radius:2px;display:block}.cback{aspect-ratio:63/88;background:var(--back-art);cursor:pointer;border:1.5px solid #000;border-radius:3px;place-items:center;padding:0;display:grid;position:relative;box-shadow:inset 0 0 0 2px #283750,inset 0 0 0 3px #ffffff4d}.cback i{color:#fff;font-variant-numeric:tabular-nums;background:#00000080;border-radius:2px;padding:1px 2px;font-size:10px;font-style:normal;font-weight:800;line-height:1.1}.life{color:var(--mat-fg);cursor:pointer;background:0 0;border:1px solid #0000;border-radius:6px;align-items:center;gap:8px;padding:2px 4px;display:flex}.life:hover{border-color:var(--mat-line)}.life .stack{flex-direction:column;flex:none;width:60px;display:flex}.life .stack .slot{aspect-ratio:88/63}.life .cback{aspect-ratio:88/63;width:100%;cursor:inherit;place-items:start center;padding-top:2px}.life .cback+.cback{margin-top:-45%}.count{flex-direction:column;align-items:center;line-height:1.05;display:flex}.count b{font-variant-numeric:tabular-nums;font-size:22px;font-weight:800}.count small{color:var(--mat-muted);font-size:10px}.donpool{color:var(--mat-fg);background:0 0;border:1px solid #0000;border-radius:6px;justify-content:flex-end;align-items:center;gap:7px;padding:4px;display:flex}.donpool .stack{display:flex}.donpool .stack .donc{aspect-ratio:63/88;flex:none;width:26px}.donpool .stack .donc+.donc{margin-left:min(-17px, calc(36px / (var(--n) - 1) - 26px))}.donpool .stack .slot{width:26px}.donpool .count b{color:var(--don-hi)}.rested-don{flex-direction:column;align-items:center;gap:2px;display:flex}.rested-don .donc{aspect-ratio:63/88;opacity:.6;width:22px;margin:-3px 0;transform:rotate(90deg)}.rested-don small{color:var(--mat-muted);font-size:10px}button.donpool{cursor:pointer}button.donpool.can{background:#fffaf0;border-color:#c9a24a}button.donpool.on{border:2px solid var(--target);box-shadow:0 0 10px 1px #f08a3c99}.hand{align-items:center;gap:4px;display:flex;overflow-x:auto}.hand.opp{min-height:46px;padding:0 2px}.hand.opp .lbl{color:var(--mat-muted);flex:none;margin-right:2px;font-size:11px}.hand.opp .cback{flex:none;width:32px}.hand.opp .cback small{text-align:center;color:#fff;font-size:8px;position:absolute;bottom:1px;left:-2px;right:-2px}.hand.me{gap:6px;min-height:22px;padding:2px 2px 4px}.hand.me .tile{flex:none;width:62px}.tile.fromlife .card{outline:2px dashed var(--muted);outline-offset:1px}.tile .from{white-space:nowrap;color:#fff;background:var(--fg);border-radius:2px;padding:0 3px;font-size:8px;position:absolute;top:-1px;left:50%;transform:translate(-50%)}.half.me{border-top:1px solid var(--mat-line);margin:0 -6px;padding:4px 6px 0}.logline{text-align:center;color:var(--muted);flex-direction:column;align-items:center;gap:1px;padding:2px 0;font-size:12px;display:flex}.logline .opp{color:#8f2a22}.logline .res{color:var(--fg);font-weight:600}.logline .battle{color:var(--fg)}.logline .battle b{font-size:14px}.logline .wait{color:#5b3fa8;font-weight:600}.logline .win{color:var(--up);font-size:16px}.logline .fail{color:var(--down);font-size:14px}.popup-scrim{z-index:20;position:fixed;inset:0}.popup{z-index:21;border:2px solid var(--up);background:#fff;border-radius:10px;flex-direction:column;align-items:center;gap:10px;padding:14px 20px 12px;animation:.2s ease-out pop;display:flex;position:fixed;top:42%;left:50%;transform:translate(-50%,-50%);box-shadow:0 6px 20px #0000002e}.popup b{color:var(--up);font-size:18px}.popup button{cursor:pointer;background:#fff;border:1px solid #c3c8d0;border-radius:6px;min-height:32px;padding:4px 16px;font-size:13px}@keyframes pop{0%{opacity:0;transform:translate(-50%,-50%)scale(.7)}}.sheet .stepper{justify-content:center;align-items:center;gap:20px;margin:6px 0 4px;display:flex}.sheet .stepper button{cursor:pointer;background:#fffaf0;border:1px solid #c9a24a;border-radius:6px;width:52px;height:48px;font-size:18px}.sheet .stepper b{text-align:center;font-variant-numeric:tabular-nums;min-width:3.5em;font-size:28px}.sheet .stepper b small{color:var(--muted);font-size:13px;font-weight:400}.actions{flex-wrap:wrap;justify-content:center;gap:6px;margin-top:auto;padding-bottom:8px;display:flex}.actions button,.sheet .cmds button{background:var(--face);cursor:pointer;border:1px solid #c3c8d0;border-radius:6px;min-height:40px;padding:8px 12px}.actions button:disabled,.sheet button:disabled{opacity:.45;cursor:default}.sheet .cmds button.primary{background:var(--fg);color:#fff;border-color:var(--fg)}.scrim{z-index:10;background:#14181f59;position:fixed;inset:0}.sheet{background:var(--face);z-index:11;width:100%;max-width:480px;max-height:72dvh;padding:14px 16px calc(14px + env(safe-area-inset-bottom));border-radius:12px 12px 0 0;position:fixed;bottom:0;left:50%;overflow-y:auto;transform:translate(-50%);box-shadow:0 -6px 24px #0000002e}.sheet .close{color:var(--muted);cursor:pointer;background:0 0;border:none;padding:4px 8px;font-size:22px;position:absolute;top:6px;right:8px}.sheet .head{flex-direction:column;gap:2px;margin-bottom:8px;padding-right:32px;display:flex}.sheet .head b{font-size:17px}.sheet .head small{color:var(--muted)}.sheet .who{color:var(--link);font-size:12px;font-weight:700}.sheet .who.opp{color:var(--down)}.sheet .kv{border-bottom:1px solid var(--line);gap:10px;padding:3px 0;display:flex}.sheet .kv span{width:6em;color:var(--muted);flex:none}.sheet .kv .up{color:var(--up)}.sheet .kv .down{color:var(--down)}.sheet .text{-webkit-user-select:text;user-select:text;background:#f5f6f8;border-radius:6px;margin:10px 0;padding:10px;font-size:13px;line-height:1.55}.sheet .cmds{flex-wrap:wrap;gap:8px;margin-top:8px;display:flex}.sheet .cmds button{flex:40%}.sheet .opts{flex-direction:column;gap:6px;display:flex}.sheet .opt{text-align:left;background:var(--face);cursor:pointer;border:1px solid #c3c8d0;border-radius:6px;padding:10px 12px}.sheet .opt.on{border-color:var(--fg);box-shadow:inset 0 0 0 1px var(--fg);background:#eef0f3}.sheet .list{margin:0;padding-left:1.4em;font-size:13px}.sheet .list li{padding:3px 0}.muted{color:var(--muted)}.notice{text-align:center;color:var(--muted);margin:0;padding:4px 0 8px;font-size:11px}@media (width>=760px){#tsume{grid-template:"bar bar""mat side""hand side""logline side"1fr"notice side"/minmax(0,540px) 300px;place-content:start center;gap:8px 20px;max-width:none;padding:0 16px 16px;display:grid}.bar{grid-area:bar;padding-top:10px}.mat{grid-area:mat;gap:6px;padding:10px 10px 6px}.half.me{margin:0 -10px;padding:6px 10px 0}.hand.me{grid-area:hand}.hand.me .tile{width:76px}.logline{grid-area:logline;align-self:start}.notice{grid-area:notice}.side{flex-direction:column;grid-area:side;align-self:start;gap:10px;display:flex;position:sticky;top:12px}.actions{justify-content:flex-start;margin-top:0;padding:0}.actions button{flex:auto}.scrim{display:none}.sheet{z-index:auto;border:1px solid var(--line);width:auto;max-width:none;max-height:calc(100dvh - 120px);box-shadow:none;border-radius:6px;padding:14px 16px;position:relative;bottom:auto;left:auto;transform:none}.sheet-empty{border:1px dashed var(--line);color:var(--muted);border-radius:6px;padding:14px 16px;font-size:13px;display:block}.life .stack{width:68px}.donpool .stack .donc,.donpool .stack .slot{width:32px}.donpool .stack .donc+.donc{margin-left:min(-21px, calc(44px / (var(--n) - 1) - 32px))}.hand.opp .cback{width:36px}}@media (width>=1140px){#tsume{grid-template-columns:240px minmax(0,540px) 300px;grid-template-areas:"bar bar bar""feed mat side""feed hand side""feed logline side""feed notice side"}.feed{max-height:calc(100dvh - 80px);color:var(--fg);border-right:1px solid var(--line);grid-area:feed;align-self:start;padding-right:12px;font-size:12px;display:block;position:sticky;top:12px;overflow-y:auto}.feed h2{color:var(--muted);margin:4px 0 6px;font-size:12px;font-weight:600}.feed ol{margin:0;padding-left:1.6em}.feed li{padding:2px 0}.feed li.opp{color:#8f2a22}.feed li.res{font-weight:600}.feed .none{margin:0}}
