/* 참가자 화면 (밝은 테마, round1 디자인 스펙). 행사 이름과 주최는 config/event.json 에서 옴
   토큰과 컴포넌트: design/mock/tokens.css 기준. 대비값은 docs/improvement-log/round1-design-spec.md 2절 */
@font-face { font-family: "Pretendard"; src: url("/static/fonts/pretendard/PretendardVariable.woff2") format("woff2-variations"), url("/static/fonts/pretendard/PretendardVariable.woff2") format("woff2"); font-weight: 45 920; font-display: swap; }
:root {
  color-scheme: light;
  --bg: #FFFCF7; --surface: #FFFFFF; --sunken: #F6F1E8; --line: #E6DFD3; --line-strong: #958F84;
  --ink: #1A2238; --ink-2: #4B5268; --ink-3: #666C80;
  --navy: #112140; --navy-press: #0B1730; --navy-soft: #E8EBF3; --on-navy: #F8EFDA; --on-navy-2: #C7CEDF;
  --gold: #F7C948; --gold-2: #F7C948; --gold-soft: #FFF3D1; --gold-ink: #6E5410;
  --red: #C93A2E; --red-soft: #FDECE9; --red-ink: #B23328;
  --green: #24784F; --green-soft: #E6F3EC; --green-ink: #1F6B47;
  /* 글꼴: 제목 Hahmlet 800, 행사 이름(GLOW)과 날짜 Fraunces 800~900, 본문 Pretendard. 파일은 public/fonts (plaza-fonts.css) */
  --font-display: "Hahmlet", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --font-brand: "Fraunces", "Hahmlet", Pretendard, "Apple SD Gothic Neo", serif;
  /* 숫자(미션 수, 카운트다운, 참가 인원): Fraunces. 단위 같은 한글은 Pretendard 로 (Hahmlet 은 제목 줄에만) */
  --font-num: "Fraunces", Pretendard, "Apple SD Gothic Neo", sans-serif;
  --font-body: Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --fs-d1: 30px; --fs-d2: 26px; --fs-d3: 19px; --fs-title: 20px; --fs-sub: 17px; --fs-body: 16px; --fs-label: 15px; --fs-help: 15px; --fs-meta: 14px;
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --gutter: 16px; --content-max: 560px;
  --r-xs: 6px; --r-sm: 10px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-full: 999px;
  --shadow-sheet: 0 -6px 24px rgba(17, 33, 64, .12); --shadow-toast: 0 6px 20px rgba(17, 33, 64, .20);
  --ring: 0 0 0 3px rgba(247, 201, 72, .42);
  --safe-b: env(safe-area-inset-bottom, 0px); --bar-h: 76px;
}

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: var(--fs-body); line-height: 1.6; -webkit-font-smoothing: antialiased; word-break: keep-all; overflow-wrap: break-word; min-height: 100dvh; overflow-x: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy); }
h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ic--sm { width: 18px; height: 18px; } .ic--lg { width: 24px; height: 24px; }
.ic-inline { width: 18px; height: 18px; vertical-align: -3px; }

/* ---------- 머리띠 ---------- */
.site-head { background: var(--navy); color: var(--on-navy); position: relative; }
.site-head__lights { height: 30px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='30' viewBox='0 0 160 30'%3E%3Cpath d='M0 2Q80 42 160 2' fill='none' stroke='%235A6890' stroke-width='1.5'/%3E%3Cg%3E%3Crect x='18' y='5.4' width='4' height='3.5' rx='1' fill='%238592B5'/%3E%3Cellipse cx='20' cy='13.6' rx='3.8' ry='5' fill='%23F7C948'/%3E%3Crect x='58' y='10.4' width='4' height='3.5' rx='1' fill='%238592B5'/%3E%3Cellipse cx='60' cy='18.6' rx='3.8' ry='5' fill='%23C93A2E'/%3E%3Crect x='98' y='10.4' width='4' height='3.5' rx='1' fill='%238592B5'/%3E%3Cellipse cx='100' cy='18.6' rx='3.8' ry='5' fill='%232A8558'/%3E%3Crect x='138' y='5.4' width='4' height='3.5' rx='1' fill='%238592B5'/%3E%3Cellipse cx='140' cy='13.6' rx='3.8' ry='5' fill='%23FFFCF7'/%3E%3C/g%3E%3C/svg%3E") repeat-x 0 0 / 160px 30px; }
.site-head__body { max-width: var(--content-max); margin: 0 auto; padding: 6px var(--gutter) 18px; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); }
.site-head__date { flex: none; font-size: var(--fs-meta); line-height: 1.35; color: var(--on-navy-2); text-align: right; }
.site-head__date b { display: block; font-family: var(--font-brand); font-weight: 800; font-size: 21px; line-height: 1.1; color: var(--gold-2); }
.site-head::after { content: ""; display: block; height: 5px; background: var(--gold); }
.event-mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; min-width: 0; }
.event-mark > svg { width: 30px; height: 30px; flex: none; }
.event-mark__name { font-family: var(--font-brand); font-weight: 900; font-size: 24px; line-height: 1.1; letter-spacing: .02em; }
.event-mark__sub { display: block; font-size: var(--fs-meta); line-height: 1.35; color: var(--on-navy-2); margin-top: 2px; }
.top-bar { max-width: var(--content-max); margin: 0 auto; min-height: 56px; padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); color: var(--navy); }
.top-bar .event-mark > svg { width: 26px; height: 26px; }
.top-bar .event-mark__name { font-size: 20px; white-space: nowrap; }
.top-bar__slot { flex: 1; min-width: 0; display: flex; justify-content: flex-end; }
.top-bar__slot:empty { display: none; }
.me-chip { flex: none; display: inline-flex; align-items: center; gap: var(--s-2); height: 44px; padding: 0 14px 0 6px; border: 1px solid var(--line); border-radius: var(--r-full); background: var(--surface); font-size: 15px; font-weight: 600; color: var(--navy); text-decoration: none; }
.me-chip .avatar { width: 32px; height: 32px; font-size: 14px; background: var(--navy); color: var(--on-navy); }
.me-chip:not([href]) { cursor: default; }

/* ---------- 페이지 ---------- */
.page { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gutter) var(--s-10); }
.page--with-bar { padding-bottom: calc(var(--bar-h) + var(--s-8) + var(--safe-b)); }
.page-title { padding: var(--s-8) 0 var(--s-5); }
.page-title h1 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-d1); line-height: 1.25; color: var(--navy); text-wrap: balance; }
.page-title p { margin-top: var(--s-2); color: var(--ink-2); }
.page-title .page-title__slogan { margin: 0 0 var(--s-2); font-size: var(--fs-label); font-weight: 600; line-height: 1.5; color: var(--gold-ink); }
.no-display-font .page-title h1, .no-display-font .tree-title h1, .no-display-font .stage__title h1, .no-display-font .done-hero h1, .no-display-font .event-mark__name, .no-display-font .mission__count, .no-display-font .site-head__date b, .no-display-font .people-screen h1, .no-display-font .people-screen .count b { font-weight: 800; letter-spacing: -.02em; }
.section { padding: var(--s-8) 0 0; }
.section + .section { border-top: 1px solid var(--line); margin-top: var(--s-8); }
.section__title { font-size: var(--fs-title); line-height: 1.4; font-weight: 700; color: var(--ink); display: flex; align-items: baseline; gap: var(--s-2); }
.section__desc { margin-top: var(--s-1); font-size: var(--fs-help); line-height: 1.5; color: var(--ink-2); }
.stack > * + * { margin-top: var(--s-5); }
.blocks { margin-top: var(--s-5); }
.blocks > * + * { margin-top: var(--s-3); }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); margin: var(--s-8) 0 var(--s-3); }
.sec-head h2 { font-size: var(--fs-title); font-weight: 700; line-height: 1.4; }
.sec-head span { font-size: var(--fs-meta); color: var(--ink-3); display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; margin: var(--s-5) 0 var(--s-2); font-size: var(--fs-meta); color: var(--ink-3); }
/* 본인 확인 이름 찾기: 50명 목록을 내려도 찾기 칸이 위에 붙어 있음 */
.find-bar { position: sticky; top: 0; z-index: 10; background: var(--bg); margin-top: var(--s-5); padding-top: var(--s-2); border-bottom: 1px solid transparent; }
.find-bar .list-head { margin: var(--s-3) 0 var(--s-2); }
.pin-label { margin-top: var(--s-4); }
.pin-label + .pin { margin-top: var(--s-2); }

/* 안내 묶음 */
.info-list { padding: var(--s-4); background: var(--sunken); border-radius: var(--r-lg); display: grid; gap: var(--s-3); }
.info-list > div { display: grid; grid-template-columns: 22px 52px 1fr; align-items: start; gap: var(--s-2); }
.info-list .ic { color: var(--ink-2); margin-top: 3px; }
.info-list dt { font-size: var(--fs-label); font-weight: 600; color: var(--ink-2); line-height: 1.6; }
.info-list dd { color: var(--ink); line-height: 1.6; }
.info-list dd small { display: block; font-size: var(--fs-help); color: var(--ink-2); line-height: 1.5; }
.facts { display: grid; gap: var(--s-2); }
.facts > div { display: grid; grid-template-columns: 64px 1fr; gap: var(--s-3); align-items: baseline; }
.facts dt { font-size: var(--fs-meta); font-weight: 600; color: var(--ink-3); }
.facts dd { font-size: var(--fs-body); line-height: 1.55; color: var(--ink); }

/* ---------- 입력칸 ---------- */
.field { display: block; }
.field__label { display: flex; align-items: baseline; gap: var(--s-2); font-size: var(--fs-label); line-height: 1.45; font-weight: 600; color: var(--ink); margin-bottom: var(--s-2); }
.optional { font-size: var(--fs-meta); font-weight: 500; color: var(--ink-3); }
.input, .textarea { display: block; width: 100%; min-height: 52px; padding: 13px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font-size: 16px; line-height: 1.5; outline: none; -webkit-appearance: none; appearance: none; transition: border-color .12s, box-shadow .12s; }
.textarea { min-height: 112px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--ink-3); opacity: 1; }
.input:focus, .textarea:focus { border-color: var(--navy); border-width: 2px; padding: 12.5px 13.5px; box-shadow: var(--ring); }
.input.is-error, .textarea.is-error, .is-error > .input, .is-error > .textarea { border-color: var(--red); }
.input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; }
.input-wrap { position: relative; }
.input-wrap > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.input-wrap .input { padding-left: 44px; }
.input-wrap .input:focus { padding-left: 43.5px; }
.help { margin-top: var(--s-2); font-size: var(--fs-help); line-height: 1.5; color: var(--ink-2); }
.counter { margin-top: var(--s-1); font-size: var(--fs-meta); color: var(--ink-3); text-align: right; font-variant-numeric: tabular-nums; }
.error-text { margin-top: var(--s-2); display: flex; gap: 6px; align-items: flex-start; font-size: var(--fs-help); line-height: 1.5; color: var(--red); font-weight: 500; }
.error-text .ic { width: 18px; height: 18px; margin-top: 2px; }
.static-val { min-height: 52px; display: flex; align-items: center; padding: 0 14px; border-radius: var(--r-md); background: var(--sunken); color: var(--ink); }

/* ---------- 체크박스, 라디오 (줄 전체를 누름. 진짜 input 이 줄 전체를 덮음) ---------- */
.choice { position: relative; display: flex; align-items: flex-start; gap: var(--s-3); min-height: 52px; padding: 13px var(--s-4); border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); cursor: pointer; }
.choice + .choice { margin-top: var(--s-2); }
.choice > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.choice__text { flex: 1; min-width: 0; font-size: var(--fs-body); line-height: 1.5; color: var(--ink); }
.choice__text b { font-weight: 600; }
.choice__text small { display: block; font-size: var(--fs-help); color: var(--ink-2); margin-top: 2px; }
.choice .box { width: 24px; height: 24px; flex: none; margin-top: 1px; border: 1.5px solid var(--line-strong); border-radius: 7px; background: var(--surface); display: grid; place-items: center; }
.choice .box svg { width: 16px; height: 16px; stroke: #fff; stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.choice .dot { width: 24px; height: 24px; flex: none; margin-top: 1px; border: 1.5px solid var(--line-strong); border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.choice .dot::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--navy); opacity: 0; }
.choice.is-on, .choice:has(> input:checked) { border-color: var(--navy); background: var(--navy-soft); }
.choice.is-on .box, .choice:has(> input:checked) .box { background: var(--navy); border-color: var(--navy); }
.choice.is-on .box svg, .choice:has(> input:checked) .box svg { opacity: 1; }
.choice.is-on .dot, .choice:has(> input:checked) .dot { border-color: var(--navy); border-width: 2px; }
.choice.is-on .dot::after, .choice:has(> input:checked) .dot::after { opacity: 1; }
.choice:has(> input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 2px; }
.choice.is-error { border-color: var(--red); }
.choice-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
/* 참가 구분 (신청서): 한 줄짜리 낮은 선택 줄. 이름은 굵게, 설명은 옆에 작게(좁으면 아래로) */
.kind-list { display: grid; gap: 6px; }
.kind-list .choice + .choice { margin-top: 0; }
.choice--kind { align-items: center; gap: 10px; min-height: 48px; padding: 9px 14px; }
.choice--kind .dot { width: 22px; height: 22px; margin-top: 0; }
.choice--kind .choice__text { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: var(--s-2); font-size: var(--fs-label); line-height: 1.45; }
.choice--kind .choice__text small { display: inline; margin-top: 0; font-size: var(--fs-meta); }
.field.is-error .choice--kind { border-color: var(--red); }
.choice-row .choice + .choice { margin-top: 0; }
/* 짧은 선택지 (광주시와의 관계): 알약 모양으로 한두 줄 */
.pill-list { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.pill { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-full); background: var(--surface); color: var(--ink); font-size: var(--fs-label); font-weight: 500; line-height: 1.3; cursor: pointer; }
.pill > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.pill:has(> input:checked) { background: var(--navy); border-color: var(--navy); color: var(--on-navy); font-weight: 600; }
.pill:has(> input:focus-visible) { outline: 2px solid var(--navy); outline-offset: 2px; }
.field.is-error .pill { border-color: var(--red); }
/* 여러 개 고르는 알약(체크): 네모 칸과 체크 표시 */
.pill--check { gap: 8px; padding-left: 12px; }
.pill__box { flex: none; width: 18px; height: 18px; border: 1.5px solid var(--line-strong); border-radius: 5px; background: var(--surface); display: grid; place-items: center; }
.pill--check:has(> input:checked) .pill__box { background: var(--gold, #F7C948); border-color: var(--gold, #F7C948); }
.pill--check:has(> input:checked) .pill__box::after { content: ''; width: 5px; height: 9px; border: solid var(--navy); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.help--top { margin: -2px 0 8px; }
.choice .swatch-dot { width: 22px; height: 22px; border-radius: 50%; flex: none; margin-top: 1px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; background: var(--sunken); border-radius: var(--r-md); }
.seg button { min-height: 44px; padding: 0 6px; border: 0; border-radius: 9px; background: transparent; font-size: var(--fs-label); font-weight: 600; color: var(--ink-2); line-height: 1.25; }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--surface); color: var(--navy); box-shadow: 0 0 0 1px var(--line); }
/* 옆으로 넘기는 칩 줄 (오늘 참가자: 참가 구분으로 거르기). 화면 가장자리까지 넘어가게 여백만큼 밖으로 뺌 */
.chips { display: flex; gap: var(--s-2); margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter); overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: var(--r-full); background: var(--surface); color: var(--ink-2); font-size: var(--fs-label); font-weight: 600; white-space: nowrap; }
.chip .n { font-weight: 500; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--on-navy); }

/* ---------- 버튼 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); min-height: 52px; padding: 0 var(--s-5); border: 1.5px solid transparent; border-radius: var(--r-md); font-size: var(--fs-sub); font-weight: 600; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background-color .12s; background: var(--surface); color: var(--navy); }
.btn .ellip, .action-bar__row > .btn > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.btn--primary { background: var(--navy); color: var(--on-navy); }
.btn--primary:active { background: var(--navy-press); }
.btn--secondary { background: var(--surface); color: var(--navy); border-color: var(--line-strong); }
.btn--secondary:active { background: var(--sunken); }
.btn--quiet { background: var(--sunken); color: var(--navy); }
.btn--danger { background: var(--surface); color: var(--red); border-color: var(--line-strong); }
.btn--text { min-height: 44px; padding: 0 var(--s-1); background: none; border: 0; color: var(--navy); font-size: var(--fs-label); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.btn--md { min-height: 44px; padding: 0 var(--s-4); font-size: var(--fs-label); }
.btn--sm { min-height: 44px; padding: 0 var(--s-3); font-size: var(--fs-meta); border-radius: var(--r-sm); }
.btn--block { display: flex; width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--sunken); color: var(--ink-3); border-color: transparent; cursor: not-allowed; }
.btn .ic { width: 20px; height: 20px; }
.icon-btn { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink-2); padding: 0; }
.icon-btn--boxed { width: 52px; height: 52px; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--navy); }
.icon-btn--boxed .ic { width: 22px; height: 22px; }

/* ---------- 아래 고정 버튼 띠 ---------- */
.action-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--line); padding: 12px var(--gutter) calc(12px + var(--safe-b)); }
.action-bar__row { max-width: var(--content-max); margin: 0 auto; display: flex; gap: var(--s-2); }
.action-bar__row > .btn { flex: 1 1 auto; min-width: 0; }
.action-bar__row > .btn--primary { flex: 1.5 1 auto; }
.action-bar__row > .btn--secondary { padding: 0 14px; }
.action-bar__err { max-width: var(--content-max); margin: 0 auto; font-size: var(--fs-help); line-height: 1.45; color: var(--red); font-weight: 500; }
.action-bar__err:not(:empty) { margin-bottom: var(--s-2); }
.kb-open .action-bar { display: none; }

/* ---------- 카드 ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s-5) var(--s-4); }
.card--sunken { background: var(--sunken); border-color: transparent; }
.card__title { font-size: var(--fs-sub); line-height: 1.45; font-weight: 700; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.card__title .ic { color: var(--ink-2); }
.card__desc { margin-top: var(--s-1); font-size: var(--fs-help); line-height: 1.5; color: var(--ink-2); }
.card .facts { margin-top: var(--s-3); }
.card-head-ok { display: flex; align-items: center; gap: var(--s-2); font-size: 15px; font-weight: 600; color: var(--green-ink); }
.card-head-ok .ic { color: var(--green); }

/* ---------- 아바타, 태그 ---------- */
.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--sunken); color: var(--navy); font-weight: 700; font-size: 17px; line-height: 1; }
.avatar--sm { width: 36px; height: 36px; font-size: 15px; }
.avatar--navy { background: var(--navy); color: var(--on-navy); }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 8px; border-radius: var(--r-xs); font-size: var(--fs-meta); font-weight: 600; line-height: 1; white-space: nowrap; background: var(--sunken); color: var(--ink-2); vertical-align: middle; }
.tag--tenant, .tag--done { background: var(--green-soft); color: var(--green-ink); }
.tag--gold { background: var(--gold-soft); color: var(--gold-ink); }
.tag--red { background: var(--red-soft); color: var(--red-ink); }
.tag--navy { background: var(--navy); color: var(--on-navy); }
.tag .ic { width: 14px; height: 14px; stroke-width: 2.4; }

/* ---------- 참가자 카드 ---------- */
.people-tools { display: grid; gap: var(--s-3); margin-top: var(--s-1); }
.people-list { display: grid; gap: 10px; margin-top: var(--s-4); }
.person { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.person.is-picked { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); }
.person-link { display: block; color: inherit; text-decoration: none; padding: var(--s-4) 72px var(--s-4) var(--s-4); border-radius: inherit; }
.person__head { display: flex; gap: var(--s-3); align-items: flex-start; }
.person__name { font-size: var(--fs-sub); line-height: 1.35; font-weight: 700; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.person__org { font-size: var(--fs-help); line-height: 1.45; color: var(--ink-2); margin-top: 1px; }
.person__hobby { font-size: var(--fs-help); line-height: 1.45; color: var(--ink); margin-top: 6px; }
.person__hobby span { margin-right: 8px; font-size: var(--fs-meta); font-weight: 600; color: var(--ink-3); }
.person__pick { position: absolute; top: 8px; right: 8px; width: 60px; min-height: 52px; padding: 4px 0; display: grid; justify-items: center; align-content: center; gap: 2px; border: 0; background: none; color: var(--ink-3); border-radius: var(--r-md); font-size: 14px; font-weight: 600; line-height: 1.2; }
.person__pick .ic { width: 24px; height: 24px; }
.person__pick.is-on { color: var(--navy); }
.person__pick.is-on .ic { fill: var(--gold); stroke: var(--navy); }
.picked { display: flex; width: 100%; align-items: center; gap: var(--s-3); margin-top: var(--s-4); padding: 12px 8px 12px 16px; border: 0; border-radius: var(--r-lg); background: var(--navy); color: var(--on-navy); text-align: left; }
.picked .ic { color: var(--gold-2); }
.picked__main { flex: 1; min-width: 0; }
.picked__title { display: block; font-weight: 600; font-size: 15px; line-height: 1.4; }
.picked__names { display: block; font-size: var(--fs-meta); color: var(--on-navy-2); line-height: 1.45; }
.picked__end { flex: none; padding: 0 8px; font-size: var(--fs-meta); font-weight: 600; color: var(--gold-2); white-space: nowrap; }

/* ---------- 목록 줄 ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.list-row { display: flex; align-items: center; gap: var(--s-3); min-height: 64px; padding: 10px var(--s-4); width: 100%; border: 0; background: none; text-align: left; color: inherit; text-decoration: none; font: inherit; }
.list-row + .list-row { border-top: 1px solid var(--line); }
button.list-row:active, a.list-row:active { background: var(--sunken); }
.list-row__main { flex: 1; min-width: 0; }
.list-row__title { font-size: var(--fs-body); font-weight: 600; line-height: 1.4; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; }
.list-row__sub { display: block; font-size: var(--fs-meta); line-height: 1.45; color: var(--ink-2); margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.list-row__end { flex: none; color: var(--ink-3); display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-meta); }
.list-row__end .btn { color: var(--navy); }
.list-row.is-muted .list-row__title { color: var(--ink-2); }
.list-row__icon { width: 40px; height: 40px; flex: none; border-radius: var(--r-md); background: var(--sunken); color: var(--navy); display: grid; place-items: center; }
.list-row--more { min-height: 52px; justify-content: center; color: var(--navy); font-weight: 600; font-size: 15px; }
.list-row--danger .list-row__title { color: var(--red); }

/* ---------- 바텀 시트 ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(17, 33, 64, .48); opacity: 0; transition: opacity .22s; }
.sheet-backdrop.show { opacity: 1; }
.sheet-backdrop.is-clear { background: rgba(17, 33, 64, .08); }
.sheet { position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 31; max-height: min(90dvh, calc(var(--vvh, 100dvh) - 12px)); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: var(--shadow-sheet); transform: translateY(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.sheet.show { transform: translateY(0); }
.sheet__grab { width: 40px; height: 4px; border-radius: 2px; background: #D6CEC0; margin: 10px auto 0; flex: none; }
.sheet__inner { flex: 1; min-height: 0; display: flex; flex-direction: column; width: 100%; max-width: var(--content-max); margin: 0 auto; }
.sheet__head { flex: none; display: flex; align-items: flex-start; gap: var(--s-1); padding: var(--s-2) var(--s-2) 0 var(--s-5); }
.sheet__head h2 { flex: 1; min-width: 0; font-size: var(--fs-title); line-height: 1.4; font-weight: 700; padding-top: 8px; }
.sheet__head .icon-btn { margin-top: 0; }
.sheet__head--back { padding-left: var(--s-2); }
.sheet__body { flex: 1; min-height: 0; padding: var(--s-4) var(--s-5); overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.sheet__body > * + * { margin-top: var(--s-4); }
.sheet__body > .steps + * { margin-top: var(--s-4); }
.sheet__foot { flex: none; padding: var(--s-3) var(--s-5) calc(var(--s-4) + var(--safe-b)); border-top: 1px solid var(--line); display: flex; gap: var(--s-2); }
.sheet__foot .btn { flex: 1; min-width: 0; }
.sheet__foot .btn--primary { flex: 1.4; }
.sheet__foot--auto .btn { flex: 1 1 auto; }
.sheet__foot--auto .btn--primary { flex: 1.4 1 auto; }
.sheet__desc { color: var(--ink-2); }
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 0; }
.steps li { list-style: none; font-size: var(--fs-meta); font-weight: 600; color: var(--ink-3); padding-top: 10px; border-top: 4px solid var(--line); line-height: 1.35; }
.steps li.is-now { color: var(--navy); border-top-color: var(--navy); }
.steps li.is-done { color: var(--ink-2); border-top-color: var(--ink-2); }
.steps li.is-done::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 4px; vertical-align: -1px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B5268' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat; }

/* ---------- 토스트 ---------- */
.toast { position: fixed; left: 50%; bottom: calc(24px + var(--safe-b)); transform: translate(-50%, 12px); z-index: 70; display: flex; align-items: center; gap: var(--s-2); width: max-content; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: var(--r-md); background: var(--navy); color: var(--on-navy); font-size: var(--fs-label); font-weight: 500; line-height: 1.45; box-shadow: var(--shadow-toast); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { color: var(--gold-2); }
.has-bar .toast { bottom: calc(var(--bar-h) + 16px + var(--safe-b)); }
.kb-open .toast { bottom: calc(var(--kb, 0px) + 16px); }

/* ---------- 빈 상태, 알림 띠 ---------- */
.empty { text-align: center; padding: var(--s-8) var(--s-4); }
.empty__icon { width: 56px; height: 56px; margin: 0 auto var(--s-3); border-radius: 50%; background: var(--sunken); color: var(--ink-2); display: grid; place-items: center; }
.empty__icon .ic { width: 26px; height: 26px; }
.empty__title { font-size: var(--fs-sub); font-weight: 700; }
.empty__text { margin-top: var(--s-1); font-size: var(--fs-help); color: var(--ink-2); }
.empty .btn { margin-top: var(--s-4); }
.list .empty { padding: var(--s-6) var(--s-4); }
.banner { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-lg); background: var(--gold-soft); color: var(--ink); }
.banner > .ic { color: var(--gold-ink); margin-top: 2px; }
.banner__main { flex: 1; min-width: 0; }
.banner__title { font-size: var(--fs-body); font-weight: 700; line-height: 1.45; }
.banner__text { margin-top: 2px; font-size: var(--fs-help); line-height: 1.5; color: var(--ink-2); }
.banner .btn { margin-top: var(--s-3); }
.banner--info { background: var(--navy-soft); }
.banner--info > .ic { color: var(--navy); }
.banner--ok { background: var(--green-soft); }
.banner--ok > .ic { color: var(--green); }
.banner--error { background: var(--red-soft); }
.banner--error > .ic { color: var(--red-ink); }
.banner + .banner { margin-top: var(--s-3); }

/* 앱 안 브라우저 안내 */
.inapp-banner { position: sticky; top: 0; z-index: 65; display: flex; gap: var(--s-3); align-items: flex-start; padding: 12px 8px 12px var(--gutter); background: var(--gold-soft); color: var(--ink); border-bottom: 1px solid #EBD9A6; font-size: var(--fs-help); line-height: 1.5; }
.inapp-banner > .ic { color: var(--gold-ink); margin-top: 2px; }
.inapp-banner__text { flex: 1; min-width: 0; }
.inapp-banner__text b { display: block; font-size: var(--fs-body); }
.inapp-banner .icon-btn { margin: -10px 0; color: var(--ink-2); }
.ic-more { display: inline-block; width: 22px; height: 18px; vertical-align: -4px; border: 1px solid var(--line-strong); border-radius: 5px; background: var(--surface); }

/* ---------- 신청 ---------- */
.consent-box { margin-top: var(--s-4); padding: var(--s-4); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.consent-box__head { display: flex; align-items: center; gap: var(--s-2); font-weight: 700; line-height: 1.4; }
.consent { margin-top: var(--s-3); display: grid; gap: 10px; }
.consent > div { display: grid; grid-template-columns: 76px 1fr; gap: var(--s-3); align-items: baseline; }
.consent dt { font-size: var(--fs-meta); font-weight: 600; color: var(--ink-3); }
.consent dd { font-size: var(--fs-help); line-height: 1.55; color: var(--ink); }
.choice--consent { margin-top: var(--s-4); }
.consent-box__sum { font-size: var(--fs-help); line-height: 1.6; color: var(--ink); }
.consent-more { margin-top: var(--s-2); }
.consent-more > summary { display: inline-flex; align-items: center; min-height: 44px; font-size: var(--fs-help); font-weight: 600; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; list-style: none; }
.consent-more > summary::-webkit-details-marker { display: none; }
.consent-more[open] > summary { color: var(--ink); }
.consent-more .consent { margin-top: var(--s-1); padding-bottom: var(--s-2); }
.consent-photo { margin-top: var(--s-4); }
.fineprint { margin: var(--s-4) 0 0; padding: 0 0 0 18px; display: grid; gap: 4px; font-size: var(--fs-meta); line-height: 1.55; color: var(--ink-2); }
.done-hero { padding: 36px 0 var(--s-6); }
.done-mark { position: relative; width: 72px; height: 72px; border-radius: 50%; background: var(--sunken); display: grid; place-items: center; margin-bottom: var(--s-5); }
.done-mark > svg { width: 44px; height: 44px; }
.done-mark .badge { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; border: 3px solid var(--bg); }
.done-mark .badge.is-info { background: var(--navy); }
.done-mark .badge .ic { width: 15px; height: 15px; stroke-width: 3; }
.done-hero h1 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-d2); line-height: 1.3; color: var(--navy); }
.done-hero p { margin-top: var(--s-2); color: var(--ink-2); }
.timeline { margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.timeline li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: var(--s-3); padding-bottom: var(--s-5); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .n { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--on-navy); font-size: 14px; font-weight: 700; display: grid; place-items: center; }
.timeline b { display: block; font-weight: 600; line-height: 1.5; padding-top: 2px; }
.timeline span { display: block; font-size: var(--fs-help); color: var(--ink-2); line-height: 1.5; margin-top: 2px; }
.timeline time { font-size: var(--fs-meta); color: var(--ink-3); font-weight: 500; }
.site-foot { max-width: var(--content-max); margin: 0 auto; padding: var(--s-8) var(--gutter) calc(var(--s-10) + var(--bar-h) + var(--safe-b)); font-size: var(--fs-meta); line-height: 1.7; color: var(--ink-3); border-top: 1px solid var(--line); }
.site-foot b { font-weight: 600; color: var(--ink-2); }
.site-foot--plain { border-top: 0; padding-top: 0; }
.site-foot--plain span { display: block; }
.site-foot--plain span:empty { display: none; }

/* ---------- 트리 화면: 밤하늘 캔버스 ---------- */
/* 트리 무대: 화면 폭을 다 쓰는 밤 풍경. 제목은 하늘 위에, 눈밭은 아래 본문 바탕으로 이어짐 */
.stage { position: relative; height: clamp(440px, calc(100svh - 150px), 680px); overflow: hidden; background: #0B1430; isolation: isolate; }
.stage > canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.stage.placing > canvas { touch-action: none; }
.stage__fade { position: absolute; left: 0; right: 0; bottom: -1px; height: 72px; background: linear-gradient(to bottom, rgba(255, 252, 247, 0), rgba(255, 252, 247, .55) 55%, var(--bg)); pointer-events: none; z-index: 1; }
.stage > .top-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 3; max-width: none; min-height: 52px; padding: 4px var(--gutter) 0; color: var(--on-navy); pointer-events: none; }
.stage > .top-bar > * { pointer-events: auto; }
.stage > .top-bar .event-mark { opacity: .92; }
.stage > .top-bar .event-mark__name { font-size: 15px; }
.stage > .top-bar .event-mark > svg { width: 22px; height: 22px; }
.stage .me-chip { height: 40px; padding: 0 12px 0 5px; background: rgba(11, 20, 48, .55); border-color: rgba(255, 255, 255, .3); color: var(--on-navy); font-size: 14px; }
.stage .me-chip .avatar { width: 30px; height: 30px; background: var(--gold-2); color: var(--navy); }
.stage__title { position: absolute; left: 0; right: 0; top: 50px; z-index: 2; padding: 0 var(--gutter); text-align: center; pointer-events: none; text-shadow: 0 2px 14px rgba(5, 10, 28, .7); }
.stage__title h1 { font-family: var(--font-display); font-weight: 800; font-size: 27px; line-height: 1.2; color: var(--on-navy); word-break: keep-all; }
.stage__title h1 #ownerName { color: var(--gold-2); }
.stage__title .tree-title__meta { margin-top: 4px; justify-content: center; color: var(--on-navy-2); font-size: var(--fs-meta); }
.stage__title .tag--tenant { background: rgba(247, 201, 72, .16); color: var(--gold-2); border: 1px solid rgba(247, 201, 72, .45); text-shadow: none; }
.stage__title .tag--kind { background: rgba(11, 20, 48, .32); color: var(--on-navy-2); border: 1px solid rgba(255, 255, 255, .36); text-shadow: none; }
.stage.placing .stage__title { display: none; }
.stage__tool { position: absolute; right: 12px; bottom: 60px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(11, 20, 48, .6); color: var(--on-navy); border: 1px solid rgba(255, 255, 255, .28); padding: 0; }
.stage__tool .ic { width: 18px; height: 18px; }
.stage.placing .stage__tool { display: none; }
.stage__hint { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); z-index: 2; width: max-content; max-width: calc(100% - 32px); padding: 9px 16px; border-radius: var(--r-full); background: var(--navy); color: var(--on-navy); font-size: var(--fs-meta); line-height: 1.4; text-align: center; border: 1px solid rgba(255, 255, 255, .22); pointer-events: none; }
.tree-stats { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0 0; }
.stage-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--r-full); background: var(--surface); color: var(--ink-2); font-size: var(--fs-meta); font-weight: 500; border: 1px solid var(--line); white-space: nowrap; }
.stage-chip b { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.stage-chip .ic { width: 16px; height: 16px; color: var(--ink-3); }
.stage__loading, .stage__fallback { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; padding: 24px; text-align: center; color: var(--on-navy-2); font-size: var(--fs-help); background: var(--navy); transition: opacity .4s; }
.stage__loading svg { width: 56px; height: 56px; opacity: .9; }
.stage__loading.is-done { opacity: 0; pointer-events: none; }
.stage__fallback svg { width: 96px; height: 96px; }
.stage__fallback b { color: var(--on-navy); font-size: var(--fs-body); font-weight: 600; line-height: 1.45; }
.stage__fallback span { max-width: 280px; }
/* round2 사용성 점검 반영 */
#missionCard.mission--compact { padding-top: var(--s-3); padding-bottom: var(--s-3); }
#missionCard.mission--compact #mTitle, #missionCard.mission--compact #mDots { display: none; }
#missionCard.mission--compact .mission__head { align-items: center; }
#missionCard.mission--compact .mission__count { font-size: 20px; }
#missionCard.mission--compact #mText { margin-top: 4px; }
.qr-help { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4); border-radius: var(--r-md); background: var(--sunken); }
.qr-help .ic { flex: none; width: 56px; height: 56px; stroke-width: 1.6; color: var(--navy); }
.qr-help p { font-size: var(--fs-body); line-height: 1.55; font-weight: 600; color: var(--ink); }
/* 토스트는 아래 고정 버튼 띠 바로 위 */
.has-bar .toast, body:has(.action-bar:not([hidden])) .toast { bottom: calc(76px + 12px + var(--safe-b)); }
.kb-open .toast { bottom: calc(12px + var(--kb, 0px)); }
/* 시트 아래쪽 여백: 마지막 줄(명함 설명 등)이 바닥 버튼에 붙지 않게 */
.sheet__body { padding-bottom: var(--s-6); }
/* 머리띠: 제목과 내 트리 알약 사이 12px 이상, 부제는 낱말 단위로 고르게 줄바꿈 */
.top-bar { gap: 12px; }
.event-mark__sub { word-break: keep-all; text-wrap: balance; }
.page-title p, .site-head p { word-break: keep-all; }

@media (min-width: 600px) { .stage { margin: 12px auto 0; max-width: var(--content-max); border-radius: var(--r-xl); } .stage__fade { display: none; } .stage__tool { bottom: 16px; } .tree-stats { padding-top: 14px; } }
.tree-title { padding: var(--s-5) 0 0; }
.tree-title h1 { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-d2); line-height: 1.25; color: var(--navy); }
.tree-title__meta { margin-top: 6px; display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font-size: var(--fs-help); color: var(--ink-2); line-height: 1.5; }
.tree-title__meta:empty { display: none; }

/* 미션 */
.mission__head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s-3); }
.mission__track { display: flex; gap: 6px; margin-top: var(--s-3); }
.mission__slot { flex: 1; min-width: 0; height: 40px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--ink-3); }
.mission__slot.is-on { background: var(--green); border-color: var(--green); color: #fff; }
.mission__slot.is-center { flex: 1.6; font-size: var(--fs-meta); font-weight: 600; }
.mission__slot .ic { width: 18px; height: 18px; stroke-width: 2.4; }
.mission__count { flex: none; white-space: nowrap; font-family: var(--font-num); font-weight: 800; font-size: 24px; line-height: 1.2; color: var(--navy); font-variant-numeric: tabular-nums; }
#missionCard .help a { font-weight: 600; }
#missionCard.is-closed .mission__slot:not(.is-on) { background: var(--sunken); border-color: var(--line); }
/* 미션 가랜드 (11-22): 줄에 매달린 오너먼트 자리. 빈 자리는 점선 윤곽, 단 사람이 생기면 그 오너먼트와 이름 */
.garland { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; margin-top: var(--s-3); padding-top: 10px; }
.garland__rope { position: absolute; left: 4%; right: 4%; top: 0; width: 92%; height: 14px; fill: none; stroke: var(--gold-ink, #6E5410); stroke-width: 1.4; vector-effect: non-scaling-stroke; opacity: .55; }
.garland__slot { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; padding-top: 6px; }
.garland__hook { width: 1.5px; height: 8px; background: var(--gold-ink, #6E5410); opacity: .55; }
.garland__slot .orn { width: 40px; height: 40px; filter: drop-shadow(0 2px 2px rgba(17,33,64,.18)); }
.garland__empty { width: 36px; height: 36px; margin: 2px; border-radius: 50%; border: 2px dashed var(--line-strong); background: transparent; }
.garland__name { margin-top: 4px; max-width: 100%; min-height: 1.4em; font-size: 12px; line-height: 1.4; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.garland__slot.is-new .orn { animation: orn-pop .9s ease-out; }
@keyframes orn-pop { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; filter: drop-shadow(0 0 0 rgba(247,201,72,0)); } 55% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 10px rgba(247,201,72,.9)); } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { .garland__slot.is-new .orn { animation: none; } }
#missionCard.is-closed .garland__empty { border-color: var(--line); }
#missionCard.mission--compact .garland { display: none; }
#missionCard #mText:empty { display: none; }

/* 내년 목표 (별 문장) */
.goal { display: flex; gap: var(--s-3); align-items: flex-start; padding: var(--s-4); border-radius: var(--r-lg); background: var(--navy); color: var(--on-navy); }
.goal__star { width: 36px; height: 36px; flex: none; }
.goal__main { flex: 1; min-width: 0; }
.goal__label { font-size: var(--fs-meta); color: var(--on-navy-2); line-height: 1.45; }
.goal__text { font-size: var(--fs-sub); line-height: 1.5; font-weight: 600; margin-top: 2px; }
.goal__text.is-empty { color: var(--on-navy-2); font-weight: 500; font-size: var(--fs-body); }
.goal__edit { margin-left: auto; flex: none; min-height: 44px; padding: 0 12px; border-radius: var(--r-sm); background: transparent; border: 1px solid rgba(255, 255, 255, .34); color: var(--on-navy); font-size: 15px; font-weight: 600; }
.card .goal { margin-top: var(--s-4); }
.talk { margin: var(--s-3) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); justify-items: start; }
.talk li { padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--sunken); line-height: 1.55; max-width: 100%; }
.contact-list { margin-top: var(--s-2); }
.contact-row { display: flex; align-items: center; gap: var(--s-3); min-height: 52px; }
.contact-row + .contact-row { border-top: 1px solid var(--line); }
.contact-row > .ic { color: var(--ink-2); }
.contact-row > a:not(.btn) { flex: 1; min-width: 0; min-height: 44px; display: flex; align-items: center; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; font-size: var(--fs-body); overflow-wrap: anywhere; }
.contact-row > .btn { flex: none; }

/* ---------- 오너먼트 고르기, 메시지 ---------- */
.orn-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.orn-tile { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; min-height: 96px; padding: 10px 4px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); min-width: 0; }
.orn-tile svg.orn { width: 48px; height: 48px; }
.orn-tile span { font-size: var(--fs-meta); font-weight: 500; line-height: 1.3; text-align: center; }
.orn-tile small { font-size: 13px; line-height: 1.25; color: var(--ink-3); text-align: center; }
.orn-tile.is-on { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: var(--navy-soft); }
.orn-tile.is-on::after { content: ""; position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--navy) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 14px no-repeat; }
.picked-orn { display: flex; align-items: center; gap: var(--s-3); padding: 8px 8px 8px 12px; border-radius: var(--r-md); background: var(--sunken); }
.picked-orn svg.orn { width: 44px; height: 44px; flex: none; }
.picked-orn__main { flex: 1; min-width: 0; }
.picked-orn b { display: block; font-weight: 600; line-height: 1.4; }
.picked-orn small { display: block; font-size: var(--fs-meta); color: var(--ink-2); }
.sender { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sender .avatar { background: var(--navy); color: var(--on-navy); }
.sender b { font-weight: 600; }
.pop-msg { display: flex; gap: var(--s-3); align-items: flex-start; }
.pop-msg svg.orn { width: 56px; height: 56px; flex: none; }
.pop-msg__body { flex: 1; min-width: 0; }
.pop-msg__mean { font-size: var(--fs-help); font-weight: 600; color: var(--navy); margin-bottom: 4px; }
.orn-row__mean { margin-top: 2px; font-size: 13px; font-weight: 600; color: var(--navy); }
.mean-tally { margin-bottom: 12px; }
.mean-tally ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.mean-tally li { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink); background: var(--surface); }
.mean-tally li b { color: var(--navy); }
.pop-msg__text { flex: 1; min-width: 0; font-size: var(--fs-sub); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.pop-meta { display: flex; align-items: center; gap: var(--s-2); flex-wrap: wrap; font-size: var(--fs-meta); color: var(--ink-3); }

/* 받은 오너먼트 목록 */
.orn-row { display: flex; align-items: flex-start; gap: var(--s-3); padding: 12px var(--s-4); }
.orn-row + .orn-row { border-top: 1px solid var(--line); }
.orn-row svg.orn { width: 40px; height: 40px; flex: none; }
.orn-row__main { flex: 1; min-width: 0; }
.orn-row__from { font-weight: 600; line-height: 1.4; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.orn-row__msg { margin-top: 2px; font-size: var(--fs-help); color: var(--ink-2); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.orn-row.is-hidden .orn-row__msg, .orn-row.is-hidden svg.orn { opacity: .55; }
.orn-row .btn { flex: none; margin-top: 2px; }
.sheet .list { margin: 0; }

/* 휴대폰 뒤 4자리 (입력 하나를 칸 네 개처럼) */
.pin { position: relative; display: grid; grid-template-columns: repeat(4, 56px); gap: 10px; justify-content: center; margin: var(--s-6) 0 var(--s-2); }
.pin span { height: 64px; border: 1.5px solid var(--line-strong); border-radius: var(--r-md); display: grid; place-items: center; font-size: 28px; font-weight: 700; color: var(--ink); background: var(--surface); font-variant-numeric: tabular-nums; }
.pin span.is-now { border: 2px solid var(--navy); box-shadow: var(--ring); }
.pin.is-error span { border-color: var(--red); }
.pin input { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: transparent; color: transparent; caret-color: transparent; font-size: 16px; text-align: center; outline: none; padding: 0; -webkit-appearance: none; }
.pin input::selection { background: transparent; }
.pin-help { text-align: center; }

/* 트리 꾸미기 */
.swatch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
.swatch { position: relative; display: grid; justify-items: center; gap: 6px; min-height: 76px; padding: 10px 4px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: var(--fs-meta); font-weight: 600; color: var(--ink); }
.swatch i { width: 30px; height: 30px; border-radius: 50%; display: block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }
.swatch[aria-checked="true"] { border-color: var(--navy); box-shadow: inset 0 0 0 1px var(--navy); background: var(--navy-soft); }
.label-sm { font-size: var(--fs-label); font-weight: 600; color: var(--ink); margin-bottom: var(--s-2); }

/* 트리 이미지 */
.send-wrap { display: grid; justify-items: center; }
.send-wrap img { width: min(56vw, 240px); border-radius: var(--r-lg); border: 1px solid var(--line); }

/* ---------- 행사장 화면: 오늘 참가자 (/people?screen=1). 1920×1080 판을 화면 크기에 맞춰 줄임 ---------- */
.people-screen { overflow: hidden; background: var(--bg); }
.people-screen-wrap { position: fixed; inset: 0; overflow: hidden; }
.people-screen .screen { position: absolute; left: 50%; top: 50%; width: 1920px; height: 1080px; transform-origin: 50% 50%; display: grid; grid-template-columns: 560px 1fr; background: var(--bg); }
.people-screen .rail { position: relative; display: flex; flex-direction: column; background: var(--navy); color: var(--on-navy); padding: 0 56px 56px; }
.people-screen .rail .site-head__lights { margin: 0 -56px; height: 45px; background-size: 240px 45px; }
.people-screen .rail .event-mark { margin-top: 28px; gap: 14px; }
.people-screen .rail .event-mark > svg { width: 48px; height: 48px; }
.people-screen .rail .event-mark__name { font-size: 30px; }
.people-screen .rail .event-mark__sub { font-size: 20px; margin-top: 4px; }
.people-screen .rail h1 { margin-top: 64px; font-family: var(--font-display); font-weight: 800; font-size: 72px; line-height: 1.15; }
.people-screen .rail .lead { margin-top: 24px; font-size: 25px; line-height: 1.55; color: var(--on-navy-2); }
.people-screen .rail .count { margin-top: 36px; display: flex; align-items: baseline; gap: 14px; }
.people-screen .rail .count b { font-family: var(--font-num); font-weight: 800; font-size: 88px; line-height: 1; color: var(--gold-2); }
.people-screen .rail .count span { font-size: 24px; color: var(--on-navy-2); }
.people-screen .rail::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--gold); }
.people-screen .qr-card { margin-top: auto; display: grid; grid-template-columns: 176px 1fr; gap: 24px; align-items: center; padding: 24px; border-radius: var(--r-xl); background: var(--surface); color: var(--ink); }
.people-screen .qr-slot { width: 176px; height: 176px; display: grid; place-items: center; }
.people-screen .qr-slot img { width: 176px; height: 176px; display: block; image-rendering: pixelated; }
.people-screen .qr-slot code { font-family: var(--font-body); font-size: 19px; line-height: 1.4; color: var(--navy); font-weight: 700; word-break: break-all; text-align: center; }
.people-screen .qr-card b { display: block; font-size: 27px; line-height: 1.3; color: var(--navy); }
.people-screen .qr-card span { display: block; margin-top: 8px; font-size: 19px; line-height: 1.5; color: var(--ink-2); }
.people-screen .qr-card.no-qr { grid-template-columns: 1fr; }
.people-screen .qr-url { display: block; margin-top: 12px; font-family: var(--font-body); font-size: 30px; font-weight: 700; line-height: 1.3; color: var(--navy); word-break: break-all; }
.people-screen .board { padding: 44px 56px 48px; display: flex; flex-direction: column; min-width: 0; }
.people-screen .board__top { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 48px; }
.people-screen .legend { display: flex; gap: 16px; font-size: 22px; color: var(--ink-2); align-items: center; min-width: 0; }
.people-screen .legend .tag { height: 34px; font-size: 19px; padding: 0 12px; }
.people-screen .pager { flex: none; display: flex; align-items: center; gap: 16px; font-size: 21px; color: var(--ink-2); }
.people-screen .pager__bars { display: flex; gap: 6px; }
.people-screen .pager__bars i { width: 36px; height: 6px; border-radius: 3px; background: var(--line); }
.people-screen .pager__bars i.on { background: var(--navy); }
.people-screen .grid { flex: 1; margin-top: 24px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 18px; }
.people-screen .b-card { background: var(--surface); border: 1.5px solid var(--line); border-radius: 20px; padding: 18px 24px; display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 0; overflow: hidden; }
.people-screen .b-head { display: flex; align-items: center; gap: 18px; min-width: 0; }
.people-screen .b-head .avatar { width: 64px; height: 64px; font-size: 26px; }
.people-screen .b-name { font-size: 31px; font-weight: 700; line-height: 1.25; display: flex; align-items: center; gap: 12px; min-width: 0; }
.people-screen .b-name > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.people-screen .b-name .tag { height: 32px; font-size: 18px; padding: 0 10px; flex: none; }
.people-screen .b-org { font-size: 21px; line-height: 1.4; color: var(--ink-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.people-screen .b-facts { margin: 14px 0 0; padding-top: 12px; border-top: 1.5px solid var(--line); display: grid; gap: 4px; }
.people-screen .b-facts div { display: grid; grid-template-columns: 76px 1fr; align-items: baseline; min-width: 0; }
.people-screen .b-facts dt { font-size: 19px; font-weight: 600; color: var(--ink-3); }
.people-screen .b-facts dd { font-size: 21px; line-height: 1.4; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.people-screen .screen-empty { grid-column: 1 / -1; grid-row: 1 / -1; display: grid; place-content: center; text-align: center; font-size: 28px; font-weight: 600; color: var(--ink-2); }

/* ---------- 점등식, 데모 바 (데모 전용) ---------- */
.flash { position: fixed; inset: 0; background: rgba(255, 236, 190, .55); z-index: 54; pointer-events: none; opacity: 0; }
.flash.go { animation: flash 1.6s ease-out forwards; }
@keyframes flash { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; } }
.cer { position: fixed; inset: 0; z-index: 55; pointer-events: none; display: grid; place-items: center; }
.cer .count { font-family: var(--font-num); font-weight: 800; font-size: 120px; color: var(--gold-2); }
.cer .cer-card { pointer-events: auto; max-width: 86vw; padding: 24px; border-radius: var(--r-xl); background: var(--surface); color: var(--ink); text-align: center; box-shadow: var(--shadow-toast); }
.cer .cer-card b { display: block; font-family: var(--font-num); font-weight: 800; font-size: 40px; color: var(--navy); margin: 4px 0; }
.cer .cer-card .btn { margin-top: var(--s-4); }
.demo-bar { position: sticky; top: 0; z-index: 60; background: var(--navy); color: var(--on-navy-2); font-size: 13px; padding: 7px 12px; display: flex; gap: 6px; align-items: center; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.demo-bar::-webkit-scrollbar { display: none; }
.demo-bar b { color: var(--gold-2); }
.demo-bar a, .demo-bar button { flex: none; text-decoration: none; padding: 3px 9px; border-radius: var(--r-full); border: 1px solid rgba(255, 255, 255, .25); color: var(--on-navy); background: transparent; font-size: 12.5px; }
.demo-bar a.on { background: var(--gold-2); color: var(--navy); border-color: var(--gold-2); font-weight: 700; }

@media (min-width: 600px) {
  .action-bar { position: sticky; }
  .page--with-bar { padding-bottom: var(--s-10); }
  .site-foot { padding-bottom: var(--s-10); }
  .has-bar .toast { bottom: calc(var(--bar-h) + 16px); }
  .sheet { left: 50%; right: auto; width: min(600px, 100vw); transform: translate(-50%, 100%); }
  .sheet.show { transform: translate(-50%, 0); }
}
@media (max-width: 374px) {
  .orn-grid, .swatch-grid { gap: 6px; }
  .orn-tile span { font-size: 13px; }
  .pin { grid-template-columns: repeat(4, 52px); gap: 8px; }
  .stage-chip { padding: 0 10px; }
  .stage-chip .ic { display: none; }
  .action-bar__row > .btn--primary { padding: 0 12px; }
  .top-bar .event-mark__name { font-size: 15px; }
  .top-bar .event-mark > svg { width: 22px; height: 22px; }
  .action-bar__row > .btn--secondary { padding: 0 10px; }
  .action-bar__row > .btn--secondary .ic { display: none; }
  .sheet__foot { padding-left: var(--s-4); padding-right: var(--s-4); }
  .sheet__foot .btn { padding: 0 12px; }
  .sheet__foot .btn + .btn .ic, .sheet__foot .btn:has(+ .btn) .ic { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===== 경품: 행운 추첨 응모 두 칸, 내년 목표 한 줄 안내, 센터 트리 안내 (docs/prize-design.md 10장, 12장) ===== */
.goal-note { margin: calc(var(--s-3) * -1 + 6px) 0 0; padding: 0 var(--s-1); font-size: var(--fs-help); line-height: 1.5; color: var(--ink-2); }
.lucky { list-style: none; margin: var(--s-3) 0 0; padding: 0; display: grid; gap: var(--s-2); }
.lucky li { display: flex; align-items: center; gap: var(--s-3); min-height: 56px; padding: var(--s-2) var(--s-3); border: 1.5px solid var(--line-strong); border-radius: var(--r-md); background: var(--surface); }
.lucky li.is-on { border-color: var(--green); background: var(--green-soft); }
.lucky__box { flex: none; width: 28px; height: 28px; border-radius: var(--r-sm); border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: #fff; }
.lucky__box.is-on { background: var(--green); border-color: var(--green); }
.lucky__box .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.lucky__main { flex: 1; min-width: 0; }
.lucky__main b { display: block; font-size: var(--fs-body); line-height: 1.4; color: var(--ink); }
.lucky__main small { display: block; font-size: var(--fs-meta); line-height: 1.4; color: var(--ink-2); }
.lucky__n { flex: none; font-family: var(--font-num); font-weight: 800; font-size: 22px; color: var(--navy); font-variant-numeric: tabular-nums; }
.lucky .btn { flex: none; }
.lucky__note { margin: var(--s-3) 0 0; font-size: var(--fs-meta); line-height: 1.5; color: var(--ink-2); }
.composer-note { display: flex; gap: var(--s-2); align-items: flex-start; margin: 0; padding: var(--s-3); border-radius: var(--r-md); background: var(--gold-soft); color: var(--ink); font-size: var(--fs-help); line-height: 1.5; }
.composer-note .ic { flex: none; width: 18px; height: 18px; margin-top: 2px; color: var(--gold-ink); }
#winBox .banner__text b { color: var(--ink); }
#cardRatio { margin-bottom: 12px; }

/* 한글 줄바꿈 (11-23): 낱말 중간에서 끊지 않기(body keep-all), 제목은 줄 길이 고르게, 문단은 마지막 줄에 한 낱말만 남지 않게.
   text-wrap: pretty 가 없는 브라우저(사파리 등)는 v2.js noOrphan 이 마지막 두 낱말을 붙여 줌 */
h1, h2, h3, .section__title, .banner__title, .card__title, .sheet__head h2, .goal__text, .done-hero h1 { text-wrap: balance; }
p, li, dd, .help, .banner__text, .section__desc, .card__desc, .list-row__sub, small { text-wrap: pretty; }

/* 11-23: 트리 처음 모습 단추는 숫자 줄 오른쪽 */
.tree-stats { align-items: center; }
.stats-tool { margin-left: auto; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--ink-2); border: 1px solid var(--line); }
.stats-tool .ic { width: 18px; height: 18px; }
.stats-tool:active { background: var(--sunken); }
.stage-chip--wait { color: var(--ink-2); }
.met-empty { margin: 4px 0 0; padding: 14px 16px; border-radius: var(--r-lg); background: var(--sunken); color: var(--ink-2); font-size: var(--fs-label); }
.logout-line { margin: 28px 0 0; text-align: center; }
.text-link { min-height: 44px; padding: 0 12px; background: none; border: 0; color: var(--ink-3, #6b7287); font-size: var(--fs-meta); text-decoration: underline; text-underline-offset: 3px; }

/* 11-23 누름 표시: 눌렀을 때 살짝 어두워지게 (손가락 아래가 바뀐 것이 보이게). 따로 :active 가 있는 단추는 그대로 */
:where(.btn:not(.btn--primary):not(.btn--secondary), .chip, .pill, .seg button, .list-row, .orn-tile, .person, .person__pick, .goal__edit, .stats-tool, .text-link, .icon-btn):active { filter: brightness(.93); }
:where(.btn, .chip, .pill, .seg button, .list-row, .orn-tile, .person__pick, .icon-btn) { -webkit-tap-highlight-color: transparent; }

/* 11-23 15시: 입체 오너먼트 그림(검토판 전용)은 흰 카드 위에서도 윤곽이 보이게 얇은 그림자 */
img.orn--3d { filter: drop-shadow(0 0 .5px rgba(23,34,58,.6)) drop-shadow(0 1px 2px rgba(23,34,58,.3)); }
/* 이름이 두 줄인 것(미니 무너 키트)이 있어도 같은 줄 카드들의 기업명 높이가 맞게 이름 자리를 두 줄 높이로 */
.orn-tile > span { display: flex; align-items: center; justify-content: center; min-height: 2.6em; }
