/* =========================================================
   취합 — 디자인 시스템
   모바일(카카오톡 인앱 브라우저)이 기준, 1024px 이상에서 PC 배치.
   색은 모두 토큰으로 쓰고, 다크 모드는 토큰만 바꾼다.
   ========================================================= */
:root {
  color-scheme: light dark;
  --bg: #f2f4f2;
  --surface: #ffffff;
  --fill: #f1f3f1;
  --fill-strong: #e5e9e6;
  --ink: #141c18;
  --ink-2: #4a5550;
  --ink-3: #7d8782;
  --ink-4: #aab2ae;
  --line: #e4e8e5;
  --line-strong: #cfd5d1;
  --card-edge: rgba(20, 28, 24, .04);

  --primary: #0b7a63;
  --primary-press: #086451;
  --on-primary: #ffffff;
  --primary-soft: #e1f2ec;
  --primary-ink: #08654f;
  --primary-glow: rgba(11, 122, 99, .28);

  --accent: #f5c33b;
  --accent-soft: #fff4d3;
  --accent-ink: #7a5300;
  --warn-soft: #fff0e1;
  --warn-ink: #a24a05;
  --danger: #d6373a;
  --danger-soft: #fdeceb;
  --danger-ink: #b42326;
  --info-soft: #ebf0fd;
  --info-ink: #2e4fb5;

  --shadow-1: 0 1px 2px rgba(16, 24, 20, .04), 0 1px 4px rgba(16, 24, 20, .04);
  --shadow-2: 0 2px 4px rgba(16, 24, 20, .04), 0 10px 28px rgba(16, 24, 20, .08);
  --shadow-3: 0 24px 64px rgba(10, 16, 13, .22);

  --r-xs: 8px;
  --r-sm: 12px;
  --r: 16px;
  --r-lg: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", system-ui, "Noto Sans KR", "Malgun Gothic", "Segoe UI", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "D2Coding", monospace;
  --page-w: 720px;
  --top-h: 60px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c110f;
    --surface: #151b18;
    --fill: #1d2421;
    --fill-strong: #27302c;
    --ink: #ecf1ee;
    --ink-2: #b4bdb8;
    --ink-3: #828c87;
    --ink-4: #59635e;
    --line: #242c28;
    --line-strong: #36403b;
    --card-edge: #222a26;

    --primary: #36c39f;
    --primary-press: #2ba886;
    --on-primary: #03261c;
    --primary-soft: rgba(54, 195, 159, .14);
    --primary-ink: #5ed6b5;
    --primary-glow: rgba(54, 195, 159, .25);

    --accent-soft: rgba(245, 195, 59, .13);
    --accent-ink: #f2cd6a;
    --warn-soft: rgba(242, 140, 52, .14);
    --warn-ink: #f4a462;
    --danger: #ec5558;
    --danger-soft: rgba(236, 85, 88, .14);
    --danger-ink: #f58d8f;
    --info-soft: rgba(120, 150, 255, .14);
    --info-ink: #a5b8ff;

    --shadow-1: 0 0 0 1px rgba(0, 0, 0, 0);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, .35);
    --shadow-3: 0 24px 64px rgba(0, 0, 0, .55);
  }
}
body[data-w="lg"] { --page-w: 1120px; }
body[data-w="sm"] { --page-w: 560px; }

/* ---------- 기본 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 12px); }
html.modal-open { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  letter-spacing: -.01em;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary-ink); text-underline-offset: 3px; }
button, input, textarea, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { line-height: 1.3; margin: 0; letter-spacing: -.025em; }
p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; }
:focus-visible { outline: 3px solid var(--primary-glow); outline-offset: 2px; }
::selection { background: var(--primary-soft); }

.i { width: 20px; height: 20px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hidden { display: none !important; }
.pre { white-space: pre-wrap; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.tiny { font-size: 13px; color: var(--ink-3); line-height: 1.5; }
.num { font-variant-numeric: tabular-nums; }
.grow { flex: 1 1 auto; min-width: 0; }
.center { text-align: center; }
.warn-text { color: var(--warn-ink) !important; }

.stack > * + * { margin-top: 12px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 20px; }
.stack-xl > * + * { margin-top: 32px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.end { justify-content: flex-end; }
.row.nowrap { flex-wrap: nowrap; }
.btn-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }

/* ---------- 상단 막대 · 쪽 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
}
.topbar-inner {
  max-width: var(--page-w); margin: 0 auto; height: var(--top-h);
  padding: 0 20px; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 19px; letter-spacing: -.04em; }
.brand-mark { width: 30px; height: 30px; }
.brand small { font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: 0; margin-left: 2px; }

.page {
  max-width: var(--page-w); margin: 0 auto;
  padding: 8px 20px calc(132px + env(safe-area-inset-bottom));
  padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right));
}
.page.no-dock { padding-bottom: 24px; }
.view-enter { animation: rise .4s var(--ease) both; }

.page-head { padding: 4px 0 4px; }
.page-head h1 { font-size: 26px; font-weight: 800; letter-spacing: -.035em; }
.page-head .sub { color: var(--ink-2); margin-top: 6px; }
.back { display: inline-flex; align-items: center; gap: 2px; margin-left: -6px; padding: 6px 8px 6px 2px; border-radius: 10px; color: var(--ink-2); font-size: 15px; font-weight: 600; text-decoration: none; }
.back .i { width: 20px; height: 20px; }
@media (hover: hover) { .back:hover { background: var(--fill); color: var(--ink); } }

.site-footer {
  max-width: var(--page-w); margin: 56px auto 0;
  padding: 24px 20px calc(36px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
  color: var(--ink-3); font-size: 13px;
}
.site-footer a { color: inherit; }

/* ---------- 카드 ---------- */
.card {
  background: var(--surface);
  border-radius: var(--r-lg);
  padding: 20px;
  box-shadow: var(--shadow-1), 0 0 0 1px var(--card-edge);
}
.card.pad-lg { padding: 24px; }
.card.tight { padding: 8px 20px; }
.card.highlight { box-shadow: 0 0 0 2px var(--accent), 0 10px 30px rgba(245, 195, 59, .18); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 750; letter-spacing: -.025em; }
.card-title .i { width: 20px; height: 20px; color: var(--ink-3); }
.card-sub { font-size: 14px; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }
.divider { height: 1px; background: var(--line); margin: 18px 0; border: 0; }

/* ---------- 버튼 ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: var(--h); min-height: var(--h); padding: 0 18px;
  border: 0; border-radius: var(--r-sm);
  background: var(--fill); color: var(--ink);
  font-size: 15.5px; font-weight: 650; line-height: 1.2; letter-spacing: -.015em;
  text-decoration: none; white-space: nowrap; cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: background-color .15s, box-shadow .15s, color .15s, transform .12s var(--ease);
}
.btn .i { width: 18px; height: 18px; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.soft { background: var(--primary-soft); color: var(--primary-ink); }
.btn.outline { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn.ghost { background: transparent; color: var(--ink-2); }
.btn.danger { background: var(--danger-soft); color: var(--danger-ink); }
.btn.danger.solid { background: var(--danger); color: #fff; }
.btn.lg { --h: 56px; font-size: 17px; font-weight: 700; border-radius: 16px; padding: 0 22px; }
.btn.sm { --h: 38px; font-size: 14px; padding: 0 13px; border-radius: 10px; gap: 5px; }
.btn.sm .i { width: 16px; height: 16px; }
.btn.xs { --h: 32px; font-size: 13px; padding: 0 10px; border-radius: 9px; gap: 4px; }
.btn.xs .i { width: 15px; height: 15px; }
.btn.block { display: flex; width: 100%; }
.btn.icon-only { padding: 0; width: var(--h); }
.btn.wrap { white-space: normal; text-align: center; height: auto; padding-top: 10px; padding-bottom: 10px; }
.btn[disabled] { cursor: not-allowed; transform: none; }
.btn.primary[disabled] { background: var(--fill-strong); color: var(--ink-3); }
.btn:not(.primary)[disabled] { opacity: .45; }
@media (hover: hover) {
  .btn:hover { background: var(--fill-strong); }
  .btn.primary:hover { background: var(--primary-press); }
  .btn.soft:hover { background: color-mix(in srgb, var(--primary-soft) 70%, var(--primary) 12%); }
  .btn.outline:hover { background: var(--fill); }
  .btn.ghost:hover { background: var(--fill); color: var(--ink); }
  .btn.danger:hover { background: color-mix(in srgb, var(--danger-soft) 75%, var(--danger) 12%); }
  .btn.danger.solid:hover { background: color-mix(in srgb, var(--danger) 88%, #000); }
  .btn.primary[disabled]:hover { background: var(--fill-strong); }
}
.btn-google { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-google svg { width: 18px; height: 18px; }

/* ---------- 배지 · 칩 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary-ink);
  font-size: 13px; font-weight: 700; white-space: nowrap; letter-spacing: -.01em;
}
.badge .i { width: 15px; height: 15px; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge.live .dot { animation: pulse 1.8s ease-in-out infinite; }
.badge.closed { background: var(--fill-strong); color: var(--ink-2); }
.badge.warn { background: var(--warn-soft); color: var(--warn-ink); }
.badge.accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge.plain { background: var(--surface); color: var(--ink-2); font-weight: 650; box-shadow: inset 0 0 0 1px var(--line); }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 34px; padding: 0 11px; border-radius: 10px;
  background: var(--warn-soft); color: var(--warn-ink);
  font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums;
}
.chip.tap { border: 0; cursor: pointer; font-family: inherit; transition: filter .15s, transform .1s; }
.chip.tap:active { transform: scale(.95); }
@media (hover: hover) { .chip.tap:hover { filter: brightness(.95); } }
.chip-btn {
  display: inline-flex; align-items: center; gap: 4px;
  height: 34px; padding: 0 13px; border-radius: 999px; border: 0;
  background: var(--fill); color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color .15s, color .15s;
}
.chip-btn .i { width: 15px; height: 15px; }
.chip-btn:active { transform: scale(.96); }
.chip-btn[aria-pressed="true"] { background: var(--primary-soft); color: var(--primary-ink); }
@media (hover: hover) { .chip-btn:hover { background: var(--fill-strong); color: var(--ink); } }

/* ---------- 알림 상자 ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 13px 15px; border-radius: var(--r-sm);
  background: var(--warn-soft); color: var(--warn-ink);
  font-size: 14.5px; line-height: 1.55; font-weight: 500;
}
.alert > .i { width: 19px; height: 19px; margin-top: 1px; }
.alert.error { background: var(--danger-soft); color: var(--danger-ink); }
.alert.ok { background: var(--primary-soft); color: var(--primary-ink); }
.alert.urgent { align-items: center; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn-ink) 25%, transparent); }
.alert.urgent .tiny { color: inherit; opacity: .85; margin-top: 2px; }
.alert.info { background: var(--info-soft); color: var(--info-ink); }
.notice {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 15px 16px; border-radius: var(--r);
  background: var(--accent-soft); color: var(--ink);
  font-size: 15px; line-height: 1.6;
}
.notice > .i { color: var(--accent-ink); margin-top: 2px; }
.notice p { white-space: pre-wrap; }

/* ---------- 입력 ---------- */
.field { display: block; }
.field-label { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 14px; font-weight: 650; color: var(--ink-2); }
.field-label .opt { font-weight: 500; color: var(--ink-3); }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 8px; line-height: 1.5; }
input[type=text], input[type=number], input[type=datetime-local], input[type=search], textarea, select {
  width: 100%; min-height: 52px; padding: 14px 16px;
  border: 1.5px solid transparent; border-radius: var(--r-sm);
  background: var(--fill); color: var(--ink);
  font-size: 16px; line-height: 1.45; /* iOS 확대 방지: 16px 이상 */
  outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: var(--ink-4); }
input:focus, textarea:focus, select:focus { background-color: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
input:disabled, textarea:disabled, select:disabled { color: var(--ink-3); cursor: not-allowed; }
input[readonly], textarea[readonly] { color: var(--ink-2); }
input[type=datetime-local] { text-align: left; }
input[type=datetime-local]::-webkit-date-and-time-value { text-align: left; }
input[type=datetime-local]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237d8782' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
}
.on-bg input[type=text], .on-bg textarea, input.on-bg, textarea.on-bg { background: var(--surface); border-color: var(--line); }
.on-bg input[type=text]:focus, .on-bg textarea:focus, input.on-bg:focus, textarea.on-bg:focus { border-color: var(--primary); }

/* 분할 선택 */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--fill); }
.seg label { position: relative; display: block; min-width: 0; }
.seg input { position: absolute; inset: 0; opacity: 0; margin: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 42px; padding: 6px 8px; border-radius: 10px;
  color: var(--ink-3); font-size: 15px; font-weight: 650; text-align: center; line-height: 1.25;
  cursor: pointer; transition: background-color .18s, color .18s, box-shadow .18s;
}
.seg span .i { width: 17px; height: 17px; }
.seg input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 20, .1), 0 0 0 1px var(--card-edge); }
.seg input:focus-visible + span { outline: 3px solid var(--primary-glow); outline-offset: 0; }
.seg input:disabled + span { cursor: not-allowed; }
.seg input:disabled:not(:checked) + span { opacity: .55; }

/* 탭 */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 13px; background: var(--fill); }
.tab {
  flex: 1; height: 38px; border: 0; border-radius: 10px; background: transparent;
  color: var(--ink-3); font-size: 14.5px; font-weight: 650; cursor: pointer; transition: background-color .15s, color .15s;
}
.tab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 20, .1), 0 0 0 1px var(--card-edge); }

/* 스위치 */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.switch-row .label { font-size: 15px; font-weight: 650; }
.switch { position: relative; flex: none; width: 50px; height: 30px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--fill-strong); transition: background-color .2s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .22s var(--ease); }
.switch input:checked + i { background: var(--primary); }
.switch input:checked + i::after { transform: translateX(20px); }
.switch input:focus-visible + i { outline: 3px solid var(--primary-glow); outline-offset: 2px; }

/* 숫자 조절 */
.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: var(--fill); }
.stepper button { width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; box-shadow: 0 1px 2px rgba(16, 24, 20, .08); }
.stepper button:active { transform: scale(.94); }
.stepper button[disabled] { opacity: .4; cursor: not-allowed; }
.stepper input[type=number] {
  width: 76px; min-height: 44px; padding: 0 4px; border: 0; background: transparent; box-shadow: none;
  text-align: center; font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.stepper input[type=number]:focus { background: var(--surface); box-shadow: none; border: 0; border-radius: 10px; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* 링크 입력칸 + 복사 */
.linkfield { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 4px; border-radius: 14px; background: var(--fill); }
.linkfield input[type=text] { flex: 1; min-width: 0; min-height: 40px; padding: 8px 10px; background: transparent; border: 0; box-shadow: none; font-size: 15px; font-weight: 600; color: var(--ink); text-overflow: ellipsis; }
.linkfield input[type=text]:focus { box-shadow: none; background: transparent; }

/* ---------- 진행률 ---------- */
.progress { height: 10px; border-radius: 999px; background: var(--fill-strong); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .6s var(--ease); }
.ring-wrap { position: relative; width: 84px; height: 84px; flex: none; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--fill-strong); stroke-width: 7; }
.ring-bar { fill: none; stroke: var(--primary); stroke-width: 7; stroke-linecap: round; transition: stroke-dasharray .6s var(--ease); }
.ring-label { position: absolute; inset: 0; display: grid; place-items: center; font-size: 18px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.ring-wrap.full .ring-label { color: var(--primary-ink); }

/* ---------- 바닥 고정 버튼 ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right));
  background: linear-gradient(to top, var(--bg) 62%, transparent);
  pointer-events: none;
}
.dock-inner { max-width: var(--page-w); margin: 0 auto; display: grid; gap: 8px; pointer-events: auto; }
body[data-w="lg"] .dock-inner, body[data-w="md"] .dock-inner { max-width: 640px; }
.dock .btn-row .btn { min-width: 0; }
@media (min-width: 1024px) {
  .dock.mobile-only { display: none; }
  .dock.static-lg { position: static; padding: 8px 0 0; background: none; }
  .dock.static-lg .dock-inner { max-width: none; display: flex; flex-direction: row-reverse; justify-content: flex-start; }
  .dock.static-lg .btn.block { width: auto; min-width: 200px; }
}

/* ---------- 알림 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); z-index: 80;
  max-width: min(92vw, 440px); padding: 12px 18px; border-radius: 14px;
  background: #1c2420; color: #fff; font-size: 14.5px; font-weight: 600; text-align: center; line-height: 1.45;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  opacity: 0; transform: translate(-50%, 12px); transition: opacity .2s, transform .25s var(--ease); pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
body:has(.dock:not(.static-lg)) .toast { bottom: calc(104px + env(safe-area-inset-bottom)); }
@media (prefers-color-scheme: dark) { .toast { background: #eef3f0; color: #101613; } }

/* ---------- 모달 (휴대폰: 아래에서 올라오는 시트, PC: 가운데 창) ---------- */
.modal-back {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(8, 12, 10, .48); animation: fade .2s ease both;
}
.modal {
  width: 100%; max-width: 520px; max-height: 92vh; max-height: 92dvh; overflow: auto; overscroll-behavior: contain;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-3);
  animation: sheet-up .32s var(--ease) both;
}
.modal::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 5px; background: var(--line-strong); margin: 0 auto 18px; }
.modal-title { font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.modal-sub { font-size: 14.5px; color: var(--ink-2); margin: 8px 0 16px; line-height: 1.55; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
@media (min-width: 640px) {
  .modal-back { align-items: center; padding: 24px; }
  .modal { border-radius: 24px; padding: 28px; animation: pop-in .22s var(--ease) both; }
  .modal::before { display: none; }
  .modal-actions .btn { flex: 0 0 auto; min-width: 96px; }
}

/* 공유 시트 항목 */
.share-list { display: grid; gap: 8px; }
.share-row { display: flex; gap: 6px; align-items: center; }
.share-row .share-item { flex: 1; min-width: 0; }
/* 카카오톡 공유 버튼: 카카오 노란색에 검은 글자(카카오 디자인 가이드) */
.btn.kakao { background: #FEE500; color: rgba(0, 0, 0, .85); }
@media (hover: hover) { .btn.kakao:hover { background: #F5DC00; } }
.remind-preview {
  margin: 0 0 16px; padding: 13px 15px; border-radius: var(--r-sm);
  background: var(--fill); color: var(--ink); font: inherit; font-size: 14.5px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-all;
}
.share-item {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px 14px; border: 0; border-radius: var(--r); background: var(--fill);
  text-align: left; cursor: pointer; color: var(--ink); transition: background-color .15s;
}
.share-item:active { transform: scale(.985); }
@media (hover: hover) { .share-item:hover { background: var(--fill-strong); } }
.share-item .ico { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--surface); color: var(--primary-ink); box-shadow: 0 0 0 1px var(--card-edge); }
.share-item .ico.warn { color: var(--warn-ink); }
.share-item .t { font-weight: 700; font-size: 16px; }
.share-item .s { font-size: 13.5px; color: var(--ink-3); margin-top: 1px; line-height: 1.45; }
.share-item > .i:last-child { color: var(--ink-4); }

/* ---------- 빈 상태 · 불러오는 중 ---------- */
.empty { text-align: center; padding: 40px 24px; }
.empty-icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; display: grid; place-items: center; background: var(--fill); color: var(--ink-3); }
.empty-icon .i { width: 30px; height: 30px; }
.empty h1, .empty h2 { font-size: 21px; font-weight: 800; }
.empty p { color: var(--ink-2); margin-top: 8px; }
.empty .row { justify-content: center; margin-top: 22px; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--fill-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; margin: 72px auto; }

/* =========================================================
   응답자 화면
   ========================================================= */
.r-hero { padding-top: 6px; }
.r-title { font-size: 26px; font-weight: 800; letter-spacing: -.035em; line-height: 1.3; }
.r-deadline { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 5px; color: var(--ink-2); font-size: 14px; font-weight: 550; }
.r-deadline .i { width: 17px; height: 17px; color: var(--ink-3); }
.r-deadline b { font-weight: 650; color: var(--ink-2); }
.r-deadline b.soon { color: var(--warn-ink); }
.q-question { font-size: 18px; font-weight: 650; color: var(--ink); line-height: 1.55; letter-spacing: -.025em; white-space: pre-wrap; }

.step { scroll-margin-top: calc(var(--top-h) + 16px); }
.step-head { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.step-num {
  position: relative; width: 28px; height: 28px; flex: none; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--surface);
  font-size: 14px; font-weight: 800; transition: background-color .25s;
}
.step-num > * { grid-area: 1 / 1; transition: opacity .2s, transform .25s var(--spring); }
.step-num .i { width: 16px; height: 16px; stroke-width: 3; opacity: 0; transform: scale(.4); }
.step.done .step-num { background: var(--primary); color: var(--on-primary); }
.step.done .step-num b { opacity: 0; transform: scale(.4); }
.step.done .step-num .i { opacity: 1; transform: none; }
.step-title { font-size: 18px; font-weight: 750; letter-spacing: -.03em; }
.step-sub { font-size: 14px; color: var(--ink-3); margin-top: 1px; }

.seat-search { position: relative; margin-bottom: 12px; }
.seat-search .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 19px; height: 19px; pointer-events: none; }
.seat-search input[type=search] { padding-left: 42px; background: var(--surface); border-color: var(--line); }
.seat-search input[type=search]::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(54px, 1fr)); gap: 8px; }
.seat {
  position: relative; height: 54px; padding: 0; border: 0; border-radius: 14px;
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color .15s, box-shadow .15s, color .15s, transform .12s var(--ease);
}
.seat:active { transform: scale(.93); }
@media (hover: hover) { .seat:hover { box-shadow: inset 0 0 0 1.5px var(--primary); } }
.seat[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px -6px var(--primary-glow); }
.seat.taken { background: var(--warn-soft); color: var(--warn-ink); box-shadow: inset 0 0 0 1px transparent; text-decoration: line-through; text-decoration-thickness: 2px; }
.seat.taken[aria-pressed="true"] { background: var(--warn-ink); color: #fff; box-shadow: none; }
.seat.mine::after { content: "내 칸"; position: absolute; left: 0; right: 0; bottom: 4px; font-size: 10px; font-weight: 700; opacity: .8; line-height: 1; }
.seat.mine { padding-bottom: 10px; }
.seats.names { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
.seats.names .seat { height: auto; min-height: 54px; padding: 8px 6px; font-size: 15.5px; line-height: 1.3; word-break: keep-all; }
.seats.names .seat.mine { padding-bottom: 18px; }
.seats-empty { padding: 18px; text-align: center; color: var(--ink-3); font-size: 14.5px; grid-column: 1 / -1; }

.picked {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 12px 12px 14px; border-radius: var(--r);
  background: var(--surface); box-shadow: inset 0 0 0 2px var(--primary);
  animation: pop-in .25s var(--ease) both;
}
.picked-badge {
  min-width: 46px; height: 46px; padding: 0 10px; border-radius: 13px; flex: none;
  display: grid; place-items: center; background: var(--primary); color: var(--on-primary);
  font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums;
}
.picked-name { font-size: 17px; font-weight: 750; letter-spacing: -.02em; line-height: 1.35; }
.picked-sub { font-size: 13.5px; color: var(--ink-3); line-height: 1.45; margin-top: 1px; }
.picked-sub.warn { color: var(--warn-ink); }
.picked-sub.info { color: var(--info-ink); }

.choices { display: grid; gap: 10px; }
.choice {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px;
  padding: 14px 18px; border: 0; border-radius: var(--r);
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 17px; font-weight: 650; text-align: left; letter-spacing: -.02em; cursor: pointer;
  transition: background-color .15s, box-shadow .15s, transform .12s var(--ease);
}
.choice:active { transform: scale(.985); }
@media (hover: hover) { .choice:hover { box-shadow: inset 0 0 0 1.5px var(--primary); } }
.choice .dot { position: relative; width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; box-shadow: inset 0 0 0 2px var(--line-strong); transition: background-color .15s, box-shadow .15s; }
.choice .dot .i { width: 15px; height: 15px; stroke-width: 3.2; color: var(--on-primary); opacity: 0; transform: scale(.5); transition: opacity .15s, transform .2s var(--spring); }
.choice.multi .dot { border-radius: 8px; }
.choice[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--primary); background: color-mix(in srgb, var(--surface) 92%, var(--primary)); }
.choice[aria-checked="true"] .dot { background: var(--primary); box-shadow: none; }
.choice[aria-checked="true"] .dot .i { opacity: 1; transform: none; }
.choice:not(.multi)[aria-checked="true"] .dot::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--on-primary); }
.choice-wrap { border-radius: var(--r); }
.choice-wrap.open { background: color-mix(in srgb, var(--surface) 92%, var(--primary)); box-shadow: inset 0 0 0 2px var(--primary); }
.choice-wrap.open .choice { background: transparent; box-shadow: none; }
.choice-note { position: relative; padding: 0 16px 16px 56px; animation: rise .25s var(--ease) both; }
/* 고른 선택지에 딸린 추가 답변: 체크 표시 아래에서 내려오는 └ 연결선 */
.choice-note::before {
  content: ''; position: absolute; left: 27px; top: -8px; width: 18px; height: 62px;
  border-left: 2px solid color-mix(in srgb, var(--primary) 40%, transparent);
  border-bottom: 2px solid color-mix(in srgb, var(--primary) 40%, transparent);
  border-bottom-left-radius: 10px;
}
.choice-note .tiny { margin-bottom: 6px; color: var(--ink-2); font-weight: 600; }
.choice-note input[type=text] { background: var(--surface); border-color: var(--line); min-height: 48px; }
.answer-text textarea { background: var(--surface); border-color: var(--line); min-height: 112px; font-size: 17px; }
.answer-text textarea:focus { border-color: var(--primary); }
.counter { text-align: right; font-size: 12.5px; color: var(--ink-4); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* 제출 완료 */
.done-card { text-align: center; padding: 32px 20px 22px; }
.done-icon {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--primary); color: var(--on-primary);
  box-shadow: 0 12px 30px -8px var(--primary-glow);
}
.done-icon .i { width: 38px; height: 38px; stroke-width: 3; }
.done-card.fresh .done-icon { animation: pop .55s var(--spring) both; }
.done-card.fresh .done-icon .i path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw .4s .25s ease-out forwards; }
.done-title { font-size: 23px; font-weight: 800; letter-spacing: -.035em; }
.done-sub { color: var(--ink-2); font-size: 15px; margin-top: 6px; }
.receipt { margin: 22px 0 18px; padding: 6px 16px; border-radius: var(--r); background: var(--fill); text-align: left; }
.receipt > div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; }
.receipt > div + div { border-top: 1px solid var(--line); }
.receipt dt { flex: none; font-size: 14px; color: var(--ink-3); }
.receipt dd { font-weight: 700; text-align: right; white-space: pre-wrap; min-width: 0; }
.receipt .seat-big { font-size: 18px; color: var(--primary-ink); }
.receipt .done-answer { font-size: 17px; }
.promo { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 4px; padding: 12px; color: var(--ink-3); font-size: 14px; font-weight: 600; text-decoration: none; }
.promo .i { width: 16px; height: 16px; }
@media (hover: hover) { .promo:hover { color: var(--primary-ink); } }

/* =========================================================
   취합자 화면
   ========================================================= */
/* 첫 화면 */
.hero { display: grid; gap: 36px; padding: 20px 0 12px; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-ink); font-size: 13.5px; font-weight: 700; }
.eyebrow .i { width: 15px; height: 15px; }
.display { font-size: clamp(32px, 8.6vw, 54px); font-weight: 850; line-height: 1.2; letter-spacing: -.045em; margin-top: 18px; }
.display em { font-style: normal; color: var(--primary-ink); }
.lead { font-size: clamp(16px, 4.2vw, 19px); color: var(--ink-2); line-height: 1.65; margin-top: 16px; max-width: 34em; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hero-cta .btn { min-width: 0; }
@media (max-width: 639px) { .hero-cta .btn { flex: 1 1 100%; } }
.checks { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 18px; font-size: 14px; color: var(--ink-2); }
.checks li { display: inline-flex; align-items: center; gap: 5px; }
.checks .i { width: 16px; height: 16px; color: var(--primary); stroke-width: 2.6; }

/* 대화방 모형 */
.mock { position: relative; margin: 0 auto; width: 100%; max-width: 400px; }
.mock-chat {
  border-radius: 28px; padding: 18px 16px 20px; background: #b8cddc;
  box-shadow: var(--shadow-2); overflow: hidden;
}
@media (prefers-color-scheme: dark) { .mock-chat { background: #22303a; } }
.mock-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: rgba(0, 0, 0, .6); margin-bottom: 14px; padding: 0 2px; }
@media (prefers-color-scheme: dark) { .mock-head { color: rgba(255, 255, 255, .6); } }
.mock-msg { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.mock-msg.me { justify-content: flex-end; }
.mock-ava { width: 34px; height: 34px; border-radius: 13px; background: #fff; flex: none; display: grid; place-items: center; font-size: 15px; }
.mock-bubble { max-width: 78%; padding: 10px 12px; border-radius: 4px 16px 16px 16px; background: #fff; color: #1b1f1d; font-size: 13.5px; line-height: 1.5; box-shadow: 0 1px 1px rgba(0, 0, 0, .05); }
.mock-msg.me .mock-bubble { border-radius: 16px 4px 16px 16px; background: #fee500; }
.mock-bubble .name { font-size: 11.5px; color: #6c7570; margin-bottom: 2px; }
.mock-link { margin-top: 8px; border-radius: 10px; overflow: hidden; border: 1px solid #e3e6e4; background: #fff; }
.mock-link .img { height: 74px; background: linear-gradient(135deg, #0b7a63, #0d9a7c 60%, #26b893); display: flex; align-items: center; justify-content: center; gap: 8px; color: #fff; font-weight: 800; font-size: 19px; letter-spacing: -.04em; }
.mock-link .img svg { width: 26px; height: 26px; }
.mock-link .meta { padding: 8px 10px; }
.mock-link .meta b { display: block; font-size: 13px; }
.mock-link .meta span { font-size: 11.5px; color: #8a918d; }
.mock-result { font-family: var(--mono); font-size: 12.5px; white-space: pre; line-height: 1.55; }
.mock-float {
  position: absolute; left: -10px; bottom: 26px; width: 172px; padding: 14px 14px 12px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow-2), 0 0 0 1px var(--card-edge); color: var(--ink);
  animation: float 6s ease-in-out infinite;
}
.mock-float .k { font-size: 12px; color: var(--ink-3); font-weight: 650; }
.mock-float .v { font-size: 26px; font-weight: 850; letter-spacing: -.04em; line-height: 1.1; margin: 2px 0 8px; }
.mock-float .v small { font-size: 13px; color: var(--ink-3); font-weight: 650; letter-spacing: 0; }
.mock-float .progress { height: 7px; }
.mock-float .miss { margin-top: 8px; font-size: 11.5px; color: var(--warn-ink); font-weight: 650; }

.section { padding-top: 56px; }
.section-title { font-size: clamp(22px, 5.6vw, 30px); font-weight: 800; letter-spacing: -.04em; }
.section-lead { color: var(--ink-2); margin-top: 8px; }
.steps3 { display: grid; gap: 12px; margin-top: 24px; counter-reset: s; }
.step-card { padding: 22px 20px; border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--card-edge); }
.step-card .n { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); font-weight: 850; margin-bottom: 14px; }
.step-card h3 { font-size: 17.5px; font-weight: 750; }
.step-card p { color: var(--ink-2); font-size: 15px; margin-top: 6px; line-height: 1.6; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 24px; }
.feature { padding: 18px 16px; border-radius: var(--r); background: var(--surface); box-shadow: 0 0 0 1px var(--card-edge); }
.feature .i { width: 22px; height: 22px; color: var(--primary); margin-bottom: 10px; }
.feature h3 { font-size: 15.5px; font-weight: 700; letter-spacing: -.02em; }
.feature p { display: block; font-size: 13.5px; color: var(--ink-3); margin-top: 3px; line-height: 1.5; }
.faq { display: grid; gap: 8px; margin-top: 20px; }
.faq details { border-radius: var(--r); background: var(--surface); box-shadow: 0 0 0 1px var(--card-edge); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; font-weight: 700; letter-spacing: -.02em; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chev { flex: none; width: 18px; height: 18px; color: var(--ink-3); transition: transform .2s var(--ease); }
.faq details[open] summary .chev { transform: rotate(180deg); }
.faq details p { padding: 0 18px 16px; color: var(--ink-2); font-size: 14.5px; line-height: 1.65; }
.cta-band { margin-top: 56px; padding: 32px 24px; border-radius: 26px; text-align: center; background: linear-gradient(140deg, #0b7a63, #0a6a56 55%, #0b5b4a); color: #fff; box-shadow: var(--shadow-2); }
.cta-band h2 { font-size: clamp(22px, 5.4vw, 28px); font-weight: 800; letter-spacing: -.04em; }
.cta-band p { opacity: .85; margin-top: 8px; }
.cta-band .row { justify-content: center; margin-top: 22px; }
.cta-band .btn.light { background: #fff; color: #0a5d4c; }
.cta-band .btn.glass { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }

@media (min-width: 720px) {
  .steps3 { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1024px) {
  .hero { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); align-items: center; gap: 56px; padding: 56px 0 24px; }
  .mock { max-width: 420px; }
  .mock-float { left: -48px; bottom: 34px; }
  .section { padding-top: 88px; }
  .cta-band { padding: 48px; }
}

/* 사용자 */
.user { display: flex; align-items: center; gap: 4px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); font-size: 14px; font-weight: 800; flex: none; }
.user-name { font-size: 14px; font-weight: 600; color: var(--ink-2); max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin: 0 4px 0 4px; }
@media (max-width: 420px) { .user-name { display: none; } }

/* 내 취합 목록 */
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.summary-chips { display: flex; gap: 6px; margin-top: 10px; }
.g-list { display: grid; gap: 12px; }
.gather-item {
  display: block; padding: 18px 20px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow-1), 0 0 0 1px var(--card-edge);
  color: inherit; text-decoration: none; transition: transform .18s var(--ease), box-shadow .18s;
}
.gather-item:active { transform: scale(.99); }
@media (hover: hover) { .gather-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-2), 0 0 0 1px var(--card-edge); } }
.gather-item .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.gather-item .title { font-size: 17px; font-weight: 750; letter-spacing: -.025em; line-height: 1.4; }
.gather-item .meta { font-size: 13.5px; color: var(--ink-3); margin-top: 4px; }
.gather-item .bar { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.gather-item .bar .progress { flex: 1; height: 8px; }
.gather-item .count { font-size: 15px; font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.gather-item .count small { color: var(--ink-3); font-weight: 600; }
@media (min-width: 720px) { .g-list { grid-template-columns: 1fr 1fr; } }

/* 만들기·편집 */
.form-card { padding: 22px 20px 24px; }
.form-card > * + * { margin-top: 20px; }
.form-card-head { display: flex; gap: 12px; align-items: flex-start; }
.form-card-head .n { width: 30px; height: 30px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-ink); font-weight: 850; font-size: 14px; }
.form-card-head h2 { font-size: 18px; font-weight: 750; letter-spacing: -.03em; line-height: 30px; }
.form-card-head p { font-size: 14px; color: var(--ink-3); margin-top: 2px; line-height: 1.5; }
.opt-list { display: grid; gap: 10px; }
.opt-row { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 8px; border-radius: 16px; background: var(--fill); }
.opt-row input[type=text], .opt-row select { background-color: var(--surface); min-height: 46px; padding-top: 11px; padding-bottom: 11px; }
.opt-row input[type=text]:focus, .opt-row select:focus { border-color: var(--primary); }
.opt-row select { font-size: 14.5px; color: var(--ink-2); }
.opt-row .opt-del { width: 46px; height: 46px; border: 0; border-radius: 12px; background: transparent; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; }
.opt-row .opt-del:hover { background: var(--fill-strong); color: var(--danger-ink); }
.opt-row .opt-del[disabled] { opacity: .4; cursor: not-allowed; }
.opt-row .opt-del { grid-row: 1; grid-column: 2; }
.opt-row .opt-mode { grid-column: 1 / -1; }
.opt-row .opt-hint-wrap { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding-left: 14px; }
.opt-row .opt-hint { flex: 1; min-width: 0; font-size: 15px; }
.sub-elbow { flex: none; align-self: flex-start; width: 14px; height: 30px; margin-top: -6px; border-left: 2px solid var(--ink-4); border-bottom: 2px solid var(--ink-4); border-bottom-left-radius: 8px; opacity: .6; }
@media (min-width: 640px) {
  .opt-row { grid-template-columns: minmax(0, 1fr) 168px auto; }
  .opt-row .opt-mode { grid-row: 1; grid-column: 2; }
  .opt-row .opt-del { grid-row: 1; grid-column: 3; }
}
.presets { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.presets .tiny { margin-right: 2px; }
.deadline-preview { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--primary-ink); font-weight: 600; margin-top: 10px; }
.deadline-preview .i { width: 16px; height: 16px; }
.deadline-preview.none { color: var(--ink-3); font-weight: 500; }

/* 관리 화면 */
.detail { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.detail > .col { display: contents; }
.detail .o1 { order: 1; } .detail .o2 { order: 2; } .detail .o3 { order: 3; } .detail .o4 { order: 4; } .detail .o5 { order: 5; } .detail .o6 { order: 6; }
@media (min-width: 1024px) {
  .detail { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; margin-top: 28px; }
  .detail > .col { display: flex; flex-direction: column; gap: 20px; }
  .page-head.detail-head h1 { font-size: 32px; }
}
.detail-head .question { font-size: 17px; color: var(--ink-2); margin-top: 8px; white-space: pre-wrap; line-height: 1.55; }
.detail-head .notice { margin-top: 14px; }

.status-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.big-count { font-size: 46px; font-weight: 850; letter-spacing: -.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.big-count .of { color: var(--ink-4); font-weight: 750; }
.big-count small { display: block; margin-top: 8px; font-size: 15px; font-weight: 650; color: var(--ink-2); letter-spacing: -.015em; }
.status-line { display: flex; align-items: flex-start; gap: 7px; font-size: 14.5px; color: var(--ink-2); margin-top: 18px; line-height: 1.5; }
.status-line .i { width: 18px; height: 18px; color: var(--ink-3); margin-top: 1px; }
.status-line b { color: var(--warn-ink); font-weight: 700; }
.missing-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.missing-head h3 { font-size: 15.5px; font-weight: 750; }
.missing-head h3 span { color: var(--warn-ink); }
.all-done { display: flex; align-items: center; gap: 8px; color: var(--primary-ink); font-weight: 650; font-size: 15px; }
.all-done .i { width: 18px; height: 18px; }

.tally { display: grid; gap: 16px; }
.tally-row .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 7px; }
.tally-row .opt { font-weight: 650; font-size: 15.5px; }
.tally-row .n { font-weight: 750; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tally-row .n small { color: var(--ink-3); font-weight: 600; margin-left: 4px; }
.tally-row .progress { height: 9px; }
.tally-row.lead .progress > i { background: var(--primary); }
.tally-row:not(.lead) .progress > i { background: color-mix(in srgb, var(--primary) 55%, var(--fill-strong)); }
.tally-row .who { font-size: 13.5px; color: var(--ink-3); margin-top: 6px; line-height: 1.5; }
.tally-row.missing .opt, .tally-row.missing .n { color: var(--warn-ink); }
.tally-row.missing .progress > i { background: color-mix(in srgb, var(--warn-ink) 45%, var(--fill-strong)); }

.answers li { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 0; border-top: 1px solid var(--line); }
.answers li:first-child { border-top: 0; }
.answers .no { width: 2.2em; flex: none; text-align: right; color: var(--ink-3); font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14.5px; }
.answers .who { flex: none; min-width: 4.2em; max-width: 40%; font-weight: 700; }
.answers .ans { flex: 1; min-width: 0; font-weight: 600; white-space: pre-wrap; }
.answers li.blank .ans { color: var(--ink-4); font-weight: 500; }
.answers li.blank .no { color: var(--warn-ink); }
.answers li.fresh { animation: fresh 2.6s ease-out; border-radius: 10px; }
.answers .btn { flex: none; color: var(--ink-3); }
.answers .btn.icon-only { width: 36px; height: 36px; padding: 0; justify-content: center; }
.answers li.blank { min-height: 36px; padding: 4px 0; font-size: 14.5px; }
@media (hover: hover) { .answers .btn:hover { color: var(--danger-ink); } }
textarea.result { font-family: var(--mono); font-size: 14px; line-height: 1.6; min-height: 220px; background: var(--fill); }

.menu-list > * { display: flex; align-items: center; gap: 12px; width: 100%; padding: 15px 2px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); font-size: 15.5px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.menu-list > *:first-child { border-top: 0; }
.menu-list .i:first-child { color: var(--ink-3); }
.menu-list .chev { margin-left: auto; color: var(--ink-4); width: 18px; height: 18px; }
.menu-list .danger { color: var(--danger-ink); }
.menu-list .danger .i:first-child { color: var(--danger-ink); }
@media (hover: hover) { .menu-list > *:hover { color: var(--primary-ink); } .menu-list .danger:hover { color: var(--danger); } }

.live-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.live-note i { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: pulse 1.8s ease-in-out infinite; }

/* ---------- 움직임 ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes pop-in { from { opacity: 0; transform: scale(.97); } }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes fresh { 0% { background: var(--accent-soft); box-shadow: -8px 0 0 var(--accent-soft), 8px 0 0 var(--accent-soft); } 100% { background: transparent; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 380px) {
  .page, .topbar-inner { padding-left: 16px; padding-right: 16px; }
  .card { padding: 18px 16px; }
  .r-title { font-size: 24px; }
  .big-count { font-size: 40px; }
  .ring-wrap { width: 74px; height: 74px; }
}

/* 글 속 링크처럼 보이는 버튼 (예: 로그인해서 계정에 보관하기) */
.link-btn { padding: 0; border: 0; background: none; color: var(--primary-ink); font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.menu-list .tiny { font-weight: 400; margin-top: 2px; }

/* 첫 화면 탭: 취합 | 명단 (.seg 모양의 링크) */
.home-tabs a { display: block; min-width: 0; text-decoration: none; }
.home-tabs a[aria-current="page"] span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16, 24, 20, .1), 0 0 0 1px var(--card-edge); }
.home-tabs a:focus-visible { outline: none; }
.home-tabs a:focus-visible span { outline: 3px solid var(--primary-glow); }
.tab-n { font-size: 13px; font-weight: 700; color: var(--ink-4); font-variant-numeric: tabular-nums; }
.home-tabs a[aria-current="page"] .tab-n { color: var(--primary-ink); }

/* 명단 목록 항목과 양식의 저장 명단 카드 */
.roster-item { display: flex; align-items: center; gap: 14px; }
.roster-item .chev { color: var(--ink-4); width: 18px; height: 18px; flex: none; }
.roster-icon { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft, var(--fill)); color: var(--primary-ink); }
.roster-icon .i { width: 20px; height: 20px; }
.saved-roster { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--fill); }
.saved-roster .label { font-weight: 700; }
.gather-item.static { cursor: default; }
.gather-item.static:active { transform: none; }

/* 응답 링크의 공개 결과 */
.r-results .tally { margin: 4px 0 6px; }
.answers li.mine { background: var(--primary-soft); border-radius: 10px; border-top-color: transparent; padding-left: 4px; padding-right: 4px; }
.answers li.mine + li { border-top-color: transparent; }
.menu-list .menu-value { display: block; font-size: 13px; font-weight: 500; color: var(--ink-3); margin-top: 2px; }

/* 항목별로 받기 */
.tally-item { font-size: 15px; font-weight: 750; color: var(--ink-2, var(--ink)); padding-bottom: 2px; border-bottom: 1px solid var(--line); }
.same-btn { align-self: flex-start; margin-bottom: 10px; }

/* 한 사람이 여러 명 몫을 낸 경우: 응답마다 영수증 */
.receipt-item + .receipt-item { margin-top: 4px; }
.receipt.fresh-row { box-shadow: inset 0 0 0 2px var(--primary); }
.add-other { display: grid; gap: 6px; margin-top: 6px; }
.add-other .tiny { text-align: center; }
