:root {
  --bg: #f3f6fb;
  --surface: #ffffff;
  --text: #0f172a;
  --body: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --soft: #eff6ff;
  --success: #0f766e;
  --success-bg: #ecfdf5;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --shadow: 0 16px 42px rgb(15 23 42 / 0.08);
}
* { box-sizing: border-box; }
html {
  min-width: 320px;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-bottom: calc(92px + env(safe-area-inset-bottom));
}
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background: var(--bg);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}
button, input, select, textarea, a { font: inherit; }
input, select, textarea { min-width: 0; max-width: 100%; font-size: 16px; }
textarea { resize: vertical; }
a { color: var(--primary); }
[hidden] { display: none !important; }
html.session-revalidating [data-hybrid-auth-state="AUTHENTICATED"] { visibility: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.stage-shell {
  width: min(100%, 520px);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 max(16px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.auth-shell { display: flex; flex-direction: column; }
.topbar {
  min-height: 68px;
  padding: calc(10px + env(safe-area-inset-top)) 2px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font-weight: 800; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(145deg, #2563eb, #0d9488); }
.version { color: var(--muted); font-size: 12px; }
.back-link { width: 44px; min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; display: grid; place-items: center; color: var(--text); background: transparent; text-decoration: none; font-size: 25px; cursor: pointer; }
.header-leading { min-width: 0; display: flex; align-items: center; gap: 8px; }
.header-leading > div { min-width: 0; }
.header-leading h1 { overflow-wrap: anywhere; }
[data-app-close] { min-width: 44px; min-height: 44px; }
.card {
  margin-bottom: 16px;
  padding: 24px 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-card { margin-top: clamp(32px, 10vh, 96px); }
.signup-card { margin-top: 4px; }
.eyebrow { margin: 0 0 8px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .02em; }
h1, h2 { margin: 0; letter-spacing: -.025em; }
h1 { font-size: 24px; line-height: 1.35; }
h2 { font-size: 21px; line-height: 1.4; }
.lead { margin: 10px 0 20px; color: var(--muted); }
.stack { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field > span { font-size: 14px; font-weight: 750; }
.field input {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 13px; color: var(--text); background: #fff; font-size: 16px;
}
.field input:focus { outline: 3px solid rgb(37 99 235 / .14); border-color: #60a5fa; }
.field small, .privacy-note { color: var(--muted); font-size: 12px; }
.button {
  min-height: 50px; padding: 12px 16px; border: 0; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; cursor: pointer; font-weight: 800;
}
.button:disabled { opacity: .5; cursor: not-allowed; }
.primary { color: #fff; background: var(--primary); box-shadow: 0 8px 20px rgb(37 99 235 / .2); }
.primary:hover:not(:disabled) { background: var(--primary-dark); }
.secondary { color: var(--primary-dark); border: 1px solid #bfdbfe; background: var(--soft); }
.ghost { color: var(--body); border: 1px solid var(--line); background: #fff; }
.divider { margin: 22px 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; color: #94a3b8; font-size: 12px; }
.divider span { height: 1px; background: var(--line); }
.divider b { font-weight: 600; }
.issue-callout { margin: 20px 0 16px; padding: 15px; border: 1px solid #bfdbfe; border-radius: 15px; display: grid; gap: 4px; background: var(--soft); }
.issue-callout strong { font-size: 14px; }
.issue-callout a { width: fit-content; font-weight: 800; }
.guide-list { margin: 0 0 18px; padding-left: 21px; color: var(--body); font-size: 13px; }
.guide-list li + li { margin-top: 6px; }
.compact-list { margin-top: -8px; }
.compact-list [data-state="SATISFIED"] { color: var(--success, #176b45); }
.compact-list [data-state="UNSATISFIED"] { color: var(--danger, #9b1c1c); }
.password-visibility-toggle { align-self: flex-start; margin-top: -10px; }
.upload-block { margin-top: 16px; display: grid; gap: 9px; }
.pc-link-block { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.pc-link-block h2 { font-size: 17px; }
.pc-link-block > p { color: var(--muted); font-size: 13px; }
.pc-link-code { display: block; margin: 8px 0; color: var(--text); font-size: clamp(30px, 10vw, 42px); font-weight: 900; letter-spacing: .12em; }
.file-name { margin: 0; min-width: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.notice { margin-top: 16px; padding: 15px; border-radius: 15px; }
.notice strong { display: block; margin-bottom: 4px; }
.notice p { margin: 4px 0; color: var(--body); font-size: 13px; }
.error-notice { border: 1px solid #fecaca; background: var(--danger-bg); }
.error-notice strong { color: var(--danger); }
.success-notice { border: 1px solid #a7f3d0; background: var(--success-bg); }
.success-notice strong { color: var(--success); }
.birthdate-section { margin-top: 16px; display: grid; gap: 14px; }
.button-row { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.message { min-height: 20px; margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.message.is-error { color: var(--danger); font-weight: 700; }
.nickname-panel { margin: 18px 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; }
.nickname-current { margin: 4px 0 8px; font-size: 22px; }
.nickname-panel form { display: grid; gap: 12px; margin-top: 14px; }
.progress-list { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.progress-list li { display: grid; grid-template-columns: 30px 1fr; gap: 11px; align-items: center; color: #94a3b8; }
.progress-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #cbd5e1; background: #fff; font-size: 12px; font-weight: 800; }
.progress-list li.current { color: var(--primary-dark); font-weight: 800; }
.progress-list li.current .progress-dot { color: #fff; border-color: var(--primary); background: var(--primary); }
.progress-list li.done { color: var(--success); font-weight: 750; }
.progress-list li.done .progress-dot { color: #fff; border-color: var(--success); background: var(--success); }
.provider-delay-notice { margin-top: 18px; }
.remaining-time { font-weight: 700; color: #8a3d00; }
.result-card { margin-top: clamp(28px, 8vh, 72px); text-align: center; }
.result-card p:not(.eyebrow) { color: var(--muted); }
.result-icon { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--success); font-size: 28px; font-weight: 900; }
@media (min-width: 700px) {
  .stage-shell { width: 560px; padding-left: 20px; padding-right: 20px; }
  .card { padding: 28px; }
}
@media (max-width: 370px) {
  .stage-shell { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }
  .card { padding: 20px 16px; }
  .button-row { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
}

.org-option-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 8px;
}

.org-option {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  line-height: 1.45;
}

.community-shell { width: min(100%, 720px); min-height: 100vh; min-height: 100dvh; margin: 0 auto; padding: 0 max(16px, env(safe-area-inset-right)) calc(92px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.community-header { min-height: 76px; padding: calc(12px + env(safe-area-inset-top)) 2px 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.community-header h1 { font-size: 27px; }
.moderation-notices { display: grid; gap: 10px; margin: 12px 0; }
.moderation-notice { border: 1px solid #e1b86b; background: #fff9eb; border-radius: 12px; padding: 12px; }
.moderation-notice p { margin: 7px 0; }
.compose-panel select { width: 100%; padding: 11px; border: 1px solid #c7ced8; border-radius: 10px; background: #fff; }
.account-link { min-height: 42px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 750; background: #fff; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.count-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; color: #fff; background: #dc2626; font-size: 11px; font-weight: 900; vertical-align: middle; }
.notification-list { display: grid; gap: 10px; margin-top: 14px; }
.notification-item { width: 100%; padding: 15px; border: 1px solid #bfdbfe; border-radius: 14px; display: grid; gap: 4px; color: var(--text); background: var(--soft); text-align: left; cursor: pointer; }
.notification-item.is-acknowledged { border-color: var(--line); background: #fff; }
.notification-item time { color: var(--muted); font-size: 12px; }
.preference-list { display: grid; gap: 12px; margin-top: 16px; }
.preference-row { margin: 0 !important; padding: 14px; border: 1px solid var(--line); border-radius: 14px; display: flex !important; align-items: center; justify-content: space-between; gap: 18px; }
.preference-row span { display: grid; gap: 3px; }
.preference-row small { color: var(--muted); }
.preference-row input { width: 22px; height: 22px; flex: 0 0 auto; }
.notification-overview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 18px; }
@media (max-width: 460px) { .notification-overview { grid-template-columns: 1fr; } }
.device-notification-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.device-notification-panel h3 { margin: 0; }
.room-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.room-tab { min-height: 44px; border: 0; border-radius: 11px; color: var(--muted); background: transparent; cursor: pointer; font-weight: 800; }
.room-tab.is-active { color: #fff; background: var(--primary); }
.room-panel { padding: 18px 0; }
.region-setup, .feed-empty { margin-bottom: 14px; padding: 22px 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.region-setup h2 { font-size: 19px; }
.region-setup p, .feed-empty p { color: var(--muted); }
.bottom-nav { position: fixed; z-index: 10; right: 0; bottom: 0; left: 0; width: min(100%, 720px); margin: 0 auto; padding: 9px max(12px, env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: rgb(255 255 255 / .96); backdrop-filter: blur(12px); }
.bottom-nav a, .bottom-nav span { min-height: 46px; display: grid; place-items: center; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 750; }
.bottom-nav .is-current { color: var(--primary); }
.bottom-nav span[aria-disabled="true"] { opacity: .55; }
.feed-list, .comment-list { display: grid; gap: 12px; }
.feed-photo-preview, .photo-time-group, .photo-new-boundary, .photo-detail { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.photo-preview-grid, .photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.photo-preview-card, .photo-card { min-width: 0; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: var(--soft); cursor: pointer; }
.photo-preview-card img, .photo-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--soft); }
.photo-controls { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.photo-tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.photo-tabs button { min-height: 40px; padding: 7px 16px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-weight: 800; }
.photo-tabs button.is-active { color: #fff; background: var(--primary); }
.photo-filter { display: grid; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 800; }
.photo-filter select { min-height: 40px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.photo-groups { display: grid; gap: 14px; }
.photo-group-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.photo-group-heading h2 { margin: 0 0 10px; font-size: 18px; }
.photo-card { position: relative; text-align: left; }
.photo-card-meta { display: block; padding: 8px; color: var(--text); font-size: 12px; font-weight: 750; }
.photo-update-banner { position: sticky; z-index: 3; top: 8px; width: 100%; margin-bottom: 10px; padding: 11px; border: 1px solid #93c5fd; border-radius: 999px; color: #1e3a8a; background: #eff6ff; font-weight: 850; box-shadow: var(--shadow); }
.photo-new-boundary { margin-bottom: 12px; display: grid; gap: 4px; border-color: #bfdbfe; background: #eff6ff; }
.photo-new-boundary span { color: var(--muted); font-size: 12px; }
.photo-detail-images { display: grid; gap: 10px; }
.photo-detail-images img { width: 100%; max-height: 70vh; border-radius: 14px; object-fit: contain; background: #0f172a; }
@media (max-width: 370px) { .photo-controls { align-items: stretch; flex-direction: column; } .photo-preview-grid, .photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feed-card, .compose-panel, .post-detail, .comment-card { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow); }
.feed-author { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.feed-card-title { display: block; width: 100%; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-weight: 800; text-align: left; cursor: pointer; }
.feed-card-body, .detail-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.feed-actions, .panel-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.message-peer-menu { position: relative; }
.message-peer-menu[open] { display: grid; gap: 8px; }
.message-peer-menu summary { list-style: none; cursor: pointer; }
.message-photo { min-height: 112px; width: 100%; border-style: dashed; }
.media-action-sheet { width: min(92vw, 384px); border: 0; border-radius: 16px; padding: 16px; }
.media-action-sheet::backdrop { background: rgb(0 0 0 / 45%); }
.message-reply { display: grid; gap: 8px; margin-top: 14px; }
.message-reply textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; resize: vertical; }
.message-reply .button { justify-self: end; }
.panel-heading { justify-content: space-between; }
.text-button, .comment-preview { padding: 8px 10px; border: 0; border-radius: 10px; background: var(--soft); color: var(--text); font: inherit; cursor: pointer; }
.comment-preview { width: 100%; margin-top: 12px; text-align: left; }
.compose-panel label, .post-detail label { display: grid; gap: 6px; margin-top: 12px; }
.compose-panel input, .compose-panel textarea, .post-detail textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
.compose-panel .check-row { display: flex; align-items: center; gap: 8px; }
.compose-panel .check-row input { width: auto; }
.organization-tag-picker { margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.organization-tag-picker legend { padding: 0 6px; font-weight: 800; }
.tag-search-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.tag-search-row .button { margin: 0; white-space: nowrap; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.organization-tag { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid #bfdbfe; border-radius: 999px; background: #eff6ff; color: #1e3a8a; font-size: 13px; }
.organization-tag button { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 800; cursor: pointer; }
.tag-new-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #dc2626; }
.muted { color: var(--muted); font-size: 14px; }
.search-panel { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.search-panel form { display: grid; gap: 9px; }
.search-panel input, .search-panel select { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font: inherit; }
.search-results { display: grid; gap: 10px; margin: 10px 0 22px; }
.search-result-card { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
@media (max-width: 460px) {
  .community-header { gap: 8px; }
  .header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .account-link { padding-inline: 10px; }
}
.search-snippet { color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
