/* ランタン夜行 — 漆と和紙の面、絵馬の札、筆の縦書き。動きはなめらかな減速 */
:root {
  --sumi: #0b0a0d;
  --night: #15131c;
  --lacquer: #221815;
  --lacquer-2: #2e201b;
  --paper: #f1e5ca;
  --paper-dim: #c9bda4;
  --chochin: #f29a3a;
  --shu: #d9481f;
  --shu-deep: #b3361a;
  --kin: #d6b25e;
  --ai: #2b3a5a;
  --tama: #bfe8ff;
  --wood: #5a3d26;
  --r: 16px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --serif: 'Shippori Mincho B1', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --brush: 'Yuji Syuku', 'Shippori Mincho B1', serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --washi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .9 0 0 0 0 .75 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html, body { height: 100%; overflow: hidden; background: var(--sumi); }
body {
  font-family: var(--serif); font-weight: 500; color: var(--paper); font-size: 16px; line-height: 1.7;
  line-break: strict; -webkit-tap-highlight-color: transparent; overscroll-behavior: none;
  user-select: none; -webkit-user-select: none;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; height: 22px; flex: none; }
.num { font-family: var(--serif); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
h1, h2, h3 { font-weight: 400; font-feature-settings: "palt"; word-break: keep-all; }
p { word-break: normal; }

@media (min-width: 600px) {
  body { background: var(--sumi) url('/app-development/apps/a021/img/title.webp') center / cover no-repeat; }
  body::before { content: ''; position: fixed; inset: 0; background: rgba(11, 10, 13, .86); }
}
.app { position: fixed; inset: 0; max-width: 430px; margin: 0 auto; overflow: hidden; background: var(--sumi); height: 100dvh; }
@media (min-width: 600px) { .app { box-shadow: 0 0 0 1px rgba(214, 178, 94, .35), 0 30px 80px rgba(0, 0, 0, .6); } }

/* ---------- ボタン */
.btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 10px 18px; border-radius: 14px; font-size: 16px; font-weight: 700; line-height: 1.3;
  word-break: keep-all; text-align: center; transition: transform 160ms var(--ease), background-color 200ms var(--ease);
  touch-action: manipulation; overflow: hidden;
}
.btn:active { transform: scale(.96); }
.btn:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--kin); outline-offset: 3px; }
.btn--primary {
  color: #1c0d05; background: linear-gradient(180deg, #f6ae55, #e58a2c); background-color: #ec9a40;
  box-shadow: inset 0 1px 0 rgba(255, 235, 200, .7), inset 0 -3px 0 rgba(120, 40, 10, .35), 0 10px 26px rgba(242, 154, 58, .28);
}
.btn--primary::before { /* 提灯の骨 */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 11px, rgba(120, 50, 10, .12) 11px 12px);
}
.btn--ghost { background: rgba(21, 19, 28, 1); color: var(--paper); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .45); }
.btn--danger { background: #4a130b; color: #ffe1d6; box-shadow: inset 0 0 0 1px var(--shu); }
.btn--xl { width: 100%; min-height: 58px; font-size: 19px; border-radius: 16px; }
.btn--xl svg { width: 26px; height: 26px; }
.btn--sq { width: 58px; min-height: 58px; padding: 0; flex: none; }
.icon-btn {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(21, 19, 28, 1); color: var(--paper); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .4);
  transition: transform 160ms var(--ease);
}
.icon-btn:active { transform: scale(.9); }

/* ---------- 画面切替：墨がにじむように */
.screen { position: absolute; inset: 0; display: none; flex-direction: column; overflow: hidden; background: var(--sumi); }
.screen.is-active { display: flex; }
.screen.is-enter { animation: ink 420ms var(--ease) both; }
@keyframes ink { from { opacity: 0; filter: blur(6px); transform: scale(1.02); } to { opacity: 1; filter: none; transform: none; } }

.nav { position: relative; z-index: 2; flex: none; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--sat)) 16px 12px; background: var(--sumi); border-bottom: 1px solid rgba(214, 178, 94, .25); }
.nav__title { font-family: var(--brush); font-size: 24px; line-height: 1.3; }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 20px 18px calc(30px + var(--sab)); background: var(--sumi); }

/* ---------- スプラッシュ */
.splash { position: absolute; inset: 0; z-index: 60; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--sumi); transition: opacity 400ms var(--ease); }
.splash img { border-radius: 24px; box-shadow: 0 0 60px rgba(242, 154, 58, .35); }
.splash__name { font-family: var(--brush); font-size: 30px; letter-spacing: .2em; }
.splash.is-out { opacity: 0; }

/* ---------- タイトル */
.screen--title { background: var(--sumi) url('/app-development/apps/a021/img/title.webp') center 70% / cover no-repeat; }
.screen--title::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 10, 13, .3), transparent 30%, transparent 55%, rgba(11, 10, 13, .9) 82%); pointer-events: none; }
.title__top { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: calc(14px + var(--sat)) 16px 0; }
.best { display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 10px; border-radius: 999px; background: rgba(11, 10, 13, 1); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .4); font-size: 14px; }
.best svg { width: 18px; height: 18px; color: var(--chochin); }
.title__logo { position: absolute; z-index: 1; top: calc(78px + var(--sat)); right: 18px; display: flex; flex-direction: row-reverse; gap: 14px; align-items: flex-start; }
.logo { writing-mode: vertical-rl; font-family: var(--brush); color: var(--paper); line-height: 1; display: flex; gap: 6px; }
.logo span { display: block; white-space: nowrap; font-size: 62px; letter-spacing: .04em; text-shadow: 0 0 18px rgba(11, 10, 13, 1), 0 2px 0 rgba(11, 10, 13, 1), 0 0 40px rgba(242, 154, 58, .35); }
.logo__b { color: var(--chochin); margin-top: 1.1em; }
.title__lead { writing-mode: vertical-rl; display: flex; gap: 4px; margin-top: 8px; }
.title__lead span { display: block; white-space: nowrap; font-size: 17px; letter-spacing: .18em; padding: 10px 4px; background: rgba(11, 10, 13, 1); border-radius: 4px; }
.title__lead span:last-child { margin-top: 2.2em; }
.title__menu { position: relative; z-index: 1; margin-top: auto; padding: 0 20px calc(22px + var(--sab)); display: flex; flex-direction: column; gap: 14px; }
.title__sub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.title__sub .btn { flex-direction: column; gap: 4px; min-height: 66px; font-size: 14px; padding: 8px 4px; }

/* ---------- プレイ */
.screen--play { background: var(--sumi); }
.field { position: absolute; inset: 0; touch-action: none; overflow: hidden; }
.field__cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.vignette { position: absolute; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 90px 30px rgba(217, 72, 31, .55); transition: opacity 260ms var(--ease); }
.vignette.is-on { opacity: 1; transition: none; }
.stick {
  --s: 124px; position: absolute; z-index: 2; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2);
  border-radius: 50%; pointer-events: none; opacity: .5; transition: opacity 200ms var(--ease);
  background: radial-gradient(circle, rgba(241, 229, 202, .06) 0 55%, rgba(241, 229, 202, .12) 56% 100%);
  box-shadow: inset 0 0 0 1.5px rgba(214, 178, 94, .6);
}
.stick.is-on { opacity: 1; transition: none; }
.stick__knob { position: absolute; left: 50%; top: 50%; width: 46%; height: 46%; margin: -23% 0 0 -23%; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffd79a, #f29a3a 55%, #b8561a); box-shadow: 0 0 22px rgba(242, 154, 58, .55); }

.hud { position: relative; z-index: 3; padding: calc(8px + var(--sat)) 12px 0; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud__row { display: flex; align-items: center; gap: 10px; }
.clock { position: relative; width: 52px; height: 52px; flex: none; border-radius: 50%; background: rgba(11, 10, 13, 1); }
.clock__ring { width: 52px; height: 52px; transform: rotate(-90deg); }
.clock__ring circle { fill: none; stroke: rgba(214, 178, 94, .22); stroke-width: 3; }
.clock__ring .clock__fill { stroke: var(--chochin); stroke-linecap: round; transition: stroke-dasharray 300ms linear; }
.clock__kanji { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--brush); font-weight: 400; font-size: 22px; color: var(--paper); }
.hud__time { padding: 4px 12px 5px; border-radius: 12px; background: rgba(11, 10, 13, 1); line-height: 1.3; }
.hud__watch { font-family: var(--brush); font-size: 15px; color: var(--kin); }
.hud__left { display: flex; gap: 6px; align-items: baseline; font-size: 12px; color: var(--paper-dim); white-space: nowrap; }
.hud__left b { font-size: 19px; color: var(--paper); }
.kills { margin-left: auto; display: flex; align-items: baseline; gap: 4px; padding: 6px 12px; border-radius: 12px; background: rgba(11, 10, 13, 1); font-size: 13px; color: var(--paper-dim); }
.kills svg { width: 16px; height: 16px; align-self: center; color: var(--shu); }
.kills b { font-size: 19px; color: var(--paper); }
.hud__bars { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 6px 10px; border-radius: 12px; background: rgba(11, 10, 13, 1); }
.lv, .hp { display: flex; align-items: baseline; gap: 3px; font-size: 12px; color: var(--paper-dim); }
.lv b { font-size: 17px; color: var(--kin); }
.hp b { font-size: 15px; color: var(--chochin); min-width: 2.2em; text-align: right; }
.bars { flex: 1; display: grid; gap: 4px; }
.bar { display: block; height: 6px; border-radius: 3px; background: rgba(241, 229, 202, .12); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 180ms var(--ease); }
.bar--exp i { background: linear-gradient(90deg, #8fd0ff, var(--tama)); }
.bar--hp i { background: linear-gradient(90deg, var(--shu), var(--chochin)); }
.build { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.build li { position: relative; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: rgba(11, 10, 13, 1); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .35); color: var(--paper); }
.build li.is-charm { border-radius: 50%; }
.build svg { width: 20px; height: 20px; }
.build b { position: absolute; right: -3px; bottom: -4px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 8px; background: var(--kin); color: #1c140a; font-size: 11px; line-height: 15px; text-align: center; font-weight: 800; }

.watch-banner { position: absolute; z-index: 4; top: 26%; left: 50%; transform: translateX(-50%); pointer-events: none; animation: wb 2.6s var(--ease) both; }
.watch-banner span { display: block; writing-mode: vertical-rl; font-family: var(--brush); font-size: 54px; letter-spacing: .1em; color: var(--paper); padding: 16px 10px; background: rgba(11, 10, 13, 1); border-radius: 8px; box-shadow: 0 0 0 1px rgba(214, 178, 94, .4); white-space: nowrap; }
@keyframes wb { 0% { opacity: 0; transform: translate(-50%, 12px); } 15%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.boss-banner { position: absolute; z-index: 4; top: 34%; left: 16px; right: 16px; display: flex; flex-direction: column; align-items: center; padding: 14px; border-radius: 14px; background: rgba(40, 8, 4, 1); box-shadow: inset 0 0 0 1px var(--shu); animation: bb 2.8s var(--ease) both; pointer-events: none; }
@keyframes bb { 0% { opacity: 0; transform: scale(1.06); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.boss-banner__k { font-size: 14px; color: #ffb59e; letter-spacing: .3em; }
.boss-banner span:last-child { font-family: var(--brush); font-size: 38px; line-height: 1.3; }
.toast { position: absolute; z-index: 4; left: 50%; bottom: calc(150px + var(--sab)); transform: translateX(-50%); max-width: calc(100% - 40px); padding: 8px 18px; border-radius: 999px; background: rgba(11, 10, 13, 1); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .45); font-size: 15px; white-space: nowrap; animation: tst 2.2s var(--ease) both; pointer-events: none; }
@keyframes tst { 0% { opacity: 0; transform: translate(-50%, 10px); } 12%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }
.hint { position: absolute; z-index: 4; left: 20px; right: 20px; top: 60%; padding: 16px 18px; border-radius: 16px; background: rgba(11, 10, 13, 1); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .45); text-align: center; font-size: 15px; line-height: 1.7; pointer-events: none; }
.hint span { display: block; }
.demo { position: absolute; z-index: 4; left: 50%; top: 61%; transform: translateX(-50%); text-align: center; padding: 14px 24px; border-radius: 16px; background: rgba(11, 10, 13, 1); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .5); white-space: nowrap; pointer-events: none; }
.demo__k { font-family: var(--brush); font-size: 15px; color: var(--kin); }
.demo__t { font-size: 17px; font-weight: 700; }
.endtext { position: absolute; z-index: 4; top: 40%; left: 50%; transform: translateX(-50%); padding: 14px 26px; border-radius: 12px; background: rgba(11, 10, 13, 1); font-family: var(--brush); font-size: 40px; white-space: nowrap; animation: wb 3.4s var(--ease) both; pointer-events: none; }

/* ---------- シート */
.sheet { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end; background: rgba(11, 10, 13, .72); animation: fade 200ms var(--ease) both; }
@keyframes fade { from { opacity: 0; } }
.sheet__panel {
  width: 100%; display: flex; flex-direction: column; gap: 14px; padding: 24px 22px calc(24px + var(--sab));
  border-radius: 24px 24px 0 0; background: var(--lacquer) var(--washi); box-shadow: 0 -1px 0 rgba(214, 178, 94, .5);
  animation: up 320ms var(--ease) both;
}
@keyframes up { from { transform: translateY(100%); } }
.sheet__title { font-family: var(--brush); font-size: 28px; line-height: 1.3; }
.sheet__info { font-size: 15px; color: var(--paper-dim); margin-top: -8px; }
.sheet__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pbuild { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pbuild li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(11, 10, 13, 1); font-size: 15px; }
.pbuild svg { width: 20px; height: 20px; color: var(--chochin); }
.pbuild b { margin-left: auto; font-size: 13px; color: var(--kin); }

/* 強化選択（絵馬） */
.sheet--upgrade { align-items: center; background: rgba(11, 10, 13, .82); }
.up { width: 100%; padding: 0 18px; display: flex; flex-direction: column; align-items: center; animation: up2 380ms var(--ease) both; }
@keyframes up2 { from { opacity: 0; transform: translateY(24px); } }
.up__k { display: flex; align-items: baseline; gap: 4px; padding: 2px 14px; border-radius: 999px; background: var(--kin); color: #1c140a; font-size: 14px; font-weight: 800; }
.up__k b { font-size: 18px; }
.up__title { font-family: var(--brush); font-size: 30px; margin: 8px 0 14px; text-shadow: 0 0 20px rgba(11, 10, 13, 1); }
.ema-list { width: 100%; display: grid; gap: 14px; }
.ema {
  --roof: 20px; position: relative; display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: center; width: 100%; min-height: 116px;
  padding: calc(var(--roof) + 10px) 16px 14px; text-align: left; color: #fbf1dc;
  clip-path: polygon(0 var(--roof), 50% 0, 100% var(--roof), 100% 100%, 0 100%);
  background-color: #5a3d26;
  background-image: repeating-linear-gradient(92deg, rgba(255, 220, 170, .04) 0 2px, transparent 2px 9px), linear-gradient(180deg, #6e4b2f, #4f3420);
  transition: transform 180ms var(--ease), filter 180ms var(--ease);
  animation: emaIn 420ms var(--ease) both;
}
.ema:nth-child(2) { animation-delay: 70ms; }
.ema:nth-child(3) { animation-delay: 140ms; }
@keyframes emaIn { from { opacity: 0; transform: translateY(18px) rotate(-1.5deg); } }
.ema::before { content: ''; position: absolute; left: 50%; top: 8px; width: 8px; height: 8px; margin-left: -4px; border-radius: 50%; background: #1c140a; box-shadow: 0 0 0 2px var(--shu); }
.ema:active { transform: scale(.97); filter: brightness(1.12); }
.ema:focus-visible { outline: 2px solid var(--kin); outline-offset: -6px; }
.ema__icon { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #2a1c12; color: var(--chochin); box-shadow: inset 0 0 0 1.5px rgba(214, 178, 94, .7); }
.ema__icon svg { width: 32px; height: 32px; }
.ema.is-charm .ema__icon { color: var(--tama); }
.ema__head { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ema__name { font-family: var(--brush); font-size: 24px; line-height: 1.25; }
.ema__kind { font-size: 13px; color: #f3d9a8; }
.ema__lv { margin-left: auto; font-size: 14px; font-weight: 800; color: #1c140a; background: var(--kin); padding: 0 8px; border-radius: 6px; white-space: nowrap; }
.ema__lv.is-new { background: var(--shu-deep); color: #fff3e8; }
.ema__desc { display: block; font-size: 15px; line-height: 1.6; margin-top: 4px; color: #fbf1dc; word-break: keep-all; }
.up__reroll { margin-top: 16px; min-height: 46px; font-size: 15px; }
.up__reroll[disabled] { opacity: .45; }

/* ---------- リザルト */
.result__scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }
.result__hero { position: relative; min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end; background: var(--sumi) url('/app-development/apps/a021/img/result-dawn.webp') center 20% / cover no-repeat; }
.result__hero.is-dark { background-image: url('/app-development/apps/a021/img/result-dark.webp'); background-position: center 60%; }
.result__hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(transparent, var(--sumi)); pointer-events: none; }
.result__back { position: absolute; left: 16px; top: calc(12px + var(--sat)); z-index: 1; }
.result__head { position: relative; z-index: 1; padding: 0 22px 8px; }
.result__when { display: inline-block; font-size: 14px; padding: 2px 12px; border-radius: 999px; background: rgba(11, 10, 13, 1); }
.result__title { margin-top: 10px; font-family: var(--brush); font-size: 46px; line-height: 1.2; }
.result__title span { background: rgba(11, 10, 13, 1); padding: 0 12px; border-radius: 6px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.result__lead { display: inline-block; margin-top: 10px; font-size: 15px; padding: 2px 10px; background: rgba(11, 10, 13, 1); border-radius: 4px; }
.result__body { padding: 14px 18px 28px; background: var(--sumi); }
.survive { padding: 18px; border-radius: var(--r); background: var(--lacquer); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .35); }
.survive__k { font-size: 14px; color: var(--paper-dim); }
.survive__v { display: flex; align-items: baseline; gap: 8px; }
.survive__v b { font-size: 52px; line-height: 1.1; color: var(--chochin); }
.survive__v span { font-size: 16px; color: var(--paper-dim); white-space: nowrap; }
.survive__best { font-size: 14px; color: var(--paper-dim); }
.survive__bar { display: block; height: 8px; margin-top: 10px; border-radius: 4px; background: rgba(241, 229, 202, .12); overflow: hidden; }
.survive__bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ai), var(--chochin) 70%, #ffd9a0); transition: width 1100ms var(--ease); }
.newrec { display: inline-block; margin-top: 10px; padding: 2px 12px; border-radius: 999px; background: var(--shu-deep); color: #fff3e8; font-size: 14px; font-weight: 700; }
.tally { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.tally div { padding: 12px 10px; border-radius: 14px; background: var(--night); }
.tally dt { font-size: 13px; color: var(--paper-dim); line-height: 1.4; word-break: keep-all; }
.tally dd { display: flex; align-items: baseline; gap: 3px; white-space: nowrap; }
.tally b { font-size: 26px; }
.tally span { font-size: 13px; color: var(--paper-dim); }
.sec-title { font-family: var(--brush); font-size: 22px; margin: 26px 0 10px; }
.wbars { list-style: none; display: grid; gap: 10px; }
.wbars li { display: grid; grid-template-columns: 28px 4.5em 1fr 3em; align-items: center; gap: 8px; font-size: 15px; }
.wbars svg { width: 22px; height: 22px; color: var(--chochin); }
.wbars i { display: block; height: 10px; border-radius: 5px; background: rgba(241, 229, 202, .1); overflow: hidden; }
.wbars i i { height: 100%; width: 0; background: linear-gradient(90deg, var(--shu), var(--chochin)); transition: width 900ms var(--ease); }
.wbars b { text-align: right; font-size: 16px; }
.wbars .empty { display: block; color: var(--paper-dim); font-size: 14px; }
.records { list-style: none; border-top: 1px solid rgba(214, 178, 94, .25); }
.records li { display: grid; grid-template-columns: 2.8em 1fr auto; gap: 12px; align-items: center; padding: 12px 2px; border-bottom: 1px solid rgba(214, 178, 94, .18); }
.records__seal { width: 2.4em; height: 2.4em; display: grid; place-items: center; border-radius: 6px; font-family: var(--brush); font-size: 15px; background: var(--shu-deep); color: #fff3e8; }
.records__seal.is-dark { background: var(--ai); }
.records__m { font-size: 15px; line-height: 1.45; min-width: 0; }
.records__m small { display: block; font-size: 13px; color: var(--paper-dim); }
.records__t { font-size: 20px; }
.records .empty { display: block; padding: 14px 0; color: var(--paper-dim); font-size: 14px; }
.result__foot { flex: none; display: flex; gap: 12px; padding: 12px 18px calc(14px + var(--sab)); background: var(--sumi); border-top: 1px solid rgba(214, 178, 94, .25); }

/* ---------- 設定 */
.panel { margin-bottom: 22px; border-radius: var(--r); background: var(--night); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .22); overflow: hidden; }
.panel__k { padding: 12px 16px 2px; font-size: 13px; color: var(--kin); }
.row { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 62px; padding: 10px 16px; text-align: left; border-top: 1px solid rgba(214, 178, 94, .14); }
.panel__k + .row, .panel > .row:first-child { border-top: 0; }
.row__t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row__t p, .row__p { font-size: 16px; line-height: 1.45; font-weight: 700; }
.row__s { word-break: keep-all; font-size: 13px; color: var(--paper-dim); line-height: 1.5; font-weight: 500; }
.row--link:active, .row--danger:active { background: rgba(241, 229, 202, .05); }
.row--danger .row__p { color: #ff9e85; }
.row svg { color: var(--paper-dim); }
.seg { display: flex; padding: 3px; border-radius: 12px; background: var(--sumi); box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .3); }
.seg button { min-width: 46px; min-height: 40px; padding: 0 10px; border-radius: 9px; font-size: 15px; color: var(--paper-dim); transition: background-color 200ms var(--ease); }
.seg button[aria-checked="true"] { background: var(--chochin); color: #1c0d05; font-weight: 700; }
.switch { flex: none; width: 60px; height: 44px; display: grid; align-items: center; }
.switch i { position: relative; display: block; height: 30px; border-radius: 15px; background: #2a2632; transition: background-color 220ms var(--ease); }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper-dim); transition: transform 260ms var(--ease), background-color 220ms; }
.switch[aria-checked="true"] i { background: #8a4a17; }
.switch[aria-checked="true"] i::after { transform: translateX(30px); background: #ffd79a; }

/* ---------- 遊び方 */
.howto__hero { height: 190px; margin: -20px -18px 18px; background: var(--sumi) url('/app-development/apps/a021/img/howto.webp') center / cover no-repeat; }
.steps { list-style: none; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; }
.steps__n { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: var(--shu-deep); color: #fff3e8; font-family: var(--brush); font-size: 22px; }
.steps h3 { font-family: var(--brush); font-size: 20px; line-height: 1.4; color: var(--chochin); }
.steps p { font-size: 15px; line-height: 1.75; margin-top: 2px; }
.dex { list-style: none; display: grid; gap: 10px; }
.dex li { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--night); }
.dex .dex__i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--sumi); color: var(--chochin); }
.dex li.is-charm .dex__i { border-radius: 50%; color: var(--tama); }
.dex h4 { font-family: var(--brush); font-weight: 400; font-size: 18px; line-height: 1.3; }
.dex p { font-size: 14px; color: var(--paper-dim); line-height: 1.6; }

/* ---------- アプリについて */
.about__app { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.about__app img { border-radius: 20px; }
.about__name { font-family: var(--brush); font-size: 26px; line-height: 1.3; }
.about__ver { font-size: 13px; color: var(--paper-dim); }
.about__note { font-size: 15px; line-height: 1.8; padding: 14px 16px; border-radius: 12px; background: var(--lacquer); box-shadow: inset 3px 0 0 var(--shu); margin-bottom: 22px; }
.tech { list-style: none; }
.tech li { display: flex; flex-direction: column; padding: 10px 16px; border-top: 1px solid rgba(214, 178, 94, .14); }
.tech b { font-size: 15px; }
.tech span { font-size: 14px; color: var(--paper-dim); line-height: 1.6; }
.fatal { position: absolute; left: 16px; right: 16px; top: 40%; z-index: 70; padding: 16px; border-radius: 12px; background: var(--night); text-align: center; }

@media (max-height: 700px) {
  .logo span { font-size: 52px; }
  .result__hero { min-height: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .screen.is-enter, .sheet, .sheet__panel, .up, .ema, .watch-banner, .boss-banner, .toast, .endtext { animation: none; }
  .survive__bar i, .wbars i i { transition: none; }
}
