/* 試作（prototype/src.html）の CSS を移したもの（2026年10月24日） */
/* Layout: single-column phone app (max 440px), white panels on a white base, fixed bottom tab bar.
   One committed white look. The gacha effect, the hero visual and the share cards stay dark ("night sky" islands). */
:root {
  color-scheme: light;
  --sky: #f7f6fb;
  --glass: #ffffff;
  --glass-2: #f1f0f7;
  --stroke: rgba(27, 23, 51, .12);
  --ink: #1b1733;
  --ink-2: #5d5878;
  --ink-3: #8c88a6;
  --accent: #c26a00;
  --gold-1: #ffe29a;
  --gold-2: #ffa94d;
  --gold-ink: #2b1700;
  --danger: #e5484d;
  --ok: #0f9d6b;
  --fav: #ff4f7b;
  --r: #8fb3ff; --sr: #ff4f5e; --ssr: #ffc94d; --ur: #ff4d5e;
  --gold: linear-gradient(135deg, #fff6cf, #ffd15c 30%, #d9901f 55%, #fff1b8 75%, #e7a632);
  --holo: linear-gradient(115deg, #ff4d5e, #ffb648, #fff36b, #6effb4, #5ec8ff, #b76bff, #ff4d5e);
  /* LR = gothic: glossy black lacquer, gold that glints, silver (白銀) as the accent; SSR stays a plain bright gold */
  --lacquer: #070606;
  --lacquer-gloss: linear-gradient(155deg, #3d3833 0%, #0b0a09 18%, #000 44%, #2c2824 58%, #080707 72%, #000 100%);
  --silver: #dde3ea;
  --lr: linear-gradient(135deg, #0a0908 0%, #6b5216 10%, #f0cf72 18%, #fff4cc 23%, #b8902e 30%, #0a0908 40%, #c9d1db 47%, #ffffff 50%, #8d96a3 54%, #0a0908 62%, #d9b45a 74%, #fff0b8 78%, #a88326 85%, #0a0908 100%);
  --lr-text: linear-gradient(180deg, #fffbe6 8%, #f2cf74 40%, #b8862b 62%, #fff0b8 82%, #c9922e);
  --leaf: linear-gradient(115deg, #a87a22, #f6dc8c 22%, #c9952f 38%, #fff3c4 52%, #b8862b 68%, #f0cf72 84%, #9c6f1c);
  --corner-tl: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2048%2048%27%3E%3Cdefs%3E%3ClinearGradient%20id%3D%27g%27%20x1%3D%270%27%20y1%3D%270%27%20x2%3D%271%27%20y2%3D%271%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff4c8%27%2F%3E%3Cstop%20offset%3D%27.45%27%20stop-color%3D%27%23e2b64e%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%239c741e%27%2F%3E%3C%2FlinearGradient%3E%3CradialGradient%20id%3D%27s%27%20cx%3D%27.35%27%20cy%3D%27.35%27%20r%3D%27.7%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff%27%2F%3E%3Cstop%20offset%3D%27.6%27%20stop-color%3D%27%23cfd6df%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%237d8794%27%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Cg%20transform%3D%27%27%3E%3Cpath%20d%3D%27M4%2046V16C4%209%209%204%2016%204H46%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%273%27%2F%3E%3Cpath%20d%3D%27M10%2046V20C10%2014%2014%2010%2020%2010H46%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.2%27%2F%3E%3Cpath%20d%3D%27M4%2032c7%200%2010-6%206-10%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M32%204c0%207-6%2010-10%206%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M16%2016l9%203-6%206z%27%20fill%3D%27url(%23g)%27%2F%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%274.4%27%20fill%3D%27url(%23s)%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.4%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --corner-tr: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2048%2048%27%3E%3Cdefs%3E%3ClinearGradient%20id%3D%27g%27%20x1%3D%270%27%20y1%3D%270%27%20x2%3D%271%27%20y2%3D%271%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff4c8%27%2F%3E%3Cstop%20offset%3D%27.45%27%20stop-color%3D%27%23e2b64e%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%239c741e%27%2F%3E%3C%2FlinearGradient%3E%3CradialGradient%20id%3D%27s%27%20cx%3D%27.35%27%20cy%3D%27.35%27%20r%3D%27.7%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff%27%2F%3E%3Cstop%20offset%3D%27.6%27%20stop-color%3D%27%23cfd6df%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%237d8794%27%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Cg%20transform%3D%27translate(48%200)%20scale(-1%201)%27%3E%3Cpath%20d%3D%27M4%2046V16C4%209%209%204%2016%204H46%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%273%27%2F%3E%3Cpath%20d%3D%27M10%2046V20C10%2014%2014%2010%2020%2010H46%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.2%27%2F%3E%3Cpath%20d%3D%27M4%2032c7%200%2010-6%206-10%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M32%204c0%207-6%2010-10%206%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M16%2016l9%203-6%206z%27%20fill%3D%27url(%23g)%27%2F%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%274.4%27%20fill%3D%27url(%23s)%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.4%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --corner-bl: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2048%2048%27%3E%3Cdefs%3E%3ClinearGradient%20id%3D%27g%27%20x1%3D%270%27%20y1%3D%270%27%20x2%3D%271%27%20y2%3D%271%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff4c8%27%2F%3E%3Cstop%20offset%3D%27.45%27%20stop-color%3D%27%23e2b64e%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%239c741e%27%2F%3E%3C%2FlinearGradient%3E%3CradialGradient%20id%3D%27s%27%20cx%3D%27.35%27%20cy%3D%27.35%27%20r%3D%27.7%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff%27%2F%3E%3Cstop%20offset%3D%27.6%27%20stop-color%3D%27%23cfd6df%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%237d8794%27%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Cg%20transform%3D%27translate(0%2048)%20scale(1%20-1)%27%3E%3Cpath%20d%3D%27M4%2046V16C4%209%209%204%2016%204H46%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%273%27%2F%3E%3Cpath%20d%3D%27M10%2046V20C10%2014%2014%2010%2020%2010H46%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.2%27%2F%3E%3Cpath%20d%3D%27M4%2032c7%200%2010-6%206-10%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M32%204c0%207-6%2010-10%206%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M16%2016l9%203-6%206z%27%20fill%3D%27url(%23g)%27%2F%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%274.4%27%20fill%3D%27url(%23s)%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.4%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --corner-br: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2048%2048%27%3E%3Cdefs%3E%3ClinearGradient%20id%3D%27g%27%20x1%3D%270%27%20y1%3D%270%27%20x2%3D%271%27%20y2%3D%271%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff4c8%27%2F%3E%3Cstop%20offset%3D%27.45%27%20stop-color%3D%27%23e2b64e%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%239c741e%27%2F%3E%3C%2FlinearGradient%3E%3CradialGradient%20id%3D%27s%27%20cx%3D%27.35%27%20cy%3D%27.35%27%20r%3D%27.7%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff%27%2F%3E%3Cstop%20offset%3D%27.6%27%20stop-color%3D%27%23cfd6df%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%237d8794%27%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Cg%20transform%3D%27translate(48%2048)%20scale(-1%20-1)%27%3E%3Cpath%20d%3D%27M4%2046V16C4%209%209%204%2016%204H46%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%273%27%2F%3E%3Cpath%20d%3D%27M10%2046V20C10%2014%2014%2010%2020%2010H46%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.2%27%2F%3E%3Cpath%20d%3D%27M4%2032c7%200%2010-6%206-10%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M32%204c0%207-6%2010-10%206%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M16%2016l9%203-6%206z%27%20fill%3D%27url(%23g)%27%2F%3E%3Ccircle%20cx%3D%2712%27%20cy%3D%2712%27%20r%3D%274.4%27%20fill%3D%27url(%23s)%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.4%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --fleuron-t: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2060%2024%27%3E%3Cdefs%3E%3ClinearGradient%20id%3D%27g%27%20x1%3D%270%27%20y1%3D%270%27%20x2%3D%271%27%20y2%3D%271%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff4c8%27%2F%3E%3Cstop%20offset%3D%27.45%27%20stop-color%3D%27%23e2b64e%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%239c741e%27%2F%3E%3C%2FlinearGradient%3E%3CradialGradient%20id%3D%27s%27%20cx%3D%27.35%27%20cy%3D%27.35%27%20r%3D%27.7%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff%27%2F%3E%3Cstop%20offset%3D%27.6%27%20stop-color%3D%27%23cfd6df%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%237d8794%27%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Cg%20transform%3D%27%27%3E%3Cpath%20d%3D%27M2%2012C14%2012%2017%205%2025%207%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M58%2012C46%2012%2043%205%2035%207%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M8%2012h44%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271%27%2F%3E%3Cpath%20d%3D%27M30%201l7%2011-7%2011-7-11z%27%20fill%3D%27url(%23g)%27%2F%3E%3Ccircle%20cx%3D%2730%27%20cy%3D%2712%27%20r%3D%273.4%27%20fill%3D%27url(%23s)%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --fleuron-b: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2060%2024%27%3E%3Cdefs%3E%3ClinearGradient%20id%3D%27g%27%20x1%3D%270%27%20y1%3D%270%27%20x2%3D%271%27%20y2%3D%271%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff4c8%27%2F%3E%3Cstop%20offset%3D%27.45%27%20stop-color%3D%27%23e2b64e%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%239c741e%27%2F%3E%3C%2FlinearGradient%3E%3CradialGradient%20id%3D%27s%27%20cx%3D%27.35%27%20cy%3D%27.35%27%20r%3D%27.7%27%3E%3Cstop%20offset%3D%270%27%20stop-color%3D%27%23fff%27%2F%3E%3Cstop%20offset%3D%27.6%27%20stop-color%3D%27%23cfd6df%27%2F%3E%3Cstop%20offset%3D%271%27%20stop-color%3D%27%237d8794%27%2F%3E%3C%2FradialGradient%3E%3C%2Fdefs%3E%3Cg%20transform%3D%27translate(0%2024)%20scale(1%20-1)%27%3E%3Cpath%20d%3D%27M2%2012C14%2012%2017%205%2025%207%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M58%2012C46%2012%2043%205%2035%207%27%20fill%3D%27none%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271.8%27%20stroke-linecap%3D%27round%27%2F%3E%3Cpath%20d%3D%27M8%2012h44%27%20stroke%3D%27url(%23g)%27%20stroke-width%3D%271%27%2F%3E%3Cpath%20d%3D%27M30%201l7%2011-7%2011-7-11z%27%20fill%3D%27url(%23g)%27%2F%3E%3Ccircle%20cx%3D%2730%27%20cy%3D%2712%27%20r%3D%273.4%27%20fill%3D%27url(%23s)%27%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E");
  --jp: "M PLUS 1", "Hiragino Sans", "Yu Gothic UI", "Meiryo", sans-serif;
  --latin: "Unbounded", "M PLUS 1", system-ui, sans-serif;
  --radius: 18px;
}
html, body { background: var(--sky); color: var(--ink); overflow-x: clip; }
/* no double-tap zoom when buttons are tapped quickly (pinch zoom still works) */
html, body, button, a, input, select, summary, [role="button"] { touch-action: manipulation; }
/* iOS zooms into form fields under 16px on focus and the page then slides sideways */
@media (pointer: coarse) { input, select, textarea { font-size: 16px !important; } }
body {
  font-family: var(--jp); font-size: 15px; line-height: 1.6; font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
/* dark islands keep the original night-sky tokens */
.fx, .portal, .rc, .pc { --ink: #f5f3ff; --ink-2: #b9b5dc; --ink-3: #8682ad; --glass: rgba(255,255,255,.06); --glass-2: rgba(255,255,255,.11); --stroke: rgba(255,255,255,.12); --accent: #ffe29a; color: var(--ink); color-scheme: dark; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
button, select, input { font: inherit; color: inherit; }
select { background-color: #fff; color: var(--ink); }
select option, select optgroup { background-color: #fff; color: var(--ink); }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--sky); }

.app { max-width: 440px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 8px calc(96px + env(safe-area-inset-bottom, 0px)); }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-block: 10px; margin-inline: calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding-inline: max(16px, env(safe-area-inset-left, 0px)); background: transparent; transition: background-color .2s, backdrop-filter .2s; }
.top.scrolled { background-color: rgba(255,255,255,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--stroke); }
.logo { font-weight: 900; font-size: 22px; letter-spacing: -.01em; display: flex; align-items: baseline; }
.logo b { font-family: var(--latin); font-weight: 900; font-size: 20px; margin-left: 1px; background: linear-gradient(180deg, #ffb340, #e2700c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top-right { display: flex; gap: 6px; align-items: center; }
.pill { background: var(--glass); border: 1px solid var(--stroke); border-radius: 999px; padding: 4px 12px; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.icon-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--glass); border: 1px solid var(--stroke); display: grid; place-items: center; padding: 0; }
.icon-btn svg { width: 18px; height: 18px; }
.adline { font-size: 11px; color: var(--ink-3); margin: -2px 0 8px; }
.disclaimer { font-size: 11px; line-height: 1.6; color: var(--ink-2); background: var(--glass); border: 1px solid var(--stroke); border-radius: 12px; padding: 8px 12px; margin: 0 0 12px; display: grid; gap: 4px; }
.disclaimer b { color: var(--ink); }
.lead { margin: 2px 0 12px; }
.lead p { margin: 0; font-weight: 800; font-size: 15px; color: var(--ink-2); }
.lead .lead-2 { font-weight: 900; font-size: 22px; color: var(--ink); margin-top: 2px; letter-spacing: .02em; }
/* short phones (iPhone SE etc.): tighten the top so the hero card fits in the first view */
@media (max-width: 767px) and (max-height: 600px) {
  .adline { font-size: 10px; }
  .disclaimer { font-size: 10.5px; line-height: 1.5; padding: 6px 10px; gap: 2px; margin-bottom: 8px; }
  .lead { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; margin-bottom: 8px; }
  .lead p { font-size: 13px; }
  .lead .lead-2 { font-size: 17px; margin-top: 0; }
  #s-gacha > .portal { aspect-ratio: 1 / .6; }
}
.autofill-list { display: grid; gap: 6px; }
.af-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 6px; border-radius: 12px; background: var(--glass); border: 1px solid var(--stroke); }
.af-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.af-row .n { font-size: 12px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; }
.af-row .p { font-family: var(--latin); font-size: 12px; font-weight: 700; white-space: nowrap; }

/* prototype controls */
.dev { margin: 12px 0; border: 1px dashed var(--stroke); border-radius: 12px; font-size: 12px; color: var(--ink-2); }
.dev summary { padding: 8px 12px; cursor: pointer; }
.dev-body { padding: 0 12px 12px; display: grid; gap: 8px; }
.dev-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dev button { background: transparent; border: 1px solid var(--stroke); border-radius: 999px; padding: 3px 10px; font-size: 12px; color: var(--ink-2); }
.dev button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }

.h2 { font-weight: 900; font-size: 22px; letter-spacing: -.01em; margin: 6px 0 12px; text-wrap: balance; display: flex; align-items: baseline; gap: 8px; }
.sub { color: var(--ink-2); font-size: 13px; margin: -6px 0 14px; }
.glass { background: var(--glass); border: 1px solid var(--stroke); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(27,23,51,.04), 0 6px 18px -8px rgba(27,23,51,.12); }
.hint { font-size: 11px; color: var(--ink-3); margin: 0; }
.count { font-family: var(--latin); font-size: 13px; color: var(--ink-2); font-weight: 700; }

/* gacha home */
.portal { position: relative; aspect-ratio: 1 / .78; border-radius: 24px; overflow: hidden; margin-bottom: 16px; isolation: isolate; }
.portal canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.portal-copy { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; }
.portal-copy h1 { font-weight: 900; font-size: 27px; line-height: 1.3; margin: 0 0 4px; text-wrap: balance; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.portal-copy p { margin: 0; font-size: 13px; color: var(--ink-2); }
.free { position: absolute; top: 14px; left: 14px; z-index: 1; font-size: 11px; font-weight: 800; letter-spacing: .08em; background: rgba(0,0,0,.35); border: 1px solid var(--stroke); border-radius: 999px; padding: 3px 10px; }

.panel { padding: 14px; display: grid; gap: 10px; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 800; gap: 8px; }
.panel-head small { font-weight: 500; color: var(--ink-3); font-size: 11px; }
.chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.chips button, .fchips button { border-radius: 12px; border: 1px solid var(--stroke); background: var(--glass); padding: 10px 0; font-family: var(--latin); font-weight: 700; font-size: 14px; }
.chips button small { font-family: var(--jp); font-size: 11px; font-weight: 700; margin-left: 1px; }
.chips button[aria-pressed="true"], .fchips button[aria-pressed="true"] { background: linear-gradient(180deg, #fff3d1, #ffe2b0); border-color: var(--gold-2); color: var(--accent); }
.custom { display: flex; align-items: center; gap: 8px; }
.bval { font-family: var(--latin); font-weight: 900; font-size: 30px; line-height: 1.1; text-align: center; font-variant-numeric: tabular-nums; }
.bval small { font-family: var(--jp); font-size: 15px; margin-left: 2px; }
.bslider { display: grid; grid-template-columns: 36px 1fr 36px; gap: 10px; align-items: center; }
.bstep { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--stroke); background: #fff; font-weight: 900; font-size: 18px; padding: 0; line-height: 1; }
.bslider input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 10px; border-radius: 99px; background: linear-gradient(90deg, var(--gold-2) var(--pct, 10%), rgba(27,23,51,.1) var(--pct, 10%)); margin: 0; }
.bslider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: #fff; border: 3px solid var(--gold-2); box-shadow: 0 2px 8px rgba(194,106,0,.35); }
.bslider input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: #fff; border: 3px solid var(--gold-2); box-shadow: 0 2px 8px rgba(194,106,0,.35); }
.bscale { display: flex; justify-content: space-between; font-size: 10px; color: var(--ink-3); font-weight: 700; padding: 0 46px; margin-top: -4px; }
.custom input { flex: 1; min-width: 0; border-radius: 12px; border: 1px solid var(--stroke); background: #fff; padding: 9px 12px; font-family: var(--latin); font-size: 15px; }
.custom span { font-size: 13px; color: var(--ink-2); }
.sim-link { justify-self: start; background: none; border: 0; padding: 0; color: var(--accent); font-size: 13px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.opts { margin-top: 10px; }
.opts > summary { list-style: none; cursor: pointer; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 800; }
.opts > summary::-webkit-details-marker { display: none; }
.opts > summary .state { font-size: 11px; color: var(--ink-2); font-weight: 700; }
.opts > summary::after { content: "＋"; color: var(--ink-2); margin-left: 8px; }
.opts[open] > summary::after { content: "−"; }
.opts-body { padding: 0 14px 14px; display: grid; gap: 14px; }
.field { display: grid; gap: 6px; align-content: start; }
.field > label, .field > span { font-size: 12px; font-weight: 800; color: var(--ink-2); display: flex; justify-content: space-between; }
.field select, .field input[type="number"], .field input[type="text"] { border-radius: 10px; border: 1px solid var(--stroke); background-color: #fff; padding: 9px 10px; font-size: 14px; font-weight: 700; width: 100%; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchips button { font-family: var(--jp); font-size: 12px; padding: 6px 11px; border-radius: 999px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--ink-2); font-size: 11px; text-decoration: underline; font-weight: 700; }

.pull { position: relative; margin-top: 16px; width: 100%; border: 0; border-radius: 18px; padding: 18px 0 15px; background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); color: var(--gold-ink); font-weight: 900; font-size: 21px; letter-spacing: .02em; box-shadow: 0 10px 30px -8px rgba(255,169,77,.6), inset 0 1px 0 rgba(255,255,255,.6); overflow: hidden; }
.pull small { display: block; font-size: 12px; font-weight: 700; opacity: .8; margin-top: 1px; }
.pull::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.55) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.2s ease-in-out infinite; }
@keyframes shine { 60%, 100% { transform: translateX(120%); } }
.pull:active { transform: scale(.985); }
/* a slim gacha bar above the tab bar, shown only while the real buttons are out of view */
.pull-mini { position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 6; padding: 0 calc(max(16px, env(safe-area-inset-left, 0px)) + 8px) 8px calc(max(16px, env(safe-area-inset-right, 0px)) + 8px); pointer-events: none; opacity: 0; transform: translateY(12px); transition: opacity .2s, transform .2s; }
.pull-mini.on { opacity: 1; transform: none; }
.pull-mini .pull { display: block; max-width: 408px; margin: 0 auto; padding: 9px 0 7px; font-size: 17px; border-radius: 16px; }
.pull-mini.on .pull { pointer-events: auto; }
.pull-mini .pull small { font-size: 11px; }
/* 秘宝ガチャ: the high-price gacha under the main button */
.pull-more { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; margin-top: 10px; }
.pull-x { border-radius: 16px; padding: 11px 8px 10px; font-weight: 900; font-size: 16px; line-height: 1.3; display: grid; gap: 2px; }
.pull-x small { font-size: 10px; font-weight: 700; opacity: .85; }
.pull-x.vault { position: relative; overflow: hidden; border: 1px solid #c9922e; background: linear-gradient(160deg, #241008, var(--lacquer) 60%); color: #ffd76a; box-shadow: 0 8px 22px -10px rgba(120,80,10,.7); }
.pull-x.vault span { background: var(--lr-text); -webkit-background-clip: text; background-clip: text; color: transparent; font-family: "Shippori Mincho B1", var(--jp); letter-spacing: .08em; }
.pull-x.vault::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,230,160,.35) 50%, transparent 70%); transform: translateX(-120%); animation: shine 3.6s ease-in-out infinite; }
.pull-x:active { transform: scale(.985); }
.pull-x[disabled] { opacity: .45; cursor: not-allowed; filter: grayscale(.4); }
.pull-x[disabled]::after { animation: none; }
.tally { display: flex; flex-wrap: wrap; gap: 4px 10px; font-family: var(--latin); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tally > span { display: inline-flex; align-items: center; gap: 3px; }
.textlink { display: block; margin: 12px auto 0; background: none; border: 0; color: var(--ink-2); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

/* rules tables */
.rules { display: grid; gap: 14px; font-size: 12px; color: var(--ink-2); }
.rules h4 { margin: 0 0 6px; font-size: 13px; color: var(--ink); }
.rules table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rules th, .rules td { text-align: left; padding: 6px 4px; border-top: 1px solid var(--stroke); vertical-align: top; }
.rules th { color: var(--ink); font-weight: 800; white-space: nowrap; }
.rules td.n { text-align: right; font-family: var(--latin); font-weight: 700; color: var(--ink); }
.rules code { font-family: var(--latin); font-size: 11px; color: var(--ink); background: var(--glass-2); border-radius: 4px; padding: 1px 4px; }
.rules p { margin: 0; }

/* rarity tags */
.rar { font-family: var(--latin); font-weight: 900; font-size: 11px; line-height: 1; padding: 4px 7px 3px; border-radius: 6px; color: #120d24; display: inline-block; letter-spacing: .02em; }
.rar.R { background: var(--r); } .rar.SR { background: var(--sr); color: #fff; }
.rar.SSR { background: var(--gold); background-size: 200% 200%; animation: holo2 3s linear infinite; }
.rar.UR { background: var(--holo); background-size: 200% 100%; animation: holo 3s linear infinite; }
@keyframes holo { to { background-position: 200% 0; } }
@keyframes holo2 { to { background-position: 300% 300%; } }
/* LR (秘宝): black & gold everywhere a rarity is shown */
/* the LR label: lacquer with a crown, gold leaf letters, a silver rule */
.rar.LR { background: var(--lacquer); color: #f2cf74; box-shadow: inset 0 0 0 1px #d9b45a, inset 0 -2px 0 var(--silver); display: inline-flex; align-items: center; gap: .18em; }
.rar.LR::before { content: ""; width: 1.05em; height: .8em; flex: none; background: var(--leaf); -webkit-mask: var(--crown) center / contain no-repeat; mask: var(--crown) center / contain no-repeat; }
:root { --crown: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18'%3E%3Cpath d='M2 15h20l1-10-6 4-5-8-5 8-6-4z'/%3E%3Ccircle cx='1.5' cy='4' r='1.5'/%3E%3Ccircle cx='12' cy='1.5' r='1.5'/%3E%3Ccircle cx='22.5' cy='4' r='1.5'/%3E%3Crect x='2' y='16' width='20' height='2'/%3E%3C/svg%3E"); }
/* LR cards: a gothic picture frame — glossy black lacquer, gold beading, baroque gold corners with silver jewels that glint */
.icard.LR { padding: 13px; background: var(--lacquer-gloss); animation: none; box-shadow: 0 0 0 1.5px #d9b45a, 0 0 0 3px #0a0908, 0 0 0 4px rgba(221,227,234,.7), 0 0 26px -4px rgba(240,207,114,.6); }
.icard.LR .icard-in { border-radius: 10px; outline: 2.5px dotted rgba(240,207,114,.95); outline-offset: 3px; box-shadow: 0 0 0 6px #050404, 0 0 0 7px rgba(221,227,234,.55); }
.dk.LR { padding: 8px; background: var(--lacquer-gloss); animation: none; box-shadow: 0 0 0 1px #d9b45a, 0 0 0 2px rgba(221,227,234,.6), 0 0 16px -4px rgba(240,207,114,.6); }
.dk.LR .dk-in { border-radius: 11px; outline: 1.5px dotted rgba(240,207,114,.9); outline-offset: 1.5px; }
.tile.LR { background: var(--lacquer-gloss); animation: none; box-shadow: 0 0 0 1px #d9b45a; }
.tile.LR .tile-in { inset: 5px; border-radius: 8px; outline: 1px dotted rgba(240,207,114,.9); outline-offset: 1.5px; }
.rv-front.LR { background: var(--lacquer-gloss); animation: none; }
.rv-front.LR .in { inset: 5px; border-radius: 9px; outline: 1px dotted rgba(240,207,114,.9); outline-offset: 1.5px; }
.icard.LR::after, .tile.LR::after, .dk.LR::after, .rv-front.LR::after { content: ""; position: absolute; inset: -4px; z-index: 3; pointer-events: none; --cs: 64px;
  background: var(--corner-tl) top left / var(--cs) var(--cs) no-repeat, var(--corner-tr) top right / var(--cs) var(--cs) no-repeat, var(--corner-bl) bottom left / var(--cs) var(--cs) no-repeat, var(--corner-br) bottom right / var(--cs) var(--cs) no-repeat,
    var(--fleuron-t) top center / calc(var(--cs) * 1.3) calc(var(--cs) * .52) no-repeat, var(--fleuron-b) bottom center / calc(var(--cs) * 1.3) calc(var(--cs) * .52) no-repeat;
  animation: lrglint 2.6s ease-in-out infinite; }
.dk.LR::after { --cs: 42px; }
.tile.LR::after { --cs: 24px; inset: -2px; }
.rv-front.LR::after { --cs: 26px; inset: 0; }
@keyframes lrglint { 0%, 100% { filter: drop-shadow(0 0 1.5px rgba(255,215,120,.55)) brightness(1); } 50% { filter: drop-shadow(0 0 7px rgba(255,236,170,.95)) brightness(1.4); } }
.icard.LR::before, .tile.LR::before, .dk.LR::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.34) 47%, rgba(255,246,220,.14) 52%, transparent 60%) -150% 0 / 250% 100% no-repeat; animation: lrsheen 3.4s ease-in-out infinite; }
@keyframes lrsheen { 0%, 25% { background-position: 150% 0; } 75%, 100% { background-position: -150% 0; } }
.bigrar.LR { background: var(--lr-text); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 10px rgba(255,200,90,.8)); }
.rc-card.LR { background: var(--lr); background-size: 250% 250%; animation: holo2 5s linear infinite; }
.rc[data-r="LR"] { --c1: #f2cf74; --c2: #cfd6df; --glow: rgba(255,215,110,.95); --ray: rgba(255,210,100,.24); }
.rc[data-r="LR"] .rc-big { background: var(--lr-text); -webkit-background-clip: text; background-clip: text; }

/* big item card */
.carousel { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 9% 10px; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); scrollbar-width: none; }
.carousel::-webkit-scrollbar { display: none; }
.icard { flex: 0 0 82%; scroll-snap-align: center; border-radius: 22px; padding: 2px; background: var(--stroke); position: relative; }
.icard.SR { background: linear-gradient(160deg, var(--sr), rgba(255,79,94,.15)); }
.icard.SSR { background: var(--gold); background-size: 200% 200%; animation: holo2 4s linear infinite; box-shadow: 0 0 28px -6px rgba(255,201,77,.7); }
.icard.UR { background: var(--holo); background-size: 300% 300%; animation: holo2 4s linear infinite; box-shadow: 0 0 32px -6px rgba(255,77,94,.6); }
.icard-in { border-radius: 20px; overflow: hidden; background: #fff; height: 100%; display: flex; flex-direction: column; }
.ph { position: relative; aspect-ratio: 1; background: #ecebf3; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .shade { position: absolute; inset: auto 0 0; height: 45%; background: linear-gradient(transparent, rgba(12,10,30,.92)); }
.ph .bigrar { position: absolute; left: 14px; bottom: 10px; font-family: var(--latin); font-weight: 900; font-size: 34px; line-height: 1; letter-spacing: -.02em; }
.bigrar.R { color: var(--r); } .bigrar.SR { color: var(--sr); }
.bigrar.SSR { background: var(--gold); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 200%; animation: holo2 3s linear infinite; }
.bigrar.UR { background: var(--holo); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: holo 3s linear infinite; }
.ph .tags { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.tag { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 9px; background: rgba(12,10,30,.6); border: 1px solid rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(6px); white-space: nowrap; }
button.tag { font-family: inherit; line-height: inherit; cursor: pointer; }
button.tag::after { content: '›'; margin-left: 4px; opacity: .7; }
.ph .power { position: absolute; right: 14px; bottom: 12px; text-align: right; font-size: 10px; color: #d9d5f5; font-weight: 700; }
.ph .power b { display: block; font-family: var(--latin); font-size: 20px; color: #fff; line-height: 1.1; }
.ib { padding: 12px 14px 14px; display: grid; gap: 8px; flex: 1; }
.iname { font-size: 13px; font-weight: 700; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.imuni { font-size: 12px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.imuni b { font-family: var(--latin); font-weight: 700; color: var(--ink); font-size: 13px; }
.rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); font-weight: 700; flex-wrap: wrap; }
.stars { position: relative; display: inline-block; font-size: 16px; line-height: 1; letter-spacing: 1px; color: rgba(27,23,51,.15); white-space: nowrap; }
.stars::before { content: "★★★★★"; position: absolute; left: 0; top: 0; width: var(--p); overflow: hidden; color: #ffbf2f; white-space: nowrap; }
.rating b { font-family: var(--latin); color: var(--ink); font-size: 14px; }
.rating.sm .stars { font-size: 12px; } .rating.sm b { font-size: 11px; } .rating.sm { font-size: 11px; gap: 4px; }
[data-mview] { cursor: pointer; }
.statbars { display: grid; gap: 5px; }
.sb { display: grid; grid-template-columns: 74px 1fr 28px; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-2); font-weight: 700; }
.sb i { height: 6px; border-radius: 99px; background: rgba(27,23,51,.08); overflow: hidden; display: block; }
.sb i span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6fb5ff, #b76bff); }
.sb.def i span { background: linear-gradient(90deg, #6effb4, #5ec8ff); }
.sb b { font-family: var(--latin); font-size: 12px; color: var(--ink); text-align: right; }
.iact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 8px; margin-top: auto; }
.btn { border-radius: 12px; padding: 10px 0; font-size: 13px; font-weight: 800; text-align: center; text-decoration: none; border: 1px solid var(--stroke); background: var(--glass-2); display: inline-block; }
.btn[aria-pressed="true"] { border-color: var(--ok); color: var(--ok); }
.btn.gold { background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); color: var(--gold-ink); border: 0; }
.btn.line { background: transparent; border-color: var(--accent); color: var(--accent); }
.btn.sm { padding: 6px 10px; font-size: 12px; border-radius: 10px; }
.dots { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 2px 0 14px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--stroke); cursor: pointer; }
.dots .pos { font-family: var(--latin); font-size: 11px; color: var(--ink-2); margin-left: 8px; font-style: normal; }
.car-wrap { position: relative; }
.car-nav { position: absolute; top: 34%; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--stroke); background: rgba(255,255,255,.92); box-shadow: 0 2px 10px rgba(27,23,51,.15); font-size: 24px; line-height: 1; display: grid; place-items: center; padding: 0 0 3px; z-index: 2; }
.car-nav.prev { left: -6px; } .car-nav.next { right: -6px; }
.car-nav[disabled] { opacity: 0; pointer-events: none; }
.carousel { cursor: grab; }
.carousel.dragging { scroll-snap-type: none; cursor: grabbing; }
.dots i.on { background: var(--gold-2); width: 16px; border-radius: 99px; }

.result-sum { padding: 12px 14px; margin-bottom: 12px; display: grid; gap: 6px; font-size: 12px; }
.meter-row { display: flex; justify-content: space-between; color: var(--ink-2); font-weight: 700; gap: 8px; }
.meter-row b { font-family: var(--latin); color: var(--ink); font-weight: 700; }
.bar { height: 8px; border-radius: 99px; background: rgba(27,23,51,.08); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #2bd29a, #3aa8ff); transition: width .3s; }
.bar.over span { background: var(--danger); }
.warn { color: var(--danger); font-size: 12px; font-weight: 700; }

.actions { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 4; display: grid; grid-template-columns: 1fr 1.3fr 74px; gap: 8px; padding: 10px; border-radius: 18px; background: rgba(255,255,255,.94); border: 1px solid var(--stroke); box-shadow: 0 8px 24px -10px rgba(27,23,51,.25); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.actions .btn { padding: 12px 0; font-size: 12px; }
.actions .btn.again { background: var(--ink); color: #fff; border-color: var(--ink); font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.actions .btn.again svg { width: 16px; height: 16px; }

/* box */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.seg { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--glass); border: 1px solid var(--stroke); }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: 4px 10px; font-size: 12px; font-weight: 800; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--glass-2); color: var(--ink); }
.toolbar select { margin-left: auto; border-radius: 10px; border: 1px solid var(--stroke); background-color: #fff; padding: 5px 8px; font-size: 12px; font-weight: 700; }
.toolbar select.bv-genre { margin-left: 0; }
/* two selects side by side at equal width */
.toolbar.sel2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.toolbar.sel2 select { margin: 0; width: 100%; min-width: 0; }
.price-f { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; font-size: 12px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.price-f select { margin: 0; width: 100%; min-width: 0; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.more { height: 1px; }
.tile { position: relative; aspect-ratio: 1; border-radius: 14px; padding: 2px; border: 0; background: var(--stroke); }
.tile.SR { background: linear-gradient(160deg, var(--sr), rgba(255,79,94,.2)); }
.tile.SSR { background: var(--gold); background-size: 200% 200%; animation: holo2 4s linear infinite; }
.tile.UR { background: var(--holo); background-size: 300% 300%; animation: holo2 4s linear infinite; }
.tile-in { position: absolute; inset: 2px; border-radius: 12px; overflow: hidden; background: #ecebf3; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .rar { position: absolute; left: 6px; bottom: 6px; font-size: 10px; }
.tile .pref { position: absolute; right: 6px; bottom: 6px; font-size: 10px; font-weight: 800; background: rgba(12,10,30,.75); color: #fff; border-radius: 6px; padding: 1px 5px; }
.tile .inparty { position: absolute; left: 6px; top: 6px; font-size: 10px; font-weight: 800; background: var(--gold-1); color: var(--gold-ink); border-radius: 6px; padding: 1px 5px; }
.tile[aria-disabled="true"] { opacity: .35; }
.empty { text-align: center; color: var(--ink-2); padding: 30px 12px; font-size: 13px; display: grid; gap: 12px; justify-items: center; }

/* area map: Japan by region, then the chosen region's prefectures */
.area { padding: 12px; margin-bottom: 12px; }
.amap-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; margin-bottom: 10px; font-size: 11px; color: var(--ink-2); }
.amap-head > b { font-size: 14px; color: var(--ink); }
.amap-all { border-radius: 999px; border: 1px solid var(--stroke); background: var(--glass); padding: 5px 12px; font-size: 12px; font-weight: 800; color: var(--ink-2); }
.amap-all b { font-family: var(--latin); margin-left: 4px; }
.amap-all[aria-pressed="true"] { background: linear-gradient(180deg, #fff3d1, #ffe2b0); border-color: var(--gold-2); color: var(--accent); }
.amap { display: grid; gap: 6px; justify-content: center; }
/* tiles of one region touch; a transparent 1px border on region edges leaves a gap between regions */
.amap-jp { position: relative; gap: 0; justify-content: stretch; }
.amap.amap-jp .pf { aspect-ratio: 1; padding: 0; border: 0 solid transparent; background-clip: padding-box; }
.amap.amap-jp .pf.none { background-color: rgba(27,23,51,.09); }
.amap.amap-jp .pf.pf { background-clip: padding-box; } /* the heat colors use the background shorthand, which would reset this */
.amap-lb { position: absolute; transform: translate(-50%, -50%); pointer-events: none; white-space: nowrap; font-size: 10px; font-weight: 800; line-height: 1.1; text-align: center; color: var(--ink); text-shadow: 0 0 3px rgba(255,255,255,.9), 0 0 2px rgba(255,255,255,.9); }
.amap-lb b { display: block; font-family: var(--latin); font-size: 12px; }
.amap-lb.dark { color: #fff; text-shadow: 0 0 3px rgba(80,30,0,.6); }
.amap .pf { min-width: 0; word-break: keep-all; border: 0; border-radius: 10px; padding: 2px; background: rgba(27,23,51,.06); color: var(--ink-2); display: grid; place-content: center; text-align: center; line-height: 1.2; font-size: 12px; font-weight: 800; }
.amap:not(.amap-jp) .pf { aspect-ratio: 1; }
.amap .pf b { font-family: var(--latin); font-size: 13px; display: block; }
.amap .pf.has { color: #1b1300; }
.amap .pf.l1 { background: #f6e3b0; } .amap .pf.l2 { background: #f0c26a; } .amap .pf.l3 { background: #f59a3a; } .amap .pf.l4 { background: #d9630a; color: #fff; }
.amap .pf[aria-pressed="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.jlegend { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11px; color: var(--ink-2); gap: 8px; flex-wrap: wrap; }
.jlegend .sw { display: inline-flex; gap: 3px; align-items: center; }
.jlegend .sw i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* party */
.ptop { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ptop .h2 { margin-bottom: 10px; }
.pswitch-btn { flex: 0 0 auto; border-radius: 999px; border: 1px solid var(--stroke); background: #fff; padding: 6px 12px; font-size: 12px; font-weight: 800; color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.pswitch-btn b { font-family: var(--latin); color: var(--ink); }
.pswitch-btn::after { content: "▾"; font-size: 11px; }
.plist { display: grid; gap: 8px; }
.plist button { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: center; text-align: left; border-radius: 14px; border: 1px solid var(--stroke); background: #fff; padding: 12px; }
.plist button[aria-pressed="true"] { border-color: var(--gold-2); background: #fff8e8; }
.plist .no { font-family: var(--latin); font-weight: 900; font-size: 16px; color: var(--ink-3); text-align: center; }
.plist .nm { font-weight: 900; font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.plist .nm small { display: block; font-weight: 700; font-size: 11px; color: var(--ink-2); }
.plist .cur { font-size: 11px; font-weight: 800; color: var(--accent); }
.phead { padding: 14px; display: grid; gap: 10px; margin-bottom: 12px; }
.pname-row { display: flex; align-items: center; gap: 6px; }
.pname { font-weight: 900; font-size: 19px; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.pname-ed { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--stroke); background: var(--glass-2); display: grid; place-items: center; padding: 0; color: var(--ink-2); }
.pname-ed svg { width: 15px; height: 15px; }
.pname-edit { display: flex; gap: 6px; flex: 1; }
.pname-edit input { flex: 1; min-width: 0; border-radius: 10px; border: 1px solid var(--gold-2); background: #fff; padding: 7px 10px; font-weight: 800; font-size: 15px; }
.gauge { display: grid; gap: 6px; }
.gauge-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.gauge-top .used { font-size: 12px; color: var(--ink-2); font-weight: 700; }
.gauge-top .used b { font-family: var(--latin); font-size: 22px; color: var(--ink); }
.gauge-top .state { font-size: 12px; font-weight: 800; color: var(--ink-2); white-space: nowrap; }
.gauge-top .state.just { color: var(--ok); }
.gauge-top .state.over { color: var(--danger); }
.gauge .bar { height: 10px; }
.pmeta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 11px; color: var(--ink-2); font-weight: 700; }
.pmeta .pow b { font-family: var(--latin); font-size: 15px; color: var(--accent); margin-left: 3px; }
.helpers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.helpers .btn { padding: 9px 0; font-size: 12px; }
.helpers .btn:only-child { grid-column: 1 / -1; }
.pstats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pstat { background: var(--glass-2); border-radius: 12px; padding: 8px 10px; font-size: 11px; color: var(--ink-2); font-weight: 700; display: grid; gap: 4px; }
.pstat b { font-family: var(--latin); font-size: 20px; color: var(--ink); line-height: 1.1; }
.pstat b.gold { color: var(--accent); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 10px; color: var(--accent); border: 1px solid rgba(194,106,0,.35); background: #fff6df; }
.deck { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dk { position: relative; border-radius: 16px; padding: 2px; background: var(--stroke); cursor: pointer; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; transition: transform .15s, box-shadow .15s; }
.dk.SR { background: linear-gradient(160deg, var(--sr), rgba(255,79,94,.25)); }
.dk.SSR { background: var(--gold); background-size: 200% 200%; animation: holo2 4s linear infinite; }
.dk.UR { background: var(--holo); background-size: 300% 300%; animation: holo2 4s linear infinite; }
.dk-in { border-radius: 14px; overflow: hidden; background: #fff; height: 100%; display: flex; flex-direction: column; }
.dk-ph { position: relative; aspect-ratio: 1; background: #ecebf3; }
.dk-ph img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; -webkit-user-drag: none; }
.dk-no { position: absolute; left: 6px; top: 6px; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); color: var(--gold-ink); font-family: var(--latin); font-weight: 900; font-size: 12px; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.dk-ph .rar { position: absolute; left: 6px; bottom: 6px; }
.dk-out { position: absolute; right: 6px; top: 6px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid rgba(255,255,255,.35); background: rgba(12,10,30,.62); color: #fff; display: grid; place-items: center; padding: 0; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.dk-out svg { width: 14px; height: 14px; }
.dk-out:hover { background: var(--danger); }
.dk-done { position: absolute; right: 6px; bottom: 6px; font-size: 10px; font-weight: 800; color: #fff; background: rgba(15,157,107,.92); border-radius: 6px; padding: 1px 6px; }
.dk-b { padding: 7px 9px 9px; display: grid; gap: 2px; }
.dk-nm { font-size: 11px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.dk-p { font-size: 11px; color: var(--ink-2); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dk-p b { font-family: var(--latin); font-size: 14px; color: var(--ink); }
.dk.add { background: none; border: 2px dashed rgba(27,23,51,.22); padding: 0; display: grid; place-items: center; align-content: center; gap: 4px; min-height: 180px; color: var(--ink-2); font-weight: 800; font-size: 13px; text-align: center; }
.dk.add .plus { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); color: var(--gold-ink); font-size: 26px; line-height: 44px; font-weight: 900; }
.dk.add small { font-size: 10px; color: var(--ink-3); font-weight: 700; }
.dk.lifting { z-index: 5; box-shadow: 0 16px 34px -8px rgba(27,23,51,.45); pointer-events: none; transition: none; }
.deck.dragging .dk:not(.lifting) { transition: transform .15s; }
.deck-hint { margin: 10px 0 12px; text-align: center; }
.pbar { grid-template-columns: 1fr 2.2fr; }
.pbar .btn { padding: 13px 0; font-size: 13px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.share-btn svg { width: 16px; height: 16px; }
.golist { display: grid; gap: 8px; }
.go-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; border: 1px solid var(--stroke); background: #fff; }
.go-row img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.go-row .n { font-size: 12px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.go-row .p { font-size: 11px; color: var(--ink-2); font-weight: 700; }
.go-row .p b { font-family: var(--latin); color: var(--ink); }
.go-row .btn { padding: 9px 10px; font-size: 12px; white-space: nowrap; }
.go-row.done { background: #f2fbf7; border-color: rgba(15,157,107,.35); }
.go-row.done .btn { color: var(--ok); border-color: rgba(15,157,107,.5); background: #fff; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }
.rest-pull { width: 100%; padding: 12px 0; }
/* ranking */
.notice { padding: 10px 12px; font-size: 12px; color: var(--ink-2); margin-bottom: 12px; }
.fchips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-bottom: 12px; padding-bottom: 2px; }
.fchips.scroll::-webkit-scrollbar { display: none; }
.fchips.scroll button { flex: 0 0 auto; }
.rk { display: grid; grid-template-columns: 26px 116px 1fr; gap: 10px; padding: 10px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); align-items: start; margin-bottom: 8px; }
.rk-no { font-family: var(--latin); font-weight: 900; font-size: 18px; text-align: center; color: var(--ink-2); padding-top: 6px; }
.rk-no.n1 { color: #e0a000; font-size: 22px; } .rk-no.n2 { color: #8f99ad; font-size: 20px; } .rk-no.n3 { color: #c47a3c; font-size: 20px; }
.rk img { width: 116px; height: 116px; border-radius: 14px; object-fit: cover; display: block; }
.rk-body { min-width: 0; display: grid; gap: 4px; }
.rk-cnt { font-size: 12px; color: var(--accent); font-weight: 800; }
.rk-ttl { font-size: 13px; font-weight: 800; margin: 0 2px 8px; }
.rk-foot { grid-column: 2 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 11px; color: var(--ink-2); }
.rk-foot a.btn { padding: 6px 12px; font-size: 12px; }
.newbadge { position: absolute; top: 10px; left: 10px; font-family: var(--latin); font-weight: 900; font-size: 12px; letter-spacing: .04em; color: #fff; background: linear-gradient(135deg, #ff4f5e, #ff9f43); border-radius: 6px; padding: 4px 8px 3px; box-shadow: 0 0 14px rgba(255,90,90,.6); }
.rv-new { position: absolute; top: 5px; left: 5px; font-family: var(--latin); font-weight: 900; font-size: 9px; color: #fff; background: linear-gradient(135deg, #ff4f5e, #ff9f43); border-radius: 4px; padding: 2px 5px 1px; }
.btn.had { color: var(--ink-2); }
.fchips button small { font-family: var(--latin); font-size: 10px; margin-left: 4px; opacity: .7; }
.fchips button[disabled] { opacity: .35; cursor: not-allowed; }
/* ===== gacha result share card (1200x630), two designs ===== */
.rc { aspect-ratio: 1200 / 630; border-radius: 2cqw; overflow: hidden; position: relative; color: #fff; background: #07051a; isolation: isolate; font-family: var(--jp); }
.rc[data-r="UR"] { --c1: #ff4d5e; --c2: #b76bff; --glow: rgba(255,255,255,.9); --ray: rgba(255,255,255,.16); }
.rc[data-r="SSR"] { --c1: #ffd15c; --c2: #ff9f2e; --glow: rgba(255,214,110,.95); --ray: rgba(255,200,80,.2); }
.rc[data-r="SR"] { --c1: #ff4f5e; --c2: #ff8a5c; --glow: rgba(255,90,100,.9); --ray: rgba(255,80,90,.18); }
.rc[data-r="R"] { --c1: #8fb3ff; --c2: #6ad1ff; --glow: rgba(143,179,255,.9); --ray: rgba(143,179,255,.16); }
.rc-bg { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at var(--fx, 70%) var(--fy, 45%), color-mix(in srgb, var(--c1) 55%, transparent) 0%, transparent 38%),
              radial-gradient(circle at var(--fx, 70%) var(--fy, 45%), color-mix(in srgb, var(--c2) 45%, transparent) 0%, transparent 62%),
              linear-gradient(160deg, #1a1040, #07051a 70%); }
.rc-rays { position: absolute; inset: -60%; z-index: -1; background: repeating-conic-gradient(from 0deg at var(--fx, 70%) var(--fy, 45%), var(--ray) 0deg 5deg, transparent 5deg 15deg); -webkit-mask: radial-gradient(circle at var(--fx, 70%) var(--fy, 45%), #000 10%, transparent 55%); mask: radial-gradient(circle at var(--fx, 70%) var(--fy, 45%), #000 10%, transparent 55%); }
.rc[data-r="UR"] .rc-rays { background: repeating-conic-gradient(from 0deg at var(--fx, 70%) var(--fy, 45%), rgba(255,77,94,.28) 0deg 4deg, transparent 4deg 9deg, rgba(255,243,107,.24) 9deg 13deg, transparent 13deg 18deg, rgba(94,200,255,.26) 18deg 22deg, transparent 22deg 27deg, rgba(183,107,255,.28) 27deg 31deg, transparent 31deg 36deg); }
.rc-spark { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.rc-spark i { position: absolute; width: var(--s); height: var(--s); transform: translate(-50%, -50%) rotate(45deg); background: radial-gradient(circle, #fff 0 18%, var(--c1) 40%, transparent 70%); border-radius: 50%; opacity: var(--o); }
.rc-spark i.star { border-radius: 0; background: none; }
.rc-spark i.star::before, .rc-spark i.star::after { content: ""; position: absolute; left: 50%; top: 50%; width: 100%; height: 12%; transform: translate(-50%, -50%); background: linear-gradient(90deg, transparent, #fff, transparent); border-radius: 99px; }
.rc-spark i.star::after { width: 12%; height: 100%; background: linear-gradient(180deg, transparent, #fff, transparent); }
.rc-frame { position: absolute; inset: 0; border-radius: inherit; border: .45cqw solid transparent; background: linear-gradient(135deg, var(--c1), var(--c2)) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.rc[data-r="UR"] .rc-frame { background: var(--holo) border-box; }
.rc-logo { position: absolute; left: 3.4cqw; top: 2.8cqw; font-weight: 900; font-size: 2.6cqw; }
.rc-logo b { font-family: var(--latin); background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rc-big { font-family: var(--latin); font-weight: 900; line-height: .9; letter-spacing: -.03em; background: linear-gradient(180deg, #fff 10%, var(--c1) 55%, var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 1.6cqw var(--glow)); }
.rc[data-r="UR"] .rc-big { background: linear-gradient(180deg, #fff 5%, transparent 40%), var(--holo); -webkit-background-clip: text; background-clip: text; }
.rc-shout { font-weight: 900; letter-spacing: .04em; text-shadow: 0 0 1.4cqw var(--glow), 0 .3cqw 0 rgba(0,0,0,.5); transform: skewX(-8deg); display: inline-block; }
.rc-card { position: absolute; border-radius: 1.6cqw; padding: .4cqw; background: linear-gradient(160deg, var(--c1), var(--c2)); box-shadow: 0 0 3cqw var(--glow), 0 1.6cqw 3cqw rgba(0,0,0,.6); }
.rc-card.R { background: linear-gradient(160deg, #8fb3ff, #4d6fb8); box-shadow: 0 1cqw 2cqw rgba(0,0,0,.5); }
.rc-card.SR { background: linear-gradient(160deg, #ff4f5e, #a3202b); }
.rc-card.SSR { background: var(--gold); }
.rc-card.UR { background: var(--holo); }
.rc-card-in { width: 100%; height: 100%; border-radius: 1.3cqw; background: radial-gradient(circle at 50% 30%, #3b2a8f, #120f2c 75%); display: flex; flex-direction: column; align-items: center; padding: 1.6cqw 1.4cqw; gap: .8cqw; text-align: center; position: relative; overflow: hidden; }
.rc-card-in svg { color: #f1edff; filter: drop-shadow(0 0 .8cqw rgba(255,255,255,.5)); }
.rc-card .rar { position: absolute; left: 1cqw; top: 1cqw; }
.rc-cname { font-weight: 800; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-height: 2.7em; flex-shrink: 0; width: 100%; }
.rc-cmeta { color: #cfc9f2; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; flex-shrink: 0; }
.rc-new { position: absolute; right: 1cqw; top: 1cqw; font-family: var(--latin); font-weight: 900; color: #fff; background: linear-gradient(135deg, #ff4f5e, #ff9f43); border-radius: .5cqw; }
.rc-cta { position: absolute; display: grid; gap: .3cqw; }
.rc-cta b { font-weight: 900; }
.rc-cta .free { position: static; display: inline-block; justify-self: start; background: #fff; color: #120d24; border: 0; }
.rc-url { color: #e6e1ff; font-weight: 700; }
.rc-note { color: #b9b3e0; font-weight: 500; font-size: 1.15cqw; }

/* A: spotlight */
.rcA { --fx: 72%; --fy: 46%; }
.rcA .rc-top { position: absolute; left: 3.4cqw; top: 7cqw; display: grid; gap: .3cqw; }
.rc-hook1 { font-weight: 800; font-size: 2cqw; color: #d8d2fa; }
.rc-hook2 { font-weight: 900; font-size: 2.9cqw; color: #fff; text-shadow: 0 0 1cqw var(--glow); }
.rc-hook2 em { font-style: normal; background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rcA .rc-hit { position: absolute; left: 3cqw; top: 15cqw; display: grid; justify-items: start; }
.rcA .rc-big { font-size: 13cqw; }
.rcA .rc-shout { font-size: 4.8cqw; margin-top: .2cqw; }
.rcA .rc-card.hero { right: 9cqw; top: 6cqw; width: 26cqw; height: 34cqw; transform: rotate(5deg); }
.rcA .hero .rc-card-in svg { width: 13cqw; height: 13cqw; margin-top: 2cqw; }
.rcA .rc-card .rar { font-size: 2cqw; padding: .6cqw 1cqw .5cqw; border-radius: .6cqw; }
.rcA .rc-cname { font-size: 2cqw; } .rcA .rc-cmeta { font-size: 1.5cqw; }
.rcA .rc-new { font-size: 1.6cqw; padding: .4cqw .9cqw .3cqw; }
.rcA .rc-others { position: absolute; left: 3.4cqw; bottom: 3.4cqw; display: grid; gap: 1cqw; justify-items: start; }
.rcA .rc-minis { display: flex; gap: 1cqw; }
.rcA .rc-mini { width: 6.4cqw; height: 8.4cqw; position: relative; border-radius: 1cqw; padding: .25cqw; }
.rcA .rc-mini .rc-card-in { padding: .6cqw; justify-content: center; border-radius: .8cqw; }
.rcA .rc-mini svg { width: 3.6cqw; height: 3.6cqw; }
.rcA .rc-mini .rar { position: absolute; left: 50%; bottom: -.6cqw; top: auto; transform: translateX(-50%); font-size: 1.3cqw; padding: .3cqw .6cqw .2cqw; }
.rcA .rc-tally { font-size: 1.8cqw; font-weight: 800; color: #e6e1ff; }
.rcA .rc-cta { right: 3.4cqw; bottom: 3cqw; justify-items: end; text-align: right; }
.rcA .rc-cta b { font-size: 2.8cqw; text-shadow: 0 0 1cqw var(--glow); }
.rcA .rc-cta .free { font-size: 1.5cqw; padding: .3cqw 1.2cqw; border-radius: 99px; justify-self: end; }
.rcA .rc-url { font-size: 1.5cqw; }

/* B: fan of cards */
.rcB { --fx: 50%; --fy: 62%; }
.rcB .rc-head { position: absolute; left: 0; right: 0; top: 2.2cqw; text-align: center; display: grid; justify-items: center; gap: .1cqw; }
.rcB .rc-hook1 { font-size: 1.7cqw; }
.rcB .rc-hook2 { font-size: 2.4cqw; }
.rcB .rc-head small { font-size: 2cqw; font-weight: 800; color: #e6e1ff; }
.rcB .rc-head .line { display: flex; align-items: baseline; gap: 1.6cqw; }
.rcB .rc-big { font-size: 7.2cqw; }
.rcB .rc-shout { font-size: 4cqw; }
.rcB .rc-fan { position: absolute; left: 50%; top: 34.5cqw; width: 0; height: 0; }
.rcB .rc-card { width: 14cqw; height: 18.5cqw; left: -7cqw; top: -11cqw; transform-origin: 50% 200%; }
.rcB .rc-card.best { width: 17.5cqw; height: 23cqw; left: -8.75cqw; top: -14.5cqw; z-index: 2; }
.rcB .rc-card-in svg { width: 6cqw; height: 6cqw; margin-top: 2.2cqw; flex-shrink: 0; }
.rcB .rc-card.best .rc-card-in svg { width: 8.6cqw; height: 8.6cqw; }
.rcB .rc-card .rar { font-size: 1.6cqw; padding: .5cqw .8cqw .4cqw; border-radius: .5cqw; }
.rcB .rc-cname { font-size: 1.45cqw; } .rcB .rc-card.best .rc-cname { font-size: 1.7cqw; }
.rcB .rc-cmeta { font-size: 1.15cqw; }
.rcB .rc-new { font-size: 1.2cqw; padding: .3cqw .7cqw .2cqw; }
.rcB .rc-cta { left: 3.4cqw; right: 3.4cqw; bottom: 2.6cqw; display: flex; justify-content: space-between; align-items: flex-end; }
.rcB .rc-cta b { font-size: 2.6cqw; text-shadow: 0 0 1cqw var(--glow); }
.rcB .rc-cta .free { font-size: 1.4cqw; padding: .3cqw 1.1cqw; border-radius: 99px; margin-left: 1cqw; }
.rcB .rc-url { font-size: 1.5cqw; }
.rcB .rc-tally { font-size: 1.7cqw; font-weight: 800; color: #e6e1ff; }
.design-seg { justify-self: start; }
/* P: party share card */
.rcP { --fx: 72%; --fy: 44%; }
.rcP .rc-top { position: absolute; left: 3.4cqw; top: 7cqw; display: grid; gap: .3cqw; }
.rcP .rc-hook1 { font-size: 1.8cqw; } .rcP .rc-hook2 { font-size: 2.5cqw; }
.rcP .rc-party { position: absolute; left: 3.4cqw; top: 14.4cqw; width: 41cqw; display: grid; gap: .5cqw; justify-items: start; }
.rcP .rc-plabel { font-size: 1.6cqw; font-weight: 800; color: #d8d2fa; letter-spacing: .1em; border: .15cqw solid rgba(255,255,255,.35); border-radius: 99px; padding: .2cqw 1.2cqw; }
.rcP .rc-pname { font-weight: 900; font-size: var(--pn, 4cqw); line-height: 1.18; overflow-wrap: anywhere; background: linear-gradient(180deg, #fff 30%, var(--c1)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 1.2cqw var(--glow)); }
.rcP .rc-badges { display: flex; flex-wrap: wrap; gap: .8cqw; }
.rcP .rc-pname.auto { word-break: keep-all; overflow-wrap: normal; }
.rcP .rc-badges span { font-size: 1.35cqw; font-weight: 900; color: #2b1700; background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); border-radius: 99px; padding: .3cqw 1.2cqw; box-shadow: 0 0 1cqw rgba(255,200,80,.7); }
.rcP .rc-pow { font-size: 1.5cqw; font-weight: 800; color: #d8d2fa; margin-top: .2cqw; }
.rcP .rc-pow b { display: block; font-family: var(--latin); font-weight: 900; font-size: 5.2cqw; line-height: 1; background: linear-gradient(180deg, #fff, var(--gold-1) 45%, var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 1cqw rgba(255,200,80,.6)); }
.rcP .rc-form { position: absolute; right: 3.4cqw; top: 4.6cqw; width: 52cqw; display: grid; gap: 1.6cqw; justify-items: center; }
.rcP .rc-row { display: flex; gap: 1.6cqw; justify-content: center; }
.rcP .rc-card { position: relative; width: 15cqw; height: 16.2cqw; }
.rcP .rc-card-in { padding: 1cqw .9cqw; gap: .5cqw; }
.rcP .rc-card-in svg { width: 4.6cqw; height: 4.6cqw; margin-top: 1.6cqw; flex-shrink: 0; }
.rcP .rc-card .rar { font-size: 1.3cqw; padding: .4cqw .7cqw .3cqw; border-radius: .5cqw; left: .8cqw; top: .8cqw; }
.rcP .rc-role { position: absolute; right: .8cqw; top: .8cqw; font-size: 1.15cqw; font-weight: 800; background: rgba(255,255,255,.14); border-radius: 99px; padding: .15cqw .8cqw; }
.rcP .rc-cname { font-size: 1.3cqw; } .rcP .rc-cmeta { font-size: 1cqw; }
.rcP .rc-more { font-size: 1.4cqw; font-weight: 800; color: #e6e1ff; margin-top: -.6cqw; }
.rcP .rc-cta { left: 3.4cqw; bottom: 3cqw; display: flex; align-items: center; gap: 1cqw; white-space: nowrap; }
.rcP .rc-cta b { font-size: 2.5cqw; text-shadow: 0 0 1cqw var(--glow); }
.rcP .rc-cta .free { font-size: 1.4cqw; padding: .3cqw 1.1cqw; border-radius: 99px; }
.rcP .rc-foot { position: absolute; right: 3.4cqw; bottom: 3cqw; text-align: right; }
.rcP .rc-url { font-size: 1.5cqw; }

.pc-more { font-size: 1.7cqw; color: var(--ink-2); font-weight: 800; text-align: right; padding-right: .6cqw; }
.mtags { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.mtags .tag { font-size: 10px; padding: 1px 7px; }
.mname { font-size: 12px; font-weight: 700; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.guide { padding: 14px; display: grid; gap: 8px; font-size: 13px; margin-bottom: 12px; }
.guide ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); }

/* tab bar */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 8; padding: 8px max(16px, env(safe-area-inset-left, 0px)) calc(8px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px)); background: rgba(255,255,255,.94); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--stroke); }
.tabs-in { max-width: 408px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); }
.tabs button { background: none; border: 0; display: grid; justify-items: center; gap: 2px; font-size: 11px; font-weight: 800; color: var(--ink-3); padding: 4px 0; position: relative; }
.tabs svg { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--accent); }
.tabs .n { position: absolute; top: 0; left: calc(50% + 8px); white-space: nowrap; font-family: var(--latin); font-size: 9px; background: var(--ssr); color: #fff; border-radius: 99px; padding: 1px 5px; }

/* sheets */
.sheet-bg { position: fixed; inset: 0; z-index: 30; background: rgba(20,16,40,.45); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; overflow-x: hidden; background: #fff; border: 1px solid var(--stroke); border-bottom: 0; border-radius: 24px 24px 0 0; padding: 14px max(16px, env(safe-area-inset-left, 0px)) calc(18px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-right, 0px)); display: grid; gap: 12px; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; font-weight: 900; font-size: 16px; position: sticky; top: -14px; background: #fff; padding-block: 4px; z-index: 1; }
.sheet-h button { background: none; border: 0; color: var(--ink-2); font-size: 13px; font-weight: 700; }
.sheet .icard { flex: none; width: 100%; }
/* card with icon actions (box / ボックスから追加): tighter text block so the square photo and the actions fit one sheet screen */
.icard.acts .ib { padding: 10px 12px 12px; gap: 6px; }
.icard.acts .iname { -webkit-line-clamp: 2; }
.icard.acts .statbars { grid-template-columns: 1fr 1fr; column-gap: 14px; }
.icard.acts .sb { grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; }
.icard.acts .iact { grid-template-columns: minmax(0, 1fr); grid-auto-flow: column; grid-auto-columns: 56px; }
.icard.acts .iact .btn.line { display: grid; place-items: center; }
.ibtn { display: grid; justify-items: center; align-content: center; gap: 1px; height: 46px; border-radius: 12px; border: 1px solid var(--stroke); background: var(--glass-2); color: var(--ink-2); font-size: 10px; font-weight: 800; padding: 0; }
.ibtn svg { width: 20px; height: 20px; }
.ibtn.gold { background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); border-color: transparent; color: var(--gold-ink); }
.btn.danger { background: #e5484d; border-color: #e5484d; color: #fff; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.row2 .custom input { width: 100%; }
.field select { min-width: 0; }
.fnote { font-size: 10px; color: var(--ink-3); font-weight: 700; }
.sheet > *, #sheet-body > * { min-width: 0; }
.post { overflow-wrap: anywhere; word-break: break-all; background: var(--glass-2); border-radius: 12px; padding: 10px 12px; font-size: 13px; white-space: pre-line; }

/* simulator */
.sim { display: grid; gap: 12px; }
.sim .row2 .field { min-width: 0; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--stroke); background: var(--glass); font-weight: 900; }
.stepper output { min-width: 28px; text-align: center; font-family: var(--latin); font-weight: 700; }
.simres { padding: 14px; border-radius: 16px; background: linear-gradient(160deg, #fff6df, #fffaf0); border: 1px solid rgba(194,106,0,.3); display: grid; gap: 6px; }
.simres .big { font-family: var(--latin); font-weight: 900; font-size: 30px; color: var(--accent); line-height: 1.1; }
.simres .big small { font-family: var(--jp); font-size: 14px; }
.calc { font-size: 12px; color: var(--ink-2); }
.calc summary { cursor: pointer; font-weight: 800; }
.calc table { width: 100%; border-collapse: collapse; margin-top: 6px; font-variant-numeric: tabular-nums; }
.calc td { padding: 4px 0; border-top: 1px solid var(--stroke); }
.calc td:last-child { text-align: right; font-family: var(--latin); color: var(--ink); }

/* share card 1200x630 */
.pc-wrap { container-type: inline-size; }
.pc { aspect-ratio: 1200 / 630; border-radius: 2cqw; overflow: hidden; position: relative; padding: 4cqw; display: grid; grid-template-columns: 34% 1fr; gap: 3cqw; color: #f5f3ff;
  background: radial-gradient(60% 80% at 0% 0%, rgba(59,42,143,.9), transparent 70%), radial-gradient(50% 70% at 100% 100%, rgba(15,92,110,.8), transparent 70%), #0b0a1d; }
.pc::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: .3cqw solid transparent; background: var(--holo) border-box; -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .7; pointer-events: none; }
.pc-l { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; }
.pc-logo { font-weight: 900; font-size: 3.4cqw; }
.pc-logo b { font-family: var(--latin); background: linear-gradient(180deg, var(--gold-1), var(--gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pc-name { font-weight: 900; font-size: 4.2cqw; line-height: 1.3; text-wrap: balance; overflow-wrap: anywhere; }
.pc-badges { display: flex; flex-wrap: wrap; gap: .8cqw; margin-top: 1.4cqw; }
.pc-badges span { font-size: 1.6cqw; font-weight: 800; border: .2cqw solid rgba(255,226,154,.6); color: var(--gold-1); border-radius: 99px; padding: .2cqw 1.2cqw; }
.pc-pow { font-size: 1.8cqw; color: var(--ink-2); font-weight: 700; }
.pc-pow b { display: block; font-family: var(--latin); font-size: 6cqw; line-height: 1.05; color: var(--gold-1); }
.pc-url { font-size: 1.6cqw; color: var(--ink-2); font-weight: 700; margin-top: .6cqw; }
.pc-list { display: grid; gap: .9cqw; align-content: center; min-width: 0; }
.pc-row { display: grid; grid-template-columns: 6.6cqw 5.4cqw 1fr; gap: 1.3cqw; align-items: center; background: rgba(255,255,255,.07); border: .15cqw solid rgba(255,255,255,.1); border-radius: 1.2cqw; padding: .8cqw 1.3cqw; min-width: 0; }
.pc-row .rar { font-size: 1.6cqw; padding: .6cqw .7cqw .5cqw; border-radius: .6cqw; text-align: center; }
.pc-ico { width: 5.4cqw; height: 5.4cqw; border-radius: 1.1cqw; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.pc-ico svg { width: 3.6cqw; height: 3.6cqw; color: #dcd8ff; }
.pc-nm { font-size: 1.85cqw; font-weight: 800; line-height: 1.3; min-width: 0; }
.pc-nm span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-nm small { display: block; font-size: 1.5cqw; font-weight: 500; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* gacha effect */
.fx { position: fixed; inset: 0; z-index: 40; background: #020108; overflow: hidden; }
.fx canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.cutin { position: absolute; left: -10%; right: -10%; top: 30%; z-index: 6; height: 92px; display: grid; place-items: center; transform: skewY(-7deg) translateX(-120%); pointer-events: none; }
.cutin.go { animation: cutin 1.1s cubic-bezier(.2,.9,.2,1) forwards; }
@keyframes cutin { 0% { transform: skewY(-7deg) translateX(-120%); } 22% { transform: skewY(-7deg) translateX(0); } 78% { transform: skewY(-7deg) translateX(0); opacity: 1; } 100% { transform: skewY(-7deg) translateX(120%); opacity: 0; } }
.cutin.gold { background: linear-gradient(90deg, transparent, rgba(255,190,60,.25) 15%, rgba(255,190,60,.25) 85%, transparent); }
.cutin.gold span { background: var(--gold); background-size: 200% 200%; -webkit-background-clip: text; background-clip: text; animation: holo2 1.2s linear infinite; filter: drop-shadow(0 0 14px rgba(255,190,60,.8)); }
.cutin.ur { background: linear-gradient(90deg, transparent, rgba(255,30,60,.35) 15%, rgba(255,30,60,.35) 85%, transparent); height: 120px; }
.cutin span { font-weight: 900; font-size: 40px; letter-spacing: .12em; transform: skewY(7deg); background: var(--holo); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: holo 1s linear infinite; filter: drop-shadow(0 0 12px rgba(255,255,255,.6)); }
.cutin.god, .cutin.classic { left: 0; right: 0; top: 24%; height: auto; transform: none; padding: 22px 0; background: radial-gradient(ellipse 60% 55% at center, rgba(12,6,0,.82), rgba(12,6,0,0) 75%); }
.cutin.god span, .cutin.classic span { -webkit-text-stroke: 1.5px rgba(70,35,0,.9); }
.cutin.god span { font-family: var(--jp) !important; font-weight: 900 !important; font-size: min(76px, 16vw) !important; letter-spacing: .02em !important; line-height: 1.1 !important; white-space: nowrap !important; -webkit-text-stroke: 0 !important; background: linear-gradient(180deg, #ffffff 0%, #fff3b8 28%, #ffc93c 52%, #e08a10 74%, #fff0a8 100%) !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; filter: drop-shadow(0 4px 0 #6a3300) drop-shadow(0 0 3px #3a1a00) drop-shadow(0 0 26px rgba(255,190,60,.95)) !important; }
.cutin.god span { background-size: 100% 1.1em !important; } /* the gold gradient once per line (至高の逸品 / 降臨) */
.cutin.god.go { animation: cutin-god 2.4s ease forwards; } .cutin.classic.go { animation: ultra 4.2s cubic-bezier(.2,1.2,.3,1) forwards; }
@keyframes ultra { 0% { opacity: 0; transform: scale(4) rotate(-6deg); filter: blur(10px); } 9% { opacity: 1; transform: scale(.88) rotate(-3deg); filter: blur(0); } 15% { transform: scale(1.08) rotate(-3deg); } 21% { transform: scale(1) rotate(-3deg); } 88% { opacity: 1; transform: scale(1.04) rotate(-3deg); } 100% { opacity: 0; transform: scale(1.2) rotate(-3deg); } }
@keyframes cutin-god { 0% { opacity: 0; transform: scale(1.4); filter: blur(8px); } 18% { opacity: 1; transform: scale(1); filter: blur(0); } 82% { opacity: 1; } 100% { opacity: 0; transform: scale(1.04); } }
.cutin.god span, .cutin.classic span { transform: none; font-family: "Shippori Mincho B1", "Yu Mincho", "Hiragino Mincho ProN", serif; font-weight: 800; font-size: 58px; letter-spacing: .32em; background: linear-gradient(180deg, #fffbe6 10%, #ffd36a 45%, #b8741a 70%, #fff1b8); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 18px rgba(255,200,90,.95)) drop-shadow(0 0 2px #fff); animation: none; text-align: center; line-height: 1.3; white-space: pre-line; }
.cutin.classic { top: 22% !important; background: radial-gradient(ellipse 70% 60% at center, rgba(20,0,40,.55), rgba(0,0,0,0) 75%) !important; }
.cutin.classic span { font-family: var(--jp) !important; font-weight: 900 !important; font-size: 84px !important; letter-spacing: .02em !important; line-height: 1 !important; white-space: nowrap !important; -webkit-text-stroke: 0 !important; background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0) 45%), linear-gradient(90deg, #ff4d5e, #ffb648, #fff36b, #6effb4, #5ec8ff, #b76bff, #ff4d5e) !important; background-size: 100% 100%, 200% 100% !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; animation: holo 1.2s linear infinite !important; filter: drop-shadow(0 5px 0 #3a1460) drop-shadow(0 0 3px #fff) drop-shadow(0 0 30px rgba(255,255,255,.9)) drop-shadow(0 0 60px rgba(255,120,220,.8)) !important; }
.cutin.classic span small { display: block; font-family: var(--latin); font-size: 22px; letter-spacing: .5em; margin-bottom: 6px; padding-left: .5em; }
.fx.shake { animation: fxshake .6s linear; }
.fx.shake-big { animation: fxshake .9s linear; }
.fx.glitch canvas, .fx.glitch .reveal { animation: glitch .45s steps(6) both; }
@keyframes glitch { 0% { filter: invert(1) hue-rotate(90deg); transform: translate(8px, -4px) skewX(10deg); } 17% { filter: none; transform: translate(-10px, 3px); } 34% { filter: invert(1) contrast(2.2); transform: translate(5px, 7px) skewX(-12deg); } 51% { filter: hue-rotate(200deg) saturate(3); transform: translate(-4px, -3px); } 68% { filter: invert(1); transform: translate(3px, 0) skewX(6deg); } 85%, 100% { filter: none; transform: none; } }
.rv.reviving { z-index: 5; animation: revshake .07s linear infinite, glowUR .8s linear infinite; }
@keyframes revshake { 0% { transform: translate(-3px, 2px) scale(1.24) rotate(-2deg); } 50% { transform: translate(3px, -2px) scale(1.28) rotate(2deg); } 100% { transform: translate(-2px, -1px) scale(1.24) rotate(-1deg); } }
.cutin.revive { left: 0; right: 0; top: 20%; height: auto; padding: 14px 0; transform: none; background: repeating-linear-gradient(115deg, rgba(255,77,94,.45) 0 16px, rgba(255,182,72,.4) 16px 32px, rgba(255,243,107,.4) 32px 48px, rgba(110,255,180,.38) 48px 64px, rgba(94,200,255,.42) 64px 80px, rgba(183,107,255,.45) 80px 96px); border-block: 3px solid #fff; box-shadow: 0 0 40px rgba(255,255,255,.6); }
.cutin.revive.go { animation: slam 1.9s cubic-bezier(.2,1.3,.3,1) forwards; }
@keyframes slam { 0% { opacity: 0; transform: scale(3.2) rotate(-10deg); } 12% { opacity: 1; transform: scale(.9) rotate(-5deg); } 20% { transform: scale(1.06) rotate(-5deg); } 28% { transform: scale(1) rotate(-5deg); } 86% { opacity: 1; transform: scale(1) rotate(-5deg); } 100% { opacity: 0; transform: scale(1.15) rotate(-5deg); } }
.cutin.revive span { transform: none; font-family: var(--jp); font-weight: 900; font-size: 84px; line-height: 1; letter-spacing: .02em; white-space: nowrap; color: #fff; background: none; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-stroke: 2px #2a0a3a; text-shadow: -6px 0 #00e5ff, 6px 0 #ff2a5a, 0 0 30px rgba(255,255,255,.95), 0 0 70px rgba(255,80,160,.85); filter: none; animation: jitter .06s steps(2) infinite; }
@keyframes fxshake { 0%, 100% { transform: none; } 10% { transform: translate(-14px, 8px); } 20% { transform: translate(12px, -10px); } 30% { transform: translate(-10px, -6px); } 40% { transform: translate(9px, 10px); } 55% { transform: translate(-6px, 4px); } 70% { transform: translate(4px, -3px); } 85% { transform: translate(-2px, 1px); } }
.cutin.ur { transform: rotate(-7deg) translateX(-120%); }
.cutin.ur.go { animation: cutin-ur 1.1s cubic-bezier(.2,.9,.2,1) forwards; }
@keyframes cutin-ur { 0% { transform: rotate(-7deg) translateX(-120%); } 22% { transform: rotate(-7deg) translateX(0); } 78% { transform: rotate(-7deg) translateX(0); opacity: 1; } 100% { transform: rotate(-7deg) translateX(120%); opacity: 0; } }
.cutin.ur span { transform: none; font-family: var(--jp); font-weight: 900; line-height: 1; letter-spacing: .04em; white-space: nowrap; font-size: 60px; color: #fff; background: none; -webkit-background-clip: border-box; background-clip: border-box; text-shadow: 0 3px 0 #3a0a1a, -3px 0 #00e5ff, 3px 0 #ff2a5a, 0 0 28px rgba(255,60,90,.9); filter: none; animation: jitter-ur .08s steps(2) infinite; }
@keyframes jitter-ur { 50% { transform: translate(2px, -1px); } }
@keyframes jitter { 50% { transform: skewY(7deg) translate(2px, -1px); } }
.reveal { position: absolute; inset: 0; z-index: 3; display: grid; align-content: center; justify-items: center; gap: 24px; padding: 24px max(16px, env(safe-area-inset-left, 0px)); }
.rv-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 420px; perspective: 1000px; }
.rv { width: 108px; aspect-ratio: 3 / 4; position: relative; border: 0; padding: 0; background: none; animation: deal .5s backwards cubic-bezier(.2,.9,.3,1.2); }
@keyframes deal { from { transform: translateY(80px) rotate(-8deg) scale(.5); opacity: 0; } }
.rv.dealt { animation: none; } /* once dealt; otherwise removing an animated class replays the deal */
.rv.charging { animation: charge .12s linear infinite; }
@keyframes charge { 0% { transform: translate(-1px, 1px) scale(1.12); } 50% { transform: translate(1px, -1px) scale(1.12); } 100% { transform: translate(-1px, 0) scale(1.12); } }
.rv-flip { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2,.9,.25,1.15); }
.rv.open .rv-flip { transform: rotateY(180deg); }
.rv-face { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.rv-back { background: radial-gradient(circle at 50% 40%, #3b2a8f, #120f2c 70%); border: 2px solid rgba(255,255,255,.25); display: grid; place-items: center; font-weight: 900; font-size: 22px; color: rgba(255,226,154,.85); }
.rv-back::before { content: ""; position: absolute; inset: 8px; border-radius: 10px; border: 1px solid rgba(255,226,154,.35); }
.rv-back::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%); transform: translateX(-120%); animation: sheen 1.8s ease-in-out infinite; }
@keyframes sheen { 60%, 100% { transform: translateX(120%); } }
.rv.glow-SR .rv-back { box-shadow: 0 0 22px 2px rgba(255,79,94,.85); border-color: var(--sr); }
.rv.glow-SSR .rv-back { box-shadow: 0 0 30px 6px rgba(255,201,77,.95); border-color: #ffd15c; }
.rv.glow-UR .rv-back { box-shadow: 0 0 40px 10px rgba(183,107,255,.95), 0 0 70px 20px rgba(255,77,94,.5); border-color: #fff; }
.rv.glow-LR .rv-back { box-shadow: 0 0 40px 10px rgba(255,200,90,.95), 0 0 80px 24px rgba(120,80,10,.6); border-color: #ffe9a8; }
/* 保留変化: the frame of one face-down card climbs R -> SR (red) -> SSR (gold) -> UR (rainbow), a burst of light on each step */
.rv.lvup::after { content: ""; position: absolute; inset: 0; border-radius: 14px; pointer-events: none; z-index: 3; border: 6px solid var(--lc); box-shadow: 0 0 36px 12px var(--lc), inset 0 0 26px var(--lc); animation: lvring .8s ease-out forwards; }
.rv.lv1 { --lc: rgba(255,79,94,1); } .rv.lv2 { --lc: rgba(255,214,110,1); } .rv.lv3 { --lc: rgba(255,255,255,1); }
@keyframes lvring { 0% { transform: scale(1); opacity: 1; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes holdup { 0% { transform: scale(1.3); filter: brightness(2.4); } 100% { transform: scale(1); filter: none; } }
.rv.holding { animation: charge .1s linear infinite; }
/* while it climbs, its frame burns brighter than any other card */
.rv.holding.glow-SR .rv-back { border-width: 3px; box-shadow: 0 0 22px 6px rgba(255,79,94,1), 0 0 60px 18px rgba(255,79,94,.75); }
.rv.holding.glow-SSR .rv-back { border-width: 3px; box-shadow: 0 0 26px 8px rgba(255,214,110,1), 0 0 70px 22px rgba(255,190,80,.8); }
.rv.lvpop { animation: holdup .45s cubic-bezier(.2,1.6,.4,1); }
/* the rainbow frame once it reaches UR */
.rv.rainbow .rv-back { animation: rbFrame .9s linear infinite; }
@keyframes rbFrame { 0% { border-color: #ff4d5e; box-shadow: 0 0 36px 10px #ff4d5e; } 17% { border-color: #ffb648; box-shadow: 0 0 36px 10px #ffb648; } 33% { border-color: #fff36b; box-shadow: 0 0 36px 10px #fff36b; } 50% { border-color: #6effb4; box-shadow: 0 0 36px 10px #6effb4; } 67% { border-color: #5ec8ff; box-shadow: 0 0 36px 10px #5ec8ff; } 83% { border-color: #b76bff; box-shadow: 0 0 36px 10px #b76bff; } 100% { border-color: #ff4d5e; box-shadow: 0 0 36px 10px #ff4d5e; } }
.rv.open.r-LR { animation: glowSSR 1.4s ease-in-out .7s infinite; }
/* LR back: a tarot-like back — black lacquer in a gold frame, gold moons and dots, a mandala with 「ふる」; it bursts open before the card turns */
.rv { container-type: inline-size; }
.rv-back.seal { border: 0; color: transparent; --cs: 30cqw;
  background: var(--corner-tl) top left / var(--cs) var(--cs) no-repeat, var(--corner-tr) top right / var(--cs) var(--cs) no-repeat, var(--corner-bl) bottom left / var(--cs) var(--cs) no-repeat, var(--corner-br) bottom right / var(--cs) var(--cs) no-repeat,
    /* gold moons and stars scattered over the black, like a tarot back */
    radial-gradient(circle, #f0cf72 0 42%, transparent 46%) 22% 20% / 11cqw 11cqw no-repeat, radial-gradient(circle, #f0cf72 0 42%, transparent 46%) 78% 20% / 11cqw 11cqw no-repeat, radial-gradient(circle, #f0cf72 0 42%, transparent 46%) 22% 80% / 11cqw 11cqw no-repeat, radial-gradient(circle, #f0cf72 0 42%, transparent 46%) 78% 80% / 11cqw 11cqw no-repeat, radial-gradient(circle, #f0cf72 0 42%, transparent 46%) 50% 11% / 7cqw 7cqw no-repeat, radial-gradient(circle, #f0cf72 0 42%, transparent 46%) 50% 89% / 7cqw 7cqw no-repeat, radial-gradient(circle, #f0cf72 0 42%, transparent 46%) 12% 50% / 7cqw 7cqw no-repeat, radial-gradient(circle, #f0cf72 0 42%, transparent 46%) 88% 50% / 7cqw 7cqw no-repeat,
    radial-gradient(circle, rgba(240,207,114,.55) 0 .7cqw, transparent .9cqw) 4cqw 4cqw / 14cqw 14cqw,
    radial-gradient(circle at 50% 50%, #1c1916, #070606 60%, #000 85%); }
.rv-back.seal::before { inset: 6%; border: 1.5px solid rgba(226,182,78,.95); outline: 1px dotted rgba(240,207,114,.85); outline-offset: 3px; }
/* the center: a gold mandala (petal rings around a sun) with 「ふる」 in the middle */
.rv-back.seal .crest { position: relative; z-index: 2; width: 66%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; font-family: var(--jp); font-weight: 900; font-size: 13cqw; line-height: 1;
  background: radial-gradient(circle, #0a0908 0 30%, transparent 31%), radial-gradient(circle, transparent 0 32%, #f0cf72 32.5% 34%, transparent 34.5%),
    repeating-conic-gradient(from 0deg, #e2b64e 0 6deg, transparent 6deg 15deg), radial-gradient(circle, transparent 0 47%, #0a0908 47.5%),
    radial-gradient(circle, transparent 0 48%, #f0cf72 48.5% 50%, transparent 50.5%), repeating-conic-gradient(from 7.5deg, #b8902e 0 9deg, transparent 9deg 30deg); box-shadow: 0 0 14px rgba(255,215,130,.45); }
.rv-back.seal .crest::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, transparent 0 62%, #f0cf72 62.5% 64%, transparent 64.5% 68%, rgba(240,207,114,.7) 68.5% 69.5%, transparent 70%); }
.rv-back.seal .crest::after { content: "ふる"; position: relative; background: var(--lr-text); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 3px rgba(255,220,140,.6)); }
.rv.unseal .seal .crest { animation: crestBreak .55s ease-in forwards; }
.rv.unseal { animation: charge .1s linear infinite; }
@keyframes crestBreak { 40% { transform: scale(1.15); filter: brightness(1.8); } 100% { transform: scale(1.9); filter: brightness(3) blur(2px); opacity: 0; } }
/* LR effect: black & gold */
.fx.lr { background: #050300; }
/* LR cut-ins (秘宝開放 / 秘宝降臨): a lacquer band with gold rules and a silver line, gold-leaf letters, the English in Cinzel */
.cutin.lr, .cutin.dies { left: 0; right: 0; top: 24%; height: auto; padding: 18px 0 16px; transform: none; background: linear-gradient(90deg, transparent, rgba(13,6,6,.92) 12%, rgba(13,6,6,.92) 88%, transparent); border-block: 2px solid #d9a640; box-shadow: inset 0 -5px 0 -3px var(--silver), inset 0 5px 0 -3px var(--silver); }
.cutin.dies { top: 64%; }
.cutin.lr.go, .cutin.dies.go { animation: cutin-god 2.4s ease forwards; }
.cutin.lr span, .cutin.dies span { transform: none; font-family: var(--jp); font-weight: 900; font-size: 58px; letter-spacing: .14em; line-height: 1.15; white-space: nowrap; text-align: center; background: var(--lr-text); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 #000) drop-shadow(0 0 10px rgba(255,220,140,.7)) drop-shadow(0 0 2px rgba(255,255,255,.6)); animation: none; }
.cutin.lr span small, .cutin.dies span small { display: block; font-family: Cinzel, "Times New Roman", serif; font-weight: 800; font-size: 17px; letter-spacing: .5em; padding-left: .5em; margin-bottom: 2px; }
.rv-front { transform: rotateY(180deg); padding: 2px; background: var(--stroke); }
.rv-front.SR { background: var(--sr); } .rv-front.SSR { background: var(--gold); background-size: 200% 200%; animation: holo2 3s linear infinite; }
.rv-front.UR { background: var(--holo); background-size: 300% 300%; animation: holo2 3s linear infinite; }
.rv-front .in { position: absolute; inset: 2px; border-radius: 12px; overflow: hidden; background: #221d45; }
.rv-front img { width: 100%; height: 100%; object-fit: cover; }
.rv-front .rar { position: absolute; left: 6px; bottom: 6px; font-size: 12px; }
.rv.open.r-SR { animation: glowSR 2s ease-in-out .7s infinite; }
.rv.open.r-SSR { animation: glowSSR 1.6s ease-in-out .7s infinite; }
.rv.open.r-UR { animation: glowUR 2.4s linear .7s infinite; }
@keyframes glowSR { 0%, 100% { filter: drop-shadow(0 0 6px rgba(255,79,94,.6)); } 50% { filter: drop-shadow(0 0 14px rgba(255,79,94,.95)); } }
@keyframes glowSSR { 0%, 100% { filter: drop-shadow(0 0 8px rgba(255,201,77,.7)); } 50% { filter: drop-shadow(0 0 22px rgba(255,214,110,1)); } }
@keyframes glowUR { 0% { filter: drop-shadow(0 0 16px #ff4d5e); } 20% { filter: drop-shadow(0 0 16px #ffb648); } 40% { filter: drop-shadow(0 0 16px #fff36b); } 60% { filter: drop-shadow(0 0 16px #6effb4); } 80% { filter: drop-shadow(0 0 16px #5ec8ff); } 100% { filter: drop-shadow(0 0 16px #b76bff); } }
@keyframes spin { to { rotate: 360deg; } }
.rv-done { display: flex; gap: 10px; }
.rv-done button { min-width: 140px; }
#rv-all[disabled] { opacity: 1; cursor: default; } /* revive: can't be skipped, but should look the same */

.toast { position: fixed; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 50; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; padding: 9px 16px; border-radius: 999px; max-width: 90vw; text-align: center; }
.toast-act { margin-left: 12px; background: none; border: 0; padding: 0; color: var(--gold-1); font-size: 12px; font-weight: 900; text-decoration: underline; text-underline-offset: 3px; }
.foot { margin-top: 22px; display: grid; gap: 6px; justify-items: center; font-size: 11px; color: var(--ink-3); text-align: center; }
.foot .audio-credit { max-width: 34em; font-size: 10px; line-height: 1.6; }
.foot .data-date { font-size: 10px; }
/* waiting for the server to draw: the gacha buttons cannot be pressed twice */
.pulling .pull, .pulling .pull-x { opacity: .7; pointer-events: none; }
.foot-links .linkbtn { font-size: 11px; color: var(--ink-2); }
.doc ol, .doc ul { margin: 4px 0 0; padding-left: 1.4em; display: grid; gap: 3px; }
.doc .date { font-size: 11px; color: var(--ink-3); }
.foot .credit { border: 1px solid var(--stroke); border-radius: 6px; padding: 3px 10px; color: var(--ink-2); background: #fff; }
/* favorites */
.ph .fav { position: absolute; top: 8px; right: 8px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,.95); box-shadow: 0 2px 8px rgba(0,0,0,.3); display: grid; place-items: center; padding: 0; color: #8c88a6; z-index: 1; }
.ph .tags.with-fav { right: 58px; top: 16px; }
.fav svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fav[aria-pressed="true"] { color: var(--fav); }
.fav[aria-pressed="true"] svg { fill: currentColor; animation: favpop .35s cubic-bezier(.2,1.6,.4,1); }
@keyframes favpop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.tile .tfav { position: absolute; right: 5px; top: 5px; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: var(--fav); display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.tile .tfav svg { width: 14px; height: 14px; fill: currentColor; }
.favf { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; border: 1px solid var(--stroke); background: #fff; padding: 5px 12px; font-size: 12px; font-weight: 800; color: var(--ink-2); }
.favf svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.favf b { font-family: var(--latin); font-size: 11px; }
.favf[aria-pressed="true"] { color: var(--fav); border-color: var(--fav); background: #fff0f4; }
.favf[aria-pressed="true"] svg { fill: currentColor; }
/* on/off switch row */
.tg { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--glass); text-align: left; font-size: 13px; font-weight: 800; color: var(--ink); }
.tg small { display: block; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.tg i { flex: none; position: relative; width: 44px; height: 26px; border-radius: 99px; background: rgba(27,23,51,.18); transition: background .2s; }
.tg i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.tg[aria-pressed="true"] i { background: var(--ok); }
.tg[aria-pressed="true"] i::after { transform: translateX(18px); }
.clear-row { text-align: center; margin: -4px 0 12px; }
.side-logo { display: none; }

/* wider screens: everything above is the phone layout; these only add on top of it */
/* tablet: wider column, cards in a grid instead of a carousel, sheets become centered dialogs */
@media (min-width: 768px) {
  .app { max-width: 760px; padding-left: 24px; padding-right: 24px; }
  .top { margin-inline: -24px; padding-inline: 24px; }
  .portal { aspect-ratio: 16 / 9; }
  .carousel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; overflow: visible; scroll-snap-type: none; padding: 4px 0 10px; margin: 0; cursor: auto; }
  .car-nav, #res-dots { display: none; }
  .result-sum { margin-top: 4px; }
  .actions { width: 100%; max-width: 560px; margin-inline: auto; }
  .grid { grid-template-columns: repeat(5, 1fr); }
  .sheet .grid { grid-template-columns: repeat(4, 1fr); }
  .deck { grid-template-columns: repeat(3, 1fr); }
  .pc-wrap { width: 100%; max-width: 720px; margin-inline: auto; }
  #try { display: block; max-width: 480px; margin-inline: auto; }
  .sheet-bg { align-items: center; padding: 24px; }
  .sheet { max-width: 540px; max-height: 88vh; border-bottom: 1px solid var(--stroke); border-radius: 24px; padding: 14px 20px 20px; box-shadow: 0 24px 60px -20px rgba(20,16,40,.5); }
  .sheet-h { top: -14px; }
  .rv-cards { max-width: 640px; gap: 16px; }
  .rv { width: 124px; }
}

/* PC: the tab bar becomes a left sidebar, and screens split into two columns */
@media (min-width: 1080px) {
  body { padding-left: 220px; }
  .app { max-width: 1080px; padding-left: 32px; padding-right: 32px; padding-bottom: 48px; }
  .top { margin-inline: -32px; padding-inline: 32px; justify-content: flex-end; }
  .top .logo { display: none; }

  .tabs { top: 0; right: auto; width: 220px; padding: 20px 14px; border-top: 0; border-right: 1px solid var(--stroke); background: #fff; }
  .tabs-in { max-width: none; grid-template-columns: 1fr; gap: 4px; }
  .side-logo { display: flex; align-items: baseline; font-weight: 900; font-size: 24px; letter-spacing: -.01em; padding: 0 12px 18px; }
  .side-logo b { font-family: var(--latin); font-weight: 900; font-size: 22px; margin-left: 1px; background: linear-gradient(180deg, #ffb340, #e2700c); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .tabs button { grid-auto-flow: column; justify-content: start; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px; font-size: 14px; color: var(--ink-2); text-align: left; }
  .tabs button:hover { background: var(--glass-2); }
  .tabs button[aria-current="page"] { background: #fff3d1; color: var(--accent); }
  .tabs svg { width: 22px; height: 22px; }
  .tabs .n { position: static; font-size: 10px; padding: 1px 7px; }

  .actions { bottom: 16px; }
  .toast { left: calc(50% + 110px); bottom: 96px; }

  /* gacha: the hero visual on the left, budget and options on the right */
  #s-gacha { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); grid-template-rows: auto auto auto auto auto 1fr; column-gap: 28px; align-items: start; }
  #s-gacha > * { grid-column: 2; }
  #s-gacha > .lead { grid-column: 1 / -1; }
  #s-gacha > .portal { grid-column: 1; grid-row: 2 / 7; aspect-ratio: 1 / .82; margin: 0; }
  #s-gacha > .pull { margin-top: 14px; }
  .pull-mini { left: 220px; bottom: 16px; }

  .carousel { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

  /* box: the area picker stays beside the item grid */
  #box-panel { display: grid; grid-template-columns: 340px minmax(0, 1fr); column-gap: 24px; align-items: start; }
  #box-panel > * { grid-column: 2; }
  #box-panel > .area { grid-column: 1; grid-row: 1 / span 4; position: sticky; top: 72px; margin: 0; }
  #box-panel .grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }

  /* party: summary on the left, the members on the right */
  #s-party { display: grid; grid-template-columns: 360px minmax(0, 1fr); column-gap: 24px; align-items: start; }
  #s-party > * { grid-column: 2; }
  #s-party > .ptop { grid-column: 1 / -1; }
  #s-party > .phead { grid-column: 1; grid-row: 2 / span 3; position: sticky; top: 72px; margin: 0; }
  .deck { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

  #rank-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
  #rank-list .rk { margin-bottom: 0; }

  .rv-cards { max-width: 760px; gap: 18px; }
  .rv { width: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* データの引き継ぎ（書き出し・読み込み） */
.h2-link { margin-left: auto; font-size: 12px; font-weight: 700; }
.transfer textarea { width: 100%; margin: 6px 0 8px; padding: 8px 10px; border: 1px solid var(--stroke); border-radius: 10px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.5; color: var(--ink); background: #fff; resize: vertical; word-break: break-all; }
.transfer .btn { width: 100%; }

/* パーティの「予算の上限を決める」スイッチと、予算から年収が推測されることの注意 */
.tg.tg-party { margin: 4px 0 0; }
.hint.warn { color: #9a4b00; background: #fff6e5; border: 1px solid #f3d29a; border-radius: 10px; padding: 8px 10px; line-height: 1.6; }

/* 商品の詳細の横スライド（前後の返礼品へ） */
.sw-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; padding: 0 0 3px; border: 0; border-radius: 50%; background: rgba(12,10,30,.45); color: #fff; font-size: 26px; line-height: 1; display: grid; place-items: center; }
.sw-arrow.prev { left: 8px; } .sw-arrow.next { right: 8px; }
.icard.slide-next { animation: slide-next .22s ease-out; } .icard.slide-prev { animation: slide-prev .22s ease-out; }
@keyframes slide-next { from { transform: translateX(28px); opacity: .3; } }
@keyframes slide-prev { from { transform: translateX(-28px); opacity: .3; } }

/* シートの中のスクロールが端まで行っても、後ろの画面に伝えない */
.sheet, .sheet-bg { overscroll-behavior: contain; }
html.sheet-open { overflow: hidden; } /* on html only, so the sticky header keeps its place */
/* ranking screen: links to the analysis articles (/list/popular/ and /list/) */
.rank-reads { display: grid; gap: 6px; margin: 0 0 12px; }
.rank-reads a { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 14px; background: #fff; border: 1px solid var(--stroke); font-size: 13px; font-weight: 800; text-decoration: none; }
.rank-reads a::after { content: "›"; color: var(--ink-3); font-size: 18px; line-height: 1; }
.logo, .side-logo { text-decoration: none; color: inherit; }
