:root {
  color-scheme: dark;
  --paper: #070808;
  --surface: #101210;
  --surface-raised: #151714;
  --ink: #f5f4ef;
  --muted: #a4a6a0;
  --line: rgba(255, 255, 255, .1);
  --vermillion: #ff6a49;
  --bottle: #153d34;
  --whatsapp: #20b85f;
  --whatsapp-dark: #0b7d3c;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--paper); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 4%, rgba(255, 106, 73, .09), transparent 24rem),
    radial-gradient(circle at 92% 34%, rgba(32, 184, 95, .065), transparent 28rem),
    linear-gradient(180deg, #090a09 0%, #050606 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: radial-gradient(rgba(255, 255, 255, .12) .65px, transparent .65px);
  background-size: 7px 7px;
  mask-image: linear-gradient(to bottom, black, transparent 56%);
}

button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 20; padding: 10px 14px; border-radius: 8px; background: white; color: #090a09; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.shell {
  position: relative;
  z-index: 1;
  width: min(100% - 28px, 740px);
  margin: 0 auto;
  padding: max(32px, env(safe-area-inset-top)) 0 max(36px, env(safe-area-inset-bottom));
}

.brand { text-align: center; padding: 14px 8px 42px; }
.brand-mark-wrap {
  width: 118px;
  height: 118px;
  margin: 0 auto 26px;
}
.brand-mark { width: 100%; height: 100%; display: block; border-radius: 50%; object-fit: cover; }
.intro { max-width: 570px; margin: 0 auto; color: #d0d1cc; font-size: clamp(.98rem, 3.7vw, 1.1rem); font-weight: 400; letter-spacing: .005em; }
.brand-line { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 19px 0 0; font-family: Georgia, serif; font-style: italic; color: #8da69e; }
.brand-line span { width: 28px; height: 1px; background: currentColor; opacity: .55; }

.card {
  margin-bottom: 16px;
  padding: clamp(20px, 5vw, 30px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(17, 19, 17, .9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
h2 { margin: 0; color: var(--ink); font-size: clamp(1.42rem, 5.2vw, 2.05rem); font-weight: 560; line-height: 1.12; letter-spacing: -.03em; }

.route-card { overflow: hidden; }
.route-heading-row { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.route-summary { margin: 10px 0 0; color: var(--muted); font-size: .94rem; }
.stamp { flex: 0 0 auto; width: 57px; height: 57px; display: grid; place-items: center; border: 1.5px solid var(--vermillion); border-radius: 50%; color: var(--vermillion); font-size: .65rem; font-weight: 780; line-height: 1.05; letter-spacing: .08em; text-align: center; transform: rotate(8deg); opacity: .92; }
.route-visual { position: relative; margin-top: 22px; border: 1px solid rgba(255,255,255,.085); border-radius: 22px; color: #a0bab0; background: #0b2421; box-shadow: inset 0 1px 0 rgba(255,255,255,.035); overflow: hidden; }
.map-canvas { width: 100%; height: clamp(278px, 54vw, 380px); background: #0c1517; }
.map-canvas[hidden], .map-loading[hidden] { display: none; }
.map-loading { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; margin: 0; background: radial-gradient(circle at 66% 42%, #162b2b, #091112 72%); color: #aeb9b5; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; pointer-events: none; }
.maplibregl-canvas { outline: none; }
.maplibregl-ctrl-bottom-left, .maplibregl-ctrl-bottom-right { z-index: 2; }
.maplibregl-ctrl-attrib { color: #7f8b88; background: rgba(4, 8, 8, .76) !important; font-size: 9px; }
.maplibregl-ctrl-attrib a { color: #adb9b6; }
.maplibregl-ctrl-group { border: 1px solid rgba(255,255,255,.12); background: rgba(8,13,13,.82); box-shadow: 0 6px 18px rgba(0,0,0,.24); }
.maplibregl-ctrl-group button + button { border-top-color: rgba(255,255,255,.12); }
.maplibregl-ctrl-icon { filter: invert(1); opacity: .82; }
.map-marker { position: relative; width: 20px; height: 26px; pointer-events: none; }
.map-marker-ring { position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border: 2px solid white; border-radius: 50%; background: #10201f; box-shadow: 0 0 0 5px rgba(255,255,255,.12), 0 5px 14px rgba(0,0,0,.48); }
.map-marker-ring::after { content: ""; position: absolute; left: 4px; top: 4px; width: 4px; height: 4px; border-radius: 50%; background: white; }
.map-marker-fukuoka .map-marker-ring { border-color: #ffb39f; background: #351713; box-shadow: 0 0 0 6px rgba(255,106,73,.18), 0 5px 14px rgba(0,0,0,.48); animation: map-pin-arrival 1.8s ease-out 1 both; }
.map-marker-fukuoka .map-marker-ring::after { background: var(--vermillion); }
.map-marker-label { position: absolute; left: 50%; bottom: 26px; max-width: 150px; padding: 4px 7px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; background: rgba(5,9,9,.88); color: white; font-size: 10px; font-weight: 760; letter-spacing: .07em; line-height: 1.2; text-transform: uppercase; white-space: nowrap; transform: translateX(-50%); box-shadow: 0 5px 14px rgba(0,0,0,.25); }
.map-marker-fukuoka .map-marker-label { color: #ffb7a6; }
.flight-plane-marker { width: 28px; height: 28px; display: grid; place-items: center; pointer-events: none; filter: drop-shadow(0 3px 7px rgba(0,0,0,.72)); }
.flight-plane-icon { display: block; color: #fff; font-size: 23px; line-height: 1; transform-origin: center; }
.space-fallback { position: absolute; inset: 0; z-index: 3; min-height: 300px; display: grid; place-items: center; align-content: center; gap: 7px; color: white; background: radial-gradient(circle at 79% 47%, #18343f, #0c1120 52%, #04060d); opacity: 1; transition: opacity .8s ease; }
.space-fallback[hidden] { display: none; }
.space-scene { position: relative; z-index: 1; display: block; width: 100%; height: auto; max-height: 262px; overflow: visible; }
.space-stars { fill: rgba(255,255,255,.72); }
.rocket-trail { fill: none; stroke: rgba(255,255,255,.34); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 5 7; }
.space-rocket-group { will-change: transform; }
.rocket-body { fill: #f4f2eb; stroke: #ffffff; stroke-width: 1; }
.rocket-window { fill: #2d7085; }
.rocket-fin { fill: #ff6a49; }
.rocket-flame { fill: #f7a24c; }
.earth-glow { fill: rgba(71,151,179,.3); }
.earth-sea { fill: url(#earth-sea); stroke: rgba(169,226,241,.62); stroke-width: 1.5; }
.earth-land { fill: #4f7864; opacity: .92; }
.japan-islands { fill: #c6d6b7; stroke: rgba(255,255,255,.78); stroke-width: .65; }
.space-place-line { fill: none; stroke: rgba(255,255,255,.52); stroke-width: .8; }
.japan-label, .fukuoka-space-label { fill: rgba(255,255,255,.9); font-size: 8px; font-weight: 800; letter-spacing: 1.2px; }
.japan-label { text-anchor: start; }
.fukuoka-space-label { fill: #ffb39f; font-size: 7px; letter-spacing: .8px; }
.fukuoka-pulse { fill: none; stroke: #ff8e73; stroke-width: 3; transform-box: fill-box; transform-origin: center; }
.fukuoka-core { fill: #ff6848; stroke: white; stroke-width: 1.4; }
.space-fallback.is-active .space-earth-group { transform-origin: 480px 150px; animation: earth-settle 9.5s cubic-bezier(.2,.7,.2,1) 1 both; }
.space-fallback.is-active .fukuoka-pulse { animation: destination-pulse 9.5s ease-out 1 both; }
.space-fallback.is-active .rocket-trail { animation: trail-reveal 9.5s ease-out 1 both; }
.space-fallback.is-looping .space-earth-group { transform-origin: 480px 150px; animation: earth-settle 9.5s cubic-bezier(.2,.7,.2,1) infinite both; }
.space-fallback.is-looping .fukuoka-pulse { animation: destination-pulse 9.5s ease-out infinite both; }
.space-fallback.is-looping .rocket-trail { animation: trail-reveal 9.5s ease-out infinite both; }
.space-fallback.is-departing { opacity: 0; pointer-events: none; }
.map-marker-fukuoka.map-marker-arrival .map-marker-ring { animation: fukuoka-settled-pulse 3.6s ease-in-out infinite; }
.space-copy { position: relative; z-index: 1; display: grid; text-align: center; }
.space-copy strong { font-size: .74rem; letter-spacing: .18em; }
.space-copy span { color: rgba(255,255,255,.68); font-size: .8rem; }
.route-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 17px; }
.distance-block { display: grid; gap: 1px; }
.distance-label { color: var(--vermillion); font-size: .65rem; font-weight: 780; letter-spacing: .13em; text-transform: uppercase; }
.route-meta strong { color: #faf9f4; font-size: 1.05rem; font-weight: 620; }
.distance-secondary { color: var(--muted); font-size: .78rem; }
.privacy-note { min-height: 44px; padding: 8px 0; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: .78rem; cursor: pointer; }
.privacy-note:hover { color: #dedfd9; }
.privacy-detail { margin: 4px 0 0; padding: 11px 13px; border: 1px solid rgba(255,255,255,.06); border-radius: 10px; background: #0b0d0c; color: #aeb0aa; font-size: .82rem; }

.time-card { background: linear-gradient(145deg, #171916, #0d0f0e); }
.location-debug { position: fixed; left: 10px; bottom: 10px; z-index: 100; max-width: min(360px, calc(100vw - 20px)); padding: 9px 11px; border: 1px solid rgba(255,255,255,.18); border-radius: 8px; background: rgba(0,0,0,.88); color: #d9ddd7; font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; pointer-events: none; }
.time-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 22px; }
.time-primary, .time-secondary, .weather-panel { padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); }
.time-label { margin: 0 0 5px; color: #979a94; font-size: .72rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.time-value { margin: 0; font-size: clamp(1.3rem, 6vw, 2rem); font-weight: 590; letter-spacing: -.035em; }
.local-value { margin: 0; font-size: 1.05rem; font-weight: 560; }
.daypart { margin: 6px 0 0; color: #f2a08b; }
.difference { margin: 6px 0 0; color: #bcbeb8; font-size: .88rem; }
.weather-row { display: flex; align-items: center; gap: 13px; }
.weather-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; color: #ffb8a6; font-size: 1.6rem; }
.weather-temperature { margin: 0; font-size: 1.55rem; font-weight: 560; letter-spacing: -.03em; }
.weather-condition { margin: 0; color: #bcbeb8; font-size: .82rem; }
.weather-source { display: inline-block; margin-top: 7px; color: #838680; font-size: .68rem; text-decoration: none; }
.weather-source:hover { color: white; text-decoration: underline; }

.note-card { background: linear-gradient(145deg, rgba(22,24,21,.94), rgba(13,15,14,.94)); }
.note-card h2 { font-size: 1rem; font-weight: 600; letter-spacing: .015em; }
blockquote { margin: 17px 0 0; color: #dcddd7; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.12rem, 4.5vw, 1.38rem); font-weight: 400; line-height: 1.52; }

.links-section { padding: 31px 0 10px; }
.links-section > h2 { margin-bottom: 20px; }
.link-list { display: grid; gap: 12px; }
.link-button { min-height: 102px; display: grid; grid-template-columns: 86px minmax(0, 1fr) 24px; align-items: center; gap: 15px; padding: 9px 16px 9px 9px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface-raised); color: var(--ink); text-decoration: none; box-shadow: 0 12px 34px rgba(0,0,0,.26); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; overflow: hidden; }
.link-button:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.24); box-shadow: 0 17px 38px rgba(0,0,0,.4); }
.link-button:focus-visible, button:focus-visible { outline: 3px solid #69a6ff; outline-offset: 3px; }
.link-image { width: 86px; height: 84px; display: block; object-fit: cover; border: 1px solid rgba(255,255,255,.13); border-radius: 15px; background: #f7f6f2; }
.link-copy { min-width: 0; display: grid; gap: 2px; }
.link-copy strong, .noscript-links strong { color: #f8f7f2; font-size: .98rem; font-weight: 590; line-height: 1.22; }
.link-copy small, .noscript-links small { color: var(--muted); font-size: .79rem; line-height: 1.35; }
.link-end { color: #7d817a; font-size: 1.1rem; }
.link-button.primary { min-height: 136px; grid-template-columns: 116px minmax(0, 1fr) 24px; margin-bottom: 5px; padding: 10px 18px 10px 10px; border: 1px solid rgba(114,255,167,.28); border-radius: 23px; background: linear-gradient(135deg, var(--whatsapp), var(--whatsapp-dark)); color: white; box-shadow: 0 18px 44px rgba(10,125,59,.34); }
.link-button.primary .link-image { width: 116px; height: 116px; border-color: rgba(255,255,255,.28); border-radius: 18px; }
.link-button.primary .link-copy strong { color: white; font-size: 1.08rem; font-weight: 680; }
.link-button.primary .link-copy small, .link-button.primary .link-end { color: rgba(255,255,255,.82); }
.noscript-links .link-button { grid-template-columns: 86px minmax(0,1fr); }
.noscript-links .link-button.primary { grid-template-columns: 116px minmax(0,1fr); }
.noscript-links img { width: 86px; height: 84px; object-fit: cover; border-radius: 15px; }
.noscript-links .primary img { width: 116px; height: 116px; }
.noscript-links small { display: block; }

footer { padding: 30px 8px 10px; text-align: center; color: #747871; font-size: .75rem; letter-spacing: .13em; }
footer p { margin: 4px 0; }
footer p:last-child { font-family: Georgia, serif; font-style: italic; letter-spacing: 0; }

@keyframes map-pin-arrival {
  0% { box-shadow: 0 0 0 2px rgba(255,106,73,.52), 0 5px 14px rgba(0,0,0,.48); }
  55% { box-shadow: 0 0 0 15px rgba(255,106,73,0), 0 5px 14px rgba(0,0,0,.48); }
  100% { box-shadow: 0 0 0 6px rgba(255,106,73,.18), 0 5px 14px rgba(0,0,0,.48); }
}
@keyframes fukuoka-settled-pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(255,106,73,.14), 0 5px 14px rgba(0,0,0,.48); }
  50% { box-shadow: 0 0 0 11px rgba(255,106,73,.04), 0 5px 14px rgba(0,0,0,.48); }
}
@keyframes rocket-approach {
  0% { opacity: 0; transform: translate(72px, 237px) rotate(-28deg) scale(.76); }
  9% { opacity: 1; }
  59% { opacity: 1; transform: translate(370px, 117px) rotate(-19deg) scale(.98); }
  72%, 100% { opacity: .96; transform: translate(392px, 100px) rotate(-18deg) scale(1); }
}
@keyframes earth-settle {
  0% { opacity: .72; transform: rotate(-12deg) scale(.9) translate(8px, 2px); }
  42% { opacity: 1; transform: rotate(7deg) scale(1.025) translate(0, 0); }
  72%, 100% { opacity: 1; transform: rotate(0) scale(1) translate(0, 0); }
}
@keyframes destination-pulse {
  0%, 32% { opacity: 0; transform: scale(.5); }
  42% { opacity: .95; transform: scale(.8); }
  52% { opacity: .15; transform: scale(2.7); }
  61% { opacity: .9; transform: scale(.9); }
  72%, 100% { opacity: .38; transform: scale(1.55); }
}
@keyframes trail-reveal {
  0% { opacity: 0; stroke-dashoffset: 180; }
  14% { opacity: .1; }
  63% { opacity: .72; stroke-dashoffset: 0; }
  72%, 100% { opacity: .38; stroke-dashoffset: 0; }
}

@media (min-width: 580px) {
  .shell { padding-top: 48px; }
  .brand { padding-bottom: 50px; }
  .time-grid { grid-template-columns: 1.25fr .9fr .8fr; gap: 24px; }
  .time-primary, .time-secondary, .weather-panel { min-height: 118px; }
  .link-button { padding-inline: 20px; }
}

@media (max-width: 380px) {
  .shell { width: min(100% - 20px, 740px); }
  .card { border-radius: 20px; padding: 18px; }
  .stamp { display: none; }
  .link-button { grid-template-columns: 76px minmax(0, 1fr) 18px; gap: 10px; padding: 8px 10px 8px 8px; }
  .link-image { width: 76px; height: 76px; }
  .link-button.primary { grid-template-columns: 94px minmax(0,1fr) 18px; min-height: 120px; padding: 8px 10px 8px 8px; }
  .link-button.primary .link-image { width: 94px; height: 104px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .space-rocket-group { opacity: .96; }
  .space-earth-group { opacity: 1; transform: none; }
  .fukuoka-pulse { opacity: .38; transform: scale(1.55); }
  .rocket-trail { opacity: .38; stroke-dashoffset: 0; }
}
