:root {
  --bg: #f6f4ef; --card: #ffffff; --ink: #1d1f23; --soft: #6a6f78; --line: #e4e0d6;
  --accent: #1f6f66; --accent-ink: #ffffff; --accent-soft: #e2f0ed;
  --mark: #fff0b8; --focus: #f3efe3;
  --good: #1f7a4d; --mid: #a86a00; --bad: #b3352b;
  --good-bg: #e3f3ea; --mid-bg: #fbefd6; --bad-bg: #fae4e1;
  --gold: #d9a514;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16181c; --card: #1f2227; --ink: #e9e7e2; --soft: #9aa0aa; --line: #30343b;
    --accent: #5cc2b5; --accent-ink: #0d1f1c; --accent-soft: #1d3531;
    --mark: #5a4a12; --focus: #272b31;
    --good: #6fd09a; --mid: #e3b458; --bad: #f08a80;
    --good-bg: #1c3528; --mid-bg: #3a2f14; --bad-bg: #40211e;
    --gold: #e8bd45;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
header#top {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 640px; margin: 0 auto; padding: 14px 16px 6px;
}
h1 { font-size: 17px; margin: 0; letter-spacing: -0.01em; }
h1 button { font-weight: 700; padding: 6px 0; }
#who { text-align: right; line-height: 1.3; padding: 2px 0; }
#who b { display: block; font-size: 14px; }
#who span { font-size: 12px; color: var(--soft); }
h2 { font-size: 20px; margin: 0 0 6px; letter-spacing: -0.02em; }
h3 { font-size: 14px; margin: 0 0 10px; color: var(--soft); font-weight: 600; }
p { margin: 0 0 10px; }
main { max-width: 640px; margin: 0 auto; padding: 8px 16px 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-bottom: 14px; }
.soft { color: var(--soft); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }

button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
button.primary {
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
  padding: 13px 18px; border-radius: 12px; width: 100%; font-size: 16px;
}
button.primary:disabled { opacity: 0.5; cursor: default; }
button.second { border: 1px solid var(--line); background: var(--card); padding: 11px 16px; border-radius: 12px; }
button.wide { width: 100%; }
.pair { display: flex; gap: 10px; }
.pair button { flex: 1; width: auto; padding: 12px 10px; font-size: 15px; }
.note.next span { font-weight: 700; margin-right: 4px; }
.note.next i { font-style: normal; font-size: 11px; }
.note.next i.up { color: var(--good); }
.note.next i.down { color: var(--bad); }
.note.next small { color: var(--soft); }
button.plain { color: var(--soft); font-size: 14px; padding: 6px 0; }
input[type=text], textarea {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; width: 100%;
}
textarea { min-height: 84px; resize: none; overflow: hidden; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

nav#tabs {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: center;
  background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
nav#tabs button { flex: 1; max-width: 213px; padding: 14px 0; color: var(--soft); font-size: 14px; }
nav#tabs button.on { color: var(--accent); font-weight: 700; }

#toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); margin: 0 auto; max-width: 480px;
  background: var(--ink); color: var(--bg); padding: 12px 14px; border-radius: 12px; font-size: 14px; z-index: 5;
}

/* reading */
.where { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; margin: 2px 0 8px; }
.where span { color: var(--soft); font-size: 13px; }
.where i { font-style: normal; font-size: 11px; }
.where i.up { color: var(--good); }
.where i.down { color: var(--bad); }
.progress { display: flex; gap: 6px; margin: 2px 0 12px; }
.progress i { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.progress i.done { background: var(--accent); }
.progress i.now { background: var(--accent); opacity: 0.45; }
.context { font-size: 13px; color: var(--soft); margin-bottom: 10px; }
.passage {
  font: 20px/1.75 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  letter-spacing: 0.005em; word-spacing: 0.04em;
}
.sentence { border-radius: 6px; padding: 2px 0; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.sentence.now { background: var(--focus); box-shadow: 0 0 0 4px var(--focus); }
.sentence.later { color: var(--soft); }
.tok { cursor: pointer; border-radius: 4px; padding: 1px 0; -webkit-tap-highlight-color: transparent; }
.tok.marked { background: var(--mark); box-shadow: 0 0 0 2px var(--mark); }
.tok.pending { opacity: 0.4; }
.glosses { margin: 14px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.glosses li { display: flex; gap: 8px; align-items: baseline; font-size: 15px; background: var(--mark); border-radius: 8px; padding: 6px 10px; }
.glosses b { font-family: Georgia, serif; font-weight: 600; white-space: nowrap; }
.glosses button { margin-left: auto; color: var(--soft); padding: 0 2px; }
.hint { font-size: 13px; color: var(--soft); margin-top: 12px; }

.say { display: flex; gap: 10px; margin: 10px 0; }
.mic {
  flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.mic svg { width: 24px; height: 24px; }
.mic.live { background: var(--bad); color: #fff; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--bad) 22%, transparent); } }
@media (prefers-reduced-motion: reduce) { .mic.live { animation: none; } }

.result { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.result:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.verdict { border-left: 4px solid var(--line); padding: 2px 0 2px 12px; margin-bottom: 14px; }
.verdict.correct { border-color: var(--good); }
.verdict.partial { border-color: var(--mid); }
.verdict.wrong { border-color: var(--bad); }
.badge { display: inline-block; font-size: 13px; font-weight: 700; border-radius: 999px; padding: 2px 10px; margin-bottom: 6px; }
.correct .badge { background: var(--good-bg); color: var(--good); }
.partial .badge { background: var(--mid-bg); color: var(--mid); }
.wrong .badge { background: var(--bad-bg); color: var(--bad); }
.verdict .en { font-family: Georgia, serif; font-size: 15px; color: var(--soft); }
.mine { font-size: 14px; color: var(--soft); border-left: 3px solid var(--line); padding-left: 10px; margin: 10px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip { font-size: 13px; background: var(--bad-bg); color: var(--ink); border-radius: 999px; padding: 4px 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; }
.chip b { font-family: Georgia, serif; }
.chip button { font-size: 12px; color: var(--soft); border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.chip.out { background: var(--bg); }
.chip.out > span { text-decoration: line-through; color: var(--soft); }
.chip.unsure { background: var(--mid-bg); }
.note { background: var(--accent-soft); border-radius: 10px; padding: 10px 12px; font-size: 14px; margin: 12px 0; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 10px auto 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* dashboard */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--bg); border-radius: 12px; padding: 12px; }
.stat b { display: block; font-size: 24px; letter-spacing: -0.02em; }
.stat span { font-size: 12px; color: var(--soft); }
.chart { width: 100%; height: 72px; display: block; }
.chart polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.chart circle { fill: var(--accent); }
.chartrow { display: grid; grid-template-columns: 76px 1fr 36px; align-items: center; gap: 8px; font-size: 13px; color: var(--soft); }
.start { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.start button.primary { width: auto; flex: none; padding: 4px 16px; font-size: 14px; border-radius: 8px; }
.card.tight { padding: 12px 14px; }
.facts { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--soft); margin-bottom: 8px; }
.facts b { font-size: 16px; color: var(--ink); }
.chart { height: 36px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.cal.head { margin-bottom: 4px; font-size: 11px; color: var(--soft); text-align: center; }
.cal > div {
  height: 36px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line);
  display: flex; flex-direction: column; justify-content: center; padding: 0 5px; min-width: 0; white-space: nowrap; line-height: 1.25;
}
.cal > div span { font-size: 10px; color: var(--soft); }
.cal > div b { font-size: 11px; text-align: right; }
/* A day with reading is green, deeper the more sentences were read. */
.cal > div.done { background: var(--accent); border-color: transparent; color: var(--accent-ink); cursor: pointer; }
.cal > div.done.s1 { background: color-mix(in srgb, var(--accent) 30%, var(--card)); color: var(--ink); }
.cal > div.done.s2 { background: color-mix(in srgb, var(--accent) 55%, var(--card)); color: var(--ink); }
.cal > div.done.s3 { background: color-mix(in srgb, var(--accent) 80%, var(--card)); }
.cal > div.done span { color: inherit; opacity: 0.8; }
/* 정독 was done that day too: a gold edge. */
.cal > div.close { border: 2px solid var(--gold); padding: 0 4px; }
.cal > div.today span { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; opacity: 1; }
.cal > div.picked { outline: 2px solid var(--soft); outline-offset: 2px; }
.cal > div.future { opacity: 0.4; }
.calnote { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: var(--soft); }
.calnote b { color: var(--ink); }
.calkey { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.calkey i { width: 11px; height: 11px; border-radius: 3px; border: 2px solid var(--gold); }
.words { list-style: none; margin: 0; padding: 0; }
.words li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.words li:first-child { border-top: 0; }
.card-text { flex: 1; min-width: 0; text-align: left; padding: 2px 0; }
.card-text .front { display: block; font-size: 16px; font-weight: 600; padding-left: 18px; text-indent: -18px; }
.fold { display: inline-block; width: 18px; text-indent: 0; font-style: normal; font-size: 15px; color: var(--accent); transition: transform 0.15s; }
.card-text[aria-expanded=true] .fold { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .fold { transition: none; } }
.notes { line-height: 1.9; margin: 8px 0 6px; }
details.notes summary { font-size: 13px; }
.notes .know.static { width: 18px; height: 18px; font-size: 10px; }
.card-text .front[lang=en], .card-text .back[lang=en] { font-family: Georgia, serif; }
.card-text .back { display: none; margin: 3px 0 0 18px; font-size: 14px; color: var(--accent); }
.card-text[aria-expanded=true] .back { display: block; }
.facts2 { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.facts2 small { font-size: 11px; color: var(--soft); white-space: nowrap; line-height: 1.2; }
.facts2 small.missed { color: var(--bad); }
.dots3 { display: inline-flex; gap: 4px; }
.dots3 i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.dots3 i.on { background: var(--good); }
.know {
  flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line); background: var(--card);
  color: var(--soft); font-size: 12px; line-height: 1; padding: 0;
}
.know.static { display: inline-grid; place-items: center; vertical-align: middle; }
.know:hover { color: var(--good); border-color: var(--good); }
.switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; }
.switch button { font-size: 12px; padding: 5px 10px; color: var(--soft); }
.switch button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
details summary { cursor: pointer; color: var(--soft); font-size: 14px; }
.board { width: 100%; border-collapse: collapse; font-size: 14px; }
.board th { text-align: left; font-weight: 600; color: var(--soft); font-size: 12px; padding: 0 6px 8px 0; }
.board td { padding: 10px 6px 10px 0; border-top: 1px solid var(--line); vertical-align: middle; }
/* together: a table whose columns line up, and maps of who read when */
.sheet { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; font-variant-numeric: tabular-nums; }
.sheet th { padding: 0 0 6px; font-weight: 400; }
.sheet th button { font-size: 12px; color: var(--soft); padding: 4px 0 4px 6px; white-space: nowrap; }
.sheet th button.on { color: var(--accent); font-weight: 700; }
.sheet td { padding: 9px 0; border-top: 1px solid var(--line); }
.sheet td.num, .sheet th.num { text-align: right; width: 15%; }
.sheet td.by { font-weight: 700; }
.sheet td.rank { width: 22px; color: var(--soft); font-size: 13px; }
.sheet td.name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 0; }
.sheet tr.me td.name { color: var(--accent); }
.legend { font-size: 11px; color: var(--soft); display: inline-flex; align-items: center; gap: 3px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; background: var(--line); }
.l1 { background: color-mix(in srgb, var(--accent) 30%, var(--card)) !important; }
.l2 { background: color-mix(in srgb, var(--accent) 55%, var(--card)) !important; }
.l3 { background: color-mix(in srgb, var(--accent) 80%, var(--card)) !important; }
.l4 { background: var(--accent) !important; }
.maps { margin-top: 12px; }
.maps.by-year .person { margin-bottom: 16px; }
.who2 { font-size: 14px; margin-bottom: 5px; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; }
.person.me .who2 b { color: var(--accent); }
.rise { font-size: 12px; color: var(--good); }
/* month: days across, people down; the name column stays put while the days scroll */
.scroller { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.month { border-collapse: separate; border-spacing: 4px; font-size: 10px; font-variant-numeric: tabular-nums; }
table.month th, table.month td { min-width: 22px; height: 22px; text-align: center; border-radius: 4px; padding: 0; }
table.month thead th { font-weight: 400; color: var(--soft); font-size: 11px; line-height: 1.15; padding-bottom: 2px; }
table.month thead th span { display: block; font-size: 9px; }
table.month thead th.sun { color: var(--bad); }
table.month thead th.today { color: var(--ink); font-weight: 700; }
table.month td { background: var(--line); color: var(--ink); font-weight: 600; }
table.month td.l3, table.month td.l4 { color: var(--accent-ink); }
table.month td.today { outline: 1.5px solid var(--ink); outline-offset: -1px; }
table.month td.off { opacity: 0.3; }
table.month th.name {
  position: sticky; left: 0; background: var(--card); text-align: left; font-weight: 600; font-size: 13px;
  min-width: 72px; max-width: 72px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 6px; z-index: 1;
  /* The table's cell spacing leaves a sliver to the left of this column: cover it, so day
     cells sliding underneath never show through beside the name. */
  border-radius: 0; box-shadow: -6px 0 0 var(--card), 4px 0 0 var(--card);
}
table.month tr.me th.name { color: var(--accent); }
.year { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 4px; align-items: end; }
.year > div { min-width: 0; }
.year .days { display: grid; grid-template-rows: repeat(7, 1fr); font-size: 8px; color: var(--soft); align-self: stretch; padding-top: 13px; line-height: 1; }
.year .days span { display: grid; align-items: center; }
.year .months { display: grid; font-size: 9px; color: var(--soft); height: 13px; white-space: nowrap; }
.year .months span { grid-row: 1; }
.year .grid { display: grid; grid-template-rows: repeat(7, auto); grid-auto-flow: column; gap: 1px; }
.year .grid i { aspect-ratio: 1; border-radius: 1.5px; background: var(--line); }
.grid i.pad { background: none !important; }
.grid i.off { opacity: 0.3; }
/* The day someone started: a muted purple-grey, apart from the greens without shouting. */
.year .grid i.began, .legend i.began { background: #a79bb0 !important; opacity: 1; }
button.step { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 16px; line-height: 1; padding: 0; }
button.step:disabled { opacity: 0.3; cursor: default; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* administration */
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.people li:first-child { border-top: 0; }
.people .acts { display: flex; gap: 6px; flex: none; }
button.mini { width: auto; padding: 6px 12px; font-size: 13px; border-radius: 8px; font-weight: 600; }
.tagline { font-size: 11px; color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 0 6px; }
.tagline.warn { color: var(--bad); }
.field { display: block; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.field span { display: block; font-weight: 400; margin: 2px 0 6px; }
.field .pair { margin-top: 6px; }
.field .pair input { flex: 1; min-width: 0; }
.field .pair button { flex: none; }
input[type=password], input[type=number], select {
  font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; width: 100%;
}
select { margin-top: 6px; }

/* home: the two zones (다독, 정독). Compact, like the cards below them. */
.zone { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; }
.zone-head { display: flex; align-items: baseline; gap: 8px; }
.zone-head b { flex: none; font-size: 16px; letter-spacing: -0.02em; }
.zone-desc { flex: 1; min-width: 0; font-size: 12px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zone-count { flex: none; font-size: 12px; color: var(--soft); white-space: nowrap; }
button.zone-go { flex: none; width: auto; align-self: center; padding: 3px 12px; font-size: 13px; border-radius: 8px; }
.zone-sub { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0 2px; font-size: 11px; color: var(--soft); }
.zone-refresh { font-size: 11px; color: var(--accent); padding: 2px 4px; }
.zone-refresh:disabled { color: var(--soft); cursor: default; }
.zone-wait .spinner { margin: 18px auto; }
.zone-empty { margin: 10px 0; }
.switch.tiny button { font-size: 11px; padding: 1px 8px; }
.hlist { list-style: none; margin: 0; padding: 0 12px 0 0; max-height: 172px; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.hlist li { border-top: 1px solid var(--line); }
.hlist li:first-child { border-top: 0; }
.hline { display: flex; align-items: baseline; gap: 6px; width: 100%; text-align: left; padding: 6px 0; font-size: 13px; line-height: 1.4; }
.hcheck { flex: none; width: 12px; font-style: normal; font-size: 12px; color: var(--good); }
.htitle { flex: 1; min-width: 0; }
.htitle[lang=en] { font-family: Georgia, serif; }
.hline.read .htitle { color: var(--soft); }
.hgoing { font-style: normal; font-size: 11px; font-family: inherit; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 1px 7px; white-space: nowrap; }
.hsrc { flex: none; font-size: 11px; color: var(--soft); white-space: nowrap; }
.hlang { font-style: normal; font-size: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-right: 5px; }
input.zone-url {
  font: inherit; font-size: 12px; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; width: 100%; margin-top: 6px;
}

/* the article reader */
.art-title { font: 700 23px/1.3 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; margin: 0 0 14px; }
.art-img { display: block; width: 100%; height: auto; border-radius: 8px; margin: 14px 0 6px; background: var(--bg); }
.art-cap { font-size: 13px; line-height: 1.5; color: var(--soft); margin: 0 0 14px; }
.art-h { font: 700 18px/1.4 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; color: var(--ink); margin: 20px 0 8px; }
.art-p { font: 19px/1.75 "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; letter-spacing: 0.005em; word-spacing: 0.04em; margin: 0 0 14px; }
.atok { cursor: pointer; border-radius: 4px; padding: 1px 0; -webkit-tap-highlight-color: transparent; }
.atok.marked { background: var(--mark); box-shadow: 0 0 0 2px var(--mark); }
.atok.pending { opacity: 0.4; }
.art-gloss { margin: -4px 0 16px; }
.art-wait { display: flex; flex-direction: column; gap: 9px; margin: 6px 0 20px; }
.art-wait i { height: 12px; border-radius: 6px; background: var(--line); animation: artwait 1.4s ease-in-out infinite; }
.art-wait i:last-child { width: 60%; }
@keyframes artwait { 50% { opacity: 0.45; } }
@media (prefers-reduced-motion: reduce) { .art-wait i { animation: none; } }
.where a { color: inherit; }
.rate { display: flex; flex-wrap: wrap; gap: 6px; }
.rate button { flex: 1 1 auto; padding: 9px 8px; font-size: 14px; white-space: nowrap; }
.rate button:disabled { opacity: 0.5; cursor: default; }
#artmic {
  position: fixed; right: max(16px, calc(50vw - 304px)); bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 4;
  width: 54px; height: 54px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}
#artmic.live { background: var(--bad); color: #fff; }
#artreply {
  position: fixed; right: max(16px, calc(50vw - 304px)); bottom: calc(130px + env(safe-area-inset-bottom)); z-index: 4;
  max-width: min(320px, calc(100vw - 32px)); background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent);
  border-radius: 12px; padding: 10px 12px; font-size: 14px; line-height: 1.5; box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18); cursor: pointer;
}
#artreply.waiting { color: var(--soft); }

/* 읽은 글 */
.lib-note { margin: 0 2px 8px; }
.lib-day { margin: 0 0 2px; font-size: 12px; }
.lib { list-style: none; margin: 0; padding: 0; }
.lib li { border-top: 1px solid var(--line); }
.lib li:first-child { border-top: 0; }
.lib-row { display: block; width: 100%; text-align: left; padding: 8px 0; }
.lib-title { display: block; font: 600 15px/1.4 Georgia, serif; }
.lib-facts { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--soft); margin-top: 2px; }

/* a paragraph's source text, opened with the triangle at its end */
.art-fold { font-size: 14px; color: var(--accent); padding: 0 6px; vertical-align: baseline; transition: transform 0.15s; }
.art-fold.open { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .art-fold { transition: none; } }
.art-src { font-size: 14px; line-height: 1.65; color: var(--soft); background: var(--bg); border-left: 3px solid var(--line); border-radius: 0 8px 8px 0; padding: 8px 12px; margin: -6px 0 16px; }
.art-src[lang=en] { font-family: Georgia, serif; }
.art-src span { display: block; font: 600 11px/1.4 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif; color: var(--accent); margin-bottom: 2px; }
.art-level { margin: -2px 0 8px; }
.art-level summary small { font-size: 11px; }
.rate button { font-size: 13px; padding: 6px 8px; }
.rate button.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
