/* Yapki feed. One accent, one radius rule: cards 20px, controls full pill, inputs 12px. */
:root {
  --bg: #f5f6f7;
  --surface: #ffffff;
  --text: #15181c;
  --muted: #5b636d;
  --line: #e3e6ea;
  --accent: #0b7a55;
  --accent-soft: #e3f4ec;
  --on-accent: #ffffff;
  --warn: #8a5200;
  --warn-soft: #fdf0d5;
  --shadow: 0 1px 2px rgb(21 24 28 / .05), 0 8px 24px rgb(21 24 28 / .05);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", var(--sans);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101214;
    --surface: #191c20;
    --text: #eceef0;
    --muted: #a2aab4;
    --line: #2a2f35;
    --accent: #4fd3a2;
    --accent-soft: #15352a;
    --on-accent: #06281c;
    --warn: #f3c46a;
    --warn-soft: #3a2c10;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, select, textarea, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 600px; margin: 0 auto;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand {
  font: 800 26px/1 var(--round);
  letter-spacing: -0.02em;
  color: var(--accent);
  text-decoration: none;
}

#feed {
  max-width: 600px; margin: 0 auto;
  padding: 4px 16px calc(48px + env(safe-area-inset-bottom));
  display: grid; gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px 18px 14px;
  box-shadow: var(--shadow);
  scroll-margin-top: 72px;
  min-width: 0;
}
/* Small phones (320px wide): tighter padding so the three actions stay on one line. */
@media (max-width: 360px) {
  #feed { padding-left: 10px; padding-right: 10px; }
  .card { padding: 16px 14px 12px; }
  .card h2 { font-size: 21px; }
  .lines li { font-size: 18px; }
  .pill { padding: 0 12px; }
}
.byline { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  font: 700 11px/1 var(--round); letter-spacing: 0.02em;
}
.reporter { font-weight: 600; color: var(--text); }
.ai { margin-left: auto; }
.chip {
  display: inline-block; margin-top: 12px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  background: var(--accent-soft); color: var(--accent);
}
.chip.unconfirmed { background: var(--warn-soft); color: var(--warn); }

.card h2 {
  margin: 12px 0 10px;
  font: 700 23px/1.22 var(--round);
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.lines { margin: 0; padding: 0; list-style: none; counter-reset: n; display: grid; gap: 8px; }
.lines li {
  counter-increment: n;
  display: grid; grid-template-columns: 22px 1fr;
  font-size: 19px; line-height: 1.42;
}
.lines li::before { content: counter(n); font: 700 15px/1.9 var(--round); color: var(--accent); }
.word {
  padding: 0; border: 0; background: none;
  text-decoration: underline dotted; text-decoration-color: var(--accent);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.tip {
  margin: 14px 0 0; padding: 10px 14px;
  border-radius: 12px; background: var(--bg);
  font-size: 16px; line-height: 1.55; color: var(--text);
  word-break: keep-all;
}
.source { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.source a { color: var(--text); text-underline-offset: 3px; }
.nowrap { white-space: nowrap; }
.more { padding: 0; border: 0; background: none; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.all-sources { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
.all-sources a { color: var(--text); text-underline-offset: 3px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.pill {
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); font-weight: 600; font-size: 15px; white-space: nowrap;
  transition: transform .15s cubic-bezier(.16, 1, .3, 1), background-color .15s;
}
.pill:active { transform: scale(.97); }
.reacts { flex: 1 0 100%; display: flex; flex-wrap: wrap; gap: 6px; }
.react { min-width: 44px; padding: 0 12px; }
.react[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.quiet { min-height: 44px; padding: 0 8px; border: 0; background: none; color: var(--muted); font-size: 14px; white-space: nowrap; }
.actions .quiet { margin-left: auto; }
@media (prefers-reduced-motion: no-preference) {
  .react.pop { animation: pop .35s cubic-bezier(.16, 1, .3, 1); }
  @keyframes pop { 40% { transform: scale(1.12); } }
}

.marker { text-align: center; padding: 20px 8px; color: var(--muted); font-size: 15px; }
.marker strong { display: block; color: var(--text); font: 700 18px/1.3 var(--round); }
.state { text-align: center; padding: 48px 16px; color: var(--muted); }
.state .pill { margin-top: 12px; }
.skeleton { height: 250px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
@media (prefers-reduced-motion: no-preference) {
  .skeleton { animation: breathe 1.4s ease-in-out infinite; }
  @keyframes breathe { 50% { opacity: .55; } }
}

dialog {
  width: min(100% - 32px, 440px);
  border: 1px solid var(--line); border-radius: 20px;
  padding: 20px; background: var(--surface); color: var(--text);
}
dialog::backdrop { background: rgb(16 18 20 / .5); }
dialog h2 { margin: 0 0 10px; font: 700 21px/1.25 var(--round); }
dialog p { margin: 0 0 10px; }
.term { font: 700 24px/1.2 var(--round); }
.meaning { font-size: 18px; word-break: keep-all; }
.about-card, .note { color: var(--muted); font-size: 14px; }
.field { display: grid; gap: 6px; margin: 14px 0; }
.field label, legend { font-weight: 600; font-size: 15px; }
fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 4px; }
fieldset label { display: flex; align-items: center; gap: 10px; min-height: 40px; }
select, textarea {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--muted); border-radius: 12px; background: var(--surface);
}
.primary {
  min-height: 44px; padding: 0 20px;
  border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 700;
}
dialog form[method="dialog"], .row { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 6px; }

#toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-size: 15px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
#toast.show { opacity: 1; }

/* Plain reading page (about.html). */
.page { max-width: 600px; margin: 0 auto; padding: 4px 16px calc(48px + env(safe-area-inset-bottom)); }
.page h1 { margin: 12px 0; font: 700 28px/1.2 var(--round); }
.page h2 { margin: 28px 0 8px; font: 700 20px/1.25 var(--round); }
.page p { margin: 0 0 10px; }
.page a, .note a { color: var(--text); text-underline-offset: 3px; }
a.quiet { display: inline-flex; align-items: center; }
