/* ちびっこサーキット — おもちゃのジオラマ（赤×黄×芝の緑） */
:root {
  --red: #d8352a;
  --red-deep: #9e2219;
  --yellow: #ffc735;
  --yellow-deep: #b8860b;
  --turf: #3d9442;
  --turf-deep: #24672f;
  --felt: #2e7a39;
  --asphalt: #50545c;
  --ink: #1b1d22;
  --ink-soft: #464a52;
  --plastic: #fffdf6;
  --sky: #e7f4ec;
  --fast: #17803a;
  --slow: #c0281e;
  --f-logo: 'Dela Gothic One', 'M PLUS Rounded 1c', sans-serif;
  --f-body: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', sans-serif;
  --f-num: 'Lilita One', 'M PLUS Rounded 1c', sans-serif;
  --r-panel: 18px;
  --r-btn: 16px;
  --thick: 0 5px 0;
  --spring: cubic-bezier(.3, 1.5, .5, 1);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  font-family: var(--f-body);
  font-weight: 500;
  color: var(--ink);
  background: #1f5a2a;
  line-break: strict;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}
@media (min-width: 600px) {
  body {
    background:
      radial-gradient(circle at 20% 20%, rgba(255, 199, 53, .18), transparent 40%),
      radial-gradient(circle at 80% 70%, rgba(216, 53, 42, .16), transparent 45%),
      repeating-linear-gradient(45deg, #2a6f34 0 22px, #2e7a39 22px 44px);
  }
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
svg { display: block; }
.num { font-family: var(--f-num); font-weight: 400; letter-spacing: .02em; }
wbr { display: inline; }

.app {
  position: relative;
  height: 100dvh;
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  overflow: hidden;
  background-color: var(--felt);
  background-image:
    radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.6px),
    radial-gradient(rgba(0, 0, 0, .08) 1px, transparent 1.6px);
  background-size: 7px 7px, 9px 9px;
  background-position: 0 0, 3px 4px;
}
@media (min-width: 600px) { .app { box-shadow: 0 0 0 6px var(--yellow), 0 30px 80px rgba(0, 0, 0, .45); } }

/* ---------- 画面 ---------- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  visibility: hidden; opacity: 0;
  transform: translateX(28px);
  transition: transform .28s var(--ease), opacity .2s ease, visibility 0s .28s;
}
.screen.from-left { transform: translateX(-28px); }
.screen.is-active { visibility: visible; opacity: 1; transform: none; transition: transform .28s var(--ease), opacity .2s ease, visibility 0s; z-index: 2; }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* ---------- プラスチックのボタン ---------- */
.pbtn {
  --c: var(--plastic); --t: var(--ink); --edge: #c9c1a8;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px;
  border: 0; border-radius: var(--r-btn);
  background: var(--c); color: var(--t);
  box-shadow: var(--thick) var(--edge), 0 8px 14px rgba(0, 0, 0, .18);
  font-weight: 800; font-size: 16px; text-decoration: none; line-height: 1.2;
  word-break: keep-all;
  transform: translateY(0);
  transition: transform .07s ease, box-shadow .07s ease, filter .15s;
}
.pbtn::after { content: ''; position: absolute; left: 10px; right: 10px; top: 5px; height: 34%; border-radius: 12px 12px 30px 30px; background: linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, 0)); pointer-events: none; }
.pbtn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge), 0 3px 6px rgba(0, 0, 0, .18); }
.pbtn svg { width: 22px; height: 22px; flex: none; }
.pbtn--red { --c: var(--red); --t: #fff; --edge: var(--red-deep); }
.pbtn--white { --c: var(--plastic); --t: var(--ink); --edge: #c9c1a8; }
.pbtn--danger { --c: #b8231a; --t: #fff; --edge: #741610; }
.pbtn--l { min-height: 56px; font-size: 17px; width: 100%; }
.pbtn--xl { min-height: 64px; font-size: 20px; width: 100%; font-family: var(--f-logo); font-weight: 400; letter-spacing: .04em; }
.pbtn--xl svg { width: 26px; height: 26px; }
.pbtn--icon { width: 46px; min-height: 46px; height: 46px; padding: 0; border-radius: 14px; }
.pbtn--icon::after { left: 6px; right: 6px; }
.pbtn[disabled] { --c: #8c9288; --t: #fff; --edge: #5e645b; cursor: not-allowed; }
.pbtn[disabled]:active { transform: none; box-shadow: var(--thick) var(--edge); }

/* ---------- 上のバー ---------- */
.bar {
  flex: none;
  display: flex; align-items: center; gap: 12px;
  padding: calc(10px + var(--safe-t)) 14px 12px;
  position: relative; z-index: 3;
}
.bar__title { flex: 1; margin: 0; font-family: var(--f-logo); font-weight: 400; font-size: 21px; color: #fff; text-align: center; letter-spacing: .04em; text-shadow: 0 3px 0 rgba(0, 0, 0, .25); font-feature-settings: "palt"; }
.bar__sp { width: 46px; flex: none; }
.bar--float { position: absolute; left: 0; right: 0; top: 0; }
.bar--float .bar__title { flex: none; margin: 0 auto; padding: 4px 16px; border-radius: 12px; background: var(--ink); font-size: 18px; text-shadow: none; }

/* ---------- タイトル ---------- */
.screen--title {
  background: #6ab04c url(/app-development/apps/a010/img/title.webp) center / cover no-repeat;
}
.screen--title::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(rgba(30, 80, 30, .35), rgba(30, 80, 30, 0) 40%, rgba(20, 50, 20, 0) 55%, rgba(20, 50, 20, .55));
  pointer-events: none;
}
.title__top { position: relative; display: flex; justify-content: flex-end; padding: calc(12px + var(--safe-t)) 14px 0; }
.title__logo { position: relative; padding: 4px 22px 0; text-align: center; }
.title__kicker {
  display: inline-block; margin: 0 0 10px; padding: 5px 12px;
  background: var(--ink); color: var(--yellow); border-radius: 6px;
  font-family: var(--f-num); font-size: 13px; letter-spacing: .14em;
}
.logo { margin: 0; display: flex; flex-direction: column; align-items: center; line-height: 1; font-weight: 400; }
.logo__small {
  font-family: var(--f-logo); font-size: 30px; color: var(--ink);
  background: var(--yellow); padding: 6px 16px 8px; border-radius: 14px 14px 4px 4px;
  box-shadow: 0 4px 0 var(--yellow-deep);
  transform: rotate(-4deg); margin-bottom: -4px; position: relative; z-index: 1;
}
.logo__big {
  font-family: var(--f-logo); font-size: clamp(42px, 13vw, 54px); color: var(--red);
  letter-spacing: -.02em; line-height: 1.1;
  padding: 8px 18px 12px; border-radius: 20px;
  background: var(--plastic);
  box-shadow: 0 7px 0 #c9c1a8, 0 16px 24px rgba(0, 0, 0, .28);
  text-shadow: 0 4px 0 #f2c9c4;
  font-feature-settings: "palt";
  white-space: nowrap;
}
.title__lead {
  display: inline-block; margin: 16px 0 0; padding: 6px 14px;
  background: rgba(255, 253, 246, .94); border-radius: 999px;
  font-weight: 800; font-size: 15px; color: var(--turf-deep);
  word-break: keep-all;
}
.title__panel {
  position: relative; margin-top: auto;
  padding: 16px 18px calc(20px + var(--safe-b));
  display: grid; gap: 14px;
}
.title__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.title__row .pbtn { font-size: 15px; padding: 10px 8px; }
.title__trophies { display: flex; justify-content: center; }
.tchip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px 6px 8px; border-radius: 999px;
  background: rgba(27, 29, 34, .82); color: #fff;
}
.tchip__i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .12); }
.tchip__i svg { width: 19px; height: 19px; }
.tchip__i--gold { color: var(--yellow); }
.tchip__i--silver { color: #dfe5ea; }
.tchip__i--bronze { color: #e29b5c; }
.tchip__i--none { color: rgba(255, 255, 255, .38); }
.tchip__k { font-size: 14px; font-weight: 800; margin-left: 4px; white-space: nowrap; }
.tchip__k b { font-size: 17px; color: var(--yellow); }

/* ---------- コース選択 ---------- */
.screen--courses { background: transparent; }
.carousel {
  flex: 1; min-height: 0;
  display: flex; gap: 14px;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory;
  padding: 4px 9% 8px;
  align-items: center;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.carousel::-webkit-scrollbar { display: none; }
.ccard {
  flex: 0 0 82%;
  scroll-snap-align: center;
  display: flex; flex-direction: column;
  background: var(--plastic); border-radius: 22px;
  box-shadow: 0 6px 0 #c9c1a8, 0 18px 28px rgba(0, 0, 0, .28);
  overflow: hidden;
  transform: scale(.94);
  transition: transform .3s var(--spring);
  max-height: 100%;
}
.ccard.is-sel { transform: scale(1); }
.ccard__img { position: relative; flex: none; height: clamp(150px, 36dvh, 290px); background: #6ab04c center / cover no-repeat; }
.ccard__map {
  position: absolute; right: 10px; bottom: -26px; width: 76px; height: 76px; padding: 6px;
  background: var(--plastic); border-radius: 16px; box-shadow: 0 4px 0 #c9c1a8, 0 6px 12px rgba(0, 0, 0, .2);
}
.ccard__mapo { fill: none; stroke: var(--ink); stroke-width: 9; stroke-linejoin: round; }
.ccard__mapi { fill: none; stroke: var(--yellow); stroke-width: 4; stroke-linejoin: round; }
.ccard__map circle { fill: var(--red); stroke: #fff; stroke-width: 2; }
.ccard__no { position: absolute; left: 12px; top: 12px; padding: 4px 10px; border-radius: 8px; background: var(--ink); color: var(--yellow); font-family: var(--f-num); font-size: 14px; letter-spacing: .08em; }
.ccard__body { padding: 14px 16px 16px; overflow-y: auto; overscroll-behavior: contain; }
.ccard__en { margin: 0; font-family: var(--f-num); font-size: 13px; color: var(--red-deep); letter-spacing: .12em; }
.ccard__name { margin: 2px 0 4px; font-family: var(--f-logo); font-weight: 400; font-size: 25px; line-height: 1.2; font-feature-settings: "palt"; }
.ccard__stars { display: flex; align-items: center; gap: 2px; margin: 0 0 8px; }
.ccard__stars svg { width: 20px; height: 20px; color: #d6d0bc; }
.ccard__stars svg.on { color: #e5a900; }
.ccard__stars span { margin-left: 6px; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.ccard__lead { margin: 0 0 12px; font-size: 14px; line-height: 1.65; color: var(--ink-soft); word-break: keep-all; }
.ccard__stats { display: grid; grid-template-columns: 1fr 1fr .8fr; gap: 6px; margin: 0; }
.ccard__stats div { background: #f1ecdc; border-radius: 12px; padding: 8px 8px 7px; }
.ccard__stats dt { font-size: 11px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.ccard__stats dd { margin: 2px 0 0; font-size: 18px; white-space: nowrap; }
.ccard__stats dd b { font-size: 20px; }
.ccard__lock { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 800; word-break: keep-all; }
.ccard__lock svg { width: 20px; height: 20px; color: var(--yellow); flex: none; }
.ccard.is-locked .ccard__img { filter: grayscale(.85) brightness(.75); }
.dots { flex: none; display: flex; justify-content: center; gap: 8px; padding: 4px 0 2px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .4); transition: width .25s var(--spring), background .2s; }
.dots i.on { width: 26px; border-radius: 9px; background: var(--yellow); }
.courses__foot { flex: none; display: grid; gap: 10px; padding: 8px 18px calc(16px + var(--safe-b)); }
.ghostchip {
  justify-self: center;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 16px; border-radius: 999px; border: 2px solid rgba(255, 255, 255, .7);
  background: rgba(20, 50, 25, .55); color: #fff; font-weight: 800; font-size: 14px;
}
.ghostchip svg { width: 20px; height: 20px; color: #bfe6ff; }
.ghostchip[aria-pressed="false"] { opacity: .85; border-style: dashed; }
.ghostchip[aria-pressed="false"] svg { color: #fff; }

/* ---------- レース ---------- */
.screen--race { background: var(--turf); touch-action: none; }
.race__cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.tilt-blur { position: absolute; left: 0; right: 0; pointer-events: none; -webkit-backdrop-filter: blur(2.5px); backdrop-filter: blur(2.5px); }
.tilt-blur--top { top: 0; height: 22%; -webkit-mask-image: linear-gradient(#000, transparent); mask-image: linear-gradient(#000, transparent); }
.tilt-blur--bottom { bottom: 0; height: 16%; -webkit-mask-image: linear-gradient(transparent, #000); mask-image: linear-gradient(transparent, #000); }
.tilt-off .tilt-blur { display: none; }

.hud { position: absolute; left: 0; right: 0; top: 0; padding: calc(10px + var(--safe-t)) 12px 0; pointer-events: none; z-index: 3; }
.hud__row { display: flex; align-items: flex-start; gap: 10px; }
.hud__btns { display: flex; gap: 8px; pointer-events: auto; margin-left: auto; }
.pos {
  display: flex; align-items: baseline;
  padding: 2px 12px 4px; min-width: 84px;
  background: var(--yellow); border-radius: 16px; color: var(--ink);
  box-shadow: 0 5px 0 var(--yellow-deep), 0 8px 14px rgba(0, 0, 0, .25);
}
.pos__n { font-family: var(--f-num); font-weight: 400; font-size: 44px; line-height: 1; }
.pos__of { font-family: var(--f-num); font-size: 18px; margin-left: 2px; }
.pos__k { font-weight: 800; font-size: 15px; margin-left: 3px; }
.pos.pop { animation: pop .35s var(--spring); }
@keyframes pop { 0% { transform: scale(1.25); } 100% { transform: scale(1); } }
.hud__mid { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: 1; }
.lapbox { margin: 0; display: flex; align-items: baseline; gap: 4px; padding: 3px 12px; border-radius: 10px; background: var(--ink); color: #fff; font-family: var(--f-num); white-space: nowrap; }
.lapbox__k { font-size: 13px; letter-spacing: .1em; color: var(--yellow); }
.lapbox b { font-weight: 400; font-size: 22px; }
.lapbox__of { font-size: 14px; }
.clock { margin: 0; padding: 2px 10px; border-radius: 9px; background: rgba(255, 253, 246, .94); font-family: var(--f-num); font-size: 19px; color: var(--ink); white-space: nowrap; }
.clock i, .ticket__v i { font-style: normal; display: inline-block; width: .6em; text-align: center; }
.clock em, .ticket__v em { font-style: normal; display: inline-block; width: .3em; text-align: center; }
.hud__row2 { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; position: relative; }
.minimap { width: 92px; height: 92px; border-radius: 16px; background: rgba(27, 29, 34, .62); padding: 0; flex: none; box-shadow: 0 4px 10px rgba(0, 0, 0, .2); }
.minimap canvas { width: 92px; height: 92px; display: block; }
.order { list-style: none; margin: 0; padding: 6px 8px; display: grid; gap: 3px; background: rgba(27, 29, 34, .78); border-radius: 12px; color: #fff; font-size: 12px; font-weight: 800; }
.order li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.order li b { width: 12px; text-align: right; font-size: 13px; color: var(--yellow); }
.order li i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff; }
.order li.me span { color: var(--yellow); }
.delta {
  position: absolute; right: 0; top: 0; margin: 0;
  padding: 6px 12px; border-radius: 12px; font-family: var(--f-num); font-size: 18px; color: #fff;
  opacity: 0; transform: translateY(-6px) scale(.9); transition: opacity .2s, transform .25s var(--spring);
  white-space: nowrap;
}
.delta.is-on { opacity: 1; transform: none; }
.delta.is-fast { background: var(--fast); }
.delta.is-slow { background: var(--slow); }

.signal {
  position: absolute; left: 50%; top: 32%; z-index: 4;
  display: flex; gap: 8px; padding: 10px 12px;
  background: var(--ink); border-radius: 20px; border: 4px solid var(--yellow);
  transform: translate(-50%, -20px) scale(.8); opacity: 0;
  transition: transform .3s var(--spring), opacity .2s;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .35);
}
.signal.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.signal i { width: 40px; height: 40px; border-radius: 50%; background: #3a2422; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .35); }
.signal i.go { background: #1d3a24; }
.signal[data-n="2"] i:nth-child(1), .signal[data-n="1"] i:nth-child(-n+2), .signal[data-n="0"] i:nth-child(-n+3) { background: #ff4a3a; box-shadow: 0 0 16px #ff4a3a, inset 0 -4px 0 rgba(0, 0, 0, .2); }
.signal[data-n="3"] i:nth-child(1) { background: #ff4a3a; box-shadow: 0 0 16px #ff4a3a; }
.signal[data-n="2"] i:nth-child(-n+2) { background: #ff4a3a; box-shadow: 0 0 16px #ff4a3a; }
.signal[data-n="1"] i:nth-child(-n+3) { background: #ff4a3a; box-shadow: 0 0 16px #ff4a3a; }
.signal[data-n="0"] i { background: #3a2422; box-shadow: none; }
.signal[data-n="0"] i.go { background: #3ee06a; box-shadow: 0 0 22px #3ee06a; }

.banner {
  position: absolute; left: 50%; top: 38%; z-index: 4; margin: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transform: translate(-50%, 0) scale(.6); opacity: 0; pointer-events: none;
  transition: transform .35s var(--spring), opacity .2s;
}
.banner.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.banner b { font-family: var(--f-num); font-weight: 400; font-size: 52px; line-height: 1; color: var(--yellow); -webkit-text-stroke: 6px var(--ink); paint-order: stroke fill; letter-spacing: .03em; white-space: nowrap; text-shadow: 0 6px 0 rgba(0, 0, 0, .35); }
.banner span { padding: 4px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; font-size: 15px; white-space: nowrap; }
.banner.is-finish b { font-size: 64px; color: #fff; background: repeating-conic-gradient(var(--ink) 0 25%, #fff 0 50%) 0 0 / 18px 18px; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; -webkit-text-stroke: 3px var(--ink); }

.controls { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 14px calc(16px + var(--safe-b)); pointer-events: none; }
.steer { width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; position: relative; background: rgba(27, 29, 34, .32); border: 3px dashed rgba(255, 255, 255, .5); transition: background .15s, transform .15s; }
.steer.is-active { background: rgba(27, 29, 34, .5); transform: scale(1.04); }
.steer__wheel { width: 104px; height: 104px; color: var(--red); filter: drop-shadow(0 4px 0 var(--red-deep)); transition: transform .05s linear; }
.steer__k { position: absolute; bottom: -4px; left: 50%; transform: translateX(-50%); padding: 2px 10px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pedals { display: flex; align-items: flex-end; gap: 12px; pointer-events: auto; }
.pedal {
  border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink); font-weight: 800; font-size: 13px;
  box-shadow: 0 6px 0 var(--edge), 0 10px 16px rgba(0, 0, 0, .3);
  transition: transform .06s, box-shadow .06s;
  touch-action: none;
}
.pedal svg { width: 30px; height: 30px; }
.pedal--brake { --edge: #8f8a78; width: 74px; height: 92px; border-radius: 22px; background: var(--plastic); }
.pedal--acc { --edge: var(--yellow-deep); width: 92px; height: 124px; border-radius: 26px; background: var(--yellow); }
.pedal--acc svg { width: 38px; height: 38px; }
.pedal.is-down { transform: translateY(5px); box-shadow: 0 1px 0 var(--edge), 0 3px 6px rgba(0, 0, 0, .3); }

.coach { position: absolute; inset: auto 0 calc(170px + var(--safe-b)) 0; z-index: 4; display: flex; justify-content: space-between; padding: 0 16px; opacity: 0; transition: opacity .3s; pointer-events: none; }
.coach.is-on { opacity: 1; }
.coach p { margin: 0; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 14px; background: var(--plastic); color: var(--ink); font-weight: 800; font-size: 14px; word-break: keep-all; max-width: 48%; box-shadow: 0 4px 0 #c9c1a8; }
.coach svg { width: 22px; height: 22px; color: var(--red); flex: none; animation: nudge 1s ease-in-out infinite alternate; }
@keyframes nudge { from { transform: translateX(-4px); } to { transform: translateX(4px); } }

.demo { position: absolute; left: 0; right: 0; bottom: calc(26px + var(--safe-b)); z-index: 5; display: none; flex-direction: column; align-items: center; gap: 10px; padding: 0 28px; }
.is-demo .demo { display: flex; }
.is-demo .controls, .is-demo .coach { display: none; }
.demo__tag { margin: 0; display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; }
.demo__dot { width: 9px; height: 9px; border-radius: 50%; background: #ff4a3a; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.demo__hint { margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(27, 29, 34, .8); color: #fff; font-size: 14px; font-weight: 800; word-break: keep-all; }

.pause { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; padding: 24px; background: rgba(15, 30, 18, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
.pause.is-on { opacity: 1; visibility: visible; transition: opacity .2s; }
.pause__card { width: 100%; max-width: 340px; display: grid; gap: 12px; padding: 22px 18px 20px; border-radius: 24px; background: var(--plastic); box-shadow: 0 7px 0 #c9c1a8, 0 24px 40px rgba(0, 0, 0, .4); transform: scale(.9); transition: transform .3s var(--spring); }
.pause.is-on .pause__card { transform: none; }
.pause__eyebrow { margin: 0; text-align: center; font-weight: 800; font-size: 14px; color: var(--red-deep); }
.pause__title { margin: 0 0 6px; text-align: center; font-family: var(--f-logo); font-weight: 400; font-size: 30px; }
.pause__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.pause__row .pbtn { font-size: 14px; padding: 8px 6px; }

/* ---------- リザルト ---------- */
.result__scroll { padding-bottom: 16px; }
.result__hero {
  position: relative; min-height: 300px;
  padding: calc(78px + var(--safe-t)) 20px 30px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: #9fd2ea url(/app-development/apps/a010/img/result.webp) center 60% / cover no-repeat;
}
.result__hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 40px; background: linear-gradient(transparent, rgba(46, 122, 57, .9)); }
.result__course { margin: 0; padding: 4px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; }
.medal { display: flex; align-items: center; gap: 4px; margin-top: 12px; padding: 6px 22px 8px 14px; border-radius: 24px; background: var(--plastic); box-shadow: 0 6px 0 #c9c1a8, 0 14px 24px rgba(0, 0, 0, .25); animation: medal .6s var(--spring) both; }
@keyframes medal { from { transform: scale(.4) rotate(-8deg); opacity: 0; } }
.medal svg { width: 58px; height: 58px; }
.medal--gold svg { color: #e2a400; }
.medal--silver svg { color: #9aa6b0; }
.medal--bronze svg { color: #b86a2b; }
.medal--none svg { color: var(--ink); }
.medal__place { margin: 0; display: flex; align-items: baseline; font-weight: 400; }
.medal__place b { font-family: var(--f-num); font-weight: 400; font-size: 64px; line-height: 1; color: var(--red); }
.medal__place span { font-family: var(--f-logo); font-size: 24px; margin-left: 2px; }
.result__reason { position: relative; z-index: 1; margin: 14px 0 0; padding: 5px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 800; font-size: 15px; word-break: keep-all; }
.stamp { position: absolute; right: 18px; top: calc(118px + var(--safe-t)); margin: 0; display: none; flex-direction: column; align-items: center; justify-content: center; width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--red); color: var(--red); background: var(--plastic); font-weight: 800; font-size: 13px; line-height: 1.25; transform: rotate(14deg); }
.stamp.is-on { display: flex; animation: stamp .45s .35s var(--spring) both; }
@keyframes stamp { from { transform: rotate(14deg) scale(2.2); opacity: 0; } }
.ticket { position: relative; margin: -16px 14px 0; padding: 18px 16px 16px; border-radius: 22px; background: var(--plastic); box-shadow: 0 6px 0 #c9c1a8, 0 16px 26px rgba(0, 0, 0, .25); z-index: 1; }
.ticket__time { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding-bottom: 12px; border-bottom: 3px dashed #e1d9c2; }
.ticket__k { font-weight: 800; font-size: 14px; color: var(--ink-soft); }
.ticket__v { font-family: var(--f-num); font-size: 42px; line-height: 1; }
.ticket__g { padding: 3px 10px; border-radius: 8px; font-weight: 800; font-size: 14px; color: #fff; white-space: nowrap; }
.ticket__g:empty { display: none; }
.is-fast { color: #fff; }
.ticket__g.is-fast, .laps__d.is-fast { background: var(--fast); }
.ticket__g.is-slow, .laps__d.is-slow { background: var(--slow); }
.sub-h { margin: 16px 0 8px; font-size: 15px; font-weight: 800; color: var(--turf-deep); }
.laps, .podium, .hist { list-style: none; margin: 0; padding: 0; }
.laps { display: grid; gap: 6px; }
.laps li { display: grid; grid-template-columns: 52px 1fr auto 44px auto; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border-radius: 12px; background: #f1ecdc; }
.laps li.is-best { background: #fff1c2; box-shadow: inset 0 0 0 2px var(--yellow); }
.laps__k { font-family: var(--f-num); font-size: 14px; color: var(--ink-soft); white-space: nowrap; }
.laps__bar { height: 10px; border-radius: 6px; background: #e1d9c2; overflow: hidden; }
.laps__bar i { display: block; height: 100%; border-radius: 6px; background: var(--red); transform-origin: left; animation: grow .7s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); } }
.laps__t { font-size: 19px; }
.laps em { font-style: normal; font-family: var(--f-num); font-size: 12px; padding: 2px 6px; border-radius: 6px; background: var(--ink); color: var(--yellow); text-align: center; }
.laps em.sp { background: none; }
.laps__d { padding: 2px 6px; border-radius: 6px; font-family: var(--f-num); font-size: 13px; color: #fff; white-space: nowrap; }
.podium { display: grid; gap: 6px; }
.podium li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 12px; background: #f1ecdc; }
.podium li.me { background: var(--ink); color: #fff; }
.podium__n { width: 22px; font-size: 22px; text-align: center; }
.podium li:nth-child(1) .podium__n { color: #7a5600; }
.podium li.me .podium__n { color: var(--yellow); }
.podium li i { width: 16px; height: 16px; border-radius: 5px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(0, 0, 0, .25); flex: none; }
.podium__name { flex: 1; font-weight: 800; font-size: 15px; }
.podium__t { font-size: 18px; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.podium__t small { font-family: var(--f-body); font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: #e1d9c2; color: var(--ink); }
.unlock { display: none; margin: 14px 0 0; padding: 12px; border-radius: 14px; background: var(--red); color: #fff; font-weight: 800; font-size: 15px; align-items: center; gap: 10px; word-break: keep-all; }
.unlock.is-on { display: flex; animation: pop .5s var(--spring); }
.unlock svg { width: 28px; height: 28px; flex: none; color: var(--yellow); }
.sec-h { margin: 22px 18px 8px; font-size: 15px; font-weight: 800; color: #fff; letter-spacing: .04em; }
.hist { margin: 0 14px; display: grid; gap: 6px; }
.hist li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border-radius: 14px; background: var(--plastic); }
.hist__p { width: 46px; flex: none; text-align: center; font-weight: 800; font-size: 13px; padding: 4px 0; border-radius: 10px; background: #e7e2d2; white-space: nowrap; }
.hist__p b { font-size: 20px; }
.hist__p--gold { background: var(--yellow); }
.hist__p--silver { background: #dfe5ea; }
.hist__p--bronze { background: #f0c49b; }
.hist__c { flex: 1; font-weight: 800; font-size: 15px; display: flex; flex-direction: column; }
.hist__c small { font-size: 12px; font-weight: 500; color: var(--ink-soft); }
.hist__t { font-size: 19px; white-space: nowrap; }
.empty { display: none; margin: 24px 18px; padding: 24px; border-radius: 20px; background: var(--plastic); text-align: center; }
.empty.is-on { display: block; }
.empty svg { width: 54px; height: 54px; margin: 0 auto 8px; color: var(--red); }
.empty__t { margin: 0; font-family: var(--f-logo); font-size: 20px; word-break: keep-all; }
.empty__p { margin: 6px 0 0; font-size: 14px; color: var(--ink-soft); word-break: keep-all; }
.screen--result.is-empty .result__hero, .screen--result.is-empty .ticket { display: none; }
.screen--result.is-empty .result__scroll { padding-top: calc(70px + var(--safe-t)); }
.result__actions { flex: none; display: grid; grid-template-columns: 1.4fr 1fr; gap: 10px; padding: 10px 14px calc(14px + var(--safe-b)); background: linear-gradient(rgba(46, 122, 57, 0), var(--felt) 30%); }

/* ---------- 設定 ---------- */
.settings__scroll { padding-bottom: calc(26px + var(--safe-b)); }
.howto { list-style: none; margin: 0 14px; padding: 0; display: grid; gap: 10px; }
.howto__card { display: grid; grid-template-columns: 104px 1fr; gap: 12px; align-items: start; padding: 10px; border-radius: 18px; background: var(--plastic); box-shadow: 0 4px 0 #c9c1a8; }
.howto__card img { width: 104px; height: 104px; border-radius: 12px; object-fit: cover; }
.howto__no { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--red); color: #fff; font-family: var(--f-num); font-size: 16px; }
.howto__card h3 { display: inline; margin: 0 0 0 6px; font-size: 16px; font-weight: 800; word-break: keep-all; }
.howto__card p { margin: 6px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft); word-break: keep-all; }
.group { margin: 0 14px; border-radius: 18px; background: var(--plastic); box-shadow: 0 4px 0 #c9c1a8; overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border-bottom: 2px solid #efe8d5; }
.row:last-child { border-bottom: 0; }
.row--stack { flex-direction: column; align-items: stretch; }
.row__label { flex: 1; font-weight: 800; font-size: 15px; display: flex; flex-direction: column; word-break: keep-all; }
label.row__label { flex-direction: row; align-items: baseline; gap: 6px; }
.row__label b { font-size: 20px; color: var(--red); }
.row__label small { font-weight: 500; font-size: 13px; color: var(--ink-soft); }
.row__note { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft); word-break: keep-all; }
.row--btn { width: 100%; border: 0; background: none; color: #b8231a; font-weight: 800; font-size: 15px; justify-content: flex-start; }
.row--btn svg { width: 22px; height: 22px; }
.row--btn:active { background: #f6efdd; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 14px; background: #ece5d1; }
.seg button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; border-radius: 11px; background: none; font-weight: 800; font-size: 15px; color: var(--ink-soft); transition: background .15s, transform .1s; }
.seg button svg { width: 20px; height: 20px; }
.seg button[aria-pressed="true"] { background: var(--red); color: #fff; box-shadow: 0 3px 0 var(--red-deep); }
.seg button:active { transform: scale(.96); }
.switch { flex: none; position: relative; width: 58px; height: 34px; border-radius: 999px; border: 0; background: #c9c1a8; transition: background .2s; }
.switch i { position: absolute; left: 3px; top: 3px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 rgba(0, 0, 0, .2); transition: transform .25s var(--spring); }
.switch[aria-checked="true"] { background: var(--turf-deep); }
.switch[aria-checked="true"] i { transform: translateX(24px); }
.range { width: 100%; height: 44px; accent-color: var(--red); }
.range__ends { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; color: var(--ink-soft); }
.about { padding: 16px 14px; display: grid; gap: 12px; }
.about__head { display: flex; align-items: center; gap: 12px; }
.about__head img { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 3px 0 #c9c1a8; }
.about__name { margin: 0; font-family: var(--f-logo); font-size: 19px; }
.about__ver { margin: 2px 0 0; font-size: 13px; color: var(--ink-soft); }
.about__note { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink); }
.about__k { margin: 0; font-weight: 800; font-size: 14px; color: var(--turf-deep); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 5px 10px; border-radius: 8px; background: #ece5d1; font-size: 13px; font-weight: 800; }
.about__cta { margin-top: 4px; }

/* ---------- シート・トースト・スプラッシュ ---------- */
.scrim { position: absolute; inset: 0; z-index: 20; background: rgba(10, 20, 12, .5); opacity: 0; visibility: hidden; transition: opacity .2s, visibility 0s .2s; }
.scrim.is-on { opacity: 1; visibility: visible; transition: opacity .2s; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 21; display: grid; gap: 12px; padding: 12px 18px calc(20px + var(--safe-b)); border-radius: 26px 26px 0 0; background: var(--plastic); transform: translateY(105%); transition: transform .32s var(--ease); touch-action: none; }
.sheet.is-on { transform: translateY(0); }
.sheet__grab { justify-self: center; width: 44px; height: 5px; border-radius: 3px; background: #d6cfb8; }
.sheet h2 { margin: 4px 0 0; font-family: var(--f-logo); font-weight: 400; font-size: 21px; line-height: 1.35; word-break: keep-all; font-feature-settings: "palt"; }
.sheet p { margin: 0 0 6px; font-size: 15px; line-height: 1.7; color: var(--ink-soft); word-break: keep-all; }
.toast { position: absolute; left: 50%; bottom: calc(100px + var(--safe-b)); z-index: 30; max-width: calc(100% - 40px); padding: 12px 18px; border-radius: 14px; background: var(--ink); color: #fff; font-weight: 800; font-size: 14px; line-height: 1.5; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .3s var(--spring), opacity .2s; }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.splash { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--felt); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.splash.is-on { opacity: 1; visibility: visible; transition: none; }
.splash img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 6px 0 rgba(0, 0, 0, .25); animation: pop .5s var(--spring); }
.splash p { margin: 0; font-family: var(--f-logo); font-size: 24px; color: #fff; }
.noscript { position: absolute; inset: auto 20px 40px; padding: 14px; border-radius: 12px; background: var(--plastic); font-size: 15px; z-index: 50; }

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