/* 夜の藍色の舞台に、和紙の図鑑ページと朱の判子。敵は墨でできた「字ばけ」 */
:root {
  --ai: #18213b;        /* 藍：ゲームの夜空 */
  --ai-2: #222d4f;      /* 一段うえの面 */
  --ai-3: #2e3b66;      /* ボタンなど */
  --line: #3a4878;
  --fog: #a3aed0;       /* 藍の上の弱い文字 */
  --washi: #f3f0e7;     /* 和紙：図鑑・札 */
  --washi-2: #e6e1d3;
  --sumi: #1d1f27;      /* 墨：和紙の上の文字 */
  --sumi-soft: #5b5e6b;
  --shu: #e0482c;       /* 朱：判子・ダメージ */
  --hisui: #34c3a3;     /* 翡翠：ジェム */
  --kin: #f0bd3e;       /* 金：レア・レベル */
  --gin: #c9d0de;
  --ao: #4f8be8;
  --good: #57c97a;
  --bad: #ff6b5a;
  --font-display: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  --font-num: "Dela Gothic One", "Hiragino Sans", "Yu Gothic", sans-serif;
  --font-kanji: "Klee One", "UD デジタル 教科書体 N-R", "YuKyokasho", "Hiragino Mincho ProN", serif;
  --font-ui: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  color-scheme: dark;
}
html, body { height: 100%; }
body {
  background: var(--ai);
  background-image: radial-gradient(circle at 20% 0%, #26335c 0, transparent 45%), radial-gradient(circle at 90% 100%, #1f2a4c 0, transparent 50%);
  color: #eef1fa;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--kin); outline-offset: 2px; }
.wrap {
  max-width: 1040px; 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: 14px 40px;
  display: flex; flex-direction: column; gap: 14px;
}

/* ---------- ヘッダー ---------- */
.top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.logo { font-family: var(--font-display); font-weight: 900; font-size: 24px; letter-spacing: .02em; line-height: 1.2; margin: 0; text-wrap: balance; }
.logo small { display: block; font-family: var(--font-ui); font-size: 11px; color: var(--fog); letter-spacing: .1em; font-weight: 700; }
.status { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--ai-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 4px 12px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chip .lbl { font-size: 11px; color: var(--fog); letter-spacing: .06em; }
.chip.rank { border-color: var(--kin); color: var(--kin); }
.xpbar { width: 70px; height: 6px; background: #0f1630; border-radius: 3px; overflow: hidden; }
.xpbar i { display: block; height: 100%; background: var(--kin); }
.gem { width: 14px; height: 14px; display: inline-block; background: linear-gradient(135deg, #8ff0d9, var(--hisui) 55%, #1d8a72); clip-path: polygon(50% 0, 100% 38%, 80% 100%, 20% 100%, 0 38%); flex: none; }
.who { background: none; border: 1px dashed var(--line); }

/* ---------- ナビ ---------- */
nav.tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
nav.tabs button {
  position: relative; background: var(--ai-2); border: 2px solid var(--line); border-radius: 14px;
  padding: 10px 6px 8px; font-weight: 900; font-size: 15px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: transform .12s, background .12s;
}
nav.tabs button .k { font-family: var(--font-kanji); font-size: 26px; line-height: 1; color: var(--fog); }
nav.tabs button:hover { transform: translateY(-2px); }
nav.tabs button[aria-selected="true"] { background: var(--washi); color: var(--sumi); border-color: var(--washi); }
nav.tabs button[aria-selected="true"] .k { color: var(--shu); }
.badge { position: absolute; top: -6px; right: -4px; background: var(--shu); color: #fff; font-size: 12px; min-width: 22px; height: 22px; border-radius: 11px; display: grid; place-items: center; padding: 0 6px; font-family: var(--font-num); }

section.screen { display: flex; flex-direction: column; gap: 14px; }
.panel { background: var(--ai-2); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.paper { background: var(--washi); color: var(--sumi); border-radius: 18px; padding: 18px; }
h2 { font-family: var(--font-display); font-size: 21px; margin: 0; font-weight: 900; text-wrap: balance; }
h3 { margin: 0; font-size: 15px; font-weight: 900; }
.muted { color: var(--fog); font-size: 13px; }
.paper .muted { color: var(--sumi-soft); }

.btn {
  background: var(--ai-3); border: 2px solid var(--line); border-radius: 12px; padding: 8px 14px; font-weight: 900;
  transition: transform .1s, filter .1s;
}
.btn:hover:not(:disabled) { filter: brightness(1.15); transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.main { background: var(--shu); border-color: var(--shu); color: #fff; font-size: 17px; padding: 10px 22px; }
.btn.gemb { background: var(--hisui); border-color: var(--hisui); color: #06261f; }
.btn.ghost { background: transparent; }
.paper .btn { background: var(--washi-2); border-color: #cfc8b6; color: var(--sumi); }
.paper .btn.main { background: var(--shu); border-color: var(--shu); color: #fff; }

.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg button { background: transparent; border: 2px solid var(--line); border-radius: 10px; padding: 5px 12px; font-weight: 700; color: var(--fog); }
.seg button[aria-pressed="true"] { background: var(--washi); color: var(--sumi); border-color: var(--washi); }

/* ---------- たたかう ---------- */
.setup { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; }
.setup > .lab { font-size: 12px; color: var(--fog); font-weight: 900; letter-spacing: .08em; }
.stagepick { display: flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.stagepick b { font-family: var(--font-num); font-size: 20px; min-width: 2ch; text-align: center; font-weight: 400; }
.stagedots { display: flex; gap: 4px; }
.stagedots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); }
.stagedots i.on { background: var(--kin); border-color: var(--kin); }
.stagedots i.boss { border-radius: 3px; transform: rotate(45deg) scale(.85); }

.arena {
  position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(180deg, #1c2747 0%, #222f57 62%, #2a2a3f 62%, #232334 100%);
  min-height: 360px; display: grid; grid-template-rows: auto 1fr auto; padding: 14px;
}
.arena::after { /* 地面の線 */
  content: ""; position: absolute; left: 0; right: 0; top: 62%; height: 2px; background: rgba(255,255,255,.06);
}
.foe-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; position: relative; z-index: 2; flex-wrap: wrap; }
.foe-name { font-weight: 900; }
.foe-name .bossmark { color: var(--kin); font-family: var(--font-num); font-weight: 400; margin-right: 6px; }
.bars { display: flex; flex-direction: column; gap: 6px; min-width: 200px; flex: 1; max-width: 360px; }
.bar { position: relative; height: 14px; background: #0d1329; border-radius: 7px; overflow: hidden; border: 1px solid #0a0f22; }
.bar i { display: block; height: 100%; transition: width .25s; }
.bar.hp i { background: linear-gradient(90deg, var(--good), #9be37a); }
.bar.ehp i { background: linear-gradient(90deg, var(--shu), #ff8a5c); }
.bar.gauge i { background: linear-gradient(90deg, #6b5ad8, #b07cff); transition: none; }
.bar span { position: absolute; inset: 0; font-size: 10px; line-height: 14px; text-align: center; font-weight: 900; color: #fff; text-shadow: 0 1px 2px #000; font-variant-numeric: tabular-nums; }
.bar-row { display: grid; grid-template-columns: 56px 1fr; gap: 6px; align-items: center; font-size: 11px; color: var(--fog); font-weight: 700; }

.stage-mid { position: relative; display: grid; place-items: center; z-index: 1; padding-block: 8px; }
.jibake {
  --body: #2b2f45;
  position: relative; width: 230px; height: 230px; display: grid; place-items: center;
  animation: bob 2.4s ease-in-out infinite;
}
.jibake .blob {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 35% 28%, color-mix(in srgb, var(--body) 70%, #fff) 0, var(--body) 45%, color-mix(in srgb, var(--body) 70%, #000) 100%);
  border-radius: 48% 52% 44% 56% / 58% 46% 54% 42%;
  animation: morph 5s ease-in-out infinite;
  box-shadow: 0 18px 30px rgba(0,0,0,.35);
}
.jibake.boss .blob { box-shadow: 0 0 0 4px var(--kin), 0 0 40px rgba(240,189,62,.45), 0 18px 30px rgba(0,0,0,.35); }
.jibake .eyes { position: absolute; top: 15%; left: 0; right: 0; display: flex; justify-content: center; gap: 46px; z-index: 2; }
.jibake .eyes i { width: 26px; height: 32px; background: #fff; border-radius: 50%; position: relative; animation: blink 4s infinite; }
.jibake .eyes i::after { content: ""; position: absolute; width: 11px; height: 13px; background: #111; border-radius: 50%; left: 8px; top: 12px; }
.ofuda {
  position: relative; z-index: 2; margin-top: 46px;
  background: var(--washi); color: var(--sumi); border-radius: 4px;
  padding: 10px 12px; box-shadow: 0 3px 0 #c9c2ad;
  writing-mode: vertical-rl; font-family: var(--font-kanji); font-weight: 600; line-height: 1.05;
  border-top: 8px solid var(--shu);
}
.ofuda.n1 { font-size: 84px; padding: 8px 14px; }
.ofuda.n2 { font-size: 60px; }
.ofuda.n4 { font-size: 40px; }
.jibake.hit { animation: hit .35s; }
.jibake.hit .blob { filter: brightness(1.8); }
.jibake.gone { animation: gone .7s forwards; }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes morph { 50% { border-radius: 55% 45% 52% 48% / 46% 56% 44% 54%; } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes hit { 20% { transform: translateX(-10px) rotate(-4deg); } 50% { transform: translateX(8px) rotate(3deg); } }
@keyframes gone { to { transform: scale(1.3) translateY(-20px); opacity: 0; filter: blur(8px); } }
.dmg {
  position: absolute; z-index: 5; font-family: var(--font-num); font-size: 40px; color: var(--kin);
  -webkit-text-stroke: 2px #2a1a00; pointer-events: none; animation: floatup 1s forwards; font-variant-numeric: tabular-nums;
}
.dmg.small { font-size: 22px; color: #fff; }
.dmg.hurt { color: var(--bad); }
@keyframes floatup { from { transform: translateY(0) scale(.6); opacity: 0; } 15% { transform: translateY(-10px) scale(1.15); opacity: 1; } to { transform: translateY(-70px) scale(1); opacity: 0; } }
.arena.ouch { animation: ouch .4s; }
@keyframes ouch { 0%, 100% { box-shadow: inset 0 0 0 0 transparent; } 30% { box-shadow: inset 0 0 0 6px var(--bad), inset 0 0 80px rgba(255,80,60,.5); transform: translateX(-4px); } 60% { transform: translateX(4px); } }

.hint { min-height: 22px; text-align: center; font-weight: 900; color: var(--kin); position: relative; z-index: 2; }
.hint .yomi { display: inline-block; margin: 0 4px; padding: 0 8px; border-radius: 6px; background: rgba(255,255,255,.08); }
.hint .yomi.used { background: var(--good); color: #062; }

.attack { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 8px; }
.ans-row { display: flex; gap: 8px; }
.ans-row input {
  flex: 1; min-width: 0; font: inherit; font-size: 22px; font-weight: 700; padding: 10px 14px; border-radius: 12px;
  border: 3px solid var(--washi-2); background: var(--washi); color: var(--sumi);
}
.ans-row input.ng { border-color: var(--bad); animation: hit .3s; }
.preview { font-size: 13px; color: var(--fog); min-height: 20px; }
.preview b { color: #fff; font-size: 16px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.skill { position: relative; overflow: hidden; }
.skill .cd { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--kin); }
.combo { font-family: var(--font-num); color: var(--kin); font-size: 14px; margin-left: auto; align-self: center; }

.overlay { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(12,17,36,.72); padding: 14px; }
.result { width: min(440px, 100%); position: relative; display: flex; flex-direction: column; gap: 10px; }
.result .big { display: flex; gap: 14px; align-items: center; }
.result .card-kanji { font-family: var(--font-kanji); font-weight: 600; font-size: 60px; line-height: 1; background: #fff; border: 2px solid var(--washi-2); border-radius: 12px; padding: 10px 14px; flex: none; }
.result .card-kanji.n4 { font-size: 34px; }
.result .card-kanji.n2 { font-size: 46px; }
.yomis { display: flex; flex-wrap: wrap; gap: 6px; }
.yomis span { background: var(--washi-2); border-radius: 6px; padding: 1px 8px; font-weight: 700; }
.yomis span.used { background: var(--good); color: #fff; }
.rewards { display: flex; flex-wrap: wrap; gap: 8px 16px; font-weight: 900; font-variant-numeric: tabular-nums; }
.seal {
  position: absolute; right: 8px; top: 8px; width: 82px; height: 82px; border: 4px solid var(--shu); color: var(--shu);
  border-radius: 10px; display: grid; place-items: center; font-family: var(--font-kanji); font-size: 26px; font-weight: 600; line-height: 1;
  transform: rotate(-12deg); animation: stamp .45s cubic-bezier(.3,1.6,.5,1) both .15s; background: rgba(224,72,44,.06);
  writing-mode: vertical-rl;
}
@keyframes stamp { from { transform: rotate(-12deg) scale(2.4); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: .92; } }

.idle { display: grid; place-items: center; text-align: center; gap: 10px; padding: 10px; position: relative; z-index: 2; }
.idle .jibake { transform: scale(.7); animation: none; margin: -30px 0; }

/* ---------- 図鑑 ---------- */
.zk-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: center; }
.meter { display: flex; align-items: center; gap: 10px; font-weight: 900; font-variant-numeric: tabular-nums; }
.meter .bar { width: 160px; background: var(--washi-2); border-color: #d6cfbd; }
.meter .bar i { background: var(--shu); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.grid.yoji { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cell {
  position: relative; aspect-ratio: 1; max-width: 100%; border: 1.5px solid #d8d1bf; background: #fbf9f3; border-radius: 8px;
  display: grid; place-items: center; font-family: var(--font-kanji); font-weight: 600; font-size: 30px; color: var(--sumi); padding: 0;
}
.grid.wide .cell, .grid.yoji .cell { aspect-ratio: auto; padding: 10px 4px; font-size: 26px; }
.grid.yoji .cell { font-size: 24px; }
.cell.no { color: #c9c2b0; font-family: var(--font-display); font-size: 18px; background: repeating-linear-gradient(45deg, #f1ede2 0 6px, #ece7da 6px 12px); }
.cell.yes::after { content: ""; position: absolute; right: 4px; bottom: 4px; width: 9px; height: 9px; border-radius: 2px; background: var(--shu); transform: rotate(-12deg); }
.cell.sel { outline: 3px solid var(--shu); outline-offset: 1px; }
.detail { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; border-top: 2px dashed #d8d1bf; padding-top: 14px; }
.detail .card-kanji { font-family: var(--font-kanji); font-weight: 600; font-size: 72px; line-height: 1; background: #fff; border: 2px solid var(--washi-2); border-radius: 12px; padding: 10px 16px; writing-mode: vertical-rl; }
.detail dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; }
.detail dt { font-size: 12px; color: var(--sumi-soft); font-weight: 900; padding-top: 2px; }
.detail dd { margin: 0; font-weight: 700; }

/* ---------- ふくびき ---------- */
.fuku { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.garagara-wrap { display: grid; place-items: center; gap: 14px; padding: 10px; }
.garagara { position: relative; width: 200px; height: 190px; }
.garagara .drum {
  position: absolute; left: 20px; top: 0; width: 160px; height: 160px;
  background: conic-gradient(from 0deg, #a8342a 0 60deg, #c9472f 60deg 120deg, #a8342a 120deg 180deg, #c9472f 180deg 240deg, #a8342a 240deg 300deg, #c9472f 300deg 360deg);
  clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%);
}
.garagara .drum::after { content: "福"; position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-kanji); font-size: 54px; color: var(--kin); font-weight: 600; }
.garagara.spin .drum { animation: spin .5s linear 3; }
.garagara .stand { position: absolute; left: 55px; bottom: 0; width: 90px; height: 40px; background: #6b4a2b; clip-path: polygon(20% 0, 80% 0, 100% 100%, 0 100%); }
.garagara .tray { position: absolute; left: 112px; bottom: 6px; width: 70px; height: 16px; background: #8a6338; border-radius: 0 0 10px 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.ball { width: 26px; height: 26px; border-radius: 50%; display: inline-block; box-shadow: inset -4px -4px 0 rgba(0,0,0,.18), inset 3px 3px 0 rgba(255,255,255,.5); flex: none; }
.ball.r-1 { background: #f4f4f4; }
.ball.r0 { background: var(--ao); }
.ball.r1 { background: var(--shu); }
.ball.r2 { background: var(--gin); }
.ball.r3 { background: var(--kin); box-shadow: inset -4px -4px 0 rgba(0,0,0,.18), inset 3px 3px 0 rgba(255,255,255,.6), 0 0 14px var(--kin); }
.pulls { display: flex; flex-direction: column; gap: 6px; }
.pull-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; background: #fff; animation: pop .35s both; }
.pull-row .nm { font-weight: 900; }
.pull-row .st { font-size: 12px; color: var(--sumi-soft); }
.pull-row .new { margin-left: auto; font-size: 11px; font-weight: 900; color: var(--shu); }
@keyframes pop { from { transform: scale(.8); opacity: 0; } }
.rate { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: center; font-size: 13px; }

/* ---------- じゅんび ---------- */
.prep-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bigpick { padding: 16px; border-radius: 16px; font-weight: 900; font-size: 17px; display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--ai-2); border: 3px solid var(--line); }
.bigpick .k { font-family: var(--font-kanji); font-size: 44px; line-height: 1; }
.bigpick[aria-pressed="true"] { border-color: var(--kin); background: var(--ai-3); }
.statline { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { background: var(--ai-3); border-radius: 12px; padding: 6px 14px; display: flex; flex-direction: column; min-width: 80px; }
.stat .lbl { font-size: 11px; color: var(--fog); font-weight: 900; letter-spacing: .08em; }
.stat b { font-family: var(--font-num); font-size: 22px; font-weight: 400; font-variant-numeric: tabular-nums; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.slot { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 12px; background: var(--ai-3); border: 2px solid var(--line); text-align: left; min-width: 0; }
.slot[aria-pressed="true"] { border-color: var(--kin); }
.slot .lbl { font-size: 11px; color: var(--fog); font-weight: 900; }
.slot .nm { font-weight: 900; overflow-wrap: anywhere; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.item { display: flex; gap: 10px; align-items: center; text-align: left; padding: 10px; border-radius: 12px; background: var(--ai-3); border: 2px solid var(--line); min-width: 0; }
.item.on { border-color: var(--kin); background: #3a3a55; }
.item.locked { opacity: .5; }
.item .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-kanji); font-size: 22px; font-weight: 600; flex: none; background: var(--washi); color: var(--sumi); }
.item .tx { min-width: 0; display: flex; flex-direction: column; }
.item .nm { font-weight: 900; overflow-wrap: anywhere; }
.item .st { font-size: 12px; color: var(--fog); }
.rar { font-family: var(--font-num); font-size: 11px; padding: 0 6px; border-radius: 5px; font-weight: 400; }
.rar.r0 { background: var(--ao); color: #fff; }
.rar.r1 { background: var(--shu); color: #fff; }
.rar.r2 { background: var(--gin); color: #222; }
.rar.r3 { background: var(--kin); color: #2a1a00; }
.danger { border: 2px dashed var(--shu); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }

/* ---------- ミッション ---------- */
.missions { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.mission { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--ai-2); border: 1px solid var(--line); }
.mission.ready { border: 2px solid var(--kin); }
.mission.done { opacity: .55; }
.mission .t { font-weight: 900; }
.mission .bar { grid-column: 1 / -1; height: 8px; }
.mission .bar i { background: var(--hisui); }
.mission .pr { font-size: 12px; color: var(--fog); font-variant-numeric: tabular-nums; }

/* ---------- ツールチップ・トースト・モーダル ---------- */
#tip {
  position: fixed; z-index: 50; max-width: 260px; pointer-events: none;
  background: var(--washi); color: var(--sumi); border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); border-left: 5px solid var(--shu);
}
#toasts { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top, 0px)); display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(420px, calc(100% - 32px)); }
.toast { background: var(--kin); color: #2a1a00; font-weight: 900; padding: 8px 16px; border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.35); animation: pop .3s; text-align: center; }
.toast.g { background: var(--hisui); color: #06261f; }
.toast.r { background: var(--shu); color: #fff; }
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(10,14,30,.8); display: grid; place-items: center; padding: 16px; }
.modal .paper { width: min(460px, 100%); display: flex; flex-direction: column; gap: 12px; }
.namein { font: inherit; font-size: 20px; font-weight: 700; padding: 10px 12px; border-radius: 10px; border: 2px solid #cfc8b6; background: #fff; color: var(--sumi); width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

@media (max-width: 720px) {
  .fuku { grid-template-columns: 1fr; }
  .slots { grid-template-columns: 1fr; }
  nav.tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  nav.tabs button { font-size: 11px; padding: 8px 2px 6px; border-radius: 10px; }
  nav.tabs button .k { font-size: 20px; }
  .jibake { width: 190px; height: 190px; }
  .ofuda.n1 { font-size: 70px; }
  .detail { grid-template-columns: 1fr; }
  .setup { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
