/* daeryeok.cafe — production styles
   A warm Korean café run like a tiny experimental shop: calm, direct, and exact.
   Palette lives in CSS custom properties; theme switches via [data-theme] on <html>. */

/* ---- reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 84px; }
button, input { font: inherit; }
img { max-width: 100%; display: block; }

/* ---- palette: dark ("after hours") is the default ---- */
:root {
  --bg: #1B1F1A;
  --line: rgba(242,216,167,0.045);
  --card: #232823;
  --card2: #2B312A;
  --milk: #342B2F;
  --straw: #E3A5B1;
  --matcha: #333D2E;
  --chip: #96A886;
  --mug: #96A886;
  --ink: #F2ECDF;
  --sub: #B8B2A4;
  --border: rgba(242,236,223,0.14);
  --shadow: rgba(0,0,0,0.5);
  --tape-m: rgba(150,168,134,0.4);
  --tape-p: rgba(227,165,177,0.35);
  --bulb: #F2D8A7;
  --bulbglow: rgba(242,216,167,0.5);
  --seal: #C96A5E;
  --signbg: #2B312A;
  --petal: rgba(227,165,177,0.30);
  --steam: rgba(242,236,223,0.45);
  --wx-blue: #93A7B4;
}

/* ---- palette: light ("daylight configuration") ---- */
[data-theme="light"] {
  --bg: #FAF6EE;
  --line: rgba(38,48,43,0.06);
  --card: #FFFDFA;
  --card2: #F3EEE2;
  --milk: #FBE3E8;
  --straw: #9B5968;
  --matcha: #DCEACB;
  --chip: #627058;
  --mug: #627058;
  --ink: #26302B;
  --sub: #5A5F55;
  --border: rgba(38,48,43,0.18);
  --shadow: rgba(38,48,43,0.14);
  --tape-m: rgba(200,227,178,0.85);
  --tape-p: rgba(255,190,214,0.85);
  --bulb: #E8E0D2;
  --bulbglow: rgba(0,0,0,0);
  --seal: #9F443E;
  --signbg: #FFFDFA;
  --petal: rgba(217,138,147,0.45);
  --steam: rgba(90,95,85,0.35);
  --wx-blue: #7C93A6;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans KR', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--straw); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--ink); }

/* visible keyboard focus (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid var(--straw);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---- page shell: dark-olive grid ---- */
.page {
  min-height: 100vh;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 23px, var(--line) 23px, var(--line) 24px),
    repeating-linear-gradient(90deg, transparent, transparent 23px, var(--line) 23px, var(--line) 24px);
  color: var(--ink);
  transition: background-color 0.6s, color 0.6s;
  overflow-x: hidden;
}

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  gap: 8px; flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.6s;
}
.pill {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: 1px;
  white-space: nowrap;
  color: var(--sub);
  background: var(--card2);
  border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 6px;
  transition: background-color 0.6s, color 0.3s, border-color 0.3s;
}
.pill:hover { color: var(--ink); border-color: var(--straw); }

.lamp {
  display: flex; flex-direction: column; align-items: center;
  background: none; border: none; cursor: pointer;
  padding: 0 6px; margin-left: 10px;
}
.lamp-cord { display: block; width: 2px; height: 13px; background: var(--sub); opacity: 0.6; }
.lamp-bulb {
  display: block; width: 17px; height: 17px; border-radius: 50%;
  background: var(--bulb); border: 1px solid var(--border);
  box-shadow: 0 0 18px 4px var(--bulbglow);
  transition: background-color 0.6s, box-shadow 0.6s;
}
.lamp-label {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 10px; letter-spacing: 1px; color: var(--sub); margin-top: 3px;
}

/* ---- section scaffolding ---- */
.sec { max-width: 1060px; margin: 0 auto; padding: 0 24px 72px; scroll-margin-top: 84px; }
.sec--hero { padding: 60px 24px 72px; }
.sec--clearance { padding: 0 24px 80px; }

.sec-head {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 6px; border-bottom: 1px solid var(--border); padding-bottom: 10px;
}
.sec-num { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: 3px; color: var(--mug); }
.sec-title { font-weight: 700; font-size: 32px; letter-spacing: -0.5px; margin: 0; }
.sec-title .ko { font-family: 'Gaegu', cursive; font-size: 22px; font-weight: 400; color: var(--straw); }
.sec-meta { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 1px; color: var(--sub); margin-left: auto; }

/* ---- hero front desk ---- */
.eyebrow { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: 3px; color: var(--mug); margin-bottom: 26px; }
.hero-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 36px; flex-wrap: wrap; }
.hero-main { flex: 1 1 460px; }
.hero-title { font-weight: 700; font-size: clamp(44px, 6.4vw, 72px); line-height: 1.02; letter-spacing: -2px; margin: 0 0 6px; color: var(--ink); }
.hero-title .dot { color: var(--straw); }
.hero-sub { font-family: 'Gaegu', cursive; font-size: 24px; color: var(--straw); margin: 2px 0 14px; transform: rotate(-1deg); display: inline-block; }
.hero-body { font-size: 15.5px; line-height: 1.75; color: var(--sub); max-width: 52ch; margin: 0 0 22px; }
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px; letter-spacing: 1px; color: var(--sub);
  white-space: nowrap;
  border: 1px solid var(--border); background: var(--card);
  padding: 4px 11px; border-radius: 6px; transition: background-color 0.6s;
}

.hero-aside { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 26px; }
.hero-seal {
  width: 52px; height: 52px; background: var(--seal); border-radius: 7px;
  transform: rotate(4deg); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 8px; box-shadow: 0 4px 12px -2px var(--shadow);
  cursor: pointer; outline: none;
}
.hero-seal span { font-weight: 700; font-size: 19px; color: #F7EFE2; line-height: 1.05; text-align: center; }
.hero-titlewrap { display: flex; align-items: flex-start; gap: 18px; }

.door-hang { display: inline-flex; flex-direction: column; align-items: center; }
.door-cord { display: block; width: 2px; height: 18px; background: var(--sub); opacity: 0.5; }
.door-sign {
  background: var(--signbg); border: 2px solid var(--straw); border-radius: 12px;
  padding: 12px 26px; text-align: center; transform: rotate(-2deg);
  animation: signGlow 3.5s ease-in-out infinite; transition: background-color 0.6s;
}
.door-title { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 22px; font-weight: 600; letter-spacing: 3px; color: var(--ink); }
.door-sub { font-family: 'Gaegu', cursive; font-size: 16px; color: var(--sub); margin-top: 2px; }

.cup { position: relative; width: 180px; height: 150px; }
.cup-steam { position: absolute; left: 26px; top: 18px; width: 110px; height: 20px; }
.cup-body { position: absolute; left: 26px; bottom: 24px; width: 108px; height: 80px; background: var(--milk); border: 2px solid var(--border); border-radius: 8px 8px 24px 24px; transition: background-color 0.6s; }
.cup-handle { position: absolute; left: 126px; bottom: 44px; width: 32px; height: 38px; border: 2px solid var(--border); border-left: none; border-radius: 0 18px 18px 0; }
.cup-label { position: absolute; left: 40px; bottom: 52px; font-family: 'Gaegu', cursive; font-size: 16px; color: var(--ink); transform: rotate(-2deg); }
.cup-unit { position: absolute; left: 38px; bottom: 34px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 9px; letter-spacing: 1px; color: var(--sub); }
.cup-saucer { position: absolute; left: 14px; bottom: 8px; width: 132px; height: 5px; background: var(--mug); border-radius: 999px; opacity: 0.55; }

/* ---- cards (pastry ops + exits) ---- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 22px; margin-top: 30px; }
.grid-exits { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 16px; margin-top: 30px; }
.stack-logs { display: grid; gap: 14px; margin-top: 30px; }

.card {
  position: relative;
  background: var(--card); border: 1px solid var(--border);
  box-shadow: 0 10px 22px -10px var(--shadow);
  transition: background-color 0.6s, transform 0.2s, border-color 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: var(--straw); }
.card--op { border-radius: 12px; padding: 24px 22px 18px; }
.card--exit { border-radius: 10px; padding: 20px 18px 14px; display: block; color: var(--ink); }

.op-tag { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 2px; color: var(--mug); margin-bottom: 8px; }
.op-title { font-weight: 700; font-size: 22px; margin-bottom: 8px; }
.op-body { font-size: 13.5px; line-height: 1.7; color: var(--sub); margin: 0 0 16px; }
.op-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.op-dest { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 1px; color: var(--mug); }
.card--link:hover .op-dest { color: var(--straw); }
.op-note { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 0.5px; color: var(--sub); margin-top: 12px; opacity: 0.85; }

.badge {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 11px; letter-spacing: 1px; padding: 3px 10px; border-radius: 5px;
  border: 1px solid var(--border); display: inline-block;
}
.badge--chip { color: var(--chip); }
.badge--straw { color: var(--straw); }
.badge--dashed { color: var(--sub); border: 1px dashed var(--straw); }

.tape { position: absolute; border-radius: 2px; }
.tape--op { top: -11px; left: 20px; width: 78px; height: 22px; }
.tape--exit { top: -9px; left: 20px; width: 58px; height: 18px; }
.tape--p { background: var(--tape-p); }
.tape--m { background: var(--tape-m); }

.exit-tag { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 2px; color: var(--mug); display: block; margin-bottom: 6px; }
.exit-name { font-weight: 700; font-size: 19px; display: block; }
.exit-sub { font-size: 12px; color: var(--sub); }

/* ---- reading room field logs ---- */
.log-row {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  color: var(--ink); background: var(--card);
  border: 1px solid var(--border); border-left: 3px solid var(--matcha);
  border-radius: 10px; padding: 16px 20px;
  transition: background-color 0.6s, transform 0.2s, border-color 0.2s;
}
.log-row:hover { transform: translateX(6px); border-left-color: var(--chip); }
.log-row--b { border-left-color: var(--milk); }
.log-row--b:hover { border-left-color: var(--straw); }
.log-date { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; color: var(--sub); width: 92px; }
.log-title { font-weight: 500; font-size: 18px; flex: 1; }
.log-title .ko { font-family: 'Gaegu', cursive; font-size: 17px; color: var(--straw); }
.log-badge { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 1px; border: 1px solid var(--border); padding: 2px 9px; border-radius: 5px; }
.log-badge--chip { color: var(--chip); }
.log-badge--straw { color: var(--straw); }

/* ---- personnel ---- */
.personnel-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: stretch; margin-top: 30px; }
.dossier-card { flex: 1 1 400px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 26px 24px; box-shadow: 0 10px 22px -10px var(--shadow); transition: background-color 0.6s; }
.dossier-head { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 2px; color: var(--mug); margin-bottom: 12px; }
.dossier-head .aka { opacity: 0.72; }
.dossier-p { font-size: 14.5px; line-height: 1.8; color: var(--sub); margin: 0 0 14px; }
.dossier-p a { font-weight: 500; }
.dossier-sep { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 2px; color: var(--mug); margin-bottom: 10px; border-top: 1px dashed var(--border); padding-top: 14px; }
.dossier { display: grid; gap: 7px; }
.dl-row { display: grid; grid-template-columns: minmax(150px, 190px) 1fr; gap: 12px; align-items: baseline; }
.dl-key { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11.5px; color: var(--ink); }
.dl-key--straw { color: var(--straw); }
.dl-val { font-size: 13px; color: var(--sub); }
.dossier-approved { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 2px; color: var(--chip); margin-top: 16px; border-top: 1px dashed var(--border); padding-top: 12px; }

/* ---- open tabs / house ledger ---- */
.grid-disb { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 22px; margin-top: 30px; }
.disb-file { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.disb-photo { width: 116px; height: auto; border-radius: 8px; border: 1px solid var(--border); transform: rotate(-2deg); cursor: pointer; flex-shrink: 0; outline-offset: 3px; }
.disb-photo:hover { animation: wiggle 0.55s ease; }
.disb-rows { flex: 1; }
.disb-rows .dl-row { grid-template-columns: minmax(96px, 122px) 1fr; }
.disb-rows--solo { margin-bottom: 14px; }
.disb-note { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 0.5px; color: var(--sub); margin-top: 18px; }

.qc-card { flex: 0 1 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--card2); border: 1px solid var(--border); border-radius: 12px; padding: 26px 22px; transition: background-color 0.6s; }
.qc-head { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 2px; color: var(--mug); margin-bottom: 14px; }
.qc-photo { width: 132px; cursor: pointer; outline: none; }
.qc-photo img { width: 100%; height: auto; display: block; }
.qc-name { font-weight: 700; font-size: 19px; margin-top: 10px; }
.qc-status { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 1px; color: var(--sub); margin-bottom: 14px; }
.fund-btn {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12.5px; letter-spacing: 1px;
  color: var(--ink); background: var(--card); border: 1px dashed var(--straw);
  border-radius: 7px; padding: 7px 16px; cursor: pointer; transition: background-color 0.6s;
}
.treat-label { font-family: 'Gaegu', cursive; font-size: 16px; color: var(--sub); margin-top: 8px; min-height: 20px; text-align: center; }
.qc-card .door-hang { margin-bottom: 16px; }
.qc-card .cup { margin-top: 20px; }

/* ---- clearance / stamp card ---- */
.clearance-card { background: var(--card); border: 1px solid var(--border); border-radius: 14px; padding: 28px 26px; box-shadow: 0 10px 22px -10px var(--shadow); margin-top: 30px; transition: background-color 0.6s; }
.clearance-row { display: flex; gap: 28px; flex-wrap: wrap; align-items: flex-start; }
.clearance-col { flex: 1 1 340px; }
.clearance-col--manifest { flex: 1 1 300px; }
.card-label { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: 1px; color: var(--ink); margin-bottom: 14px; }
.seal-grid { display: grid; grid-template-columns: repeat(5, 54px); gap: 12px; }
.seal {
  width: 54px; height: 54px; border-radius: 50%;
  border: 2px dashed var(--straw); background: transparent;
  font-size: 22px; display: flex; align-items: center; justify-content: center;
  transition: background-color 0.4s;
}
.seal.is-filled { background: var(--milk); }
.card-note { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; color: var(--sub); margin-top: 14px; letter-spacing: 0.5px; line-height: 1.7; }
.link-btn { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; background: none; border: none; color: var(--straw); cursor: pointer; text-decoration: underline; padding: 0; letter-spacing: 0.5px; }
.last-seal { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 1px; color: var(--mug); margin-top: 8px; }
.manifest-input-row { display: flex; gap: 8px; }
.manifest-input { flex: 1; min-width: 0; font-family: 'Gaegu', cursive; font-size: 18px; color: var(--ink); background: none; border: none; border-bottom: 2px dashed var(--border); padding: 6px 4px; outline: none; }
.manifest-input::placeholder { color: var(--sub); opacity: 0.7; }
.stamp-in-btn { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: 1px; color: var(--bg); background: var(--chip); border: none; border-radius: 7px; padding: 7px 16px; cursor: pointer; transition: background-color 0.6s; }
.guest-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.guest-chip { font-family: 'Gaegu', cursive; font-size: 17px; color: var(--sub); background: var(--milk); padding: 2px 12px; border-radius: 999px; transform: rotate(-1deg); transition: background-color 0.6s; }

/* ---- footer ---- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 24px 38px; text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; }
.footer-name { font-weight: 700; font-size: 17px; color: var(--ink); }
.footer-chop { width: 22px; height: 22px; background: var(--seal); border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; transform: rotate(4deg); font-weight: 700; font-size: 9px; color: #F7EFE2; line-height: 1; }
.footer-legal { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; color: var(--sub); margin-top: 10px; line-height: 1.9; letter-spacing: 0.5px; }

/* ---- ambience ---- */
.petals { position: fixed; inset: 0; pointer-events: none; z-index: 40; }
.petal { position: absolute; top: -24px; width: 10px; height: 10px; border-radius: 12px 2px; background: var(--petal); animation-name: petalFall; animation-timing-function: linear; animation-iteration-count: infinite; }
.steam { position: absolute; bottom: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--steam); filter: blur(3px); animation: steamRise 2.8s ease-out infinite; }

/* ---- hover animations (opt-in classes) ---- */
.wiggle-hover:hover { animation: wiggle 0.55s ease; }
.tape-lift:hover { animation: tapelift 0.5s ease; }

/* ---- keyframes ---- */
@keyframes petalFall { 0% { transform: translateY(-4vh) rotate(0deg); } 100% { transform: translateY(108vh) rotate(340deg); } }
@keyframes steamRise { 0% { opacity: 0; transform: translateY(6px) scale(0.8); } 35% { opacity: 0.55; } 100% { opacity: 0; transform: translateY(-26px) scale(1.25); } }
@keyframes wiggle { 0%,100% { transform: rotate(-2deg); } 50% { transform: rotate(3deg); } }
@keyframes tapelift { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes signGlow { 0%,100% { box-shadow: 0 0 22px rgba(242,216,167,0.28); } 50% { box-shadow: 0 0 34px rgba(242,216,167,0.5); } }

/* ---- responsive ---- */
@media (max-width: 640px) {
  .sec, .sec--hero, .sec--clearance { padding-left: 16px; padding-right: 16px; }
  .sec--hero { padding-top: 44px; }
  .sec-head { flex-wrap: wrap; }
  .sec-meta { margin-left: 0; flex-basis: 100%; }
  .hero-row { gap: 24px; }
  .hero-aside { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 20px; }
  .dl-row { grid-template-columns: 1fr; gap: 2px; }
  .dl-row { margin-bottom: 6px; }
  .seal-grid { grid-template-columns: repeat(5, 1fr); }
  .seal { width: 100%; aspect-ratio: 1; height: auto; }
}

/* ---- standing-orders entry point ---- */
.log-row--pinned { border-left-color: var(--straw); }
.log-row--pinned:hover { border-left-color: var(--straw); }

/* ---- article pages (rules + field logs) ---- */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 22px 8px; }
.doc-eyebrow { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 3px; color: var(--mug); text-transform: uppercase; }
.rules-title { font-family: 'IBM Plex Sans KR', system-ui, sans-serif; font-weight: 700; font-size: clamp(28px, 6vw, 46px); line-height: 1.12; margin: 14px 0 0; color: var(--ink); }
.rules-title .ko { font-family: 'Gaegu', cursive; font-size: 0.55em; font-weight: 400; color: var(--straw); }
.rules-lede { color: var(--sub); font-size: 15px; line-height: 1.6; margin: 16px 0 0; max-width: 58ch; }
.doc-meta { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 1.5px; color: var(--mug); margin: 20px 0 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 10px 0; }

ol.rules { list-style: none; counter-reset: none; margin: 26px 0 0; padding: 0; }
.rule { display: grid; grid-template-columns: 44px 1fr; gap: 8px 16px; padding: 18px 0; border-bottom: 1px dashed var(--border); }
.rule:first-child { border-top: 1px dashed var(--border); }
.rule-num { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 15px; font-weight: 600; color: var(--straw); padding-top: 2px; }
.rule-text { margin: 0; font-size: 15.5px; line-height: 1.62; color: var(--sub); }
.rule-text strong { color: var(--ink); font-weight: 700; }

.rule-fifteen { margin: 28px 0 0; padding: 18px 20px; background: var(--card); border: 1px dashed var(--straw); border-radius: 10px; }
.rule-fifteen .tag { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 2px; color: var(--mug); text-transform: uppercase; }
.rule-fifteen p { margin: 8px 0 0; font-size: 16px; line-height: 1.5; color: var(--ink); font-weight: 500; }

.doc-back { display: inline-block; margin: 30px 0 10px; font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; letter-spacing: 1px; color: var(--mug); }
.doc-back:hover { color: var(--straw); }

/* field-log components */
.entries { margin: 26px 0 0; }
.entry { display: grid; grid-template-columns: 64px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--border); align-items: baseline; }
.entry:first-child { border-top: 1px dashed var(--border); }
.entry-time { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 12px; font-weight: 600; color: var(--straw); }
.entry-text { font-size: 15px; line-height: 1.62; color: var(--sub); }

.kit { margin: 26px 0 0; }
.kit-row { display: grid; grid-template-columns: minmax(120px, 160px) 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--border); align-items: baseline; }
.kit-row:first-child { border-top: 1px dashed var(--border); }
.kit-item { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11.5px; letter-spacing: 1px; color: var(--ink); text-transform: uppercase; }
.kit-note { font-size: 14.5px; line-height: 1.62; color: var(--sub); }

.site-card { margin: 18px 0 0; padding: 18px 20px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; }
.site-tag { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; letter-spacing: 2px; color: var(--mug); }
.site-name { font-weight: 700; font-size: 18px; color: var(--ink); margin: 6px 0 6px; }
.site-notes { font-size: 14.5px; line-height: 1.7; color: var(--sub); margin: 0; }
.site-verdict { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 1px; color: var(--chip); margin-top: 10px; }
.site-verdict--withheld { color: var(--straw); }

.doc-close { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 11px; letter-spacing: 2px; color: var(--mug); margin-top: 28px; border-top: 1px solid var(--border); padding-top: 14px; line-height: 1.9; }

.card--link { display: block; color: var(--ink); text-decoration: none; }

@media (max-width: 640px) {
  .entry { grid-template-columns: 52px 1fr; }
  .kit-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ---- weather card — values hydrated by backend via ids ---- */
.wx {
  width: 288px; box-sizing: border-box;
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px 14px; box-shadow: 0 8px 18px -10px var(--shadow);
  transition: background-color 0.6s;
}
.wx-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.wx-label { font-family: 'Gaegu', cursive; font-size: 16px; color: var(--straw); }
.wx-station { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 1.5px; color: var(--mug); }
.wx-scene { position: relative; height: 52px; display: flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 2px; }
.wx-icon, .wx-cup { font-size: 24px; line-height: 1; }
.wx-drop {
  position: absolute; top: 4px; width: 2px; height: 9px; border-radius: 999px;
  background: var(--wx-blue); opacity: 0;
  animation: wxRain 2.8s linear infinite;
}
.wx-temp { font-family: 'Gowun Batang', serif; font-size: 38px; line-height: 1.1; color: var(--ink); }
.wx-headline { font-family: 'Gowun Batang', serif; font-size: 16.5px; line-height: 1.4; color: var(--ink); margin-top: 2px; }
.wx-sub { font-size: 12.5px; line-height: 1.6; color: var(--sub); margin-top: 2px; }
.wx-detail { font-size: 11.5px; color: var(--sub); margin-top: 10px; }
.wx-metar {
  font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10px; letter-spacing: 0.5px;
  line-height: 1.6; color: var(--mug); overflow-wrap: break-word;
  border-top: 1px dashed var(--border); margin-top: 10px; padding-top: 8px;
}
@keyframes wxRain {
  0% { transform: translateY(-4px); opacity: 0; }
  25% { opacity: 0.55; }
  100% { transform: translateY(30px); opacity: 0; }
}

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- 2026-07 review: bilingual copy, resilient layout, native controls ---- */
:root { color-scheme: dark; }
[data-theme="light"] { color-scheme: light; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

.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: 1000;
  transform: translateY(-160%);
  padding: 9px 13px;
  border: 2px solid var(--straw);
  border-radius: 7px;
  background: var(--card);
  color: var(--ink);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  letter-spacing: 0.5px;
  transition: transform 0.18s ease;
}
.skip-link:focus { transform: translateY(0); }

.ko-copy {
  display: block;
  color: var(--ink);
  font-family: 'IBM Plex Sans KR', system-ui, sans-serif;
  font-size: 0.94em;
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: -0.012em;
  opacity: 0.74;
}
.ko-copy a { color: var(--straw); }
.hero-body-ko { max-width: 54ch; margin: -11px 0 22px; font-size: 14.5px; }
.section-note { max-width: 68ch; margin: 14px 0 0; color: var(--sub); font-size: 14px; line-height: 1.65; text-wrap: pretty; }
.section-note .ko-copy { margin-top: 5px; }
.op-body-ko { margin-top: -10px; color: var(--ink); opacity: 0.7; }
.dossier-p.ko-copy { color: var(--ink); opacity: 0.72; }
.dossier-p + .dossier-p.ko-copy { margin-top: -8px; }
.dl-val .ko-copy { margin-top: 3px; font-size: 0.92em; }

.hero-title,
.sec-title,
.rules-title { text-wrap: balance; }
.hero-body,
.op-body,
.dossier-p,
.rule-text,
.entry-text,
.kit-note,
.site-notes { text-wrap: pretty; }

.pill { flex: 0 0 auto; }
.nav .lamp { flex: 0 0 auto; }

.hero-seal {
  padding: 0;
  border: 0;
  color: inherit;
  font-family: inherit;
}
.qc-photo,
.disb-photo-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}
.qc-photo { border-radius: 10px; }
.disb-photo-button { display: block; flex: 0 0 auto; border-radius: 8px; cursor: pointer; transform: rotate(-2deg); }
.disb-photo-button .disb-photo { transform: none; }
.disb-photo-button:hover { animation: wiggle 0.55s ease; }

.card--pending,
.log-row--pending {
  cursor: default;
  opacity: 0.7;
  filter: saturate(0.72);
}
.card.card--pending:hover {
  transform: none;
  border-color: var(--border);
}
.log-row--pending:hover {
  transform: none;
  border-left-color: var(--milk);
}
.card--pending .exit-tag,
.log-row--pending .log-badge { color: var(--sub); }

.tape--tilt-left { transform: rotate(-2deg); }
.tape--tilt-right { transform: rotate(2deg); }
.tape--tilt-hard-left { transform: rotate(-3deg); }

.wx { max-width: 100%; }
.wx-drop--a { left: 34%; animation-delay: 0s; }
.wx-drop--b { left: 46%; animation-delay: 0.9s; }
.wx-drop--c { left: 40%; animation-delay: 1.7s; }

.manifest-input-row { align-items: flex-end; }
.guest-status { min-height: 18px; margin-top: 8px; color: var(--sub); font-family: 'IBM Plex Mono', ui-monospace, monospace; font-size: 10.5px; line-height: 1.5; letter-spacing: 0.4px; }
.guest-empty { color: var(--sub); font-family: 'Gaegu', cursive; font-size: 16px; opacity: 0.7; }

@media (max-width: 860px) {
  .nav {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .nav::after { content: ''; flex: 0 0 4px; }
}

@media (max-width: 520px) {
  html { scroll-padding-top: 72px; }
  .sec { scroll-margin-top: 72px; }
  .hero-titlewrap { gap: 11px; }
  .hero-seal { width: 46px; height: 46px; }
  .hero-seal span { font-size: 17px; }
  .hero-sub span[lang="ko"] { display: block; margin-top: 2px; }
  .clearance-card { padding: 22px 18px; }
  .manifest-input-row { flex-wrap: wrap; }
  .manifest-input { flex-basis: 100%; }
  .stamp-in-btn { width: 100%; min-height: 42px; }
  .disb-file { flex-wrap: wrap; }
  .disb-photo-button { margin: 0 auto 4px; }
  .disb-rows { flex-basis: 100%; }
  .footer-legal { overflow-wrap: anywhere; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---- bilingual field-note typography ---- */
.title-ko {
  display: block;
  margin-top: 0.25em;
  color: var(--straw);
  font-family: 'IBM Plex Sans KR', system-ui, sans-serif;
  font-size: 0.52em;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
.rules-lede-ko {
  margin-top: 6px;
  color: var(--ink);
  font-family: 'IBM Plex Sans KR', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.72;
  letter-spacing: -0.012em;
  opacity: 0.7;
}
.rule-ko,
.entry-ko,
.kit-ko,
.site-ko {
  display: block;
  margin-top: 7px;
  color: var(--ink);
  font-family: 'IBM Plex Sans KR', system-ui, sans-serif;
  font-size: 0.92em;
  font-weight: 400;
  line-height: 1.72;
  letter-spacing: -0.012em;
  opacity: 0.7;
}
.rule-fifteen .rule-ko { font-size: 0.88em; font-weight: 400; }
.entry,
.kit-row { align-items: start; }
.site-name-ko {
  display: inline-block;
  margin-left: 5px;
  color: var(--straw);
  font-family: 'IBM Plex Sans KR', system-ui, sans-serif;
  font-size: 0.78em;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.site-verdict span[lang="ko"] {
  font-family: 'IBM Plex Sans KR', system-ui, sans-serif;
  letter-spacing: -0.01em;
}
.doc-close span[lang="ko"] {
  color: var(--ink);
  font-family: 'IBM Plex Sans KR', system-ui, sans-serif;
  letter-spacing: -0.01em;
  opacity: 0.7;
}
.footer-legal span[lang="ko"] {
  font-family: 'IBM Plex Sans KR', system-ui, sans-serif;
  letter-spacing: -0.01em;
}

@media (max-width: 640px) {
  .title-ko { font-size: 0.56em; }
  .site-name-ko { display: block; margin: 4px 0 0; }
}

/* bilingual companion lines in compact cards */
.exit-sub-ko,
.wx-headline-ko,
.wx-sub-ko {
  display: block;
  font-family: 'IBM Plex Sans KR', system-ui, sans-serif;
  letter-spacing: -0.012em;
}
.exit-sub-ko { margin-top: 3px; color: var(--ink); font-size: 0.95em; opacity: 0.68; }
.wx-headline-ko { margin-top: 1px; color: var(--ink); font-size: 13.5px; line-height: 1.45; opacity: 0.74; }
.wx-sub-ko { margin-top: 1px; color: var(--ink); font-size: 11.5px; line-height: 1.55; opacity: 0.66; }
