@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Serif+SC:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --ink: #24332c;
  --soft-ink: #6e7770;
  --paper: #e9e5d9;
  --line: #c9c8ba;
  --accent: #b79055;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #bf8e43; outline-offset: 4px; }

.page-shell { width: min(1320px, calc(100% - 72px)); margin: 0 auto; }
.site-header { height: 112px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 22px; font-weight: 600; letter-spacing: .08em; }
.brand-mark { color: #8c6e3b; font-size: 27px; font-weight: 400; line-height: 1; }
.about-link { color: #55655c; text-decoration: none; font-size: 13px; letter-spacing: .06em; display: flex; align-items: center; gap: 8px; transition: color .2s; }
.about-link:hover { color: #92723f; }
.header-nav { display: flex; align-items: center; gap: 27px; }
.nav-button { border: 0; padding: 8px 0; background: none; color: #55655c; cursor: pointer; font-size: 13px; letter-spacing: .06em; }
.nav-button:hover { color: #92723f; }
.eyebrow-row { display: flex; align-items: center; justify-content: space-between; padding: 34px 0 20px; gap: 16px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 11px; letter-spacing: .22em; font-weight: 700; color: #537061; }
.eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: #b89458; }
.date { color: #777e75; font-size: 12px; letter-spacing: .06em; }

.daily-card { display: grid; grid-template-columns: 46% 54%; min-height: 570px; background: #f5f2e9; box-shadow: 0 24px 50px rgba(37, 51, 41, .08); overflow: hidden; }
.card-copy { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; padding: 34px 41px 34px 45px; }
.card-topline, .card-bottomline { display: flex; align-items: center; gap: 12px; }
.card-bottomline { justify-content: flex-end; }
.card-kicker { font-size: 12px; font-weight: 600; letter-spacing: .15em; color: #53675a; }
.card-bottomline { color: #8a938a; font-size: 11px; letter-spacing: .10em; }
.quote-wrap { margin: 30px 0 32px; }
.quote-mark { display: block; color: #c3a578; font-family: Georgia, serif; font-size: 100px; line-height: .75; height: 65px; }
blockquote { margin: 0; max-width: 520px; font-family: 'Noto Serif SC', 'Songti SC', 'STSong', serif; font-size: clamp(27px, 2.8vw, 39px); font-weight: 500; line-height: 1.68; letter-spacing: .035em; text-wrap: pretty; overflow-wrap: anywhere; }
.quote-rule { width: 38px; height: 2px; background: #a8834b; margin: 31px 0 21px; }
.copy-button { border: 0; background: none; color: #3d5849; cursor: pointer; padding: 8px 0 8px 8px; font-size: 12px; letter-spacing: .04em; transition: color .2s; }
.copy-button:hover { color: #a48047; }
.copy-button span { font-size: 16px; margin-right: 4px; }
.card-image-wrap { position: relative; min-height: 570px; overflow: hidden; background: #173329; }
.card-image { display: block; width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: center; }
.card-image-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(12, 25, 20, .28), transparent 25%); pointer-events: none; }
.image-caption { position: absolute; bottom: 30px; right: 33px; z-index: 1; color: rgba(255,255,255,.76); font-size: 10px; letter-spacing: .19em; }
.below-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0 49px; border-bottom: 1px solid var(--line); }
.ritual-note, .next-note { margin: 0; color: #5a6b5f; font-size: 12px; letter-spacing: .02em; }
.ritual-note span { color: #b18f54; font-size: 20px; vertical-align: -2px; margin-right: 7px; }
.ritual-note #ritual-text { color: #5a6b5f; font-size: 12px; vertical-align: 0; margin: 0; }
.next-note { color: #8a9187; }
.page-actions { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.text-action { border: 0; padding: 9px 0; background: none; color: #486454; text-decoration: none; cursor: pointer; font-size: 12px; letter-spacing: .03em; }
.text-action:hover { color: #947242; }
.action-primary { font-weight: 700; }
.site-footer { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(300px, 2fr); gap: 55px; padding: 36px 0 55px; }
.footer-heading { display: flex; align-items: flex-start; gap: 14px; }
.footer-symbol { color: #9a7944; font-size: 23px; line-height: 1; }
.footer-heading strong { display: block; font-size: 13px; font-weight: 600; letter-spacing: .05em; }
.footer-heading p { margin: 8px 0 0; color: #7c857b; font-size: 12px; }
.source-note { margin: 0; max-width: 700px; color: #7c857b; font-size: 12px; line-height: 1.9; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; background: #243c2f; color: #fff; padding: 11px 18px; border-radius: 4px; font-size: 13px; transition: opacity .2s, transform .2s; z-index: 10; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.overlay-dialog { border: 1px solid #d0cbbd; padding: 30px; width: min(500px, calc(100% - 28px)); max-height: min(85vh, 900px); overflow: auto; background: #f5f2e9; color: var(--ink); box-shadow: 0 30px 80px rgba(9, 27, 16, .22); }
.overlay-dialog::backdrop { background: rgba(15, 35, 26, .63); backdrop-filter: blur(3px); }
.history-dialog { width: min(610px, calc(100% - 28px)); }
.poster-dialog { width: min(540px, calc(100% - 28px)); }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.dialog-eyebrow { display: block; color: #937947; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.dialog-head h2 { margin: 8px 0 0; font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 28px; font-weight: 500; }
.dialog-close { border: 0; background: none; color: #506458; cursor: pointer; font-size: 28px; line-height: 1; padding: 0 3px; }
.dialog-intro { color: #6f7a70; font-size: 13px; line-height: 1.8; margin: 20px 0 23px; }
.dialog-note { color: #967957; font-size: 12px; line-height: 1.6; }
.dialog-button { display: inline-block; width: 100%; border: 0; padding: 14px 18px; background: #284537; color: #fff; text-align: center; text-decoration: none; cursor: pointer; font-size: 13px; font-weight: 600; letter-spacing: .03em; }
.dialog-button:hover { background: #3c5c49; }
.history-list { display: grid; gap: 8px; }
.history-month { margin: 18px 0 6px; color: #928878; font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.history-item { display: grid; grid-template-columns: 76px 1fr; align-items: start; gap: 16px; width: 100%; border: 1px solid #dcd8cc; background: #faf8f1; padding: 15px; color: var(--ink); text-align: left; cursor: pointer; }
.history-item:hover { border-color: #9a855f; background: #fffdf8; }
.history-item time { color: #8d7856; font-size: 12px; font-weight: 700; }
.history-item span { font-family: 'Noto Serif SC', 'Songti SC', serif; font-size: 14px; line-height: 1.6; }
.poster-preview { display: block; width: min(300px, 100%); max-height: 50vh; object-fit: contain; margin: 0 auto 18px; box-shadow: 0 8px 25px rgba(32, 49, 37, .15); }

@media (max-width: 850px) {
  .page-shell { width: min(100% - 36px, 680px); }
  .site-header { height: 82px; }
  .brand { font-size: 19px; }
  .eyebrow-row { padding-top: 25px; }
  .daily-card { grid-template-columns: 1fr; }
  .card-image-wrap { grid-row: 1; min-height: 0; aspect-ratio: 16 / 9; }
  .card-copy { min-height: 420px; padding: 27px 30px 26px; }
  .quote-wrap { margin: 28px 0; }
  blockquote { font-size: clamp(26px, 5vw, 36px); }
  .site-footer { grid-template-columns: 1fr; gap: 22px; }
  .below-card { align-items: flex-start; flex-direction: column; gap: 11px; }
}

@media (max-width: 520px) {
  .page-shell { width: calc(100% - 28px); }
  .about-link { font-size: 12px; }
  .header-nav { gap: 15px; }
  .nav-button { font-size: 12px; }
  .date { font-size: 11px; }
  .eyebrow { font-size: 10px; letter-spacing: .14em; }
  .card-image-wrap { aspect-ratio: 4 / 3; }
  .card-image { object-position: 61% center; }
  .image-caption { right: 18px; bottom: 16px; font-size: 8px; }
  .card-copy { min-height: 430px; padding: 24px 22px; }
  .quote-mark { height: 54px; font-size: 78px; }
  blockquote { font-size: 28px; line-height: 1.65; }
  .below-card { align-items: flex-start; flex-direction: column; gap: 7px; padding: 20px 0 32px; }
  .site-footer { padding-bottom: 40px; }
  .page-actions { gap: 18px; }
  .overlay-dialog { padding: 22px; }
  .history-item { grid-template-columns: 62px 1fr; gap: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
