:root {
  --wordmark: "Gloock", Georgia, serif;
  --serif: "Iansui", "Songti TC", "PMingLiU", serif;
  --ui: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  font-family: var(--ui);
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
}
html:lang(en) {
  --serif: var(--wordmark);
  --ui: "DM Sans", "Helvetica Neue", Arial, sans-serif;
}
html:lang(ja) {
  --serif: "Kaisei Opti", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --ui: "Zen Kaku Gothic New", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
html:lang(ko) {
  --serif: "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
  --ui: "Gothic A1", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
html:lang(zh-Hans) {
  --serif: "Ma Shan Zheng", "Kaiti SC", "KaiTi", serif;
  --ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
button, a, select, summary { touch-action: manipulation; }
button { cursor: pointer; }
:is(button, a, input, select, summary):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1360px, calc(100% - clamp(32px, 8vw, 116px))); margin-inline: auto; }

.skip { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 12px; color: var(--ink); background: var(--surface); }
.skip:focus { top: 8px; }
.mast {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.mast-inner { display: flex; gap: clamp(12px, 2vw, 28px); align-items: center; justify-content: space-between; min-height: 72px; }


.wordmark {
  display: inline-flex; align-items: center; flex: 0 1 172px; min-width: 0;
  padding: 4px 6px; border-radius: 6px;
}
.wordmark picture, .wordmark img { display: block; width: 100%; }
.wordmark img { height: auto; }
@media (max-width: 490px) { .wordmark { flex-basis: 138px; } }
.primary { display: flex; align-items: stretch; gap: clamp(16px, 2.2vw, 38px); }
.primary a, .more, .snow-status, .mobile-nav a { font-size: .875rem; font-weight: 670; }
.primary a {
  display: flex;
  align-items: center;
  min-height: 72px;
  border-block: 2px solid transparent;
  text-decoration: none;
}
.primary a[aria-current="page"] { border-bottom-color: var(--lift); color: var(--accent); }
:is(.primary a, .foot a, .mobile-nav a):hover { color: var(--accent); }
.mast-tools { display: flex; align-items: center; gap: 8px; }
.snow-status, .theme-toggle, .hamb {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  white-space: nowrap;
  text-decoration: none;
}
.language-picker { position: relative; display: inline-flex; color: var(--ink); }
.language-picker svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; pointer-events: none; }
.language-picker::after { position: absolute; content: ""; right: 11px; top: 45%; width: 5px; height: 5px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); pointer-events: none; }
.language-picker select { appearance: none; font: 650 .875rem/1.3 var(--ui); color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; min-height: 42px; padding: 0 23px 0 34px; cursor: pointer; }
.language-picker select:hover { border-color: var(--line-strong); }
@media (max-width: 540px) {
  .language-picker select { width: 44px; color: transparent; padding: 0; }
  .language-picker option { color: var(--ink); background: var(--surface); }
  .language-picker svg { left: 9px; }
  .language-picker::after { right: 7px; }
  .theme-toggle { width: 42px; padding: 0; }
  .theme-toggle [data-theme-label] { display: none; }
}
.snow-status { color: var(--accent); }
.theme-toggle { font-size: .875rem; font-weight: 700; }
:is(.snow-status, .theme-toggle, .hamb):hover { background: var(--soft); border-color: var(--line-strong); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle[aria-pressed="false"] .theme-moon,
.theme-toggle[aria-pressed="true"] .theme-sun { display: none; }
.symbol, .stat-icon { display: inline-flex; align-items: center; flex: 0 0 auto; }
.symbol svg { width: 18px; height: 18px; }
.hamb { display: none; width: 42px; padding: 0; }
.hamb span { display: block; width: 17px; height: 12px; border-block: 1.6px solid currentColor; }
.hamb span::before { display: block; height: 1.6px; margin-top: 3.4px; background: currentColor; content: ""; }
.mobile-nav { display: none; }
.mobile-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-decoration-color: var(--lift); text-underline-offset: .3em; }

#home {
  scroll-margin-block-start: 5rem;
  background: var(--paper);
  color: var(--ink);
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--soft);
}
.hero-art, .hero-img, .hero::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.hero-art, .hero-img { z-index: -2; }
.hero-img { object-fit: cover; object-position: 50% 56%; }
.hero::before {
  z-index: -1;
  content: "";
  background: radial-gradient(ellipse 55% 70% at 12% 16%, #fbf3e173, #fbf3e12e 55%, transparent 88%);
  pointer-events: none;
}
:root[data-theme="dark"] .hero::before {
  background: radial-gradient(ellipse 60% 70% at 14% 19%, #0c1b2ba8, #0c1b2b54 58%, transparent 94%);
}
.hero-inner {
  min-height: clamp(465px, calc(100svh - 164px), 800px);
  display: flex;
  align-items: flex-start;
  padding-block: clamp(42px, 7vh, 96px);
}
.hero-copy { min-width: 0; }
.geo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  font: 700 .8125rem/1.4 var(--ui);
  letter-spacing: .15em;
}
.geo span + span { border-inline-start: 1px solid currentColor; padding-inline-start: 14px; letter-spacing: .08em; }
.hero h1 {
  margin: 0 0 10px -.055em;
  font: 400 clamp(76px, 12.8vw, 211px)/.96 var(--wordmark);
  letter-spacing: -.045em;
}
.hero-sub { margin: 0; font: 550 clamp(25px, 3.15vw, 51px)/1.45 var(--serif); letter-spacing: .07em; }
html:lang(en) .hero-sub { letter-spacing: 0; }
html:lang(ko) .hero-sub { letter-spacing: .015em; word-break: keep-all; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: clamp(16px, 2.2vw, 31px); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  font-size: 1rem;
  font-weight: 700;
  text-underline-offset: .35em;
}
.primary-btn {
  min-width: 126px;
  padding: 10px 24px;
  background: var(--lift);
  color: var(--on-accent);
  text-decoration: none;
}
.primary-btn:hover { background: color-mix(in srgb, var(--lift) 82%, white); text-decoration: underline; }
.secondary-btn { padding-inline: 4px; text-decoration: underline; }
.secondary-btn:hover { text-decoration-thickness: 2px; }
.outing-layout {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.8fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: start;
  padding-block: clamp(30px, 4vw, 64px);
}
.hero-map { min-width: 0; border-block: 1px solid var(--line); }
.hero-map-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 12px;
  padding-block: 10px;
}
.hero-map-head h2 { margin: 0; font: 650 clamp(18px, 1.7vw, 26px)/1.4 var(--serif); }
.map-caption { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.reset-outing {
  min-height: 44px;
  border: 0;
  padding: 0 6px;
  background: transparent;
  color: var(--ink);
  font: 650 .875rem var(--ui);
  text-decoration: underline;
  text-underline-offset: .22em;
}
.hero-map-head p { margin: 0; color: var(--muted); font-size: .8125rem; }
#home-map { min-width: 0; color: var(--ink); }
#home-map:not([data-fullscreen]) .mountain-stage, .map-poster {
  height: clamp(335px, 32vw, 505px);
  min-height: 0;
  border-block: 1px solid var(--line);
  border-inline: 0;
  border-radius: 0;
}
.map-poster { display: grid; place-items: center; background: var(--soft); color: var(--muted); }
#home-map:not([data-fullscreen]) .mountain-key { margin: 0; padding: 11px 15px; }

.stat-wrap { border-block: 1px solid var(--line); background: var(--surface); margin-block: 20px 30px; }
.stat-wrap .stats { width: 100%; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); padding-block: 20px; }
.stats > div { display: flex; align-items: center; gap: clamp(10px, 1.7vw, 24px); justify-content: center; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats p { margin: 0; }
.stats small { display: block; color: var(--muted); font-size: .875rem; font-weight: 600; }
.stats b { display: block; color: var(--ink); font: 500 clamp(28px, 3vw, 41px)/1.12 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.stats em { color: var(--muted); font: 650 .875rem var(--ui); }
.stat-icon { justify-content: center; width: 43px; height: 43px; flex-basis: 43px; border: 1px solid var(--line); border-radius: 11px; background: var(--soft); color: var(--accent); }
.stat-icon svg { width: 25px; height: 25px; }

.ticket-band { border-block: 1px solid var(--line); }
.day-selector {
  display: grid;
  grid-template-columns: .85fr 2.4fr;
  align-items: stretch;
}
.day-selector h2 { margin: 0; align-self: center; font: 600 clamp(16px, 1.7vw, 26px)/1.4 var(--serif); }
.title-row h2, .section-title { margin: 0; font: 700 clamp(26px, 3.15vw, 43px)/1.24 var(--serif); }
.outing-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.outing-tabs button {
  position: relative;
  min-height: clamp(65px, 6.4vw, 90px);
  padding: 12px 7px;
  border: 0;
  border-inline-start: 1px dashed var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font: 600 clamp(16px, 1.8vw, 27px)/1.4 var(--serif);
  letter-spacing: .04em;
}
.outing-tabs button:last-child { border-inline-end: 1px dashed var(--line); }
.outing-tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 -3px var(--lift); }
.outing-tabs button:hover { background: color-mix(in srgb, var(--accent) 7%, var(--paper)); }
.outing-tabs button:focus-visible { z-index: 1; outline-offset: -4px; }
.day-stops { min-width: 0; border-top: 1px solid var(--line); }
.day-stops a {
  position: relative;
  display: block;
  padding: 14px 2px 17px 21px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.day-stops a::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 21px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--lift);
}
.day-stops a:hover h3 { text-decoration: underline; text-underline-offset: .18em; }
.day-stops small { font: 650 .875rem/1.4 var(--ui); color: var(--accent); }
.day-stops h3 { margin: 5px 0 2px; font: 550 clamp(21px, 2vw, 31px)/1.2 var(--serif); overflow-wrap: anywhere; }
.day-stops p, .card-body p { margin: 5px 0 0; color: var(--muted); font-size: 1rem; line-height: 1.65; }
.switcher button, .load-issue button {
  min-height: 42px;
  padding: 6px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: .875rem;
  font-weight: 650;
}
.switcher button:hover { background: var(--soft); }
.switcher button[aria-pressed="true"] { border-color: var(--lift); background: var(--lift); color: var(--on-accent); }
.guide-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(12px, 1.8vw, 24px); }
.guides { padding-block: clamp(36px, 5vw, 70px); }
.title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0 0 18px; }
.more { color: var(--accent); text-underline-offset: .24em; white-space: nowrap; }
.guide-card { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); text-decoration: none; }
.guide-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.card-pic { height: clamp(140px, 14vw, 223px); background-size: cover; background-position: center; }
.pic-ski { background-image: url("./assets/tomamu-small.webp"); background-position: 25% 20%; background-size: 145%; }
.pic-food { background-image: url("./assets/dining.webp"); }
.pic-train { background-image: url("./assets/train.webp"); }
.card-body { padding: 17px 19px 20px; }
.card-body h3 { margin: 0; font: 700 1.36rem/1.25 var(--serif); }
.page { min-height: 70vh; padding-block: 22px 50px; }
.breadcrumb { display: flex; gap: 10px; margin-bottom: 22px; color: var(--muted); font-size: .875rem; }
.breadcrumb a { text-underline-offset: .22em; }
.page-kicker { margin: 0 0 7px; color: var(--accent); font: 750 .8125rem/1.5 var(--ui); letter-spacing: .12em; }
.explore-head { display: flex; align-items: end; justify-content: space-between; gap: 15px; flex-wrap: wrap; margin-bottom: 18px; }
.switcher { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.map-box { margin-bottom: 22px; }
.load-issue { margin: 0; padding: 18px; border: 1px solid var(--line); background: var(--surface); }
footer { border-top: 1px solid var(--line); background: var(--soft); }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding-block: 25px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 13px 23px; }
.foot a { text-decoration: none; font-size: .875rem; font-weight: 650; }
.foot .footer-copyright { color: var(--muted); font-weight: 400; }
.foot p { margin: 4px 0 0; color: var(--muted); font-size: .875rem; }

@media (max-width: 1080px) {
  .primary { display: none; }
  .mast-inner { min-height: 63px; }
  .hamb { display: inline-flex; }
  .mobile-nav { display: grid; grid-template-columns: repeat(2, 1fr); padding: 8px 5%; border-top: 1px solid var(--line); }
  .mobile-nav a { display: flex; align-items: center; min-height: 42px; text-decoration: none; }
  #home-map:not([data-fullscreen]) .mountain-key { padding-inline: 10px; }
}
@media (max-width: 700px) {
  .hero-inner { min-height: clamp(425px, calc(100svh - 184px), 710px); padding-block: clamp(28px, 5.3vh, 48px); }
  .hero-img { object-position: center 55%; }
  .hero::before { background: linear-gradient(180deg, #faf2de65, #faf2de2e 26%, transparent 48%); }
  :root[data-theme="dark"] .hero::before { background: linear-gradient(180deg, #102232e6, #10223285 27%, transparent 57%); }
  .geo { margin-bottom: 14px; }
  .hero h1 { font-size: clamp(75px, 20vw, 130px); }
  .hero-sub { font-size: clamp(24px, 5.9vw, 35px); }
  .hero-actions { gap: 16px; margin-top: 15px; }
  .day-selector { display: block; }
  .day-selector h2 { padding-block: 10px 6px; font: 650 .9375rem/1.4 var(--ui); }
  .outing-tabs button { min-height: 49px; padding-inline: 1px; }
  .outing-tabs button:first-child { border-inline-start: 0; }
  .outing-tabs button:last-child { border-inline-end: 0; }
  .outing-layout { grid-template-columns: minmax(0,1fr); gap: 25px; }
  .day-stops a { padding-block: 12px; }
  .hero-map-head { padding-block: 7px; }
  #home-map:not([data-fullscreen]) .mountain-stage, .map-poster { height: clamp(305px, 65vw, 425px); }
  .stats { padding-block: 12px; }
  .stats > div { gap: 8px; }
  .stat-icon { width: 35px; height: 35px; flex-basis: 35px; }
  .stat-icon svg { width: 21px; height: 21px; }
  .guide-grid { grid-template-columns: 1fr; gap: 9px; }
  .card-pic { height: clamp(145px, 35vw, 230px); }
}
@media (max-width: 490px) {
  .mast-tools { gap: 5px; }
  .snow-status { width: 42px; padding: 0; }
  .snow-status > span:last-child { display: none; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div { justify-content: flex-start; padding: 8px 8px 8px 12px; }
  .stats > div:nth-child(3) { border-left: 0; }
  .foot { align-items: flex-start; flex-direction: column; gap: 14px; }
}
@media (max-width: 700px) and (max-height: 600px) {
  .hero-inner { min-height: clamp(325px, calc(100svh - 157px), 425px); padding-block: 20px; }
  .hero h1 { font-size: clamp(65px, 18vw, 100px); }
  .hero-actions { margin-top: 11px; }
  .secondary-btn { background: color-mix(in srgb, var(--paper) 86%, transparent); padding-inline: 8px; }
}
@media (max-width: 360px) {
  .theme-toggle { width: 42px; padding: 0; }
  .theme-toggle [data-theme-label] { display: none; }
  .mast-tools { gap: 4px; }
  .hero-map-head p { font-size: .75rem; }
}
@media (max-width: 359px) {
  .mast-inner { width: calc(100% - 20px); gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.trip-guides, .edition-links { display: flex; flex-wrap: wrap; gap: .65rem 1.5rem; padding-block: 1rem; }
.trip-guides a, .edition-links a, [data-guide-view] { color: var(--accent); text-decoration: underline; text-underline-offset: .2em; }
.edition-links [aria-current="page"] { font-weight: 700; }
[data-guide-view]:not([hidden]) { display: inline-block; margin-block: 1rem; }

.run-share-button { display:inline-flex; align-items:center; justify-content:center; gap:.4em; }
.run-share-button svg { flex:none; }
.run-share-status { font:500 .875rem/1.4 system-ui,sans-serif; overflow-wrap:anywhere; }
.run-share-status:empty { display:none; }
.run-share-status textarea { display:block; width:100%; box-sizing:border-box; min-height:3.5em; font:inherit; }
