/* ==========================================================================
   拾ってGo — スマートフォン向けモック
   配色の意味づけ（資料/ラフ/03.jpg より）
     coral  … サービス／ルート／タスク
     yellow … 観光客＝あなた
     blue   … 飲食店
     purple … 東京都
   ========================================================================== */

:root {
  --device-width: 430px;
  --device-height: 900px;
  --coral: #ff5a60;
  --coral-dark: #e13a45;
  --coral-tint: #fff0f0;
  --yellow: #f7e57e;
  --yellow-deep: #e0c53c;
  --blue: #a9e0f2;
  --blue-deep: #3aa6cc;
  --purple: #c8bdf6;
  --purple-deep: #7c62d8;

  --ink: #1c1c1e;
  --ink-2: #4a4f55;
  --mute: #8b9299;
  --paper: #ffffff;
  --bg: #f7f7f5;
  --line: #e9e9e4;
  --ground: #ebebe4;

  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: max(16px, env(safe-area-inset-bottom));
  --safe-l: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #eef0ef;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; }
h1, h2, h3, p, dl, dd, dt, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid rgba(58, 166, 204, .5); outline-offset: 2px; }

/* --------------------------------------------------------------- 端末フレーム */
.stage {
  min-height: 100dvh;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, .96) 0 22%, rgba(255, 255, 255, 0) 62%),
    #eef0ef;
}

.device-preview {
  width: min(430px, calc(100vw - 24px));
  display: grid; justify-items: center; gap: 12px;
}
.mock-assumption-note {
  max-width: 100%; color: #666; font-size: 12px; font-weight: 700;
  line-height: 1.6; text-align: center;
}

.phone {
  position: relative;
  width: 100%;
  aspect-ratio: 430 / 900;
  height: auto;
  overflow: hidden;
  background: var(--bg);
  border: 7px solid #20282f;
  border-radius: 44px;
  box-shadow:
    0 28px 70px rgba(20, 28, 34, .2),
    0 8px 24px rgba(20, 28, 34, .12),
    inset 0 0 0 1px rgba(255, 255, 255, .28);
  isolation: isolate;
}

.phone::before,
.phone::after {
  content: "";
  position: absolute;
  z-index: 95;
  right: 44px;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1f2932;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
  pointer-events: none;
}

.phone::after {
  right: 30px;
  background: #66717b;
  box-shadow: inset 0 0 0 2px #dfe4e6;
}

.statusbar {
  position: absolute; z-index: 90; inset: 0 0 auto;
  height: 32px; padding: 9px 22px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: .01em;
  pointer-events: none;
}
.app-splash {
  position: absolute; z-index: 80; inset: 0; display: grid; place-items: center;
  padding: 40px 28px 28px; background: var(--bg);
  opacity: 1; transform: scale(1); transition: opacity .7s ease, transform .7s ease;
}
.app-splash[hidden] { display: none; }
.app-splash.is-leaving { opacity: 0; transform: scale(1.025); pointer-events: none; }
.splash-content {
  width: 100%; display: grid; justify-items: center; text-align: center;
}
.splash-brand { gap: 14px; }
.splash-brand .brand-mark {
  width: 64px; height: 64px; border-radius: 20px 20px 20px 6.5px; font-size: 28px;
  opacity: 0;
}
.app-splash.is-playing .splash-brand .brand-mark { animation: splashMarkPop .45s cubic-bezier(.2, 1.5, .4, 1) .15s both; }
.splash-brand .brand-text { font-size: 35.5px; }
.splash-name { display: inline-block; opacity: 0; }
.app-splash.is-playing .splash-name { animation: splashNameIn .32s cubic-bezier(.18, .82, .28, 1) .52s both; }
.splash-go { display: inline-block; opacity: 0; }
.app-splash.is-playing .splash-go { animation: splashGoIn .34s cubic-bezier(.2, 1.4, .4, 1) .78s both; }
.splash-tagline {
  margin-top: 34.5px; color: var(--ink); font-size: 27px; font-weight: 800;
  line-height: 1.45; letter-spacing: -.045em;
}
.splash-tagline span, .splash-tagline em { display: block; opacity: 0; }
.app-splash.is-playing .splash-tagline span { animation: splashLineIn .55s cubic-bezier(.18, .82, .28, 1) 1.15s both; }
.app-splash.is-playing .splash-tagline em { animation: splashLineIn .58s cubic-bezier(.18, .82, .28, 1) 1.48s both; }
.splash-tagline em { color: var(--coral); font-style: normal; }
.splash-loader {
  width: 189px; height: 3.75px; margin-top: 42px; overflow: hidden;
  border-radius: 99px; background: rgba(255, 90, 96, .16); opacity: 0;
}
.app-splash.is-playing .splash-loader { animation: splashLoaderIn .25s ease 1.9s both; }
.splash-loader i {
  display: block; width: 100%; height: 100%; border-radius: inherit; background: var(--coral);
  transform: scaleX(0); transform-origin: left;
}
.app-splash.is-playing .splash-loader i { animation: splashLoading .5s cubic-bezier(.2, .75, .3, 1) 1.98s both; }
@keyframes splashMarkPop {
  0% { opacity: 0; transform: scale(.25) rotate(-12deg); }
  62% { opacity: 1; transform: scale(1.18) rotate(4deg); }
  80% { transform: scale(.94) rotate(-2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes splashNameIn {
  from { opacity: 0; filter: blur(4px); transform: translateX(-8px); }
  to { opacity: 1; filter: blur(0); transform: translateX(0); }
}
@keyframes splashGoIn {
  0% { opacity: 0; transform: translateX(-4px) scale(.55); }
  68% { opacity: 1; transform: translateX(0) scale(1.16); }
  100% { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes splashLineIn {
  from { opacity: 0; filter: blur(6px); transform: translateY(12px); }
  to { opacity: 1; filter: blur(0); transform: translateY(0); }
}
@keyframes splashLoaderIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes splashLoading { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.device-status { display: flex; align-items: center; gap: 6px; padding-right: 40px; }
.cellular { height: 10px; display: flex; align-items: flex-end; gap: 1.5px; }
.cellular i { display: block; width: 2px; border-radius: 2px; background: var(--ink); }
.cellular i:nth-child(1) { height: 4px; }
.cellular i:nth-child(2) { height: 6px; }
.cellular i:nth-child(3) { height: 8px; }
.cellular i:nth-child(4) { height: 10px; }
.wifi {
  width: 12px; height: 9px;
  border: 2px solid var(--ink); border-color: var(--ink) transparent transparent;
  border-radius: 50% 50% 0 0;
  position: relative;
}
.wifi::before {
  content: ""; position: absolute; left: 50%; top: 1px;
  width: 6px; height: 5px; transform: translateX(-50%);
  border: 2px solid var(--ink); border-color: var(--ink) transparent transparent;
  border-radius: 50% 50% 0 0;
}
.wifi::after {
  content: ""; position: absolute; left: 50%; bottom: -1px;
  width: 3px; height: 3px; transform: translateX(-50%);
  border-radius: 50%; background: var(--ink);
}
.battery {
  position: relative; width: 18px; height: 9px; padding: 1px;
  border: 1.5px solid var(--ink); border-radius: 3px;
}
.battery::after {
  content: ""; position: absolute; right: -3px; top: 2px;
  width: 2px; height: 4px; border-radius: 0 2px 2px 0; background: var(--ink);
}
.battery i { display: block; width: 80%; height: 100%; border-radius: 1px; background: var(--ink); }

.screen { display: none; height: 100%; min-height: 0; padding-top: 30px; }
.screen.is-active { display: flex; flex-direction: column; animation: slide .28s ease both; }
@keyframes slide { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }

.scroll { flex: 1; overflow-y: auto; padding: 6px 20px calc(30px + var(--safe-b)); }
.scroll-detail { padding-top: 0; padding-bottom: 108px; }
.scroll-done { background: var(--bg); border-radius: 28px 28px 0 0; padding-top: 20px; }

/* --------------------------------------------------------------- 共通パーツ */
.appbar {
  height: 60px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.appbar-float { position: absolute; z-index: 40; top: 30px; left: 0; width: 100%; }
.appbar-float::before {
  content: ""; position: absolute; z-index: -1; inset: -30px 0 auto; height: 120px;
  background: linear-gradient(rgba(247, 247, 245, .95) 42%, rgba(247, 247, 245, 0));
  pointer-events: none;
}

.cond-pill {
  flex: 1; min-width: 0; padding: 9px 16px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  border-radius: 99px; background: var(--paper);
  box-shadow: 0 4px 16px rgba(24, 28, 32, .14);
}
.cond-pill b { font-size: 13.5px; font-weight: 800; letter-spacing: -.02em; }
.cond-pill small { font-size: 10.5px; font-weight: 700; color: var(--mute); }
.cond-pill-live {
  padding: 8px 10px 8px 14px; flex-direction: row; align-items: center;
  justify-content: space-between; gap: 10px; text-align: left; border-radius: var(--r-md);
}
.cond-pill-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 1px; }
.cond-pill-live b, .cond-pill-live small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cond-pill-live .cond-distance { color: var(--ink-2); font-size: 12px; font-weight: 800; }
.cond-booking-btn {
  flex: 0 0 auto; min-height: 30px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
  color: var(--ink-2); font-size: 10.5px; font-weight: 800; white-space: nowrap;
}
.appbar-title { border-bottom: 1px solid var(--line); background: var(--paper); }
.appbar-title h1 { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.appbar-title span:last-child { width: 38px; }
.appbar-spacer { flex: 0 0 40px; height: 40px; }

.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 12px 12px 12px 4px;
  background: var(--coral); color: #fff; font-size: 16px; font-weight: 800;
  box-shadow: 0 6px 14px rgba(255, 90, 96, .3);
}
.brand-text { font-size: 20px; font-weight: 800; letter-spacing: -.05em; }
.brand-text em {
  position: relative; top: .05em;
  margin-left: 2px; color: var(--coral); font-size: 115%; font-style: normal;
}

.icon-btn { width: 38px; height: 38px; border-radius: 50%; font-size: 15px; background: var(--paper); }
.round-btn {
  flex: 0 0 auto; width: 40px; height: 40px; padding: 0 0 3px; display: grid; place-items: center;
  border-radius: 50%; background: var(--paper); font-size: 24px; line-height: 1;
  box-shadow: 0 4px 14px rgba(24, 28, 32, .16);
}
.round-btn-plain { box-shadow: none; background: none; }
.round-btn-ghost { opacity: .55; font-size: 18px; }

.btn {
  width: 100%; min-height: 54px; padding: 0 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-md); font-size: 15px; font-weight: 800; letter-spacing: -.01em;
  transition: transform .12s ease, opacity .12s ease;
}
.btn:active { transform: scale(.985); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: 0 10px 24px rgba(255, 90, 96, .32); }
.btn-primary:disabled { background: #dcdcd6; color: #9a9a95; box-shadow: none; cursor: not-allowed; }
.btn-reset { background: var(--ink); color: #fff; box-shadow: 0 10px 24px rgba(28, 28, 30, .22); }
.btn-ghost { background: var(--paper); border: 1px solid var(--line); color: var(--ink-2); font-weight: 700; }
.btn-sm { width: auto; min-height: 40px; padding: 0 16px; font-size: 13px; border-radius: 12px; }
.btn + .btn { margin-top: 10px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; color: var(--ink-2);
}
.eyebrow-light { color: rgba(255, 255, 255, .85); }
.dot-live {
  width: 7px; height: 7px; border-radius: 50%; background: #4bb972;
  box-shadow: 0 0 0 5px rgba(75, 185, 114, .16);
}
.lead { color: var(--ink-2); font-size: 14px; line-height: 1.75; }
.lead-light { color: rgba(255, 255, 255, .9); }
.body-text { color: var(--ink-2); font-size: 13.5px; line-height: 1.8; }
.micro { margin-top: 12px; color: var(--mute); font-size: 11.5px; line-height: 1.7; text-align: center; }
.tx-coral { color: var(--coral-dark); }
.tx-shop { color: var(--blue-deep); }

.badge {
  display: inline-block; padding: 4px 10px; border-radius: 99px;
  font-size: 10.5px; font-weight: 800; letter-spacing: .02em;
}
.badge-shop { background: var(--blue); color: #17607a; }
.badge-cooperation { background: #3aa6cc; color: #fff; }
.badge-coral { background: var(--coral-tint); color: var(--coral-dark); }

.role { width: 12px; height: 12px; border-radius: 50%; flex: 0 0 auto; }
.role-you { background: var(--yellow); }
.role-shop { background: var(--blue); }
.role-city { background: var(--purple); }

.block { margin-top: 26px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 7px; }
.block-head h2 { font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; }
.block-head small { color: var(--mute); font-size: 11.5px; font-weight: 700; }

/* ------------------------------------------------------------- 1. 条件選択 */
.hero { padding: 12px 0 22px; }
.hero h1 { margin: 12px 0 12px; font-size: clamp(28px, 8.4vw, 35.5px); line-height: 1.28; letter-spacing: -.05em; font-weight: 800; }
.hero h1 span, .hero h1 em { display: block; }
.hero h1 em { color: var(--coral); font-style: normal; }
.hero-location { margin-top: 25px; }

.panel {
  padding: 18px 16px 16px;
  border-radius: var(--r-lg);
  background: var(--paper);
  box-shadow: 0 14px 36px rgba(28, 32, 38, .07);
}
.field + .field { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.field-row { display: flex; align-items: center; justify-content: space-between; }
.field-label { display: block; margin-bottom: 10px; font-size: 12px; font-weight: 800; color: var(--mute); }
.field-label small { margin-left: 7px; font-weight: 700; font-size: 10.5px; opacity: .8; }
.field-row .field-label { margin-bottom: 1px; }
.field-value { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.field-value small { margin-left: 3px; font-size: 13px; font-weight: 700; }

.stepper { display: flex; overflow: hidden; border: 3px solid var(--line); border-radius: 14px; }
.stepper button { width: 46px; height: 40px; font-size: 20px; font-weight: 700; background: var(--paper); }
#people-minus { position: relative; top: -1px; }
.stepper button:active { background: var(--bg); }
.stepper button + button { border-left: 3px solid var(--line); }

.chips { display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; height: 38px; padding: 0 15px; border-radius: 99px;
  border: 3px solid var(--line); background: var(--paper);
  font-size: 14px; font-weight: 800;
}
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

.genres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.genre {
  min-height: 52px; padding: 0 10px; display: flex; align-items: center; gap: 8px;
  border: 3px solid var(--line); border-radius: 15px; background: var(--paper);
  font-size: 11.5px; font-weight: 800; text-align: left; line-height: 1.35;
}
.genre i { font-size: 18px; font-style: normal; }
.genre.is-on { background: var(--coral-tint); border-color: var(--coral); color: var(--coral-dark); }

.panel .btn { margin-top: 20px; }

/* ------------------------------------------------------------------ マップ */
.screen-map { position: relative; padding-top: 0; }
.map { position: relative; background: var(--ground); overflow: hidden; }
.screen-map .map { flex: 1; min-height: 0; }
.map-inline { height: 225px; margin: 14px 0 0; border-radius: var(--r-md); border: 1px solid var(--line); }
.map-inline > .map-pins { transform: translateX(12px); }
.map svg { display: block; width: 100%; height: 100%; }
.map-pins { position: absolute; inset: 0; }
@keyframes dash { to { stroke-dashoffset: -46; } }

.map-label {
  position: absolute; transform: translate(-50%, -50%);
  font-size: 10px; font-weight: 800; color: #7d8087; white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
}

/* 店舗ピン＝飲食店（水色） */
.pin {
  position: absolute;
  width: 42.9px;
  height: 53.3px;
  display: block;
  overflow: visible;
  transform: translate(-50%, -100%);
}
.screen[data-screen="results"] .pin.is-entering {
  opacity: 0;
  transform-origin: 50% 100%;
  animation: resultPinPop .62s cubic-bezier(.2, .9, .3, 1.28) var(--pin-delay, .3s) both;
}
@keyframes resultPinPop {
  0% { opacity: 0; transform: translate(-50%, -82%) scale(.35); }
  48% { opacity: 1; transform: translate(-50%, -108%) scale(1.12); }
  72% { transform: translate(-50%, -96%) scale(.96); }
  100% { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}
.pin-image {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 7px rgba(20, 40, 50, .16));
  transform-origin: 50% 100%;
  transition: transform .16s ease;
}
.pin.goal.is-on .pin-image { transform: scale(1.18); }
.screen[data-screen="results"] .pin-image-stack {
  position: absolute; inset: 0;
  filter: drop-shadow(0 5px 7px rgba(20, 40, 50, .16));
  transform-origin: 50% 100%;
  transition: transform .15s ease;
}
.screen[data-screen="results"] .pin-image-stack .pin-image {
  position: absolute; inset: 0; filter: none; transform: none;
  transition: opacity .15s ease;
}
.screen[data-screen="results"] .pin-image-active { opacity: 0; }
.screen[data-screen="results"] .pin.is-on .pin-image-stack { transform: scale(1.18); }
.screen[data-screen="results"] .pin.is-on .pin-image-default { opacity: 0; }
.screen[data-screen="results"] .pin.is-on .pin-image-active { opacity: 1; }
.pin-name {
  position: absolute; z-index: -1; top: 50%; left: calc(100% - 1px); transform: translateY(-50%);
  max-width: 82px; padding: 2px 6px; border-radius: 6px;
  background: rgba(255, 255, 255, .88);
  font-size: 9.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pin[data-pin="2"] .pin-name { max-width: 104px; }
.screen[data-screen="results"] .pin { width: 35px; height: 43.5px; }
.map-inline .pin.goal { width: 30px; height: 37.5px; }
.map-inline .pin.goal .pin-image { transform: none; }
.map-inline .pin.goal .pin-name { max-width: 120px; }
.screen[data-screen="task"] .pin.goal { width: 35px; height: 43.5px; }
.screen[data-screen="task"] .pin.goal .pin-image { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html:not(.is-iphone-app-view) .screen[data-screen="results"] .pin.is-entering {
    opacity: 1;
    animation: none;
  }
}

/* 現在地＝観光客（黄色） */
.me {
  position: absolute; transform: translate(-50%, -50%);
  width: 22.5px; height: 22.5px; border-radius: 50%;
  background: var(--yellow-deep); border: 3.75px solid #fff;
  box-shadow: 0 0 0 10px rgba(224, 197, 60, .38), 0 3.75px 10px rgba(0, 0, 0, .18);
}
.me::after {
  content: ""; position: absolute; inset: -17.5px; border-radius: 50%;
  border: 2.5px solid rgba(224, 197, 60, .55); animation: ripple 1.6s ease-out infinite;
}
@keyframes ripple { 0% { transform: scale(.55); opacity: .9; } 100% { transform: scale(1.5); opacity: 0; } }

/* 確認画面：現在地は固定したまま、小さい丸がルートを進む */
.route-progress-dot {
  position: absolute;
  left: 28.2%;
  top: 88.4%;
  width: 12px;
  height: 12px;
  border: 2.5px solid #fff;
  border-radius: 50%;
  background: var(--yellow-deep);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  transform: translate(-50%, -50%);
  animation: confirmRouteProgress 6.7s linear infinite;
}
@keyframes confirmRouteProgress {
  0% { left: 28.2%; top: 88.4%; }
  23.5% { left: 28.2%; top: 60.5%; }
  39.2% { left: 40.1%; top: 60.5%; }
  54.9% { left: 40.1%; top: 41.9%; }
  70.6% { left: 51.9%; top: 41.9%; }
  86.3% { left: 51.9%; top: 23.3%; }
  100% { left: 62.3%; top: 23.3%; }
}

/* タスク指定エリア＝タスク（コーラル） */
.area {
  position: absolute; transform: translate(-50%, -50%);
  width: 84px; height: 84px; border-radius: 50%;
  background: rgba(255, 90, 96, .16);
  border: 2px dashed rgba(225, 58, 69, .7);
}
.area.is-small { width: 63px; height: 63px; }
.map-inline .area { width: 60px; height: 60px; }
.map-inline .area.is-small { width: 45px; height: 45px; }
.area.is-live { animation: breathe 2.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.09); } }
.area-tag {
  position: absolute; transform: translate(-50%, -50%);
  padding: 4px 9px; border-radius: 99px;
  background: var(--coral); color: #fff; font-size: 10px; font-weight: 800;
  box-shadow: 0 4px 10px rgba(225, 58, 69, .32);
}
.photo-clear-marker {
  position: absolute; z-index: 24; transform: translate(-50%, -50%) scale(.88);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border: 1px solid #c9ced2; border-radius: 50%;
  background: rgba(255, 255, 255, .94); color: #5f666c;
  box-shadow: 0 4px 10px rgba(35, 40, 44, .16);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, transform .2s ease;
}
.photo-clear-marker.is-on {
  opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1);
}
.photo-clear-camera,
.camera-icon {
  position: relative; flex: 0 0 auto;
  width: 18px; height: 13px; border: 0; border-radius: 3px;
  background: currentColor;
}
.photo-clear-camera::before,
.camera-icon::before {
  content: ""; position: absolute; left: 3px; top: -3px;
  width: 8px; height: 5px; border-radius: 3px 3px 0 0; background: currentColor;
}
.photo-clear-camera::after,
.camera-icon::after {
  content: ""; position: absolute; left: 50%; top: 54%;
  width: 7px; height: 7px; border: 2px solid var(--camera-lens); border-radius: 50%;
  transform: translate(-50%, -50%) scale(.85);
}
.photo-clear-camera { color: #5f666c; --camera-lens: #fff; }
.camera-icon { color: #fff; --camera-lens: var(--coral); }

.nav-bubble {
  position: absolute; z-index: 30; left: 16px; right: 16px; bottom: 40px;
  min-height: 62px; overflow: hidden;
  border-radius: var(--r-md); background: rgba(28, 28, 30, .9); color: #fff;
  backdrop-filter: blur(6px);
  opacity: 1; transform: translateY(0);
  transition: opacity .3s ease, transform .3s ease;
}
.nav-bubble.is-preparing,
.nav-bubble.is-preparing .nav-bubble-state { transition: none; }
.nav-bubble.is-hidden { opacity: 0; transform: translateY(6px); }
.nav-bubble-state {
  position: absolute; inset: 0; padding: 12px 14px;
  display: flex; align-items: center; gap: 12px;
  opacity: 0; transform: translateY(7px); pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
}
.nav-bubble-state.is-active { opacity: 1; transform: translateY(0); }
.nav-booked-state { justify-content: center; }
.nav-bubble-state > span { font-size: 22px; color: var(--yellow); }
.nav-booked-state > span { color: var(--coral); }
.nav-bubble b { display: block; font-size: 14px; font-weight: 800; }
.nav-bubble small { font-size: 11px; opacity: .75; }

.map-legend {
  position: absolute; z-index: 20; right: 14px; bottom: 36px;
  padding: 8px 11px; display: grid; gap: 5px;
  border-radius: 12px; background: rgba(255, 255, 255, .92);
  font-size: 9.5px; font-weight: 800; color: #5c6268;
}
.map-legend span { display: flex; align-items: center; gap: 6px; }
.map-legend i { width: 9px; height: 9px; border-radius: 50%; }
.lg-shop { background: var(--blue-deep); }
.lg-you { background: var(--yellow-deep); }
.lg-task { background: var(--coral); }

/* -------------------------------------------------------- 2. 結果シート */
.sheet {
  position: relative; z-index: 30;
  margin-top: -22px; padding: 8px 20px calc(18px + var(--safe-b));
  border-radius: 26px 26px 0 0; background: var(--paper);
  box-shadow: 0 -12px 30px rgba(24, 28, 34, .1);
}
.sheet-grip { display: block; width: 40px; height: 4px; margin: 0 auto 12px; border-radius: 99px; background: #dcdcd6; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sheet-head-main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sheet-head-main .badge { flex: 0 0 auto; }
.sheet-head-main h2 { white-space: nowrap; }
.sheet-head h2 { font-size: 15px; font-weight: 800; }
.sheet-head b { color: var(--coral-dark); }
.sort { font-size: 11.5px; font-weight: 700; color: var(--mute); }
.sheet-results { flex: 0 0 40%; max-height: 40%; overflow-y: auto; }
.sheet-results, .sheet-task, .scroll { scrollbar-width: none; }
.sheet-results::-webkit-scrollbar, .sheet-task::-webkit-scrollbar, .scroll::-webkit-scrollbar { display: none; }

.cards { display: grid; gap: 10px; }
.card {
  position: relative; width: 100%; min-height: 108px; padding: 12px; display: flex; align-items: center; gap: 12px; text-align: left;
  border: 3px solid var(--line); border-radius: var(--r-md); background: var(--paper);
  transition: border-color .16s ease, background .16s ease;
}
.card.is-on { border-color: var(--blue-deep); background: #f4fbfe; }
.card-thumb {
  position: relative; flex: 0 0 auto; width: 82px; height: 82px;
  display: grid; place-items: center; border-radius: 14px; font-size: 26px;
  background-size: cover;
  background-position: center;
}
.card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; }
.card-body h3 { font-size: 15px; line-height: 1.35; font-weight: 800; letter-spacing: -.02em; }
.card-rate { margin-top: 2px; display: flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.card-rate .stars { color: var(--yellow-deep); letter-spacing: -1px; }
.card-rate small { color: var(--mute); font-weight: 700; }
.price-range { color: var(--ink-2); font-size: 11.5px; font-weight: 400; white-space: nowrap; }
.card-rate .price-range::before,
.rating-row .price-range::before { content: "・"; margin-right: 4px; color: var(--mute); }
.card-kind { margin-top: 5px; font-size: 11.5px; color: var(--ink-2); font-weight: 700; }
.card-walk { margin-top: 2px; font-size: 11px; font-weight: 800; color: var(--ink-2); }
.card-detail {
  position: absolute; right: 12px; bottom: 12px;
  width: 116px; height: 40px; padding: 0 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border-radius: 12px; background: var(--coral); color: #fff;
  box-shadow: 0 7px 16px rgba(255, 90, 96, .26);
  font-size: 12.5px; font-weight: 800;
}
.card-detail:active { transform: scale(.97); }

.ph-cafe { background-image: url('../img/shops/cafe-miyashita.jpg'); }
.ph-tea { background-image: url('../img/shops/kissa-hachimae.jpg'); }
.ph-izakaya { background-image: url('../img/shops/yokocho-akari.jpg'); }
.ph-ramen { background-image: url('../img/shops/ramen-dogenzaka.jpg'); }

/* ----------------------------------------------------- 3. お店の情報 */
.detail-hero {
  position: relative; height: 210px; flex: 0 0 auto;
  display: grid; place-items: center;
  background-color: #f8cfa3;
  background-size: cover;
  background-position: center;
}
.detail-hero > .round-btn { position: absolute; top: 12px; }
.detail-hero > .round-btn:first-child { left: 16px; }
.hero-emoji { font-size: 62px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .14)); }
.detail-head { padding: 20px 0 0; }
.detail-head h1 { margin: 9px 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.04em; line-height: 1.3; }
.detail-kind-row { margin-top: 5px; display: flex; align-items: baseline; gap: 8px; }
.detail-kind { font-size: 13px; color: var(--ink-2); font-weight: 700; }
.detail-address { margin-top: 5px; color: var(--mute); font-size: 11.5px; font-weight: 400; line-height: 1.5; }
.rating-row { margin-top: 10px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.rating-row b { font-size: 16px; font-weight: 800; letter-spacing: -.03em; }
.rating-row .stars { color: var(--yellow-deep); font-size: 15px; letter-spacing: -1px; }
.rating-row small { color: var(--mute); font-size: 11.5px; font-weight: 700; }

.facts {
  margin-top: 16px; padding: 14px 6px;
  display: grid; grid-template-columns: repeat(2, 1fr);
  border-radius: var(--r-md); background: var(--paper); border: 1px solid var(--line);
}
.facts li { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; }
.facts li + li { border-left: 1px solid var(--line); }
.facts b { font-size: 14px; font-weight: 800; line-height: 1.4; letter-spacing: -.02em; }
.facts small { font-size: 10px; color: var(--mute); font-weight: 700; line-height: 1.4; }

.slots { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.slots::-webkit-scrollbar { display: none; }
.slot {
  flex: 0 0 auto; min-width: 76px; padding: 10px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  border: 3px solid var(--line); border-radius: 14px; background: var(--paper);
  font-size: 14px; font-weight: 800;
}
.slot.is-on { border-color: var(--coral); background: var(--coral-tint); color: var(--coral-dark); }

.dock {
  position: absolute; z-index: 40; bottom: 0; left: 0; width: 100%;
  padding: 12px 16px calc(12px + var(--safe-b));
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.btn-dock { width: 100%; min-height: 50px; font-size: 14px; }

/* --------------------------------------------- 5. タスクの確認／予約 */
.map-inline + .block { margin-top: 15px; }
.task-lead { font-size: 14px; }

.tasks { margin-top: 12px; display: grid; gap: 5px; }
.task {
  width: 100%; padding: 13px; display: flex; gap: 11px; align-items: flex-start; text-align: left;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper);
}
.task-ico {
  flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px; background: var(--bg); font-size: 18px;
}
.task-body { flex: 1; min-width: 0; }
.task-body b { display: block; font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.task-body small { display: block; margin-top: 0; font-size: 11.5px; line-height: 1.65; color: var(--ink-2); }
.limit { margin-top: 12px; padding: 12px 16px; border-radius: var(--r-md); background: #fffaf0; border: 1px solid #f2e2c2; }
.limit > b { display: block; font-size: 12.5px; font-weight: 800; color: #8a6516; }
.limit ul { margin-top: 8px; display: grid; gap: 5px; }
.limit li { font-size: 12.5px; color: var(--ink); }
.limit li::before { content: "・"; }
.limit li b { color: var(--ink); }
.limit-note { display: inline-block; margin-left: 1em; color: #666; font-size: 10.5px; }

.agree { margin: 15px 0 14px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 700; }
.agree input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ------------------------------------------------ 6. タスク実行中 */
.sheet-task { flex: 0 0 auto; max-height: 62%; padding-bottom: calc(12px + var(--safe-b)); overflow-y: auto; }
.task-status { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; font-weight: 800; color: var(--coral-dark); }
.task-status b { min-width: 0; line-height: 1.55; }
.pulse-dot {
  flex: 0 0 8px; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--coral);
  box-shadow: 0 0 0 5px rgba(255, 90, 96, .18); animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 10px rgba(255, 90, 96, 0); } }
.tasks-live { margin-top: 10px; gap: 7px; }
.tasks-live .task { padding: 9px 10px; align-items: center; border-radius: 14px; }
.tasks-live .task-manual-toggle.is-on,
.tasks-live [data-arrive-photo-task].is-complete { border-color: var(--coral); background: var(--coral-tint); }
.tasks-live [data-photo-task].is-complete {
  animation: photoTaskComplete .7s ease .5s both;
}
.tasks-live .task-ico { width: 32px; height: 32px; border-radius: 10px; font-size: 16px; }
.tasks-live .task-body b { font-size: 12.5px; }
.tasks-live .task-body small { margin-top: 1px; font-size: 10.5px; line-height: 1.4; }
.task-check {
  flex: 0 0 26px; width: 26px; height: 26px; display: grid; place-items: center;
  border: 1.5px solid var(--coral); border-radius: 50%; background: var(--coral); color: #fff;
  font-size: 15px; font-weight: 900; line-height: 1;
  opacity: 0; visibility: hidden; transform: scale(.72);
  transition: opacity .2s ease, transform .2s ease;
}
.task.is-complete .task-check { opacity: 1; visibility: visible; transform: scale(1); }
[data-photo-task].is-complete .task-check {
  animation: photoCheckPop .7s cubic-bezier(.2, 1.35, .45, 1) .5s both;
}
@keyframes photoCheckPop {
  0% { opacity: 0; transform: scale(.35); box-shadow: 0 0 0 0 rgba(255, 90, 96, .38); }
  48% { opacity: 1; transform: scale(1.28); box-shadow: 0 0 0 9px rgba(255, 90, 96, .2); }
  72% { transform: scale(.92); }
  100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 14px rgba(255, 90, 96, 0); }
}
@keyframes photoTaskComplete {
  0%, 35% { border-color: var(--line); background: var(--paper); }
  48%, 100% { border-color: var(--coral); background: var(--coral-tint); }
}
.task-manual-check {
  position: relative; flex: 0 0 24px; width: 24px; height: 24px;
  border: 3px solid var(--coral); border-radius: 5px; background: #fff;
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .12s ease;
}
.task-manual-check::after {
  content: ""; position: absolute; left: 50%; top: calc(50% - 1px);
  width: 6px; height: 10px; border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  opacity: 0; transform: translate(-50%, -58%) rotate(45deg);
}
.task-manual-toggle.is-on .task-manual-check { border-color: var(--coral); background: var(--coral); }
.task-manual-toggle.is-on .task-manual-check::after { opacity: 1; }
.agree .agree-check { flex-basis: 26px; width: 26px; height: 26px; }
.agree > span:last-child { line-height: 1.4; }
.agree input:checked + .agree-check { border-color: var(--coral); background: var(--coral); }
.agree input:checked + .agree-check::after { opacity: 1; }
.agree input:focus-visible { outline: none; }
.agree input:focus-visible + .agree-check { outline: 3px solid rgba(58, 166, 204, .5); outline-offset: 2px; }
.task-footer-actions { margin-top: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.task-footer-actions .btn { min-height: 50px; padding: 0 10px; font-size: 13px; }
.task-footer-actions .btn + .btn { margin-top: 0; }
/* --------------------------------------------------- 7. タスク完了 */
.screen-done { --celebration-delay: 2.45s; background: var(--coral); }
.screen-done.is-active { display: flex; }
.done-top { position: relative; isolation: isolate; overflow: hidden; padding: 26px 24px 30px; text-align: center; color: #fff; }
.done-top > *,
.finish-celebration > * { position: relative; z-index: 1; }
.done-top::before,
.finish-celebration::before {
  content: ""; position: absolute; z-index: 0; inset: 8px 18px 12px; pointer-events: none;
  background:
    radial-gradient(circle at 8% 30%, #fff 0 3px, transparent 3.5px),
    radial-gradient(circle at 18% 10%, var(--yellow) 0 3px, transparent 3.5px),
    radial-gradient(circle at 28% 43%, #fff 0 2px, transparent 2.5px),
    radial-gradient(circle at 35% 8%, var(--yellow) 0 2.5px, transparent 3px),
    radial-gradient(circle at 42% 31%, #fff 0 2px, transparent 2.5px),
    radial-gradient(circle at 56% 7%, #fff 0 3px, transparent 3.5px),
    radial-gradient(circle at 65% 42%, var(--yellow) 0 2px, transparent 2.5px),
    radial-gradient(circle at 72% 16%, #fff 0 2.5px, transparent 3px),
    radial-gradient(circle at 86% 34%, var(--yellow) 0 3.5px, transparent 4px),
    radial-gradient(circle at 94% 10%, #fff 0 2px, transparent 2.5px),
    radial-gradient(circle at 4% 54%, var(--yellow) 0 2.5px, transparent 3px),
    radial-gradient(circle at 96% 57%, #fff 0 3px, transparent 3.5px),
    radial-gradient(circle at 13% 72%, var(--yellow) 0 2px, transparent 2.5px),
    radial-gradient(circle at 34% 78%, #fff 0 2.5px, transparent 3px),
    radial-gradient(circle at 69% 76%, var(--yellow) 0 3px, transparent 3.5px),
    radial-gradient(circle at 89% 72%, #fff 0 2.5px, transparent 3px);
  opacity: 0;
}
.check {
  width: 66px; height: 66px; margin: 0 auto 16px; display: grid; place-items: center;
  border-radius: 50%; background: rgba(255, 255, 255, .2);
}
.check i { font-size: 30px; font-style: normal; font-weight: 800; }
.done-top h1 { margin: 12px 0 10px; font-size: 27px; font-weight: 800; letter-spacing: -.045em; line-height: 1.35; }
.screen-done.is-active .done-top::before { animation: celebrateBurst 1.15s ease-out var(--celebration-delay) both; }
.screen-done.is-active .check { animation: completeBounce .72s cubic-bezier(.2, 1.45, .45, 1) var(--celebration-delay) both; }
.screen-done.is-active .done-top .eyebrow { animation: happyRise .48s ease-out calc(var(--celebration-delay) + .28s) both; }
.screen-done.is-active .done-top h1 { animation: happyRise .58s cubic-bezier(.2, .9, .3, 1) calc(var(--celebration-delay) + .42s) both; }
@keyframes completeBounce {
  0% { opacity: 0; transform: scale(.3) rotate(-12deg); }
  58% { opacity: 1; transform: scale(1.18) rotate(4deg); }
  78% { transform: scale(.94) rotate(-2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes happyRise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes celebrateBurst {
  0% { opacity: 0; transform: scale(.72) translateY(8px); }
  36% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.14) translateY(-8px); }
}

.screen-finish { background: var(--coral); color: #fff; }
.finish-celebration {
  position: relative; isolation: isolate; overflow: hidden; flex: 1;
  padding: 48px 28px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.finish-celebration h1 {
  margin-top: 14px; font-size: 30px; font-weight: 800;
  letter-spacing: -.045em; line-height: 1.38;
}
.finish-message { margin-top: 22px; font-size: 15px; font-weight: 700; line-height: 1.8; }
.btn-finish-home {
  max-width: 320px; margin-top: 34px; background: #fff; color: var(--coral-dark);
  box-shadow: 0 12px 28px rgba(110, 22, 30, .24);
}
.screen-finish.is-active .finish-celebration::before { animation: celebrateBurst 1.35s ease-out .2s both; }
.screen-finish.is-active .check { animation: completeBounce .72s cubic-bezier(.2, 1.45, .45, 1) .2s both; }
.screen-finish.is-active .finish-celebration .eyebrow { animation: happyRise .48s ease-out .5s both; }
.screen-finish.is-active .finish-celebration h1 { animation: happyRise .58s cubic-bezier(.2, .9, .3, 1) .66s both; }
.screen-finish.is-active .finish-message { animation: happyRise .5s ease-out .86s both; }
.screen-finish.is-active .btn-finish-home { animation: happyRise .5s ease-out 1.04s both; }

.proof { padding: 16px; border-radius: var(--r-lg); background: var(--paper); box-shadow: 0 12px 30px rgba(28, 32, 38, .08); }
.proof-shot {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 200px; margin-top: 12px; padding: 20px 16px;
  display: grid; align-content: end; gap: 4px; justify-items: center; text-align: center;
  border-radius: var(--r-md); color: #fff;
  background:
    linear-gradient(to bottom, rgba(20, 22, 24, .06) 20%, rgba(20, 22, 24, .78) 100%),
    url('../img/gomi-photo.jpg') center 48% / cover no-repeat;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .7);
}
.proof-shot b { font-size: 16px; font-weight: 800; }
.proof-shot small { font-size: 10.5px; opacity: .7; }
.proof-shot.is-analyzing {
  align-content: center; text-shadow: none;
}
.proof-shot.is-analyzing::before {
  content: ""; position: absolute; z-index: 0; inset: 0;
  background: rgba(0, 0, 0, .58);
}
.proof-analysis { position: relative; z-index: 1; display: grid; justify-items: center; gap: 12px; }
.proof-analysis-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .28); border-top-color: var(--coral);
  animation: spin .8s linear infinite;
}
.proof-shot.is-analyzed b {
  animation: proofResultPop .65s cubic-bezier(.2, 1.35, .45, 1) both;
}
.proof-shot.is-analyzed small { animation: proofResultFade .45s ease .18s both; }
@keyframes proofResultPop {
  0% { opacity: 0; transform: translateY(8px) scale(.72); text-shadow: 0 0 0 rgba(255, 255, 255, 0); }
  60% { opacity: 1; transform: translateY(0) scale(1.14); text-shadow: 0 0 16px rgba(255, 255, 255, .9); }
  100% { opacity: 1; transform: scale(1); text-shadow: 0 1px 5px rgba(0, 0, 0, .7); }
}
@keyframes proofResultFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: .7; transform: none; }
}
.proof-message {
  margin-top: 25px; margin-bottom: 9px; color: inherit;
  font-size: 15px; font-weight: 800; line-height: 1.7; text-align: center;
}

.scroll-done > .btn-route-return { margin-top: 14px; }
/* ------------------------------------------------- 8. 到着／入店 */
.arrive-card {
  margin-top: 16px; padding: 24px 20px; text-align: center;
  border-radius: var(--r-lg); background: var(--paper); border: 1px solid var(--line);
}
.arrive-card h2 { margin: 10px 0 4px; font-size: 20px; font-weight: 800; letter-spacing: -.035em; }
.arrive-card > p { font-size: 12px; color: var(--ink-2); font-weight: 700; line-height: 1.7; }
.arrive-qr {
  width: 114px; height: 114px; margin: 18px auto 18px;
}
.arrive-qr img { display: block; width: 100%; height: 100%; object-fit: contain; }
.arrive-card > small { font-size: 14.5px; color: var(--ink-2); font-weight: 700; }

.arrive-task-status { margin-bottom: 24px; }
.arrive-task-note { margin-top: 5px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }

/* ------------------------------------------------------------ カメラ */
.camera {
  position: absolute; inset: 0; z-index: 120;
  display: none; flex-direction: column; background: #000; color: #fff;
}
.camera.is-open { display: flex; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.camera-bar {
  padding: calc(30px + 6px) 18px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 12px; font-weight: 800;
}
.camera-bar button { font-size: 26px; line-height: 1; }
.camera-geo { font-size: 10.5px; font-weight: 700; opacity: .7; }

.camera-view { position: relative; flex: 1; overflow: hidden; }
.cam-scene { position: absolute; inset: 0; background: #343638; }
.cam-photo { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 48%; }

.cam-frame {
  position: absolute; inset: 16% 10% 16%; border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, .75);
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 10px;
}
.cam-frame p { font-size: 11px; font-weight: 800; text-shadow: 0 1px 5px rgba(0, 0, 0, .7); }

.cam-upload {
  position: absolute; inset: 0; display: none; place-items: center; align-content: center; gap: 14px;
  background: rgba(0, 0, 0, .74); justify-items: center;
}
.cam-upload.is-on { display: grid; }
.cam-upload p { font-size: 13px; font-weight: 800; }
.spinner {
  width: 38px; height: 38px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--coral);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.camera-controls {
  padding: 18px 30px calc(22px + var(--safe-b));
  display: flex; align-items: center; justify-content: space-between;
}
.cam-side { font-size: 20px; opacity: .6; }
.shutter { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .28); }
.shutter i { width: 58px; height: 58px; border-radius: 50%; background: #fff; }
.shutter:active i { transform: scale(.9); }

/* ------------------------------------------------------------- モーダル */
.modal { position: absolute; inset: 0; z-index: 110; display: none; align-items: flex-end; background: rgba(24, 26, 30, .45); }
.modal.is-open { display: flex; animation: fade .2s ease both; }
.modal-card {
  width: 100%; padding: 10px 20px calc(20px + var(--safe-b));
  border-radius: 26px 26px 0 0; background: var(--paper);
  animation: up .26s cubic-bezier(.2, .9, .3, 1) both;
}
@keyframes up { from { transform: translateY(30px); } to { transform: none; } }
.modal-card h2 { margin-bottom: 14px; font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.kv { display: grid; gap: 1px; margin-bottom: 18px; }
.kv > div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv dt { font-size: 12.5px; color: var(--mute); font-weight: 700; }
.kv dd { font-size: 13px; font-weight: 800; text-align: right; }
.booking-cancel {
  display: block; margin: -4px auto 10px; padding: 4px 8px;
  border: 0; background: none; text-align: center; color: var(--coral-dark);
  font-size: 11px; font-weight: 700;
}
.modal-cancel { align-items: center; padding: 20px; }
.modal-card-cancel { padding: 24px; border-radius: 24px; text-align: center; }
.modal-card-cancel h2 { margin-bottom: 8px; }
.cancel-dialog-copy { color: var(--ink-2); font-size: 13px; line-height: 1.6; }
.cancel-dialog-actions { margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cancel-dialog-actions .btn { min-height: 48px; padding: 0 10px; font-size: 13px; }
.cancel-dialog-actions .btn + .btn { margin-top: 0; }

/* -------------------------------------------------------- デモ用ナビ */
.demo-nav {
  position: fixed; z-index: 200; right: 10px; bottom: 10px; text-align: right;
  display: flex; flex-direction: column-reverse; align-items: flex-end;
}
.demo-toggle {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(28, 28, 30, .5); color: #fff; font-size: 0; font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}
.demo-toggle::before { content: "≡"; font-size: 17px; }
.demo-nav.is-open .demo-toggle { background: rgba(28, 28, 30, .92); }
.demo-nav ul {
  display: none; margin-bottom: 8px; padding: 7px;
  border-radius: 14px; background: rgba(28, 28, 30, .92);
  box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
}
.demo-nav.is-open ul { display: grid; gap: 2px; }
.demo-nav li button {
  width: 100%; padding: 8px 12px; border-radius: 9px;
  color: #fff; font-size: 11.5px; font-weight: 700; text-align: left; white-space: nowrap;
}
.demo-nav li button:hover { background: rgba(255, 255, 255, .12); }

/* --------------------------------------- 隠し機能：端末枠ぴったり表示 */
.frame-fit-toggle {
  position: fixed;
  z-index: 1000;
  left: 0;
  bottom: 0;
  width: 15px;
  height: 15px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
}
.frame-fit-toggle:focus,
.frame-fit-toggle:focus-visible { outline: 0; }

/* ------------------------------ 隠し機能：モック用の補助表示切り替え */
.developer-ui-toggle {
  position: fixed;
  z-index: 1001;
  right: 0;
  bottom: 0;
  width: 15px;
  height: 15px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
}
.developer-ui-toggle:focus,
.developer-ui-toggle:focus-visible { outline: 0; }

html.is-developer-ui-hidden .mock-assumption-note,
html.is-developer-ui-hidden .demo-nav { display: none; }

html.is-developer-ui-hidden,
html.is-developer-ui-hidden body,
html.is-developer-ui-hidden .stage { background: #fff; }

html.is-frame-fit,
html.is-frame-fit body { background: #fff; }
html.is-frame-fit .stage {
  min-width: var(--device-width);
  min-height: var(--device-height);
  padding: 0;
  background: #fff;
}
html.is-frame-fit .device-preview {
  width: var(--device-width);
  gap: 0;
}
html.is-frame-fit .phone {
  width: var(--device-width);
  height: var(--device-height);
  border-width: 7px;
  border-radius: 44px;
  box-shadow: none;
}
html.is-frame-fit .mock-assumption-note,
html.is-frame-fit .demo-nav { display: none; }

/* -------------------------- iPhone Safari／ホーム画面Webアプリ表示 */
html.is-iphone-app-view,
html.is-iphone-app-view body {
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  background: var(--bg);
  overscroll-behavior: none;
}
html.is-iphone-app-view .stage {
  width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  padding: 0;
  display: block;
  background: var(--bg);
}
html.is-iphone-app-view .device-preview,
html.is-iphone-app-view .phone {
  width: 100%;
  height: 100%;
  max-width: none;
}
html.is-iphone-app-view .device-preview {
  display: block;
  padding-top: env(safe-area-inset-top, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  background: var(--bg);
}
html.is-iphone-app-view .phone {
  /* 安全領域は外側で確保済み。内部UIには通常時の余白だけを適用する。 */
  --safe-t: 0px;
  --safe-r: 0px;
  --safe-b: 16px;
  --safe-l: 0px;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
html.is-iphone-app-view .screen {
  width: 100%;
  min-width: 0;
}
html.is-iphone-app-view .phone::before,
html.is-iphone-app-view .phone::after,
html.is-iphone-app-view .statusbar,
html.is-iphone-app-view .mock-assumption-note,
html.is-iphone-app-view .demo-nav,
html.is-iphone-app-view .frame-fit-toggle { display: none; }

/* すべての画面を同じ安全領域内へ収め、地図とUIの座標を一致させる。 */
html.is-iphone-app-view .screen:not(.screen-map) { padding-top: var(--safe-t); }
html.is-iphone-app-view .appbar-float { top: var(--safe-t); }
html.is-iphone-app-view .scroll {
  width: 100%;
  min-width: 0;
}
html.is-iphone-app-view .genres {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
html.is-iphone-app-view .genre { min-width: 0; }
html.is-iphone-app-view .camera-bar { padding-top: 6px; }

@media (min-width: 900px) {
  .demo-nav { right: calc(50% - 215px - 160px); bottom: 24px; }
  .demo-toggle { width: auto; height: auto; padding: 9px 15px; border-radius: 99px; background: rgba(28, 28, 30, .88); }
  .demo-toggle::before { content: "画面一覧"; font-size: 11.5px; }
}

@media (max-width: 480px) {
  .stage { padding: 6px; }
  .device-preview { width: min(430px, calc(100vw - 12px)); gap: 10px; }
  .phone {
    border-width: 5px;
    border-radius: 36px;
  }
  .demo-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  /* デモ用のiPhone表示では端末設定にかかわらず動きを確認できるようにする。 */
  html:not(.is-iphone-app-view) *,
  html:not(.is-iphone-app-view) *::before,
  html:not(.is-iphone-app-view) *::after { animation: none !important; transition: none !important; }
  html:not(.is-iphone-app-view) .app-splash.is-playing .splash-brand .brand-mark,
  html:not(.is-iphone-app-view) .app-splash.is-playing .splash-name,
  html:not(.is-iphone-app-view) .app-splash.is-playing .splash-go,
  html:not(.is-iphone-app-view) .app-splash.is-playing .splash-tagline span,
  html:not(.is-iphone-app-view) .app-splash.is-playing .splash-tagline em,
  html:not(.is-iphone-app-view) .app-splash.is-playing .splash-loader { opacity: 1; filter: none; transform: none; }
  html:not(.is-iphone-app-view) .app-splash.is-playing .splash-loader i { transform: scaleX(1); }
}
