@font-face {
  font-family: "Pretendard";
  src: url("public/fonts/PretendardVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  font-family: "Pretendard", sans-serif;
  color: #262626;
  background: #ffffff;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-weight: 400;
  --prism-brand: #6478ff;
  --prism-brand-subtle: #dcebff;
  --prism-paper: #ffffff;
  --prism-ink: #262626;
  --prism-muted: #73717c;
  --prism-border: #e6e6e9;
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; background: var(--prism-paper); }
body { margin: 0; min-width: 320px; min-height: 100vh; min-height: 100svh; }

/* Prevent double-tap text zoom in-app; the viewport meta already locks
   maximum-scale=1 for WKWebView. */
html, body { touch-action: manipulation; -webkit-text-size-adjust: 100%; }

.container {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 18px) 20px calc(env(safe-area-inset-bottom) + 24px);
  background: var(--prism-paper);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
}

.brand-lockup { width: 112px; height: 34px; flex-shrink: 0; object-fit: contain; }
.session-controls { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; max-width: calc(100% - 122px); }
.session-logout { min-height: 44px; padding: 0 12px; border-radius: 12px; background: #f2f3f9; color: var(--prism-ink); font-size: 13px; }
.session-error { margin: 0; color: #ac2632; font-size: 12px; text-align: right; }
.session-local-exit { min-height: 44px; height: auto; padding: 6px; background: transparent; color: #ac2632; font-size: 12px; text-align: right; white-space: normal; }

.welcome-card {
  width: min(100%, 440px);
  margin: auto;
  padding: 40px 0 24px;
  text-align: center;
}

.welcome-character { display: block; width: 120px; height: 120px; object-fit: contain; margin: 0 auto 24px; }
.eyebrow { margin: 0 0 8px; color: var(--prism-color-text-brand); font-size: var(--prism-font-body-14); font-weight: var(--prism-font-weight-medium); }
h1 { margin: 0; font-size: 32px; line-height: 1.3; font-weight: 700; letter-spacing: -.045em; }
.description { margin: 10px 0 30px; color: var(--prism-muted); font-size: 15px; }

.row { display: flex; gap: 10px; }
/* MVP D2 hidden entry points rely on the `hidden` attribute. Author `display`
   rules — including the global `button { display: inline-flex }` below — outrank
   the UA `[hidden] { display: none }`, so this base rule must win with
   `!important`. Every `hidden=` in src/ is a static `hidden=true` on an element
   that must not render, so nothing visible depends on the UA default. */
[hidden] { display: none !important; }
input, button { min-height: 52px; border-radius: 16px; font: inherit; font-size: 16px; }
input { min-width: 0; flex: 1; padding: 0 16px; border: 1px solid var(--prism-border); color: var(--prism-ink); background: #fff; outline: none; font-size: var(--prism-font-body-15); }
input:focus { border-color: var(--prism-brand); box-shadow: 0 0 0 3px var(--prism-brand-subtle); }
input::placeholder { color: var(--prism-muted); }
button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border: 0; color: #10101c; background: var(--prism-brand); font-weight: var(--prism-font-weight-medium); cursor: pointer; transition: transform .18s, filter .18s; }
button:hover { filter: brightness(.92); transform: translateY(-1px); }
button:active { transform: translateY(0); }
/* Sizing default only: icon recoloring is per-component (assets carry their
   Figma stroke colors; blanket filters blackened them to #000). */
button img { width: 18px; height: 18px; }
.greet-message { min-height: 24px; margin: 18px 0 0; color: var(--prism-ink); }

.container { max-width: 540px; margin: 0 auto; padding-bottom: calc(env(safe-area-inset-bottom) + 90px); }
.page { width: 100%; flex: 1; padding: 25px 0; }
.page h1 { font-size: 28px; margin-bottom: 20px; }
/* Figma IA19 31:2863: the activity title is Title/20-Bold. */
.activity h1 { font-size: var(--prism-font-title-20); font-weight: var(--prism-font-weight-bold); line-height: var(--prism-line-title-20); margin-bottom: 8px; }
.page h2 { font-size: 19px; margin: 25px 0 12px; }
.page label { display: block; margin: 14px 0 7px; font-weight: 600; }
.page input, .page textarea { width: 100%; }
.page textarea { min-height: 120px; padding: 15px; border: 1px solid var(--prism-border); border-radius: 16px; font: inherit; font-size: var(--prism-font-body-15); resize: vertical; }
.page select { min-height: 44px; border: 1px solid var(--prism-border); border-radius: 12px; background: white; font: inherit; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.heading h1, .heading h2 { margin-bottom: 12px; }
.panel { padding: 20px; margin: 14px 0 24px; border-radius: 20px; background: var(--prism-brand-subtle); }
.panel p { margin-top: 0; }
.article-list { display: grid; gap: 12px; margin-top: 12px; }
.article-card { display: flex; align-items: flex-start; flex-direction: column; text-align: left; gap: 8px; padding: 18px; min-height: 88px; width: 100%; border: 1px solid var(--prism-border); border-radius: 18px; background: #fff; color: var(--prism-ink); text-decoration: none; }
.article-card small, .article-card span { color: var(--prism-muted); }
.article-card strong { font-size: 17px; line-height: 1.4; }
.state { background: #f5f6ff; padding: 24px; margin: 20px 0; border-radius: 18px; line-height: 1.5; }
.onboard { margin: auto 0; text-align: center; }
.splash { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--prism-brand); color: white; margin: -18px -20px -90px; }
.splash img { width: 200px; max-width: 75%; }
.onboard button { width: 100%; margin: 10px 0; }
.hero-image { width: 160px; height: 160px; object-fit: contain; margin: 0 auto 25px; }
.primary-link { display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px; border-radius: 16px; background: var(--prism-brand); color: white; text-decoration: none; font-weight: 700; }
.text-button, .back { background: transparent; color: var(--prism-brand); min-height: 44px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.actions button { flex: 1; min-height: 44px; white-space: nowrap; }
.account form { display: grid; gap: 8px; }
.account form button { margin-top: 14px; }
.check { display: flex !important; align-items: center; gap: 10px; }
.check input { width: 22px; height: 22px; min-height: 22px; flex: none; }
button:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 480px) {
  .container { padding-right: 20px; padding-left: 20px; }
  .welcome-card { padding: 40px 0 24px; }
  .row { flex-direction: column; }
  .account form button { width: 100%; }
}

/* The launch journey uses the entire viewport rather than the feed shell. */
.container.immersive { padding: 0; max-width: 540px; overflow: hidden; }
.immersive .splash { min-height: 100svh; margin: 0; padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom); }
.splash-wordmark { width: 176.8px; height: 80.6px; filter: brightness(0) invert(1); }
.splash-slogan { font-size: 15px; font-weight: 500; }
.onboard-screen { display: flex; flex: 1; flex-direction: column; min-height: 100svh; background: white; padding-top: env(safe-area-inset-top); overflow: hidden; }
.onboard-screen.is-subtle { background: var(--prism-brand-subtle); }
.onboard-topbar { display: flex; justify-content: flex-end; padding: 4px 8px; }
.icon-button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 10px; border-radius: 50%; background: transparent; }
.icon-button img { width: 22px; height: 22px; }
.onboard-copy { padding: 24px 20px 0; }
.onboard-title { font-size: 24px; font-weight: var(--prism-font-weight-bold); line-height: 32px; color: #454342; letter-spacing: normal; }
.onboard-body { color: var(--prism-muted); font-size: 15px; font-weight: var(--prism-font-weight-medium); line-height: 20px; }
.onboard-illustration { position: relative; flex: 1; min-height: 280px; overflow: hidden; }
.onboard-character, .onboard-bubble, .onboard-bubble-dot, .onboard-chips, .onboard-note { position: absolute; }
.onboard-character.is-faded { opacity: .25; }
.onboard-bubble, .onboard-bubble-dot { display: grid; place-items: center; border-radius: 50%; background: white; box-shadow: 0 0 5px rgba(0, 0, 0, 0.25); }
.onboard-bubble img { width: 48%; height: 48%; }
.onboard-chips { display: flex; gap: 10px; }
/* Figma SelectChip (8010:49 etc.): label Prism/Body/14-Medium for every state; unselected stroke 1px, selected 1.5px. */
.select-chip { display: inline-flex; gap: 3px; padding: 6px 8px; border-radius: 999px; background: white; border: 1px solid var(--prism-color-border-subtle); font-size: var(--prism-font-body-14); font-weight: var(--prism-font-weight-medium); }
.select-chip.is-decorative { pointer-events: none; opacity: .85; }
.select-chip.is-selected, .select-chip.is-highlighted { background: var(--prism-brand-subtle); border: 1.5px solid var(--prism-brand); color: var(--prism-brand); font-size: var(--prism-font-body-14); font-weight: var(--prism-font-weight-medium); box-shadow: var(--prism-shadow-floating); }
.select-chip.is-highlighted { background: var(--prism-brand-subtle); border: 1.5px solid var(--prism-brand); color: var(--prism-brand); font-size: var(--prism-font-body-14); font-weight: var(--prism-font-weight-medium); box-shadow: var(--prism-shadow-floating); }
.select-chip img { width: 14px; height: 14px; }
.onboard-note { display: grid; gap: 8px; padding: 12px 16px 16px; background: var(--prism-color-surface); border-radius: var(--prism-radius-lg); box-shadow: var(--prism-shadow-floating); }
.onboard-note-head { display: flex; align-items: center; gap: 4px; font-size: var(--prism-font-caption-12); line-height: var(--prism-line-caption-12); }
.onboard-note-head img { width: 16px; }
.onboard-note-line { height: 6px; border-radius: 3px; background: #dadada; }
.onboard-actions { display: grid; justify-items: center; gap: 24px; padding: 16px 20px calc(env(safe-area-inset-bottom) + 8px); }
.page-indicator { display: flex; gap: 8px; align-items: center; }
.page-dot { width: 8px; height: 8px; border-radius: 999px; background: #dadada; }
.page-dot.is-active { width: 20px; background: var(--prism-brand); }
.button-primary { width: 100%; min-height: 52px; border-radius: 999px; background: var(--prism-brand); color: white; }

/* Feed, discovery, briefing, account and activity screens. */
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.home-topbar, .home-greeting, .home-banner, .home-filters, .briefing-bar, .briefing-tabs, .activity-tabs { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-topbar { justify-content: flex-end; }
.home-character { width: 89px; height: 89px; object-fit: contain; }
.home-banner { padding: 8px 12px 8px 16px; border-radius: 10px; background: var(--prism-brand-subtle); }
.home-filters { position: sticky; top: 0; z-index: 2; padding: 8px 0; background: white; border-bottom: 1px solid #dadada; }
/* Figma FilterTrigger (9:53/9:58) is a borderless transparent trigger. */
.filter-trigger { min-height: 44px; border-radius: 999px; border: 0; background: transparent; }
.filter-trigger.primary { color: var(--prism-color-text-primary); font-size: var(--prism-font-body-15); font-weight: var(--prism-font-weight-medium); }
.filter-trigger.secondary { color: var(--prism-color-text-secondary); font-size: var(--prism-font-body-13); font-weight: var(--prism-font-weight-regular); }
/* .menu-trigger removed after a full usage audit found zero src consumers. */
.issue-list, .recent-list, .saved-list, .record-list, .source-list { list-style: none; padding: 0; }
.issue-category { color: var(--prism-brand); }
.search-row { display: flex; gap: 8px; align-items: center; margin: 16px 0; }
/* Figma SearchField (14:598/14:609): 44px pill on bg/subtle, brand border
   only while typing. */
.search-row input { min-width: 0; min-height: 44px; border: 1px solid transparent; border-radius: 999px; background: var(--prism-color-surface-subtle); }
.search-row input:focus { border-width: 1.5px; box-shadow: none; }
.explore-controls { flex-wrap: wrap; }
.menu { position: relative; }
.menu-list { position: absolute; top: 100%; left: 0; z-index: 4; display: grid; min-width: 180px; max-height: 55svh; overflow-y: auto; padding: 6px; background: white; border: 1px solid var(--prism-border); border-radius: 12px; box-shadow: 0 8px 25px #0002; }
.menu-list button { justify-content: flex-start; background: white; color: var(--prism-ink); }
.recent-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 48px; border-bottom: 1px solid var(--prism-border); }
.result-count { font-size: 12px; color: var(--prism-muted); }
.empty-state, .error-state { text-align: center; padding: 30px 14px; }
/* Figma EmptyState illustration instance (14:633) is 110×130; keep character art intact. */
.empty-character { width: 110px; height: 130px; object-fit: contain; }
.briefing-bar { min-height: 44px; }
.briefing-tabs { border-bottom: 1px solid var(--prism-color-border-subtle); }
.briefing-tabs .tab, .activity-tab { min-width: 0; min-height: 44px; flex: 1; border: 0; border-radius: 0; background: var(--prism-color-surface); color: var(--prism-color-text-tertiary); padding: 0 5px; font-size: var(--prism-font-body-14); font-weight: var(--prism-font-weight-medium); white-space: nowrap; }
.briefing-tabs .tab.active, .activity-tab.active { color: var(--prism-color-text-primary); border-bottom: 2px solid var(--prism-brand); }
.meta, .source-meta { font-size: 12px; color: var(--prism-muted); }
.notice { padding: 16px; background: #f5f6ff; border-radius: 12px; color: var(--prism-muted); }
.section-title { font-size: 18px; }
.save-toggle { background: white; color: var(--prism-brand); border: 1px solid var(--prism-brand); }
.source-card { display: block; width: 100%; padding: 14px; margin: 8px 0; text-align: left; border: 1px solid var(--prism-border); border-radius: 14px; background: white; color: var(--prism-ink); }
.source-card.disabled { opacity: .5; }
.primary.cta { color: white; width: 100%; }
.account-symbol { display: block; width: 88px; height: 88px; object-fit: contain; margin: 20px auto; }
.field-error, .form-error { color: #b4232c; }
.divider { text-align: center; margin: 24px 0; color: var(--prism-muted); }
.agreement-list { display: grid; gap: 8px; margin: 16px 0; }
.interest-grid { flex-wrap: wrap; }
.interest-chip.active { background: var(--prism-brand); color: white; }
.record-form { display: grid; gap: 10px; margin: 16px 0; }
.record-context, .counter, .record-preview { color: var(--prism-muted); font-size: 13px; }
.record-detail { white-space: pre-wrap; }
.notice-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.record-body { line-height: 1.6; overflow-wrap: anywhere; }
.badge-private { font-size: 12px; color: var(--prism-color-text-secondary); }
.saved-item { display: flex; gap: 8px; align-items: stretch; margin: 10px 0; }
.saved-item .article-card { min-width: 0; }
.saved-remove { flex: 0 0 auto; }
.toast { padding: 10px; border-radius: 12px; background: var(--prism-brand-subtle); }

/* Reusable async states and modal controls. */
.state-view { display: grid; justify-items: center; gap: 12px; padding: 40px 24px; text-align: center; }
/* Figma EmptyState illustration instance (14:633) is 110×130; keep character art intact. */
.state-character { width: 110px; height: 130px; object-fit: contain; }
.state-spinner { width: 32px; height: 32px; object-fit: contain; animation: prism-spin 1s linear infinite; }
.state-title { margin: 0; font-size: 16px; font-weight: var(--prism-font-weight-bold); line-height: var(--prism-line-title-16); }
.state-message { margin: 0; font-size: 14px; line-height: 1.5; color: var(--prism-muted); }
.state-action { min-height: 52px; border-radius: 999px; color: white; }
.state-action.secondary { border: 1px solid var(--prism-brand); background: white; color: var(--prism-brand); }
.skeleton-post { display: grid; gap: 12px; margin: 12px 0; padding: 20px; border-radius: 16px; background: #f2f2f3; }
.skeleton-line { height: 12px; border-radius: 8px; background: #dadada; }
.skeleton-line.short { width: 40%; }
.section-error, .inline-alert { padding: 14px; margin: 12px 0; border-radius: 12px; background: #ffeded; color: #b4232c; }
.dialog-overlay { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: var(--prism-color-bg-overlay); }
/* Figma Dialog 24:2196 / 4091:13965: centered title and body on a 313px card. */
.dialog { width: min(313px, 100%); display: grid; gap: 8px; padding: 24px 20px 20px; border-radius: 24px; background: white; text-align: center; }
.dialog-title { margin: 0; font-size: var(--prism-font-title-16); font-weight: var(--prism-font-weight-bold); line-height: var(--prism-line-title-16); }
.dialog-message { color: var(--prism-muted); font-size: var(--prism-font-body-14); }
.dialog-actions { display: grid; gap: 8px; }
.dialog-confirm { color: white; }
.dialog-confirm.danger { background: #e5484d; }
.dialog-cancel { background: transparent; color: var(--prism-color-text-brand); }
.ai-summary { margin: 8px 0 14px; padding: 14px; border: 1px solid #dce2ff; border-radius: 14px; background: #f7f8ff; }
.ai-summary p { margin: 8px 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-label { display: inline-block; color: #4056d8; font-size: 12px; }
.ai-summary a { display: inline-flex; min-height: 40px; align-items: center; color: #4056d8; font-size: 13px; font-weight: 600; }
/* Derived AI rewrite (DEC-261116-article-rewrite-pipeline-4a7e): collapsed by
   default inside the existing summary card; reuses the .ai-summary tokens. */
.ai-rewrite { margin-top: 4px; }
.ai-rewrite-toggle { display: inline-flex; min-height: 40px; align-items: center; padding: 0; border: 0; background: transparent; color: #4056d8; font-size: 13px; font-weight: 600; }
.ai-rewrite-toggle[aria-expanded="true"] { text-decoration: underline; }
.ai-rewrite-panel { margin-top: 6px; padding-top: 10px; border-top: 1px solid #dce2ff; }
.ai-rewrite-panel p { margin: 8px 0; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-report { margin-top: 12px; }
.ai-report summary { display: inline-flex; min-height: 40px; align-items: center; color: #4056d8; font-size: 13px; font-weight: 600; cursor: pointer; }
.ai-report ul { margin: 6px 0; padding-left: 18px; }
.ai-report li { margin: 4px 0; line-height: 1.5; overflow-wrap: anywhere; }
.ai-report-unconfirmed { margin-top: 10px; color: var(--prism-muted); }
.ai-report-unconfirmed strong { color: #4056d8; font-size: 12px; }
.summary-unavailable { margin: 6px 2px 12px; color: var(--prism-muted); font-size: 13px; }
.issue-shortcut { border: 1px solid var(--prism-border); border-radius: 999px; }
.load-more { width: 100%; margin: 14px 0 4px; color: white; }
.end-of-feed, .page-loading { margin: 12px 0; color: var(--prism-muted); text-align: center; font-size: 13px; }
.issue-page-heading { display: flex; align-items: center; gap: 8px; }
.issue-page-heading h1 { flex: 1; }
.issue-cards { display: grid; gap: 18px; list-style: none; padding: 0; }
.issue-card { padding: 18px; border: 1px solid var(--prism-border); border-radius: 18px; }
.issue-card h2 { margin: 4px 0 12px; font-size: 20px; }
.issue-card h3 { margin: 20px 0 8px; font-size: 15px; }
.issue-card h4 { margin: 4px 0 8px; font-size: 15px; }
.issue-members { display: grid; gap: 10px; padding-left: 18px; }
.issue-members > li { padding-top: 12px; border-top: 1px solid var(--prism-border); }
.issue-member-meta { margin: 0; color: var(--prism-muted); font-size: 12px; }
.summary-sources { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.summary-sources a { min-height: 36px; }
.explore-result { display: grid; }
@keyframes prism-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .state-spinner { animation-duration: 3s; } button { transition: none; } }

.recent-empty { padding: 40px 20px; font-size: 14px; color: var(--prism-muted); text-align: center; }
.search-cancel { font-size: 15px; font-weight: 500; color: #73717C; }
.recent-keyword { font-size: 15px; }

/* Figma TopBar/Detail 10:228: 52px row, 4px side inset, 44px icon targets. */
.detail-topbar { display: flex; height: 52px; min-height: 52px; align-items: center; justify-content: space-between; gap: 0; padding: 0 4px; background: var(--prism-color-surface); }
.detail-topbar-button { display: grid; width: 44px; min-width: 44px; height: 44px; min-height: 44px; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.detail-topbar-button:hover { transform: none; filter: none; }
.detail-topbar-button img { width: 24px; height: 24px; }
.detail-topbar-button:disabled { opacity: .5; }
.issue-detail-head { display: block; }
/* Figma Bottom CTA 18:1815: fixed white bar, 1px top border, 12/20/34 inset
   (34 = home indicator, so env() is used with a 12px floor). */
.briefing-cta-bar { position: fixed; z-index: 9; right: 0; bottom: 0; left: 50%; width: min(100%, 393px); transform: translateX(-50%); padding: 12px 20px max(12px, env(safe-area-inset-bottom)); border-top: 1px solid var(--prism-color-border-subtle); background: var(--prism-color-surface); }
.briefing .primary.cta { width: 100%; min-height: 52px; margin: 0; border-radius: var(--prism-radius-full); background: var(--prism-color-brand); color: var(--prism-color-text-on-brand); font-size: var(--prism-font-button-16); }
/* Figma bottom-space (CTA) 18:1802 reserves the bar so content never hides. */
.page.briefing { padding-bottom: calc(96px + env(safe-area-inset-bottom)) !important; }
.briefing-tabs .tab:hover, .activity-tab:hover { transform: none; filter: none; }
/* Figma 18:1755: info icon + text column, no bullet list. */
/* Figma 17:1643: caption label above each field value. */
.related-list { list-style: none; padding: 0; }
.related-card { border: 1px solid var(--prism-color-border-default); border-radius: var(--prism-radius-lg); padding: 12px; margin: 8px 0; }
.related-card strong { font-size: var(--prism-font-body-14); font-weight: var(--prism-font-weight-medium); line-height: var(--prism-line-body-14); }
/* Briefing tab (DEC-261124-briefing-redesign-4a1c): header, tabs, question, 30초 상황 정리, impact card, related, CTA. */
.briefing-bar-title { flex: 1; margin: 0; text-align: center; font-size: var(--prism-font-title-16); font-weight: var(--prism-font-weight-bold); color: var(--prism-color-text-primary); }
.page.briefing .briefing-bar .save-toggle[hidden] { display: none; }
.page.briefing .briefing-header { display: flex; align-items: center; gap: 8px; margin: 0 20px; padding: 16px 0 12px; }
.page.briefing .briefing-category { flex: none; padding: 4px 10px; border-radius: var(--prism-radius-full); background: var(--prism-color-surface-subtle); font-size: var(--prism-font-caption-12); color: var(--prism-color-text-secondary); }
.page.briefing .briefing-title { flex: 1; min-width: 0; margin: 0; font-size: 20px; line-height: 1.3; font-weight: var(--prism-font-weight-bold); color: var(--prism-color-text-primary); overflow-wrap: anywhere; }
.page.briefing .briefing-sources-link { flex: none; display: inline-flex; align-items: center; gap: 2px; min-height: 36px; padding: 0; border: 0; background: none; font-size: var(--prism-font-caption-12); color: var(--prism-color-brand); }
.briefing-question { margin: 12px 20px; padding: 18px 20px; border-radius: var(--prism-radius-lg); background: #eef0ff; }
.briefing-question-label { margin: 0 0 6px; font-size: var(--prism-font-caption-12); color: var(--prism-color-brand); }
.briefing-question-text { margin: 0; font-size: 18px; line-height: 1.45; font-weight: var(--prism-font-weight-bold); color: var(--prism-color-text-primary); }
.briefing-situation { margin: 12px 20px; }
.page.briefing .briefing-situation h2 { margin: 0 0 8px; font-size: var(--prism-font-caption-12); font-weight: var(--prism-font-weight-bold); color: var(--prism-color-brand); }
.briefing-situation p { margin: 0 0 6px; font-size: 15px; line-height: 1.6; color: var(--prism-color-text-primary); }
.briefing-impact { margin: 12px 20px; padding: 18px 16px; border: 1px solid var(--prism-color-border-default); border-radius: var(--prism-radius-lg); }
.page.briefing .briefing-impact h2 { margin: 0; font-size: 17px; font-weight: var(--prism-font-weight-bold); color: var(--prism-color-text-primary); }
.briefing-impact-sub { margin: 4px 0 12px; font-size: var(--prism-font-caption-12); color: var(--prism-color-text-secondary); }
.impact-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.impact-chip { min-height: 36px; padding: 0 14px; border: 1px solid var(--prism-color-border-default); border-radius: var(--prism-radius-full); background: #fff; font-size: 14px; color: var(--prism-color-text-secondary); }
.impact-chip.is-selected { border-color: var(--prism-color-brand); color: var(--prism-color-brand); font-weight: var(--prism-font-weight-bold); }
.impact-detail { display: grid; gap: 8px; margin-top: 14px; }
.impact-box { padding: 12px 14px; border-radius: 12px; }
.impact-box h3 { margin: 0 0 4px; font-size: 13px; font-weight: var(--prism-font-weight-bold); }
.impact-box p { margin: 0; font-size: 14px; line-height: 1.5; }
/* Tints are local: the design tokens have no success/warning pair. */
.impact-change { background: #e8f7ee; color: #1d6b3a; }
.impact-worry { background: #fff1e6; color: #a4511a; }
.impact-unknown { background: #f1f3f6; color: #4b5563; }
.impact-applies { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--prism-color-border-subtle); }
.impact-applies-title { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 15px; font-weight: var(--prism-font-weight-bold); color: var(--prism-color-brand); }
.impact-applies-title img { width: 18px; height: 18px; }
.impact-applies p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--prism-color-text-primary); }
.related { margin: 12px 20px; }
.page.briefing .related h2 { margin: 0 0 8px; font-size: var(--prism-font-caption-12); font-weight: var(--prism-font-weight-bold); color: var(--prism-color-brand); }
.related-card a { display: flex; align-items: center; gap: 10px; color: var(--prism-color-text-primary); text-decoration: none; }
.related-icon, .related-open { width: 18px; height: 18px; flex: none; }
.related-body { display: grid; gap: 2px; min-width: 0; flex: 1; }
.related-meta { font-size: var(--prism-font-caption-12); color: var(--prism-color-text-tertiary); }
.briefing-cta-caption { margin: 0 0 8px; text-align: center; font-size: 13px; color: var(--prism-color-text-secondary); }
.briefing-cta-bar .primary.cta img { width: 18px; height: 18px; margin-right: 6px; vertical-align: -4px; filter: brightness(0) invert(1); }
.briefing-sheet-overlay { position: fixed; inset: 0; background: var(--prism-color-bg-overlay); display: flex; align-items: flex-end; z-index: 50; }
/* The shared chrome is full-bleed (it supplies the 20/8px insets itself), so the
   sheet keeps only the 8px top inset Figma gives the handle and the bottom gap;
   the body supplies its own side padding. */
.briefing-sheet { background: #fff; border-radius: 24px 24px 0 0; width: 100%; max-height: 720px; overflow: auto; padding: 8px 0 20px; box-shadow: var(--prism-shadow-sheet); }
.briefing-sheet .sources-sheet-body { padding: 0 20px; }
/* MVP 4-6 (Figma 8010:5292): each source row is 매체 label, title, then its time; the update history lists plain rows. */
.briefing-source-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 0; }
.briefing-source-list li { display: grid; gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--prism-color-border-subtle); }
.briefing-source-list li > strong { font-size: var(--prism-font-caption-12); color: var(--prism-color-brand); font-weight: var(--prism-font-weight-medium); }
.briefing-source-list li > span { font-size: var(--prism-font-body-15); color: var(--prism-color-text-primary); }
.briefing-source-list li > time, .briefing-source-list li > a { font-size: var(--prism-font-caption-12); color: var(--prism-color-text-secondary); }
.briefing-update-title { margin: 20px 0 4px; font-size: var(--prism-font-title-16); font-weight: var(--prism-font-weight-bold); }
.briefing-update-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.briefing-update-list li { display: flex; justify-content: space-between; gap: 12px; font-size: var(--prism-font-body-15); }
.briefing-update-empty { margin: 0; font-size: var(--prism-font-body-15); color: var(--prism-color-text-secondary); }
.briefing-sheet h2 { font-size: 16px; font-weight: var(--prism-font-weight-bold); line-height: var(--prism-line-title-16); margin: 0 0 12px; }
.briefing-unavailable { text-align: center; padding: 96px 20px 40px; }
.briefing-unavailable h1 { font-size: var(--prism-font-title-16); font-weight: var(--prism-font-weight-bold); line-height: var(--prism-line-title-16); margin: 12px 0; }
.briefing-loading { padding: 16px; }

/* Figma issue-detail frames have their own header/CTA and home indicator; the
   BottomNav is only present on the four primary destinations. */
main.container:has(.page.briefing, .comments-section, .opinion-map-page, .document-screen) {
  width: min(100%, 393px);
  max-width: 393px;
  padding: max(54px, env(safe-area-inset-top)) 0 env(safe-area-inset-bottom);
}
/* User decision: detail screens replace the shared Prism/로그아웃 header with
   the Figma TopBar/Detail; logout stays reachable from 설정 › 계정 관리. */
main.container:has(.page.briefing, .comments-section, .opinion-map-page, .document-screen) > .brand,
body:has(.page.briefing, .comments-section, .opinion-map-page, .document-screen) .home-bottom-nav { display: none; }
main.container:has(.page.briefing, .comments-section, .opinion-map-page, .document-screen) > .page.briefing { padding-top: 0; }
.comments-section > .issue-detail-head, .opinion-map-page > .issue-detail-head { order: 1; width: calc(100% + 40px); margin: 0 -20px; }
.issue-detail-head .briefing-tabs { padding: 0 20px; }
/* Briefing content keeps the Figma 20px gutters while the top bar, tabs and
   CTA stay full-bleed. */
.page.briefing > :not(.detail-topbar):not(.issue-detail-head):not(.briefing-cta-bar):not(.briefing-sheet-overlay):not(.dialog-overlay) { margin-inline: 20px; }

/* Figma Activity/Settings frames start after the iPhone status bar and do not
   include the global Prism/logout brand row. */
main.container:has(.page.activity, .page.settings) {
  width: min(100%, 393px);
  max-width: 393px;
  padding: max(54px, env(safe-area-inset-top)) 0 env(safe-area-inset-bottom);
}
main.container:has(.page.activity, .page.settings) > .brand { display: none; }
.page.activity > h1 {
  flex: none;
  margin: 0;
  padding: 8px 20px;
  font-size: var(--prism-font-title-20);
  font-weight: var(--prism-font-weight-bold);
  line-height: var(--prism-line-title-20);
}
.page.activity > .activity-tabs {
  padding: 0 20px;
  border-bottom: 1px solid var(--prism-color-border-subtle);
}
.page.settings > .settings-header { min-height: 44px; padding: 8px 20px; }
.issue-save-error { display: flex; align-items: center; gap: 8px; margin: 0; padding: 4px 20px; color: var(--prism-color-text-danger); font-size: var(--prism-font-caption-12); }
.issue-save-error > span { min-width: 0; flex: 1; }
.issue-save-retry { min-height: 44px; flex: none; padding: 0 8px; background: transparent; color: var(--prism-color-text-danger); font-size: var(--prism-font-caption-12); }
.issue-save-retry:hover { transform: none; filter: none; }

/* MVP G: static in-app policy documents (Figma 8010:1088). One shared frame —
   title, pending-review notice, effective date, headed clauses. */
.document-topbar { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 8px 0; }
.document-topbar .auth-back { position: absolute; left: 4px; top: 8px; }
.document-topbar h1 { margin: 0; color: var(--prism-color-text-primary); font-size: var(--prism-font-body-16, 16px); font-weight: var(--prism-font-weight-medium); line-height: 1.3; }
.document-pending { margin: 12px 20px 0; padding: 12px 14px; border-radius: var(--prism-radius-lg); background: var(--prism-color-surface-subtle); color: var(--prism-color-text-secondary); font-size: var(--prism-font-caption-12); line-height: 1.5; }
.document-date { margin: 8px 20px 0; color: var(--prism-color-text-tertiary); font-size: var(--prism-font-caption-12); }
.document-body { display: grid; gap: 18px; padding: 18px 20px calc(env(safe-area-inset-bottom) + 24px); }
.document-body h2 { margin: 0 0 6px; color: var(--prism-color-text-primary); font-size: var(--prism-font-body-15); font-weight: var(--prism-font-weight-medium); }
.document-body p { margin: 0 0 6px; color: var(--prism-color-text-secondary); font-size: var(--prism-font-body-14); line-height: 1.6; overflow-wrap: anywhere; }
.settings-version { margin-left: auto; color: var(--prism-color-text-tertiary); font-size: var(--prism-font-body-14); }

/* MVP C / Figma 8010:260: 대표 사진 섹션 오류. 다른 섹션(핵심 요약·본문)은
   계속 렌더링한다. */
.hero-retry { min-height: 44px; padding: 8px 12px; border: 0; background: transparent; color: var(--prism-color-text-brand); font-size: var(--prism-font-body-14); font-weight: var(--prism-font-weight-medium); }

/* MVP C / Figma 8010:260: a failed representative photo is a compact one-line row (copy · 다시 시도), not a placeholder block. */

/* MVP 8-6 (Figma 8010:5717): the nickname editor is a dimmed bottom sheet over Settings. */
.settings-sheet-overlay { position: fixed; inset: 0; background: var(--prism-color-bg-overlay); display: flex; align-items: flex-end; z-index: 50; }
.settings-sheet { background: #fff; border-radius: 24px 24px 0 0; width: 100%; max-height: 80dvh; overflow: auto; padding: 20px 20px calc(env(safe-area-inset-bottom) + 24px); box-shadow: var(--prism-shadow-sheet); display: grid; gap: 16px; }

/* MVP 4-6 (Figma 8010:5292): the external-link icon sits at the right of each source row, and the issue title sits under the sheet header. */
.briefing-source-list li { grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; }
.briefing-source-list li > a { grid-column: 2; grid-row: 1 / span 3; align-self: center; display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.briefing-source-list li > a img { width: 18px; height: 18px; }
.sources-sheet-issue { margin: 0 0 12px; color: var(--prism-color-text-secondary); font-size: var(--prism-font-caption-12); }

/* Figma 8010:5292: 변경 내용 is one line beside the update rows (label, then the AI sentence). */
.briefing-change-note { display: grid; gap: 4px; margin-top: 12px; }
.briefing-change-note span { color: var(--prism-color-text-secondary); font-size: var(--prism-font-caption-12); }
.briefing-change-note p { margin: 0; font-size: var(--prism-font-body-15); }
