:root {
  color-scheme: light;
  --accent: #13a6a6;
  --accent-strong: #087f83;
  --warm: #ef8354;
  --ink: #24323d;
  --muted: #6f7d87;
  --canvas: #f3f6f7;
  --panel: #ffffff;
  --line: #dde5e8;
  --shadow: 0 12px 36px rgba(35, 51, 61, .10);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #55d0ca;
  --accent-strong: #7eddd7;
  --warm: #f29a73;
  --ink: #e8edef;
  --muted: #aab6bc;
  --canvas: #14191d;
  --panel: #1d2429;
  --line: #303a40;
  --shadow: 0 12px 36px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif; line-height: 1.7; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { color: inherit; font: inherit; }
body.search-open { overflow: hidden; }

/* The Live2D widget is intentionally desktop-only and should stay behind dialogs. */
#waifu { z-index: 900; }
@media (max-width: 899px) {
  #waifu { display: none !important; }
}

.reading-progress { position: fixed; z-index: 1100; top: 0; left: 0; width: 100%; height: 3px; background: var(--warm); transform: scaleX(0); transform-origin: left; }
.site-nav { position: fixed; z-index: 1000; top: 0; width: 100%; color: #fff; transition: background .25s, box-shadow .25s; }
.site-nav.is-scrolled, .page-kind-page .site-nav, .page-kind-section .site-nav, .page-kind-taxonomy .site-nav, .page-kind-term .site-nav { background: color-mix(in srgb, #17262d 88%, transparent); box-shadow: 0 6px 24px rgba(0,0,0,.14); backdrop-filter: blur(14px); }
.nav-inner { width: min(1180px, calc(100% - 40px)); min-height: 68px; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; }
.brand img { width: 38px; height: 38px; object-fit: cover; border: 2px solid rgba(255,255,255,.7); border-radius: 50%; }
.nav-links { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.nav-links > a, .nav-dropdown-toggle { position: relative; min-height: 68px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; line-height: 1; white-space: nowrap; }
.nav-links > a::after, .nav-dropdown-toggle::after { content: ""; position: absolute; right: 12px; bottom: 17px; left: 12px; height: 2px; background: #fff; transform: scaleX(0); transition: transform .2s; }
.nav-links > a:hover::after, .nav-links > a:focus-visible::after { transform: scaleX(1); }
.nav-dropdown { position: relative; display: flex; align-items: stretch; align-self: stretch; }
.nav-dropdown-toggle { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: inherit; }
.nav-dropdown-caret { width: 7px; height: 7px; margin-top: -3px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg); transform-origin: center; transition: transform .18s; }
.nav-dropdown-toggle:hover::after, .nav-dropdown:focus-within .nav-dropdown-toggle::after, .nav-dropdown.is-open .nav-dropdown-toggle::after { transform: scaleX(1); }
.nav-dropdown:hover .nav-dropdown-caret, .nav-dropdown:focus-within .nav-dropdown-caret, .nav-dropdown.is-open .nav-dropdown-caret { margin-top: 3px; transform: rotate(225deg); }
.nav-dropdown-menu { position: absolute; top: 100%; left: 50%; min-width: 138px; padding: 8px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(23,38,45,.96); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translate(-50%, 8px); transition: opacity .18s, transform .18s, visibility .18s; visibility: hidden; }
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu, .nav-dropdown.is-open .nav-dropdown-menu { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); visibility: visible; }
.nav-dropdown-menu a { display: block; padding: 8px 10px; border-radius: 4px; white-space: nowrap; }
.nav-dropdown-menu a::after { display: none; }
.nav-dropdown-menu a:hover, .nav-dropdown-menu a:focus-visible { outline: 0; background: rgba(255,255,255,.12); }
.theme-toggle, .search-toggle, .music-toggle, .random-toggle, .nav-toggle { width: 38px; height: 38px; padding: 0; border: 1px solid rgba(255,255,255,.36); border-radius: 50%; background: rgba(255,255,255,.12); cursor: pointer; }
.theme-toggle, .search-toggle, .music-toggle, .random-toggle { align-self: center; flex: 0 0 auto; }
.search-toggle, .music-toggle, .random-toggle { display: grid; place-items: center; }
.music-toggle { font-size: 19px; line-height: 1; }
.random-toggle { font-size: 18px; line-height: 1; }
.random-toggle:disabled { cursor: wait; opacity: .65; }
.search-icon { position: relative; display: block; flex: 0 0 18px; width: 18px; height: 18px; }
.search-icon::before { content: ""; position: absolute; top: 1px; left: 1px; width: 9px; height: 9px; border: 2px solid currentColor; border-radius: 50%; }
.search-icon::after { content: ""; position: absolute; right: 1px; bottom: 3px; width: 7px; height: 2px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.nav-toggle { display: none; }

.search-dialog { position: fixed; z-index: 1200; inset: 0; display: grid; padding: 8vh 20px 20px; place-items: start center; }
.search-dialog[hidden] { display: none; }
.search-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: rgba(10, 18, 23, .7); backdrop-filter: blur(5px); cursor: default; }
.search-panel { position: relative; width: min(680px, 100%); max-height: min(760px, 84vh); overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.search-header { min-height: 74px; padding: 16px 20px 13px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.search-header span { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.search-header h2 { margin: 0; font-size: 21px; letter-spacing: 0; }
.search-close { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: var(--canvas); color: var(--muted); font-size: 27px; line-height: 1; cursor: pointer; }
.search-field { min-height: 52px; margin: 18px 24px 0; padding: 0 15px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); }
.search-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 16%, transparent); }
.search-field > span { color: var(--accent-strong); }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.search-field input::placeholder { color: var(--muted); }
.search-status { margin: 10px 24px; color: var(--muted); font-size: 12px; }
.search-results { min-height: 76px; overflow-y: auto; padding: 0 12px 14px; }
.search-result { display: block; padding: 14px 12px; border-top: 1px solid var(--line); border-radius: 5px; }
.search-result:hover, .search-result:focus-visible { outline: 0; background: var(--canvas); }
.search-result h3 { margin: 0 0 3px; font-size: 17px; line-height: 1.45; letter-spacing: 0; }
.search-result-meta { color: var(--accent-strong); font-size: 11px; }
.search-result p { margin: 5px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.search-result mark { padding: 0 2px; border-radius: 2px; background: color-mix(in srgb, var(--warm) 35%, transparent); color: inherit; }

.music-panel { position: fixed; z-index: 1150; right: 24px; bottom: 24px; width: min(330px, calc(100% - 24px)); overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); box-shadow: 0 12px 32px rgba(0,0,0,.22); }
.music-panel[hidden] { display: none; }
.music-panel-header { min-height: 52px; padding: 8px 10px 8px 14px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.music-panel-header span { display: block; color: var(--warm); font-size: 8px; font-weight: 800; letter-spacing: 1.2px; line-height: 1.3; }
.music-panel-header h2 { margin: 1px 0 0; font-size: 16px; line-height: 1.25; letter-spacing: 0; }
.music-actions { display: flex; gap: 5px; }
.music-stop, .music-close { display: grid; width: 27px; height: 27px; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: var(--canvas); color: var(--muted); box-shadow: none; cursor: pointer; }
.music-stop { font-size: 10px; }
.music-close { font-size: 18px; line-height: .7; }
.music-stop:hover, .music-close:hover, .music-stop:focus-visible, .music-close:focus-visible { outline: 0; border-color: var(--accent); color: var(--accent-strong); background: color-mix(in srgb, var(--accent) 10%, var(--canvas)); }
.music-frame-slot { height: 110px; background: #fff; }
.music-frame-slot iframe { display: block; width: 100%; height: 110px; border: 0; }

.hero, .subhero, .article-hero { position: relative; display: grid; place-items: center; overflow: hidden; color: #fff; background-position: center; background-size: cover; }
.hero { min-height: min(82vh, 780px); isolation: isolate; }
.hero-backgrounds, .hero-background { position: absolute; inset: 0; }
.hero-background { opacity: 0; background-position: center; background-size: cover; transition: opacity 1s ease-in-out; }
.hero-background.is-active { opacity: 1; }
.hero-shade { z-index: 1; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,23,31,.25), rgba(8,23,31,.58)); }
.hero-content { z-index: 2; position: relative; width: min(900px, calc(100% - 40px)); text-align: center; }
.hero-kicker, .subhero p { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: 2px; }
.hero h1 { margin: 0; font-size: clamp(42px, 7vw, 76px); line-height: 1.15; letter-spacing: 0; text-shadow: 0 4px 30px rgba(0,0,0,.25); }
.hero-content > p:not(.hero-kicker) { margin: 15px 0 0; font-size: 18px; }
.hero-scroll { display: grid; width: 44px; height: 44px; margin: 20px auto 0; padding-bottom: 7px; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; font-size: 30px; line-height: 1; }

.page-shell { width: min(1180px, calc(100% - 40px)); margin: -42px auto 80px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 28px; align-items: start; }
.compact-shell { margin-top: 42px; }
.section-heading { min-height: 76px; margin-bottom: 18px; padding: 18px 22px; display: flex; align-items: center; justify-content: space-between; border-radius: 6px; background: var(--panel); box-shadow: var(--shadow); }
.section-heading span { color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: 1.4px; }
.section-heading h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
.section-heading > a { color: var(--accent-strong); font-size: 13px; }

.morning-report { overflow: hidden; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: var(--shadow); }
.morning-report[hidden] { display: none; }
.morning-report-heading { min-height: 78px; padding: 17px 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.morning-report-heading span { color: var(--warm); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.morning-report-heading h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
.morning-report-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.morning-report-loading { min-height: 150px; display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); font-size: 13px; }
.morning-report-spinner { width: 18px; height: 18px; border: 2px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: morning-spin .7s linear infinite; }
.morning-report-error { min-height: 150px; padding: 24px; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); font-size: 13px; text-align: center; }
.morning-report-retry { min-width: 72px; min-height: 34px; padding: 0 13px; border: 1px solid var(--accent); border-radius: 4px; background: transparent; color: var(--accent-strong); cursor: pointer; font: inherit; }
.morning-report-retry:hover { background: color-mix(in srgb, var(--accent) 9%, transparent); }
.morning-report-content { padding: 20px 22px 17px; }
.morning-section-label { margin-bottom: 13px; display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.morning-section-label span { font-size: 15px; font-weight: 700; }
.morning-section-label small { color: var(--muted); font-size: 11px; }
.morning-airing-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.morning-airing-item { min-width: 0; min-height: 82px; padding: 8px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); transition: border-color .2s, transform .2s; }
.morning-airing-item:hover { border-color: var(--accent); transform: translateY(-2px); }
.morning-airing-item img { width: 46px; height: 62px; flex: 0 0 46px; border-radius: 4px; object-fit: cover; background: var(--line); }
.morning-airing-details { min-width: 0; display: grid; gap: 3px; }
.morning-airing-details strong { overflow: hidden; font-size: 13px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.morning-airing-details small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.morning-quote { min-height: 116px; margin: 20px 0 0; padding: 11px 14px; border-left: 3px solid var(--warm); background: color-mix(in srgb, var(--warm) 8%, var(--canvas)); color: var(--muted); font-size: 13px; line-height: 1.7; }
.morning-quote-label { display: block; margin-bottom: 5px; color: var(--warm); font-size: 9px; font-weight: 800; letter-spacing: 1.25px; }
.morning-quote p { min-height: 3.4em; margin: 0; }
.morning-quote.is-typing .morning-quote-text::after { width: 1px; height: 1em; margin-left: 3px; display: inline-block; background: var(--accent-strong); vertical-align: -.12em; animation: quote-caret .85s step-end infinite; content: ""; }
.morning-quote footer { min-height: 1.7em; margin-top: 3px; color: var(--accent-strong); font-size: 11px; }
.morning-report-footer { margin-top: 18px; padding-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); }
.morning-report-footer span { color: var(--muted); font-size: 11px; }
.morning-report-footer a { color: var(--accent-strong); font-size: 12px; font-weight: 700; }

.reading-list { overflow: hidden; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: var(--shadow); }
.reading-list-heading { min-height: 76px; padding: 16px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.reading-list-heading span { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.reading-list-heading h2 { margin: 0; font-size: 22px; letter-spacing: 0; }
.reading-list-heading small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.reading-list-content { padding: 8px 22px; }
.reading-list-empty { margin: 11px 0; color: var(--muted); font-size: 13px; }
.reading-list-item { min-width: 0; padding: 12px 0; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); }
.reading-list-item:first-child { border-top: 0; }
.reading-list-item a { min-width: 0; flex: 1; display: grid; gap: 2px; }
.reading-list-item strong { overflow: hidden; font-size: 14px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.reading-list-item a:hover strong { color: var(--accent-strong); }
.reading-list-item span { color: var(--muted); font-size: 11px; }
.reading-list-remove { width: 28px; height: 28px; flex: 0 0 28px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--muted); font-size: 21px; line-height: 1; cursor: pointer; }
.reading-list-remove:hover, .reading-list-remove:focus-visible { outline: 0; border-color: var(--warm); background: color-mix(in srgb, var(--warm) 9%, transparent); color: var(--warm); }

.weekly-summary { overflow: hidden; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: var(--shadow); }
.weekly-summary-heading { min-height: 72px; padding: 15px 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.weekly-summary-heading span, .quote-archive-heading span { display: block; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.weekly-summary-heading h2, .quote-archive-heading h2 { margin: 0; font-size: 21px; letter-spacing: 0; }
.weekly-summary-heading small { color: var(--muted); font-size: 11px; }
.weekly-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.weekly-summary-grid > div { min-width: 0; padding: 17px 13px; text-align: center; }
.weekly-summary-grid > div + div { border-left: 1px solid var(--line); }
.weekly-summary-grid strong, .weekly-summary-grid span { display: block; }
.weekly-summary-grid strong { color: var(--accent-strong); font-size: 23px; line-height: 1.15; }
.weekly-summary-grid span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.weekly-summary > p { margin: 0; padding: 9px 22px 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }

.quote-archive { padding: clamp(24px, 5vw, 48px); }
.quote-archive-heading { padding-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.quote-month-picker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.quote-month-picker input { min-height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--canvas); color: var(--ink); }
.quote-archive-intro { margin: 18px 0 24px; color: var(--muted); font-size: 14px; }
.quote-archive-intro > :first-child { margin-top: 0; }
.quote-archive-intro > :last-child { margin-bottom: 0; }
.quote-archive-day { padding: 18px 0; border-top: 1px solid var(--line); }
.quote-archive-day h3 { margin: 0 0 13px; color: var(--accent-strong); font-size: 15px; letter-spacing: 0; }
.quote-archive-day ol { margin: 0; padding-left: 23px; }
.quote-archive-day li { padding-left: 4px; color: var(--muted); }
.quote-archive-day li + li { margin-top: 11px; }
.quote-archive-day p { margin: 0; font-size: 14px; }
.quote-archive-day span { color: var(--accent-strong); font-size: 11px; }
.quote-archive-loading, .quote-archive-empty { margin: 0; padding: 38px 0 14px; color: var(--muted); text-align: center; font-size: 13px; }

@keyframes morning-spin { to { transform: rotate(360deg); } }
@keyframes quote-caret { 50% { opacity: 0; } }

.post-card, .profile-panel, .side-panel, .article-panel, .toc-panel, .empty-state { overflow: hidden; margin-bottom: 24px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: var(--shadow); }
.post-card { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 220px; transition: transform .2s, box-shadow .2s; }
.post-card.has-cover { grid-template-columns: 210px minmax(0, 1fr); }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 16px 42px rgba(35, 51, 61, .14); }
.post-cover { min-height: 220px; overflow: hidden; }
.post-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.post-card:hover .post-cover img { transform: scale(1.04); }
.post-card-body { padding: 25px 28px; }
.post-meta, .article-meta { display: flex; gap: 18px; color: var(--muted); font-size: 12px; }
.post-meta { flex-wrap: wrap; }
.post-meta .category-link { color: var(--accent-strong); font-weight: 700; }
.post-card h2 { margin: 8px 0 8px; font-size: 25px; line-height: 1.4; letter-spacing: 0; }
.post-card h2 a:hover { color: var(--accent-strong); }
.post-card p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.post-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-row a, .tag-row span { color: var(--accent-strong); font-size: 12px; }
.article-hero .tag-row a { padding: 3px 9px; border: 1px solid rgba(255,255,255,.5); border-radius: 999px; background: rgba(8,23,31,.28); color: #fff; }
.read-more { color: var(--accent-strong); white-space: nowrap; font-size: 13px; font-weight: 700; }

.sidebar { position: sticky; top: 92px; }
.profile-panel { text-align: center; }
.profile-cover { height: 86px; background: linear-gradient(120deg, #0f8589, #3db2ad 58%, #ef8354); }
.profile-avatar { width: 92px; height: 92px; margin: -48px auto 10px; object-fit: cover; border: 5px solid var(--panel); border-radius: 50%; }
.profile-panel h2 { margin: 0; font-size: 20px; letter-spacing: 0; }
.profile-panel > p { margin: 5px 22px 20px; color: var(--muted); font-size: 13px; }
.site-stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.site-stats a { padding: 14px 5px; }
.site-stats a + a { border-left: 1px solid var(--line); }
.site-stats strong, .site-stats span { display: block; }
.site-stats strong { color: var(--accent-strong); font-size: 18px; }
.site-stats span { color: var(--muted); font-size: 11px; }
.side-panel { padding: 20px; }
.side-panel h2, .toc-panel h2 { margin: 0 0 14px; font-size: 16px; letter-spacing: 0; }
.recent-list a { display: flex; justify-content: space-between; gap: 15px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; }
.recent-list time { color: var(--muted); white-space: nowrap; }
.site-status-heading { margin-bottom: 13px; }
.site-status-heading span { display: block; color: var(--warm); font-size: 9px; font-weight: 800; letter-spacing: 1.25px; }
.site-status-heading h2 { margin: 0; }
.site-status-list { margin: 0; }
.site-status-list > div { min-height: 34px; padding: 7px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }
.site-status-list dt { color: var(--muted); font-size: 12px; }
.site-status-list dd { margin: 0; color: var(--accent-strong); font-size: 12px; font-weight: 700; text-align: right; }

.subhero { min-height: 330px; text-align: center; }
.subhero > div:not(.hero-shade) { z-index: 2; position: relative; }
.subhero h1 { margin: 0; font-size: 42px; letter-spacing: 0; }
.subhero span { color: rgba(255,255,255,.8); font-size: 13px; }
.article-hero { min-height: 480px; padding: 120px 20px 70px; align-items: end; }
.article-hero-content { z-index: 2; position: relative; width: min(920px, 100%); }
.article-hero h1 { max-width: 850px; margin: 12px 0; font-size: clamp(36px, 6vw, 62px); line-height: 1.22; letter-spacing: 0; }
.article-meta { color: rgba(255,255,255,.82); }
.article-shell { width: min(1040px, calc(100% - 40px)); margin: -34px auto 80px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 26px; align-items: start; }
.article-panel { padding: clamp(25px, 5vw, 56px); }
.article-tools { margin: 0 0 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.save-article { min-height: 38px; padding: 7px 12px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 5px; background: var(--canvas); color: var(--accent-strong); font-size: 13px; font-weight: 700; cursor: pointer; }
.save-article:hover, .save-article:focus-visible { outline: 0; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--canvas)); }
.save-article.is-saved { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--canvas)); }
.save-article-icon { width: 12px; height: 16px; display: block; border: 2px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }
.save-article.is-saved .save-article-icon { background: currentColor; }
.article-tools { display: flex; flex-wrap: wrap; gap: 9px; }
.like-article { min-height: 38px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--canvas); color: var(--muted); font-size: 13px; font-weight: 700; cursor: pointer; }
.like-article:hover, .like-article:focus-visible, .like-article.is-liked { outline: 0; border-color: var(--warm); background: color-mix(in srgb, var(--warm) 10%, var(--canvas)); color: var(--warm); }
.like-article-icon { font-size: 17px; line-height: 1; }
.like-article-count { min-width: 1ch; color: currentColor; font-size: 12px; }
.article-content { font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: 17px; line-height: 1.9; }
.article-content h2, .article-content h3 { margin-top: 2em; font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif; letter-spacing: 0; }
.article-content h2 { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.article-content a { color: var(--accent-strong); border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.article-content img { margin: 28px auto; border-radius: 6px; box-shadow: var(--shadow); }
.article-content blockquote { margin: 24px 0; padding: 14px 20px; border-left: 4px solid var(--accent); background: var(--canvas); color: var(--muted); }
.article-content pre { overflow: auto; padding: 20px; border-radius: 6px; background: #172027; color: #e8edf0; }
.article-content code { font-size: .88em; }
.tafei-player { margin: -8px 0 22px; }
.tafei-player-button { min-height: 32px; padding: 5px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--canvas); color: var(--accent-strong); font-size: 13px; cursor: pointer; }
.tafei-player-button:hover, .tafei-player-button:focus-visible { outline: 0; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--canvas)); }
.tafei-player-button.is-playing { border-color: var(--warm); color: var(--warm); }
.tafei-player-icon { width: 1em; text-align: center; font-size: 12px; line-height: 1; }
.tafei-player audio { display: none; }
.article-end { margin-top: 50px; padding-top: 22px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.related-posts { margin-top: 38px; padding-top: 27px; border-top: 1px solid var(--line); }
.related-posts-heading { margin-bottom: 12px; }
.related-posts-heading span { display: block; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.related-posts-heading h2 { margin: 0; font-size: 19px; letter-spacing: 0; }
.related-posts-list { border-top: 1px solid var(--line); }
.related-post { min-width: 0; padding: 13px 0; display: grid; grid-template-columns: 88px minmax(0, 1fr); column-gap: 14px; border-bottom: 1px solid var(--line); }
.related-post time { grid-row: span 2; color: var(--muted); font-size: 11px; }
.related-post strong { overflow: hidden; font-size: 14px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.related-post span { overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.related-post:hover strong, .related-post:focus-visible strong { color: var(--accent-strong); }
.comments-panel { margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
.comments-panel .giscus, .comments-panel .giscus-frame { width: 100%; }
.comments-panel .giscus-frame { display: block; border: 0; }
.toc-panel { position: sticky; top: 92px; padding: 20px; font-size: 13px; }
.toc-panel ul { margin: 0; padding-left: 18px; }
.toc-panel a { color: var(--muted); }
.empty-state { padding: 50px; text-align: center; color: var(--muted); }
.taxonomy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.taxonomy-card { min-height: 112px; padding: 24px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: var(--shadow); transition: transform .2s, border-color .2s; }
.taxonomy-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.taxonomy-card span { font-size: 20px; font-weight: 700; }
.taxonomy-card small, .tag-chip small { color: var(--muted); white-space: nowrap; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 12px; }
.tag-chip { min-height: 42px; padding: 9px 14px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); box-shadow: 0 5px 16px rgba(35, 51, 61, .07); }
.tag-chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.taxonomy-heading { margin-bottom: 24px; }
.changelog-panel { padding: clamp(25px, 5vw, 52px); }
.changelog-content > p:first-child { margin: 0 0 34px; color: var(--muted); font-size: 16px; }
.changelog-content > h2 { position: relative; margin: 0; padding: 0 0 8px 28px; border-bottom: 1px solid var(--line); color: var(--accent-strong); font-size: 16px; letter-spacing: 0; }
.changelog-content > h2:not(:first-of-type) { margin-top: 44px; }
.changelog-content > h2::before { position: absolute; top: 7px; left: 0; width: 11px; height: 11px; border: 3px solid var(--panel); border-radius: 50%; background: var(--warm); box-shadow: 0 0 0 1px var(--warm); content: ""; }
.changelog-content > h2::after { position: absolute; top: 20px; bottom: -45px; left: 5px; width: 1px; background: var(--line); content: ""; }
.changelog-content > h2:last-of-type::after { display: none; }
.changelog-content h3 { margin: 26px 0 8px 28px; font-size: 20px; letter-spacing: 0; }
.changelog-content ul { margin: 0 0 21px 28px; padding-left: 19px; color: var(--muted); }
.changelog-content li + li { margin-top: 7px; }
.changelog-content h3 + ul + h3 { color: var(--accent-strong); font-size: 13px; }
.changelog-content h3 + ul + h3 + p { margin: 0 0 0 28px; color: var(--muted); font-size: 12px; }
.changelog-content code { padding: 2px 5px; border: 1px solid var(--line); border-radius: 3px; background: var(--canvas); color: var(--accent-strong); font-family: "Cascadia Code", Consolas, monospace; font-size: .85em; }

.pomodoro-shell { grid-template-columns: 1fr; }
.pomodoro-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); box-shadow: var(--shadow); }
.pomodoro-heading { min-height: 88px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); }
.pomodoro-heading span, .pomodoro-card-heading span, .pomodoro-history-heading span { display: block; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.pomodoro-heading h2, .pomodoro-card-heading h3, .pomodoro-history-heading h3 { margin: 0; letter-spacing: 0; }
.pomodoro-heading h2 { font-size: 24px; }
.pomodoro-intro { max-width: 560px; color: var(--muted); font-size: 14px; }
.pomodoro-intro > :first-child { margin-top: 0; }
.pomodoro-intro > :last-child { margin-bottom: 0; }
.pomodoro-workspace { padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
.pomodoro-timer-card, .pomodoro-side-card, .pomodoro-history { border: 1px solid var(--line); border-radius: 7px; background: var(--canvas); }
.pomodoro-timer-card { padding: clamp(22px, 4vw, 38px); display: grid; justify-items: center; gap: 22px; }
.pomodoro-mode-tabs { width: min(420px, 100%); padding: 4px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); }
.pomodoro-mode-tabs button { min-height: 36px; padding: 5px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 700; }
.pomodoro-mode-tabs button:hover, .pomodoro-mode-tabs button:focus-visible, .pomodoro-mode-tabs button.is-active { outline: 0; background: color-mix(in srgb, var(--accent) 13%, var(--panel)); color: var(--accent-strong); }
.pomodoro-dial { width: min(330px, 74vw); aspect-ratio: 1; padding: 14px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--accent) calc(var(--progress) * 1turn), color-mix(in srgb, var(--line) 76%, transparent) 0); box-shadow: inset 0 0 0 1px var(--line); }
.pomodoro-dial::before { grid-area: 1 / 1; width: calc(100% - 28px); aspect-ratio: 1; border-radius: 50%; background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); content: ""; }
.pomodoro-dial span, .pomodoro-dial small { z-index: 1; grid-area: 1 / 1; display: block; text-align: center; }
.pomodoro-dial span { align-self: center; color: var(--accent-strong); font-size: clamp(46px, 9vw, 74px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.pomodoro-dial small { align-self: end; margin-bottom: 26%; color: var(--muted); font-size: 13px; }
.pomodoro-task-field { width: min(560px, 100%); display: grid; gap: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.pomodoro-task-field input { min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); color: var(--ink); font-size: 15px; font-weight: 400; outline: 0; }
.pomodoro-task-field input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.pomodoro-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pomodoro-actions button, .pomodoro-history-actions button { min-height: 38px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--accent-strong); cursor: pointer; font-size: 13px; font-weight: 700; }
.pomodoro-actions button:hover, .pomodoro-actions button:focus-visible, .pomodoro-history-actions button:hover, .pomodoro-history-actions button:focus-visible { outline: 0; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); }
.pomodoro-actions .pomodoro-primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.pomodoro-actions button:disabled { cursor: not-allowed; opacity: .45; }
.pomodoro-side-card { overflow: hidden; display: grid; align-content: start; background: var(--panel); }
.pomodoro-settings, .pomodoro-stats { padding: 20px; }
.pomodoro-stats { border-top: 1px solid var(--line); }
.pomodoro-card-heading { margin-bottom: 15px; }
.pomodoro-card-heading h3 { font-size: 18px; }
.pomodoro-setting-grid { display: grid; gap: 10px; }
.pomodoro-setting-grid label { min-height: 44px; padding: 8px 10px; display: grid; grid-template-columns: 1fr 76px auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--canvas); color: var(--muted); font-size: 13px; }
.pomodoro-setting-grid input { width: 76px; min-height: 30px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--panel); color: var(--ink); text-align: right; }
.pomodoro-setting-grid small { color: var(--muted); font-size: 11px; }
.pomodoro-sound-toggle { margin-top: 13px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.pomodoro-sound-toggle input { accent-color: var(--accent); }
.pomodoro-stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.pomodoro-stat-grid div { padding: 16px 10px; text-align: center; background: var(--canvas); }
.pomodoro-stat-grid div:nth-child(even) { border-left: 1px solid var(--line); }
.pomodoro-stat-grid div:nth-child(n+3) { border-top: 1px solid var(--line); }
.pomodoro-stat-grid strong, .pomodoro-stat-grid span { display: block; }
.pomodoro-stat-grid strong { color: var(--accent-strong); font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pomodoro-stat-grid span { margin-top: 5px; color: var(--muted); font-size: 11px; }
.pomodoro-history { margin: 0 24px 24px; background: var(--panel); }
.pomodoro-history-heading { min-height: 72px; padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.pomodoro-history-heading h3 { font-size: 20px; }
.pomodoro-history-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pomodoro-records { padding: 6px 20px 12px; }
.pomodoro-empty { margin: 0; padding: 28px 0; color: var(--muted); text-align: center; font-size: 13px; }
.pomodoro-record { min-height: 58px; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); }
.pomodoro-record:first-child { border-top: 0; }
.pomodoro-record div { min-width: 0; display: grid; gap: 2px; }
.pomodoro-record strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.pomodoro-record span { color: var(--muted); font-size: 12px; }
.pomodoro-record button { width: 30px; height: 30px; flex: 0 0 30px; padding: 0; border: 1px solid var(--line); border-radius: 4px; background: var(--canvas); color: var(--muted); font-size: 21px; line-height: 1; cursor: pointer; }
.pomodoro-record button:hover, .pomodoro-record button:focus-visible { outline: 0; border-color: var(--warm); background: color-mix(in srgb, var(--warm) 10%, var(--canvas)); color: var(--warm); }

.site-footer { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 88%, var(--canvas)); color: var(--muted); font-size: 12px; }
.footer-inner { width: min(1180px, calc(100% - 40px)); min-height: 96px; margin: auto; padding: 18px 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; }
.footer-brand { color: var(--ink); font-weight: 650; }
.footer-visit { display: inline-flex; align-items: baseline; gap: 7px; min-height: 34px; padding: 5px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--canvas); }
.footer-visit strong { color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.footer-links { display: flex; align-items: center; justify-content: flex-end; gap: 16px; min-width: 0; }
.footer-credit { white-space: nowrap; }
.footer-icp { display: inline-flex; align-items: center; min-height: 32px; padding: 4px 11px; border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--line)); border-radius: 999px; background: color-mix(in srgb, var(--accent) 8%, var(--panel)); color: var(--accent-strong); font-weight: 700; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s, transform .2s; }
.footer-icp:hover, .footer-icp:focus-visible { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 15%, var(--panel)); outline: 0; transform: translateY(-1px); }
.site-visit-count { color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.back-to-top { position: fixed; z-index: 900; right: 24px; bottom: 24px; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--accent); color: #fff; box-shadow: var(--shadow); cursor: pointer; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .2s; }
.back-to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 60px; right: 20px; display: none; width: 210px; padding: 10px; grid-template-columns: repeat(4, 38px); align-items: center; justify-content: start; column-gap: 8px; row-gap: 2px; border: 1px solid rgba(255,255,255,.18); border-radius: 7px; background: rgba(23,38,45,.96); box-shadow: var(--shadow); }
  .nav-links.is-open { display: grid; }
  .nav-links > a { grid-column: 1 / -1; min-height: 40px; justify-content: flex-start; padding: 0 12px; }
  .nav-links > a::after { display: none; }
  .nav-dropdown { grid-column: 1 / -1; width: 100%; }
  .nav-dropdown-toggle { width: 100%; min-height: 40px; justify-content: space-between; padding: 0 12px; }
  .nav-dropdown-toggle::after { display: none; }
  .nav-dropdown-caret { margin-top: -3px; }
  .nav-dropdown-menu { position: static; min-width: 0; margin: 0 0 4px; padding: 4px; display: none; border: 0; background: rgba(255,255,255,.08); box-shadow: none; opacity: 1; pointer-events: auto; transform: none; transition: none; visibility: visible; }
  .nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu, .nav-dropdown.is-open .nav-dropdown-menu { transform: none; }
  .nav-dropdown.is-open .nav-dropdown-menu { display: grid; }
  .nav-dropdown-menu a { padding: 8px 12px; }
  .theme-toggle, .search-toggle, .music-toggle, .random-toggle { margin: 6px 0; justify-self: center; }
  .page-shell, .article-shell { grid-template-columns: 1fr; }
  .pomodoro-workspace { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .toc-panel { position: static; grid-row: 1; }
}

@media (max-width: 600px) {
  .nav-inner, .page-shell, .article-shell, .footer-inner { width: min(100% - 24px, 1180px); }
  .brand span { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { min-height: 74vh; }
  .hero h1 { font-size: 42px; }
  .page-shell { margin-top: -24px; }
  .post-card, .post-card.has-cover { grid-template-columns: 1fr; }
  .post-cover { min-height: 210px; max-height: 250px; }
  .post-card-body { padding: 22px; }
  .post-card h2 { font-size: 22px; }
  .morning-report-heading, .morning-report-footer { align-items: flex-start; flex-direction: column; }
  .morning-report-heading { gap: 2px; }
  .morning-airing-list { grid-template-columns: 1fr; }
  .weekly-summary-grid { grid-template-columns: 1fr; }
  .weekly-summary-grid > div + div { border-top: 1px solid var(--line); border-left: 0; }
  .quote-archive-heading { align-items: flex-start; flex-direction: column; }
  .post-card-footer, .footer-inner { align-items: flex-start; }
  .footer-inner { grid-template-columns: 1fr; padding: 20px 0; gap: 10px; }
  .footer-links { justify-content: flex-start; flex-wrap: wrap; gap: 10px 14px; }
  .article-hero { min-height: 420px; }
  .article-panel { padding: 24px 20px; }
  .related-post { grid-template-columns: 1fr; gap: 2px; }
  .related-post time { grid-row: auto; }
  .article-content { font-size: 16px; }
  .article-meta { display: flex; flex-wrap: wrap; gap: 8px; }
  .taxonomy-grid { grid-template-columns: 1fr; }
  .taxonomy-card { min-height: 96px; padding: 20px; }
  .changelog-panel { padding: 25px 20px; }
  .changelog-content > h2 { padding-left: 23px; }
  .changelog-content h3, .changelog-content ul, .changelog-content h3 + ul + h3 + p { margin-left: 23px; }
  .search-dialog { padding: 12px; align-items: start; }
  .search-panel { max-height: calc(100dvh - 24px); }
  .search-field { margin-right: 16px; margin-left: 16px; }
  .search-status { margin-right: 16px; margin-left: 16px; }
  .music-panel { right: 12px; bottom: 12px; }
  .pomodoro-heading, .pomodoro-history-heading { align-items: flex-start; flex-direction: column; }
  .pomodoro-workspace { padding: 16px; }
  .pomodoro-history { margin: 0 16px 16px; }
  .pomodoro-mode-tabs { grid-template-columns: 1fr; border-radius: 7px; }
  .pomodoro-mode-tabs button { border-radius: 5px; }
  .pomodoro-actions { width: 100%; display: grid; grid-template-columns: repeat(2, 1fr); }
  .pomodoro-actions button { width: 100%; }
  .pomodoro-setting-grid label { grid-template-columns: 1fr 68px auto; }
  .pomodoro-setting-grid input { width: 68px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .hero-background { transition: none; }
  .morning-quote.is-typing .morning-quote-text::after { display: none; }
}
