/* Korea Gateway v2: bright app tone (Klook/Wanderlog) for info, chat-bubble stickers (Partiful) for community.
   Colour does the separating, not shadows. One loud place: the home bento. */
/* Friendly rounded type: Nunito for Latin, NanumSquare Round (Naver official CDN) for Hangul */
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@500;600;700;800;900&display=swap");
/* NanumSquare Round ships each weight as its own family; map them to real weights so bold text is not faux-bold */
@font-face { font-family: "KGRound"; font-weight: 300; font-display: swap; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundL.woff2") format("woff2"), url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundL.woff") format("woff"); }
@font-face { font-family: "KGRound"; font-weight: 400; font-display: swap; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundR.woff2") format("woff2"), url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundR.woff") format("woff"); }
@font-face { font-family: "KGRound"; font-weight: 500; font-display: swap; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundR.woff2") format("woff2"), url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundR.woff") format("woff"); }
@font-face { font-family: "KGRound"; font-weight: 600; font-display: swap; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundB.woff2") format("woff2"), url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundB.woff") format("woff"); }
@font-face { font-family: "KGRound"; font-weight: 700; font-display: swap; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundB.woff2") format("woff2"), url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundB.woff") format("woff"); }
@font-face { font-family: "KGRound"; font-weight: 800; font-display: swap; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundEB.woff2") format("woff2"), url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundEB.woff") format("woff"); }
@font-face { font-family: "KGRound"; font-weight: 900; font-display: swap; src: url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundEB.woff2") format("woff2"), url("https://hangeul.pstatic.net/hangeul_static/webfont/NanumSquareRound/NanumSquareRoundEB.woff") format("woff"); }

:root {
  --bg: #F5F6FA; --surface: #FFFFFF; --sunk: #EEF0F5;
  --ink: #15161A; --muted: #6B7080; --line: #E3E6EE;
  --coral: #FF5B45; --blue: #3D6BFF; --yellow: #FFDB5C; --mint: #12B886; --lilac: #EDE8FF; --lilac-ink: #6A4FE0;
  --warn: #E5383B; --ok: #0E9F6E; --hold: #C77700;
  --d1: #FF5B45; --d2: #3D6BFF; --d3: #12B886; --d4: #8B5CF6; --d5: #F59F00; --d6: #E64980;
  --r-tile: 24px; --r-m: 14px; --r-s: 10px; --pill: 999px;
  --font: "Nunito", "KGRound", system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --display: "Nunito", "KGRound", sans-serif;
  --t12: .75rem; --t14: .875rem; --t16: 1rem; --t18: 1.125rem; --t20: 1.25rem; --t24: 1.5rem; --t32: 2rem; --t44: 2.75rem;
  --header-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: var(--t16); line-height: 1.55; color: var(--ink); background: var(--bg); letter-spacing: 0; }
h1, h2, h3 { line-height: 1.25; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--t32); font-weight: 900; }
h2 { font-size: var(--t18); font-weight: 900; }
h3 { font-size: var(--t16); font-weight: 700; }
:lang(en) h1, :lang(en) h2, .display { font-family: var(--display); }
p { margin: 0; }
a { color: var(--blue); text-underline-offset: 3px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .small { font-size: var(--t14); } .xs { font-size: var(--t12); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; height: var(--header-h); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 20px; padding: 0 24px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 800 var(--t20)/1 var(--display); white-space: nowrap; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: var(--pill); font-weight: 800; font-size: var(--t14); transition: background .2s, color .2s, transform .18s cubic-bezier(.3,1.6,.5,1); }
.site-nav a:hover { background: var(--sunk); transform: translateY(-1px); }
.site-nav a:active, .site-nav a.is-pressed { transform: scale(.9); }
.site-nav a[aria-current="page"] { background: var(--ink); color: #fff; view-transition-name: nav-pill; }
/* the active pill glides to the next menu on page change (cross-document view transitions) */
@view-transition { navigation: auto; }
::view-transition-group(nav-pill) { animation-duration: .38s; animation-timing-function: cubic-bezier(.2,.9,.25,1.15); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
.lang-switch button { transition: background .2s, color .2s, transform .15s; }
.lang-switch button:active { transform: scale(.9); }
.header-tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.lang-switch { display: flex; background: var(--sunk); border-radius: var(--pill); padding: 3px; }
.lang-switch button { background: none; border: 0; color: var(--muted); padding: 6px 12px; border-radius: var(--pill); font: inherit; font-size: var(--t12); font-weight: 700; cursor: pointer; white-space: nowrap; }
.lang-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); }
.who { font-size: var(--t14); font-weight: 650; }
.site-header .menu-btn { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 18px; border-radius: var(--pill); font: inherit; font-weight: 700; font-size: var(--t14); cursor: pointer; text-decoration: none; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-primary:hover { background: #2B2D33; }
.btn-accent { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn-ghost { background: none; border-color: transparent; }
.btn-on-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: var(--t12); }
.btn-danger { color: var(--warn); }
.btn[disabled] { opacity: .4; cursor: default; }
.btn[aria-busy="true"] { opacity: .7; pointer-events: none; }
.btn[aria-busy="true"]::before { content: ""; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* chips are pressable (pill + border); tags only show state (flat, square-ish) */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 36px; padding: 0 14px; border-radius: var(--pill); border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--t14); font-weight: 650; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tag { display: inline-block; font-size: var(--t12); font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--sunk); color: var(--muted); white-space: nowrap; }
.tag-official { background: #DDF6EC; color: var(--ok); }
.tag-second { background: var(--sunk); color: var(--muted); }
.tag-volatile { background: #FFF1D6; color: var(--hold); }
.tag-conflict { background: #FFE3E0; color: var(--warn); }
.yes { color: var(--ok); font-weight: 700; } .no { color: var(--warn); font-weight: 700; } .maybe { color: var(--hold); font-weight: 700; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 800; line-height: 20px; text-align: center; }

/* ---------- layout ---------- */
.wrap { max-width: 1320px; margin: 0 auto; padding: 24px; }
.notice-bar { background: var(--yellow); font-size: var(--t14); font-weight: 600; padding: 10px 24px; text-align: center; }
.panel { background: var(--surface); border-radius: var(--r-tile); }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.panel-head a { font-size: var(--t14); font-weight: 700; color: var(--ink); }
.panel-body { padding: 0 22px 22px; }
.stamp { font-size: var(--t12); color: var(--muted); }

/* ---------- home bento: the loud part ---------- */
.bento { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-areas: "wx wx fx check" "wx wx alert check" "routes routes routes em" "works works com fest"; }
.tile { border-radius: var(--r-tile); padding: 22px; min-width: 0; }
.tile h2 { margin-bottom: 12px; }
.t-wx { grid-area: wx; background: var(--blue); color: #fff; display: flex; flex-direction: column; }
.t-fx { grid-area: fx; background: var(--yellow); }
.t-alert { grid-area: alert; background: #FFE4DF; }
.t-check { grid-area: check; background: var(--surface); }
.t-em { grid-area: em; background: var(--ink); color: #fff; }
.t-routes { grid-area: routes; background: var(--surface); }
.t-works { grid-area: works; background: var(--surface); }
.t-com { grid-area: com; background: var(--surface); }
.t-fest { grid-area: fest; background: var(--lilac); }
.tile-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.tile-head h2 { margin: 0; }
.tile-head a { font-size: var(--t14); font-weight: 700; color: inherit; }
.fx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.fx-grid b { display: block; font: 800 var(--t24)/1.1 var(--display); }
.fx-grid span { font-size: var(--t12); font-weight: 700; opacity: .7; }
.alert-tag { display: inline-block; background: var(--coral); color: #fff; font-size: var(--t12); font-weight: 800; padding: 3px 10px; border-radius: var(--pill); margin-bottom: 8px; }
.em-grid { display: grid; gap: 8px; }
.em-grid a { display: flex; justify-content: space-between; align-items: baseline; color: #fff; text-decoration: none; padding: 8px 0; border-top: 1px solid #2E3038; }
.em-grid a:first-child { border-top: 0; }
.em-grid b { font: 800 var(--t24)/1 var(--display); color: var(--yellow); }
.em-grid span { font-size: var(--t14); opacity: .85; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.checklist li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; align-items: start; padding: 7px 0; font-size: var(--t14); font-weight: 550; }
.checklist input { appearance: none; width: 22px; height: 22px; margin: 0; border: 2px solid var(--line); border-radius: 7px; cursor: pointer; display: grid; place-items: center; }
.checklist input:checked { background: var(--mint); border-color: var(--mint); }
.checklist input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.checklist input:checked + label { color: var(--muted); text-decoration: line-through; }
.progress { height: 6px; border-radius: 3px; background: var(--sunk); overflow: hidden; margin-bottom: 10px; }
.progress i { display: block; height: 100%; background: var(--mint); }

/* tables */
.table { width: 100%; border-collapse: collapse; font-size: var(--t14); }
.table th { text-align: left; font-weight: 700; font-size: var(--t12); color: var(--muted); padding: 8px 10px; white-space: nowrap; }
.table td { padding: 12px 10px; border-top: 1px solid var(--line); vertical-align: top; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #F8F9FC; }
.table-scroll { overflow-x: auto; }

/* lists */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list a.row { display: block; padding: 12px 0; color: var(--ink); text-decoration: none; }
.list a.row:hover h3 { text-decoration: underline; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: var(--t12); color: var(--muted); margin-top: 4px; }

/* routes: the day strip encodes the days */
.route-card { display: grid; gap: 8px; padding: 16px; border-radius: 18px; background: var(--sunk); color: var(--ink); text-decoration: none; }
.route-card:hover { background: #E6E9F1; }
.route-lines { display: flex; gap: 4px; }
.route-lines i { height: 8px; flex: 1; border-radius: 4px; }
.route-scroller { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.route-scroller > * { scroll-snap-align: start; }
.pager { font-size: var(--t12); font-weight: 700; color: var(--muted); }

/* community bubbles (Partiful-style) */
.bubbles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bubble { display: grid; grid-template-columns: 34px 1fr; gap: 10px; text-decoration: none; color: var(--ink); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: var(--t14); color: #fff; }
.bubble-body { background: var(--sunk); border-radius: 18px 18px 18px 6px; padding: 10px 14px; }
.bubble:hover .bubble-body { background: #E6E9F1; }
.bubble-body h3 { font-size: var(--t14); }
.sticker { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: var(--pill); border: 1.5px solid var(--ink); background: var(--surface); transform: rotate(-2deg); }
.sticker.type-q { background: #DCE5FF; } .sticker.type-tip { background: #D5F5E8; } .sticker.type-report { background: #FFD9D3; } .sticker.type-review { background: var(--lilac); }
.post-type { font-size: var(--t12); font-weight: 800; }

/* ---------- route viewer ---------- */
.route-page { display: grid; grid-template-columns: minmax(0, 1fr) 420px; height: calc(100vh - var(--header-h)); }
.route-map { position: relative; background: #E9EDF3; min-height: 320px; }
.route-map .map-canvas { position: absolute; inset: 0; }
.side { background: var(--surface); display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); }
.side-head { padding: 20px; display: grid; gap: 10px; }
.side-scroll { overflow-y: auto; flex: 1; }
.day-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 0 20px 12px; border-bottom: 1px solid var(--line); }
.day-tab { border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; font-size: var(--t14); padding: 6px 14px; border-radius: var(--pill); cursor: pointer; color: var(--ink); white-space: nowrap; }
.day-tab[aria-selected="true"] { color: #fff; background: var(--day, var(--ink)); border-color: var(--day, var(--ink)); }
.stops { list-style: none; margin: 0; padding: 8px 12px; }
.stop { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 12px; border-radius: 16px; cursor: pointer; }
.stop:hover { background: #F8F9FC; }
.stop[aria-current="true"] { background: var(--sunk); }
.stop-no { width: 30px; height: 30px; border-radius: 50%; background: var(--day); color: #fff; font: 800 var(--t14)/1 var(--display); display: grid; place-items: center; }
.stop-time { font-size: var(--t12); color: var(--muted); font-weight: 700; }
.stop-detail { margin: 0 12px 4px; padding: 16px; border-radius: 18px; background: #F8F9FC; display: grid; gap: 10px; max-height: 60%; overflow-y: auto; flex: none; }
.stop-detail h2 { font-size: var(--t20); }
.stop-detail dl { display: grid; grid-template-columns: 92px 1fr; gap: 6px 10px; margin: 0; font-size: var(--t14); }
.stop-detail dt { color: var(--muted); }
.stop-detail dd { margin: 0; }
.sheet-handle { display: none; }
/* one-click hand-off buttons */
.go { display: grid; gap: 8px; margin-top: 4px; }
.go-title { font-size: var(--t12); font-weight: 800; color: var(--muted); margin-top: 4px; }
.go-row { display: flex; flex-wrap: wrap; gap: 6px; }
.go-btn { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 14px; border-radius: 14px; background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 750; font-size: var(--t14); line-height: 1.25; }
.go-btn small { font-size: 11px; font-weight: 600; color: var(--muted); }
.go-btn:hover { border-color: var(--ink); }
.go-kride { background: var(--yellow); border-color: var(--yellow); }
.go-uber { background: var(--ink); border-color: var(--ink); color: #fff; } .go-uber small { color: #C9CBD3; }
.go-own { background: var(--lilac); border-color: var(--lilac); }
.driver-card { text-align: center; display: grid; gap: 10px; padding: 12px 0 8px; }
.driver-card b { font-size: 2.6rem; line-height: 1.15; font-weight: 900; word-break: keep-all; }
.go-inline { font-size: var(--t12); font-weight: 800; color: var(--blue); text-decoration: none; white-space: nowrap; }
.go-inline::after { content: " \2197"; }
.svc-link { color: var(--ink); font-weight: 750; text-decoration: none; }
.svc-link::after { content: " \2197"; color: var(--muted); font-weight: 600; }
.svc-link:hover { text-decoration: underline; }
/* home quick links */
.pin { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid #fff; background: var(--day); color: #fff; font: 800 13px/25px var(--display); text-align: center; cursor: pointer; transform: translate(-50%, -50%); position: absolute; padding: 0; }
.pin.is-active { width: 42px; height: 42px; line-height: 37px; font-size: 17px; z-index: 5; box-shadow: 0 0 0 4px rgba(21,22,26,.85); }
.map-note { position: absolute; left: 14px; bottom: 14px; background: var(--surface); border-radius: var(--pill); padding: 8px 14px; font-size: var(--t12); font-weight: 600; max-width: 75%; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > label, .field-label { font-size: var(--t14); font-weight: 700; }
.input, textarea.input { width: 100%; min-height: 46px; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: var(--r-m); font: inherit; color: var(--ink); background: var(--surface); }
textarea.input { min-height: 130px; resize: vertical; }
.input:focus { border-color: var(--ink); outline: none; }
.input[aria-invalid="true"] { border-color: var(--warn); }
.field-msg { font-size: var(--t12); color: var(--warn); font-weight: 650; }
.form-grid { display: grid; gap: 16px; }

/* custom select */
.kg-select { position: relative; }
.kg-select-btn { width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: var(--pill); background: var(--surface); font: inherit; font-size: var(--t14); font-weight: 650; color: var(--ink); cursor: pointer; text-align: left; }
.kg-select-btn::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); flex: none; }
.kg-select-btn[aria-expanded="true"] { border-color: var(--ink); }
.kg-pop { position: absolute; z-index: 60; left: 0; min-width: 100%; top: calc(100% + 6px); background: var(--surface); border: 1.5px solid var(--ink); border-radius: 18px; padding: 6px; max-height: 340px; display: flex; flex-direction: column; }
.kg-pop[hidden] { display: none; }
.kg-pop .input { min-height: 38px; margin-bottom: 6px; }
.kg-options { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.kg-option { padding: 9px 12px; border-radius: 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: var(--t14); font-weight: 550; white-space: nowrap; }
.kg-option[aria-selected="true"] { font-weight: 800; }
.kg-option[aria-selected="true"]::after { content: ""; width: 10px; height: 5px; border-left: 2.5px solid var(--coral); border-bottom: 2.5px solid var(--coral); transform: rotate(-45deg) translateY(4px); }
.kg-option.is-active { background: var(--sunk); }
.kg-sheet-title { display: none; }

/* dialog / toast / alerts */
dialog.kg-dialog { border: 0; border-radius: 26px; padding: 0; width: min(560px, calc(100vw - 32px)); color: var(--ink); }
dialog.kg-dialog.is-compact { width: min(400px, calc(100vw - 32px)); }
dialog.kg-dialog[open] { animation: pop-in .22s cubic-bezier(.2,.9,.3,1.2); }
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.dlg-icon { width: 46px; height: 46px; border-radius: 16px; background: #FFE4DF; color: var(--coral); display: grid; place-items: center; margin-bottom: 14px; }
.is-compact .dialog-head h2 { font-size: var(--t24); }
.is-compact .dialog-body { font-size: var(--t14); line-height: 1.65; }
dialog.kg-dialog::backdrop { background: rgba(21, 22, 26, .5); backdrop-filter: blur(2px); }
.dialog-head { padding: 22px 24px 6px; display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.dialog-body { padding: 8px 24px 22px; display: grid; gap: 14px; }
.dialog-foot { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 8px; }
.icon-btn { width: 36px; height: 36px; flex: none; border: 0; padding: 0; background: var(--sunk); border-radius: 50%; cursor: pointer; color: var(--ink); display: grid; place-items: center; }
.icon-btn:hover { background: #E3E6EE; }
.toast-host { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: var(--pill); font-size: var(--t14); font-weight: 650; }
.alert-inline { display: flex; gap: 10px; padding: 12px 16px; border-radius: var(--r-m); background: #FFF6D6; font-size: var(--t14); font-weight: 550; }
.alert-inline.is-error { background: #FFE3E0; color: #9E1C1F; }

details.acc { border-top: 1px solid var(--line); }
details.acc > summary { list-style: none; cursor: pointer; padding: 16px 0; display: flex; justify-content: space-between; gap: 12px; font-weight: 800; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: "+"; width: 26px; height: 26px; border-radius: 50%; background: var(--sunk); display: grid; place-items: center; font-size: var(--t18); line-height: 1; }
details.acc[open] > summary::after { content: "−"; background: var(--ink); color: #fff; }
details.acc .acc-body { padding: 0 0 16px; display: grid; gap: 10px; font-size: var(--t14); }

/* community page */
.com-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.cat-rail { position: sticky; top: calc(var(--header-h) + 16px); display: grid; gap: 2px; background: var(--surface); border-radius: var(--r-tile); padding: 10px; }
.cat-rail button { text-align: left; border: 0; background: none; font: inherit; font-size: var(--t14); font-weight: 600; padding: 9px 12px; border-radius: 12px; cursor: pointer; color: var(--ink); display: flex; justify-content: space-between; }
.cat-rail button:hover { background: var(--sunk); }
.cat-rail button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .kg-select { width: 190px; }
.type-q { color: var(--blue); } .type-tip { color: var(--ok); } .type-report { color: var(--coral); } .type-review { color: var(--lilac-ink); }
.empty { padding: 36px 16px; text-align: center; display: grid; gap: 12px; justify-items: center; }

/* admin */
.admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.admin-nav { background: var(--surface); padding: 14px; display: grid; gap: 2px; align-content: start; }
.admin-nav button { text-align: left; border: 0; background: none; font: inherit; font-size: var(--t14); font-weight: 600; padding: 10px 12px; border-radius: 12px; cursor: pointer; color: var(--ink); display: flex; justify-content: space-between; align-items: center; }
.admin-nav button[aria-selected="true"] { background: var(--ink); color: #fff; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border-radius: 20px; padding: 16px 18px; }
.stat:nth-child(1) { background: var(--blue); color: #fff; } .stat:nth-child(5) { background: #FFE4DF; }
.stat b { display: block; font: 800 var(--t32)/1.1 var(--display); }
.stat span { font-size: var(--t12); font-weight: 650; opacity: .75; }
.dot-ok, .dot-bad { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.dot-ok { background: var(--ok); } .dot-bad { background: var(--warn); }

/* editor */
.edit-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.edit-map { position: sticky; top: calc(var(--header-h) + 16px); height: calc(100vh - var(--header-h) - 40px); min-height: 420px; overflow: hidden; }
.edit-meta { display: grid; grid-template-columns: 200px 1fr; gap: 14px; align-items: start; }
.edit-meta .chips { min-height: 42px; align-items: center; }
.edit-stops { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.edit-stop { display: grid; grid-template-columns: 30px auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 16px; background: #F8F9FC; }
.edit-stop .stop-no { width: 28px; height: 28px; font-size: var(--t12); }
.edit-stop-name { min-width: 0; display: grid; }
.edit-stop-name b, .edit-stop-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.edit-stop-name small, .result small { font-size: var(--t12); color: var(--muted); font-weight: 600; }
/* time chip: the whole chip opens the picker */
.time-chip { border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); border-radius: var(--pill); padding: 7px 12px; font: inherit; font-weight: 800; font-size: var(--t14); color: var(--ink); cursor: pointer; white-space: nowrap; }
.time-chip::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-3px); }
.time-chip:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.row-actions { display: flex; gap: 4px; }
.icon-sq { width: 32px; height: 32px; border-radius: 10px; border: 0; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line); cursor: pointer; font: inherit; font-weight: 800; color: var(--ink); display: grid; place-items: center; padding: 0; }
.icon-sq:hover:not([disabled]) { box-shadow: inset 0 0 0 1.5px var(--ink); }
.icon-sq[disabled] { opacity: .35; cursor: default; }
.icon-sq.danger { color: var(--warn); }
/* time picker */
.tp-pop { position: absolute; z-index: 70; width: 260px; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 20px; padding: 10px; display: grid; gap: 8px; animation: pop-in .18s ease-out; }
.tp-cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 6px; }
.tp-col { max-height: 220px; overflow-y: auto; display: grid; gap: 2px; padding: 2px; scrollbar-width: thin; }
.tp-col button { border: 0; background: none; padding: 9px 10px; border-radius: 12px; font: inherit; font-weight: 700; font-size: var(--t14); color: var(--ink); cursor: pointer; text-align: center; }
.tp-col button:hover { background: var(--sunk); }
.tp-col button[aria-selected="true"] { background: var(--ink); color: #fff; }
.tp-foot { display: flex; justify-content: flex-end; }
/* place search */
.place-search { display: grid; gap: 8px; padding: 16px; border-radius: 20px; background: var(--sunk); }
.search-box { grid-template-columns: 1fr auto; display: grid; gap: 8px; }
.search-box .field-msg { grid-column: 1 / -1; }
.search-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip-sm { min-height: 30px; padding: 0 11px; font-size: var(--t12); }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t12); font-weight: 700; cursor: pointer; }
.toggle input { width: 16px; height: 16px; accent-color: var(--ink); }
.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 320px; overflow-y: auto; }
.result { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; border: 0; background: var(--surface); border-radius: 14px; padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.result:hover, .result:focus-visible { box-shadow: inset 0 0 0 1.5px var(--ink); }
.result-text { display: grid; gap: 2px; min-width: 0; }
.result-add { flex: none; font-size: var(--t12); font-weight: 800; background: var(--ink); color: #fff; padding: 6px 10px; border-radius: var(--pill); }


/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "wx wx" "fx alert" "check em" "routes routes" "works works" "com fest"; }
}
@media (max-width: 960px) {
  .com-layout { grid-template-columns: minmax(0, 1fr); }
  .cat-rail { display: none; }
  .edit-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-nav { display: flex; overflow-x: auto; }
}
@media (max-width: 720px) {
  .site-header { gap: 8px; padding: 0 14px; }
  .site-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 8px 14px 16px; border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .site-header .menu-btn { display: inline-flex; }
  .who { display: none; }
  .wrap { padding: 14px; }
  .bento { grid-template-columns: minmax(0, 1fr); grid-template-areas: "wx" "fx" "alert" "check" "routes" "em" "works" "com" "fest"; }
  .tile { padding: 18px; border-radius: 20px; }
  .route-page { grid-template-columns: 1fr; height: calc(100dvh - var(--header-h)); position: relative; }
  .side { position: absolute; left: 0; right: 0; bottom: 0; height: 45%; border-left: 0; border-radius: 24px 24px 0 0; box-shadow: 0 -8px 30px rgba(21,22,26,.12); transition: height .2s ease; z-index: 10; overflow-y: auto; }
  .side .side-scroll { overflow: visible; flex: none; }
  .side .stop-detail { max-height: none; overflow: visible; }
  .side[data-sheet="peek"] { height: 140px; }
  .side[data-sheet="full"] { height: calc(100% - 24px); }
  .sheet-handle { display: block; border: 0; background: none; padding: 10px; cursor: pointer; }
  .sheet-handle::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto; }
  .kg-pop { position: fixed; left: 0; right: 0; top: auto; bottom: 0; border: 0; border-radius: 26px 26px 0 0; max-height: 70vh; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); }
  .kg-sheet-title { display: block; font-weight: 800; padding: 4px 8px 12px; }
  .kg-dim { position: fixed; inset: 0; background: rgba(21,22,26,.5); z-index: 59; }
  .kg-option { padding: 14px 12px; font-size: var(--t16); }
  .edit-stop { grid-template-columns: 28px auto minmax(0, 1fr); }
  .edit-stop .row-actions { grid-column: 2 / -1; }
  .edit-meta { grid-template-columns: 1fr; }
  .edit-map { position: relative; top: 0; height: 320px; min-height: 0; }
  .tp-pop { position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; border: 0; border-radius: 26px 26px 0 0; padding: 14px 14px calc(14px + env(safe-area-inset-bottom)); }
  .tp-col { max-height: 40vh; }
  .tp-col button { padding: 12px; font-size: var(--t16); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* =================== v3: Node app pages =================== */

/* ---- hero: today in Korea ---- */
.hero { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 14px; margin: 4px 0 14px; }
.hero-main { background: var(--surface); border-radius: var(--r-tile); padding: 26px 28px; display: grid; gap: 8px; align-content: start; }
.hero-date { display: inline-flex; width: fit-content; font-size: var(--t14); font-weight: 800; color: var(--coral); background: #FFE4DF; padding: 4px 12px; border-radius: var(--pill); }
.hero-main h1 { font-size: var(--t44); font-weight: 900; line-height: 1.1; }
.hero-sub { color: var(--muted); font-weight: 600; }
.hero-facts { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: var(--pill); background: var(--sunk); font-size: var(--t14); font-weight: 700; }
.hero-facts .wx-icon { background: var(--blue); border-radius: 50%; padding: 2px; }
.hero-facts .dot { width: 14px; height: 14px; border-radius: 50%; margin-left: 4px; }
.fx-chip { width: 22px; height: 22px; border-radius: 50%; background: var(--yellow); display: grid; place-items: center; font-weight: 900; font-size: var(--t12); }
.hero-clock { background: var(--ink); color: #fff; border-radius: var(--r-tile); padding: 24px 26px; display: grid; align-content: center; gap: 6px; }
.hero-clock-label { font-size: var(--t14); font-weight: 700; color: #C9CBD3; }
.hero-clock-label b { color: var(--yellow); margin-left: 4px; }
.hero-clock-time { font: 900 3.4rem/1 var(--display); letter-spacing: .02em; color: var(--yellow); font-variant-numeric: tabular-nums; }
.hero-clock-yours { font-size: var(--t14); font-weight: 600; color: #C9CBD3; }

/* ---- quick links: sideways scroller with arrows and edge fades ---- */
.quick-wrap { position: relative; margin: 0 0 14px; }
.quick { display: flex; gap: 8px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 2px; cursor: grab; user-select: none; }
.quick::-webkit-scrollbar { display: none; }
.quick:active { cursor: grabbing; }
.quick a { flex: none; padding: 11px 18px; border-radius: var(--pill); background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 800; font-size: var(--t14); border: 1.5px solid var(--line); }
.quick a:hover { border-color: var(--ink); }
.quick a.is-accent { background: var(--yellow); border-color: var(--yellow); }
.quick a::after { content: " \2197"; color: var(--muted); }
.quick-wrap::before, .quick-wrap::after { content: ""; position: absolute; top: 0; bottom: 0; width: 64px; pointer-events: none; opacity: 0; transition: opacity .2s; z-index: 1; }
.quick-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.quick-wrap::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.quick-wrap.fade-l::before, .quick-wrap.fade-r::after { opacity: 1; }
.quick-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; }
.quick-arrow[hidden] { display: none; }
.quick-arrow.prev { left: -6px; } .quick-arrow.next { right: -6px; }
.quick-arrow:active { transform: translateY(-50%) scale(.92); }

/* ---- weather tile: icon, name, temperature, then details on one line ---- */
.wx-list { list-style: none; margin: 0; padding: 0; display: grid; flex: 1; align-content: space-evenly; }
.wx-list li { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "icon name temp" "icon detail detail"; column-gap: 14px; row-gap: 4px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(255,255,255,.22); }
.wx-list li:first-child { border-top: 0; }
.wx-list .wx-icon { grid-area: icon; }
.wx-name { grid-area: name; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.wx-city { font-weight: 900; font-size: var(--t18); }
.wx-sky { font-size: var(--t14); font-weight: 700; opacity: .85; }
.wx-temp { grid-area: temp; font: 900 var(--t32)/1 var(--display); }
.wx-detail { grid-area: detail; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: var(--t12); font-weight: 700; opacity: .92; align-items: center; }
.wx-air { padding: 2px 9px; border-radius: var(--pill); background: rgba(255,255,255,.2); }
.wx-air.air-bad, .wx-air.air-worst { background: var(--coral); }
.wx-empty { display: block !important; padding: 20px 0; font-weight: 700; }
.wx-foot { display: flex; justify-content: space-between; gap: 8px; font-size: var(--t12); opacity: .8; margin-top: 10px; }
.dot.air-good { background: var(--mint); } .dot.air-moderate { background: var(--yellow); } .dot.air-bad { background: var(--coral); } .dot.air-worst { background: #B42318; }
.fx-src { margin-top: 12px; opacity: .7; font-weight: 600; }

/* ---- guide: roomier panels and readable items ---- */
.guide-page { display: grid; gap: 20px; }
.guide-panel { padding: 36px 40px; }
.guide-panel h1 { margin-bottom: 14px; }
.guide-h2 { font-size: var(--t24); margin-bottom: 18px; }
.guide-groups details.acc > summary { padding: 20px 0; font-size: var(--t20); font-weight: 900; }
.acc-title { flex: 1; }
.acc-count { font-size: var(--t14); font-weight: 800; color: var(--muted); margin-right: 12px; align-self: center; }
.guide-items { list-style: none; margin: 0; padding: 0 0 22px; display: grid; gap: 12px; }
.guide-item { display: grid; gap: 6px; padding: 14px 18px; border-radius: 16px; background: #F8F9FC; }
.guide-item p { font-size: var(--t16); font-weight: 600; line-height: 1.7; }
.guide-item-tags { display: flex; gap: 8px; align-items: center; }
.guide-table td, .guide-table th { padding: 14px 12px; }
.guide-table { font-size: var(--t14); }

/* ---- lists, cards, community ---- */
.route-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.post-card { padding: 28px; display: grid; gap: 12px; }
.post-body { white-space: pre-wrap; font-size: var(--t16); line-height: 1.75; }
.post-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.comment { padding: 12px 0; }
.write-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.empty p { color: var(--muted); font-weight: 700; }

/* ---- header profile button ---- */
.who-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: var(--pill); font: inherit; color: var(--ink); }
.who-btn:hover { background: var(--sunk); }
.who-btn img, .who-initial { width: 28px; height: 28px; border-radius: 50%; }
.who-initial { display: grid; place-items: center; background: var(--coral); color: #fff; font-weight: 900; font-size: var(--t14); }

/* ---- footer ---- */
.footer { max-width: 1320px; margin: 24px auto 0; padding: 32px 24px 44px; border-top: 1px solid var(--line); }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.footer-content > div { display: grid; gap: 8px; align-content: start; font-size: var(--t14); }
.footer-content b { font-weight: 900; }
.footer-content a { color: var(--muted); text-decoration: none; font-weight: 600; }
.footer-content a:hover { color: var(--ink); text-decoration: underline; }
.footer-brand p { color: var(--muted); }
.footer-bottom { margin-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: var(--t12); color: var(--muted); }

/* ---- legal pages ---- */
.legal { max-width: 820px; background: var(--surface); border-radius: var(--r-tile); padding: 40px 44px; margin-top: 24px; }
.legal h1 { margin-bottom: 6px; }
.legal h2 { font-size: var(--t18); margin: 28px 0 8px; }
.legal p, .legal li { line-height: 1.75; font-size: var(--t14); }
.legal ul { padding-left: 20px; display: grid; gap: 4px; }
.last-updated { color: var(--muted); font-weight: 700; margin-bottom: 16px; }

/* ---- error page ---- */
.alert-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.alert-card { background: var(--surface); border-radius: var(--r-tile); padding: 36px; display: grid; gap: 16px; justify-items: start; max-width: 420px; }
.alert-card h1 { font-size: var(--t20); line-height: 1.5; }
.alert-card .dlg-icon { font-weight: 900; font-size: var(--t20); margin: 0; }

body.is-wide .route-page { height: calc(100vh - var(--header-h)); }

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .footer-content { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .hero-main { padding: 20px; }
  .hero-main h1 { font-size: var(--t32); }
  .hero-clock { padding: 18px 20px; }
  .hero-clock-time { font-size: 2.6rem; }
  .wx-temp { font-size: var(--t24); }
  .guide-panel { padding: 24px 20px; }
  .guide-item { padding: 12px 14px; }
  .legal { padding: 26px 20px; }
  .write-grid { grid-template-columns: 1fr 1fr; }
  .quick-arrow { display: none; }
}


/* =================== v4: feedback round 3 =================== */

/* 21 + 10: wider page, roomier spacing */
.wrap { max-width: 1390px; padding: 36px 40px 48px; }
.wrap-narrow { max-width: 860px; }
.footer { max-width: 1390px; padding: 40px 40px 56px; }
.bento { gap: 20px; }
.tile { padding: 28px; }
.panel-head { padding: 26px 28px 14px; }
.panel-body { padding: 0 28px 28px; }
.hero { gap: 20px; margin: 0 0 20px; }
.hero-main { padding: 32px 36px; }
.hero-main h2 { font-size: var(--t32); font-weight: 900; line-height: 1.15; }
.hero-clock { padding: 28px 32px; }
.quick-wrap { margin: 0 0 20px; }
.route-grid { gap: 20px; }
.post-card { padding: 32px 36px; }
.edit-form { padding: 32px; gap: 22px; }
.edit-actions { display: flex; gap: 8px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.edit-actions #del { margin-right: auto; }

/* 11: no visible scrollbars anywhere (scrolling still works: wheel, touch, keyboard) */
html, body, * { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { width: 0; height: 0; display: none; }
html:has(dialog[open]) { overflow: hidden; }

/* 5: crisper header text */
.site-header { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; gap: 24px; padding: 0 32px; }
.brand { font-weight: 900; letter-spacing: -.01em; }
.site-nav a { font-weight: 700; font-size: .9375rem; padding: 9px 16px; }
.site-nav a:hover { transform: none; }
.who { font-weight: 700; }

/* 12: logout icon, animated burger and menu */
.icon-btn.logout-btn { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink); background: var(--sunk); text-decoration: none; transition: background .2s, color .2s, transform .15s; }
.icon-btn.logout-btn:hover { background: var(--ink); color: #fff; }
.icon-btn.logout-btn:active { transform: scale(.9); }
.burger { width: 20px; height: 14px; position: relative; display: block; }
.burger i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .28s cubic-bezier(.2,.9,.3,1.2), opacity .2s, top .28s; }
.burger i:nth-child(1) { top: 0; } .burger i:nth-child(2) { top: 6px; } .burger i:nth-child(3) { top: 12px; }
.menu-btn[aria-expanded="true"] .burger i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .burger i:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.menu-btn[aria-expanded="true"] .burger i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* 3: back link */
.back-link { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 16px; padding: 8px 16px 8px 10px; border-radius: var(--pill); background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 800; font-size: var(--t14); transition: border-color .2s, transform .15s; }
.back-link:hover { border-color: var(--ink); }
.back-link:hover svg { transform: translateX(-2px); }
.back-link svg { transition: transform .2s; }
.back-link:active { transform: scale(.96); }

/* 14: footer notice */
.footer-notice { display: flex; gap: 12px; align-items: flex-start; margin-top: 28px; padding: 16px 20px; border-radius: 18px; background: #FFF6DB; color: #5C4400; font-size: var(--t14); line-height: 1.65; }
.footer-notice svg { flex: none; margin-top: 2px; color: var(--hold); }
.footer-notice b { color: #3D2D00; }

/* 13: edit page: narrower form, wider map */
.edit-layout { grid-template-columns: minmax(400px, .82fr) minmax(0, 1.3fr); gap: 24px; }
.edit-map { height: calc(100vh - var(--header-h) - 72px); }
.route-page { grid-template-columns: minmax(0, 1fr) 400px; }

/* 8: country chip in flag colours */
.cc { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 18px; padding: 0 5px; border-radius: 6px; font: 900 10px/1 var(--display); letter-spacing: .04em;
  color: var(--cc-ink); padding: 0 15px 0 6px; background: linear-gradient(90deg, var(--cc-a) 0 calc(100% - 10px), var(--cc-b) calc(100% - 10px) calc(100% - 5px), var(--cc-c) calc(100% - 5px)); box-shadow: inset 0 0 0 1px rgba(21,22,26,.12); vertical-align: 1px; text-shadow: 0 0 2px rgba(0,0,0,.08); }

/* 7: travel time on the map lines */
.leg-label { display: inline-block; padding: 3px 9px; border-radius: var(--pill); background: #fff; color: var(--ink); border: 2px solid var(--day, var(--ink)); font: 800 11px/1.2 var(--display); white-space: nowrap; pointer-events: auto; cursor: help; z-index: 1; }
.leg-label.leg-walk { border-style: dashed; }
.leg-label.leg-far { background: var(--ink); color: #fff; border-color: var(--ink); }

/* 9: locked country */
.locked-field { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 14px; border-radius: 14px; background: var(--sunk); }
.locked-field .lock-ic { margin-left: auto; color: var(--muted); }
.label { font-weight: 800; font-size: var(--t14); }

/* 15: main banner */
.banner { position: relative; overflow: hidden; border-radius: 32px; margin: 0 0 20px; background: #15161A; color: #fff; }
.banner-track { display: flex; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.banner-slide { flex: 0 0 100%; min-height: 340px; position: relative; display: grid; color: inherit; text-decoration: none; }
.banner-default { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; gap: 24px; padding: 44px 52px;
  background: radial-gradient(120% 140% at 100% 0%, #3D6BFF 0%, rgba(61,107,255,0) 55%), radial-gradient(90% 120% at 0% 100%, #FF5B45 0%, rgba(255,91,69,0) 50%), #15161A; }
.banner-kicker { display: inline-flex; width: fit-content; padding: 6px 14px; border-radius: var(--pill); background: rgba(255,255,255,.14); backdrop-filter: blur(8px); font-weight: 800; font-size: var(--t14); }
.banner-title { font-size: clamp(1.9rem, 3.6vw, 3.1rem); font-weight: 900; line-height: 1.12; margin: 14px 0 12px; color: #fff; }
.banner-sub { color: rgba(255,255,255,.82); font-weight: 600; max-width: 560px; line-height: 1.7; }
.banner-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.btn-lg { padding: 14px 24px; font-size: var(--t16); }
.banner .btn-primary { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }
.btn-glass { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.3); backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255,255,255,.22); }
.banner-points { list-style: none; padding: 0; margin: 24px 0 0; display: flex; gap: 16px; flex-wrap: wrap; font-weight: 700; font-size: var(--t14); color: rgba(255,255,255,.88); }
.banner-points b { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.18); margin-right: 6px; font-size: 12px; }
.banner-art svg { width: 100%; height: auto; overflow: visible; }
.ba-road { fill: none; stroke: rgba(255,255,255,.12); stroke-width: 18; stroke-linecap: round; }
.ba-line { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 600; stroke-dashoffset: 600; animation: ba-draw 2.4s .3s cubic-bezier(.4,0,.2,1) forwards; }
.ba-line.d1 { stroke: #FF6B57; } .ba-line.d2 { stroke: #6F93FF; animation-delay: 1.4s; }
.ba-pin circle { fill: var(--c); stroke: #fff; stroke-width: 3; }
.ba-pin text { fill: #fff; font: 900 13px var(--display); text-anchor: middle; }
.ba-pin { animation: ba-pop .5s cubic-bezier(.2,.9,.3,1.4) both; transform-box: fill-box; transform-origin: center; }
.ba-pin:nth-of-type(2) { animation-delay: .9s; } .ba-pin:nth-of-type(3) { animation-delay: 1.5s; } .ba-pin:nth-of-type(4) { animation-delay: 2.6s; }
.ba-chip rect { fill: #fff; } .ba-chip text { fill: var(--ink); font: 800 11px var(--display); text-anchor: middle; }
.ba-chip { animation: ba-pop .5s 2.9s both; transform-box: fill-box; transform-origin: center; }
@keyframes ba-draw { to { stroke-dashoffset: 0; } }
@keyframes ba-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.banner-admin { overflow: hidden; }
.banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-admin .banner-copy { position: relative; align-self: end; padding: 40px 52px; }
.banner-copy.on-image { background: linear-gradient(0deg, rgba(0,0,0,.55), transparent); }
.banner-dots { position: absolute; left: 52px; bottom: 18px; display: flex; gap: 6px; z-index: 2; }
.banner-dots button { width: 8px; height: 8px; border-radius: var(--pill); border: 0; background: rgba(255,255,255,.45); padding: 0; cursor: pointer; transition: width .3s, background .3s; }
.banner-dots button[aria-current="true"] { width: 24px; background: #fff; }

/* 4: error page */
.err-page { display: grid; place-items: center; min-height: calc(100vh - var(--header-h) - 160px); }
.err-card { width: min(560px, 100%); background: var(--surface); border-radius: 32px; padding: 48px; display: grid; gap: 14px; text-align: center; justify-items: center; }
.err-code { font: 900 clamp(4rem, 12vw, 6.5rem)/1 var(--display); background: linear-gradient(135deg, var(--coral), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; letter-spacing: -.03em; }
.err-card h1 { font-size: var(--t24); }
.err-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.err-links { display: flex; gap: 16px; margin-top: 10px; font-weight: 700; font-size: var(--t14); }
.err-links a { color: var(--muted); }

/* 17: mobile glass tab bar */
.tabbar { display: none; }

/* 16: admin console in frosted glass */
.glass-bg { background: radial-gradient(60% 50% at 10% 0%, #E7E3FF 0%, transparent 70%), radial-gradient(50% 50% at 100% 30%, #DDE8FF 0%, transparent 70%), radial-gradient(60% 60% at 50% 100%, #FFE9E3 0%, transparent 70%), #F3F4F8; }
.glass { background: rgba(255,255,255,.58); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid rgba(255,255,255,.75); box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 10px 30px rgba(40,40,80,.06); }
.adm { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; padding: 20px; min-height: calc(100vh - var(--header-h)); }
.adm-rail { position: sticky; top: calc(var(--header-h) + 20px); align-self: start; border-radius: 26px; padding: 14px 10px; display: grid; gap: 14px; justify-items: center; width: 220px; }
.adm-logo { display: none; }
.adm-nav { display: grid; gap: 4px; width: 100%; }
.adm-nav button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; font: inherit; font-weight: 700; font-size: var(--t14); color: #3A3D4A; padding: 11px 14px; border-radius: 14px; cursor: pointer; text-align: left; position: relative; transition: background .2s, color .2s; }
.adm-nav svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.adm-nav button:hover { background: rgba(255,255,255,.7); }
.adm-nav button[aria-selected="true"] { background: #1C1B2E; color: #fff; box-shadow: 0 6px 18px rgba(106,79,224,.35); }
.adm-badge { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 900; padding: 2px 7px; border-radius: var(--pill); background: var(--coral); color: #fff; }
.adm-main { min-width: 0; display: grid; gap: 20px; align-content: start; }
.adm-top { border-radius: 26px; padding: 20px 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.adm-top h1 { font-size: var(--t24); font-weight: 900; }
.adm-sub { color: var(--muted); font-weight: 600; font-size: var(--t14); margin-top: 2px; }
.adm-top-tools { display: flex; align-items: center; gap: 10px; }
.adm-me { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: var(--t14); padding: 8px 14px; border-radius: var(--pill); background: rgba(255,255,255,.7); }
.adm-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(18,184,134,.18); }
.adm-out { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.7); display: grid; place-items: center; cursor: pointer; color: var(--ink); }
.adm-out:hover { background: var(--ink); color: #fff; }
.adm-pane { display: grid; gap: 16px; align-content: start; }
.adm-card { border-radius: 24px; padding: 22px 24px; }
.adm-card h2 { font-size: var(--t18); margin-bottom: 12px; }
.adm-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.adm-stat { display: grid; gap: 6px; transition: transform .2s; }
.adm-stat:hover { transform: translateY(-3px); }
.adm-stat b { font: 900 var(--t32)/1.1 var(--display); }
.adm-stat > span:last-child { color: var(--muted); font-weight: 700; font-size: var(--t14); }
.adm-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.adm-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.adm-ic.c1 { background: linear-gradient(135deg, #8B5CF6, #6A4FE0); } .adm-ic.c2 { background: linear-gradient(135deg, #12B886, #0E9F6E); }
.adm-ic.c3 { background: linear-gradient(135deg, #3D6BFF, #2F55D4); } .adm-ic.c4 { background: linear-gradient(135deg, #F59F00, #E67700); } .adm-ic.c5 { background: linear-gradient(135deg, #FF5B45, #E5383B); }
.adm-grid2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.adm-api, .adm-todo { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.adm-api li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid rgba(21,22,26,.06); font-size: var(--t14); font-weight: 600; }
.adm-api li:first-child { border-top: 0; }
.adm-api li .num { margin-left: auto; }
.adm-todo button { width: 100%; text-align: left; border: 0; background: rgba(255,255,255,.65); padding: 14px 16px; border-radius: 16px; font: inherit; font-weight: 700; cursor: pointer; display: flex; align-items: baseline; gap: 4px; }
.adm-todo button:hover { background: #fff; }
.adm-todo b { font-size: var(--t20); margin-right: 2px; }
.adm-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.adm-tools .input { flex: 1; min-width: 200px; background: rgba(255,255,255,.75); }
.adm-hint { margin: -6px 2px 0; }
.adm-table { border-radius: 22px; padding: 6px 10px; }
.adm-table .table th { background: transparent; }
.adm-table tr:hover td { background: rgba(255,255,255,.55); }
.adm-row-act { display: flex; gap: 6px; flex-wrap: wrap; }
.nowrap { white-space: nowrap; }
.tag-admin { background: #1C1B2E; color: #fff; }
.adm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.adm-list li { border-radius: 18px; padding: 14px 18px; }
.adm-banners { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.adm-banner { display: grid; gap: 12px; padding: 14px; }
.adm-banner img, .adm-banner-text { width: 100%; aspect-ratio: 8 / 3; object-fit: cover; border-radius: 14px; background: #1C1B2E; color: #fff; display: grid; place-items: center; font-weight: 800; }
.adm-banner-meta { display: grid; gap: 4px; }
.adm-narrow { max-width: 680px; }
.adm-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }
.empty.glass { border-radius: 22px; }

/* 19 + 20: admin sign-in */
.adm-login { min-height: calc(100vh - var(--header-h)); display: grid; place-items: center; padding: 32px 16px; }
.adm-login-card { width: min(440px, 100%); border-radius: 30px; padding: 36px 34px; display: grid; gap: 18px; }
.adm-login-badge { width: 54px; height: 54px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #8B5CF6, #3D6BFF); box-shadow: 0 10px 24px rgba(106,79,224,.35); }
.adm-login-card h1 { font-size: var(--t24); font-weight: 900; }
.adm-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.adm-steps li { flex: 1; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.6); font-weight: 800; font-size: var(--t14); color: var(--muted); }
.adm-steps li span { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); font-size: 12px; }
.adm-steps li.is-now { color: var(--ink); background: #fff; }
.adm-steps li.is-now span { background: #1C1B2E; color: #fff; }
.adm-steps li.is-done span { background: var(--mint); color: #fff; }
#al-body { display: grid; gap: 14px; }
.btn-block { width: 100%; justify-content: center; }
.adm-who { font-size: var(--t14); }
.adm-qr { justify-self: center; border-radius: 16px; background: #fff; padding: 10px; width: 200px; height: 200px; }
.adm-manual summary { cursor: pointer; font-size: var(--t14); font-weight: 700; color: var(--muted); }
.adm-manual code { display: block; margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #fff; font-size: var(--t14); word-break: break-all; letter-spacing: .06em; }
.adm-code { display: grid; gap: 8px; }
.adm-code label { font-weight: 800; font-size: var(--t14); }
.otp-input { font: 900 1.75rem/1 var(--display); letter-spacing: .5em; text-align: center; padding: 14px 10px 14px calc(10px + .5em); }
.adm-login-home { justify-self: center; font-size: var(--t14); font-weight: 700; color: var(--muted); }

@media (max-width: 1100px) {
  .adm-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .adm-rail { width: auto; }
  .adm-nav button span { display: none; }
  .adm-nav button { justify-content: center; padding: 12px; }
  .adm-badge { position: absolute; top: 2px; right: 2px; }
  .edit-layout { grid-template-columns: minmax(340px, .8fr) minmax(0, 1.2fr); }
}
@media (max-width: 960px) {
  .wrap { padding: 28px 28px 40px; }
  .banner-default { grid-template-columns: minmax(0, 1fr); }
  .banner-art { display: none; }
  .adm-grid2 { grid-template-columns: 1fr; }
  .edit-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .wrap { padding: 20px 18px calc(110px + env(safe-area-inset-bottom)); }
  .footer { padding: 28px 18px calc(120px + env(safe-area-inset-bottom)); }
  .site-header { padding: 0 16px; gap: 10px; }
  /* 12: the menu slides down instead of popping */
  .site-nav { display: flex; visibility: hidden; opacity: 0; transform: translateY(-10px) scale(.98); transform-origin: top center;
    transition: opacity .22s ease, transform .28s cubic-bezier(.2,.9,.3,1.15), visibility 0s .28s; box-shadow: 0 18px 30px rgba(21,22,26,.12); border-radius: 0 0 24px 24px; }
  .site-nav.is-open { visibility: visible; opacity: 1; transform: none; transition: opacity .22s ease, transform .28s cubic-bezier(.2,.9,.3,1.15), visibility 0s; }
  .site-nav a { opacity: 0; transform: translateY(-6px); transition: opacity .25s, transform .3s; padding: 12px 16px; font-size: var(--t16); }
  .site-nav.is-open a { opacity: 1; transform: none; }
  .site-nav.is-open a:nth-child(2) { transition-delay: .04s; } .site-nav.is-open a:nth-child(3) { transition-delay: .08s; } .site-nav.is-open a:nth-child(4) { transition-delay: .12s; }
  body.menu-open::after { content: ""; position: fixed; inset: var(--header-h) 0 0; background: rgba(21,22,26,.25); z-index: 30; animation: fade-in .2s; }
  /* 17: floating glass tab bar */
  .tabbar { display: flex; position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); justify-content: space-around; align-items: center; padding: 8px 6px;
    border-radius: 26px; background: rgba(255,255,255,.72); backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6); border: 1px solid rgba(255,255,255,.8); box-shadow: 0 12px 34px rgba(21,22,26,.16); }
  body.is-wide .tabbar, body[data-page="admin"] .tabbar { display: none; }
  .tabbar a { flex: 1; display: grid; justify-items: center; gap: 2px; padding: 6px 0; color: #5A5F70; text-decoration: none; font-size: 11px; font-weight: 800; position: relative; transition: color .2s, transform .2s; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s cubic-bezier(.2,.9,.3,1.4); }
  .tabbar a[aria-current="page"] { color: var(--ink); }
  .tabbar a[aria-current="page"] svg { transform: translateY(-2px); }
  .tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: -9px; left: 50%; width: 26px; height: 4px; margin-left: -13px; border-radius: 0 0 4px 4px; background: var(--coral); box-shadow: 0 4px 14px rgba(255,91,69,.7); }
  .tabbar a:active { transform: scale(.9); }
  .tabbar .tab-make { color: #fff; }
  .tabbar .tab-make svg { width: 46px; height: 46px; padding: 12px; margin-top: -24px; border-radius: 50%; background: var(--ink); stroke-width: 2.6; box-shadow: 0 8px 20px rgba(21,22,26,.3), 0 0 0 5px rgba(255,255,255,.8); }
  .tabbar .tab-make span { color: var(--ink); }
  /* 1: route sheet. Tap a stop and it covers the map; drag the handle */
  .side { overflow-y: auto; overscroll-behavior: contain; transition: height .3s cubic-bezier(.2,.9,.3,1); padding-bottom: env(safe-area-inset-bottom); }
  .side.is-dragging { transition: none; }
  .side[data-sheet="full"] { height: calc(100% - 56px); }
  .sheet-handle { position: sticky; top: 0; z-index: 2; width: 100%; background: var(--surface); padding: 12px 0 8px; touch-action: none; }
  .route-page { grid-template-columns: 1fr; }
  .banner { border-radius: 26px; }
  .banner-default { padding: 30px 24px 40px; }
  .banner-slide { min-height: 300px; }
  .banner-admin .banner-copy { padding: 24px; }
  .banner-dots { left: 24px; }
  .hero-main { padding: 24px; } .hero-clock { padding: 20px 24px; }
  .tile { padding: 22px; }
  .post-card { padding: 24px 20px; }
  .edit-form { padding: 22px 18px; }
  .err-card { padding: 36px 22px; }
  .adm { grid-template-columns: 1fr; padding: 12px; gap: 12px; }
  .adm-rail { position: static; width: 100%; padding: 8px; }
  .adm-nav { display: flex; overflow-x: auto; gap: 4px; }
  .adm-nav button { flex: none; width: auto; }
  .adm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-top { padding: 16px 18px; }
  .adm-2col { grid-template-columns: 1fr; }
  .footer-notice { padding: 14px 16px; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* Korean line breaks between words, never inside one */
body { word-break: keep-all; overflow-wrap: anywhere; }

@media (max-width: 720px) { .side > * { flex-shrink: 0; } }
.leg-label { font-size: 10px; padding: 2px 7px; }

/* the hidden attribute always wins over component display rules (.btn is inline-flex) */
[hidden] { display: none !important; }

/* owner + staff */
.tag-owner { background: linear-gradient(135deg, #8B5CF6, #3D6BFF); color: #fff; }
.staff-list { display: grid; gap: 14px; }
.staff-card { display: grid; gap: 14px; }
.staff-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.perm-grid { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.perm { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--pill); background: rgba(255,255,255,.7); border: 1.5px solid var(--line); font-size: var(--t14); font-weight: 700; cursor: pointer; }
.perm:has(input:checked) { border-color: #1C1B2E; background: #fff; }
.perm input { accent-color: #1C1B2E; }
.perm:has(input:disabled) { opacity: .7; cursor: default; }

/* =================== v5: sharing, my page, tools, admin layout, international UX =================== */
/* research: readable contrast for white text on coral, 44px touch targets, globe + native language names */
:root { --coral-ink: #D2391F; }
.btn-accent { background: var(--coral-ink); border-color: var(--coral-ink); }
.lang-switch { align-items: center; gap: 2px; padding: 3px 3px 3px 9px; }
.lang-switch .globe { color: var(--muted); flex: none; }
@media (pointer: coarse) { .btn, .chip, .day-tab, .icon-btn, .lang-switch button, .perm { min-height: 44px; } .icon-btn { min-width: 44px; } }
a.who-btn { text-decoration: none; }
a.who-btn[aria-current="page"] { background: var(--sunk); }

/* admin: own layout without the user site header */
.admin-body { background: #F3F4F8; }
.admin-body .adm { min-height: 100vh; }
.admin-body .adm-rail { top: 20px; }
.admin-body .adm-logo { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 4px; }
.admin-body .adm-login { min-height: 100vh; }

/* route sharing */
.members { padding: 0 20px 12px; display: grid; gap: 8px; }
.member-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.member { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: var(--pill); background: var(--sunk); font-size: var(--t14); font-weight: 700; }
.member small { color: var(--muted); font-weight: 700; font-size: 11px; }
.member-av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font-size: 12px; font-weight: 900; }
.member .icon-btn { width: 26px; height: 26px; min-height: 0; border: 0; background: #fff; border-radius: 50%; cursor: pointer; }
.invite-link { display: flex; gap: 8px; }
.invite-link .input { flex: 1; font-size: var(--t14); }
.join-card { padding: 40px; display: grid; gap: 14px; justify-items: start; }
.join-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: #E7EEFF; color: var(--blue); }
.join-kicker { font-weight: 800; color: var(--blue); }
#join-body { display: grid; gap: 12px; }
.tag-shared { position: absolute; top: 12px; right: 12px; background: var(--ink); color: #fff; }
.route-card { position: relative; }
#save[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); }

/* my page */
.me-page { display: grid; gap: 20px; }
.me-hero { padding: 32px 36px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; }
.me-id { display: flex; gap: 20px; align-items: flex-start; }
.me-av { width: 84px; height: 84px; border-radius: 28px; object-fit: cover; flex: none; }
.me-av-txt { display: grid; place-items: center; background: var(--coral); color: #fff; font: 900 2rem/1 var(--display); }
.me-id h1 { font-size: var(--t32); font-weight: 900; }
.me-meta { color: var(--muted); font-weight: 700; margin: 4px 0 10px; }
.me-bio { max-width: 640px; line-height: 1.7; }
.me-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip-tag { padding: 5px 12px; border-radius: var(--pill); background: #FFF1DB; color: #7A4B00; font-size: var(--t12); font-weight: 800; }
.chip-tag.chip-lang { background: #E7EEFF; color: #2945B8; }
.me-side { display: grid; gap: 12px; justify-items: end; }
.me-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dday { display: grid; justify-items: end; gap: 2px; padding: 14px 20px; border-radius: 20px; background: var(--ink); color: #fff; border: 0; font: inherit; }
.dday b { font: 900 var(--t32)/1 var(--display); color: var(--yellow); }
.dday span { font-size: var(--t12); font-weight: 700; color: #C9CBD3; }
.dday-empty { background: var(--sunk); color: var(--ink); font-weight: 800; cursor: pointer; }
.me-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.me-stat { background: var(--surface); border-radius: 20px; padding: 18px 20px; display: grid; gap: 4px; }
.me-stat b { font: 900 var(--t24)/1.1 var(--display); }
.me-stat span { color: var(--muted); font-weight: 700; font-size: var(--t14); }
.me-tabs { display: flex; gap: 6px; overflow-x: auto; }
.me-tabs button { border: 1.5px solid var(--line); background: var(--surface); padding: 10px 18px; border-radius: var(--pill); font: inherit; font-weight: 800; cursor: pointer; white-space: nowrap; color: var(--ink); }
.me-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.me-posts { list-style: none; margin: 0; padding: 8px 24px; }
.me-posts li { display: grid; gap: 6px; padding: 16px 0; border-top: 1px solid var(--line); }
.me-posts li:first-child { border-top: 0; }
.me-posts a { color: var(--ink); text-decoration: none; }
.me-form { padding: 32px; max-width: 860px; }
.me-form fieldset { border: 0; padding: 0; margin: 0; }
.me-form legend { font-weight: 800; font-size: var(--t14); margin-bottom: 8px; }
.me-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.me-h2 { font-size: var(--t20); }

/* tools */
.tools-head { margin-bottom: 20px; }
.tools-head h1 { font-size: var(--t32); font-weight: 900; }
.tools-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tool { padding: 28px; display: grid; gap: 14px; align-content: start; }
.tool-wide { grid-column: 1 / -1; }
.tool-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fx-calc { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.fx-calc .input { font: 800 var(--t24)/1 var(--display); }
.fx-calc select { border: 0; background: none; font: inherit; font-weight: 800; }
.fx-eq { font-size: var(--t24); color: var(--muted); padding-bottom: 12px; }
.fx-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.tax-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.tax-list li { font-weight: 700; }
.tax-list .yes b { color: var(--ok); } .tax-list .no b { color: var(--warn); }
.phrases { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.phrase { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 18px; background: #F8F9FC; }
.phrase > div:first-child { display: grid; gap: 2px; }
.phrase b { font-size: var(--t18); }
.roman { font-size: var(--t14); font-weight: 700; color: var(--blue); }
.phrase-act { display: flex; gap: 6px; align-items: center; }
.phrase .icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; cursor: pointer; }

@media (max-width: 720px) {
  .me-hero { grid-template-columns: 1fr; padding: 22px; }
  .me-side { justify-items: start; }
  .me-id { flex-direction: column; }
  .me-2col, .tools-grid, .fx-calc { grid-template-columns: 1fr; }
  .fx-eq { display: none; }
  .join-card { padding: 26px 20px; }
  .tool { padding: 22px 18px; }
}

/* =================== v6: feedback round 6 =================== */
/* 1: calendar picker */
.date-btn { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.date-btn:hover { border-color: var(--ink); }
.date-btn svg { color: var(--blue); flex: none; }
.date-clear { margin-left: auto; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--sunk); color: var(--muted); font-size: 16px; }
.cal-pop { position: absolute; z-index: 70; top: calc(100% + 6px); left: 0; width: 320px; padding: 14px; border-radius: 22px; background: var(--surface); box-shadow: 0 18px 40px rgba(21,22,26,.18); border: 1px solid var(--line); animation: pop-in .18s ease; }
.cal-pop.is-sheet { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; border-radius: 26px 26px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-head b { font-size: var(--t16); font-weight: 900; }
.cal-nav { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--sunk); font-size: 20px; cursor: pointer; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-dow span { font-size: 11px; font-weight: 800; color: var(--muted); padding: 6px 0; }
.cal-day { aspect-ratio: 1; border: 0; background: none; border-radius: 12px; font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); }
.cal-day:hover { background: var(--sunk); }
.cal-day.is-today { box-shadow: inset 0 0 0 1.5px var(--blue); }
.cal-day.in-range { background: #E7EEFF; border-radius: 0; }
.cal-day.is-edge, .cal-day.is-sel { background: var(--blue); color: #fff; }
.cal-day.is-off { color: #C4C8D2; cursor: not-allowed; background: none; }
.cal-foot { display: flex; justify-content: space-between; margin-top: 10px; }

/* 2: D-day card and its two buttons share one width */
.me-side { width: 300px; justify-items: stretch; }
.me-side .dday { justify-items: start; width: 100%; }
.me-side .dday-empty { justify-items: center; text-align: center; padding: 18px; }
.me-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.me-actions .btn { justify-content: center; width: 100%; padding-left: 8px; padding-right: 8px; }

/* 4: route actions: same size buttons, nothing moves when the language changes */
.route-actions { display: grid; gap: 8px; }
.ra-main { width: 100%; justify-content: center; min-height: 48px; }
.ra-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ra-btn { display: grid; justify-items: center; align-content: center; gap: 4px; height: 66px; padding: 6px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; min-width: 0; transition: border-color .2s, background .2s; }
.ra-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ra-btn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ra-btn:hover { border-color: var(--ink); }
.ra-btn[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); }
.ra-btn[aria-pressed="true"] svg { fill: currentColor; }
.ra-del { justify-self: end; border: 0; background: none; color: var(--warn); font: inherit; font-size: var(--t12); font-weight: 700; cursor: pointer; padding: 4px; text-decoration: underline; text-underline-offset: 3px; }

/* 5: post badges with colour */
.type-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: var(--pill); font-size: var(--t14); font-weight: 900; color: #fff; background: var(--ink); }
.type-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.85); }
.type-pill.type-q { background: #3D6BFF; } .type-pill.type-tip { background: #0E9F6E; } .type-pill.type-report { background: #E5383B; } .type-pill.type-review { background: #7C4DFF; }
.cat-chip { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: var(--pill); font-size: var(--t14); font-weight: 800; text-decoration: none;
  color: hsl(var(--hue) 60% 30%); background: hsl(var(--hue) 85% 93%); border: 1.5px solid hsl(var(--hue) 60% 82%); }
.cat-chip:hover { border-color: hsl(var(--hue) 60% 45%); }
#p-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
#p-meta .tag { padding: 6px 12px; font-size: var(--t12); }
.post-card h1 { font-size: var(--t32) !important; font-weight: 900; line-height: 1.25; }

/* 6: comments and replies */
.comment { padding: 16px 0; border-top: 1px solid var(--line); list-style: none; }
#comments { padding: 0; margin: 0; }
#comments > .comment:first-child { border-top: 0; }
.c-row { display: flex; gap: 12px; }
.c-av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--sunk); font-weight: 900; font-size: var(--t14); }
.c-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.c-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: var(--t14); }
.c-head a { color: var(--ink); text-decoration: none; }
.c-edited { font-size: 11px; font-weight: 800; color: var(--muted); background: var(--sunk); padding: 2px 8px; border-radius: var(--pill); }
.c-text { white-space: pre-wrap; line-height: 1.7; }
.c-acts { display: flex; gap: 12px; }
.c-acts button { border: 0; background: none; padding: 4px 0; font: inherit; font-size: var(--t12); font-weight: 800; color: var(--muted); cursor: pointer; }
.c-acts button:hover { color: var(--ink); }
.c-acts [data-del]:hover { color: var(--warn); }
.replies { list-style: none; margin: 10px 0 0 46px; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 12px; }
.replies .c-av { width: 28px; height: 28px; font-size: 12px; }
.c-edit { display: grid; gap: 8px; }
.c-edit textarea { min-height: 80px; }
.c-btns { display: flex; gap: 6px; justify-content: flex-end; }
.is-deleted { opacity: .7; }

/* 7: post page with a side column */
.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; max-width: 1240px; }
.post-main { min-width: 0; }
.post-aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
.aside-box { padding: 22px; }
.aside-box h2 { font-size: var(--t16); font-weight: 900; margin-bottom: 8px; }
.aside-list { list-style: none; margin: 0; padding: 0; display: grid; }
.aside-list a { display: grid; grid-template-columns: 10px minmax(0, 1fr); column-gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.aside-list li:first-child a { border-top: 0; }
.aside-list a:hover .aside-t { text-decoration: underline; }
.type-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--ink); grid-row: span 2; }
.type-dot.type-q { background: #3D6BFF; } .type-dot.type-tip { background: #0E9F6E; } .type-dot.type-report { background: #E5383B; } .type-dot.type-review { background: #7C4DFF; }
.aside-t { font-weight: 800; font-size: var(--t14); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aside-m { font-size: var(--t12); color: var(--muted); font-weight: 700; }
.nav-extra { display: none; }

@media (max-width: 960px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); }
  .post-aside { position: static; }
}
@media (max-width: 720px) {
  /* 3: phone header = logo + avatar + menu. Language and sign-out move into the menu */
  .site-header .header-tools .lang-switch, .site-header .header-tools .logout-btn { display: none; }
  .site-header { justify-content: space-between; }
  .site-header .menu-btn { order: 3; }
  .header-tools { margin-left: auto; }
  .nav-extra { display: grid; gap: 4px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
  .nav-extra .lang-switch { justify-self: start; margin: 4px 0 6px 12px; }
  .nav-extra a { padding: 12px 16px; font-weight: 700; color: var(--ink); text-decoration: none; border-radius: 14px; }
  .nav-extra .nav-out { color: var(--warn); }
  .me-side { width: 100%; }
  .replies { margin-left: 18px; }
  .post-card h1 { font-size: var(--t24) !important; }
}

/* route page: the whole side panel scrolls (title, buttons, detail and the full stop list), not just the list */
@media (min-width: 721px) {
  .route-page { overflow: hidden; }
  .side { overflow-y: auto; overscroll-behavior: contain; }
  .side .side-scroll { overflow: visible; flex: none; }
  .side .stop-detail { max-height: none; overflow: visible; }
  .stops { padding-bottom: 28px; }
}

/* home: alerts list (emergency texts + weather warnings) */
.alert-list { list-style: none; margin: 8px 0 6px; padding: 0; display: grid; gap: 10px; }
.alert-list li { display: grid; gap: 3px; }
.alert-lvl { justify-self: start; padding: 2px 9px; border-radius: var(--pill); font-size: 11px; font-weight: 900; color: #fff; background: var(--warn); }
.alert-lvl.lvl-warning { background: #C77700; }
.alert-list b { font-size: var(--t14); line-height: 1.5; }

/* ad slots: after the content, clear space around (never touching buttons or links), small "AD" label, empty ones fold away */
.ad-slot { display: grid; justify-items: center; gap: 4px; margin: 36px auto 8px; padding: 12px 0; max-width: 100%; overflow: hidden; }
.ad-slot[hidden] { display: none !important; }
.ad-label { font-size: 10px; font-weight: 800; letter-spacing: .08em; color: var(--muted); }
.ad-slot ins { max-width: 100%; }
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) { display: none !important; }
.post-aside .ad-slot { margin: 20px 0 0; padding: 0; }

/* home weather tile without a forecast: month guide */
.wx-list li.wx-guide { display: grid !important; grid-template-columns: minmax(0, 1fr) !important; grid-template-areas: none !important; gap: 8px; padding: 6px 0 !important; justify-items: start; }
.wx-month { font: 900 var(--t24)/1.2 var(--display); }
.wx-guide-text { font-weight: 700; line-height: 1.6; }
.wx-wear { font-size: var(--t14); }
.wx-wear b { margin-right: 6px; padding: 2px 8px; border-radius: var(--pill); background: rgba(255,255,255,.2); }

/* ---------- festivals & events ---------- */
.seg { display: inline-flex; background: var(--sunk); border-radius: var(--pill); padding: 4px; gap: 2px; }
.seg button { border: 0; background: none; font: inherit; font-weight: 800; font-size: var(--t14); color: var(--muted); padding: 8px 18px; border-radius: var(--pill); cursor: pointer; min-height: 36px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.fest-page { display: grid; gap: 16px; }
.fest-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.fest-head h1 { margin: 0 0 4px; font: 900 var(--t32)/1.15 var(--display); }
.fest-head p { margin: 0; }
.fest-filters { padding: 16px; display: grid; gap: 12px; }
.fest-search { display: grid; grid-template-columns: minmax(0, 1fr) 180px; gap: 8px; }
.fest-cats .chip { display: inline-flex; gap: 6px; align-items: center; }
.fest-cats .chip[aria-pressed="true"] .muted { color: #C9CBD3; }
.fest-cats .chip:disabled { opacity: .4; cursor: default; }
.fest-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fest-month { display: flex; align-items: center; gap: 8px; }
.fest-month h2 { margin: 0 6px; font: 900 var(--t24)/1 var(--display); min-width: 8ch; text-align: center; }
.fest-month .icon-btn:disabled { opacity: .35; cursor: default; }

.fest-cal { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; align-items: start; }
.cal-wrap { padding: 16px; }
.cal-week, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-week span { text-align: center; font-size: var(--t12); font-weight: 800; color: var(--muted); padding: 4px 0 8px; }
.cal-week span:first-child { color: var(--coral); }
.cal-cell { position: relative; min-height: 104px; padding: 8px; border: 1.5px solid transparent; border-radius: 14px; text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  display: flex; flex-direction: column; gap: 4px; background: color-mix(in srgb, var(--lilac) calc(var(--heat, 0) * 100%), var(--sunk)); }
.cal-cell:hover { border-color: var(--line); }
.cal-cell[aria-pressed="true"] { border-color: var(--ink); background: var(--surface); box-shadow: 0 0 0 2px var(--ink) inset; }
.cal-cell.is-pad { background: none; cursor: default; }
.cal-cell.is-past { opacity: .55; }
.cal-day { font-weight: 800; font-size: var(--t14); }
.cal-cell.is-today .cal-day { background: var(--coral); color: #fff; border-radius: var(--pill); width: 26px; height: 26px; display: grid; place-items: center; margin: -3px 0 0 -3px; }
.cal-n { position: absolute; top: 8px; right: 8px; font: 900 var(--t14)/1 var(--display); color: var(--lilac-ink); }
.cal-legend .cal-n { position: static; }
.cal-new { display: grid; gap: 2px; margin-top: auto; }
.cal-new i { font-style: normal; font-size: 11px; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-left: 9px; position: relative; }
.cal-new i::before, .cal-dot { content: ""; position: absolute; left: 0; top: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }
.cal-new i.more { color: var(--muted); }
.cal-dot { position: relative; display: inline-block; top: -1px; left: 0; }
.cal-legend { margin: 12px 0 0; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.day-panel { padding: 18px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
.day-panel h2 { margin: 0 0 8px; }
.fest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fest-card { width: 100%; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; text-align: left; padding: 10px; border: 1.5px solid var(--line);
  border-radius: 16px; background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; transition: border-color .15s, transform .15s; }
.fest-card:hover { border-color: var(--ink); transform: translateY(-1px); }
.fest-card img, .fest-noimg { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; background: var(--lilac); }
.fest-noimg { display: grid; place-items: center; font: 900 var(--t24)/1 var(--display); color: var(--lilac-ink); }
.fest-card-body { display: grid; gap: 4px; min-width: 0; }
.fest-card-body b { font-size: var(--t14); line-height: 1.4; }
.fest-card-top { display: flex; gap: 4px; flex-wrap: wrap; }
.fest-card .meta { margin: 0; }
.fest-tags, .fest-detail-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.fest-tag { font-size: 11px; font-weight: 750; padding: 2px 8px; border-radius: var(--pill); background: var(--lilac); color: var(--lilac-ink); }
.tag-on { background: #D7F5EA; color: #087F5B; }
.tag-soon { background: #E3EAFF; color: var(--blue); }
.tag-new { background: #FFE4DF; color: #C2321F; }
.tag-last { background: #FFF3C4; color: #8A6400; }
.fest-more { margin-top: 12px; width: 100%; }
.fest-lists { padding: 18px; display: grid; gap: 22px; }
.fest-group h3 { margin: 0 0 10px; font-size: var(--t16); position: sticky; top: 64px; background: var(--surface); padding: 6px 0; z-index: 1; }
.fest-group .fest-list { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.fest-src { margin: 0; }

dialog.fest-dlg { width: min(620px, calc(100vw - 24px)); }
dialog.fest-dlg .dialog-body { max-height: min(72vh, 760px); overflow-y: auto; }
.fest-detail { display: grid; gap: 14px; }
.fest-hero { width: 100%; max-height: 260px; object-fit: cover; border-radius: 18px; background: var(--sunk); }
.fest-cta { display: flex; gap: 8px; flex-wrap: wrap; }
.fest-cta .btn { flex: 1 1 200px; }
.fest-facts { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 6px 12px; margin: 0; font-size: var(--t14); }
.fest-facts dt { font-weight: 800; color: var(--muted); }
.fest-facts dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.fest-overview { margin: 0; font-size: var(--t14); line-height: 1.7; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 8; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.fest-overview.is-open { display: block; }

/* home: today tile and the warning line in the weather tile */
.t-today .tile-head h2 { margin: 0; }
.today-n { margin: 4px 0 6px; font-weight: 700; }
.today-n b { font: 900 var(--t32)/1 var(--display); color: var(--coral); margin-right: 2px; }
.today-list a.row { padding: 8px 0; }
.today-list h3 { font-size: var(--t14); }
.wx-warn { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--t12); font-weight: 700; }
.wx-warn a { color: #fff; }
.warn-chip { background: var(--coral); color: #fff; padding: 3px 10px; border-radius: var(--pill); }
.warn-none { opacity: .85; }

@media (max-width: 960px) {
  .fest-cal { grid-template-columns: minmax(0, 1fr); }
  .day-panel { position: static; max-height: none; }
}
@media (max-width: 720px) {
  .fest-head h1 { font-size: var(--t24); }
  .fest-search { grid-template-columns: minmax(0, 1fr); }
  .fest-cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
  .fest-cats .chip { flex: none; }
  .cal-wrap { padding: 10px; }
  .cal-week, .cal-grid { gap: 3px; }
  .cal-cell { min-height: 54px; padding: 5px; border-radius: 10px; align-items: center; }
  .cal-n { position: static; font-size: var(--t12); }
  .cal-new { margin: 0; } .cal-new i { display: none; }
  .cal-new:not(:empty)::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--coral); }
  .cal-cell.is-today .cal-day { margin: 0; width: 22px; height: 22px; }
  .fest-group .fest-list { grid-template-columns: minmax(0, 1fr); }
  .fest-group h3 { top: 56px; }
}
.day-panel, .fest-group { scroll-margin-top: 76px; }

/* festival cards: one fixed size everywhere; long names shrink a little and stop at two lines */
.fest-card { height: 128px; grid-template-columns: 104px minmax(0, 1fr); padding: 11px; overflow: hidden; }
.fest-card img, .fest-card .fest-noimg { width: 104px; height: 104px; object-fit: cover; object-position: center; display: block; }
.fest-card-body { align-content: start; gap: 3px; height: 104px; overflow: hidden; }
.fest-card-top { flex-wrap: nowrap; overflow: hidden; }
.fest-card-body b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; min-height: 2.7em; word-break: keep-all; overflow-wrap: anywhere; }
.fest-card-body b.is-long { font-size: var(--t12); line-height: 1.4; }
.fest-card .meta { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.fest-card .meta span:last-child { overflow: hidden; text-overflow: ellipsis; }
.fest-tags { flex-wrap: nowrap; overflow: hidden; }
.fest-tag { white-space: nowrap; }
.fest-hero { aspect-ratio: 16 / 9; height: auto; max-height: 300px; object-fit: cover; }

/* calendar count: a labelled pill ("14건" / "14 events") explained by the legend above the grid */
.cal-n { top: 7px; right: 7px; padding: 2px 8px; border-radius: var(--pill); background: var(--surface); color: var(--lilac-ink); font: 900 var(--t12)/1.4 var(--display); }
.cal-n small { font-size: 11px; font-weight: 800; margin-left: 1px; }
:lang(en) .cal-n small { margin-left: 3px; }
.cal-legend { margin: 0 0 12px; display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; font-size: var(--t12); font-weight: 700; color: var(--muted); }
.cal-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .cal-n { position: static; border: 1.5px solid var(--lilac); }
@media (max-width: 720px) {
  .fest-card { height: 112px; grid-template-columns: 88px minmax(0, 1fr); }
  .fest-card img, .fest-card .fest-noimg { width: 88px; height: 88px; }
  .fest-card-body { height: 88px; }
  .fest-tags { display: none; }
  .cal-n { padding: 1px 5px; font-size: 11px; }
  :lang(en) .cal-n small { display: none; }
}
.fest-card .fest-noimg { display: grid; place-items: center; }
.cal-n { white-space: nowrap; }
@media (max-width: 720px) { .cal-n { padding: 1px 4px; letter-spacing: -.02em; } }

/* ---------- header: sub menus on hover / keyboard focus ---------- */
.nav-group { position: relative; display: flex; }
.site-nav .nav-group > a { display: inline-flex; align-items: center; gap: 6px; }
.nav-caret { opacity: .5; transition: transform .2s; }
.nav-group:hover .nav-caret, .nav-group:focus-within .nav-caret { transform: rotate(180deg); }
.nav-sub { position: absolute; top: calc(100% + 10px); left: 50%; translate: -50% 0; min-width: 270px; padding: 8px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 18px 44px rgba(21, 22, 26, .14); display: grid; gap: 2px; z-index: 60;
  opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .16s, transform .2s, visibility 0s .2s; }
.nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* keeps hover alive across the gap */
.nav-group:hover .nav-sub, .nav-group:focus-within .nav-sub { opacity: 1; visibility: visible; transform: none; transition: opacity .16s, transform .2s; }
.site-nav .nav-sub a { display: grid; gap: 2px; padding: 10px 14px; border-radius: 12px; background: none; color: var(--ink); white-space: nowrap; }
.site-nav .nav-sub a:hover, .site-nav .nav-sub a:focus-visible { background: var(--sunk); transform: none; }
.nav-sub b { font-size: var(--t14); font-weight: 800; }
.nav-sub span { font-size: var(--t12); color: var(--muted); font-weight: 600; }
@media (max-width: 720px) {
  .nav-group { display: grid; }
  .nav-caret { display: none; }
  .nav-sub { position: static; translate: none; min-width: 0; padding: 0 0 6px 12px; border: 0; box-shadow: none; background: none; opacity: 1; visibility: visible; transform: none; transition: none; }
  .nav-sub::before { display: none; }
  .site-nav .nav-sub a { padding: 8px 14px; font-size: var(--t14); }
  .nav-sub span { display: none; }
}

/* header bell */
.bell { position: relative; }
.bell-btn { position: relative; }
.bell-n { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--coral); color: #fff; font: 800 11px/18px var(--font); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--surface); }
.bell-pop { position: absolute; right: 0; top: calc(100% + 10px); width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 44px rgba(21, 22, 26, .16); padding: 8px; z-index: 70; }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; }
.bell-head a { font-size: var(--t12); font-weight: 800; }
.bell-item { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; position: relative; }
.bell-item:hover { background: var(--sunk); }
.bell-item.is-new { background: #FFF1EE; }
.bell-item.is-new::after { content: ""; position: absolute; top: 14px; right: 12px; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); }
.bell-item b { font-size: var(--t14); padding-right: 14px; }
.bell-item span { font-size: var(--t12); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bell-item time { font-size: 11px; color: var(--muted); }
.bell-empty { padding: 18px 10px; text-align: center; color: var(--muted); font-size: var(--t14); }
@media (max-width: 720px) { .bell-pop { position: fixed; top: calc(var(--header-h) + 6px); right: 12px; left: 12px; width: auto; } }

/* guide / works / tools share tabs */
.guide-page, .tools-page { grid-template-columns: minmax(0, 1fr); }
.sub-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.sub-tabs a { flex: none; padding: 9px 16px; border-radius: var(--pill); background: var(--surface); border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 800; font-size: var(--t14); }
.sub-tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tools-page > .sub-tabs { margin-bottom: 16px; }
.works-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px; color: var(--ink); text-decoration: none; background: var(--yellow); }
.works-cta > span:first-child { display: grid; gap: 2px; }
.works-cta b { font: 900 var(--t20)/1.3 var(--display); }
#works > h1 { margin-bottom: 4px; }
#works > .muted { margin: 0 0 16px; }
#svc-q { max-width: 240px; }
@media (max-width: 720px) {
  .works-cta { flex-direction: column; align-items: flex-start; padding: 18px; }
  #svc-q { max-width: none; }
  /* the 7-column table becomes one card per service */
  .works-table thead { display: none; }
  .works-table, .works-table tbody { display: block; }
  .works-table tr.clickable { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; padding: 14px 4px; border-top: 1px solid var(--line); }
  .works-table tr.clickable td { padding: 0; border: 0; min-width: 0; }
  .works-table tr.clickable td:first-child { grid-column: 1 / -1; font-size: var(--t16); }
  .works-table td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 800; color: var(--muted); margin-bottom: 2px; }
  .works-table tr[data-detail] { display: block; }
  .works-table tr[data-detail] td { display: block; padding: 12px; border-radius: 12px; }
}

/* community: polls */
.type-pill.type-poll { background: #F08C00; } .type-poll { color: #C77700; } .sticker.type-poll { background: #FFE8CC; } .type-dot.type-poll { background: #F08C00; }
.poll-box { margin: 18px 0 6px; display: grid; gap: 8px; }
.poll { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.poll-opt { position: relative; width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--surface); font: inherit; color: var(--ink); cursor: pointer; overflow: hidden; text-align: left; isolation: isolate; }
.poll-opt::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--pct); background: var(--sunk); z-index: -1; transition: width .5s cubic-bezier(.2,.9,.3,1); }
.poll-opt:hover { border-color: var(--ink); }
.poll-opt.is-top::before { background: #FFE8CC; }
.poll-opt.is-mine { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink) inset; }
.poll-label { font-weight: 800; display: inline-flex; align-items: center; gap: 8px; }
.poll-check { width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 12px; }
.poll-n { font-weight: 900; white-space: nowrap; }
.poll-n small { font-weight: 700; color: var(--muted); margin-left: 4px; }
.poll-edit { border: 0; padding: 0; margin: 0; }
.poll-edit ol { margin: 6px 0; padding: 0; list-style: none; display: grid; gap: 6px; counter-reset: opt; }
.poll-edit li { display: grid; grid-template-columns: 24px minmax(0, 1fr) 36px; align-items: center; gap: 8px; counter-increment: opt; }
.poll-edit li::before { content: counter(opt); font-weight: 900; color: var(--muted); text-align: center; }
.poll-edit .btn { justify-self: start; }
.c-row:target { background: #FFF6D6; border-radius: 14px; box-shadow: 0 0 0 8px #FFF6D6; }

/* inbox */
.inbox-page { display: grid; gap: 16px; }
.inbox-note { margin: 0; padding: 12px 16px; border-radius: 14px; background: #FFF6D6; font-size: var(--t14); font-weight: 650; }
.inbox-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; align-items: start; }
.inbox-list { padding: 10px; }
.inbox-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.inq-row { width: 100%; display: grid; gap: 4px; text-align: left; padding: 12px; border-radius: 14px; border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; }
.inq-row:hover { background: var(--sunk); }
.inq-row[aria-current="true"] { background: var(--ink); color: #fff; }
.inq-row[aria-current="true"] .muted { color: #C9CBD3; }
.inq-top { display: flex; gap: 8px; align-items: center; }
.inq-open { background: #FFE4DF; color: #C2321F; } .inq-answered { background: #D7F5EA; color: #087F5B; } .inq-closed { background: var(--sunk); color: var(--muted); }
.inbox-thread { padding: 22px; min-height: 320px; display: grid; gap: 14px; align-content: start; }
.inq-head { display: grid; gap: 6px; justify-items: start; }
.inq-head h2 { margin: 0; font-size: var(--t20); }
.inq-msgs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.inq-msg { max-width: 85%; padding: 12px 14px; border-radius: 16px; display: grid; gap: 4px; }
.inq-msg p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: var(--t14); line-height: 1.6; }
.inq-msg.is-me { justify-self: end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.inq-msg.is-me .inq-who { color: #C9CBD3; }
.inq-msg.is-staff { justify-self: start; background: var(--lilac); border-bottom-left-radius: 4px; }
.inq-who { font-size: 11px; font-weight: 800; color: var(--muted); }
.inq-reply { display: grid; gap: 8px; }
.inq-reply textarea { min-height: 90px; }
.inq-reply .btn { justify-self: end; }
.inq-notice { margin: 0; padding-left: 18px; display: grid; gap: 8px; font-size: var(--t14); line-height: 1.6; }
@media (max-width: 960px) { .inbox-grid { grid-template-columns: minmax(0, 1fr); } }

/* checklist: own items */
.ck-add { display: flex; gap: 6px; margin-top: 10px; }
.ck-add .input { min-height: 38px; font-size: var(--t14); }
.checklist li.ck-own { grid-template-columns: 24px 1fr 28px; }
.ck-del { width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.ck-del:hover { background: var(--sunk); color: var(--warn); }

/* festivals without a picture: the logo */
.fest-noimg svg { width: 62%; height: 62%; }
.fest-noimg { background: #FFF1EE !important; }
.type-pill.type-poll { color: #fff; }

/* ---------- logo: pocket + "p(pin)cket korea" ---------- */
.pk-logo { display: inline-flex; align-items: center; gap: 7px; }
.pk-pocket { width: 30px; height: 21px; flex: none; position: relative; z-index: 2; transform-origin: 50% 100%; overflow: visible; }
.pk-word { display: inline-flex; align-items: baseline; font: 900 23px/1 var(--display); letter-spacing: -.02em; color: var(--ink); position: relative; z-index: 1; }
.pk-o { display: inline-block; width: .56em; height: .76em; margin: 0 .035em 0 .02em; transform: translateY(.06em); }
.pk-o svg { width: 100%; height: 100%; display: block; transform-origin: 50% 45%; overflow: visible; }
.pk-korea { color: var(--coral); margin-left: .26em; font-weight: 900; }
.pk-p, .pk-rest, .pk-korea { display: inline-block; }
/* before core.js runs on the home page: the word waits, the pin waits in the pocket (shown anyway after 1.5 s if scripts fail) */
.pk-intro .pk-p, .pk-intro .pk-rest, .pk-intro .pk-korea, .pk-intro .pk-o svg { opacity: 0; animation: pk-show 0s 1.5s forwards; }
@keyframes pk-show { to { opacity: 1; } }
@media (max-width: 720px) { .pk-word { font-size: 20px; } .pk-pocket { width: 26px; height: 18px; } }
.adm-logo svg { width: 34px; height: 34px; }

/* ---------- avatars (sticker or first letter) ---------- */
.av-sticker { color: inherit; font-size: 1.15em; }
.me-av.av-sticker { font-size: 2.6rem; }
.who-initial.av-sticker { font-size: 15px; }
.member-av.av-sticker { font-size: 14px; }

/* ---------- profile editor: form left, live preview right ---------- */
.me-edit { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.me-form { padding: 6px 24px 22px; display: grid; }
.me-sec { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 12px; }
.me-sec:last-of-type { border-bottom: 0; }
.me-sec h2 { margin: 0; font-size: var(--t16); }
.me-sec > .xs { margin: -6px 0 0; }
.nick-row { display: flex; gap: 10px; align-items: center; }
.nick-row .input { max-width: 280px; }
.nick-state { font-size: var(--t12); font-weight: 800; color: var(--muted); }
.nick-state.ok { color: var(--ok); } .nick-state.bad { color: var(--warn); }
.av-grid { display: grid; grid-template-columns: repeat(auto-fill, 52px); gap: 8px; }
.av-pick { position: relative; cursor: pointer; }
.av-pick input { position: absolute; opacity: 0; }
.av-opt { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; font: 900 20px/1 var(--display); color: #fff; border: 2px solid transparent; transition: transform .15s; }
.av-opt.av-sticker { font-size: 26px; }
.av-pick:hover .av-opt { transform: translateY(-2px); }
.av-pick input:checked + span .av-opt { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface) inset; }
.av-pick input:focus-visible + span .av-opt { outline: 3px solid var(--blue); outline-offset: 2px; }
.pick-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--pill); border: 1.5px solid var(--line); font-size: var(--t14); font-weight: 700; background: var(--surface); }
.pick input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.pick input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.right { text-align: right; margin: 4px 0 0; }
.me-save { position: sticky; bottom: 0; padding: 14px 0 4px; background: linear-gradient(transparent, var(--surface) 30%); }
.me-save .btn { min-width: 160px; }
.me-preview { position: sticky; top: 84px; display: grid; gap: 12px; }
.prev-card, .prev-private { padding: 18px; display: grid; gap: 10px; }
.prev-label { margin: 0; font-size: var(--t12); font-weight: 800; color: var(--muted); }
.prev-id { display: flex; gap: 12px; align-items: center; }
.prev-id .me-av { width: 56px; height: 56px; border-radius: 18px; font-size: 1.4rem; }
.prev-id .me-av.av-sticker { font-size: 1.8rem; }
.prev-id b { display: block; font-size: var(--t18); }
.prev-card p { margin: 0; }
.prev-private { background: #FFF6D6; }
.prev-private dl { display: grid; grid-template-columns: 96px 1fr; gap: 4px 10px; margin: 0; font-size: var(--t14); }
.prev-private dt { color: var(--muted); font-weight: 700; } .prev-private dd { margin: 0; font-weight: 700; }
@media (max-width: 960px) { .me-edit { grid-template-columns: minmax(0, 1fr); } .me-preview { position: static; order: -1; } }

/* ---------- community rules ---------- */
.com-rules { margin: 0 0 14px; padding: 14px 18px; border-radius: 18px; background: #FFF6D6; display: grid; gap: 6px; }
.com-rules-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.com-rules p { margin: 0; line-height: 1.6; }
.com-rules-cat { padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .7); }
.com-rules-cat b { margin-right: 6px; }
.rules-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: var(--t14); line-height: 1.6; }
.write-rules { border-radius: 14px; background: #FFF6D6; padding: 10px 14px; }
.write-rules summary { cursor: pointer; font-weight: 800; font-size: var(--t14); }
.write-rules .rules-list { margin-top: 10px; font-size: var(--t12); }
.write-rules .com-rules-cat { margin: 10px 0 0; }
.poll-rule { margin: 0; padding: 8px 12px; border-radius: 10px; background: var(--sunk); font-size: var(--t12); font-weight: 700; color: var(--muted); }
.poll-opt:disabled { cursor: default; }
.poll-opt:disabled:hover { border-color: var(--line); }
.poll-opt.is-mine:disabled:hover { border-color: var(--ink); }
.kg-dialog .dialog-body > p { white-space: pre-line; }

/* ---------- admin inquiries: list + chat ---------- */
.inq-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.inq-split .inq-chat:empty, .inq-split:not(.has-chat) .inq-chat { display: none; }
.inq-split.has-chat { grid-template-columns: 340px minmax(0, 1fr); }
.inq-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inq-split:not(.has-chat) .inq-cards { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.inq-card { width: 100%; text-align: left; display: grid; gap: 4px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(255,255,255,.6); background: rgba(255,255,255,.7); font: inherit; color: var(--ink); cursor: pointer; backdrop-filter: blur(8px); }
.inq-card:hover { background: #fff; }
.inq-card[aria-current="true"] { background: var(--ink); color: #fff; }
.inq-card[aria-current="true"] .muted, .inq-card[aria-current="true"] .inq-card-last { color: #C9CBD3; }
.inq-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.inq-card-last { font-size: var(--t12); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inq-chat { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; height: calc(100vh - 210px); min-height: 480px; padding: 18px; position: sticky; top: 16px; }
.chat-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; padding-bottom: 12px; border-bottom: 1px solid rgba(21,22,26,.08); }
.chat-head b { display: block; font-size: var(--t18); margin-bottom: 4px; }
.chat-tools { display: flex; gap: 6px; align-items: center; }
.chat-msgs { overflow-y: auto; padding-right: 4px; align-content: start; }
.chat-reply { display: grid; gap: 8px; }
.chat-reply textarea { min-height: 96px; }
.chat-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.quick-replies .chip { font-size: var(--t12); min-height: 30px; }
.chip-done { border-color: var(--ok); color: var(--ok); }
.chip-done:disabled { opacity: .4; }
@media (max-width: 960px) {
  .inq-split.has-chat { grid-template-columns: minmax(0, 1fr); }
  .inq-split.has-chat .inq-left { display: none; }
  .inq-chat { height: auto; min-height: 70vh; position: static; }
}
