:root {
  --forest: #12372b;
  --yellow: #f4c84b;
  --ivory: #f5f1e8;
  --ink: #15221c;
  --red: #c84b31;
  --line: color-mix(in srgb, var(--ink) 18%, transparent);
  --muted: color-mix(in srgb, var(--ink) 66%, var(--ivory));
  --shadow: 0 24px 70px color-mix(in srgb, var(--forest) 20%, transparent);
  --font: "DM Sans", "Noto Sans KR", "Noto Sans SC", "Noto Sans JP", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 100;
  background: var(--yellow);
  color: var(--ink);
  padding: .7rem 1rem;
  font-weight: 700;
}
.skip-link:focus { top: 1rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
  padding: 0 clamp(1rem, 4vw, 4.5rem);
  border-bottom: 1px solid color-mix(in srgb, var(--ivory) 22%, transparent);
  background: color-mix(in srgb, var(--forest) 95%, transparent);
  color: var(--ivory);
  backdrop-filter: blur(14px);
}
.wordmark { display: inline-flex; align-items: center; gap: .7rem; font-weight: 700; letter-spacing: .16em; text-decoration: none; }
.route-dot { width: 14px; height: 14px; border: 4px solid var(--yellow); border-radius: 50%; box-shadow: 0 0 0 2px var(--forest), 0 0 0 3px var(--yellow); }
.site-nav { display: flex; align-items: center; gap: .35rem; }
.nav-link { border: 0; background: transparent; color: inherit; padding: .65rem .9rem; border-radius: 999px; text-decoration: none; font-weight: 600; }
.nav-link:hover { background: color-mix(in srgb, var(--ivory) 12%, transparent); }
.nav-link.outline { border: 1px solid color-mix(in srgb, var(--ivory) 42%, transparent); }

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: .8rem 1.15rem;
  background: var(--forest);
  color: var(--ivory);
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.button:hover { transform: translateY(-2px); box-shadow: 0 9px 24px color-mix(in srgb, var(--forest) 25%, transparent); }
.button.yellow { background: var(--yellow); color: var(--ink); }
.button.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.button.danger { background: var(--red); }
.button.small { min-height: 40px; padding: .55rem .8rem; border-radius: 9px; font-size: .9rem; }
.button:disabled { cursor: wait; opacity: .55; transform: none; }
.button.disabled { cursor: not-allowed; opacity: .66; }

.landing { overflow: hidden; }
.hero {
  position: relative;
  min-height: calc(100svh - 72px);
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(420px, 1.12fr);
  align-items: stretch;
  background: var(--ivory);
}
.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(4rem, 7vw, 8rem) clamp(1.25rem, 5vw, 6rem);
}
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; color: var(--forest); font-size: .77rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 26px; height: 3px; background: var(--yellow); }
h1, h2, h3, p { margin-top: 0; }
.hero h1 {
  max-width: 780px;
  margin: 1.25rem 0 1.45rem;
  font-size: clamp(3.15rem, 6.3vw, 7rem);
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.hero h1 span { color: var(--forest); }
.hero-lead { max-width: 570px; margin-bottom: 2rem; color: var(--muted); font-size: clamp(1.04rem, 1.4vw, 1.28rem); line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-proof { display: flex; gap: 1.6rem; margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.proof-item strong { display: block; color: var(--forest); font-size: 1.12rem; }
.proof-item span { color: var(--muted); font-size: .86rem; }
.hero-visual { position: relative; min-height: 600px; overflow: hidden; }
.hero-visual img { width: 100%; height: 100%; object-fit: cover; object-position: 62% center; }
.hero-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ivory) 0%, transparent 26%); }
.vehicle-tag {
  position: absolute;
  z-index: 2;
  right: clamp(1rem, 3vw, 3.5rem);
  bottom: clamp(1rem, 4vw, 3.5rem);
  width: min(330px, calc(100% - 2rem));
  padding: 1.25rem;
  background: var(--forest);
  color: var(--ivory);
  box-shadow: var(--shadow);
}
.vehicle-tag .tag-top { display: flex; justify-content: space-between; align-items: center; color: var(--yellow); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.vehicle-tag strong { display: block; margin: .75rem 0 .2rem; font-size: 1.65rem; }
.vehicle-tag p { margin: 0; color: color-mix(in srgb, var(--ivory) 72%, transparent); }

.section { padding: clamp(5rem, 8vw, 9rem) clamp(1.25rem, 6vw, 7rem); }
.section-heading { display: grid; grid-template-columns: .6fr 1.4fr; gap: 2rem; align-items: end; margin-bottom: clamp(2rem, 5vw, 5rem); }
.section-heading h2 { max-width: 900px; margin: 0; font-size: clamp(2.2rem, 4.4vw, 4.8rem); line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.section-heading p { max-width: 530px; margin: 0 0 .5rem auto; color: var(--muted); }
.workflow { background: var(--forest); color: var(--ivory); }
.workflow .eyebrow { color: var(--yellow); }
.workflow .section-heading p { color: color-mix(in srgb, var(--ivory) 70%, transparent); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid color-mix(in srgb, var(--ivory) 20%, transparent); }
.step { position: relative; min-height: 280px; padding: 2rem 2rem 2rem 0; border-right: 1px solid color-mix(in srgb, var(--ivory) 20%, transparent); }
.step + .step { padding-left: 2rem; }
.step:last-child { border-right: 0; }
.step-number { color: var(--yellow); font-size: .78rem; font-weight: 700; letter-spacing: .14em; }
.step h3 { margin: 4rem 0 .8rem; font-size: clamp(1.45rem, 2vw, 2rem); line-height: 1.1; }
.step p { color: color-mix(in srgb, var(--ivory) 68%, transparent); }
.step-line { position: absolute; top: -4px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }

.proof-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.proof-panel { min-height: 360px; padding: clamp(2rem, 4vw, 4rem); background: var(--ivory); }
.proof-panel.yellow { background: var(--yellow); }
.proof-panel h3 { max-width: 540px; font-size: clamp(1.8rem, 3vw, 3.3rem); line-height: 1.08; letter-spacing: -.03em; }
.proof-list { display: grid; gap: 1rem; margin-top: 2rem; }
.proof-row { display: grid; grid-template-columns: 42px 1fr; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.proof-row b { color: var(--forest); }
.proof-row p { margin: 0; color: var(--muted); }
.demo-band { display: flex; justify-content: space-between; align-items: center; gap: 2rem; background: var(--ink); color: var(--ivory); }
.demo-band h2 { max-width: 850px; margin: 0; font-size: clamp(2rem, 4vw, 4rem); line-height: 1.08; letter-spacing: -.03em; }
.demo-band p { max-width: 520px; color: color-mix(in srgb, var(--ivory) 70%, transparent); }
.demo-actions { display: flex; flex-wrap: wrap; gap: .75rem; flex-shrink: 0; }
.footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem clamp(1.25rem, 6vw, 7rem); background: var(--forest); color: color-mix(in srgb, var(--ivory) 66%, transparent); font-size: .85rem; }

.reveal { opacity: 1; transform: none; }
.reveal.in { animation: reveal-in 600ms ease both; }
@keyframes reveal-in {
  from { opacity: .25; transform: translateY(18px); }
}

/* Guide */
.guide-shell { min-height: 100svh; background: var(--ivory); }
.guide-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 72px; padding: .7rem clamp(1rem, 5vw, 4rem); background: var(--forest); color: var(--ivory); }
.back-link { border: 0; background: transparent; color: inherit; font-weight: 700; }
.language-tabs { display: flex; gap: .3rem; padding: .25rem; border: 1px solid color-mix(in srgb, var(--ivory) 20%, transparent); border-radius: 999px; }
.language-tab { min-height: 38px; border: 0; border-radius: 999px; padding: .45rem .75rem; background: transparent; color: inherit; font-weight: 700; }
.language-tab.active { background: var(--yellow); color: var(--ink); }
.guide-main { max-width: 1180px; margin: 0 auto; padding: clamp(1.3rem, 4vw, 4rem); }
.identity-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); min-height: 480px; overflow: hidden; background: var(--ink); color: var(--ivory); box-shadow: var(--shadow); }
.identity-copy { display: flex; flex-direction: column; justify-content: space-between; padding: clamp(2rem, 5vw, 5rem); }
.identity-kicker { color: var(--yellow); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.identity-card h1 { margin: 1.1rem 0 .7rem; font-size: clamp(3rem, 7vw, 6.8rem); line-height: 1.02; letter-spacing: -.045em; }
.identity-card .intro { max-width: 650px; color: color-mix(in srgb, var(--ivory) 72%, transparent); font-size: 1.05rem; }
.vehicle-specs { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.spec { padding: .5rem .7rem; border: 1px solid color-mix(in srgb, var(--ivory) 22%, transparent); color: color-mix(in srgb, var(--ivory) 82%, transparent); font-size: .82rem; }
.identity-image { min-height: 380px; background: var(--forest); }
.identity-image img { width: 100%; height: 100%; object-fit: cover; object-position: 68% center; filter: saturate(.72) contrast(1.04); }
.guide-columns { display: grid; grid-template-columns: .86fr 1.14fr; gap: 1rem; margin-top: 1rem; }
.guide-section { padding: clamp(1.5rem, 3.5vw, 3rem); border: 1px solid var(--line); background: color-mix(in srgb, var(--ivory) 88%, white); }
.guide-section h2 { margin-bottom: 1.8rem; font-size: clamp(1.5rem, 2.5vw, 2.35rem); line-height: 1.1; }
.guide-list { display: grid; gap: 1rem; padding: 0; margin: 0; list-style: none; }
.guide-list li { display: grid; grid-template-columns: 34px 1fr; gap: .75rem; align-items: start; }
.list-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--yellow); color: var(--ink); font-size: .78rem; font-weight: 700; }
.caution { background: var(--yellow); }
.caution .list-mark { background: var(--ink); color: var(--yellow); }
.emergency-card { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; margin-top: 1rem; padding: clamp(1.5rem, 3vw, 2.5rem); background: var(--red); color: white; }
.emergency-card h2 { margin-bottom: .35rem; }
.emergency-card p { margin-bottom: 0; color: color-mix(in srgb, white 80%, transparent); }
.phone-button { display: inline-flex; min-height: 54px; align-items: center; padding: .8rem 1.1rem; background: white; color: var(--red); font-weight: 700; text-decoration: none; }
.map-card { margin-top: 1rem; padding: clamp(1.5rem, 3vw, 2.5rem); border: 1px solid var(--line); background: white; }
.map-head { display: flex; justify-content: space-between; gap: 1rem; align-items: start; margin-bottom: 1.5rem; }
.map-head h2 { margin-bottom: .35rem; }
.map-head p { margin-bottom: 0; color: var(--muted); }
.map-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; }
/* z-index: 0 makes this a stacking context. Without it Leaflet's own layers
   (panes 400, controls 1000) escape and paint over the sticky guide header
   and the admin sidebar on scroll. */
.map-canvas { position: relative; z-index: 0; isolation: isolate; overflow: hidden; border: 1px solid var(--line); background: var(--ivory); }
.map-view { width: 100%; height: 100%; min-height: 380px; }
.map-link { position: absolute; z-index: 500; right: .75rem; top: .75rem; padding: .65rem .8rem; border: 1px solid var(--line); background: color-mix(in srgb, white 94%, transparent); color: var(--forest); font-size: .78rem; font-weight: 700; text-decoration: none; box-shadow: 0 5px 18px color-mix(in srgb, var(--ink) 14%, transparent); }
.map-link:hover { border-color: var(--forest); }
.location-list { display: grid; gap: .6rem; }
.location { width: 100%; border: 1px solid var(--line); padding: 1rem; background: var(--ivory); color: var(--ink); text-align: left; }
.location strong { display: block; }
.location span { display: block; color: var(--muted); font-size: .82rem; }
.translation-note { margin: 1rem 0 0; color: var(--muted); font-size: .8rem; }

/* Admin */
.login-page { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; background: var(--ivory); }
.login-story { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 100svh; padding: clamp(2rem, 6vw, 6rem); overflow: hidden; background: var(--forest); color: var(--ivory); }
.login-story::before { content: ""; position: absolute; width: 42vw; height: 42vw; left: -14vw; top: -13vw; border: 1px solid color-mix(in srgb, var(--yellow) 55%, transparent); border-radius: 50%; box-shadow: 0 0 0 8vw color-mix(in srgb, var(--yellow) 4%, transparent), 0 0 0 16vw color-mix(in srgb, var(--yellow) 3%, transparent); }
.login-story h1 { position: relative; max-width: 720px; margin: 1rem 0; font-size: clamp(3rem, 6vw, 6.5rem); line-height: 1.02; letter-spacing: -.045em; }
.login-story p { position: relative; max-width: 520px; color: color-mix(in srgb, var(--ivory) 72%, transparent); }
.login-panel { display: grid; place-items: center; padding: 2rem; }
.login-card { width: min(460px, 100%); }
.login-card h2 { margin-bottom: .4rem; font-size: 2rem; line-height: 1.1; }
.login-card > p { color: var(--muted); }
.form-stack { display: grid; gap: 1rem; margin-top: 2rem; }
.field { display: grid; gap: .45rem; }
.field label { font-size: .82rem; font-weight: 700; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: .85rem .9rem; background: white; color: var(--ink); }
.field textarea { min-height: 110px; resize: vertical; }
.demo-fill { width: 100%; border: 1px dashed var(--forest); border-radius: 9px; padding: .8rem; background: color-mix(in srgb, var(--yellow) 24%, var(--ivory)); color: var(--forest); font-weight: 700; }
.form-error { min-height: 1.5rem; color: var(--red); font-weight: 600; }

.admin-shell { min-height: 100svh; display: grid; grid-template-columns: 270px 1fr; background: color-mix(in srgb, var(--ivory) 86%, white); }
.admin-sidebar { position: sticky; top: 0; z-index: 30; height: 100svh; display: flex; flex-direction: column; padding: 1.4rem; background: var(--forest); color: var(--ivory); }
.admin-sidebar nav { display: grid; gap: .35rem; margin-top: 3rem; }
.side-link { display: flex; align-items: center; gap: .75rem; min-height: 46px; border: 0; border-radius: 8px; padding: .65rem .8rem; background: transparent; color: color-mix(in srgb, var(--ivory) 70%, transparent); text-align: left; font-weight: 600; }
.side-link.active { background: var(--yellow); color: var(--ink); }
.side-link .side-icon { width: 22px; font-weight: 700; }
.admin-account { margin-top: auto; padding-top: 1.2rem; border-top: 1px solid color-mix(in srgb, var(--ivory) 18%, transparent); }
.admin-account strong, .admin-account span { display: block; }
.admin-account span { color: color-mix(in srgb, var(--ivory) 58%, transparent); font-size: .8rem; }
.admin-main { min-width: 0; padding: clamp(1rem, 3vw, 3rem); }
.admin-heading { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 2rem; }
.admin-heading h1 { margin-bottom: .25rem; font-size: clamp(2rem, 4vw, 4.2rem); line-height: 1.02; letter-spacing: -.04em; }
.admin-heading p { margin: 0; color: var(--muted); }
.metric-strip { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); background: white; }
.metric { padding: 1.25rem; border-right: 1px solid var(--line); }
.metric:last-child { border: 0; }
.metric span { display: block; color: var(--muted); font-size: .8rem; }
.metric strong { display: block; margin-top: .35rem; font-size: 1.7rem; line-height: 1; }
.workspace { display: grid; grid-template-columns: minmax(310px, .75fr) minmax(0, 1.25fr); gap: 1rem; margin-top: 1rem; }
.guide-index, .editor { border: 1px solid var(--line); background: white; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 68px; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font-size: 1rem; }
.guide-cards { display: grid; max-height: calc(100svh - 300px); overflow: auto; }
.guide-card { display: grid; grid-template-columns: 1fr auto; gap: .7rem; border: 0; border-bottom: 1px solid var(--line); padding: 1.15rem; background: white; color: var(--ink); text-align: left; }
.guide-card:hover, .guide-card.active { background: color-mix(in srgb, var(--yellow) 18%, var(--ivory)); }
.guide-card strong, .guide-card span { display: block; }
.guide-card span { color: var(--muted); font-size: .78rem; }
.status { align-self: start; padding: .2rem .45rem; border-radius: 999px; background: color-mix(in srgb, var(--forest) 12%, white); color: var(--forest); font-size: .72rem; font-weight: 700; }
.editor-body { display: grid; gap: 1.25rem; padding: 1.25rem; }
.editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.editor-actions { display: flex; justify-content: space-between; gap: .75rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.action-group { display: flex; flex-wrap: wrap; gap: .6rem; }
.adapter-note { padding: .9rem; border-left: 4px solid var(--yellow); background: var(--ivory); color: var(--muted); font-size: .85rem; }

.modal-backdrop { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 1rem; background: color-mix(in srgb, var(--ink) 72%, transparent); }
.modal { width: min(450px, 100%); padding: 2rem; background: var(--ivory); box-shadow: var(--shadow); text-align: center; }
.modal img { width: 260px; height: 260px; margin: 1.5rem auto; }
.modal p { color: var(--muted); word-break: break-all; }
.toast { position: fixed; z-index: 120; right: 1rem; bottom: 1rem; max-width: 360px; padding: .9rem 1.1rem; background: var(--ink); color: var(--ivory); box-shadow: var(--shadow); transform: translateY(130%); transition: transform 220ms ease; }
.toast:empty { display: none; }
.toast.show { transform: none; }
.empty { display: grid; place-items: center; min-height: 280px; padding: 2rem; color: var(--muted); text-align: center; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; }
  .hero-copy { min-height: 72svh; }
  .hero-visual { min-height: 62svh; }
  .hero-visual::after { background: linear-gradient(180deg, var(--ivory), transparent 25%); }
  .section-heading { grid-template-columns: 1fr; }
  .section-heading p { margin-left: 0; }
  .proof-grid, .identity-card, .map-layout { grid-template-columns: 1fr; }
  .identity-image { order: -1; min-height: 320px; }
  .guide-columns { grid-template-columns: 1fr; }
  .login-page { grid-template-columns: 1fr; }
  .login-story { min-height: 44svh; }
  .admin-shell { grid-template-columns: 82px 1fr; }
  .admin-sidebar { padding: 1rem .65rem; align-items: center; }
  .admin-sidebar .wordmark { font-size: 0; }
  .admin-sidebar nav { width: 100%; }
  .side-link { justify-content: center; }
  .side-link span:last-child, .admin-account { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .guide-cards { max-height: 330px; }
}

@media (max-width: 680px) {
  .site-header { min-height: 62px; }
  .site-nav .nav-link:not(.outline) { display: none; }
  .wordmark { font-size: .78rem; }
  .hero { min-height: auto; }
  .hero-copy { min-height: 70svh; padding-top: 4rem; }
  .hero h1 { font-size: clamp(3rem, 16vw, 4.7rem); line-height: 1.03; letter-spacing: -.04em; }
  .hero-proof { gap: .75rem; justify-content: space-between; }
  .proof-item span { font-size: .72rem; }
  .hero-visual { min-height: 62svh; }
  .vehicle-tag { right: 1rem; bottom: 1rem; }
  .section { padding-block: 4.5rem; }
  .section-heading h2, .demo-band h2 { line-height: 1.1; }
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { min-height: auto; padding: 2rem 0; border-right: 0; border-bottom: 1px solid color-mix(in srgb, var(--ivory) 20%, transparent); }
  .step h3 { margin-top: 2rem; }
  .demo-band { align-items: flex-start; flex-direction: column; }
  .footer { flex-direction: column; }
  .guide-topbar { align-items: flex-start; flex-direction: column; padding-block: .8rem; }
  .language-tabs { width: 100%; }
  .language-tab { flex: 1; }
  .guide-main { padding: 1rem; }
  .identity-card h1 { font-size: 3.5rem; line-height: 1.03; }
  .identity-image { min-height: 260px; }
  .emergency-card { grid-template-columns: 1fr; }
  .phone-button { width: 100%; justify-content: center; }
  .map-head { flex-direction: column; }
  .map-head .button { width: 100%; }
  .map-canvas { min-height: 280px; }
  .login-story { min-height: 38svh; padding: 2rem 1.2rem; }
  .login-story h1 { font-size: 3rem; line-height: 1.03; }
  .login-panel { padding: 2rem 1.2rem; }
  .admin-shell { display: block; }
  .admin-sidebar { position: static; width: 100%; height: auto; flex-direction: row; justify-content: space-between; padding: .8rem 1rem; }
  .admin-sidebar nav { display: none; }
  .admin-main { padding: 1rem; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .admin-heading .button { width: 100%; }
  .metric-strip { grid-template-columns: 1fr; }
  .metric { border-right: 0; border-bottom: 1px solid var(--line); }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-actions { flex-direction: column-reverse; }
  .action-group, .action-group .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Untranslated state, free-form post sections, and the editor image fields. */
.untranslated-banner { margin: 1rem 0 0; padding: .8rem 1rem; border-radius: 10px; background: #FDF0E6; border: 1px solid #C84B31; color: #8A2F1C; font-size: .9rem; font-weight: 600; }
.guide-post { display: grid; gap: 1.4rem; margin-top: 1.4rem; }
.post-block { display: grid; gap: .7rem; padding: 1.3rem; background: #fff; border: 1px solid rgba(21, 34, 28, .14); border-radius: 14px; }
.post-block h2 { margin: 0; font-size: 1.15rem; }
.post-block p { margin: 0; line-height: 1.62; white-space: pre-wrap; }
.post-image { width: 100%; max-width: 100%; height: auto; border-radius: 10px; display: block; }
.sections-field { border: 1px solid rgba(21, 34, 28, .16); border-radius: 12px; padding: 1rem; }
.sections-field legend { padding: 0 .4rem; font-size: .82rem; font-weight: 700; color: var(--muted); }
.section-row { display: grid; gap: .5rem; padding: .8rem 0; border-bottom: 1px dashed rgba(21, 34, 28, .16); }
.section-row:last-of-type { border-bottom: 0; }
.section-row textarea { min-height: 5rem; }
.field-hint { font-size: .78rem; color: var(--muted); }

/* Leaflet map, branch service tags, and the location editor. */
.leaflet-container { font-family: var(--font); background: var(--ivory); }
.leaflet-container a { color: var(--forest); }
.leaflet-popup-content { margin: .8rem .9rem; line-height: 1.5; }
.location .tag-row, .tag-row { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.location .tag, .tag { display: inline-block; width: auto; padding: .15rem .5rem; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--forest); font-size: .72rem; font-weight: 700; }
.check-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; min-height: 46px; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 9px; background: white; font-weight: 600; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--forest); }
.check:has(input:checked) { border-color: var(--forest); background: color-mix(in srgb, var(--yellow) 30%, white); }
[data-location-map] { height: 320px; min-height: 320px; }
.qr-secondary { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.qr-secondary img { width: 130px; height: 130px; margin: .8rem auto; }
.qr-secondary p { font-size: .78rem; }

/* Printable QR board for the phone demo. */
.qr-board { max-width: 1100px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 4vw, 3rem) 4rem; }
.qr-board-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 2rem; }
.qr-board-head h1 { margin: .3rem 0 .5rem; }
.qr-board-head p { margin: 0; max-width: 46ch; color: var(--muted); }
.qr-board-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.qr-card { display: grid; justify-items: center; gap: .6rem; padding: 1.5rem 1rem; border: 1px solid var(--line); background: white; text-align: center; }
.qr-card h2 { margin: 0; font-size: 1.05rem; }
.qr-card img { width: 220px; height: 220px; }
.qr-card p { margin: 0; color: var(--muted); font-size: .74rem; word-break: break-all; }

@media print {
  body { background: white; }
  .qr-board-actions, .toast, .skip-link { display: none; }
  .qr-board { max-width: none; padding: 0; }
  .qr-board-head { margin-bottom: 1.2rem; border-bottom: 1px solid var(--ink); padding-bottom: .8rem; }
  .qr-board-head p { display: none; }
  .qr-grid { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
  .qr-card { break-inside: avoid; border: 1px solid var(--ink); padding: 1rem .5rem; }
  .qr-card img { width: 200px; height: 200px; }
}

/* The workspace now has two sections, so the nav has to survive the phone bar. */
@media (max-width: 680px) {
  .admin-sidebar { flex-wrap: wrap; }
  .admin-sidebar nav { display: flex; width: 100%; gap: .3rem; margin: .6rem 0 0; }
  .admin-sidebar nav .side-link { flex: 1; justify-content: center; }
  .admin-sidebar nav .side-link span:last-child { display: inline; font-size: .82rem; }
  .qr-card img { width: min(220px, 60vw); height: auto; }
}
.location-hint { padding: .7rem .9rem; margin-bottom: .6rem; border-radius: 10px; background: #EFEADC; color: var(--muted); font-size: .82rem; }

/* Landing scan band — the client should be able to photograph a code on arrival. */
.scan-band { background: #fff; border-top: 1px solid rgba(21,34,28,.1); border-bottom: 1px solid rgba(21,34,28,.1); }
.scan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.1rem; margin-top: 1.6rem; }
.scan-card { display: grid; justify-items: center; gap: .55rem; padding: 1.2rem 1rem; border: 1px solid rgba(21,34,28,.14); border-radius: 14px; background: var(--surface, #F5F1E8); }
.scan-card h3 { margin: 0; font-size: 1.02rem; }
.scan-card img { width: 180px; height: 180px; display: block; border-radius: 8px; }
.scan-card p { margin: 0; font-size: .74rem; color: var(--muted); word-break: break-all; text-align: center; }
.scan-foot { margin-top: 1.3rem; }
