/* ころころ迷路 — 木肌×深緑フェルト×銀 */
:root {
  --walnut: #2e2117;
  --walnut-2: #46321f;
  --maple: #ecd3a8;
  --maple-2: #c99a62;
  --maple-3: #a87842;
  --ink: #2a1c11;
  --ink-2: #5a4330;
  --felt: #23603a;
  --felt-2: #2e7a4b;
  --felt-dark: #163f26;
  --silver: #e2e6e9;
  --silver-2: #aab2b8;
  --steel: #59626a;
  --gold: #c08a1e;
  --bronze: #a0623a;
  --danger: #a3261c;
  --f-head: "RocknRoll One", "Murecho", system-ui, sans-serif;
  --f-body: "Murecho", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  --f-num: "Barlow Condensed", "Murecho", system-ui, sans-serif;
  --r: 10px;
  --wood: url(/app-development/apps/a027/img/wood.webp);
  --press: 80ms;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--f-body);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--walnut) radial-gradient(120% 80% at 50% 0%, #4a3523, var(--walnut) 70%);
  overflow: hidden;
  line-break: strict;
  -webkit-tap-highlight-color: transparent;
}
button, a { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
svg { width: 22px; height: 22px; flex: none; }
.num { font-family: var(--f-num); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
h1, h2, h3 { font-feature-settings: "palt"; word-break: keep-all; overflow-wrap: normal; font-weight: 400; line-height: 1.35; }

.app { position: fixed; inset: 0; max-width: 430px; margin: 0 auto; overflow: hidden; background: var(--walnut); }
@media (min-width: 600px) { .app { box-shadow: 0 0 0 1px #000, 0 30px 80px rgba(0, 0, 0, .5); } }
.pane { position: absolute; inset: 0; display: none; flex-direction: column; overflow: hidden; }
.pane.is-on { display: flex; }
.pane.is-in { animation: slideIn 320ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes slideIn { from { transform: translateX(28px); opacity: 0; } }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; }

/* ===== ボタン ===== */
.wood-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 14px;
  border-radius: var(--r);
  font-weight: 800;
  color: var(--ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 40%), var(--wood) center / 300px auto, var(--maple);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(120, 76, 30, .45), 0 3px 0 #6b4826, 0 6px 10px rgba(0, 0, 0, .25);
  transition: transform var(--press), box-shadow var(--press);
  touch-action: manipulation;
  white-space: nowrap;
}
.wood-btn:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), inset 0 -1px 0 rgba(120, 76, 30, .45), 0 0 0 #6b4826, 0 2px 4px rgba(0, 0, 0, .25); }
.wood-btn--wide { width: 100%; min-height: 52px; }
.wood-btn--s { width: 48px; height: 48px; padding: 0; }
.wood-btn--s2 { min-height: 44px; padding: 6px 14px; font-size: 14px; flex: none; }
.felt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 54px;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  background: radial-gradient(120% 140% at 30% 0%, rgba(255, 255, 255, .16), transparent 60%), url(/app-development/apps/a027/img/felt.webp) center / 240px auto, var(--felt);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12), inset 0 0 0 4px #b98b54, inset 0 -6px 0 4px rgba(0, 0, 0, .18), 0 4px 0 #6b4826, 0 8px 14px rgba(0, 0, 0, .3);
  transition: transform var(--press), box-shadow var(--press);
  touch-action: manipulation;
}
.felt-btn span { white-space: nowrap; }
.felt-btn:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .12), inset 0 0 0 4px #b98b54, inset 0 -3px 0 4px rgba(0, 0, 0, .18), 0 1px 0 #6b4826, 0 3px 6px rgba(0, 0, 0, .3); }
.felt-btn--xl { width: 100%; min-height: 62px; font-size: 18px; }
.felt-btn--wide { width: 100%; }
.felt-btn--wide span { white-space: normal; word-break: keep-all; text-align: center; line-height: 1.4; }
.danger-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; border-radius: 12px; font-weight: 800; color: #fff; background: var(--danger); box-shadow: 0 4px 0 #5e140e; }
.danger-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #5e140e; }
.knob {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff, var(--silver) 45%, var(--silver-2) 100%);
  box-shadow: inset 0 -2px 3px rgba(0, 0, 0, .25), 0 2px 4px rgba(0, 0, 0, .35);
  transition: transform var(--press);
}
.knob:active { transform: scale(.9) rotate(-20deg); }
.txt-link { min-height: 44px; display: inline-flex; align-items: center; padding: 0 8px; font-weight: 800; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--felt-2); }

/* ===== タイトル ===== */
.pane--title {
  background:
    linear-gradient(180deg, rgba(46, 33, 23, 0) 55%, var(--walnut) 74%),
    url(/app-development/apps/a027/img/title.webp) top center / 100% auto no-repeat,
    var(--walnut);
}
.ttl__top { display: flex; justify-content: flex-end; padding: calc(var(--sat) + 12px) 14px 0; }
.ttl__logo { padding: 0 22px; }
.ttl__brand { display: inline-block; padding: 2px 12px; border-radius: 6px; font-size: 13px; font-weight: 800; color: #fff; background: var(--felt); white-space: nowrap; }
.ttl__h { margin-top: 10px; font-family: var(--f-head); color: var(--ink); line-height: 1.05; text-shadow: 0 2px 0 rgba(255, 255, 255, .8), 0 0 20px rgba(255, 255, 255, .9); }
.ttl__h span { display: block; }
.ttl__h span:first-child { font-size: 50px; letter-spacing: .02em; }
.ttl__h span:last-child { font-size: 60px; letter-spacing: .1em; color: var(--felt-dark); }
.ttl__lead { margin-top: 8px; font-weight: 800; font-size: 16px; color: var(--ink); word-break: keep-all; text-shadow: 0 1px 0 #fff, 0 0 12px #fff; }
.shelf {
  margin-top: auto;
  display: grid;
  gap: 12px;
  padding: 16px 16px calc(var(--sab) + 16px);
  background: linear-gradient(180deg, rgba(255, 255, 255, .25), rgba(255, 255, 255, 0) 30%), var(--wood) center / 420px auto, var(--maple-2);
  border-top: 4px solid #7a5129;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
}
.shelf__stat { justify-self: center; display: inline-flex; align-items: center; gap: 8px; padding: 2px 14px; border-radius: 999px; background: rgba(42, 28, 17, .86); color: #fff; font-weight: 700; white-space: nowrap; }
.shelf__stat svg { width: 18px; height: 18px; color: #e9c46a; }
.shelf__stat b { font-size: 20px; }
.shelf__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shelf__row .wood-btn { padding: 8px 6px; font-size: 14px; gap: 5px; }
.sensor-chip { justify-self: center; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 4px 16px; border-radius: 999px; background: rgba(42, 28, 17, .86); color: #fff; font-weight: 700; font-size: 14px; white-space: nowrap; }
.sensor-chip svg { width: 20px; height: 20px; color: #9fd9a8; }
.sensor-chip.is-on { background: var(--felt); }

/* ===== 共通の板ヘッダー ===== */
.plank {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--sat) + 10px) 14px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .3), rgba(255, 255, 255, 0) 50%), var(--wood) center / 420px auto, var(--maple-2);
  border-bottom: 3px solid #6b4826;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .35);
  position: relative;
  z-index: 2;
}
.plank__h { flex: 1; font-family: var(--f-head); font-size: 22px; color: var(--ink); }
.plank__sp { width: 44px; flex: none; }
.plank__chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; border-radius: 999px; background: var(--ink); color: #fff; white-space: nowrap; }
.plank__chip svg { width: 18px; height: 18px; color: #e9c46a; }
.plank__chip b { font-size: 18px; }

/* ===== ステージ ===== */
.pane--stages { background: var(--walnut) url(/app-development/apps/a027/img/bench.webp) center / cover; }
.stages { padding: 16px 14px calc(var(--sab) + 24px); }
.tiles { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  position: relative;
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 8px 8px 10px;
  border-radius: 12px;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 30%), var(--wood) center / 300px auto, var(--maple);
  box-shadow: inset 0 -3px 0 rgba(120, 76, 30, .4), 0 4px 0 #6b4826, 0 8px 14px rgba(0, 0, 0, .35);
  transition: transform var(--press);
}
.tile:active { transform: translateY(3px) scale(.98); }
.tile__cv { width: 100%; aspect-ratio: 10.6 / 14.6; border-radius: 6px; display: block; background: var(--felt); }
.tile__row { display: flex; align-items: center; gap: 6px; }
.tile__no { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 16px; }
.tile__name { flex: 1; min-width: 0; font-weight: 800; font-size: 14px; line-height: 1.35; word-break: keep-all; }
.tile__best { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.tile__best b { font-size: 18px; color: var(--ink); }
.tile__medal { width: 26px; height: 26px; }
.m-gold { color: var(--gold); }
.m-silver { color: #8c969e; }
.m-bronze { color: var(--bronze); }
.m-none { color: #b39570; opacity: .55; }
.tile.is-locked .tile__cv { filter: grayscale(.6) brightness(.6); }
.tile.is-locked { background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, 0) 30%), var(--wood) center / 300px auto, #d9bf96; }
.tile.is-locked .tile__lock { position: absolute; inset: 8px 8px auto; aspect-ratio: 10.6 / 14.6; display: grid; place-items: center; border-radius: 6px; background: rgba(22, 16, 10, .55); color: #fff; }
.tile__lock { display: none; }
.tile__lock svg { width: 34px; height: 34px; }

/* ===== プレイ ===== */
.pane--play { background: var(--walnut) radial-gradient(90% 60% at 50% 45%, #5a412a, var(--walnut) 75%); }
.hud { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(var(--sat) + 8px) 12px 4px; }
.knob--dark { background: radial-gradient(circle at 35% 30%, #fff, var(--silver) 45%, var(--silver-2) 100%); }
.hud__plate {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px 4px 12px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f4f6f7, var(--silver) 45%, #b9c0c5);
  box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgba(0, 0, 0, .15), 0 2px 6px rgba(0, 0, 0, .4);
}
.hud__stage { min-width: 0; display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 13px; color: var(--steel-ink, #20262b); white-space: nowrap; overflow: hidden; }
.hud__stage .num { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #20262b; color: #fff; font-size: 15px; }
.hud__stage span:last-child { overflow: hidden; text-overflow: ellipsis; }
.timer { flex: none; padding: 0 10px; border-radius: 6px; background: #20262b; }
.timer b { font-size: 26px; line-height: 1.25; color: #f2f4f5; letter-spacing: .04em; }
.hud2 { flex: none; display: flex; justify-content: space-between; gap: 8px; padding: 4px 14px 0; }
.hud2__item { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: rgba(0, 0, 0, .45); color: #f5ead9; font-size: 13px; font-weight: 700; white-space: nowrap; }
.hud2__item svg { width: 16px; height: 16px; }
.hud2__item b { font-size: 17px; color: #fff; }
.hud2__item--goal svg { color: #e9c46a; }
.table { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; perspective: 900px; touch-action: none; padding: 6px 10px; }
.box { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform 70ms linear; will-change: transform; }
.cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.fallnote {
  position: absolute;
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%);
  padding: 8px 18px;
  border-radius: 10px;
  background: #16100a;
  color: #fff;
  font-weight: 800;
  visibility: hidden;
  pointer-events: none;
  white-space: nowrap;
}
.fallnote.is-on { visibility: visible; animation: notePop 260ms cubic-bezier(.3, 1.5, .5, 1); }
@keyframes notePop { from { transform: translate(-50%, -50%) scale(.8); } }
.dock { flex: none; display: grid; grid-template-columns: 64px 1fr 48px; align-items: center; gap: 10px; padding: 6px 12px calc(var(--sab) + 12px); }
.level {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: radial-gradient(circle, #e8f3d8 0 52%, #b9d39a 53% 54%, #e8f3d8 55%), #e8f3d8;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, .35), 0 0 0 4px #c5ccd1, 0 0 0 6px #8b949b;
}
.level::before, .level::after { content: ""; position: absolute; background: rgba(60, 90, 40, .35); }
.level::before { left: 50%; top: 8px; bottom: 8px; width: 1px; }
.level::after { top: 50%; left: 8px; right: 8px; height: 1px; }
.level__bubble { position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, rgba(255, 255, 255, .5) 60%, rgba(160, 200, 120, .4)); box-shadow: 0 0 0 1px rgba(60, 90, 40, .4); }
.dock__txt { min-width: 0; }
.dock__mode { display: flex; align-items: center; gap: 6px; font-weight: 800; color: #fff; font-size: 14px; white-space: nowrap; }
.dock__mode svg { width: 18px; height: 18px; color: #9fd9a8; }
.dock__note { font-size: 13px; color: #e9dccb; line-height: 1.5; word-break: keep-all; }
.demo { position: absolute; left: 12px; right: 12px; bottom: calc(var(--sab) + 92px); display: none; justify-items: center; gap: 8px; }
.demo.is-on { display: grid; }
.demo__tag { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px; border-radius: 999px; background: rgba(22, 16, 10, .9); color: #fff; font-weight: 700; font-size: 14px; }
.demo__dot { width: 8px; height: 8px; border-radius: 50%; background: #79d18a; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.cover { position: absolute; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(20, 14, 9, .74); }
.cover.is-on { display: flex; animation: fade 200ms; }
@keyframes fade { from { opacity: 0; } }
.pane--play:has(.cover.is-on) :is(.hud, .hud2, .dock, .demo) { visibility: hidden; }
.card {
  width: 100%;
  max-width: 340px;
  display: grid;
  gap: 12px;
  padding: 20px 18px 16px;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .2) 40%), var(--wood) center / 420px auto, var(--maple);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 6px 0 #6b4826, 0 20px 40px rgba(0, 0, 0, .45);
  animation: cardIn 380ms cubic-bezier(.3, 1.4, .5, 1);
}
@keyframes cardIn { from { transform: translateY(30px) rotate(-2deg); } }
.card__k { justify-self: center; padding: 0 12px; border-radius: 6px; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; }
.card__h { font-family: var(--f-head); font-size: 26px; color: var(--ink); }
.card__time { display: flex; justify-content: center; align-items: baseline; gap: 10px; font-weight: 800; }
.card__time b { font-size: 30px; }
.card__time--big { justify-self: center; padding: 0 16px; border-radius: 8px; background: #20262b; }
.card__time--big b { font-size: 46px; line-height: 1.2; color: #f2f4f5; }
.card__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card__stats div { padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, .7); }
.card__stats dt { font-size: 12px; font-weight: 800; color: var(--ink-2); }
.card__stats dd { font-weight: 800; white-space: nowrap; }
.card__stats b { font-size: 24px; }
.card__new { justify-self: center; padding: 0 12px; border-radius: 999px; background: var(--felt); color: #fff; font-weight: 800; font-size: 14px; }
.card__new:empty { display: none; }
.card__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.card__links { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.tag-medal { position: relative; justify-self: center; width: 78px; height: 96px; display: grid; place-items: center; padding-top: 14px; border-radius: 12px 12px 16px 16px; transform: rotate(-6deg); background: linear-gradient(135deg, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0) 45%, rgba(0, 0, 0, .18)), currentColor; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35), 0 4px 0 rgba(0, 0, 0, .3); }
.tag-medal__hole { position: absolute; top: 10px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #3b2a1a; box-shadow: inset 0 2px 2px rgba(0, 0, 0, .6); }
.tag-medal svg { width: 44px; height: 44px; color: rgba(255, 255, 255, .92); filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .3)); }
.tag-medal.m-silver { color: #9aa4ab; }
.tag-medal.is-hit { animation: medalIn 700ms cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes medalIn { 0% { transform: scale(2.6) rotate(-40deg); opacity: 0; } 100% { transform: rotate(-6deg); opacity: 1; } }

/* ===== 記録 ===== */
.pane--records { background: var(--walnut); }
.recs { padding: 0 0 calc(var(--sab) + 24px); }
.trophy { position: relative; height: 230px; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px 14px; background: url(/app-development/apps/a027/img/medal.webp) center 40% / cover no-repeat; }
.trophy__counts { display: flex; gap: 8px; }
.cnt { display: inline-flex; align-items: center; gap: 4px; padding: 2px 12px 2px 8px; border-radius: 999px; background: rgba(22, 16, 10, .88); color: #fff; font-weight: 800; }
.cnt svg { width: 20px; height: 20px; }
.cnt--gold svg { color: #e9c46a; }
.cnt--silver svg { color: #cfd6db; }
.cnt--bronze svg { color: #d9915e; }
.cnt b { font-size: 20px; margin-left: 2px; }
.trophy__total { margin-top: 8px; align-self: flex-start; display: inline-flex; align-items: baseline; gap: 10px; padding: 2px 12px; border-radius: 8px; background: rgba(22, 16, 10, .88); color: #fff; font-weight: 700; font-size: 14px; }
.trophy__total b { font-size: 24px; }
.sample-note { margin: 12px 14px 0; padding: 8px 12px; border-radius: 8px; background: #f4e2c4; color: var(--ink); font-weight: 700; font-size: 14px; }
.sample-note[hidden] { display: none; }
.sec-h { display: flex; align-items: center; gap: 8px; margin: 22px 14px 10px; font-family: var(--f-head); font-size: 18px; color: #f5ead9; }
.sec-h::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--silver-2)); flex: none; }
.rec-list { list-style: none; margin: 0 14px; border-radius: 12px; overflow: hidden; background: var(--maple); }
.rec-list li { display: grid; grid-template-columns: 30px 1fr auto 28px; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid rgba(107, 72, 38, .25); background: linear-gradient(90deg, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0)); }
.rec-list li:last-child { border-bottom: 0; }
.rec__no { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 15px; }
.rec__name { font-weight: 800; font-size: 14px; line-height: 1.4; word-break: keep-all; min-width: 0; }
.rec__name small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.rec__time { font-size: 22px; white-space: nowrap; }
.rec__time.is-none { font-size: 15px; color: var(--ink-2); font-family: var(--f-body); font-weight: 700; }
.rec__medal { width: 26px; height: 26px; }
.hist { list-style: none; margin: 0 14px; display: grid; gap: 6px; }
.hist li { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); color: #f5ead9; }
.hist__t { font-weight: 700; font-size: 14px; line-height: 1.45; word-break: keep-all; }
.hist__t small { display: block; font-size: 12px; color: #d9c8b2; }
.hist__v { font-size: 20px; color: #fff; white-space: nowrap; }

/* ===== 設定 ===== */
.pane--settings { background: var(--walnut); }
.sets { padding: 0 0 calc(var(--sab) + 28px); }
.howto { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 14px; }
.howto__fig { border-radius: 12px; overflow: hidden; background: var(--maple); }
.howto__fig img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.howto__fig figcaption { padding: 8px 10px 10px; font-size: 13px; line-height: 1.6; color: var(--ink); word-break: normal; }
.howto__fig b { display: block; font-size: 14px; font-weight: 800; word-break: keep-all; }
.legend { list-style: none; margin: 10px 14px 0; display: grid; grid-template-columns: 1fr; gap: 6px; padding: 10px 12px; border-radius: 12px; background: url(/app-development/apps/a027/img/felt.webp) center / 300px auto, var(--felt); }
.legend li { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 14px; }
.lg { width: 26px; height: 26px; flex: none; border-radius: 50%; }
.lg--hole { background: radial-gradient(circle, #0b0805 0 45%, #3a2412 55%, var(--maple-2) 60% 72%, transparent 74%); }
.lg--check { box-shadow: inset 0 0 0 3px #dfe3e6, inset 0 0 0 5px rgba(0, 0, 0, .2); }
.lg--bump { background: radial-gradient(circle at 40% 35%, #f3dcb3, var(--maple-2) 60%, #7a5129); }
.lg--goal { background: radial-gradient(circle, #4d555c 0 35%, #f2f4f5 45%, #9aa3aa 70%, #dfe3e6 72%); }
.panel { margin: 0 14px; border-radius: 12px; background: var(--maple); overflow: hidden; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 10px 14px; border-bottom: 1px solid rgba(107, 72, 38, .25); }
.prow:last-child { border-bottom: 0; }
.prow--stack { display: grid; justify-content: stretch; gap: 8px; }
.prow__k { font-weight: 800; color: var(--ink); }
.prow__k small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); line-height: 1.5; }
.prow--btn { width: 100%; justify-content: flex-start; color: var(--danger); font-weight: 800; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 10px; background: rgba(42, 28, 17, .15); }
.seg button { min-height: 44px; border-radius: 8px; font-weight: 800; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--felt); color: #fff; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25); }
.sw { position: relative; width: 58px; height: 34px; flex: none; border-radius: 999px; background: #b59a78; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .3); transition: background 160ms; }
.sw i { position: absolute; top: 3px; left: 3px; width: 28px; height: 28px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--silver) 50%, var(--silver-2)); box-shadow: 0 2px 3px rgba(0, 0, 0, .35); transition: transform 200ms cubic-bezier(.3, 1.4, .5, 1); }
.sw[aria-checked="true"] { background: var(--felt-2); }
.sw[aria-checked="true"] i { transform: translateX(24px); }
.about { padding: 14px; display: grid; gap: 12px; }
.about__head { display: flex; gap: 12px; align-items: center; }
.about__head img { width: 64px; height: 64px; border-radius: 15px; }
.about__name { font-family: var(--f-head); font-size: 19px; }
.about__ver { font-size: 13px; color: var(--ink-2); }
.about__note { font-size: 14px; word-break: normal; }
.about__k { font-weight: 800; font-size: 14px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 2px 10px; border-radius: 6px; background: rgba(255, 255, 255, .6); font-size: 13px; font-weight: 700; white-space: nowrap; }

/* シート・トースト */
.veil { position: absolute; inset: 0; z-index: 30; background: rgba(10, 7, 4, .6); opacity: 0; pointer-events: none; transition: opacity 200ms; }
.veil.is-on { opacity: 1; pointer-events: auto; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 31; display: grid; gap: 12px; padding: 10px 18px calc(var(--sab) + 18px); border-radius: 18px 18px 0 0; background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .25)), var(--wood) center / 420px auto, var(--maple); transform: translateY(110%); transition: transform 300ms cubic-bezier(.2, .9, .3, 1.1); }
.sheet.is-on { transform: none; }
.sheet__grab { justify-self: center; width: 44px; height: 5px; border-radius: 3px; background: rgba(42, 28, 17, .35); }
.sheet h2 { font-family: var(--f-head); font-size: 20px; }
.sheet p { word-break: normal; font-size: 15px; }
.toast { position: absolute; left: 50%; top: calc(var(--sat) + 70px); z-index: 40; max-width: calc(100% - 32px); padding: 8px 16px; border-radius: 10px; background: #20262b; color: #fff; font-weight: 700; transform: translate(-50%, -14px); opacity: 0; pointer-events: none; transition: opacity 200ms, transform 200ms; word-break: keep-all; text-align: center; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.splash { position: absolute; inset: 0; z-index: 50; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--walnut) radial-gradient(circle at 50% 42%, #5a412a, var(--walnut) 70%); }
.splash.is-on { display: flex; }
.splash img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 12px 30px rgba(0, 0, 0, .5); animation: roll 700ms cubic-bezier(.3, 1.3, .5, 1); }
.splash p { font-family: var(--f-head); font-size: 22px; color: #f5ead9; }
.splash.is-out { animation: out 260ms ease-in forwards; }
@keyframes roll { from { transform: translateX(-60px) rotate(-90deg); opacity: 0; } }
@keyframes out { to { opacity: 0; visibility: hidden; } }
.nojs { position: absolute; left: 16px; right: 16px; top: 40%; z-index: 99; padding: 16px; border-radius: 12px; background: var(--maple); color: var(--ink); font-weight: 800; text-align: center; }
.nojs--late { display: none; }
html:not(.ready) .nojs--late { display: block; opacity: 0; animation: lateOn 0s 5s forwards; }
@keyframes lateOn { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .pane.is-in, .card, .cover.is-on, .splash img, .tag-medal.is-hit, .demo__dot { animation: none !important; }
  .sheet, .toast, .box { transition: none; }
  .fallnote.is-on { animation: none; }
}
@media (max-height: 700px) {
  .ttl__h span:first-child { font-size: 42px; }
  .ttl__h span:last-child { font-size: 50px; }
  .timer b { font-size: 22px; }
}
.tile.is-locked .tile__best { color: var(--ink); }
