/* ============ 삿포로 겨울 동화 — 스타일 ============ */
:root {
  --night: #0a1628;
  --night2: #11243f;
  --night3: #1a3356;
  --snow: #f6faff;
  --card: #fbfdff;
  --ink: #13233a;
  --ink2: #50627b;
  --ink3: #8595ab;
  --line: #e2eaf4;
  --ice: #cfe6ff;
  --frost: #9cc6ec;
  --star: #ff5a5f;
  --lamp: #ffb45c;
  --adult: #2f6fd6;
  --teen: #e0508a;
  --boy: #1f9d74;
  --radius: 20px;
  --tabh: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --serif: "Gowun Batang", "Noto Serif JP", serif;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(120% 60% at 50% -10%, #28507f 0%, transparent 60%),
    linear-gradient(180deg, var(--night) 0%, var(--night2) 45%, #183152 100%) fixed;
  background-color: var(--night);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  line-height: 1.55;
}
button { font: inherit; color: inherit; cursor: pointer; }
.jp { font-family: "Noto Serif JP", serif; }
.small { font-size: 12.5px; color: var(--ink3); }

#snow { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }

#app {
  position: relative; z-index: 2;
  max-width: 560px; margin: 0 auto;
  padding-bottom: calc(var(--tabh) + var(--safe-b) + 28px);
}
.view { display: none; animation: fadeUp .45s ease both; }
.view.active { display: block; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- HERO ---------- */
.hero {
  position: relative; min-height: 88svh; display: flex; align-items: flex-end;
  padding: 0 20px 44px; color: #fff; overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; background-size: cover; background-position: center 60%;
  transform: scale(1.08); animation: slowzoom 24s ease-in-out infinite alternate;
}
.hero-slide {
  position: absolute; inset: 0; background-size: cover; background-position: center;
  opacity: 0; transition: opacity 1.8s ease;
}
.hero-slide.on { opacity: 1; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,22,40,.25) 0%, rgba(10,22,40,.1) 30%, rgba(10,22,40,.75) 72%, var(--night) 100%);
}
@keyframes slowzoom { to { transform: scale(1.18) translateY(-2%); } }
.hero-inner { position: relative; width: 100%; }
.hero-kicker { margin: 0 0 12px; font-size: 12px; letter-spacing: .22em; font-weight: 600; color: var(--ice); }
.hero-kicker .star { color: var(--star); }
.hero-kicker .jp { font-size: 14px; margin-left: 4px; }
.hero-title {
  font-family: var(--serif); font-weight: 700; margin: 0;
  font-size: clamp(44px, 13vw, 64px); line-height: 1.08; letter-spacing: -.01em;
  text-shadow: 0 6px 30px rgba(0,0,0,.35);
}
.hero-sub { margin: 14px 0 20px; font-size: 15.5px; color: #dbe9fb; }
.hero-dates { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; }
.hero-dates small { font-size: 13px; opacity: .75; }
.hero-dates i { flex: 0 0 38px; height: 1px; background: linear-gradient(90deg, transparent, #fff, transparent); }
.countdown { display: flex; gap: 8px; margin: 18px 0 16px; }
.cd-box {
  flex: 1; text-align: center; padding: 10px 4px 8px; border-radius: 14px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.cd-box b { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cd-box span { font-size: 11px; color: var(--ice); letter-spacing: .08em; }
.cd-msg { flex: 1; padding: 12px 14px; border-radius: 14px; background: rgba(255,180,92,.18); border: 1px solid rgba(255,180,92,.4); font-weight: 600; }
.crew { display: flex; flex-wrap: wrap; gap: 6px; }
.crew-chip { font-size: 13px; padding: 6px 11px; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); }
.share-btn {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px; border-radius: 999px; border: 0; background: #fff; color: var(--night);
  font-weight: 700; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.hero-scroll { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); color: var(--ice); opacity: .7; animation: bob 2s infinite; }
@keyframes bob { 50% { transform: translate(-50%, 5px); } }

/* ---------- OVERVIEW ---------- */
.overview { padding: 8px 16px 6px; }
.ov-title { color: #fff; font-family: var(--serif); font-size: 21px; margin: 14px 4px 12px; }
.ov-list { display: grid; gap: 8px; }
.ov-item {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px; color: #fff; text-align: left; width: 100%;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
}
.ov-item:active { transform: scale(.985); }
.ov-date { text-align: center; line-height: 1.1; }
.ov-date b { font-size: 20px; font-family: var(--serif); }
.ov-date small { display: block; font-size: 11px; color: var(--frost); }
.ov-main b { display: block; font-size: 15px; }
.ov-main span { font-size: 12.5px; color: #b7cbe4; }
.ov-dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 12px currentColor; }
.ov-note {
  margin: 12px 2px 4px; padding: 12px 14px; border-radius: 14px; font-size: 13px; color: #dbe9fb;
  background: rgba(156,198,236,.1); border: 1px dashed rgba(156,198,236,.35);
}

/* ---------- DAY BAR ---------- */
.daybar-wrap {
  position: sticky; top: 0; z-index: 20; padding: 10px 0 10px;
  background: linear-gradient(180deg, rgba(10,22,40,.96) 70%, rgba(10,22,40,0));
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.daybar { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.daybar::-webkit-scrollbar { display: none; }
.day-chip {
  flex: 0 0 auto; scroll-snap-align: center; border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06); color: #cfe0f5; border-radius: 14px; padding: 8px 14px; text-align: left;
  min-width: 84px; transition: .25s;
}
.day-chip b { display: block; font-size: 11px; letter-spacing: .1em; }
.day-chip span { font-size: 15px; font-weight: 700; color: #fff; }
.day-chip small { font-size: 11px; margin-left: 2px; }
.day-chip.active { background: #fff; color: var(--ink2); border-color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.day-chip.active span { color: var(--ink); }
.day-chip .today { display: inline-block; margin-left: 4px; font-size: 10px; background: var(--star); color: #fff; padding: 1px 6px; border-radius: 6px; vertical-align: 2px; }

/* ---------- DAY PANEL ---------- */
.day-head { margin: 6px 16px 14px; padding: 22px 20px 18px; border-radius: 24px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.14); }
.day-head::before { content: ""; position: absolute; width: 220px; height: 220px; right: -70px; top: -90px; border-radius: 50%; background: var(--hue); opacity: .28; filter: blur(30px); }
.dh-label { font-size: 12px; letter-spacing: .2em; color: var(--hue); font-weight: 700; }
.dh-title { font-family: var(--serif); font-size: 30px; margin: 4px 0 2px; }
.dh-sub { color: #c7d8ee; font-size: 14px; }
.dh-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.dh-meta span { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(0,0,0,.22); }
.dh-holiday { background: rgba(255,90,95,.3) !important; }

.team-switch { display: flex; gap: 6px; margin: 0 16px 14px; padding: 5px; border-radius: 16px; background: rgba(255,255,255,.08); }
.team-switch button { flex: 1; border: 0; background: transparent; color: #cfe0f5; padding: 10px 4px; border-radius: 12px; font-size: 13.5px; font-weight: 600; }
.team-switch button.active { background: #fff; color: var(--ink); box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.team-note { margin: -4px 16px 14px; font-size: 12.5px; color: #b7cbe4; }

.timeline { position: relative; margin: 0 16px; padding-left: 0; }
.tl-item { position: relative; display: grid; grid-template-columns: 52px 1fr; gap: 10px; padding-bottom: 12px; }
.tl-item::before { content: ""; position: absolute; left: 25px; top: 44px; bottom: -2px; width: 2px; background: linear-gradient(rgba(255,255,255,.25), rgba(255,255,255,.08)); }
.tl-item:last-child::before { display: none; }
.tl-time { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.tl-time b { font-size: 12.5px; color: #dce9f8; font-variant-numeric: tabular-nums; font-weight: 600; }
.tl-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; background: #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.1); }
.tl-card { min-width: 0; background: var(--card); border-radius: 18px; padding: 14px 15px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.tl-card.now { outline: 3px solid var(--lamp); }
.tl-card h4 { margin: 0 0 4px; font-size: 16px; line-height: 1.35; }
.tl-card p { margin: 0; font-size: 14px; color: var(--ink2); }
.tl-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; margin-bottom: 6px; }
.tl-badge.girls { background: #ffe4ee; color: var(--teen); }
.tl-badge.boy { background: #dcf5ec; color: var(--boy); }
.tl-place {
  margin-top: 10px; display: flex; gap: 10px; align-items: center; width: 100%; text-align: left;
  border: 1px solid var(--line); background: #f3f7fc; border-radius: 14px; padding: 7px; color: var(--ink);
}
.tl-place:active { background: #e8f0fa; }

/* 식당 1·2 번호 탭 */
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.opt-row .tl-badge { margin-bottom: 0; }
.opt-tabs { display: inline-flex; gap: 6px; }
.opt-tab {
  min-width: 36px; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line);
  background: #eef3f9; color: var(--ink3); font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  transition: background .18s, color .18s, border-color .18s;
}
.opt-tab.active { background: var(--adult); border-color: var(--adult); color: #fff; }
.opt-tab:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; }
.opt-wrap { overflow: hidden; transition: height .25s ease; }
.opt-body { display: flow-root; transition: opacity .13s ease; }
.opt-body.fade { opacity: 0; }
.tl-thumb { width: 58px; height: 58px; flex: 0 0 58px; border-radius: 10px; background: #dde8f4 center/cover no-repeat; display: grid; place-items: center; font-size: 22px; }
.tl-place-main { flex: 1; min-width: 0; }
.tl-place-main b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-place-main span { font-size: 12px; color: var(--ink3); }
.tl-place-main em { font-style: normal; font-size: 11px; font-weight: 700; color: var(--teen); }
.tl-arrow { color: var(--ink3); font-size: 18px; padding-right: 4px; }

.mission { margin: 18px 16px 8px; padding: 18px; border-radius: 20px; color: #fff;
  background: linear-gradient(135deg, rgba(255,180,92,.22), rgba(255,90,95,.14)); border: 1px solid rgba(255,180,92,.35); }
.mission h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 19px; }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px dashed rgba(255,255,255,.2); font-size: 14.5px; cursor: pointer; }
.check:first-of-type { border-top: 0; }
.check input { appearance: none; -webkit-appearance: none; flex: 0 0 22px; width: 22px; height: 22px; margin: 0; border-radius: 7px; border: 2px solid currentColor; opacity: .75; display: grid; place-items: center; transition: .2s; }
.check input:checked { background: var(--lamp); border-color: var(--lamp); opacity: 1; }
.check input:checked::after { content: "✓"; color: var(--night); font-weight: 900; font-size: 14px; }
.check input:checked + span { text-decoration: line-through; opacity: .6; }

.day-nav { display: flex; justify-content: space-between; gap: 10px; margin: 18px 16px 0; }
.day-nav button { flex: 1; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; border-radius: 14px; padding: 12px; font-size: 14px; }
.day-nav button:disabled { opacity: .3; }

/* ---------- PAGE HEAD ---------- */
.page-head { padding: 34px 20px 16px; color: #fff; }
.page-kicker { margin: 0; font-size: 12px; letter-spacing: .22em; color: var(--frost); font-weight: 700; }
.page-head h2 { font-family: var(--serif); font-size: 30px; margin: 6px 0 6px; }
.page-desc { margin: 0; color: #c1d3ea; font-size: 14px; }
.tag-a { color: #8fb8ff; } .tag-t { color: #ff9cc2; }

/* ---------- MAP ---------- */
.map-filters, .chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 16px 12px; scrollbar-width: none; }
.map-filters::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #dbe9fb; border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; }
.chip.active { background: #fff; color: var(--ink); }
.chip i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.map-box { margin: 0 16px; border-radius: 22px; overflow: hidden; border: 1px solid rgba(255,255,255,.15); box-shadow: 0 14px 40px rgba(0,0,0,.3); }
#map { height: 58svh; min-height: 360px; background: #dfe8f2; }
.jump-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px 0; }
.jump-row button { border: 0; border-radius: 12px; padding: 9px 12px; background: rgba(255,255,255,.1); color: #fff; font-size: 13px; }
.stay-note { margin: 14px 16px 0; font-size: 12.5px; color: #b7cbe4; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.05); }
.stay-note b { color: #fff; font-weight: 600; }
.stay-note code { background: rgba(255,255,255,.1); padding: 1px 5px; border-radius: 4px; }
.pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.pin span { transform: rotate(45deg); font-size: 16px; }
.pin.home { background: var(--star) !important; width: 40px; height: 40px; }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--sans); }
.pop b { display: block; font-size: 14px; }
.pop span { font-size: 12px; color: var(--ink3); }
.pop button { margin-top: 8px; border: 0; background: var(--night); color: #fff; border-radius: 8px; padding: 6px 10px; font-size: 12px; }

/* ---------- FOOD ---------- */
.food-list { display: grid; gap: 16px; padding: 0 16px; }
.food-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 34px rgba(0,0,0,.22); }
.fc-img { height: 180px; background: #dbe6f2 center/cover no-repeat; position: relative; display: grid; place-items: center; font-size: 54px; }
.fc-img .days { position: absolute; left: 12px; top: 12px; display: flex; gap: 4px; }
.fc-img .days span { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 7px; background: rgba(10,22,40,.75); color: #fff; letter-spacing: .05em; }
.fc-img .price { position: absolute; right: 12px; bottom: 12px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 8px; background: rgba(255,255,255,.92); color: var(--ink); }
.fc-img .note { position: absolute; left: 12px; bottom: 12px; font-size: 10.5px; padding: 2px 7px; border-radius: 6px; background: rgba(0,0,0,.45); color: #fff; }
.fc-body { padding: 16px 16px 14px; min-width: 0; }
.menu-col { min-width: 0; }
.fc-body h3 { margin: 0; font-size: 18px; }
.fc-jp { font-family: "Noto Serif JP", serif; font-size: 12.5px; color: var(--ink3); margin: 2px 0 8px; }
.fc-body > p { margin: 0 0 12px; font-size: 14px; color: var(--ink2); }
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-col { border-radius: 14px; padding: 11px 11px 8px; }
.menu-col.a { background: #eaf1fd; }
.menu-col.t { background: #fdebf2; }
.menu-col h5 { margin: 0 0 6px; font-size: 12px; letter-spacing: .02em; }
.menu-col.a h5 { color: var(--adult); }
.menu-col.t h5 { color: var(--teen); }
.menu-col ul { margin: 0; padding: 0; list-style: none; }
.menu-col li { font-size: 12.8px; line-height: 1.45; padding: 4px 0; border-top: 1px solid rgba(0,0,0,.06); }
.menu-col li:first-child { border-top: 0; }
.fc-actions { display: flex; gap: 8px; margin-top: 12px; }
.btn { flex: 1; display: inline-flex; justify-content: center; align-items: center; gap: 6px; border: 0; border-radius: 12px; padding: 11px 12px; font-size: 14px; font-weight: 700; text-decoration: none; }
.btn.dark { background: var(--night); color: #fff; }
.btn.light { background: #eef3f9; color: var(--ink); }

/* ---------- CARDS / SHOP / INFO ---------- */
.card { margin: 14px 16px 0; padding: 18px; border-radius: var(--radius); background: var(--card); box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.card h3 { margin: 0 0 10px; font-size: 17px; }
.dots { margin: 0; padding-left: 18px; }
.dots li { margin: 6px 0; font-size: 14px; color: var(--ink2); }
.dots b { color: var(--ink); }
.souv { display: flex; flex-wrap: wrap; gap: 6px; }
.souv span { font-size: 13px; padding: 7px 10px; border-radius: 10px; background: #eef4fb; }

.donki-progress { margin: 0 16px 6px; padding: 16px 18px; border-radius: 20px; color: #fff; background: linear-gradient(135deg, #ffcf3f 0%, #ff8a3d 100%); position: relative; overflow: hidden; }
.donki-progress::after { content: "🐧"; position: absolute; right: 10px; top: -4px; font-size: 64px; opacity: .9; }
.donki-progress b { font-size: 26px; color: #3a1a00; }
.donki-progress p { margin: 0 0 8px; color: #4b2200; font-weight: 700; }
.bar { height: 10px; border-radius: 999px; background: rgba(255,255,255,.45); overflow: hidden; margin-right: 70px; }
.bar i { display: block; height: 100%; background: #3a1a00; border-radius: 999px; transition: width .4s; }
.list-card { margin: 12px 16px 0; padding: 14px 16px; border-radius: 18px; background: var(--card); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.list-card h4 { margin: 0 0 4px; font-size: 15px; }
.list-card .check { color: var(--ink); border-top-color: var(--line); padding: 10px 0; }
.list-card .check input { color: #9fb0c6; }
.list-card .check input:checked { background: var(--night); border-color: var(--night); }
.list-card .check input:checked::after { color: #fff; }
.list-card .check input:checked + span { opacity: .5; }

.weather { margin: 0 16px; padding: 20px; border-radius: 24px; color: #fff; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center;
  background: linear-gradient(135deg, #3b6ea8 0%, #1c3a63 100%); border: 1px solid rgba(255,255,255,.18); }
.w-temp { font-size: 42px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.w-temp small { font-size: 18px; font-weight: 600; opacity: .8; }
.w-label { font-size: 12px; color: var(--ice); margin-top: 6px; }
.w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.w-grid div { background: rgba(255,255,255,.1); border-radius: 12px; padding: 8px 10px; }
.w-grid b { display: block; font-size: 14px; }
.w-grid span { font-size: 11px; color: var(--ice); }

.acc { margin: 12px 16px 0; border-radius: 18px; background: var(--card); box-shadow: 0 8px 24px rgba(0,0,0,.18); overflow: hidden; }
.acc summary { list-style: none; padding: 16px 18px; font-weight: 700; font-size: 15.5px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after { content: "＋"; margin-left: auto; color: var(--ink3); transition: .2s; }
.acc[open] summary::after { transform: rotate(45deg); }
.acc summary small { font-weight: 500; color: var(--ink3); font-size: 12px; }
.acc > ul, .acc > div, .acc > p { padding: 0 18px 16px; }
.acc > ul { padding-left: 36px; }
.acc-count { font-size: 12px; font-weight: 700; color: #fff; background: var(--night); padding: 2px 8px; border-radius: 999px; }
.pack-group h4 { margin: 12px 0 2px; font-size: 13px; color: var(--ink3); }
.pack-group .check { color: var(--ink); border-top-color: var(--line); padding: 9px 0; font-size: 14px; }
.pack-group .check input { color: #9fb0c6; }
.pack-group .check input:checked { background: var(--night); border-color: var(--night); }
.pack-group .check input:checked::after { color: #fff; }
.pack-group .check input:checked + span { opacity: .5; }

.phrases { display: grid; gap: 8px; }
.phrase { text-align: left; border: 1px solid var(--line); background: #f5f8fc; border-radius: 14px; padding: 11px 14px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.phrase b { font-size: 14px; }
.phrase .jp { font-size: 16px; color: var(--night3); grid-column: 1; }
.phrase small { font-size: 12px; color: var(--ink3); grid-column: 1; }
.phrase .spk { grid-row: 1 / span 3; grid-column: 2; width: 36px; height: 36px; border-radius: 50%; background: var(--night); color: #fff; display: grid; place-items: center; font-size: 15px; }
.phrase.playing { border-color: var(--lamp); background: #fff6ea; }

.fx { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: end; }
.fx label span { display: block; font-size: 12px; color: var(--ink3); margin-bottom: 4px; }
.fx input, .fx-rate input { width: 100%; font: inherit; font-size: 20px; font-weight: 700; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #f5f8fc; color: var(--ink); }
.fx-eq { font-size: 20px; padding-bottom: 12px; color: var(--ink3); }
.fx-rate { display: block; margin-top: 10px; font-size: 13px; color: var(--ink2); }
.fx-rate input { width: 80px; font-size: 14px; padding: 6px 8px; display: inline-block; }
.fx-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.fx-quick button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; font-size: 12.5px; }

.emergency a { display: flex; justify-content: space-between; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 14px; }
.emergency a:first-of-type { border-top: 0; }
.emergency a b { color: var(--star); white-space: nowrap; }
.credits { padding-left: 18px !important; font-size: 11.5px; }
.credits li { margin: 3px 0; word-break: break-all; }
.credits a { color: var(--ink2); }
.foot { text-align: center; color: #b7cbe4; padding: 30px 16px 0; font-family: var(--serif); }
.foot p { margin: 4px 0; }

/* ---------- TABBAR ---------- */
.tabbar {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + var(--safe-b)); width: calc(100% - 24px); max-width: 520px; height: var(--tabh);
  display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px;
  border-radius: 24px; background: rgba(250,253,255,.9); border: 1px solid rgba(255,255,255,.6);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.tab { border: 0; background: transparent; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink3); font-size: 11px; font-weight: 700; transition: .2s; }
.tab svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab.active { color: #fff; background: var(--night); }

/* ---------- SHEET ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 50; background: rgba(5,12,24,.55); backdrop-filter: blur(2px); opacity: 0; transition: opacity .3s; }
.sheet-backdrop.show { opacity: 1; }
.sheet {
  position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px;
  max-height: 92svh; background: var(--card); border-radius: 26px 26px 0 0; overflow: hidden;
  transform: translateY(105%); transition: transform .38s cubic-bezier(.2,.9,.25,1);
  display: flex; flex-direction: column; box-shadow: 0 -20px 60px rgba(0,0,0,.4);
}
.sheet.open { transform: translateY(0); }
.sheet-grip { position: absolute; top: 0; left: 0; right: 0; height: 28px; z-index: 3; display: grid; place-items: center; }
.sheet-grip i { width: 44px; height: 5px; border-radius: 9px; background: rgba(255,255,255,.85); box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.sheet-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(10,22,40,.6); color: #fff; font-size: 15px; backdrop-filter: blur(6px); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding-bottom: calc(24px + var(--safe-b)); }
.sh-img { height: 260px; background: #dbe6f2 center/cover no-repeat; position: relative; display: grid; place-items: center; font-size: 70px; }
.sh-img::after { content: ""; position: absolute; inset: auto 0 0 0; height: 90px; background: linear-gradient(transparent, var(--card)); }
.sh-img .note { position: absolute; left: 14px; top: 16px; font-size: 11px; padding: 2px 8px; border-radius: 6px; background: rgba(0,0,0,.45); color: #fff; z-index: 2; }
.photo-credit { margin: 0; padding: 6px 16px 0; font-size: 11px; line-height: 1.45; color: var(--ink3); overflow-wrap: anywhere; position: relative; z-index: 2; }
.sh-img + .photo-credit { padding: 8px 20px 0; }
.photo-credit + .sh-content { margin-top: 0; }
.credits .photo-credit-line { font-size: 11px; color: var(--ink3); }
.sh-content { padding: 0 20px; margin-top: -24px; position: relative; z-index: 2; }
.sh-type { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--adult); }
.sh-content h2 { margin: 4px 0 0; font-size: 24px; font-family: var(--serif); }
.sh-jp { font-family: "Noto Serif JP", serif; color: var(--ink3); font-size: 14px; }
.sh-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.sh-meta span { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: #eef3f9; color: var(--ink2); }
.sh-content > p { font-size: 15px; color: var(--ink2); margin: 0 0 16px; }
.sh-content h4 { margin: 18px 0 8px; font-size: 14px; }
.sh-tips { list-style: none; padding: 0; margin: 0; }
.sh-tips li { position: relative; padding: 9px 0 9px 26px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink2); }
.sh-tips li:first-child { border-top: 0; }
.sh-tips li::before { content: "❄"; position: absolute; left: 4px; color: var(--frost); }
.sh-actions { display: flex; gap: 8px; margin-top: 18px; }

/* ---------- TOAST ---------- */
.toast { position: fixed; z-index: 90; left: 50%; bottom: calc(var(--tabh) + 30px + var(--safe-b)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: rgba(10,22,40,.92); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; transition: .3s; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 600px) {
  .hero { min-height: 70vh; border-radius: 0 0 32px 32px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-bg, .hero-scroll { animation: none; }
  .view { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  .opt-wrap, .opt-body, .opt-tab { transition: none; }
}
