/* ゆびピアノ — 黒漆×象牙×金 */
:root {
  --lac: #0b0a09;
  --lac-2: #171411;
  --lac-3: #24201b;
  --ivory: #f6f1e6;
  --ivory-2: #ebe3d3;
  --ebony: #141210;
  --gold: #d4ae5a;
  --gold-l: #f0d68f;
  --gold-d: #7a5a1a;
  --felt: #7a1f22;
  --ink: #221d17;
  --ink-2: #5a5044;
  --dim: #bdb3a2;
  --red: #b0282d;
  --f-head: "Kaisei Opti", "Zen Kaku Gothic New", serif;
  --f-body: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --f-num: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --r-panel: 14px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --t: 280ms;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --nav-h: 56px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: #050404; color: var(--ivory); font: 400 15px/1.7 var(--f-body); line-break: strict; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; overflow: hidden; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
.nowrap { white-space: nowrap; }
.kw { word-break: keep-all; }
.num { font-family: var(--f-num); font-variant-numeric: lining-nums tabular-nums; }

.app { position: fixed; inset: 0; margin: 0 auto; max-width: 430px; overflow: hidden; background-color: var(--lac); }
.app::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 60% at 50% 0%, #2a241d 0%, transparent 60%), linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .035) 45%, transparent 55%); }
@media (min-width: 600px) {
  body { background: radial-gradient(circle at 50% 40%, #1d1913, #050404 70%); }
  .app { box-shadow: 0 0 0 1px rgba(212, 174, 90, .25), 0 30px 90px rgba(0, 0, 0, .8); }
}

/* ---------- ナビ（譜面台の金の縁） ---------- */
.nav {
  position: absolute; left: 0; right: 0; top: 0; z-index: 20; height: calc(var(--nav-h) + var(--safe-t)); padding: var(--safe-t) 8px 0 12px;
  display: flex; align-items: center; gap: 8px; background-color: var(--lac); border-bottom: 1px solid rgba(212, 174, 90, .35);
}
.nav[hidden] { display: none; }
.nav__logo { flex: none; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; box-shadow: 0 0 0 1px rgba(212, 174, 90, .5); }
.nav__logo img { width: 100%; height: 100%; }
.nav__tabs { flex: 1; display: flex; justify-content: flex-end; gap: 2px; }
.nav__tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 60px; height: 50px;
  text-decoration: none; color: var(--dim); font-size: 11px; font-weight: 700; letter-spacing: .06em; line-height: 1.2; transition: color .2s, transform .1s;
}
.nav__tab:active { transform: scale(.92); }
.nav__tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.nav__tab svg .fill { fill: currentColor; stroke: none; }
.nav__tab.is-active { color: var(--gold-l); }
.nav__tab.is-active::after { content: ""; position: absolute; bottom: -1px; left: 14px; right: 14px; height: 2px; background: var(--gold); border-radius: 2px; }
.nav__rec { position: absolute; top: 9px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: #e2433f; box-shadow: 0 0 0 2px var(--lac); }

/* ---------- 画面 ---------- */
.screens { position: absolute; left: 0; right: 0; bottom: 0; top: calc(var(--nav-h) + var(--safe-t)); }
.app.is-full .screens { top: 0; }
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background-color: var(--lac); overflow: hidden; }
.screen.is-in { animation: rise var(--t) var(--ease) both; }
.screen.is-in-push { animation: push var(--t) var(--ease) both; }
.screen.is-out { animation: sink 200ms ease both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes push { from { transform: translateX(100%); } }
@keyframes sink { to { opacity: 0; } }
.scroll { position: relative; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 0 16px calc(var(--safe-b) + 28px); }

.bar { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 6px) 12px 6px; min-height: calc(var(--safe-t) + 58px); border-bottom: 1px solid rgba(212, 174, 90, .25); }
.bar__t { flex: 1; min-width: 0; }
.bar__t h1 { font: 700 18px/1.3 var(--f-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-feature-settings: "palt"; }
.bar__t p { font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.ibtn { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(212, 174, 90, .45); background: var(--lac-2); display: grid; place-items: center; transition: transform .1s, background .2s; }
.ibtn:active { transform: scale(.9); }
.ibtn svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-l); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ibtn[aria-pressed="false"] svg .wave { display: none; }
.ibtn[aria-pressed="true"] svg .x { display: none; }

.h-title { font: 700 26px/1.3 var(--f-head); letter-spacing: .04em; font-feature-settings: "palt"; }
.h-sub { font-size: 13px; color: var(--dim); letter-spacing: .08em; }
.rule { display: flex; align-items: center; gap: 10px; margin: 24px 0 10px; color: var(--gold-l); font: 700 15px/1.4 var(--f-head); letter-spacing: .08em; }
.rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(212, 174, 90, .6), transparent); }

/* ---------- 譜面台 ---------- */
.stand {
  position: relative; flex: none; margin: 10px 12px 0; height: 150px; border-radius: 10px; overflow: hidden;
  background-color: var(--ivory); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(122, 90, 26, .35), 0 10px 24px rgba(0, 0, 0, .55);
}
.stand__clef { position: absolute; left: 0; top: 0; bottom: 0; width: 46px; z-index: 2; background-color: var(--ivory); }
.stand__clef svg, .stand__track svg { position: absolute; left: 0; top: 0; height: 100%; }
.stand__track { position: absolute; inset: 0; }
.stand__track svg { transition: transform 260ms var(--ease); will-change: transform; }
.stand__track.is-live svg { transition: none; }
.stand__head { position: absolute; top: 10px; bottom: 26px; width: 2px; left: 112px; background: var(--gold); box-shadow: 0 0 10px rgba(212, 174, 90, .9); z-index: 1; border-radius: 2px; }
.stand__fade { position: absolute; right: 0; top: 0; bottom: 0; width: 40px; background: linear-gradient(90deg, rgba(246, 241, 230, 0), var(--ivory)); z-index: 2; pointer-events: none; }
.stand__now {
  position: absolute; right: 10px; top: 8px; z-index: 3; min-width: 96px; padding: 4px 10px 5px; border-radius: 8px; background-color: var(--ink); color: var(--ivory);
  text-align: center; line-height: 1.25;
}
.stand__now b { display: block; font: 700 18px/1.3 var(--f-head); white-space: nowrap; }
.stand__now span { font-size: 11px; color: var(--gold-l); white-space: nowrap; }
.score text { fill: currentColor; }
.score .lbl { font: 700 12px var(--f-body); color: var(--ink-2); }
.score .clef { font-family: "Noto Music", serif; font-size: 62px; color: var(--ink); }
.score .staff { stroke: #9a8f7e; stroke-width: 1; }
.score .barl { stroke: #9a8f7e; stroke-width: 1; }
.score .n { fill: var(--ink); stroke: var(--ink); color: var(--ink); transition: fill .2s, stroke .2s; }
.score .n .stem, .score .n .flag, .score .n .led { fill: none; stroke-width: 1.3; }
.score .n .hollow { fill: none; stroke-width: 1.6; }
.score .n .halo { fill: var(--gold); stroke: none; opacity: 0; }
.score .n.is-cur .halo { opacity: .45; animation: halo 1.2s ease-in-out infinite; }
.score .n.is-cur .lbl { color: var(--gold-d); }
.score .n.is-ok { fill: #8c8272; stroke: #8c8272; }
.score .n.is-ok .lbl { color: #5e564b; }
.score .n.is-good .lbl { color: #5e564b; }
.score .n.is-miss { fill: var(--red); stroke: var(--red); }
.score .n.is-miss .lbl { color: var(--red); }
@keyframes halo { 50% { opacity: .2; } }

/* ---------- 操作列 ---------- */
.ctrl { flex: none; display: flex; align-items: center; gap: 6px; padding: 10px 12px 8px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background-color: var(--lac-2); border: 1px solid rgba(212, 174, 90, .3); }
.seg button { min-height: 38px; padding: 0 9px; border: 0; border-radius: 999px; background: transparent; color: var(--dim); font-size: 13px; font-weight: 700; transition: background .2s, color .2s; white-space: nowrap; }
.seg button[aria-pressed="true"] { background-color: var(--gold); color: #1a1408; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  border: 1px solid rgba(212, 174, 90, .5); background-color: var(--lac-2); color: var(--ivory); font-size: 14px; font-weight: 700; white-space: nowrap; transition: transform .1s;
}
.pill:active { transform: scale(.95); }
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill[aria-pressed="true"] { background-color: var(--gold); color: #1a1408; border-color: var(--gold); }
.rec-btn { margin-left: auto; }
.rec-btn i { width: 12px; height: 12px; border-radius: 50%; background: #e2433f; box-shadow: 0 0 0 2px rgba(226, 67, 63, .3); }
.rec-btn.is-on { background-color: #5a1416; border-color: #e2433f; }
.rec-btn.is-on i { border-radius: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }
.tempo { flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 8px; }
.tempo__v { min-width: 96px; text-align: center; font: 500 20px/1 var(--f-num); color: var(--ivory); }
.tempo__v small { font: 700 12px var(--f-body); color: var(--dim); margin-left: 2px; }
.tempo .ibtn { width: 40px; height: 40px; }
.go { margin-left: auto; padding: 0 12px; }
.go.is-run { background-color: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.prog { flex: none; height: 3px; margin: 0 12px; border-radius: 2px; background: rgba(212, 174, 90, .18); overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.hint { flex: none; padding: 6px 14px 0; min-height: 30px; font-size: 13px; color: var(--dim); text-align: center; line-height: 1.5; }
.hint b { color: var(--gold-l); }

/* ---------- 鍵盤（2段） ---------- */
.kb { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; padding: 10px 6px calc(var(--safe-b) + 8px); touch-action: none; user-select: none; -webkit-user-select: none; }
.kb--mini { flex: none; height: 84px; flex-direction: row; gap: 0; padding: 0; }
.tier { position: relative; flex: 1; min-height: 120px; display: flex; flex-direction: column; border-radius: 6px; background-color: #050404; padding: 6px 2px 2px; box-shadow: inset 0 2px 0 rgba(255, 255, 255, .06), 0 6px 16px rgba(0, 0, 0, .6); }
.kb--mini .tier { min-height: 0; padding: 3px 1px 1px; border-radius: 4px; }
.tier__felt { flex: none; height: 5px; margin: 0 2px 3px; border-radius: 2px; background: linear-gradient(var(--felt), #4d1215); }
.tier__oct { position: absolute; left: 10px; top: -2px; transform: translateY(-100%); font: italic 500 12px/1 var(--f-num); color: var(--dim); letter-spacing: .06em; }
.keys { position: relative; flex: 1; display: flex; }
.wk {
  position: relative; flex: 1; margin: 0 1px; border-radius: 0 0 6px 6px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 12px;
  background-color: var(--ivory); background-image: linear-gradient(180deg, #ded5c3 0, #faf6ec 10%, #f6f1e6 80%, #e3dac8 100%);
  box-shadow: inset 0 -7px 0 #d9cfbb, 0 1px 0 rgba(0, 0, 0, .5); transition: background-color 60ms, transform 60ms, box-shadow 60ms;
}
.wk span { font: 700 13px/1 var(--f-body); color: var(--ink-2); pointer-events: none; }
.wk.is-down { background-image: linear-gradient(180deg, #cfc4ae 0, #ece4d3 14%, #e6dcc8 100%); box-shadow: inset 0 -3px 0 #cbbfa7; transform: translateY(2px); }
.wk.is-next { background-image: linear-gradient(180deg, #e8c871 0, #fff1c4 18%, #f6dc93 100%); box-shadow: inset 0 -7px 0 #d2ab4f, 0 0 22px rgba(240, 214, 143, .75); animation: glow 1.1s ease-in-out infinite; }
.wk.is-next span { color: #3b2b08; }
.wk.is-auto { background-image: linear-gradient(180deg, #e8c871 0, #fbe5a6 30%, #f2cf75 100%); }
.wk.is-miss { background-image: linear-gradient(180deg, #d5878a 0, #f4cfcf 30%, #efc0c0 100%); }
.wk.is-miss span, .wk.is-auto span { color: #3b2b08; }
.bk {
  position: absolute; top: 0; height: 58%; width: calc(100% / 7 * .62); margin-left: calc(100% / 7 * -.31); z-index: 2; border-radius: 0 0 4px 4px;
  background-color: var(--ebony); background-image: linear-gradient(180deg, #000 0, #2b2724 70%, #3b3632 88%, #111 89%, #1d1a17 100%);
  box-shadow: inset 0 0 0 1px #000, 0 3px 4px rgba(0, 0, 0, .55); transition: transform 60ms;
}
.bk.is-down { background-image: linear-gradient(180deg, #000 0, #1d1a17 80%, #2b2724 96%, #111 97%); transform: translateY(1px); }
.bk.is-next { background-image: linear-gradient(180deg, #4d3a10 0, #b88d33 70%, #e3be63 88%, #6b5017 89%); box-shadow: inset 0 0 0 1px #000, 0 0 18px rgba(240, 214, 143, .8); animation: glow 1.1s ease-in-out infinite; }
.bk.is-auto { background-image: linear-gradient(180deg, #4d3a10 0, #a37b28 80%, #c9a24a 100%); }
.bk.is-miss { background-image: linear-gradient(180deg, #3d0c0e 0, #8a2328 100%); }
@keyframes glow { 50% { filter: brightness(1.12); } }
.kb--mini .wk { padding-bottom: 0; margin: 0 .5px; border-radius: 0 0 3px 3px; box-shadow: inset 0 -3px 0 #d9cfbb; }
.kb--mini { touch-action: pan-y; pointer-events: none; }

/* ---------- 曲をえらぶ ---------- */
.hero { position: relative; margin: 0 -16px; height: 210px; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, var(--lac)); }
.hero__plate { position: absolute; left: 16px; bottom: 14px; z-index: 1; padding: 8px 14px 9px; background-color: var(--lac); border-left: 2px solid var(--gold); }
.chips { display: flex; gap: 8px; margin: 14px 0 6px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips .pill { min-height: 40px; padding: 0 11px; font-size: 13px; }
.program { list-style: none; margin: 0; padding: 0; }
.program li + li { border-top: 1px solid rgba(212, 174, 90, .2); }
.song { display: flex; align-items: center; gap: 14px; padding: 14px 2px; text-decoration: none; transition: background .2s, transform .1s; }
.song:active { transform: scale(.985); }
.song__no { flex: none; width: 30px; font: italic 500 22px/1 var(--f-num); color: var(--gold); text-align: center; }
.song__img { flex: none; width: 66px; height: 66px; border-radius: 10px; object-fit: cover; box-shadow: 0 0 0 1px rgba(212, 174, 90, .35); }
.song__b { flex: 1; min-width: 0; }
.song__t { display: block; font: 700 17px/1.4 var(--f-head); font-feature-settings: "palt"; word-break: keep-all; }
.song__c { display: block; font-size: 12px; color: var(--dim); line-height: 1.5; }
.song__m { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 12px; color: var(--dim); }
.lv { display: inline-flex; gap: 2px; }
.lv i { width: 7px; height: 13px; border-radius: 0 0 2px 2px; background: var(--lac-3); box-shadow: inset 0 0 0 1px rgba(212, 174, 90, .5); }
.lv i.on { background: var(--gold); }
.best { flex: none; text-align: right; }
.best b { display: block; font: 500 20px/1 var(--f-num); color: var(--ivory); }
.best small { font-size: 11px; color: var(--dim); }
.stars { display: inline-flex; gap: 1px; }
.stars svg { width: 13px; height: 13px; fill: var(--lac-3); stroke: rgba(212, 174, 90, .6); stroke-width: 1; }
.stars svg.on { fill: var(--gold); stroke: var(--gold); }
.note-box { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background-color: var(--lac-2); border: 1px solid rgba(212, 174, 90, .25); font-size: 13px; line-height: 1.7; color: var(--dim); }

/* ---------- 結果 ---------- */
.res-photo { position: relative; margin: 0 -16px; height: 190px; }
.res-photo img { width: 100%; height: 100%; object-fit: cover; }
.res-photo::after { content: ""; position: absolute; inset: auto 0 0 0; height: 90px; background: linear-gradient(transparent, var(--lac)); }
.res { position: relative; margin-top: -50px; text-align: center; }
.res__t { display: inline-block; padding: 4px 16px; background-color: var(--lac); font: 700 18px/1.4 var(--f-head); }
.res__acc { margin-top: 6px; font: 500 76px/1 var(--f-num); color: var(--ivory); }
.res__acc small { font-size: 30px; margin-left: 2px; color: var(--gold-l); }
.res__stars { display: flex; justify-content: center; gap: 10px; margin: 12px 0 6px; }
.res__stars svg { width: 42px; height: 42px; fill: var(--lac-3); stroke: rgba(212, 174, 90, .6); stroke-width: .8; }
.res__stars svg.on { fill: var(--gold); stroke: var(--gold-l); animation: pop 420ms var(--ease) both; }
.res__stars svg.on:nth-child(2) { animation-delay: 140ms; }
.res__stars svg.on:nth-child(3) { animation-delay: 280ms; }
@keyframes pop { from { transform: scale(.2) rotate(-40deg); opacity: 0; } }
.res__msg { font: 700 17px/1.5 var(--f-head); color: var(--gold-l); }
.res__meta { margin-top: 4px; font-size: 13px; color: var(--dim); }
.tally { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0; border-radius: 12px; border: 1px solid rgba(212, 174, 90, .3); background-color: var(--lac-2); }
.tally div { padding: 12px 6px; text-align: center; }
.tally div + div { border-left: 1px solid rgba(212, 174, 90, .2); }
.tally dt { font-size: 12px; color: var(--dim); font-weight: 700; }
.tally dd { margin: 0; font: 500 30px/1.2 var(--f-num); }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 54px; padding: 0 20px; border-radius: 999px; border: 0;
  font-size: 16px; font-weight: 700; letter-spacing: .04em; text-decoration: none; transition: transform .1s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn--gold { background-color: var(--gold); color: #1a1408; box-shadow: 0 8px 22px -8px rgba(212, 174, 90, .7); }
.btn--line { background-color: var(--lac-2); color: var(--ivory); border: 1px solid rgba(212, 174, 90, .5); }
.btn + .btn { margin-top: 10px; }
.misses { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 10px; }
.misses span { padding: 3px 10px; border-radius: 999px; background-color: var(--lac-3); font-size: 13px; color: var(--ivory); }

/* ---------- 録音 ---------- */
.take-now { margin-top: 12px; padding: 14px; border-radius: var(--r-panel); background-color: var(--lac-2); border: 1px solid rgba(212, 174, 90, .3); }
.take-now__h { display: flex; align-items: center; gap: 10px; }
.take-now__h h2 { flex: 1; min-width: 0; font: 700 19px/1.35 var(--f-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.take-now__m { font-size: 12px; color: var(--dim); }
.roll { position: relative; margin: 12px 0 10px; height: 132px; border-radius: 8px; background-color: #0f0d0b; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(212, 174, 90, .2); }
.roll svg { width: 100%; height: 100%; display: block; }
.roll__head { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--gold-l); box-shadow: 0 0 8px var(--gold); opacity: 0; }
.roll.is-play .roll__head { opacity: 1; }
.take-now__btns { display: flex; gap: 8px; margin-top: 12px; }
.take-now__btns .pill { flex: 1; }
.takes { list-style: none; margin: 0; padding: 0; }
.takes li + li { border-top: 1px solid rgba(212, 174, 90, .18); }
.take { display: flex; align-items: center; gap: 12px; padding: 12px 2px; text-decoration: none; }
.take.is-sel .take__n { color: var(--gold-l); }
.take__mini { flex: none; width: 76px; height: 40px; border-radius: 6px; background-color: #0f0d0b; box-shadow: inset 0 0 0 1px rgba(212, 174, 90, .25); }
.take__b { flex: 1; min-width: 0; }
.take__n { display: block; font: 700 16px/1.4 var(--f-head); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.take__m { display: block; font-size: 12px; color: var(--dim); }
.take__len { flex: none; font: 500 18px/1 var(--f-num); }
.empty { text-align: center; padding: 18px 0 6px; }
.empty img { width: 100%; border-radius: 12px; margin-bottom: 14px; }
.empty h3 { font: 700 19px/1.4 var(--f-head); word-break: keep-all; }
.empty p { margin: 6px 0 16px; font-size: 14px; color: var(--dim); }

/* ---------- 設定 ---------- */
.group { margin-top: 10px; border-radius: var(--r-panel); background-color: var(--lac-2); border: 1px solid rgba(212, 174, 90, .22); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 8px 16px; width: 100%; border: 0; background: none; text-align: left; text-decoration: none; font-size: 15px; }
.row + .row { border-top: 1px solid rgba(212, 174, 90, .15); }
.row__l { flex: 1; min-width: 0; }
.row__l small { display: block; font-size: 12px; color: var(--dim); line-height: 1.5; }
.row svg.chev { width: 18px; height: 18px; fill: none; stroke: var(--gold-l); stroke-width: 2; }
.row--danger { color: #f08c84; font-weight: 700; }
.row input[type=range] { width: 140px; accent-color: var(--gold); }
.switch { position: relative; flex: none; width: 54px; height: 32px; border-radius: 16px; border: 0; background: #3a342d; transition: background .2s; }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--ivory); transition: transform .22s var(--ease); }
.switch[aria-checked="true"] { background: var(--gold); }
.switch[aria-checked="true"]::after { transform: translateX(22px); }
.about-hero { text-align: center; padding: 18px 0 4px; }
.about-hero img { width: 92px; height: 92px; margin: 0 auto 12px; border-radius: 22px; box-shadow: 0 0 0 1px rgba(212, 174, 90, .5), 0 14px 30px rgba(0, 0, 0, .6); }
.about-hero h2 { font: 700 24px/1.3 var(--f-head); }
.about-hero p { font-size: 13px; color: var(--dim); }
.box { margin-top: 14px; padding: 16px; border-radius: var(--r-panel); background-color: var(--lac-2); border: 1px solid rgba(212, 174, 90, .22); font-size: 14px; line-height: 1.75; }
.box h3 { font: 700 16px/1.4 var(--f-head); color: var(--gold-l); margin-bottom: 6px; }
.box ul { margin: 0; padding-left: 1.2em; }
.box a { color: var(--gold-l); font-weight: 700; }

/* ---------- 重ね ---------- */
.layer { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.layer > * { pointer-events: auto; }
.scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 18px calc(var(--safe-b) + 20px); border-radius: 22px 22px 0 0; background-color: var(--lac-2); border-top: 1px solid rgba(212, 174, 90, .4); animation: up 320ms var(--ease) both; }
@keyframes up { from { transform: translateY(100%); } }
.sheet__grab { width: 40px; height: 5px; margin: 0 auto 14px; border-radius: 3px; background: rgba(212, 174, 90, .4); }
.sheet h2 { font: 700 19px/1.4 var(--f-head); text-align: center; margin-bottom: 6px; word-break: keep-all; }
.sheet p { text-align: center; font-size: 14px; color: var(--dim); margin-bottom: 14px; }
.sheet input[type=text] { width: 100%; height: 50px; padding: 0 14px; margin-bottom: 14px; border-radius: 12px; border: 1px solid rgba(212, 174, 90, .5); background-color: var(--lac); font-size: 16px; color: var(--ivory); }
.toast { position: absolute; left: 50%; bottom: calc(var(--safe-b) + 24px); z-index: 60; transform: translate(-50%, 16px); display: flex; align-items: center; gap: 12px; width: max-content; max-width: calc(100% - 32px); padding: 10px 10px 10px 18px; border-radius: 12px; background-color: var(--ivory); color: var(--ink); font-size: 14px; font-weight: 700; box-shadow: 0 12px 30px rgba(0, 0, 0, .6); opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { min-height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background-color: var(--ink); color: var(--gold-l); font-weight: 700; }
.toast span { word-break: keep-all; }
.count { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; pointer-events: none; }
.count b { font: italic 500 120px/1 var(--f-num); color: var(--gold-l); text-shadow: 0 0 30px rgba(212, 174, 90, .7); animation: cnt 1s ease-out both; }
@keyframes cnt { from { transform: scale(1.6); opacity: 0; } 30% { opacity: 1; } to { transform: scale(.9); opacity: 0; } }
.splash { position: absolute; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 16px; background-color: var(--lac); animation: fade .2s both; }
.splash img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 0 0 1px rgba(212, 174, 90, .5), 0 0 60px rgba(212, 174, 90, .35); }
.splash p { font: 700 28px/1.2 var(--f-head); letter-spacing: .14em; }
.splash.is-out { animation: sink .3s both; }
.onb { position: absolute; inset: 0; z-index: 80; display: flex; flex-direction: column; background: var(--lac) url(/app-development/apps/a072/img/hero.webp) center 30% / cover; }
.onb__skip { position: absolute; top: calc(var(--safe-t) + 12px); right: 12px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(212, 174, 90, .5); background-color: var(--lac); color: var(--ivory); font-size: 14px; font-weight: 700; }
.onb__p { margin-top: auto; padding: 24px 22px calc(var(--safe-b) + 22px); background-color: var(--lac); border-top: 1px solid rgba(212, 174, 90, .4); }
.onb__dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.onb__dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--lac-3); }
.onb__dots i.on { width: 24px; border-radius: 4px; background: var(--gold); }
.onb h2 { font: 700 25px/1.45 var(--f-head); text-align: center; word-break: keep-all; font-feature-settings: "palt"; }
.onb p { margin: 8px 0 18px; text-align: center; font-size: 15px; color: var(--dim); }
.boot { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 8px; padding: 24px; }
.boot__title { font: 700 26px var(--f-head); }
.noscript { position: fixed; left: 16px; right: 16px; bottom: 16px; padding: 12px; background: var(--ivory); color: var(--ink); }

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