:root {
  --green: #0b5337;
  --green-dark: #073b28;
  --ink: #18201b;
  --muted: #778079;
  --line: #e6e9e7;
  --white: #fff;
  --header-h: 62px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", "Noto Sans SC", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--white); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img { max-width: 100%; }

/* Landing */
.landing {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: max(28px, env(safe-area-inset-top)) 24px max(32px, env(safe-area-inset-bottom));
  background: #fff;
}
.welcome { width: min(100%, 390px); text-align: center; }
.brand-lockup { display: flex; flex-direction: column; align-items: center; }
.brand-symbol { width: clamp(138px, 39vw, 166px); height: auto; object-fit: contain; }
h1 {
  margin: 28px 0 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 8.8vw, 42px);
  letter-spacing: .055em;
  line-height: 1;
  color: var(--green-dark);
}
.tagline { margin: 8px 0 0; font-size: 17px; letter-spacing: .08em; color: var(--ink); }
.language-list { display: grid; gap: 12px; margin-top: 58px; }
.language-button {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border: 1px solid var(--green);
  border-radius: 14px;
  color: #fff;
  background: var(--green);
  font-size: 18px;
  font-weight: 650;
  letter-spacing: .01em;
  transition: transform .14s ease, background .14s ease;
  -webkit-tap-highlight-color: transparent;
}
.language-button:active { transform: scale(.985); background: var(--green-dark); }
.arrow {
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor;
  opacity: .92;
  transform: translateX(-1px);
}

/* Viewer */
.menu-page { height: 100svh; overflow: hidden; background: #f4f5f4; overscroll-behavior: none; }
.viewer-header {
  position: fixed;
  z-index: 30;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 14px 0;
  display: grid;
  grid-template-columns: 44px 1fr 108px;
  align-items: center;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(18,32,23,.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform .22s ease, opacity .22s ease;
}
.menu-page.ui-hidden .viewer-header { transform: translateY(-110%); opacity: 0; pointer-events: none; }
.icon-button {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 50%; -webkit-tap-highlight-color: transparent;
}
.icon-button:active { background: #eef1ef; }
.icon-button svg { width: 24px; height: 24px; fill: none; stroke: var(--green-dark); stroke-width: 1.75; stroke-linejoin: round; }
.header-symbol { justify-self: center; width: 42px; height: 42px; object-fit: contain; }
.language-menu { justify-self: end; position: relative; }
.language-trigger {
  min-width: 100px; height: 42px; display: flex; align-items: center; justify-content: flex-end; gap: 6px;
  padding: 0 2px 0 10px; border: 0; color: var(--ink); background: transparent;
  font-weight: 650; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.language-dropdown {
  position: absolute; top: 48px; right: 0; width: 154px; padding: 6px;
  border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.98);
  box-shadow: 0 14px 36px rgba(0,0,0,.16); overflow: hidden;
}
.language-dropdown button {
  width: 100%; height: 48px; display: flex; justify-content: space-between; align-items: center;
  padding: 0 13px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left;
}
.language-dropdown button:active { background: #eef2ef; }
.language-dropdown .check { visibility: hidden; color: var(--green); font-weight: 800; }
.language-dropdown button[aria-checked="true"] .check { visibility: visible; }
.viewer-shell { position: fixed; inset: 0; padding-top: calc(var(--header-h) + env(safe-area-inset-top)); transition: padding-top .22s ease; }
.menu-page.ui-hidden .viewer-shell { padding-top: 0; }
.viewer {
  position: relative; width: 100%; height: calc(100% - 36px - env(safe-area-inset-bottom)); overflow: hidden;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
}
.viewer-track { height: 100%; display: flex; transition: transform .28s cubic-bezier(.22,.72,.26,1); will-change: transform; }
.slide { min-width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; position: relative; }
.zoom-layer {
  width: 100%; height: 100%; display: grid; place-items: center; transform-origin: center center; will-change: transform;
  touch-action: none;
}
.menu-image {
  display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.08);
  pointer-events: none; -webkit-user-drag: none;
}
.image-shield { position: absolute; inset: 0; z-index: 2; }
.page-indicator {
  height: calc(36px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: center; justify-content: center; gap: 9px; background: #f4f5f4;
  transition: opacity .2s ease;
}
.menu-page.ui-hidden .page-indicator { opacity: 0; }
.page-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: #c9ceca; transition: width .2s ease, border-radius .2s ease, background .2s ease; }
.page-dot.active { width: 19px; border-radius: 99px; background: var(--green); }
.zoom-hint {
  position: fixed; z-index: 40; left: 50%; bottom: calc(48px + env(safe-area-inset-bottom)); transform: translate(-50%, 10px);
  padding: 8px 12px; border-radius: 999px; color: #fff; background: rgba(7,28,18,.78); font-size: 12px;
  opacity: 0; pointer-events: none; transition: .25s;
}
.zoom-hint.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 760px) {
  .menu-page { background: #e9ecea; }
  .viewer-shell { max-width: 720px; left: 50%; transform: translateX(-50%); background: #f4f5f4; box-shadow: 0 0 40px rgba(0,0,0,.10); }
  .viewer-header { max-width: 720px; left: 50%; transform: translateX(-50%); }
  .menu-page.ui-hidden .viewer-header { transform: translate(-50%, -110%); }
}
@media (max-height: 700px) {
  .language-list { margin-top: 35px; }
  .brand-symbol { width: 120px; }
  h1 { margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* v2.0 operational refinements */
.chevron {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .18s ease;
}
.language-trigger[aria-expanded="true"] .chevron {
  transform: rotate(225deg) translate(-1px,-1px);
}
.error-message {
  position: fixed;
  left: 50%;
  bottom: calc(76px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(88vw, 420px);
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(25,25,25,.92);
  color: #fff;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  z-index: 30;
}
.noscript {
  position: fixed;
  inset: 45% 20px auto;
  text-align: center;
  font-size: 14px;
}
.menu-image.is-loading { opacity: 0; }
.menu-image.is-ready { opacity: 1; transition: opacity .22s ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
