/* カミヒコーキ — 朝焼けのパステル空 × 折り紙の手ざわり */
:root {
  --ink: #22385a;
  --ink-2: #566a86;
  --coral: #c4475d;
  --coral-deep: #b33b52;
  --coral-edge: #93304a;
  --peach: #ffc9b8;
  --peach-soft: #ffe8df;
  --sky: #8fcdea;
  --sky-soft: #e4f4fb;
  --paper: #fffdfb;
  --paper-fold: #f3ecec;
  --gold: #f2b544;
  --danger: #b3263e;

  --f-jp: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "BIZ UDPGothic", sans-serif;
  --f-num: "Baloo 2", "Zen Maru Gothic", sans-serif;

  --r-xl: 28px;
  --r-l: 20px;
  --r-m: 14px;
  --r-pill: 999px;

  --sh-soft: 0 14px 34px rgba(196, 71, 93, .16), 0 2px 8px rgba(34, 56, 90, .08);
  --sh-card: 0 8px 24px rgba(34, 56, 90, .10);

  --t-fast: 160ms;
  --t-mid: 280ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #f7d9d3;
  color: var(--ink);
  font-family: var(--f-jp);
  font-weight: 500;
  font-size: 15px;
  line-height: 1.6;
  line-break: strict;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
svg { display: block; }
.num { font-family: var(--f-num); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: .01em; }
h1, h2, h3 { font-feature-settings: "palt"; word-break: keep-all; overflow-wrap: anywhere; margin: 0; }
p { margin: 0; }

/* ---------- アプリの外枠 ---------- */
.app {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #f7d9d3;
  isolation: isolate;
}
@media (min-width: 600px) {
  body {
    background: #f4d6d2 url(/app-development/apps/a001/img/sky.webp) center / cover no-repeat;
  }
  .app {
    left: 50%;
    right: auto;
    width: 430px;
    transform: translateX(-50%);
    box-shadow: 0 30px 80px rgba(34, 56, 90, .28);
  }
}

/* ---------- 画面の切り替え ---------- */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  visibility: hidden;
  opacity: 0;
  transform: translateY(14px) scale(.985);
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease), visibility 0s linear var(--t-mid);
  overflow: hidden;
}
.screen.is-active {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition-delay: 0s;
  z-index: 2;
}
.screen--settings { transform: translateX(40px); }
.screen--settings.is-active { transform: none; }
.app:not([data-route]) .screen--title { visibility: visible; opacity: 1; transform: none; }
.scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* ---------- ボタン ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-l);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  transition: transform var(--t-fast) var(--spring), box-shadow var(--t-fast) var(--ease), filter var(--t-fast);
  word-break: keep-all;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:active { transform: translateY(4px) scale(.98); }
.btn:focus-visible, .icon-btn:focus-visible, .switch:focus-visible, .seg button:focus-visible, .row--btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
/* 折った紙のように、斜めの折り目で明暗を分ける */
.btn--primary {
  color: #fff;
  background: linear-gradient(104deg, var(--coral) 0 54%, var(--coral-deep) 54% 100%);
  box-shadow: 0 5px 0 var(--coral-edge), 0 14px 26px rgba(179, 59, 82, .32);
}
.btn--primary:active { box-shadow: 0 1px 0 var(--coral-edge), 0 6px 12px rgba(179, 59, 82, .28); }
.btn--paper {
  color: var(--ink);
  background: linear-gradient(104deg, var(--paper) 0 54%, var(--paper-fold) 54% 100%);
  box-shadow: 0 4px 0 rgba(34, 56, 90, .14), 0 10px 22px rgba(34, 56, 90, .10);
}
.btn--paper:active { box-shadow: 0 1px 0 rgba(34, 56, 90, .14); }
.btn--danger {
  color: #fff;
  background: var(--danger);
  box-shadow: 0 5px 0 #7d1a2b;
}
.btn--danger:active { box-shadow: 0 1px 0 #7d1a2b; }
.btn--text {
  min-height: 44px;
  padding: 0 12px;
  background: none;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1.5px;
  font-size: 15px;
}
.btn--xl { min-height: 64px; font-size: 20px; border-radius: 22px; padding: 0 28px; letter-spacing: .04em; }
.btn--xl svg { width: 26px; height: 26px; }
.btn--l { min-height: 56px; font-size: 19px; }
.btn--square { width: 56px; min-height: 56px; padding: 0; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  transition: transform var(--t-fast) var(--spring), background var(--t-fast);
  text-decoration: none;
}
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn:active { transform: scale(.88); }
.icon-btn--glass {
  background: rgba(255, 253, 251, .74);
  -webkit-backdrop-filter: blur(12px) saturate(1.3);
  backdrop-filter: blur(12px) saturate(1.3);
  box-shadow: 0 4px 14px rgba(34, 56, 90, .12), inset 0 0 0 1px rgba(255, 255, 255, .7);
}

/* ---------- タイトル ---------- */
.screen--title {
  background: #f6d6d6 url(/app-development/apps/a001/img/title.webp) center 62% / cover no-repeat;
  padding: calc(var(--sat) + 10px) 20px calc(var(--sab) + 22px);
}
.title__clouds { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.title__clouds i {
  position: absolute;
  width: 220px;
  height: 70px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .85), rgba(255, 255, 255, 0));
  filter: blur(4px);
  animation: drift 26s linear infinite;
}
.title__clouds i:nth-child(1) { top: 40%; left: -40%; }
.title__clouds i:nth-child(2) { top: 52%; left: -60%; width: 300px; animation-duration: 34s; animation-delay: -12s; }
.title__clouds i:nth-child(3) { top: 30%; left: -50%; width: 160px; animation-duration: 22s; animation-delay: -6s; opacity: .7; }
@keyframes drift { to { transform: translateX(170vw); } }
@media (min-width: 600px) { @keyframes drift { to { transform: translateX(760px); } } }

.title__bar { position: relative; display: flex; justify-content: flex-end; }
.title__logo { position: relative; margin-top: 7vh; text-align: center; }
.title__kicker {
  display: flex;
  justify-content: center;
  gap: 14px;
  font-family: var(--f-num);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--ink);
}
.title__kicker span + span::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 14px 3px 0; border-radius: 50%; background: var(--coral); vertical-align: middle; }
.logo {
  margin-top: 6px;
  font-weight: 900;
  font-size: clamp(46px, 14.2vw, 60px);
  line-height: 1.1;
  letter-spacing: .02em;
  white-space: nowrap;
  text-shadow: 0 3px 0 rgba(255, 253, 251, .95), 0 10px 24px rgba(196, 71, 93, .22);
}
.logo__kami { color: var(--coral-deep); }
.logo__hikoki { color: var(--ink); }
.title__lead {
  margin-top: 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  word-break: keep-all;
  text-shadow: 0 1px 10px rgba(255, 253, 251, .9);
}
.title__bottom {
  position: relative;
  margin-top: auto;
  display: grid;
  gap: 14px;
  justify-items: center;
}
.title__bottom .btn--xl { width: 100%; }
.title__sub { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; }
.title__sub .btn { padding: 0 10px; font-size: 15px; gap: 8px; }
.best-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px 6px 12px;
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: var(--sh-card);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.best-chip svg { width: 18px; height: 18px; color: var(--gold); }
.best-chip b { font-size: 22px; line-height: 1.2; color: var(--ink); }

/* ---------- プレイ ---------- */
.screen--play {
  background: linear-gradient(#bfe2f5, #f7d6d4);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transform: none;
}
.gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.flash.is-on { animation: flash .5s var(--ease); }
@keyframes flash { 0% { opacity: .85; } 100% { opacity: 0; } }

.hud {
  position: absolute;
  inset: 0 0 auto;
  padding: calc(var(--sat) + 10px) 16px 0;
  pointer-events: none;
}
.hud__row { display: flex; align-items: flex-start; justify-content: space-between; }
.hud__score { display: grid; line-height: 1; }
.hud__label { font-size: 14px; font-weight: 700; color: var(--ink); letter-spacing: .1em; text-shadow: 0 0 8px rgba(255, 253, 251, .9); }
.hud__score b {
  font-size: 46px;
  line-height: 1;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 253, 251, .9), 0 0 18px rgba(255, 253, 251, .8);
  transition: transform var(--t-fast) var(--spring);
}
.hud__score b.is-bump { transform: scale(1.14); }
.hud__right { display: flex; gap: 8px; pointer-events: auto; }
.hud__meters { display: flex; gap: 8px; margin-top: 10px; }
.pill {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 253, 251, .78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 14px;
}
.pill__k { color: var(--ink-2); font-weight: 700; }
.pill b { font-size: 16px; color: var(--ink); }

.wind {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 5px 12px 5px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 253, 251, .78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  font-size: 14px;
  font-weight: 700;
}
.wind svg { width: 20px; height: 20px; color: var(--coral-deep); }
.wind__bar { position: relative; width: 120px; height: 10px; border-radius: 6px; background: rgba(34, 56, 90, .14); overflow: hidden; }
.wind__bar i {
  position: absolute;
  inset: 0;
  transform-origin: left center;
  transform: scaleX(var(--w));
  border-radius: 6px;
  background: linear-gradient(90deg, #ffb39f, var(--coral));
  transition: transform .12s linear;
}
.wind.is-low .wind__bar i { background: var(--danger); animation: low .6s ease-in-out infinite alternate; }
@keyframes low { to { opacity: .45; } }

.combo {
  position: absolute;
  top: calc(var(--sat) + 82px);
  right: 16px;
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 4px 14px;
  border-radius: var(--r-pill);
  background: var(--coral-deep);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  opacity: 0;
  transform: scale(.6);
  transition: opacity var(--t-fast), transform var(--t-mid) var(--spring);
}
.combo b { font-size: 22px; line-height: 1.1; }
.combo.is-on { opacity: 1; transform: none; }

.pops { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pop {
  position: absolute;
  left: 0;
  top: 0;
  translate: -50% -50%;
  font-family: var(--f-num);
  font-weight: 800;
  font-size: 30px;
  color: var(--coral-deep);
  white-space: nowrap;
  text-shadow: 0 2px 0 #fff, 0 0 14px rgba(255, 255, 255, .95);
  animation: pop .9s var(--ease) forwards;
}
.pop small { display: block; font-family: var(--f-jp); font-size: 15px; font-weight: 900; color: var(--ink); text-align: center; }
.pop--gold { color: #9a5b00; }
@keyframes pop { 0% { opacity: 0; transform: translateY(8px) scale(.6); } 18% { opacity: 1; transform: translateY(0) scale(1.08); } 100% { opacity: 0; transform: translateY(-46px) scale(1); } }

.warn {
  position: absolute;
  left: 50%;
  top: 38%;
  display: flex;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100% - 48px);
  padding: 10px 18px;
  border-radius: var(--r-l);
  background: var(--danger);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  word-break: keep-all;
  translate: -50% 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-fast), visibility 0s var(--t-fast);
  pointer-events: none;
}
.warn svg { width: 22px; height: 22px; flex: none; }
.warn.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }

.demo {
  position: absolute;
  inset: auto 20px calc(var(--sab) + 28px);
  display: grid;
  justify-items: center;
  gap: 12px;
  visibility: hidden;
}
.screen--play.is-demo .demo { visibility: visible; }
.screen--play.is-demo .hud__score, .screen--play.is-demo .hud__meters, .screen--play.is-demo .wind { visibility: hidden; }
.demo__tag {
  position: fixed;
  top: calc(var(--sat) + 16px);
  left: 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  background: var(--paper);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  box-shadow: var(--sh-card);
}
.demo__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: blink 1.2s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.demo .btn { width: 100%; }
.demo__hint {
  padding: 4px 14px;
  border-radius: var(--r-pill);
  background: rgba(255, 253, 251, .88);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  word-break: keep-all;
}

.coach {
  position: absolute;
  left: 50%;
  top: 33%;
  width: 240px;
  translate: -50% -50%;
  display: grid;
  justify-items: center;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-mid), visibility 0s var(--t-mid);
}
.coach.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
.coach__path { width: 220px; height: 132px; filter: drop-shadow(0 2px 6px rgba(34, 56, 90, .25)); }
.coach__finger { offset-path: path("M20 90 C 60 20, 100 20, 120 60 S 170 100, 185 40"); animation: trace 2.2s var(--ease) infinite; }
@keyframes trace { 0% { offset-distance: 0%; opacity: 0; } 12% { opacity: 1; } 85% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
.coach__text {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  word-break: keep-all;
  text-align: center;
}

.pause, .glfail {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(34, 56, 90, .36);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--t-mid), visibility 0s var(--t-mid);
}
.pause.is-on, .glfail.is-on { visibility: visible; opacity: 1; transition-delay: 0s; }
.pause__card {
  width: min(100%, 330px);
  display: grid;
  gap: 12px;
  padding: 26px 22px 16px;
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow: 0 24px 60px rgba(34, 56, 90, .3);
  text-align: center;
  transform: scale(.92);
  transition: transform var(--t-mid) var(--spring);
}
.pause.is-on .pause__card { transform: none; }
.pause__eyebrow { font-size: 14px; font-weight: 700; color: var(--coral-deep); letter-spacing: .12em; }
.pause__title { font-size: 30px; font-weight: 900; line-height: 1.2; }
.pause__stat { display: flex; justify-content: center; align-items: baseline; gap: 10px; margin-bottom: 6px; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.pause__stat b { font-size: 28px; color: var(--ink); }
.pause__row { display: flex; justify-content: center; gap: 4px; }
.glfail {
  background: var(--sky-soft);
  align-content: center;
  gap: 14px;
  text-align: center;
}
.glfail h2 { font-size: 22px; font-weight: 900; }
.glfail p { color: var(--ink-2); font-size: 15px; word-break: keep-all; max-width: 300px; }
.glfail .btn { width: min(100%, 300px); }

.loading {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: var(--r-pill);
  background: var(--paper);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  box-shadow: var(--sh-card);
  visibility: hidden;
}
.screen--play.is-loading .loading { visibility: visible; }
.loading__dot { width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--peach); border-top-color: var(--coral-deep); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- リザルト ---------- */
.screen--result {
  background: #fbe3e1 url(/app-development/apps/a001/img/result.webp) center top / cover no-repeat;
}
.topbar {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  padding: calc(var(--sat) + 6px) 12px 6px;
  background: rgba(255, 253, 251, .88);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(34, 56, 90, .08);
}
.topbar--clear { background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.topbar__title { text-align: center; font-weight: 700; font-size: 17px; }
.topbar--clear .topbar__title { visibility: hidden; }
.topbar--clear { transition: background var(--t-fast), box-shadow var(--t-fast); }
.topbar--clear.is-solid { background: rgba(255, 253, 251, .9); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 rgba(34, 56, 90, .08); }
.topbar--clear.is-solid .topbar__title { visibility: visible; }
.topbar--clear.is-solid .icon-btn--glass { box-shadow: none; background: transparent; }
.result__scroll { margin-top: calc(-56px - var(--sat)); }
.result__hero {
  position: relative;
  min-height: 40dvh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0 24px 22px;
}
.result__reason {
  align-self: flex-start;
  padding: 3px 12px;
  border-radius: var(--r-pill);
  background: var(--paper);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.result__title {
  margin-top: 8px;
  font-size: 40px;
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink);
  text-shadow: 0 2px 0 rgba(255, 253, 251, .95), 0 0 20px rgba(255, 253, 251, .9);
}
.stamp {
  position: absolute;
  right: 24px;
  bottom: 18px;
  display: grid;
  place-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 3px solid var(--coral-deep);
  outline: 2px dashed var(--coral-deep);
  outline-offset: -9px;
  background: var(--paper);
  color: var(--coral-deep);
  font-weight: 900;
  font-size: 16px;
  line-height: 1.15;
  text-align: center;
  transform: rotate(-12deg);
  opacity: 0;
  visibility: hidden;
}
.stamp.is-on { visibility: visible; animation: stamp .5s var(--spring) .45s both; }
@keyframes stamp { 0% { opacity: 0; transform: rotate(-12deg) scale(1.8); } 100% { opacity: 1; transform: rotate(-12deg) scale(1); } }
.sheet-card {
  position: relative;
  margin: 0;
  padding: 24px 20px calc(var(--sab) + 112px);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--paper);
  box-shadow: 0 -10px 30px rgba(34, 56, 90, .10);
  min-height: 60dvh;
}
.result__score { display: grid; justify-items: center; line-height: 1; }
.result__label { font-size: 14px; font-weight: 700; color: var(--ink-2); letter-spacing: .14em; }
.result__score > b { margin: 4px 0 6px; font-size: 64px; line-height: 1; color: var(--coral-deep); }
.result__best { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.result__best b { font-size: 18px; color: var(--ink); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 22px 0 0; }
.stat { padding: 12px 14px; border-radius: var(--r-l); background: var(--sky-soft); }
.stat dt { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.stat dt svg { width: 18px; height: 18px; color: var(--coral-deep); }
.stat dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; white-space: nowrap; }
.stat dd b { font-size: 28px; line-height: 1.2; margin-right: 3px; color: var(--ink); }
.sub-h { margin: 28px 0 12px; font-size: 18px; font-weight: 900; }
.chart {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 160px;
  padding: 46px 6px 0;
  border-bottom: 2px solid rgba(34, 56, 90, .14);
}
.bar {
  position: relative;
  flex: 1;
  min-height: 6px;
  border-radius: 10px 10px 3px 3px;
  background: linear-gradient(#bfe4f5, var(--sky));
  transform-origin: bottom;
  animation: grow .6s var(--spring) both;
}
.bar.is-best { background: linear-gradient(#ffb7a5, var(--coral)); }
.bar.is-now::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--ink);
}
.bar__tag {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 16px);
  translate: -50% 0;
  padding: 1px 8px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
@keyframes grow { from { transform: scaleY(0); } }
.chart__cap { margin-top: 8px; font-size: 14px; color: var(--ink-2); font-weight: 700; }
.chart__cap .num { color: var(--ink); }
.flights { list-style: none; margin: 18px 0 0; padding: 0; }
.flight {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0 12px 22px;
  border-bottom: 1px dashed rgba(34, 56, 90, .2);
}
.flight::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 50%;
  border: 2.5px solid var(--sky);
  background: var(--paper);
}
.flight.is-best::before { border-color: var(--coral-deep); background: var(--coral-deep); }
.flight__no { font-weight: 900; font-size: 15px; white-space: nowrap; }
.flight__when { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.flight__dist { font-size: 14px; color: var(--ink-2); font-weight: 700; justify-self: end; white-space: nowrap; }
.flight__score { font-size: 22px; color: var(--ink); min-width: 74px; text-align: right; }
.flight__score small { font-family: var(--f-jp); font-size: 14px; font-weight: 700; margin-left: 2px; }
.empty { display: none; justify-items: center; text-align: center; gap: 6px; padding: 24px 0 10px; }
.empty svg { width: 56px; height: 56px; color: var(--sky); margin-bottom: 4px; }
.empty__title { font-size: 18px; font-weight: 900; word-break: keep-all; }
.empty__text { font-size: 15px; color: var(--ink-2); word-break: keep-all; }
.screen--result.is-empty .empty { display: grid; }
.screen--result.is-empty .chart, .screen--result.is-empty .chart__cap, .screen--result.is-empty .flights,
.screen--result.is-empty .result__score, .screen--result.is-empty .stats, .screen--result.is-empty .sub-h { display: none; }
.result__actions {
  position: absolute;
  inset: auto 0 0;
  z-index: 3;
  display: flex;
  gap: 12px;
  padding: 14px 20px calc(var(--sab) + 16px);
  background: var(--paper);
  box-shadow: 0 -1px 0 rgba(34, 56, 90, .08);
}
.result__actions .btn--primary { flex: 1; }

/* ---------- 遊び方・設定 ---------- */
.screen--settings { background: linear-gradient(175deg, var(--sky-soft) 0%, #fdf1ee 55%, var(--peach-soft) 100%); }
.settings__scroll { padding: 4px 0 calc(var(--sab) + 40px); }
.sec-h { margin: 22px 22px 10px; font-size: 15px; font-weight: 900; color: var(--ink); letter-spacing: .08em; }
.howto {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 14px;
  margin: 0;
  padding: 2px 20px 10px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 20px;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.howto::-webkit-scrollbar { display: none; }
.howto__card {
  scroll-snap-align: start;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--paper);
  box-shadow: var(--sh-card);
}
.howto__card img { width: 100%; aspect-ratio: 1 / .78; object-fit: cover; }
.howto__body { position: relative; padding: 16px 18px 20px; }
.howto__no {
  position: absolute;
  right: 16px;
  top: -24px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--coral-deep);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 0 0 4px var(--paper);
}
.howto__body h3 { font-size: 19px; font-weight: 900; line-height: 1.35; }
.howto__body p { margin-top: 6px; font-size: 15px; color: var(--ink-2); word-break: keep-all; }

.group {
  margin: 0 16px;
  border-radius: var(--r-l);
  background: var(--paper);
  box-shadow: var(--sh-card);
  overflow: hidden;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 10px 16px;
}
.row + .row { border-top: 1px solid rgba(34, 56, 90, .08); }
.row--stack { display: grid; justify-content: stretch; gap: 10px; padding: 14px 16px; }
.row__label { font-weight: 700; font-size: 16px; }
.row__label small { display: block; font-size: 14px; font-weight: 500; color: var(--ink-2); }
.row__label b { margin-left: 6px; color: var(--coral-deep); font-size: 18px; }
.row__note { font-size: 14px; color: var(--ink-2); word-break: keep-all; }
.row--btn {
  width: 100%;
  border: 0;
  background: none;
  justify-content: center;
  gap: 8px;
  color: var(--danger);
  font-weight: 700;
  font-size: 16px;
}
.row--btn svg { width: 22px; height: 22px; }
.row--btn:active { background: var(--peach-soft); }

.seg {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 16px;
  background: var(--sky-soft);
}
.seg button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  font-weight: 700;
  font-size: 15px;
  color: var(--ink-2);
  transition: background var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast) var(--spring);
}
.seg button svg { width: 20px; height: 20px; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 3px 10px rgba(34, 56, 90, .14); }
.seg button:active { transform: scale(.96); }

.switch {
  position: relative;
  flex: none;
  width: 56px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #c3cdd9;
  transition: background var(--t-fast);
}
.switch::before { content: ""; position: absolute; inset: -5px -2px; }
.switch i {
  position: absolute;
  left: 3px;
  top: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(34, 56, 90, .25);
  transition: transform var(--t-mid) var(--spring);
}
.switch[aria-checked="true"] { background: var(--coral-deep); }
.switch[aria-checked="true"] i { transform: translateX(22px); }

.range { width: 100%; height: 44px; margin: 0; background: none; -webkit-appearance: none; appearance: none; }
.range::-webkit-slider-runnable-track { height: 8px; border-radius: 6px; background: linear-gradient(90deg, var(--coral) var(--p, 50%), var(--sky-soft) var(--p, 50%)); }
.range::-moz-range-track { height: 8px; border-radius: 6px; background: var(--sky-soft); }
.range::-moz-range-progress { height: 8px; border-radius: 6px; background: var(--coral); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -10px; border-radius: 50%; background: #fff; border: 3px solid var(--coral-deep); box-shadow: 0 2px 8px rgba(34, 56, 90, .2); }
.range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid var(--coral-deep); }
.range__ends { display: flex; justify-content: space-between; margin-top: -8px; font-size: 14px; color: var(--ink-2); font-weight: 700; }

.about { padding: 18px 16px 18px; }
.about__head { display: flex; align-items: center; gap: 14px; }
.about__head img { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--sh-card); }
.about__name { font-size: 19px; font-weight: 900; }
.about__ver { font-size: 14px; color: var(--ink-2); }
.about__note { margin-top: 14px; padding: 12px 14px; border-radius: var(--r-m); background: var(--peach-soft); font-size: 14px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
.about__k { margin-top: 14px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.chips li { padding: 3px 12px; border-radius: var(--r-pill); background: var(--sky-soft); font-size: 14px; font-weight: 700; white-space: nowrap; }
.about__cta { width: 100%; margin-top: 18px; white-space: normal; text-align: center; word-break: keep-all; padding: 10px 18px; }

/* ---------- シート・トースト・スプラッシュ ---------- */
.scrim {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(34, 56, 90, .4);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-mid), visibility 0s var(--t-mid);
}
.scrim.is-on { opacity: 1; visibility: visible; transition-delay: 0s; }
.bsheet {
  position: absolute;
  inset: auto 0 0;
  z-index: 21;
  display: grid;
  gap: 12px;
  padding: 10px 22px calc(var(--sab) + 22px);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--paper);
  box-shadow: 0 -20px 50px rgba(34, 56, 90, .25);
  transform: translateY(105%);
  visibility: hidden;
  transition: transform .36s var(--ease), visibility 0s .36s;
  touch-action: pan-x;
}
.bsheet.is-on { transform: none; visibility: visible; transition: transform .42s var(--spring), visibility 0s; }
.bsheet__grab { justify-self: center; width: 40px; height: 5px; border-radius: 3px; background: rgba(34, 56, 90, .2); margin-bottom: 6px; }
.bsheet h2 { font-size: 21px; font-weight: 900; line-height: 1.4; }
.bsheet p { font-size: 15px; color: var(--ink-2); word-break: keep-all; margin-bottom: 6px; }
.toast {
  position: absolute;
  left: 50%;
  bottom: calc(var(--sab) + 96px);
  z-index: 30;
  width: max-content;
  max-width: calc(100% - 40px);
  padding: 10px 18px;
  border-radius: var(--r-m);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  word-break: keep-all;
  text-align: center;
  translate: -50% 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t-mid), translate var(--t-mid) var(--spring), visibility 0s var(--t-mid);
  pointer-events: none;
}
.toast.is-on { opacity: 1; translate: -50% 0; visibility: visible; transition-delay: 0s; }
.splash {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: none;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: linear-gradient(170deg, #cfeaf8 0%, #fde3e0 70%, #ffd2c3 100%);
}
.splash.is-on { display: grid; animation: splash-in .5s var(--spring) both; }
.splash.is-out { opacity: 0; transition: opacity .3s var(--ease); }
.splash img { width: 120px; height: 120px; border-radius: 28px; box-shadow: var(--sh-soft); }
.splash p { font-size: 24px; font-weight: 900; letter-spacing: .08em; color: var(--ink); }
@keyframes splash-in { from { transform: scale(.9); opacity: 0; } }
.noscript { position: absolute; inset: auto 20px 40px; padding: 14px; border-radius: 14px; background: var(--paper); text-align: center; word-break: keep-all; z-index: 60; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: 1ms !important; transition-delay: 0s !important; }
  .title__clouds, .coach__finger { display: none; }
  .demo__dot, .wind.is-low .wind__bar i { animation: none !important; }
}
