/* 색은 세 테마가 같은 토큰 이름을 채운다. 테마를 바꿀 때는 html[data-theme]만 바뀐다.
   글자와 바탕 대비는 세 테마 모두 4.5:1 이상으로 맞췄다. 색을 고칠 때도 그 선은 지킬 것. */
:root {
  --orange: #E8601A;
  --navy-ink: #16203F;
  --ivory: #F3F1EC;
  --nav-height: calc(74px + env(safe-area-inset-bottom));
  --sans: "Pretendard Variable", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: var(--sans);
  --reader-serif: "Noto Serif KR", "Songti TC", "AppleMyungjo", serif;
}

/* 오렌지 — 기본. 제목띠를 오렌지가 통째로 차지하고, 누르는 곳은 네이비 */
html[data-theme="orange"], html:not([data-theme]) {
  --canvas: #FBF7F2;
  --paper: #FFFFFF;
  --paper2: #F6F1EA;
  --line: #E6DCCF;
  --line-strong: #CFC0AC;
  --ink: #241A10;
  --ink-soft: #3F2E1E;
  --muted: #6B5542;
  --strong: #16203F;
  --accent: #1B2A52;
  --fill: #16203F;
  --fill-dark: #0E1529;
  --onalert: #FFFFFF;
  --toastbg: #241A10;
  --toastink: #F3F1EC;
  --onfill: #F3F1EC;
  --brandbg: #E8601A;
  --onbrand: #16203F;
  --onbrand2: #16203F;
  --onbrandline: rgba(22,32,63,.24);
  --onbrandfill: rgba(255,255,255,.90);
  --onbrandtrack: rgba(22,32,63,.18);
  --onbrandbar: #16203F;
  --onbrandbarink: #F3F1EC;
  --track: #EADFD1;
  --chip: #FBE6D7;
  --chipink: #8C3706;
  --alert: #A3271E;
  --select: rgba(22,32,63,.12);
  --mark: rgba(232,96,26,.30);
}

/* 아이보리 — 흰 종이가 바탕, 제목띠는 네이비, 누르는 곳은 오렌지 */
html[data-theme="ivory"] {
  --canvas: #F3F1EC;
  --paper: #FFFFFF;
  --paper2: #F7F4EE;
  --line: #DDD8CE;
  --line-strong: #C3BCAE;
  --ink: #16203F;
  --ink-soft: #2C3A61;
  --muted: #4A5673;
  --strong: #16203F;
  --accent: #A8430A;
  --fill: #E8601A;
  --fill-dark: #F2884A;
  --onalert: #FFFFFF;
  --toastbg: #16203F;
  --toastink: #F3F1EC;
  --onfill: #16203F;
  --brandbg: #16203F;
  --onbrand: #F3F1EC;
  --onbrand2: #B9C2DB;
  --onbrandline: rgba(255,255,255,.22);
  --onbrandfill: rgba(255,255,255,.10);
  --onbrandtrack: rgba(255,255,255,.24);
  --onbrandbar: #E8601A;
  --onbrandbarink: #16203F;
  --track: #E2DCD1;
  --chip: #FBE6D7;
  --chipink: #8C3706;
  --alert: #A3271E;
  --select: rgba(22,32,63,.12);
  --mark: rgba(232,96,26,.28);
}

/* 네이비 — 깊은 남색이 바탕, 누르는 곳은 오렌지. 새벽·밤용 */
html[data-theme="navy"] {
  --canvas: #141D3A;
  --paper: #1E2A4E;
  --paper2: #26335C;
  --line: #36426A;
  --line-strong: #4C5A84;
  --ink: #F1EFE9;
  --ink-soft: #DCE0EC;
  --muted: #B5BED6;
  --strong: #F1EFE9;
  --accent: #F6A063;
  --fill: #E8601A;
  --fill-dark: #F2884A;
  --onalert: #141D3A;
  --toastbg: #0E1529;
  --toastink: #F3F1EC;
  --onfill: #141D3A;
  --brandbg: #0E1529;
  --onbrand: #F3F1EC;
  --onbrand2: #AFB9D3;
  --onbrandline: rgba(255,255,255,.18);
  --onbrandfill: rgba(255,255,255,.07);
  --onbrandtrack: rgba(255,255,255,.20);
  --onbrandbar: #E8601A;
  --onbrandbarink: #141D3A;
  --track: #2C3760;
  --chip: #33264A;
  --chipink: #F6A063;
  --alert: #F2928A;
  --select: rgba(246,160,99,.20);
  --mark: rgba(232,96,26,.42);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--canvas); }
html, body { margin: 0; min-height: 100%; }
body {
  color: var(--ink);
  background: var(--canvas);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input { font: inherit; }
button {
  color: inherit;
  cursor: pointer;
  -webkit-appearance: none;
}

#app {
  width: min(100%, 1180px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 22px calc(var(--nav-height) + 36px);
  background: var(--canvas);
}

body.auth-mode {
  background: var(--paper2);
}
body.auth-mode #app {
  width: 100%;
  max-width: 760px;
  min-height: 100svh;
  padding: 0;
  background: transparent;
}
.auth-app { overflow: visible; }
.auth-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(300px, 38svh) auto;
  align-content: stretch;
  overflow: hidden;
  background: var(--paper2);
}
.auth-brand {
  grid-row: 1;
  color: var(--onbrand);
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 0;
  padding:
    calc(118px + env(safe-area-inset-top))
    clamp(28px, 7vw, 64px)
    38px;
  background: var(--brandbg);
  border-radius: 0 0 48px 48px;
  overflow: hidden;
  z-index: 2;
  box-shadow: 0 16px 28px rgba(10, 28, 38, .2);
}
.auth-brand > p:first-child {
  position: absolute;
  top: calc(28px + env(safe-area-inset-top));
  left: clamp(28px, 7vw, 64px);
  margin: 0;
  color: var(--onbrand2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
}
.auth-brand h1 {
  margin: 0;
  max-width: 100%;
  font-family: var(--serif);
  font-size: clamp(40px, 7vw, 58px);
  line-height: 1.02;
  letter-spacing: -.06em;
  font-weight: 600;
  white-space: nowrap;
}
.auth-subtitle {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .025em;
  color: var(--paper2);
}
.auth-route {
  display: block;
  margin: 9px 0 0;
  color: var(--onbrand2);
  font-family: var(--serif);
  font-size: 13px;
}
.auth-card {
  grid-row: 2;
  position: relative;
  z-index: 1;
  width: calc(100% - 44px);
  max-width: 490px;
  align-self: center;
  justify-self: center;
  margin: 0 auto;
  padding: 40px 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.auth-heading {
  margin: 0 0 24px;
  font-family: var(--sans);
  font-size: 21px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -.03em;
}
.auth-field {
  display: block;
  width: 100%;
  height: 54px;
  margin-top: 5px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 2px;
  color: var(--accent);
  font-size: 16px;
  outline: none;
}
.auth-field:focus {
  border-bottom-color: var(--fill);
  box-shadow: none;
}
.auth-field[hidden] { display: none; }
.auth-message {
  min-height: 22px;
  margin: 7px 0 0;
  color: var(--alert);
  font-size: 12.5px;
  line-height: 1.45;
}
.auth-submit {
  width: 100%;
  height: 54px;
  margin-top: 24px;
  border: 0;
  border-radius: 3px;
  background: var(--fill);
  color: var(--onfill);
  font-size: 15px;
  font-weight: 800;
  box-shadow: none;
}
.auth-submit:active { background: var(--fill-dark); }
.auth-register-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
  text-align: center;
}
.auth-register-link button {
  border: 0;
  background: none;
  color: var(--strong);
  padding: 4px 0;
  font-weight: 800;
}

.hero {
  position: relative;
  min-height: 246px;
  margin: 0 -22px 24px;
  padding: calc(28px + env(safe-area-inset-top)) 26px 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  color: var(--onbrand);
  background:
    radial-gradient(circle at 82% 20%, var(--onbrandfill), transparent 29%),
    var(--brandbg);
}
.hero::before {
  content: none;
}
.hero::after {
  content: none;
}
.hero .eyebrow,
.hero h1,
.hero p { position: relative; z-index: 1; }
.hero .eyebrow {
  position: absolute;
  top: calc(24px + env(safe-area-inset-top));
  left: 26px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .17em;
  opacity: .72;
}
.hero h1 {
  margin: 0;
  padding-bottom: 52px;
  font-family: var(--serif);
  font-size: clamp(34px, 9vw, 42px);
  line-height: 1.08;
  letter-spacing: -.04em;
  font-weight: 600;
}
.hero p {
  margin: 0;
  color: var(--onbrand2);
  font-size: 13px;
  letter-spacing: .01em;
}
/* 제목이 헤더 바닥에 붙으므로, 뱃지도 top이 아니라 bottom으로 같은 기준선에 맞춘다 */
.hero-badges { position: absolute; z-index: 1; bottom: 28px; right: 22px; display: flex; gap: 8px; }
.hero-badges.stacked { flex-direction: column; align-items: stretch; gap: 10px; }
.hero-pill { display: flex; flex-direction: column; align-items: center; min-width: 62px; padding: 8px 16px; border-radius: 16px; background: var(--paper); color: var(--strong); line-height: 1.3; text-align: center; }
.hero-pill span { font-size: 12px; color: var(--muted); }
.hero-pill strong { font-size: 19px; font-weight: 800; }
.hero-pill.dark { background: var(--fill); color: var(--onfill); }
.hero-pill.dark span { color: var(--onfill); opacity: .8; }
.fellowship-badges .hero-pill {
  background: #EC7848;
  border: 1px solid #F3936D;
  color: #FFFFFF;
}
.fellowship-badges .hero-pill span { color: #FFFFFF; }
.hero .secondary-button { min-height: 38px; padding: 0 18px; border: 0; border-radius: 16px; background: var(--paper); color: var(--strong); font-size: 14px; font-weight: 700; text-align: center; }

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 26px 0 12px;
}
.section-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -.025em;
}
.section-title span {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.progress {
  height: 3px;
  margin: 10px 0 24px;
  overflow: hidden;
  background: var(--track);
}
.progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width .3s ease;
}
.today-intro {
  margin: -10px 0 16px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14.5px;
  line-height: 1.85;
  word-break: keep-all;
}

.day-card,
.panel,
.reading-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 8px 26px rgba(42,55,48,.045);
}
.day-card { overflow: hidden; }
.day-card .day-head {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 16px 14px 18px;
}
.day-card .day-head strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--serif);
  font-size: 17px;
}
.day-card .day-head span {
  display: block;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.check {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
  position: relative;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.check:active { transform: scale(.94); }
.check[aria-checked="true"] {
  background: var(--fill);
  border-color: var(--fill);
}
.check[aria-checked="true"]::after {
  content: "";
  position: absolute;
  left: 16px;
  top: 10px;
  width: 7px;
  height: 15px;
  border: solid var(--onfill);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.chapter-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  padding: 12px 14px 14px;
  border-top: 1px solid var(--line);
  background: var(--paper2);
}
.chapter-list button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--accent);
  padding: 7px 4px;
  font-size: 12px;
  white-space: nowrap;
  letter-spacing: -.02em;
  box-shadow: 0 2px 8px rgba(38,52,44,.025);
}
.chapter-list button:active { background: var(--paper2); }

.panel { padding: 18px; margin-top: 14px; }
.panel h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: -.02em;
}
.panel p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}
.field {
  display: block;
  width: 100%;
  height: 50px;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  padding: 0 13px;
  font-size: 15px;
  outline: none;
}
.field:focus { border-color: var(--fill); box-shadow: 0 0 0 3px var(--paper2); }
.primary {
  width: 100%;
  height: 52px;
  margin-top: 10px;
  border: 0;
  border-radius: 10px;
  background: var(--fill);
  color: var(--onfill);
  font-weight: 700;
  letter-spacing: -.01em;
}
.primary:active { background: var(--fill-dark); }
.text-button {
  display: block;
  margin: 8px auto 0;
  border: 0;
  background: none;
  color: var(--strong);
  padding: 10px;
  font-size: 13px;
  font-weight: 700;
}
.message {
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--alert);
  font-size: 13px;
  line-height: 1.5;
}

.reading-card {
  margin-top: 9px;
  overflow: hidden;
  border-left: 3px solid transparent;
}
.reading-card.done { border-left-color: var(--fill); }
.reading-card button {
  width: 100%;
  border: 0;
  background: none;
  text-align: left;
  padding: 15px 16px 16px;
}
.reading-card strong {
  display: block;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.55;
}
.reading-card span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
}

.reader-top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 68px 1fr 68px;
  align-items: center;
  margin: 0 -22px;
  min-height: calc(58px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 8px 0;
  background: var(--paper2);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.reader-top button {
  height: 44px;
  border: 0;
  background: none;
  color: var(--strong);
  font-size: 13px;
  font-weight: 700;
}
.reader-top strong {
  text-align: center;
  font-family: var(--serif);
  font-size: 14px;
}
.reader-body {
  padding: 24px 2px 48px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 2;
  letter-spacing: -.012em;
}
.verse {
  margin: 0 0 13px;
  text-align: justify;
  word-break: keep-all;
}
.verse sup {
  margin-right: 5px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 10px;
  vertical-align: super;
}

.group-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}
.group-row:first-of-type { border-top: 0; }
.group-row strong { font-family: var(--serif); font-size: 15px; }
.group-row span {
  flex: none;
  color: var(--muted);
  font-size: 12.5px;
}

.bottom-nav {
  position: fixed;
  z-index: 20;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-height);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  padding: 10px 8px env(safe-area-inset-bottom);
  background: var(--paper);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.bottom-nav button {
  height: 54px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  border-radius: 10px;
}
.bottom-nav svg {
  display: block;
  width: 21px;
  height: 21px;
  margin: 0 auto 4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bottom-nav button[aria-current="page"] {
  color: var(--strong);
  font-weight: 800;
  background: var(--paper2);
}
.nav-icon { display: block; }

@media (max-width: 899px) {
  .auth-brand h1 {
    font-size: clamp(38px, 10vw, 52px);
  }
  .auth-card {
    width: calc(100% - 36px);
    padding: 36px 30px;
  }
}

select, textarea { font: inherit; }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.hero { border-radius: 0 0 22px 22px; }
.hero h1 { padding-bottom: 48px; }
.hero .eyebrow { letter-spacing: .12em; }
.progress-section, .today-reading, .schedule-list, .schedule-summary {
  width: min(100%, 860px);
  margin-left: auto;
  margin-right: auto;
}
.progress-section .section-title { margin-top: 0; }
.progress {
  height: 5px;
  margin: 0 0 30px;
  border-radius: 99px;
  background: var(--track);
}
.progress i { border-radius: inherit; background: var(--fill); }
.today-reading > .section-title { margin-top: 20px; }
.today-intro {
  margin: 0 0 18px;
  max-width: 76ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.95;
}
.schedule-hint {
  width: min(100%, 860px);
  margin: 18px auto 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}
.day-card, .panel, .reading-card, .record-section, .feed-section, .schedule-summary {
  border-color: var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 26px rgba(29,48,62,.045);
}
.day-card { margin-bottom: 12px; }
.day-card .day-head {
  min-height: 88px;
  padding: 18px 20px;
}
.day-info { display: grid; gap: 5px; }
.day-card .day-head strong {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}
.day-date, .day-status {
  color: var(--muted);
  font-size: 12px;
}
.day-status { color: var(--strong); font-weight: 700; }
.day-card.done .day-status { color: var(--muted); }
.check {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
}
.check::after { display: none; }
.check-dot {
  display: block;
  width: 19px;
  height: 19px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: transparent;
}
.check[aria-checked="true"] .check-dot {
  border-color: var(--fill);
  background: var(--fill);
  box-shadow: inset 0 0 0 4px var(--paper);
}
.day-introduction {
  margin: 0;
  padding: 0 20px 16px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.8;
}
.day-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px 18px;
}
.primary {
  border-radius: 7px;
  background: var(--fill);
}
.primary:active { background: var(--fill-dark); }
.day-open {
  width: auto;
  min-width: 130px;
  height: 44px;
  margin: 0;
  padding: 0 18px;
  font-size: 13px;
}
.chapter-details { min-width: 0; }
.chapter-details summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 13px;
  list-style-position: inside;
}
.chapter-details[open] summary { border-radius: 7px 7px 0 0; }
.chapter-details .chapter-list {
  max-height: 190px;
  overflow: auto;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  padding: 10px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 7px 7px;
}
.chapter-list button {
  border-radius: 7px;
  color: var(--strong);
  box-shadow: none;
}
.schedule-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  margin-bottom: 12px;
  padding: 17px 20px;
}
.schedule-summary strong { font-family: var(--serif); font-size: 17px; }
.schedule-summary span { color: var(--muted); font-size: 13px; }
.schedule-list { display: grid; gap: 2px; }
.schedule-list .day-card { margin-bottom: 10px; }

.reader-heading {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 25px 0 14px;
}
.reader-back {
  min-height: 40px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--strong);
  font-size: 13px;
  font-weight: 700;
}
.reader-title-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 12px 0 8px;
}
.reader-kicker {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .04em;
}
.reader-title-row h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(27px, 4vw, 36px);
  letter-spacing: -.04em;
}
.reader-navigation { display: flex; gap: 6px; }
.reader-navigation button, .compare-toggle, .secondary-button {
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 12px;
}
.reader-controls {
  width: min(100%, 1120px);
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
  margin: 0 auto 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper2);
}
.reader-controls label, .settings-panel label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
}
.reader-controls select, .settings-panel select {
  min-width: 100px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  font-size: 13px;
}
.reader-controls .translation-control select { min-width: 142px; }
.compare-toggle.active { border-color: var(--fill); background: var(--fill); color: var(--onfill); }
.reader-settings { position: relative; margin-left: auto; }
.reader-settings summary {
  width: 46px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: var(--strong);
  cursor: pointer;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  list-style: none;
}
.reader-settings summary::-webkit-details-marker { display: none; }
.settings-panel {
  position: absolute;
  z-index: 8;
  top: 50px;
  right: 0;
  width: 220px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(29,48,62,.14);
}
.settings-panel input[type="range"] { width: 100%; accent-color: var(--strong); }
.reader-layout {
  width: min(100%, 1120px);
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 190px;
  align-items: start;
  gap: 16px;
  margin: 0 auto;
}
.reader-chapter-sidebar, .reader-annotation-sidebar {
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper2);
}
.reader-chapter-sidebar h2, .reader-annotation-sidebar h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 15px;
}
.chapter-quicklist { display: grid; gap: 3px; }
.chapter-link {
  min-height: 38px;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
  font-size: 12px;
}
.chapter-link.active { background: var(--paper2); color: var(--strong); font-weight: 700; }
.reader-content {
  min-width: 0;
  padding: 22px clamp(16px, 3vw, 34px) 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font-family: var(--reader-family, var(--serif));
  font-size: var(--reader-size, 19px);
  line-height: var(--reader-line-height, 1.9);
  box-shadow: 0 8px 26px rgba(29,48,62,.035);
}
.reader-content.narrow { max-width: 620px; justify-self: center; }
.reader-content.standard { max-width: 760px; justify-self: stretch; }
.reader-content.wide { max-width: none; justify-self: stretch; }
.reader-day-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 12px;
}
.translation-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.translation-columns.single { display: block; }
.translation-panel { min-width: 0; }
.translation-label {
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.scripture-paragraph {
  margin: 0 0 18px;
  color: var(--ink);
  text-align: justify;
  text-indent: 0;
  word-break: keep-all;
}
.paragraph-mark {
  display: inline-block;
  margin: 0 .45em 0 0;
  color: var(--strong);
  font-family: var(--sans);
  font-size: .56em;
  font-weight: 800;
  vertical-align: .22em;
}
.verse {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-align: inherit;
  white-space: normal;
  cursor: pointer;
}
.verse sup {
  margin-right: .18em;
  color: var(--muted);
  font-family: var(--sans);
  font-size: .56em;
  vertical-align: super;
}
.verse.selected { background: none; text-decoration: underline; text-decoration-style: dotted; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.verse.highlighted { background: var(--mark); }
.verse.favorite-verse sup::after { content: " ♥"; color: var(--alert); }
.paragraph-note {
  margin: 18px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.sidebar-caption { margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.empty-state { color: var(--muted); font-size: 13px; line-height: 1.65; }
.annotation-item {
  width: 100%;
  display: grid;
  gap: 5px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink-soft);
  text-align: left;
  font-size: 11px;
}
.annotation-item strong { color: var(--strong); }
.annotation-note-preview { overflow-wrap: anywhere; }
.selection-reference, .selection-hint {
  flex: 1 0 100%;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}
.selection-reference { color: var(--ink); font-weight: 700; }
.reader-status { min-height: 12px; }
.record-section, .feed-section {
  margin: 0 auto 16px;
  padding: 20px;
  background: var(--paper);
}
.record-section h2, .feed-heading h2 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 18px;
}
.schedule-head { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 10px; }
.schedule-head h2 { margin: 0; }
.schedule-percent { color: var(--orange); font-size: 14px; font-weight: 800; }
.schedule-card .progress { height: 8px; }
.schedule-card .progress i { background: var(--orange); }
.schedule-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
.schedule-status { color: var(--muted); font-weight: 700; }
.schedule-status.done { color: var(--orange); }
.private-note { padding: 12px 0; border-top: 1px solid var(--line); }
.private-note strong { color: var(--strong); font-size: 12px; }
.private-note p { margin: 6px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
.group-overview { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.5fr); align-items: start; gap: 16px; }
.group-overview .record-section, .group-overview .feed-section { width: 100%; }
.group-row { flex-wrap: wrap; }
.feed-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.feed-heading h2 { margin: 0 0 4px; }
.feed-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.compose-button { width: auto; min-width: 82px; height: 42px; margin: 0; padding: 0 14px; font-size: 12px; }
.post-header { display: flex; justify-content: space-between; gap: 12px; }
.post-header > div { display: grid; gap: 3px; }
.post-header strong { color: var(--ink); font-size: 13px; }
.post-header span, .post-header time { color: var(--muted); font-size: 11px; }
.inline-error { color: var(--alert); font-size: 12px; line-height: 1.6; }
.app-dialog {
  width: min(92vw, 520px);
  max-height: min(88vh, 760px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 24px 80px rgba(13,31,44,.3);
}
.app-dialog::backdrop { background: rgba(9,29,44,.46); backdrop-filter: blur(2px); }
.dialog-form { display: grid; gap: 12px; padding: 22px; }
.dialog-form h2 { margin: 0; font-family: var(--serif); font-size: 20px; }
.dialog-reference { margin: -4px 0 0; color: var(--strong); font-size: 12px; font-weight: 700; }
.privacy-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.dialog-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 150px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.7;
}
.dialog-message { min-height: 18px; margin: 0; color: var(--alert); font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog-submit { width: auto; min-width: 138px; height: 42px; margin: 0; padding: 0 14px; font-size: 12px; }
.app-toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(var(--nav-height) + 16px);
  width: max-content;
  max-width: calc(100vw - 32px);
  margin: 0;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--toastbg);
  color: var(--toastink);
  font-size: 13px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity .16s ease, transform .16s ease;
}
.app-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.app-toast[data-error="true"] { background: var(--alert); color: var(--onalert); }

@media (max-width: 1050px) {
  .reader-layout { grid-template-columns: 125px minmax(0, 1fr); }
  .reader-annotation-sidebar { display: none; }
}
@media (max-width: 760px) {
  #app { width: 100%; }
  .reader-heading { padding-top: 16px; }
  .reader-layout { display: block; }
  .reader-chapter-sidebar { display: none; }
  .reader-content { padding: 20px 17px 26px; }
  .translation-columns { grid-template-columns: 1fr; gap: 20px; }
  .translation-panel + .translation-panel { padding-top: 16px; border-top: 1px solid var(--line); }
  .group-overview { grid-template-columns: 1fr; gap: 0; }
  .reader-controls { gap: 8px; }
  .reader-controls label { flex: 1 1 95px; }
  .reader-controls .translation-control { flex-basis: 145px; }
  .compare-toggle { flex: 1 1 110px; }
  .reader-settings { margin-left: 0; }
  .reader-settings .settings-panel { right: 0; }
}
@media (max-width: 480px) {
  #app { padding-left: 16px; padding-right: 16px; }
  .hero { margin-left: -16px; margin-right: -16px; }
  .day-card .day-head { padding: 15px 14px; }
  .day-card .day-head strong { font-size: 15px; }
  .day-actions { align-items: stretch; padding: 0 14px 14px; }
  .day-open { min-width: 0; flex: 1; padding: 0 10px; }
  .chapter-details summary { padding: 0 8px; font-size: 12px; }
  .reader-title-row { align-items: start; }
  .reader-navigation { gap: 3px; }
  .reader-navigation button { padding: 0 9px; }
  .reader-controls { margin-bottom: 10px; padding: 10px; }
  .reader-controls label { flex-basis: calc(50% - 6px); }
  .reader-controls .translation-control { flex-basis: calc(65% - 6px); }
  .reader-settings { margin-left: auto; }
  .record-section, .feed-section { padding: 16px; }
}

@media (min-width: 900px) {
  #app {
    width: min(1180px, calc(100vw - 240px));
    margin-left: max(240px, calc(240px + (100vw - 1420px) / 2));
    margin-right: 0;
  }
  .bottom-nav button {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
  }
  .bottom-nav svg { flex: 0 0 21px; margin: 0; }
  .reader-navigation .reader-share { border-color: var(--fill); color: var(--strong); }
  body { background: var(--canvas); }
  #app {
    width: min(1180px, calc(100vw - 240px));
    max-width: none;
    margin-left: max(240px, calc(240px + (100vw - 1420px) / 2));
    margin-right: 0;
    padding-left: 48px;
    padding-right: 48px;
  }
  .hero { margin-left: -48px; margin-right: -48px; border-radius: 0 0 24px 24px; }
  .bottom-nav {
    top: 0;
    right: auto;
    width: 240px;
    height: 100%;
    grid-template-columns: 1fr;
    grid-auto-rows: 54px;
    align-content: start;
    gap: 5px;
    border-top: 0;
    border-right: 1px solid var(--line);
    padding: 112px 18px 20px;
  }
  .bottom-nav button { height: 54px; text-align: left; padding: 0 18px; font-size: 14px; }
  .reader-top { margin-left: -48px; margin-right: -48px; }
  .chapter-list { grid-template-columns: repeat(7, 1fr); }
  body.auth-mode .bottom-nav { display: none !important; }
  body.auth-mode #app {
    width: min(100%, 760px);
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
  }
}

.auth-shell {
  max-width: 1040px;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  align-items: center;
  gap: clamp(24px, 5vw, 64px);
  padding: 32px;
  background: var(--paper2);
}
.auth-brand {
  grid-row: auto;
  min-height: 520px;
  justify-content: center;
  padding: 48px;
  border-radius: 12px;
  background: var(--brandbg);
  box-shadow: none;
}
.auth-brand > p:first-child {
  position: static;
  margin: 0 0 22px;
}
.auth-brand h1 { font-family: var(--sans); font-weight: 750; }
.auth-subtitle { color: var(--onbrand2); }
.auth-route { font-family: var(--sans); }
.auth-card {
  grid-row: auto;
  width: 100%;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 12px 32px rgba(29,52,67,.06);
}
.auth-submit {
  border-radius: 8px;
  background: var(--fill);
}
.auth-submit:focus-visible {
  outline: 2px solid var(--fill);
  outline-offset: 3px;
}

.hero {
  min-height: 176px;
  margin-bottom: 22px;
  padding: calc(26px + env(safe-area-inset-top)) 28px 28px;
  border-radius: 0 0 16px 16px;
  background: var(--brandbg);
}
/* 작은 글씨라 흐리게 두면 대비가 모자란다. 진하게 둔다. */
.hero .eyebrow { left: 28px; letter-spacing: .08em; opacity: 1; color: var(--onbrand2); }
.hero h1 {
  padding-bottom: 0;
  font-family: var(--sans);
  font-size: clamp(29px, 6vw, 36px);
  font-weight: 720;
  letter-spacing: -.04em;
}
.section-title h2, .day-card .day-head strong, .schedule-summary strong,
.reader-title-row h1, .record-section h2, .feed-heading h2 {
  font-family: var(--sans);
}
.progress { background: var(--track); }
.progress i { background: var(--fill); }
.day-card, .panel, .reading-card, .record-section, .feed-section, .schedule-summary {
  border-color: var(--line);
  border-radius: 20px;
  box-shadow: none;
}
.day-card .day-head { min-height: 78px; }
.check { border-radius: 50%; }
.day-actions { align-items: center; }
.chapter-select {
  flex: 1 1 170px;
  min-width: 0;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 13px;
}
.primary { border-radius: 8px; background: var(--fill); }
.primary:active { background: var(--fill-dark); }
.day-open { min-width: 100px; }

.reader-heading, .reader-controls, .reader-content,
.reader-status { width: min(100%, 860px); }
.reader-heading { padding-top: 20px; }
.reader-back { color: var(--muted); }
.reader-title-row { align-items: center; padding: 8px 0 14px; }
.reader-title-row h1 { font-size: clamp(23px, 4vw, 30px); letter-spacing: -.035em; }
.reader-navigation { gap: 5px; }
.reader-navigation button {
  min-width: 42px;
  padding: 0 12px;
  border-radius: 8px;
  background: transparent;
}
.reader-navigation button[aria-label] { font-size: 20px; }
.reader-navigation .reader-share {
  border-color: var(--line);
  color: var(--strong);
  font-size: 12px !important;
}
.reader-controls {
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.reader-controls select {
  height: 40px;
  border-color: var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.reader-book-select { width: 180px; }
.reader-chapter-select { width: 88px; }
.reader-translation-select { width: 138px; }
.compare-toggle, .secondary-button { border-radius: 8px; }
.compare-toggle.active { border-color: var(--fill); background: var(--fill); }
.reader-settings { margin-left: auto; }
.reader-settings summary { border-radius: 8px; color: var(--strong); }
.reader-content {
  max-width: 860px;
  justify-self: center;
  margin-left: auto;
  margin-right: auto;
  padding: 20px 4px 28px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}
.reader-day-label { margin-bottom: 8px; }
.translation-columns { gap: 32px; }
.translation-label {
  color: var(--muted);
  font-family: var(--sans);
  letter-spacing: 0;
}
.scripture-paragraph {
  margin-bottom: 1.35em;
  color: var(--ink);
  text-align: left;
  word-break: keep-all;
}
.paragraph-mark {
  margin-right: .38em;
  color: var(--strong);
  font-size: .78em;
  font-weight: 700;
}
.verse { text-align: left; }
.verse.highlighted {
  border-radius: 0;
  background: linear-gradient(transparent 66%, var(--mark) 66%);
}
.paragraph-note {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: var(--muted);
}

.feed-section, .group-progress-panel { width: min(100%, 860px); }
.group-progress-caption { margin: -4px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.cell-progress-card { padding: 16px 0; border-top: 1px solid var(--line); }
.cell-progress-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.cell-progress-heading strong { color: var(--ink); font-size: 14px; }
.cell-progress-heading span { color: var(--muted); font-size: 11px; }
.cell-day-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.cell-day > div:first-child { display: flex; justify-content: space-between; gap: 4px; color: var(--muted); font-size: 10px; }
.cell-day strong { color: var(--ink-soft); font-size: 10px; font-weight: 600; }
.cell-day-track { height: 3px; margin-top: 6px; overflow: hidden; border-radius: 4px; background: var(--track); }
.cell-day-track i { display: block; height: 100%; border-radius: inherit; background: var(--fill); }
.feed-heading { align-items: center; }
.feed-heading p { line-height: 1.5; }
.compose-button { border-radius: 8px; }

.bottom-nav {
  background: var(--paper);
  border-color: var(--line);
}
.bottom-nav button { border-radius: 8px; }
.bottom-nav button[aria-current="page"] { color: var(--strong); background: var(--paper2); }
button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
body { background: var(--canvas); }

@media (max-width: 899px) {
  .auth-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(250px, 36svh) 1fr;
    gap: 0;
    padding: 0;
  }
  .auth-brand {
    grid-row: 1;
    min-height: 0;
    justify-content: center;
    padding: calc(72px + env(safe-area-inset-top)) 28px 32px;
    border-radius: 0 0 18px 18px;
  }
  .auth-brand > p:first-child {
    position: absolute;
    top: calc(24px + env(safe-area-inset-top));
    left: 28px;
    margin: 0;
  }
  .auth-card {
    grid-row: 2;
    width: calc(100% - 32px);
    max-width: 490px;
    align-self: start;
    margin: 20px auto 28px;
    padding: 26px 24px;
  }
  body.auth-mode #app { width: 100%; max-width: 760px; margin: 0 auto; padding: 0; left: auto; }
}
@media (max-width: 760px) {
  .reader-controls { gap: 7px; }
  .reader-book-select { flex: 1 1 150px; width: auto; }
  .reader-chapter-select { flex: 0 0 82px; width: 82px; }
  .reader-translation-select { flex: 1 1 118px; width: auto; }
  .reader-settings { margin-left: 0; }
  .reader-content { padding: 18px 0 24px; }
  .cell-day-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
}
@media (max-width: 480px) {
  .hero { min-height: 152px; margin-left: -16px; margin-right: -16px; padding-left: 20px; padding-right: 20px; }
  .hero .eyebrow { left: 20px; }
  .day-actions { gap: 8px; }
  .chapter-select { flex-basis: 110px; padding: 0 8px; font-size: 12px; }
  .day-open { min-width: 88px; padding: 0 10px; }
  .reader-title-row { align-items: center; }
  .reader-navigation { gap: 2px; }
  .reader-navigation button { min-width: 38px; padding: 0 8px; }
  .reader-navigation .reader-share { min-width: 56px; }
  .reader-controls { margin-bottom: 8px; }
  .reader-translation-select { flex-basis: 115px; }
  .cell-progress-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
}
@media (min-width: 900px) {
  #app {
    position: relative;
    left: 120px;
    width: min(1120px, calc(100vw - 280px));
    max-width: 1120px;
    margin: 0 auto;
    padding-left: 48px;
    padding-right: 48px;
  }
  body.auth-mode #app { left: auto; width: min(100%, 1040px); max-width: 1040px; }
  .hero { margin-left: -48px; margin-right: -48px; }
}

.post-type {
  display: inline-flex;
  margin: 12px 0 0;
  padding: 4px 8px;
  border-radius: 5px;
  background: var(--paper2);
  color: var(--strong);
  font-size: 11px;
  font-weight: 700;
}
.post-type + .post-reference { margin-top: 8px; }
.post-image-wrap { margin-top: 12px; }
.post-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 480px;
  border-radius: 8px;
  object-fit: contain;
  object-position: left center;
}
.image-load-status { color: var(--muted); font-size: 12px; }
.composer-field {
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 650;
}
.composer-select, .composer-input, .composer-file {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.composer-file { padding: 7px; }
.composer-help { margin: -6px 0 0; color: var(--muted); font-size: 11px; }
.composer-image-preview {
  display: block;
  max-width: 100%;
  max-height: 240px;
  margin: 0 auto;
  border-radius: 8px;
  object-fit: contain;
}
.dialog-actions button:disabled { opacity: .6; cursor: wait; }

.nav-copy { display: grid; gap: 1px; text-align: left; }
.nav-ko { color: inherit; }
.nav-en {
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.home-masthead {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, .7fr);
  align-items: center;
  gap: 32px;
  margin: 30px 0 24px;
  padding: 32px;
  border: 1px solid var(--onbrandline);
  border-radius: 22px;
  color: var(--onbrand);
  background: var(--brandbg);
  box-shadow: 0 18px 36px rgba(27,61,86,.12);
}
.home-eyebrow,
.home-progress-heading > span,
.today-guide-eyebrow,
.today-side-eyebrow {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
}
.home-eyebrow { color: var(--onbrand2); }
.home-brand h1 {
  margin: 13px 0 2px;
  font-family: var(--reader-serif);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.08;
}
.theme-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 16px;
  padding: 0 15px 0 12px;
  border: 1px solid var(--onbrandline);
  border-radius: 999px;
  color: var(--onbrand2);
  background: var(--onbrandfill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
}
/* 반쯤 칠한 동그라미. 색이 바뀌는 단추라는 뜻 */
.theme-dot {
  width: 15px;
  height: 15px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(90deg, currentColor 50%, transparent 50%);
}

.home-subtitle {
  margin: 0;
  color: var(--onbrand2);
  font-size: 17px;
  letter-spacing: .03em;
}
.home-progress-card {
  padding: 20px;
  border: 1px solid var(--onbrandline);
  border-radius: 15px;
  background: var(--onbrandfill);
}
.home-progress-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.home-progress-heading > span { color: var(--onbrand2); }
.home-progress-heading strong {
  font-family: var(--reader-serif);
  font-size: 26px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.home-progress-heading small {
  color: var(--onbrand2);
  font-family: var(--sans);
  font-size: 12px;
}
.home-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 10px;
  background: var(--onbrandtrack);
}
.home-progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--onbrandbar);
  transition: width .25s ease;
}
.journey-days {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}
.journey-day {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--onbrandline);
  border-radius: 50%;
  color: var(--onbrand);
  background: transparent;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.journey-day.complete { border-color: var(--onbrandbar); color: var(--onbrandbarink); background: var(--onbrandbar); }
.journey-day.current { outline: 2px solid var(--onbrand); outline-offset: 2px; }
.home-progress-card > p {
  margin: 12px 0 0;
  color: var(--onbrand2);
  font-size: 11px;
  line-height: 1.55;
}
.today-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: start;
  gap: 18px;
  margin-bottom: 28px;
}
.today-guide-card,
.today-side-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: 0 10px 28px rgba(29,48,62,.045);
}
.today-guide-card { padding: clamp(20px, 3vw, 30px); }
.today-guide-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.today-guide-eyebrow { color: var(--strong); }
.today-guide-heading h2 {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 22px;
  letter-spacing: -.035em;
}
.today-date {
  flex: none;
  padding: 7px 10px;
  border-radius: 99px;
  color: var(--ink-soft);
  background: var(--paper2);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.today-range {
  margin: 17px 0 14px;
  color: var(--strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
}
.today-intro {
  margin: 0 0 12px;
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.85;
  word-break: keep-all;
}
.today-focus-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 20px;
}
.today-focus-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper2);
}
.today-focus-card h3 {
  margin: 0 0 6px;
  color: var(--strong);
  font-size: 12px;
}
.today-focus-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.6;
  word-break: keep-all;
}
.today-guide-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}
.today-guide-actions .primary {
  width: auto;
  min-height: 42px;
  margin: 0;
  padding: 0 17px;
  color: var(--onfill);
  font-size: 13px;
}
.today-schedule-link {
  min-height: 40px;
  padding: 0;
  border: 0;
  color: var(--strong);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}
.today-side-card {
  position: sticky;
  top: 20px;
  padding: 22px;
  background: var(--paper2);
}
.today-side-eyebrow { color: var(--muted); }
.today-side-card h2 {
  margin: 11px 0 10px;
  font-size: 18px;
  letter-spacing: -.02em;
}
.today-side-range {
  display: block;
  color: var(--strong);
  font-size: 14px;
  line-height: 1.55;
}
.today-side-card > p:not(.today-side-eyebrow) {
  margin: 12px 0 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
  word-break: keep-all;
}
.today-side-button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--strong);
  background: var(--paper);
  font-size: 12px;
  font-weight: 700;
}

.settings-panel {
  width: 300px;
  max-height: min(76vh, 560px);
  overflow-y: auto;
}
.reader-setting-row { gap: 7px !important; }
.reader-setting-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}
.setting-value {
  color: var(--strong);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.reader-setting-row select {
  width: 100%;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}
.reader-content {
  padding: 20px var(--reader-padding, 24px) 28px;
}
.scripture-paragraph {
  margin-bottom: 1.35em;
  letter-spacing: var(--reader-letter-spacing, 0);
  text-align: left;
}
.verse {
  display: inline;
  text-align: left;
}
.verse:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.post-header strong { font-size: 14px; }
@media (max-width: 899px) {
  .home-masthead { grid-template-columns: 1fr; gap: 20px; padding: 25px; }
  .today-dashboard { grid-template-columns: 1fr; }
  .today-side-card { position: static; }
  .bottom-nav .nav-en { display: none; }
  .reader-content { padding: 18px var(--reader-padding, 18px) 24px; }
  .settings-panel {
    width: min(300px, calc(100vw - 32px));
    max-height: min(72vh, 520px);
  }
}
@media (max-width: 560px) {
  .home-masthead { gap: 18px; margin-top: 18px; padding: 22px 18px; border-radius: 16px; }
  .home-brand h1 { margin-top: 10px; font-size: 38px; }
  .home-progress-card { padding: 16px; }
  .today-guide-card { padding: 20px 17px; }
  .today-guide-heading { display: grid; gap: 11px; }
  .today-guide-heading h2 { font-size: 20px; }
  .today-date { justify-self: start; }
  .today-focus-grid { grid-template-columns: 1fr; }
  .today-focus-card { padding: 11px 13px; }
  .today-guide-actions { align-items: stretch; flex-direction: column; gap: 8px; }
  .today-guide-actions .primary,
  .today-schedule-link { width: 100%; }
  .today-guide-actions .primary { justify-content: center; }
  .today-side-card { padding: 19px; }
  .feed-post { padding: 17px 16px 13px; }
  .reader-settings .settings-panel { right: 0; }
}

.auth-brand h1, .home-brand h1 { font-family: var(--reader-serif); }
.home-masthead {
  background: var(--brandbg);
}
.home-progress-card { border: 1px solid var(--onbrandline); background: var(--onbrandfill); }
.home-progress-track i { background: var(--onbrandbar); }
.today-date { background: var(--chip); }
.journey-day.current {
  border-color: var(--fill);
  background: var(--fill);
  color: var(--onfill);
  box-shadow: 0 0 0 3px var(--onbrandline);
}
.paragraph-mark { color: var(--accent); }

.reader-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 14px;
}
.reader-title-main, .reader-title-tools {
  display: flex;
  align-items: center;
  gap: 7px;
}
.reader-title-main h1 {
  margin: 0;
  color: var(--strong);
  font-family: var(--sans);
  font-size: clamp(22px, 3.2vw, 29px);
  letter-spacing: -.035em;
  white-space: nowrap;
}
.chapter-step, .reader-chapter-picker summary {
  width: 38px;
  height: 40px;
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--strong);
  font-size: 23px;
  line-height: 1;
}
.reader-chapter-picker { position: relative; }
.reader-chapter-picker summary {
  cursor: pointer;
  font-size: 20px;
  list-style: none;
}
.reader-chapter-picker summary::-webkit-details-marker { display: none; }
.chapter-picker-panel {
  position: absolute;
  z-index: 20;
  top: 46px;
  right: 0;
  width: 230px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper);
  box-shadow: 0 12px 30px rgba(0, 48, 73, .16);
}
.reader-jump-select, .reader-title-tools .reader-translation-select {
  min-width: 126px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--strong);
  font: 600 13px var(--sans);
}
.reader-jump-select { width: 100%; }
.reader-title-tools { gap: 7px; }
.reader-title-tools .reader-settings { margin-left: 0; }
.reader-title-tools .reader-settings summary { width: 40px; height: 40px; }
.reader-title-tools .compare-toggle,
.reader-title-tools .reader-share {
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: var(--strong);
  font: 600 12px var(--sans);
}
.reader-title-tools .compare-toggle.active {
  border-color: var(--fill);
  background: var(--fill);
  color: var(--onfill);
}
.reader-title-tools .reader-share { border-color: var(--fill); }
.reader-content { touch-action: pan-y; }
.translation-columns:not(.single) .translation-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
.translation-columns:not(.single) .translation-label {
  margin-bottom: 16px;
  padding-bottom: 10px;
  color: var(--strong);
}
#back-to-top {
  position: fixed;
  z-index: 15;
  right: max(22px, calc((100vw - 1180px) / 2 + 22px));
  bottom: calc(var(--nav-height) + 18px);
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--fill);
  color: var(--onfill);
  font-size: 22px;
  box-shadow: 0 6px 18px rgba(0, 48, 73, .2);
}
@media (max-width: 760px) {
  .reader-title-row { justify-content: flex-start; }
  .reader-title-tools { flex-wrap: wrap; }
  #back-to-top { right: 16px; bottom: calc(var(--nav-height) + 12px); }
}

.group-overview {
  grid-template-columns: minmax(0, 1.6fr) minmax(270px, .8fr);
  gap: 20px;
  margin-top: 18px;
}
.bottom-nav button { color: var(--ink-soft); }
.bottom-nav button[aria-current="page"] { color: var(--strong); background: var(--paper2); }
.group-overview .feed-section,
.group-overview .group-progress-panel {
  width: 100%;
  max-width: none;
  margin: 0;
}
.group-overview .feed-section {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.group-overview .group-progress-panel {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(0, 48, 73, .07);
}
.group-progress-panel > h2 { color: var(--strong); }
.group-progress-caption { color: var(--ink-soft); }
.cell-day-track { height: 5px; background: var(--track); }
.cell-day-track i { background: var(--accent); }

.feed-heading {
  min-height: 104px;
  margin: 0 0 16px;
  padding: 20px 22px;
  border: 1px solid var(--onbrandline);
  border-radius: 14px;
  background: var(--brandbg);
  color: var(--onbrand);
}
.feed-heading h2 { margin: 0 0 6px; color: var(--onbrand); font-size: 20px; }
.feed-heading p { color: var(--onbrand2); font-size: 13px; }
.feed-heading .compose-button {
  min-height: 44px;
  border: 0;
  background: var(--paper2);
  color: var(--strong);
  font-weight: 700;
}
.post-header { align-items: center; }
.post-header > .post-author { display: flex; align-items: center; gap: 10px; min-width: 0; }
.post-avatar {
  width: 40px;
  height: 40px;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--strong);
  font-size: 17px;
  font-weight: 750;
}
.post-author-copy { display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 8px; }
.post-author-copy strong { color: var(--strong); font-size: 14px; }
.post-author-copy span { color: var(--muted); font-size: 12px; }
.post-header time { flex: none; color: var(--muted); font-size: 12px; }
.post-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 15px 0 9px; }
.post-type {
  margin: 0;
  padding: 5px 9px;
  border-radius: 6px;
  background: var(--paper2);
  color: var(--strong);
  font-size: 11px;
  font-weight: 750;
}
@media (max-width: 899px) {
  .group-overview { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 560px) {
  .feed-heading { align-items: stretch; flex-direction: column; }
  .feed-heading .compose-button { width: 100%; }
  .feed-post { padding: 18px 16px 14px; }
}
/* 이 카드와 날짜 동그라미는 제목띠 안에 들어앉는다. 그래서 종이 위 색이 아니라
   제목띠 위 색(--onbrand*)을 쓴다. 종이 색을 쓰면 테마를 바꿀 때 글자가 사라진다. */
.home-progress-card { color: var(--onbrand); }
.home-progress-heading > span,
.home-progress-heading strong { color: var(--onbrand); }
.home-progress-heading small,
.home-progress-card > p { color: var(--onbrand2); }
.home-progress-track { background: var(--onbrandtrack); }
.home-progress-track i { background: var(--onbrandbar); }
.journey-day {
  border-color: var(--onbrandline);
  background: transparent;
  color: var(--onbrand2);
}
.journey-day.complete { border-color: var(--onbrandbar); background: var(--onbrandbar); color: var(--onbrandbarink); }
.journey-day.current {
  border-color: var(--onbrand);
  background: transparent;
  color: var(--onbrand);
  outline: 2px solid var(--onbrand);
  outline-offset: 2px;
}

/* ───── 2026-12 화면 개선: 고장 수정 · 글자 크기 · 본문 화면 ───── */
.post-header .post-avatar { color: var(--paper); font-size: 18px; }

.journey-day, .journey-day.current { font-size: 15px; box-shadow: none; }
.journey-day.current { border: 2px solid var(--onbrand); outline: 0; font-weight: 800; }

@media (max-width: 899px) {
  .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; }
  .bottom-nav svg { width: 24px; height: 24px; margin: 0 0 4px; }
  .bottom-nav .nav-copy { justify-items: center; text-align: center; }
  .bottom-nav button { font-size: 13px; }
}

.home-eyebrow, .today-guide-eyebrow, .today-side-eyebrow, .home-progress-heading > span, .hero .eyebrow { font-size: 12px; }
.home-progress-card > p, .today-date { font-size: 14px; }
.today-intro, .today-range { font-size: 17px; }
.today-focus-card h3 { font-size: 16px; }
.today-focus-card p, .today-side-card p { font-size: 15px; }
.today-guide-actions button, .today-side-button, .theme-switch { font-size: 15px; min-height: 44px; }
.day-date, .day-status, .chapter-select, .day-open, .schedule-summary span { font-size: 15px; }
.day-info strong { font-size: 17px; }
.post-author-copy strong { font-size: 16px; }
.post-author-copy span, .post-header time, .post-type, .post-reference, .feed-heading p,
.group-progress-caption, .cell-progress-heading span, .composer-help, .privacy-note { font-size: 14px; }
.compose-button, .secondary-button, .dialog-reference, .dialog-submit { font-size: 15px; }
.cell-day span, .cell-day strong, .empty-state, .private-note { font-size: 15px; }

/* 본문 화면 */
body.reader-mode #app { padding-left: 0; padding-right: 0; padding-bottom: 0; }
.reader-heading { padding: 12px 16px 4px; margin: 0 auto; }
.reader-topbar { display: flex; align-items: center; justify-content: space-between; }
.reader-topbar .reader-back { min-height: 44px; padding: 0 8px 0 0; border: 0; background: none; color: var(--muted); font-size: 16px; font-weight: 700; }
.reader-topbar .reader-settings { margin: 0; }
.reader-topbar .reader-settings summary { width: 44px; height: 44px; }
.reader-pickers { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.reader-pickers h1 { margin: 0; font: inherit; }
.reader-picker { display: inline-flex; align-items: center; gap: 4px; min-height: 46px; padding: 0 6px; border: 0; background: none; color: var(--strong); font-size: 17px; font-weight: 700; white-space: nowrap; }
.picker-caret { color: var(--muted); font-size: 13px; }
.settings-panel { width: min(320px, calc(100vw - 32px)); right: 0; left: auto; }
.settings-panel label, .settings-panel select, .settings-panel .setting-value { font-size: 15px; }
.settings-panel select, .settings-panel input[type="range"] { min-height: 44px; }

/* 본문 전체를 못 긁게 해야 길게 누르기·드래그 범위 선택이 브라우저 기본 텍스트 선택과 안 부딪힌다 */
.reader-content { width: min(100%, 860px); padding: 22px var(--reader-padding, 24px) 120px; user-select: none; -webkit-touch-callout: none; }
/* 마우스/트랙패드(정밀 포인터)는 브라우저 기본 드래그 선택으로 범위를 고른다.
   손가락(터치)은 스크롤과 겹치므로 길게 누르기 쪽을 쓰고, 기본 선택은 막아 둔다 */
@media (pointer: fine) {
  .reader-content { user-select: text; -webkit-user-select: text; }
}
.reader-content .verse { font-size: var(--reader-size, 18px); letter-spacing: var(--reader-letter-spacing, 0); }
.reader-content .verse sup { font-size: .65em; }
.reader-content .paragraph-mark { font-size: .7em; margin-right: .3em; }
.translation-panel.paired .scripture-paragraph { margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.verse-alternate { display: block; margin-top: 8px; color: var(--muted); font-size: calc(var(--reader-size, 18px) - 2px); line-height: 1.65; }

.chapter-pager { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; width: auto; margin: 0; background: var(--paper); border: 0; border-top: 1px solid var(--line); border-radius: 0; display: flex; justify-content: space-between; padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); }
.pager-button { min-height: 48px; min-width: 120px; padding: 0 18px; border: 0; background: none; color: var(--strong); font-size: 16px; font-weight: 700; }
.pager-button:disabled { opacity: .35; cursor: default; }

/* 선택한 절 옆에 뜨는 팝오버 안쪽 내용. 패널 테두리·배경은 .popover가 준다 */
.selection-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 2px 4px 0; }
.selection-head .selection-reference { margin: 0; padding-left: 4px; color: var(--ink); font-size: 16px; font-weight: 700; }
.sheet-close { flex: none; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); font-size: 28px; line-height: 1; }
.tool-grid { display: flex; justify-content: space-between; gap: 4px; margin-top: 6px; }
.tool-grid .tool-button { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0; border: 0; border-radius: 12px; background: var(--paper2); color: var(--strong); }
.tool-button svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.app-sheet { width: min(100%, 560px); max-width: 100%; max-height: 78vh; margin: auto auto 0; padding: 0 16px calc(20px + env(safe-area-inset-bottom)); border: 1px solid var(--line); border-radius: 20px 20px 0 0; background: var(--paper); color: var(--ink); overflow-y: auto; }
.app-sheet::backdrop { background: rgba(10,16,34,.45); }
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; justify-content: space-between; padding: 10px 0; background: var(--paper); }
.sheet-head h2 { margin: 0; font-size: 18px; color: var(--strong); }
.sheet-book h3 { margin: 12px 0 8px; font-size: 15px; color: var(--muted); }
.chapter-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.chapter-cell { min-height: 46px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 16px; }
.chapter-cell[aria-current="true"], .sheet-option[aria-pressed="true"] { border-color: var(--fill); background: var(--fill); color: var(--onfill); font-weight: 800; }
.sheet-option { display: block; width: 100%; min-height: 52px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 17px; }

body.reader-mode #back-to-top { bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (max-width: 899px) { body.reader-mode .bottom-nav { display: none; } }
@media (min-width: 900px) { .chapter-pager { left: 240px; } }
.selection-head .selection-reference { flex: 1 1 auto; min-width: 0; }
.home-progress-card > p, .today-intro, .today-focus-card p, .today-side-card p { word-break: keep-all; }

/* ───── 로그인: 주황을 맨 위까지, 입력칸의 네모 테두리 없애기 ───── */
@media (max-width: 899px) { body.brand-top, body.auth-mode.brand-top { background: var(--brandbg); } }
@media (max-width: 899px) {
  .auth-shell { align-items: stretch; align-content: stretch; min-height: 100dvh; }
  .auth-brand { align-self: stretch; }
}
.auth-field:focus-visible { outline: none; border-bottom: 3px solid var(--fill); }

/* ───── 오늘 C: 하루에 집중 ───── */
.today-hero { position: relative; margin: 0 -22px; padding: calc(28px + env(safe-area-inset-top)) 24px 30px; border-radius: 0 0 32px 32px; background: var(--brandbg); color: var(--onbrand); text-align: center; word-break: keep-all; }
.today-hero p { margin: 0; }
.theme-round { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: 16px; width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--onbrand); }
.theme-round .theme-dot { margin: 0; }
.today-hero .today-church { padding: 0 48px; min-height: 28px; color: var(--onbrand2); font-size: 13px; font-weight: 700; }
.today-hero .today-brand { margin-top: 14px; font-family: var(--reader-serif); font-size: 24px; }
.today-hero h1 { margin: 10px 0 0; font-size: 60px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.today-hero .today-hero-range { font-size: 23px; font-weight: 700; }
.today-hero .today-hero-date { margin: 6px 0 20px; color: var(--onbrand2); font-size: 15px; }
.today-start { width: min(100%, 520px); min-height: 56px; border: 0; border-radius: 999px; background: var(--onbrandbar); color: var(--onbrandbarink); font-size: 19px; font-weight: 800; }
.today-body { max-width: 640px; margin: 0 auto; }
.today-days { display: flex; justify-content: center; gap: clamp(6px, 2.6vw, 12px); margin: 20px 0 6px; }
.today-day { width: 46px; height: 46px; padding: 0; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 16px; }
.today-day.current { border-color: var(--fill); background: var(--fill); color: var(--onfill); font-weight: 800; }
.today-day.complete:not(.current) { border: 2px solid var(--strong); color: var(--strong); font-weight: 800; }
.today-count { margin: 0 0 18px; color: var(--muted); font-size: 14px; text-align: center; }
.today-card { margin: 0 0 14px; padding: 22px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink); font-size: 17px; line-height: 1.8; word-break: keep-all; }
.today-card p { margin: 0 0 12px; }
.today-question { text-align: center; }
.today-question h2 { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.today-question p { margin: 0; font-family: var(--sans); font-size: 21px; line-height: 1.8; text-wrap: balance; }
.today-more summary { min-height: 44px; display: flex; align-items: center; justify-content: flex-end; color: var(--strong); font-size: 16px; font-weight: 700; cursor: pointer; list-style: none; }
.today-more summary::-webkit-details-marker { display: none; }
.today-more summary::after { content: " ›"; padding-left: 6px; }
.today-more[open] summary::after { content: " ⌃"; }
.today-point h3 { margin: 8px 0 2px; color: var(--strong); font-size: 16px; }
.today-schedule { display: block; min-height: 48px; margin: 0 0 0 auto; border: 0; background: none; color: var(--strong); font-size: 16px; font-weight: 700; }

/* ───── 나눔 B: 말씀 중심 ───── */
.group-head { padding: calc(22px + env(safe-area-inset-top)) 0 10px; text-align: center; }
.group-head h1 { margin: 0; color: var(--strong); font-size: 23px; }
.group-tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 -22px 16px; border-bottom: 1px solid var(--line); }
.group-tab { min-height: 48px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font-size: 17px; }
.group-tab[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--strong); font-weight: 800; }
.feed-list, .group-mode .group-progress-panel { width: min(100%, 640px); margin: 0 auto; }
.feed-post {
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 -6px 16px;
  padding: 12px 0 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: none;
}
.feed-post .post-reference { margin: 10px 0 0; padding: 0 16px; color: var(--accent); font-size: 14px; font-weight: 800; text-align: left; }
.feed-post .post-body {
  margin: 10px 0 0;
  padding: 0 16px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.feed-post .post-image-wrap { margin: 10px 16px 0; }
.feed-post .post-image { display: block; width: 100%; border-radius: 16px; }
.feed-post .post-image[hidden] { display: none; }
.feed-post .post-more { position: static; flex: none; }
.feed-post .inline-error, .feed-post .image-load-status { margin-top: 10px; padding: 0 16px; }
.feed-post .post-song-link-inline { display: inline-block; margin: 10px 16px 0; color: var(--accent); font-size: 13px; font-weight: 700; text-decoration: none; }
.compose-fab { position: fixed; z-index: 19; right: 18px; bottom: calc(var(--nav-height) + 16px); width: 60px; height: 60px; border: 0; border-radius: 50%; background: var(--brandbg); color: var(--onbrand); font-size: 30px; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
body.group-mode .compose-fab { border: 2px solid var(--onbrandline); }
body.group-mode #back-to-top { right: auto; left: 18px; }
body.group-mode #app { padding-bottom: calc(var(--nav-height) + 100px); }
/* 화면 좌우 여백(#app)에 맞춰 머리와 탭을 가장자리까지 */
@media (max-width: 480px) { .today-hero, .group-tabs { margin-left: -16px; margin-right: -16px; } .feed-post { margin-left: 0; margin-right: 0; } }
@media (min-width: 900px) { .today-hero { margin-left: -48px; margin-right: -48px; } .group-tabs { margin-left: -48px; margin-right: -48px; } .chapter-pager { padding-left: 48px; padding-right: 48px; } .compose-fab { bottom: 32px; right: 32px; } }
/* 글쓰기 단추는 테마의 "누르는 곳" 색을 따른다 */
.compose-fab, body.group-mode .compose-fab { background: var(--fill); color: var(--onfill); border: 0; }

/* ───── 나눔 카드 공통: 짧은 글 2열 묶음, 좋아요·관리를 머리로 ───── */
.post-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.post-grid .feed-post { margin: 0; }
.mine-post-list .post-grid { margin-bottom: 0; }
@media (max-width: 560px) { .post-grid { grid-template-columns: 1fr; } }
.post-type-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--track); color: var(--strong); font-size: 12px; font-weight: 800; }
.post-top-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.post-top-actions .like-button { min-height: auto; width: auto; padding: 2px 6px; border: 0; background: none; color: var(--muted); font-size: 13px; font-weight: 700; }
.post-top-actions .like-button.liked { color: var(--accent); }
.post-top-actions .post-more { color: var(--muted); font-size: 18px; }
.post-grid .feed-post .post-body { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ───── 나의 기록 > 내가 나눈 글: 이중 테두리 제거 + 필터 탭 ───── */
.record-section-flat { background: none; border: 0; box-shadow: none; padding: 0; }
.mine-posts-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px; margin: 0 0 14px; }
.mine-posts-head h2 { margin: 0; }
.mine-filter-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.mine-filter-tab { height: 32px; margin: 0; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 13px; font-weight: 700; }
.mine-filter-tab[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); font-weight: 800; }
.mine-post-list { display: flex; flex-direction: column; gap: 14px; }

/* ───── 통독 일정: 낮은 머리 + 오늘만 펼치기 ───── */
.plan-hero-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.plan-track { height: 10px; margin: 16px 0 8px; overflow: hidden; border-radius: 999px; background: var(--onbrandtrack); }
.plan-track i { display: block; height: 100%; background: var(--onbrandbar); border-radius: 999px; }
.plan-list { display: grid; gap: 8px; width: min(100%, 720px); margin: 0 auto; }
.plan-day { border: 1px solid var(--line); border-radius: 16px; background: var(--paper); overflow: hidden; }
.plan-day.open { border: 2px solid var(--accent); }
.plan-day.done:not(.open) { background: var(--paper2); }
.plan-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 68px; padding: 10px 14px; border: 0; background: none; color: var(--ink); text-align: left; }
.day-mark { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 15px; font-weight: 700; }
.plan-day.done .day-mark { border-color: var(--fill); background: var(--fill); color: var(--onfill); }
.plan-copy { display: grid; gap: 2px; flex: 1; min-width: 0; word-break: keep-all; }
.plan-date { color: var(--muted); font-size: 14px; }
.plan-copy strong { font-size: 17px; }
.plan-caret { flex: none; color: var(--muted); font-size: 20px; }
.plan-detail { padding: 4px 14px 14px; }
.plan-chapters { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.plan-chapter { min-height: 46px; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font-size: 16px; white-space: nowrap; }
.plan-start { display: block; width: 100%; min-height: 52px; margin-top: 12px; border: 0; border-radius: 999px; background: var(--fill); color: var(--onfill); font-size: 17px; font-weight: 800; }
.plan-done { display: block; min-height: 48px; margin: 6px 0 -6px auto; padding: 0 4px; border: 0; background: none; color: var(--strong); font-size: 16px; font-weight: 700; }

/* 나눔마당도 다른 화면과 같은 주황 머리 (낮은 높이) */
.hero.group-head { display: block; min-height: 0; margin-bottom: 0; padding: calc(24px + env(safe-area-inset-top)) 22px 22px; border-radius: 0; text-align: center; }
.hero.group-head h1 { margin: 0; padding: 0; color: var(--onbrand); font-size: 28px; }
@media (max-width: 480px) { .hero.group-head { margin-left: -16px; margin-right: -16px; } }
@media (min-width: 900px) { .hero.group-head { margin-left: -48px; margin-right: -48px; } }

/* ───── 2차 손질 ───── */
/* 머리: 나의 기록이 기준. 통독 일정은 같은 틀에 기간·진행만 더한다 */
.hero .plan-period, .hero .plan-count { position: absolute; z-index: 1; right: 20px; color: var(--onbrand); font-weight: 700; }
.hero .plan-period { top: calc(22px + env(safe-area-inset-top)); font-size: 15px; }
.hero .plan-count { bottom: 32px; font-size: 15px; }
.hero .plan-track { position: absolute; left: 28px; right: 20px; bottom: 14px; height: 8px; margin: 0; }

/* 통독 일정: 작은 장 단추, 왼쪽 원이 하루 전체 표시 */
.plan-head { display: flex; align-items: center; padding-left: 12px; }
.plan-head .plan-row { flex: 1; min-width: 0; padding-left: 12px; }
button.day-mark { width: 44px; height: 44px; padding: 0; background: var(--paper); color: var(--ink); }
.plan-day.done button.day-mark { background: var(--fill); color: var(--onfill); }
.plan-chapters { grid-template-columns: repeat(7, 1fr); gap: 5px; }
.plan-chapter { min-height: 40px; border-radius: 9px; font-size: 14px; }
.plan-chapter[aria-pressed="true"] { border-color: var(--fill); background: var(--fill); color: var(--onfill); font-weight: 800; }
.plan-start { min-height: 48px; font-size: 16px; }
.chapter-grid { grid-template-columns: repeat(7, 1fr); gap: 5px; }
.chapter-cell { min-height: 40px; font-size: 15px; }

/* 설정 창 */
.settings-panel { width: 264px; gap: 0; padding: 4px 14px; }
.setting-row { display: flex; align-items: center; gap: 6px; min-height: 48px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-name { flex: 1; color: var(--ink); font-size: 15px; }
.settings-panel .setting-value { min-width: 36px; color: var(--strong); font-size: 15px; font-weight: 700; text-align: center; }
.setting-step { width: 40px; height: 36px; padding: 0; border: 0; border-radius: 8px; background: var(--paper2); color: var(--strong); font-size: 20px; line-height: 1; touch-action: manipulation; }
.setting-step:disabled { opacity: .3; }
.setting-choices { display: flex; gap: 6px; }
.setting-choice { min-width: 58px; height: 36px; border: 0; border-radius: 8px; background: var(--paper2); color: var(--ink); font-size: 14px; }
.setting-choice[aria-pressed="true"] { border-color: var(--fill); background: var(--fill); color: var(--onfill); font-weight: 800; }
.reader-content .verse { font-size: var(--reader-size, 16px); }

.app-sheet:focus, .app-sheet:focus-visible { outline: none; }

/* 가이드: 양쪽 맞춤 */
.today-card.today-guide-text p { text-align: justify; word-break: normal; }
.today-guide-text > p:last-child, .today-point:last-child p { margin-bottom: 0; }
.plan-chapters { grid-template-columns: repeat(5, 48px); justify-content: center; gap: 7px; }

/* ───── 로그인: 휴대폰은 위 주황(둥근 아래) + 상자 없는 입력, 컴퓨터는 좌우 ───── */
.auth-card { border: 0; background: transparent; box-shadow: none; }
@media (min-width: 900px) {
  body.auth-mode #app { width: 100%; max-width: none; margin: 0; padding: 0; }
  .auth-shell { max-width: none; min-height: 100vh; grid-template-columns: 1fr 1fr; align-items: stretch; gap: 0; padding: 0; }
  .auth-brand { min-height: 100vh; align-items: center; justify-content: center; text-align: center; border-radius: 0; }
  .auth-card { align-self: center; justify-self: center; width: min(400px, calc(100% - 48px)); padding: 24px 0; }
}

/* ───── 본문은 양쪽 맞춤 ───── */
.reader-content .scripture-paragraph { text-align: justify; word-break: normal; }
.reader-content .verse-alternate { text-align: left; }

/* 아이폰은 입력칸 글자가 16px보다 작으면 화면을 확대한다 */
@media (max-width: 899px) { input, select, textarea { font-size: 16px !important; } }

/* ───── 나눔 카드: 글자 줄임, 관리 단추 ───── */
.post-sign { font-size: 14px; }
.post-more { position: absolute; top: 8px; right: 6px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); font-size: 24px; line-height: 1; }
.sheet-option.danger { color: var(--alert); font-weight: 800; }
.sheet-note { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.6; }

/* ───── 글쓰기 창 ───── */
.editor { position: fixed; width: min(100%, 560px); height: min(86vh, 680px); max-width: 100%; max-height: none; margin: auto; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); }
.editor::backdrop { background: rgba(10,16,34,.5); }
.editor:focus { outline: none; }
.editor-form { display: flex; flex-direction: column; height: 100%; }
.editor-head { display: grid; grid-template-columns: 76px 1fr 76px; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.editor-head h2 { margin: 0; color: var(--strong); font-size: 17px; text-align: center; }
.editor-cancel { min-height: 44px; border: 0; background: none; color: var(--muted); font-size: 16px; text-align: left; }
.editor-submit { min-height: 40px; border: 0; border-radius: 999px; background: var(--fill); color: var(--onfill); font-size: 15px; font-weight: 800; }
.editor-submit:disabled, .editor-cancel:disabled { opacity: .5; }
.editor-body { display: flex; flex: 1; flex-direction: column; gap: 12px; min-height: 0; padding: 14px 16px calc(16px + env(safe-area-inset-bottom)); overflow-y: auto; }
.editor-body > * { flex: none; }
.editor-message { margin: 0; color: var(--alert); font-size: 15px; }
.editor-message:empty, .editor-hint:empty { display: none; }
.editor-reference { margin: 0; color: var(--accent); font-size: 16px; font-weight: 800; text-align: center; }
.editor-verse-preview { margin: 0; padding: 10px 14px; border-left: 3px solid var(--fill); background: var(--paper2); color: var(--ink-soft); font-family: var(--reader-serif); font-size: 15px; line-height: 1.7; }
/* 말씀 카드: 둥근 말풍선 모양 인용구. 특이성을 올려서 .feed-post .post-body 캐스케이드를 확실히 덮는다 */
.feed-post .post-body.post-body-verse-card {
  margin: 14px 0;
  padding: 16px 20px;
  border: 0;
  border-radius: 20px;
  background: var(--paper2);
  color: var(--ink);
  font-family: var(--reader-serif);
}
.feed-post .post-body.post-body-verse-card::before { content: "“"; margin-right: 2px; color: var(--accent); }
.feed-post .post-body.post-body-verse-card::after { content: "”"; margin-left: 2px; color: var(--accent); }
.editor-types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.editor-type { min-height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-size: 15px; }
.editor-type[aria-pressed="true"] { border-color: var(--fill); background: var(--fill); color: var(--onfill); font-weight: 800; }
.editor-body > .editor-text { flex: 1 0 140px; width: 100%; padding: 4px 2px; border: 0; background: transparent; color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.7; resize: none; outline: none; }
.editor-text:focus-visible { outline: none; }
.editor-input { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); }
.editor-preview { width: 100%; max-height: 180px; border-radius: 12px; object-fit: contain; }
.editor-photo { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; }
.editor-photo-button { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--strong); font-size: 15px; font-weight: 700; cursor: pointer; }
.editor-file { position: absolute; inset: 0; width: 100%; opacity: 0; }
.editor-remove { min-height: 44px; border: 0; background: none; color: var(--muted); font-size: 15px; }
.editor-hint { margin: 0; color: var(--muted); font-size: 13px; text-align: right; }
@media (max-width: 899px) {
  .editor { top: var(--visible-top, 0px); bottom: auto; left: 0; right: 0; width: 100%; height: var(--visible-height, 100dvh); margin: 0; border: 0; border-radius: 0; }
  .editor-head { padding-top: calc(10px + env(safe-area-inset-top)); }
}
.reader-content .scripture-paragraph .verse { word-break: normal; text-align: justify; }

/* 통독 일정 머리: 다른 머리와 똑같고, 기간·완료 수·진행 막대만 얹는다 */
.hero .plan-track { bottom: 12px; }
@media (min-width: 481px) { .hero .plan-track, .hero .plan-period, .hero .plan-count { right: 28px; } }

/* 단추 옆 메뉴 */
.popover { position: fixed; inset: auto; margin: 0; padding: 0; max-width: calc(100vw - 24px); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); box-shadow: 0 12px 36px rgba(10,16,34,.22); }
.popover[open] { display: flex; flex-direction: column; }
.popover::backdrop { background: transparent; }
.popover:focus { outline: none; }
.popover-body { position: relative; min-height: 0; padding: 6px; overflow-y: auto; }
.menu-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 9px; background: none; color: var(--ink); font-size: 16px; text-align: left; }
.menu-item:hover { background: var(--paper2); }
.menu-item[aria-pressed="true"] { color: var(--strong); font-weight: 800; }
.menu-item.danger { color: var(--alert); font-weight: 700; }
.menu-note { margin: 8px 12px 10px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; word-break: keep-all; }
.popover .sheet-book { padding: 0 6px; }

/* 나눔 카드: 흔히 쓰는 SNS 배치 */
.post-top { display: flex; align-items: center; gap: 10px; padding: 0 16px; }
.post-face { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: var(--fill); color: var(--onfill); font-size: 15px; font-weight: 800; }
.post-who { display: grid; flex: 1; min-width: 0; }
.post-who strong { color: var(--ink); font-size: 15px; font-weight: 700; }
.post-who span { color: var(--muted); font-size: 13px; font-weight: 400; }
/* 작성자를 안 보여주는 카드("내가 나눈 글")는 타입 배지 + 시간을 한 줄로 */
.post-type-row { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
@media (max-width: 480px) { .hero .plan-track { left: 20px; right: 20px; } }

/* 영어 양쪽 맞춤: 낱말을 나눠 사이가 벌어지지 않게 */
.reader-content [lang="en"], .reader-content [lang="en"] .verse { -webkit-hyphens: auto; hyphens: auto; }
.reader-content .verse-alternate { text-align: justify; }

/* 통독 진행: 큰 원 */
.hero .plan-ring { position: absolute; z-index: 1; right: 20px; bottom: 18px; width: 78px; height: 78px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--onbrandbar) var(--done), var(--onbrandtrack) 0); }
.plan-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--brandbg); }
.plan-ring b { position: relative; color: var(--onbrand); font-size: 26px; font-weight: 800; line-height: 1; }
.plan-ring small { font-size: 14px; }
@media (min-width: 481px) { .hero .plan-ring { right: 28px; bottom: 24px; } }

/* 나눔마당·나의 기록: 레퍼런스의 흰색 헤더와 가벼운 사용자 정보 */
.hero.fellowship-hero,
.hero.profile-hero { color: #FFFFFF; }
.hero.fellowship-hero h1,
.hero.fellowship-hero .eyebrow,
.hero.profile-hero h1,
.hero.profile-hero .eyebrow,
.hero.profile-hero > p { color: #FFFFFF; }
.hero.profile-hero > p { margin-top: 12px; font-weight: 400; }
/* 한글의 시각적 시작점을 영문 소제목에 맞춘다. */
.hero.profile-hero h1 { padding-left: 2px; text-align: left; }
.hero.profile-hero .profile-identity {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  max-width: calc(100% - 120px);
  margin-top: 16px;
  padding-left: 2px;
  text-align: left;
  line-height: 1.5;
}
.profile-identity .profile-name { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.profile-identity .profile-cell {
  padding: 3px 10px;
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 400;
  overflow-wrap: anywhere;
}
.today-hero,
.today-hero .today-church,
.today-hero .today-hero-date,
.hero.plan-hero,
.hero.plan-hero h1,
.hero.plan-hero .eyebrow,
.hero.plan-hero .plan-period,
.hero.plan-hero .plan-ring b { color: #FFFFFF; }
.hero.profile-hero .secondary-button {
  background: #EC7848;
  border: 1px solid #F3936D;
  color: #FFFFFF;
  font-weight: 400;
}
