@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Gowun+Batang&family=Gowun+Dodum&display=swap');

:root {
  --ink: #29231e;
  --ink-soft: #655c54;
  --paper: #f5eddf;
  --paper-deep: #eadcc9;
  --surface: #fffdf8;
  --surface-warm: #fbf4e9;
  --line: #ded2c1;
  --accent: #9c3024;
  --accent-dark: #742118;
  --accent-soft: #f4dfd6;
  --accent-contrast: #fffaf3;
  --mustard: #e3a72d;
  --medal-gold: #ffcb45;
  --medal-gold-deep: #9a6200;
  --glitter-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23ffcb45' stroke='%239a6200' stroke-width='.65' stroke-linejoin='round' d='M10 0C10.8 6.2 13.8 9.2 20 10c-6.2.8-9.2 3.8-10 10-.8-6.2-3.8-9.2-10-10 6.2-.8 9.2-3.8 10-10Z'/%3E%3C/svg%3E");
  --sun: #b83c2e;
  --sat: #28648a;
  --success: #286247;
  --shadow: 0 20px 55px rgba(72, 52, 32, 0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  color: var(--ink);
  font-family: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 15px;
  line-height: 1.72;
  letter-spacing: -0.015em;
  background-color: var(--paper);
  background-image: radial-gradient(rgba(99, 69, 38, 0.10) 0.7px, transparent 0.7px);
  background-size: 9px 9px;
}

button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.wrap { width: min(100%, 820px); margin: 0 auto; padding: 48px 24px 84px; }

/* ---------- identity & shared pieces ---------- */
.landing-head, .event-site-head { text-align: center; }
.landing-head { padding: 18px 0 38px; }
.event-site-head { padding: 0 0 28px; }
.eyebrow, .section-kicker { color: var(--accent); font-size: 10px; font-weight: 700; line-height: 1.3; letter-spacing: 0.16em; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 9px; }
.eyebrow span { width: 19px; height: 1px; background: currentColor; }
.site-title { color: var(--ink); font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: clamp(35px, 7vw, 50px); font-weight: 400; line-height: 1; letter-spacing: -0.055em; }
.site-title a { color: inherit; text-decoration: none; }
.title-mark { color: var(--accent); font-family: sans-serif; font-size: 0.53em; vertical-align: 0.18em; margin-right: 6px; }
.site-sub { max-width: 360px; margin: 17px auto 0; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }

.card { position: relative; margin-bottom: 18px; padding: 32px; border: 1px solid rgba(133, 104, 72, 0.20); border-radius: 4px 4px 22px 4px; background: rgba(255, 253, 248, 0.94); box-shadow: var(--shadow); }
.card::before { position: absolute; top: 0; left: 0; width: 54px; height: 3px; content: ''; background: var(--accent); }
.form-title-row { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; }
.form-title-row h2, .card h2 { margin-top: 4px; font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: 27px; font-weight: 400; line-height: 1.1; letter-spacing: -0.045em; }
.form-stamp { display: grid; width: 43px; height: 43px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--accent); background: var(--surface-warm); font-size: 18px; transform: rotate(8deg); }
.card > h2 { margin-bottom: 16px; font-size: 23px; }

.field { margin-bottom: 24px; }
.field > label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 14px; font-weight: 700; }
.field .hint, .hint { margin-top: 6px; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.hint.validation-invalid { color: var(--sun); font-weight: 700; }.hint.validation-valid { color: var(--success); font-weight: 700; }
input[type='text'], input[type='number'], input[type='date'], input[type='password'], input[type='url'], input[type='time'], select { width: 100%; min-height: 48px; padding: 11px 13px; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; outline: none; background: var(--surface); box-shadow: inset 0 1px 0 rgba(98, 68, 37, 0.04); transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
input::placeholder { color: #958b80; opacity: 1; }
input:hover { border-color: #b9a58e; }
input:focus-visible { border-color: var(--accent); background: #fffefa; box-shadow: 0 0 0 3px rgba(156, 48, 36, 0.16); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 47px; padding: 11px 20px; color: var(--accent-contrast); border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); box-shadow: 3px 3px 0 var(--mustard); cursor: pointer; font-size: 14px; font-weight: 700; line-height: 1; text-decoration: none; transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.btn:hover { background: var(--accent-dark); box-shadow: 4px 4px 0 var(--mustard); transform: translate(-1px, -1px); }
.btn:active { box-shadow: 1px 1px 0 var(--mustard); transform: translate(2px, 2px); }
.btn:focus-visible, .tabs button:focus-visible, .theme-picker input:focus-visible + .theme-opt, .person-chip:focus-visible { outline: 3px solid rgba(156, 48, 36, 0.35); outline-offset: 3px; }
.btn:disabled { border-color: #bcae9e; background: #bcae9e; box-shadow: none; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; justify-content: space-between; min-height: 54px; padding-inline: 21px; }
.btn.ghost { color: var(--accent); border-color: var(--accent); background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--accent-soft); box-shadow: none; transform: none; }
.btn.ghost.danger { color: #842c22; border-color: #9f4638; }.btn.ghost.danger:hover { color: #6f2119; border-color: #842c22; background: #f8ddd6; }
.btn.danger-solid { color: #fffaf3; border-color: #842c22; background: #842c22; box-shadow: 3px 3px 0 #d69765; }.btn.danger-solid:hover { background: #6f2119; box-shadow: 4px 4px 0 #d69765; }
.btn.small { min-height: 38px; padding: 8px 12px; font-size: 12px; }

/* compact radio cards */
.theme-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.theme-picker > span { min-width: 0; }
.theme-picker input { position: absolute; opacity: 0; pointer-events: none; }
.theme-picker .theme-opt { display: flex; min-height: 88px; flex-direction: column; justify-content: center; padding: 11px 8px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 3px; background: var(--surface); cursor: pointer; font-size: 13px; font-weight: 700; line-height: 1.38; text-align: center; transition: border-color 160ms ease, color 160ms ease, background 160ms ease, transform 160ms ease; user-select: none; }
.theme-picker .theme-opt:hover { border-color: #b9a58e; transform: translateY(-1px); }
.theme-picker .theme-opt small { display: block; margin-top: 5px; color: #83766b; font-size: 10px; font-weight: 400; line-height: 1.35; }
.theme-picker input:checked + .theme-opt { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.theme-picker input:checked + .theme-opt::before { content: '✓'; display: block; margin-bottom: 3px; font-size: 12px; line-height: 1; }
.error-msg { min-height: 1.3em; margin-top: 11px; color: var(--sun); font-size: 12px; font-weight: 700; }
.info-msg { margin-top: 5px; color: var(--success); font-size: 12px; font-weight: 700; }

/* ---------- event header and tabs ---------- */
.event-head { position: relative; padding: 5px 0 27px; text-align: center; }
.event-head .section-kicker { margin-bottom: 8px; }
.event-head h1 { max-width: 620px; margin: 0 auto 15px; font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: clamp(30px, 6vw, 43px); font-weight: 400; line-height: 1.12; letter-spacing: -0.05em; }
.event-meta { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 17px; }
.chip { display: inline-block; padding: 5px 10px; color: #704238; border: 1px solid #e4c8b7; border-radius: 999px; background: #f9e9df; font-size: 11px; font-weight: 700; line-height: 1.3; }
.toolbar { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.tabs { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255, 253, 248, 0.65); }
.tabs button { min-height: 46px; color: var(--ink-soft); border: 0; border-radius: 2px; background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease; }
.tabs button.active { color: var(--accent-contrast); background: var(--accent); box-shadow: 2px 2px 0 var(--mustard); }

/* ---------- destructive action dialog ---------- */
.cancel-dialog { width: min(calc(100% - 32px), 430px); margin: auto; padding: 0; color: var(--ink); border: 1px solid rgba(132, 44, 34, 0.42); border-radius: 4px 4px 22px 4px; background: var(--surface); box-shadow: 0 24px 75px rgba(43, 24, 18, 0.32); }
.cancel-dialog::backdrop { background: rgba(43, 28, 18, 0.52); backdrop-filter: blur(2px); }
.cancel-dialog-form { padding: 31px 32px 29px; }.cancel-dialog-form .section-kicker { color: #842c22; margin-bottom: 7px; }.cancel-dialog-form h2 { font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: 27px; font-weight: 400; line-height: 1.12; letter-spacing: -0.045em; }.cancel-dialog-copy { margin: 13px 0 22px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }.cancel-dialog-form .field { margin-bottom: 0; }.cancel-dialog-form .error-msg { min-height: 1.5em; margin-top: 9px; }.cancel-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 16px; }.cancel-dialog-actions .btn { min-width: 106px; }
.success-dialog { width: min(calc(100% - 32px), 390px); margin: auto; padding: 0; color: var(--ink); border: 1px solid rgba(40, 98, 71, 0.38); border-radius: 4px 4px 22px 4px; background: var(--surface); box-shadow: 0 24px 75px rgba(27, 67, 47, 0.28); }.success-dialog::backdrop { background: rgba(43, 28, 18, 0.52); backdrop-filter: blur(2px); }.success-dialog-content { display: flex; align-items: center; flex-direction: column; padding: 32px; text-align: center; }.success-dialog-mark { display: grid; width: 44px; height: 44px; place-items: center; margin-bottom: 15px; color: var(--surface); border-radius: 50%; background: var(--success); box-shadow: 3px 3px 0 #a6c9b4; font-size: 24px; font-weight: 700; line-height: 1; }.success-dialog-content .section-kicker { margin-bottom: 7px; color: var(--success); }.success-dialog-content h2 { font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: 27px; font-weight: 400; letter-spacing: -0.045em; }.success-dialog-content > p:not(.section-kicker) { margin: 11px 0 21px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }

/* ---------- calendar ---------- */
.cal-month { margin-bottom: 22px; }
.cal-month-title { margin: 25px 0 9px; color: var(--ink); font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: 21px; font-weight: 400; letter-spacing: -0.03em; text-align: left; }
.cal-month:first-child .cal-month-title { margin-top: 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dow { padding: 7px 0 8px; color: var(--ink-soft); font-size: 10px; font-weight: 700; text-align: center; }
.cal-dow.dow-0 { color: var(--sun); }.cal-dow.dow-6 { color: var(--sat); }
.cal-cell { position: relative; display: flex; min-height: 66px; flex-direction: column; align-items: center; padding: 7px 2px 4px; border: 1px solid transparent; border-radius: 3px; touch-action: none; user-select: none; -webkit-user-select: none; }
.cal-cell:not(.empty):not(.disabled) { cursor: pointer; transition: background 120ms ease; }
.cal-cell:not(.empty):not(.disabled):hover { background: var(--surface-warm); }
.cal-day { display: flex; width: 35px; height: 35px; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink); font-size: 13px; font-weight: 700; transition: background 120ms ease, box-shadow 120ms ease, color 120ms ease; }
.cal-cell.dow-0 .cal-day, .cal-cell.holiday-cell .cal-day { color: var(--sun); }.cal-cell.dow-6 .cal-day { color: var(--sat); }
.cal-holiday { max-width: 100%; margin-top: 2px; color: var(--sun); font-size: 8px; line-height: 1.25; text-align: center; word-break: keep-all; }
.cal-count { margin-top: 1px; color: var(--accent); font-size: 9px; font-weight: 700; }
.cal-cell.disabled { opacity: 0.30; }.cal-cell.out-range { opacity: 0.20; }.cal-cell.theme-off { opacity: 0.35; }
.cal-cell.selected .cal-day { color: var(--accent-contrast) !important; background: var(--accent); box-shadow: 2px 2px 0 var(--mustard); }
.cal-cell.preview-paint .cal-day { color: var(--accent-contrast) !important; background: rgba(156, 48, 36, 0.52); }.cal-cell.preview-erase .cal-day { color: var(--ink) !important; background: #ded3c7; }
.cal-cell.badge-light-text .cal-day { color: var(--accent-contrast) !important; }
.cal-cell.has-count.top-pick .cal-day { position: relative; isolation: isolate; box-shadow: 0 0 0 2px var(--medal-gold), 0 0 0 4px var(--medal-gold-deep), 0 0 0 5px var(--surface); }
.top-pick-spark { position: absolute; z-index: 1; width: 50%; height: 50%; background: var(--glitter-star) center / contain no-repeat; opacity: 0; pointer-events: none; transform: scale(0.08); transform-origin: center; will-change: opacity, transform; }
.top-pick-spark-upper { top: -7px; right: -7px; animation: gold-sparkle 3.6s cubic-bezier(0.2, 0.8, 0.2, 1) infinite; }
.top-pick-spark-lower { bottom: -7px; left: -7px; animation: gold-sparkle 3.6s cubic-bezier(0.2, 0.8, 0.2, 1) -1.8s infinite; }

@keyframes gold-sparkle {
  0% { opacity: 0; transform: scale(0.08); }
  6% { opacity: 0.82; transform: scale(0.36); }
  14% { opacity: 1; transform: scale(1); }
  21% { opacity: 0.76; transform: scale(0.72); }
  29%, 100% { opacity: 0; transform: scale(0.08); }
}

/* ---------- people / results ---------- */
.candidate-ranking { overflow: hidden; padding-block: 28px 25px; background-color: #fffaf0; background-image: radial-gradient(circle at 100% 0, rgba(255, 203, 69, 0.22), transparent 30%); }
.candidate-ranking::before { width: 112px; background: var(--mustard); }
.candidate-ranking-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.candidate-ranking-titles { min-width: 0; }
.candidate-ranking-head .section-kicker { margin-bottom: 6px; }
.toggle-btn.card-toggle { min-height: 33px; flex: 0 0 auto; padding: 6px 13px; font-size: 11px; }
.candidate-ranking-head h2 { margin: 0; }
.candidate-ranking-list { display: grid; gap: 8px; margin-top: 18px; }
.candidate-ranking-row { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 48px; padding: 7px 10px 7px 7px; border: 1px solid rgba(133, 104, 72, 0.18); border-radius: 3px; background: rgba(255, 253, 248, 0.78); }
.candidate-rank-label { display: inline-flex; min-height: 34px; align-items: center; justify-content: center; color: var(--ink); border-radius: 2px; background: var(--paper-deep); font-size: 12px; font-weight: 700; }.candidate-rank-label::after { margin-left: 1px; content: ':'; }
.candidate-rank-dates { color: var(--ink); font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: 19px; font-weight: 400; letter-spacing: -0.025em; line-height: 1.45; }
.candidate-ranking-row.rank-1 { border-color: rgba(154, 98, 0, 0.36); background: rgba(255, 248, 218, 0.68); }.candidate-ranking-row.rank-1 .candidate-rank-label { background: var(--medal-gold); box-shadow: 2px 2px 0 var(--medal-gold-deep); }
.candidate-ranking-row.rank-2 .candidate-rank-label { background: #dec9af; }.candidate-ranking-row.rank-3 .candidate-rank-label { background: #e8d7c0; }
.candidate-ranking-empty { color: var(--ink-soft); font-size: 13px; }
.people-list { display: flex; gap: 7px; flex-wrap: wrap; }
.person-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 999px; background: var(--surface); cursor: pointer; font-size: 12px; font-weight: 700; transition: color 150ms ease, border-color 150ms ease, background 150ms ease; }
.person-chip:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.person-chip.active { color: var(--accent-contrast); border-color: var(--accent); background: var(--accent); box-shadow: 2px 2px 0 var(--mustard); }
.person-chip .del { padding: 0 1px; color: var(--ink-soft); border: 0; background: none; cursor: pointer; font-size: 13px; line-height: 1; }.person-chip .del:hover { color: var(--sun); }
.person-chip.active .del { color: var(--accent-contrast); }.person-chip.active .del:hover { color: #fff2d1; }
.empty-note { color: var(--ink-soft); font-size: 12px; }.legend { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 11px; }.legend .swatch { display: inline-block; width: 13px; height: 13px; margin-right: 4px; border-radius: 50%; vertical-align: -2px; }.swatch-low { background: rgba(156, 48, 36, 0.25); }.swatch-high { background: rgb(156, 48, 36); }.swatch-top { background: rgba(156, 48, 36, 0.8); box-shadow: 0 0 0 2px var(--medal-gold), 0 0 0 3px var(--medal-gold-deep); }
.date-detail h3 { margin-bottom: 12px; font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: 21px; font-weight: 400; }.date-detail .group { margin-bottom: 12px; font-size: 13px; }.date-detail .group b { display: block; margin-bottom: 5px; color: var(--ink-soft); font-size: 12px; }.name-tag { display: inline-block; margin: 0 4px 4px 0; padding: 3px 9px; border-radius: 999px; font-size: 12px; }.name-tag.ok { color: var(--accent); background: var(--accent-soft); font-weight: 700; }.name-tag.no { color: var(--ink-soft); background: #eee8df; }
.save-row { margin-top: 18px; }.selected-count { margin-top: 12px; color: var(--ink-soft); font-size: 12px; font-weight: 700; text-align: center; }
.float-save { position: fixed; z-index: 50; bottom: 18px; left: 50%; display: flex; width: min(760px, calc(100% - 32px)); align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px 11px 18px; border: 1px solid #baaa99; border-radius: 4px; background: rgba(255, 253, 248, 0.96); box-shadow: 0 14px 36px rgba(54, 36, 19, 0.20); transform: translateX(-50%); backdrop-filter: blur(8px); }.float-save[hidden] { display: none; }.float-save .float-count { color: var(--ink); font-size: 12px; font-weight: 700; }.float-save .btn { min-height: 40px; padding: 9px 20px; }

/* ---------- 어디서 볼까? (장소 정하기) ---------- */
.confirm-dialog { border-color: rgba(156, 48, 36, 0.34); }
.confirm-dialog .section-kicker { color: var(--accent); }
/* 확정 다이얼로그는 시간·비밀번호 두 칸이라 사이 여백이 필요하다. (숨기면 여백째 사라진다) */
#confirm-time-field { margin-bottom: 19px; }

.venue-head { padding-bottom: 26px; }
.venue-head .section-kicker { margin-bottom: 6px; }
.venue-head h2 { margin: 0; }
.venue-copy { margin: 9px 0 22px; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.venue-time { margin-top: 11px; color: var(--accent); font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: 22px; letter-spacing: -0.03em; }
.venue-time[hidden] { display: none; }
.chip-time { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.chip-time[hidden] { display: none; }
.chip-deadline { color: #704238; }
.chip-deadline.closed { color: #fffaf3; border-color: #842c22; background: #842c22; }
.chip-deadline[hidden] { display: none; }
.vote-closed-note { margin: -6px 0 18px; padding: 12px 16px; color: #6f2119; border: 1px solid #e4c8b7; border-left: 4px solid #842c22; border-radius: 3px; background: #f9e9df; font-size: 13px; font-weight: 700; line-height: 1.6; }
.vote-closed-note[hidden] { display: none; }
.vote-btn:disabled { opacity: 0.55; cursor: not-allowed; }.vote-btn:disabled:hover { background: transparent; }
.voter-field { margin-bottom: 0; }

.place-map-card { padding: 14px; }
.place-map { height: 340px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-warm); }
.place-map.map-off { display: none; }
.place-map-note { padding: 6px 4px 2px; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }

/* 지도 마커는 오버레이로 그려지므로 전역 스타일이 필요하다. */
.map-pin { position: relative; display: grid; width: 30px; height: 30px; place-items: center; color: var(--accent-contrast); border: 2px solid var(--surface); border-radius: 50%; background: var(--accent); box-shadow: 0 4px 10px rgba(43, 28, 18, 0.35); font-size: 13px; font-weight: 700; line-height: 1; }
.map-pin::after { position: absolute; bottom: -7px; left: 50%; width: 0; height: 0; border-right: 5px solid transparent; border-left: 5px solid transparent; border-top: 8px solid var(--accent); content: ''; transform: translateX(-50%); }
.map-pin-top { color: var(--medal-gold-deep); background: var(--medal-gold); }
.map-pin-top::after { border-top-color: var(--medal-gold); }

.search-row { display: flex; gap: 8px; }
.search-row input { flex: 1; min-width: 0; }
.search-row .btn { flex: 0 0 auto; min-height: 48px; padding-inline: 18px; }

/* 검색 결과 캐러셀: 요약 한 줄 → 5개씩 한 페이지, 가로 스크롤 스냅 */
.place-results-wrap { margin-bottom: 24px; }
.place-results-wrap[hidden] { display: none; }
.place-results-summary { margin-bottom: 8px; color: var(--success); font-size: 12px; font-weight: 700; line-height: 1.5; }
.place-results-summary:empty { display: none; }
.place-carousel { position: relative; }
.place-results { display: flex; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; cursor: grab; outline: none; }
.place-results::-webkit-scrollbar { display: none; }
.place-results.dragging { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; user-select: none; }
.place-results:focus-visible { outline: 3px solid rgba(156, 48, 36, 0.35); outline-offset: 3px; }
.place-page { flex: 0 0 100%; display: grid; gap: 7px; align-content: start; min-width: 0; scroll-snap-align: start; scroll-snap-stop: always; }
.place-results-nav { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 22px; margin-top: 8px; }
.place-results-pages { color: #958b80; font-size: 11px; text-align: center; }
/* 좌우 화살표: 배경·테두리 없이 세로로 긴 꺾쇠만 그린다. */
.carousel-arrow { position: absolute; top: calc(50% - 15px); z-index: 2; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 56px; padding: 0; color: var(--accent); border: 0; border-radius: 3px; background: transparent; cursor: pointer; opacity: 0.72; transform: translateY(-50%); transition: opacity 150ms ease, transform 150ms ease; }
.carousel-arrow svg { display: block; width: 12px; height: 28px; }
.carousel-arrow:hover { opacity: 1; }
.carousel-arrow.prev:hover { transform: translateY(-50%) translateX(-2px); }
.carousel-arrow.next:hover { transform: translateY(-50%) translateX(2px); }
.carousel-arrow:focus-visible { outline: 3px solid rgba(156, 48, 36, 0.35); outline-offset: 2px; opacity: 1; }
/* 카드 안쪽 여백(24~26px)에 걸치도록 리스트 바깥으로 뺀다. */
.carousel-arrow.prev { left: -30px; }
.carousel-arrow.next { right: -30px; }
.carousel-arrow[hidden] { display: none; }
.place-result { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 10px; padding: 11px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; background: var(--surface); cursor: pointer; text-align: left; transition: border-color 150ms ease, background 150ms ease; }
.place-result:hover { border-color: #b9a58e; background: var(--surface-warm); }
.place-result.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.place-result-mark { color: var(--accent); font-size: 11px; line-height: 1.7; }
.place-result-body { display: grid; gap: 2px; min-width: 0; }
.place-result-body b { font-size: 14px; }
.place-result-body small { color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.place-result-category { color: #83766b !important; font-size: 11px !important; }
.place-result-distance { margin-left: 7px; color: var(--success); font-size: 11px; font-weight: 700; white-space: nowrap; }

.place-list { display: grid; gap: 9px; }
.place-card { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: start; gap: 12px; padding: 14px; border: 1px solid rgba(133, 104, 72, 0.18); border-radius: 3px; background: rgba(255, 253, 248, 0.82); transition: border-color 200ms ease, background 200ms ease; }
.place-card.top-place { border-color: rgba(154, 98, 0, 0.36); background: rgba(255, 248, 218, 0.62); }
.place-card.focused { border-color: var(--accent); background: var(--accent-soft); }
.place-no { display: grid; width: 30px; height: 30px; place-items: center; color: var(--accent-contrast); border-radius: 50%; background: var(--accent); font-size: 12px; font-weight: 700; }
.place-card.top-place .place-no { color: var(--medal-gold-deep); background: var(--medal-gold); }
.place-body { min-width: 0; }
.place-name { font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: 19px; font-weight: 400; letter-spacing: -0.03em; line-height: 1.3; word-break: keep-all; }
.place-category { margin-top: 2px; color: #83766b; font-size: 11px; }
.place-address { margin-top: 4px; color: var(--ink-soft); font-size: 12px; line-height: 1.55; word-break: keep-all; }
.place-votes { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 9px; }
.place-actions { display: flex; align-items: flex-end; flex-direction: column; gap: 7px; }
.vote-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 6px 13px; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; line-height: 1; transition: color 150ms ease, background 150ms ease; }
.vote-btn:hover { background: var(--accent-soft); }
.vote-btn.voted { color: var(--accent-contrast); background: var(--accent); box-shadow: 2px 2px 0 var(--mustard); }
.place-link { color: var(--ink-soft); font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.place-link:hover { color: var(--accent); text-decoration: underline; }
.place-del { padding: 0 2px; color: var(--ink-soft); border: 0; background: none; cursor: pointer; font-size: 13px; line-height: 1; }
.place-del:hover { color: var(--sun); }

/* ---------- 팀즈로 내보내기 ---------- */
.teams-dialog { width: min(calc(100% - 32px), 500px); max-height: 88vh; border-color: rgba(156, 48, 36, 0.34); overflow: hidden; }
.teams-dialog .section-kicker { color: var(--accent); }
.teams-dialog .cancel-dialog-form { max-height: 88vh; overflow-y: auto; }
.teams-dialog .cancel-dialog-form .field { margin-bottom: 19px; }
.teams-dialog .cancel-dialog-form .field:last-of-type { margin-bottom: 0; }
#teams-webhook { font-size: 12px; }

.teams-preview { padding: 14px 15px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 3px; background: var(--surface-warm); }
.teams-preview-title { font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: 18px; font-weight: 400; letter-spacing: -0.03em; line-height: 1.3; word-break: keep-all; }
.teams-preview-meta { margin-top: 3px; color: var(--ink-soft); font-size: 11px; }
.teams-preview-note { margin: 10px 0 2px; color: var(--ink); font-size: 12px; line-height: 1.6; word-break: keep-all; }
.teams-preview-sub { margin-top: 12px; color: var(--ink); font-size: 12px; font-weight: 700; }
.teams-preview-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 8px; margin-top: 6px; font-size: 12px; line-height: 1.5; }
.teams-preview-row span { color: var(--ink-soft); }
.teams-preview-row b { color: var(--ink); word-break: keep-all; }
.teams-preview-action { margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--accent); font-size: 12px; font-weight: 700; }

/* 공유 방법 두 가지 (채널 선택 / 자동 게시) */
.share-method { margin-top: 22px; }
.share-method-title { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 14px; font-weight: 700; }
.share-method-no { display: grid; width: 21px; height: 21px; flex: 0 0 auto; place-items: center; color: var(--accent-contrast); border-radius: 50%; background: var(--accent); font-size: 11px; line-height: 1; }
.share-method-tag { padding: 3px 8px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; background: var(--surface-warm); font-size: 10px; font-weight: 700; }
.share-method-tag.ok { color: var(--success); border-color: #a6c9b4; background: #eaf3ed; }
.share-method-copy { margin: 9px 0 14px; color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.share-app-row { display: flex; align-items: stretch; justify-content: center; gap: 10px; flex-wrap: wrap; }
.share-app-row .kakao-share-btn, .share-app-row .share-launcher a { height: 44px; min-height: 44px; padding-top: 0; padding-bottom: 0; box-sizing: border-box; }
.share-launcher { display: flex; align-items: center; justify-content: center; }
.share-launcher:empty { display: none; }
.share-launcher a { display: inline-flex; align-items: center; gap: 9px; padding: 9px 17px 9px 13px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); box-shadow: 3px 3px 0 var(--paper-deep); text-decoration: none; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.share-launcher a:hover { border-color: #b9a58e; background: var(--surface-warm); transform: translate(-1px, -1px); }
.share-launcher img { display: block; }
.share-launcher-label { color: var(--ink); font-size: 13px; font-weight: 700; }
.share-preview-label { margin: 15px 0 6px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }

.link-preview { display: grid; gap: 10px; }
.share-msg-preview { padding: 12px 14px; border: 1px solid var(--line); border-left: 3px solid var(--sat); border-radius: 3px; background: var(--surface); }
.share-msg-title { color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.4; word-break: keep-all; }
.share-msg-preview .teams-preview-row { grid-template-columns: 104px minmax(0, 1fr); }
.share-msg-preview .teams-preview-row b { font-weight: 500; overflow-wrap: anywhere; }
.link-preview > .hint { margin-top: 0; }


/* ---------- admin menu (비밀번호 확인 → 모임장 설정) ---------- */
.admin-dialog { width: min(calc(100% - 32px), 720px); max-height: 88vh; border-color: rgba(156, 48, 36, 0.34); overflow: hidden; }
.admin-dialog #admin-auth-form { max-width: 460px; margin: 0 auto; }
.admin-dialog .section-kicker { color: var(--accent); }
/* .btn 등의 display 가 hidden 속성을 이기지 않도록 다이얼로그 안에서는 hidden 을 우선한다. */
.admin-dialog [hidden] { display: none !important; }
.admin-dialog #admin-settings { max-height: 88vh; overflow-y: auto; }
.admin-dialog #admin-settings .field { margin-bottom: 14px; }
/* 항목 한 줄: 제목·부제목(왼쪽) | 액션(오른쪽). 좁으면 액션이 아래로 내려간다. */
.admin-list { margin-top: 18px; border-top: 1px solid var(--line); }
.admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.admin-row-text { display: block; flex: 1 1 230px; min-width: 0; }
.admin-row-title { display: block; color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.4; }
.admin-row-sub { display: block; margin-top: 3px; color: var(--ink-soft); font-size: 12px; line-height: 1.5; word-break: keep-all; }
.admin-row-actions { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; margin-left: auto; }
.admin-row-actions .btn.small { min-width: 72px; }
.admin-row-actions input[type='datetime-local'] { width: 205px; min-height: 38px; padding: 6px 10px; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; background: var(--surface); font: inherit; font-size: 13px; }
.admin-row-actions input[type='datetime-local']:focus-visible { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(156, 48, 36, 0.16); }
.admin-dialog .admin-row-msg { flex-basis: 100%; min-height: 0; margin: 0; }
.admin-dialog .admin-row-msg:empty { display: none; }
.admin-row-sub.warn, .admin-danger.confirming .admin-row-sub { color: #842c22; font-weight: 700; }
.admin-row-details { border-bottom: 1px solid var(--line); }
.admin-row-details > summary.admin-row { border-bottom: 0; cursor: pointer; list-style: none; }
.admin-row-details > summary::-webkit-details-marker { display: none; }
.admin-row-details > summary:focus-visible { outline: 3px solid rgba(156, 48, 36, 0.35); outline-offset: 3px; }
.admin-expand::after { content: ' ▾'; }
.admin-row-details[open] .admin-expand::after { content: ' ▴'; }
.admin-details-body { padding: 0 0 18px; }
.admin-details-body .share-method-copy { margin-top: 0; }
.admin-details-body .btn.block { min-height: 46px; margin-top: 4px; }
.admin-locked-note { margin-bottom: 4px; }

/* 결과 탭: 확정 모드 카드 + 장소 순위 */
.candidate-ranking.confirmed-mode { background-color: #f2f8f4; background-image: radial-gradient(circle at 100% 0, rgba(60, 179, 113, 0.16), transparent 32%); }
.candidate-ranking.confirmed-mode::before { background: #3cb371; }
.candidate-ranking.confirmed-mode .section-kicker { color: var(--success); }
.confirmed-summary { margin-top: 4px; padding: 4px 2px 0; }
.confirmed-summary-main { color: var(--ink); font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: clamp(24px, 5vw, 32px); font-weight: 400; letter-spacing: -0.04em; line-height: 1.25; word-break: keep-all; }
.confirmed-summary-sub { margin-top: 5px; color: var(--ink-soft); font-size: 13px; word-break: keep-all; }
.confirmed-summary-link { display: inline-block; margin-top: 10px; color: var(--success); font-size: 12px; font-weight: 700; text-decoration: none; }
.confirmed-summary-link:hover { text-decoration: underline; }
/* 확정된 장소 카드 — 예약 앱(웹) 링크 입력 */
.reservation-field { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(40, 98, 71, 0.3); }
.reservation-title { color: var(--ink); font-size: 13px; font-weight: 700; }
.reservation-form { display: flex; gap: 8px; align-items: stretch; margin-top: 8px; }
.reservation-form input[type='url'] { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 8px 11px; font-size: 13px; }
.reservation-form input[type='url']::placeholder { color: #9a8f83; font-size: 12px; }
.reservation-form .btn.small { flex: 0 0 auto; min-height: 40px; }
/* 저장 뒤: 입력칸 자리를 같은 높이의 '예약 페이지 열기 + 수정' 버튼 행으로 치환 (좌측 정렬) */
.reservation-actions { justify-content: flex-start; min-height: 40px; }
.reservation-actions .btn.small { min-height: 40px; padding-inline: 14px; }
.reservation-msg { margin-top: 6px; min-height: 0; }
.reservation-msg:empty { display: none; }
.confirmed-place-link.reservation-link { margin-left: 14px; }
.place-rank-row { grid-template-columns: 52px minmax(0, 1fr) auto; color: inherit; cursor: pointer; text-decoration: none; transition: border-color 150ms ease, background 150ms ease, transform 150ms ease; }
.place-rank-row:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.place-rank-map { color: var(--ink-soft); font-size: 11px; font-weight: 700; white-space: nowrap; }
.place-rank-row:hover .place-rank-map { color: var(--accent); }
.place-rank-name { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.place-rank-name > small.place-rank-votes { flex: 0 0 auto; color: var(--accent); font-family: 'Gowun Dodum', sans-serif; font-size: 12px; font-weight: 700; }
.ranking-foot { display: flex; justify-content: flex-end; margin-top: 13px; }
.ranking-foot:has(> [hidden]) { display: none; }
.ranking-dialog { width: min(calc(100% - 32px), 460px); }
.ranking-dialog .section-kicker { color: var(--mustard); }
.ranking-dialog-list { max-height: 55vh; margin-top: 16px; overflow-y: auto; }
.ranking-dialog .cancel-dialog-actions { margin-top: 18px; }

/* 진행 단계 */
.steps { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; list-style: none; }
.steps li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 6px; color: #9c9086; border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 253, 248, 0.6); font-size: 11px; font-weight: 700; }
.steps li b { display: grid; width: 17px; height: 17px; place-items: center; color: var(--surface); border-radius: 50%; background: #c8bcb0; font-size: 10px; line-height: 1; }
.steps li.done { color: var(--ink-soft); border-color: #b7d2c1; }
/* 완료 단계: 숫자를 숨기고(font-size:0) 밝은 초록 원에 체크만 표시한다 */
.steps li.done b { background: #3cb371; font-size: 0; }
.steps li.done b::before { content: '✓'; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; }
.steps li.current { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.steps li.clickable { cursor: pointer; transition: background 150ms ease, box-shadow 150ms ease, transform 150ms ease; }
.steps li.clickable:hover { background: #f0d9d0; box-shadow: 2px 2px 0 var(--mustard); transform: translateY(-1px); }
.steps li.clickable::after { margin-left: 2px; content: '↗'; font-size: 10px; }
.steps li.current b { background: var(--accent); }

/* 검색 결과: 선택 버튼과 지도 링크를 나란히 */
.place-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; padding-right: 12px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); transition: border-color 150ms ease, background 150ms ease; }
.place-result:hover { border-color: #b9a58e; background: var(--surface-warm); }
.place-result.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.place-result-pick { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: start; gap: 10px; padding: 11px 4px 11px 12px; color: var(--ink); border: 0; background: none; cursor: pointer; text-align: left; }

/* 후보지 확정 */
.place-confirm-btn { grid-column: 1 / -1; min-height: 38px; margin-top: 11px; padding: 8px 12px; color: var(--accent); border: 1px dashed var(--accent); border-radius: 3px; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; transition: color 150ms ease, background 150ms ease, border-color 150ms ease; }
.place-confirm-btn:hover { background: var(--accent-soft); }
.place-confirm-btn.confirmed { color: var(--success); border-style: solid; border-color: #a6c9b4; background: #eaf3ed; }
.place-card.confirmed-card { border-color: rgba(40, 98, 71, 0.42); background: rgba(234, 243, 237, 0.6); }
.place-card.confirmed-card .place-no { background: var(--success); color: var(--accent-contrast); }

/* 확정 카드의 상태줄 + 공유 버튼 한 줄 배치 */
.place-card-footer { display: flex; grid-column: 1 / -1; align-items: stretch; gap: 8px; margin-top: 11px; }
.place-card-footer .place-confirm-btn { min-width: 0; flex: 1; margin-top: 0; }

/* 확정 토글 버튼: OFF = 와인 레드 활성 버튼(눌러서 확정), ON = 초록으로 채워진 확정 상태 */
.toggle-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 15px; color: var(--accent-contrast); border: 1px solid var(--accent); border-radius: 3px; background: var(--accent); cursor: pointer; font-size: 12px; font-weight: 700; box-shadow: 2px 2px 0 var(--mustard); transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.toggle-btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); box-shadow: 3px 3px 0 var(--mustard); transform: translate(-1px, -1px); }
.toggle-btn:active { box-shadow: 1px 1px 0 var(--mustard); transform: translate(1px, 1px); }
.toggle-btn:focus-visible { outline: 3px solid rgba(156, 48, 36, 0.35); outline-offset: 3px; }
.toggle-btn:disabled { cursor: not-allowed; opacity: 0.55; }
.toggle-btn.on { color: #fff; border-color: #2f9e63; background: #3cb371; box-shadow: 2px 2px 0 #bfe0cd; }
.toggle-btn.on:hover { background: #34a065; transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #bfe0cd; }

/* 카카오톡 공유 버튼 (브랜드 노랑 #FEE500 + 검정 텍스트) */
.kakao-share-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; color: #191919; border: 1px solid #e3cc00; border-radius: 6px; background: #fee500; cursor: pointer; font-size: 13px; font-weight: 700; line-height: 1; transition: background 150ms ease, transform 150ms ease; }
.kakao-share-btn:hover { background: #fada0a; transform: translateY(-1px); }
.kakao-share-btn:active { transform: translateY(0); }
.kakao-share-btn:focus-visible { outline: 3px solid rgba(227, 204, 0, 0.55); outline-offset: 2px; }
.kakao-share-btn svg { width: 17px; height: 17px; }

/* 팀즈 공유 버튼 (외부 공유 아이콘 + 라벨) */
.share-btn { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; padding: 8px 17px; color: #4a79d9; border: 1px solid #ccdaf6; border-radius: 8px; background: #e8effc; cursor: pointer; font-size: 12px; font-weight: 700; line-height: 1; transition: background 150ms ease, border-color 150ms ease, transform 150ms ease; }
.share-btn:hover { border-color: #a9c2ef; background: #dbe8fa; transform: translateY(-1px); }
.share-btn:active { transform: translateY(0); }
.share-btn:focus-visible { outline: 3px solid rgba(74, 121, 217, 0.35); outline-offset: 2px; }
.share-btn svg { width: 14px; height: 14px; }

/* 우하단 토스트 (참여자 미선택 투표 안내) */
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 60; max-width: min(400px, calc(100% - 36px)); border-radius: 4px; box-shadow: 0 14px 36px rgba(54, 36, 19, 0.28); animation: toast-in 220ms ease-out; }
.toast[hidden] { display: none; }
.toast-danger { background: var(--accent); color: #fffaf3; }
.toast-body { display: block; width: 100%; padding: 13px 16px; color: inherit; border: 0; border-radius: inherit; background: transparent; cursor: pointer; font: inherit; font-size: 13px; font-weight: 600; line-height: 1.55; text-align: left; word-break: keep-all; }
.toast-body:hover { background: rgba(0, 0, 0, 0.12); }
.toast-body:focus-visible { outline: 3px solid rgba(255, 250, 243, 0.55); outline-offset: 2px; }
.toast-link { text-decoration: underline; text-underline-offset: 3px; font-weight: 700; white-space: nowrap; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* 확정된 장소 배너 */
.confirmed-place { margin-top: 15px; padding: 15px 16px; border: 1px solid rgba(40, 98, 71, 0.34); border-left: 3px solid var(--success); border-radius: 3px; background: #eef5f1; }
.confirmed-place[hidden] { display: none; }
.confirmed-place-label { color: var(--success); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; }
.confirmed-place-name { margin-top: 4px; color: var(--ink); font-family: 'DM Serif Display', 'Gowun Batang', serif; font-size: 21px; letter-spacing: -0.03em; word-break: keep-all; }
.confirmed-place-address { margin-top: 3px; color: var(--ink-soft); font-size: 12px; word-break: keep-all; }
.confirmed-place-link { display: inline-block; margin-top: 9px; color: var(--success); font-size: 12px; font-weight: 700; text-decoration: none; }
.confirmed-place-link:hover { text-decoration: underline; }
.confirmed-place-warn { margin-top: 9px; color: #8a6b1f; font-size: 11px; line-height: 1.6; }

.link-btn { padding: 0; margin-left: 6px; color: var(--accent); border: 0; background: none; cursor: pointer; font-size: 12px; font-weight: 700; text-decoration: underline; }
.link-btn:hover { color: var(--accent-dark); }

/* 웹후크 최상위 필드 미리보기 */
.webhook-fields { display: grid; gap: 5px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 3px; background: var(--surface-warm); }
.webhook-field { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 8px; align-items: baseline; font-size: 12px; }
.webhook-field code { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.webhook-field span { color: var(--ink); word-break: break-all; }
.webhook-fields .hint { margin-top: 4px; }
.webhook-fields code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

@media (max-width: 560px) {
  /* 모임장 설정: 액션이 제목 아래로 내려오면 입력칸은 한 줄을 다 쓰고 버튼은 오른쪽에 모은다. */
  .admin-row-actions { width: 100%; }
  .admin-row-actions input[type='datetime-local'] { flex: 1 1 100%; width: auto; }
  /* 모바일: 화살표를 아래 페이지 줄 양끝에 놓는다. 숨길 때도 자리는 유지해 가운데 글자가 흔들리지 않게 한다. */
  .place-results-nav { justify-content: space-between; }.carousel-arrow { position: static; width: 28px; height: 36px; transform: none; }.carousel-arrow svg { width: 10px; height: 24px; }.carousel-arrow.prev:hover, .carousel-arrow.next:hover { transform: none; }.carousel-arrow[hidden] { display: inline-flex; visibility: hidden; }
  .toast { right: 12px; bottom: 12px; left: 12px; max-width: none; }
  .wrap { padding: 31px 15px 76px; }.landing-head { padding: 16px 0 30px; }.event-site-head { padding-bottom: 24px; }.card { padding: 24px 18px; border-radius: 3px 3px 17px 3px; }.theme-picker { gap: 5px; }.theme-picker .theme-opt { min-height: 94px; padding-inline: 3px; font-size: 11px; }.theme-picker .theme-opt small { font-size: 9px; }.cal-cell { min-height: 58px; padding-top: 5px; }.cal-day { width: 31px; height: 31px; font-size: 12px; }.cal-holiday { font-size: 7px; }.cal-count { font-size: 8px; }.cal-grid { gap: 1px; }.float-save { bottom: 10px; width: calc(100% - 20px); }.float-save .btn { padding-inline: 16px; }.event-head { padding-bottom: 22px; }.candidate-ranking { padding-block: 23px 20px; }.candidate-ranking-row { grid-template-columns: 47px minmax(0, 1fr); gap: 10px; }.candidate-rank-dates { font-size: 18px; }.cancel-dialog-form { padding: 26px 21px 22px; }.cancel-dialog-actions { flex-direction: column-reverse; }.cancel-dialog-actions .btn { width: 100%; }.tabs button { font-size: 11px; padding-inline: 2px; }.place-map { height: 260px; }.place-card { grid-template-columns: 26px minmax(0, 1fr); }.place-no { width: 26px; height: 26px; font-size: 11px; }.place-actions { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-end; gap: 12px; }.place-name { font-size: 17px; }.steps li { font-size: 10px; padding: 4px 9px 4px 5px; }.webhook-field { grid-template-columns: 96px minmax(0, 1fr); }.place-card-footer { flex-direction: column; }.share-btn { min-height: 38px; }.toggle-btn { font-size: 11px; padding: 7px 11px 7px 8px; }.teams-dialog { max-height: 92vh; }.teams-dialog .cancel-dialog-form { max-height: 92vh; }.teams-preview-row { grid-template-columns: 66px minmax(0, 1fr); }.success-dialog-content { padding: 27px 21px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }.top-pick-spark { animation: none; } }

/* ================= v2 (사내 전용) ================= */

/* ---------- 상단 사용자 줄 ---------- */
.user-bar { display: flex; justify-content: flex-end; align-items: center; gap: 4px 14px; flex-wrap: wrap; margin: -26px 0 18px; color: var(--ink-soft); font-size: 12px; }
.user-bar a { color: var(--ink-soft); font-weight: 700; text-decoration: none; }
.user-bar a:hover { color: var(--accent); text-decoration: underline; }
.user-bar-name { color: var(--ink); font-weight: 700; }
.user-bar .link-btn { margin-left: 0; color: var(--ink-soft); text-decoration: none; }
.user-bar .link-btn:hover { color: var(--accent); text-decoration: underline; }

/* ---------- 로그인 · 비밀번호 변경 ---------- */
.auth-wrap { width: min(100%, 480px); }
.auth-card .btn.block { margin-top: 4px; }
.auth-card > .hint { margin-top: 14px; }
.auth-notice { margin: -10px 0 20px; padding: 11px 13px; color: #842c22; border: 1px solid #e4c8b7; border-radius: 3px; background: #fbefe8; font-size: 13px; font-weight: 700; line-height: 1.6; }

/* ---------- 모임장 배지 · 단계 표시 ---------- */
.chip-host { font-family: inherit; font-weight: 800; color: #5d3a10; border-color: #e7cf9a; background: #fbf0d6; }
button.chip-host { cursor: default; }
button.chip-host.clickable { cursor: pointer; }
button.chip-host.clickable:hover { border-color: var(--medal-gold-deep); }
.host-pop { margin: -9px auto 14px; color: var(--ink-soft); font-size: 12px; }
.stage-wrap { margin: -4px 0 16px; }
.stage-bar { display: flex; justify-content: center; align-items: center; gap: 0; list-style: none; }
.stage-bar li { display: inline-flex; align-items: center; gap: 5px; color: #9c9086; font-size: 11px; font-weight: 700; }
.stage-bar li + li::before { width: 26px; height: 1px; margin: 0 8px; content: ''; background: var(--line); }
.stage-bar li b { display: grid; width: 17px; height: 17px; place-items: center; color: var(--surface); border-radius: 50%; background: #c8bcb0; font-size: 10px; line-height: 1; }
.stage-bar li.done { color: var(--ink-soft); }
.stage-bar li.done b { background: #3cb371; font-size: 0; }
.stage-bar li.done b::before { content: '✓'; color: #fff; font-size: 10px; }
.stage-bar li.current { color: var(--accent); }
.stage-bar li.current b { background: var(--accent); }
.stage-status { margin-top: 5px; color: var(--ink-soft); font-size: 11px; }

/* ---------- 내 일정 (계정 기반 투표) ---------- */
.me-line { font-size: 14px; line-height: 1.6; }
.me-line b { color: var(--accent); }
.label-sub { margin-left: 6px; color: var(--ink-soft); font-size: 11px; font-weight: 400; }
.person-chip.mine small { font-size: 10px; opacity: 0.75; }
#vote-calendar-card.view-only { border-style: dashed; }
#vote-calendar-card.view-only .cal-cell { cursor: default !important; }

/* ---------- 최종 참석 확인 카드 ---------- */
.final-card { border-color: rgba(156, 48, 36, 0.38); background: linear-gradient(180deg, #fff8ef, rgba(255, 253, 248, 0.96)); }
.final-card.finalized { border-color: rgba(40, 98, 71, 0.38); }
.final-card.finalized::before { background: var(--success); }
.final-card.finalized .section-kicker { color: var(--success); }
.final-card h2 { margin-bottom: 4px; }
.final-when { color: var(--accent); font-size: 15px; font-weight: 700; }
.final-me { margin: 12px 0 10px; font-size: 13px; }
.final-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.final-actions input[type='text'] { flex: 1 1 200px; width: auto; min-height: 42px; }
.rsvp-btn { min-width: 86px; min-height: 42px; padding: 8px 16px; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; background: var(--surface); cursor: pointer; font: inherit; font-size: 14px; font-weight: 700; transition: background 150ms ease, color 150ms ease, border-color 150ms ease; }
.rsvp-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
.rsvp-btn.on[data-rsvp='attending'] { color: var(--accent-contrast); border-color: var(--success); background: var(--success); box-shadow: 2px 2px 0 #a6c9b4; }
.rsvp-btn.on[data-rsvp='absent'] { color: var(--accent-contrast); border-color: #7d6f63; background: #7d6f63; box-shadow: 2px 2px 0 #cdbfb1; }
.rsvp-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.final-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.final-counts { font-size: 13px; font-weight: 700; }

/* ---------- 명단 팝업 ---------- */
.roster-dialog { width: min(calc(100% - 32px), 560px); max-height: 88vh; }
.roster-dialog .cancel-dialog-form { max-height: 88vh; overflow-y: auto; }
.roster-dialog .cancel-dialog-copy { margin-bottom: 12px; }
.roster-group { padding: 10px 0; border-top: 1px solid var(--line); }
.roster-group h3 { margin-bottom: 6px; font-size: 13px; }
.roster-group h3 small { margin-left: 4px; color: var(--ink-soft); }
.roster-attending h3 { color: var(--success); }
.roster-absent h3 { color: #6b5f55; }
.roster-pending h3 { color: var(--accent); }
.roster-group ul { list-style: none; }
.roster-item { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 5px 0; font-size: 13px; }
.roster-name { font-weight: 700; }
.roster-note { color: var(--ink-soft); font-size: 12px; }
.roster-tag { padding: 1px 7px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 700; }
.roster-tag.warn { color: #842c22; border-color: #e0b2a5; background: #fbefe8; }
.roster-actions { display: inline-flex; gap: 4px; margin-left: auto; }
.mini-btn { padding: 3px 9px; color: var(--accent); border: 1px solid var(--accent); border-radius: 3px; background: transparent; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }
.mini-btn:hover:not(:disabled) { background: var(--accent-soft); }
.mini-btn:disabled { opacity: 0.5; }
.roster-actions-row, .roster-actions { flex-wrap: wrap; }
.cancel-dialog-actions.roster-actions { margin-left: 0; }

/* ---------- 구성원 고르기 팝업 ---------- */
.people-dialog { width: min(calc(100% - 32px), 560px); }
.people-dialog .cancel-dialog-copy { margin-bottom: 12px; }
.people-picker-list { max-height: 46vh; margin-top: 10px; overflow-y: auto; border: 1px solid var(--line); border-radius: 3px; background: var(--surface); }
.people-group { padding: 8px 12px; border-bottom: 1px solid var(--line); }
.people-group:last-child { border-bottom: 0; }
.people-group-head { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 12px; font-weight: 700; cursor: pointer; }
.people-group-head small { color: var(--ink-soft); font-weight: 400; }
.people-group-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.people-item { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: 12px; font-weight: 700; }
.people-item.on { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.people-picker-list input[type='checkbox'], .admin-check input[type='checkbox'] { width: 15px; height: 15px; accent-color: var(--accent); }
.people-picker-count { margin-top: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.people-picker-count.over { color: var(--sun); }

/* ---------- 약속 만들기: 대상자 ---------- */
.invitee-picker { display: flex; align-items: center; gap: 12px; }
.invitee-count { color: var(--accent); font-size: 14px; font-weight: 700; }
.invitee-chips { margin-top: 10px; }
.invitee-chips:empty { display: none; }
.admin-check { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); cursor: pointer; font-size: 12px; font-weight: 700; }
.admin-check small { color: var(--ink-soft); font-weight: 400; }
.invitee-visibility { margin-top: 10px; }

/* ---------- 일정 확정 다이얼로그: 바로 최종 확인 ---------- */
.confirm-final-field { margin-top: 14px; padding: 12px 13px; border: 1px dashed var(--line); border-radius: 3px; }
.confirm-final-deadline { margin-top: 10px; }
.confirm-final-deadline label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
input[type='datetime-local'] { width: 100%; min-height: 44px; padding: 9px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; background: var(--surface); font: inherit; }
.cancel-dialog-form .field + .field { margin-top: 14px; }

/* ---------- 모임장 메뉴 (v2 항목) ---------- */
.admin-row-actions select { width: auto; min-height: 38px; padding: 6px 10px; font-size: 13px; }
.admin-inline-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.admin-details-body textarea, .csv-box textarea { width: 100%; padding: 10px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; background: var(--surface); font: inherit; font-size: 13px; line-height: 1.6; resize: vertical; }
.admin-details-body textarea:focus-visible, .csv-box textarea:focus-visible { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(156, 48, 36, 0.16); }
.nudge-targets { margin-bottom: 10px; color: var(--ink); font-size: 13px; font-weight: 700; }
.admin-row-details.disabled > summary { cursor: not-allowed; opacity: 0.6; }
.admin-dialog .admin-details-body .field { margin-bottom: 12px; }

/* ---------- 내 약속 ---------- */
.my-intro { margin: -14px 0 16px; }
.my-list { display: grid; gap: 10px; }
.my-item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; padding: 14px 16px; color: var(--ink); border: 1px solid var(--line); border-radius: 3px; background: var(--surface); text-decoration: none; transition: border-color 150ms ease, transform 150ms ease; }
.my-item:hover { border-color: var(--accent); transform: translateY(-1px); }
.my-item.needs { border-left: 3px solid var(--accent); }
.my-item-main { display: flex; flex-direction: column; min-width: 0; }
.my-item-title { font-size: 15px; }
.my-item-when { color: var(--ink-soft); font-size: 12px; }
.my-item-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip-stage.stage-confirming { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.chip-stage.stage-finalized { color: var(--success); border-color: #b7d2c1; background: #eaf4ee; }
.chip-needs { color: #fffaf3; border-color: #842c22; background: #842c22; }
.chip-off { color: #6b5f55; border-color: #cdbfb1; background: #eee6dc; }

/* ---------- 운영자: 계정 관리 ---------- */
.wide-wrap { width: min(100%, 1040px); }
.admin-create-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 12px; align-items: end; }
.admin-create-grid .field { margin-bottom: 14px; }
.admin-create-grid .admin-check { margin-bottom: 24px; }
.admin-create-grid .btn { margin-bottom: 14px; }
.csv-box { margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.csv-box summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.csv-box .hint { margin: 8px 0; }
.temp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.temp-card { border-color: rgba(156, 48, 36, 0.45); background: #fff8ef; }
.temp-pw { padding: 2px 7px; border-radius: 3px; background: #f3e4d6; font-size: 14px; letter-spacing: 0.04em; }
.user-filter { width: 240px !important; min-height: 40px !important; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { padding: 8px 10px; color: var(--ink-soft); border-bottom: 1px solid var(--line); font-size: 11px; text-align: left; white-space: nowrap; }
.admin-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr.inactive td { color: #a39a90; }
.admin-table td input[type='text'] { min-height: 34px; padding: 5px 8px; font-size: 13px; }
.admin-table .row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.admin-table .row-actions .btn.small { min-height: 30px; padding: 5px 9px; font-size: 11px; }
.btn.confirming { color: #fffaf3 !important; border-color: #842c22 !important; background: #842c22 !important; }
.place-confirm-btn.static { cursor: default; }

@media (max-width: 560px) {
  .user-bar { margin-top: -14px; justify-content: center; }
  .final-actions .rsvp-btn { flex: 1 1 0; }
  .final-summary { flex-direction: column; align-items: stretch; }
  .roster-actions { margin-left: 0; }
  .admin-create-grid { grid-template-columns: 1fr; }
  .user-filter { width: 100% !important; }
  .stage-bar li + li::before { width: 14px; margin: 0 5px; }
  .my-item-chips { width: 100%; }
}

/* ---------- Entra ID 로그인 ---------- */
.ms-login { color: var(--ink) !important; border-color: #8c8c8c !important; background: #fff !important; box-shadow: 3px 3px 0 #d6cfc5 !important; }
.ms-login:hover { background: #f6f3ee !important; }
.ms-login-label { display: inline-flex; align-items: center; gap: 10px; }
.auth-card .auth-notice { margin: 0 0 16px; font-weight: 400; word-break: break-word; }
.auth-sub { text-align: center; }
.admin-intro { margin: -14px 0 18px; }
.admin-create-grid { grid-template-columns: 1.3fr 1fr 1fr auto; }
.admin-create-tail { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.admin-create-tail .admin-check, .admin-create-tail .btn { margin-bottom: 0; }
@media (max-width: 560px) {
  .admin-create-grid { grid-template-columns: 1fr; }
}

/* ---------- 구성원 고르기: 회사 디렉터리 ---------- */
.people-directory { background: #fbf6ee; }
.people-directory .people-group-head { cursor: default; }
.people-item.dir small { color: var(--ink-soft); font-size: 10px; font-weight: 400; }
.people-item.off { opacity: 0.5; cursor: not-allowed; }
.people-directory-status { min-height: 1.2em; margin-top: 6px; color: var(--ink-soft); font-size: 11px; }

/* ---------- 팀즈 채팅방 고르기 ---------- */
.admin-inline-row { display: flex; gap: 8px; align-items: center; }
.admin-inline-row select { flex: 1 1 auto; width: auto; min-height: 40px; padding: 7px 10px; font-size: 13px; }
.room-new { margin: 4px 0 12px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 3px; }
.room-new summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.room-new[open] summary { margin-bottom: 6px; }
.room-new .hint { margin-bottom: 10px; }
.admin-table input[type='url'] { width: 100%; min-height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 3px; font: inherit; font-size: 13px; }
#admin-teams .error-msg:empty, #admin-teams .info-msg:empty { display: none; }
#admin-teams .admin-inline-actions:not(:has(button:not([hidden]))) { display: none; }
.people-directory-head { justify-content: space-between; gap: 10px; }
.people-directory-head .mini-btn { flex: none; }

/* ---------- 구성원 고르기: 접이식 묶음 · 이전에 등록했던 대상자들 ---------- */
.people-group-head { justify-content: space-between; cursor: default; }
.people-group-head > label { display: inline-flex; align-items: center; gap: 7px; min-width: 0; cursor: pointer; }
.group-toggle { flex: none; padding: 2px 6px; color: var(--ink-soft); border: 0; background: none; cursor: pointer; font: inherit; font-size: 11px; font-weight: 700; }
.group-toggle:hover { color: var(--accent); }
.people-history { border-top: 1px solid var(--line); background: #f8f2e9; }
.people-history-head { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; color: var(--ink); border: 0; background: none; cursor: pointer; font: inherit; font-size: 12px; font-weight: 700; text-align: left; }
.people-history-head small { margin-left: 4px; color: var(--ink-soft); font-weight: 400; }
.people-history-head:hover .group-toggle { color: var(--accent); }
.people-subgroup { padding-left: 22px; border-bottom: 0; border-top: 1px dashed var(--line); }

/* ---------- 구성원 고르기: 삭제 모드 ---------- */
.people-delete-row { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.people-delete-row .btn.active { color: #fffaf3; border-color: #842c22; background: #842c22; }
.people-delete-hint { color: #842c22; font-size: 11px; line-height: 1.5; }
.deleting .people-picker-list { border-color: #c98a7c; background: #fdf5f2; }
.deleting #people-save { border-color: #842c22; background: #842c22; box-shadow: 3px 3px 0 #d69765; }
.people-delete-dialog { width: min(calc(100% - 32px), 440px); }
.people-delete-names { margin: -8px 0 4px; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.7; word-break: keep-all; }
.people-delete-row .btn { flex: none; white-space: nowrap; }
.people-delete-row .btn.ghost.danger.active, .people-delete-row .btn.ghost.danger.active:hover { color: #fffaf3; border-color: #842c22; background: #842c22; }
