/* BE:FIRST NEWS — design tokens first; every component reads from them so light/dark stay in sync. */
:root{
 color-scheme:light;
 --bg:#f4f5f1;--surface:#fff;--surface-2:#eff2ec;--surface-3:#e7ece5;
 --ink:#15292a;--ink-2:#3c4d4b;--muted:#5d6c69;--line:#e0e5de;--line-strong:#ccd6ce;
 --accent:#17665b;--accent-ink:#0f5248;--accent-strong:#173e38;--accent-soft:#e2eee6;--on-accent:#fff;
 --warn:#a5431f;--warn-soft:#fcefe4;--warn-line:#efd6c2;
 --blue:#3f5f86;--blue-soft:#eaf0f7;--purple:#68548a;--purple-soft:#f0ecf6;
 --sat:#2e62a8;--sun:#b6402f;
 --shadow:0 1px 2px #12302a0d,0 4px 16px #12302a0a;
 --radius:16px;--radius-sm:10px;
 --header-h:64px;--tabbar-h:64px;
 --num:'Inter','BIZ UDPGothic',sans-serif;--jp:'BIZ UDPGothic','Hiragino Sans','Noto Sans JP',system-ui,sans-serif;
 font-family:var(--jp);color:var(--ink);font-synthesis:none
}
@media(prefers-color-scheme:dark){:root{
 color-scheme:dark;
 --bg:#0e1514;--surface:#16201e;--surface-2:#1c2826;--surface-3:#23312e;
 --ink:#e4ebe8;--ink-2:#c3cfcb;--muted:#97a8a3;--line:#283633;--line-strong:#364743;
 --accent:#62c3ab;--accent-ink:#7fd3be;--accent-strong:#1f4a43;--accent-soft:#1d3632;--on-accent:#fff;
 --warn:#f2a27c;--warn-soft:#2e211a;--warn-line:#4a3326;
 --blue:#9db8da;--blue-soft:#1d2836;--purple:#c2b0e0;--purple-soft:#272236;
 --sat:#8fb4ea;--sun:#f0907f;
 --shadow:0 1px 2px #0006;
}}

/* Base */
*{box-sizing:border-box}
html{scroll-behavior:smooth;scroll-padding-top:calc(var(--header-h) + 56px);-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);font-size:15px;line-height:1.75;-webkit-font-smoothing:antialiased;overflow-wrap:anywhere}
button,input,select{font:inherit;color:inherit}
button,a,input,select,summary{-webkit-tap-highlight-color:transparent}
button{cursor:pointer;border:0;background:none;padding:0}
button:disabled{cursor:default;opacity:.5}
a{color:inherit;text-decoration:none}
a,button{touch-action:manipulation}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:6px}
[tabindex="-1"]:focus{outline:none}
h1,h2,h3,p,figure{margin:0}
h1,h2,h3{line-height:1.45;letter-spacing:-.01em}
h1{font-size:28px;font-weight:800}
h2{font-size:19px;font-weight:700}
h3{font-size:16px;font-weight:700}
img{display:block;max-width:100%}
[hidden]{display:none!important}
svg.icon{width:20px;height:20px;display:block;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
button span[data-icon],a span[data-icon]{display:inline-flex}
.skip-link{position:fixed;top:-80px;left:12px;z-index:100;background:var(--accent-strong);color:#fff;padding:12px 20px;border-radius:10px}
.skip-link:focus{top:8px}

/* Header + navigation */
.site-header{height:var(--header-h);position:sticky;top:0;z-index:30;background:color-mix(in srgb,var(--bg) 88%,transparent);border-bottom:1px solid var(--line);backdrop-filter:saturate(1.4) blur(14px);-webkit-backdrop-filter:saturate(1.4) blur(14px)}
.header-inner{max-width:1120px;height:100%;margin:auto;padding:0 32px;display:flex;align-items:center;justify-content:space-between;gap:24px}
.brand{display:flex;align-items:baseline;gap:8px;flex-shrink:0;line-height:1}
.brand strong{font-family:var(--num);font-size:28px;font-weight:700;letter-spacing:-.02em;display:flex;align-items:baseline}
.brand-news{font-size:20px;margin-left:5px;color:var(--accent)}
.brand-dot{display:inline-block;width:6px;height:6px;background:var(--accent);border-radius:50%;margin-left:4px}
.brand-tag{font-size:11px;font-weight:600;color:var(--muted);border:1px solid var(--line-strong);border-radius:20px;padding:2px 8px;line-height:1.4;align-self:center}
.navigation{display:flex;gap:4px;align-items:center}
.navigation>a{position:relative;min-height:42px;padding:8px 14px;display:flex;gap:7px;align-items:center;color:var(--muted);font-weight:600;font-size:14px;border-radius:999px;white-space:nowrap;transition:background .15s,color .15s}
.navigation>a:hover{background:var(--surface-2);color:var(--ink)}
.navigation>a[aria-current=page]{background:var(--accent-strong);color:#fff}
.navigation svg{width:19px;height:19px}
.nav-count{font-family:var(--num);font-weight:600;display:grid;place-items:center;min-width:20px;height:20px;padding:0 6px;font-size:12px;line-height:1;background:var(--warn);color:#fff;border-radius:20px}
.navigation>a[aria-current=page] .nav-count{background:#fff;color:var(--accent-strong)}
#nav-saved{background:var(--surface-3);color:var(--ink-2)}

/* Page scaffolding */
main{max-width:1120px;padding:36px 32px 40px;margin:auto;min-height:80vh}
main:focus{outline:none}
.view{animation:arrive .22s ease-out}
.eyebrow{color:var(--accent-ink);font-size:12px;font-weight:700;letter-spacing:.08em;margin-bottom:4px}
.subtle{color:var(--muted);font-size:13px;margin-top:6px}
.page-heading,.home-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:24px}
.heading-number{font-family:var(--num);font-size:46px;font-weight:600;line-height:.9;text-align:right;color:var(--accent);flex-shrink:0}
.heading-number>span{display:block;font-family:var(--jp);font-size:12px;font-weight:600;color:var(--muted);margin-top:8px}
.home-date{text-align:right;flex-shrink:0;line-height:1}
.home-date strong{display:flex;align-items:baseline;justify-content:flex-end;gap:8px;font-family:var(--num);font-size:46px;font-weight:600;letter-spacing:-.01em}
.home-date strong small{font-family:var(--jp);font-size:13px;font-weight:700;color:var(--ink-2)}
.home-date>span{display:block;font-size:12px;color:var(--muted);margin-top:6px}
.update-line{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);margin-top:8px;flex-wrap:wrap}
.update-line i{width:7px;height:7px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.stale-notice{padding:12px 16px;background:var(--warn-soft);color:var(--warn);border-radius:var(--radius-sm);margin-bottom:16px;font-size:13px}

/* Shared atoms */
.label{font-size:12px;font-weight:600;border-radius:6px;background:var(--accent-soft);color:var(--accent-ink);padding:2px 8px;line-height:1.6;display:inline-block;white-space:nowrap;vertical-align:middle}
.label.orange{color:var(--warn);background:var(--warn-soft)}
.label.purple{color:var(--purple);background:var(--purple-soft)}
.label.blue{color:var(--blue);background:var(--blue-soft)}
.text-link{display:inline-flex;align-items:center;gap:4px;color:var(--accent-ink);font-size:13px;font-weight:700;min-height:40px;white-space:nowrap}
.text-link svg{width:16px;height:16px;transition:transform .15s}
.text-link:hover svg{transform:translateX(2px)}
.source-link{color:var(--accent-ink);font-size:13px;font-weight:700;display:inline-flex;align-items:center;gap:5px;min-height:40px}
.source-link svg{width:14px;height:14px}
.source-link:hover,.text-button:hover{text-decoration:underline;text-underline-offset:3px}
.icon-button{width:44px;height:44px;min-width:44px;border-radius:12px;display:inline-flex;align-items:center;justify-content:center;color:var(--muted);transition:background .15s,color .15s}
.icon-button:hover{background:var(--surface-2);color:var(--accent-ink)}
.icon-button svg{width:20px;height:20px}
.save-button[aria-pressed=true]{color:var(--accent)}
.save-button[aria-pressed=true] svg{fill:currentColor}
.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 22px;background:var(--accent-strong);color:#fff;border-radius:999px;font-size:14px;font-weight:700}
.button svg{width:18px}
.button:hover{filter:brightness(1.12)}
.text-button{font-size:13px;font-weight:600;color:var(--accent-ink);min-height:40px;padding:6px 0}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.panel-header{padding:18px 20px 4px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.panel-header h2{font-size:17px;display:flex;align-items:center;gap:8px}
.panel-header h2 svg{width:19px;height:19px}

/* Home */
.important-strip{display:flex;align-items:center;gap:14px;border:1px solid var(--warn-line);background:var(--warn-soft);border-radius:var(--radius);padding:14px 18px;margin-bottom:24px}
.important-strip>svg{color:var(--warn);width:22px;height:22px;flex-shrink:0}
.important-strip>div{flex:1;min-width:0}
.important-strip b{font-size:13px;color:var(--warn);display:inline-block;margin-right:10px}
.important-strip p{font-size:14px;display:inline}
.important-strip strong{color:var(--warn)}
.important-strip>a{font-size:13px;font-weight:700;color:var(--warn);display:flex;align-items:center;gap:5px;min-height:44px;white-space:nowrap;padding:0 4px}
.important-strip>a:hover{text-decoration:underline}
.important-strip>a svg{width:16px;height:16px}
.overview-grid{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr);gap:24px;align-items:start}
.home-left,.home-right{display:grid;gap:24px}
.feature{overflow:hidden;background:var(--accent-strong);color:#fff;border-radius:var(--radius);display:grid}
.feature-copy{padding:28px 28px 22px;display:flex;flex-direction:column;align-items:flex-start}
.feature-label{color:#bfe0cf;font-size:12px;font-weight:700;letter-spacing:.08em;display:flex;align-items:center;gap:8px}
.feature-label:before{content:'';height:2px;width:18px;border-radius:2px;background:currentColor}
.feature h2{font-size:26px;line-height:1.45;margin:12px 0 8px;font-weight:800}
.feature p{font-size:14px;color:#d3e3da;line-height:1.85}
.feature .feature-button{margin-top:16px;font-size:14px;font-weight:700;color:var(--accent-strong);background:#fff;border-radius:999px;padding:8px 18px;display:inline-flex;align-items:center;gap:8px;min-height:44px}
.feature-button svg{width:17px}
.feature-button:hover svg{transform:translateX(2px)}
.today-items{padding:4px 20px 16px}
.today-row{padding:14px 0;display:grid;grid-template-columns:70px 1fr;gap:14px;border-bottom:1px solid var(--line)}
.today-row:last-child{border-bottom:0}
.today-time{font-family:var(--num);font-size:24px;font-weight:600;line-height:1.2;color:var(--accent)}
.today-time small{display:block;font-family:var(--jp);font-size:12px;font-weight:600;margin-top:4px;color:var(--muted)}
.today-copy a{font-size:15px;line-height:1.65;font-weight:700;display:block}
.today-copy a>svg{display:inline-block;width:13px;height:13px;margin-left:4px;vertical-align:-1px;color:var(--muted)}
.today-copy a:hover{color:var(--accent-ink)}
.today-copy p{font-size:13px;color:var(--muted);margin-top:3px}
.empty-today{font-size:14px;color:var(--muted);padding:16px 0}
.deadline-panel{background:var(--warn-soft);border-color:var(--warn-line);box-shadow:none}
.deadline-panel .panel-header h2{color:var(--warn)}
.deadline-panel .text-link{color:var(--warn)}
.deadline-content{padding:4px 20px 14px}
.deadline-entry{padding:12px 0;border-top:1px solid var(--warn-line)}
.deadline-entry:first-child{border-top:0}
.deadline-entry a{font-size:15px;line-height:1.65;font-weight:700;display:flex;align-items:center;justify-content:space-between;gap:12px}
.deadline-entry a svg{width:16px;height:16px;color:var(--warn)}
.deadline-entry a:hover{text-decoration:underline}
.deadline-date{font-size:13px;font-weight:600;color:var(--warn);margin-bottom:2px;display:flex;align-items:baseline;gap:8px}
.deadline-date b{font-family:var(--num);font-size:22px;font-weight:700;line-height:1.2}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px}
.section-title h2{font-size:19px}
.brief-list{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:0 8px 0 20px}
.brief-row{display:flex;gap:14px;align-items:flex-start;padding:14px 0;border-bottom:1px solid var(--line)}
.brief-row:last-child{border-bottom:0}
.brief-date{font-family:var(--num);font-size:18px;font-weight:600;color:var(--muted);min-width:44px;line-height:1.5}
.brief-body{flex:1;min-width:0}
.brief-body p{font-size:15px;font-weight:700;line-height:1.65}
.brief-body .brief-source{color:var(--accent-ink);font-size:13px;font-weight:600;min-height:34px;display:inline-flex;align-items:center;gap:4px}
.brief-source svg{width:13px;height:13px}
.brief-source:hover{text-decoration:underline}
.home-hint{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:13px;padding:0 6px}
.home-hint svg{width:17px;height:17px}

/* Toolbar */
.toolbar{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:16px}
.search-box{position:relative;display:flex;align-items:center;gap:10px;background:var(--surface-2);border:1px solid transparent;border-radius:12px;padding:0 6px 0 14px;min-height:50px;transition:border-color .15s,background .15s}
.search-box>span{color:var(--muted);display:flex}
.search-box input{width:100%;min-width:0;border:0;background:transparent;height:48px;color:var(--ink);outline:none;font-size:16px}
.search-box input::placeholder{color:var(--muted);opacity:.85}
.search-box:focus-within{border-color:var(--accent);background:var(--surface)}
.search-box input::-webkit-search-cancel-button{display:none}
.search-box .icon-button{width:40px;min-width:40px;height:40px;border-radius:50%}
.toolbar-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;flex-wrap:wrap}
.segmented{display:flex;padding:3px;background:var(--surface-2);border-radius:12px;gap:2px}
.segmented button{display:flex;align-items:center;justify-content:center;gap:6px;padding:6px 14px;font-size:14px;font-weight:600;min-height:40px;border-radius:9px;white-space:nowrap;color:var(--muted)}
.segmented button[aria-pressed=true]{color:var(--ink);background:var(--surface);box-shadow:0 1px 3px #0000001f}
.segmented svg{width:17px;height:17px}
#unread-count{font-family:var(--num);font-size:15px;color:var(--warn)}
.select-label{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;color:var(--muted)}
select{min-height:44px;border-radius:10px;padding:6px 32px 6px 12px;border:1px solid var(--line-strong);color:var(--ink);background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23758581' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 9px center/16px;appearance:none;-webkit-appearance:none;max-width:100%;font-size:14px;font-weight:600;cursor:pointer}
.filter-chips{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.filter-chips button{border:1px solid var(--line-strong);border-radius:999px;padding:6px 15px;min-height:40px;font-size:14px;font-weight:600;color:var(--ink-2);background:var(--surface);white-space:nowrap;transition:background .15s,border-color .15s}
.filter-chips button:hover{border-color:var(--accent)}
.filter-chips button[aria-pressed=true]{border-color:var(--accent-strong);background:var(--accent-strong);color:#fff}
.results-header{display:flex;gap:12px;align-items:center;justify-content:space-between;min-height:56px;padding:4px 2px}
.results-header p{color:var(--muted);font-size:13px}

/* News */
.news-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.news-card{position:relative;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px 20px 12px;min-width:0;overflow:hidden}
.news-card:before{content:'';position:absolute;left:0;top:18px;bottom:18px;width:4px;border-radius:0 4px 4px 0;background:var(--accent)}
.news-card.is-read:before{display:none}
.news-card.is-read h2{color:var(--ink-2)}
.news-topline{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin:-6px -10px 2px 0}
.news-meta{display:flex;align-items:center;gap:6px 10px;flex-wrap:wrap;color:var(--muted);font-size:13px;padding-top:9px}
.read-state{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:600}
.news-card:not(.is-read) .read-state{color:var(--accent-ink)}
.unread-dot{width:7px;height:7px;display:inline-block;background:var(--accent);border-radius:50%}
.news-date{color:var(--muted);font-size:13px;margin-bottom:4px}
.news-card h2{font-size:17px;font-weight:800;line-height:1.55;margin-bottom:6px}
.news-card .original-text{font-size:14px;line-height:1.85;color:var(--ink-2)}
.card-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:6px;margin-top:12px;border-top:1px solid var(--line)}
.read-button{font-size:13px;font-weight:600;display:inline-flex;gap:6px;align-items:center;color:var(--muted);min-height:44px;padding:4px 12px;margin-right:-8px;border-radius:999px}
.read-button:hover{background:var(--surface-2)}
.read-button[aria-pressed=true]{color:var(--accent-ink)}
.read-button svg{width:16px;height:16px}
.other-sources{font-size:13px;color:var(--muted);padding-bottom:4px}
.other-sources summary{cursor:pointer;min-height:36px;display:flex;align-items:center;gap:6px;list-style:none;font-weight:600}
.other-sources summary::-webkit-details-marker{display:none}
.other-sources>div{display:flex;flex-wrap:wrap;gap:0 16px;padding-left:20px}
.other-sources a{min-height:36px;display:inline-flex;align-items:center;gap:4px;color:var(--accent-ink);font-weight:600}
.other-sources a:hover{text-decoration:underline}
.other-sources svg{width:12px;height:12px}

/* Official media — optional, click-to-load */
.official-media{margin:14px 0 2px;padding:12px;border:1px solid var(--line);border-radius:12px;background:var(--surface-2);min-width:0}
.media-bar{display:flex;align-items:center;gap:10px}
.media-platform{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;flex-shrink:0;border-radius:9px;background:#151b18;color:#fff;font-size:15px}
.media-platform.youtube{background:#d42020}
.media-title{flex:1;min-width:0;font-size:14px;line-height:1.4}

.official-media .media-consent{font-size:12px;line-height:1.6;color:var(--muted);margin-top:6px}
.media-load{display:inline-flex;align-items:center;gap:6px;flex-shrink:0;padding:8px 14px;min-height:40px;background:var(--surface);color:var(--ink);border:1px solid var(--line-strong);border-radius:999px;font-size:13px;font-weight:700}
.media-load:hover{border-color:var(--accent);color:var(--accent-ink)}
.media-load svg{width:15px;height:15px}
.media-output:empty{display:none}
.media-output{max-width:550px;margin:12px auto 0;overflow:hidden;font-size:13px;color:var(--muted)}
.media-output iframe{display:block;width:100%;aspect-ratio:16/9;border:0;border-radius:10px;background:#000}
.media-output .twitter-tweet{margin:0 auto!important}
.media-original{font-size:13px;font-weight:600;color:var(--accent-ink);display:inline-flex;align-items:center;gap:5px;min-height:36px;margin-top:4px}
.media-original svg{width:13px;height:13px}
.media-original:hover{text-decoration:underline}
.feature-media{margin:0 20px 20px;background:var(--surface);border-color:transparent;color:var(--ink)}

/* Schedule */
.schedule-group{margin-bottom:24px}
.day-heading{position:sticky;top:var(--header-h);z-index:5;display:flex;align-items:center;gap:10px;padding:10px 2px;margin-bottom:6px;background:var(--bg)}
.day-heading h2{font-size:16px;font-weight:800;display:flex;align-items:center;gap:8px}
.day-heading.is-sat h2{color:var(--sat)}
.day-heading.is-sun h2{color:var(--sun)}
.day-heading>span{font-size:13px;font-weight:600;color:var(--muted)}
.day-heading:after{content:'';height:1px;background:var(--line);flex:1}
.today-badge{font-size:12px;font-weight:700;color:#fff;background:var(--accent-strong);padding:2px 9px;border-radius:999px;line-height:1.6}
.event-list{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden}
.event-card{display:grid;grid-template-columns:96px minmax(0,1fr) 44px;gap:14px;padding:16px 10px 12px 20px;border-bottom:1px solid var(--line);align-items:start}
.event-card:last-child{border-bottom:0}
.event-when{display:flex;flex-direction:column;gap:2px;padding-top:1px}
.event-time{font-family:var(--num);font-size:22px;font-weight:600;color:var(--accent-ink);line-height:1.25}
.event-time.is-phase{font-family:var(--jp);font-size:14px;font-weight:700;line-height:1.6;color:var(--ink-2)}
.cat-entry .event-time.is-phase{color:var(--warn)}
.event-day{font-size:12px;font-weight:600;color:var(--muted)}
.phase-label{display:inline-block;align-self:flex-start;color:var(--warn);font-size:12px;font-weight:700}
.event-body{min-width:0}
.event-body h3{font-size:15px;font-weight:700;line-height:1.7}
.event-meta{display:flex;align-items:center;flex-wrap:wrap;gap:2px 10px;margin-top:6px}
.exact-date{font-size:12px;color:var(--muted)}
.event-meta .source-link{min-height:36px;font-size:13px}
.event-card>.icon-button{margin-top:-6px}
.approx-section{margin-top:24px}
.approx-section>summary{cursor:pointer;min-height:48px;font-size:15px;font-weight:700;display:flex;align-items:center;gap:8px;list-style:none}
.approx-section>summary::-webkit-details-marker{display:none}
.approx-section>summary:before,.other-sources summary:before{content:'+';font-family:var(--num);font-size:18px;width:14px;text-align:center}
.approx-section[open]>summary:before,.other-sources[open] summary:before{content:'−'}
.approx-section>p{font-size:13px;color:var(--muted);margin-bottom:12px}

/* Calendar */
.calendar-layout{display:grid;grid-template-columns:minmax(320px,.9fr) minmax(0,1.1fr);gap:24px;align-items:start}
.calendar-board{padding:18px;border-radius:var(--radius);background:var(--surface);border:1px solid var(--line);box-shadow:var(--shadow)}
.calendar-head{display:flex;align-items:center;gap:6px;justify-content:space-between;margin-bottom:10px}
.calendar-head select{border-color:transparent;font-size:18px;font-weight:800;padding-left:6px;background-color:transparent}
.calendar-head .month-actions{display:flex;gap:2px;align-items:center}
.calendar-today{min-height:36px;font-size:13px;font-weight:700;color:var(--accent-ink);padding:4px 12px;background:var(--accent-soft);border-radius:999px}
.calendar-week,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.calendar-week span{text-align:center;font-size:12px;font-weight:700;color:var(--muted);padding:6px 0}
.calendar-week span:first-child,.calendar-grid .is-sun strong{color:var(--sun)}
.calendar-week span:last-child,.calendar-grid .is-sat strong{color:var(--sat)}
.calendar-grid button{position:relative;min-height:54px;min-width:0;display:flex;flex-direction:column;align-items:center;justify-content:center;border:2px solid transparent;border-radius:12px;gap:0;padding:2px}
.calendar-grid button strong{font-family:var(--num);font-size:20px;font-weight:600;line-height:1.3}
.calendar-grid button small{font-size:11px;font-weight:700;height:15px;line-height:15px;color:var(--accent-ink)}
.calendar-grid button.has-events{background:var(--accent-soft)}
.calendar-grid button:hover{border-color:var(--line-strong)}
.calendar-grid button.is-today{border-color:var(--accent)}
.calendar-grid button[aria-pressed=true]{background:var(--accent-strong);border-color:var(--accent-strong)}
.calendar-grid button[aria-pressed=true] strong,.calendar-grid button[aria-pressed=true] small{color:#fff}
.calendar-note{font-size:12px;color:var(--muted);line-height:1.8;margin-top:14px}
.calendar-day-panel .day-heading{position:static;padding-top:0}
.calendar-day-panel .event-card{grid-template-columns:84px minmax(0,1fr) 44px}

/* Saved / empty / footer / toast */
.device-note{display:flex;gap:8px;align-items:center;color:var(--ink-2);font-size:13px;background:var(--accent-soft);padding:12px 16px;border-radius:var(--radius-sm);margin-bottom:24px}
.device-note svg{width:17px;height:17px;color:var(--accent-ink)}
.saved-section{margin-bottom:32px}
.saved-section>h2{font-size:18px;margin-bottom:12px;display:flex;align-items:center;gap:8px}
.empty-state{grid-column:1/-1;text-align:center;padding:48px 20px;border:1px dashed var(--line-strong);border-radius:var(--radius);background:var(--surface)}
.empty-state>.empty-icon{display:inline-flex;background:var(--accent-soft);padding:16px;border-radius:50%;color:var(--accent-ink);margin-bottom:14px}
.empty-state h2{font-size:18px;margin-bottom:6px}
.empty-state p{font-size:14px;color:var(--muted)}
.empty-state .button{margin-top:20px}
.site-footer{margin-top:48px}
.source-notes{border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.source-notes>summary{list-style:none;display:flex;align-items:center;justify-content:space-between;min-height:54px;cursor:pointer;color:var(--ink-2);font-size:14px;font-weight:600}
.source-notes>summary::-webkit-details-marker{display:none}
.source-notes>summary svg{width:17px;transition:transform .2s}
.source-notes[open]>summary svg{transform:rotate(180deg)}
#notes{padding:0 0 18px;font-size:13px;color:var(--muted)}
#notes p{margin-bottom:8px}
.footer-bottom{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:24px 0 0}
.footer-bottom>span{font-family:var(--num);font-size:22px;font-weight:700;color:var(--muted);white-space:nowrap}
.footer-bottom p{font-size:12px;line-height:1.8;color:var(--muted);text-align:right}
.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);z-index:80;max-width:calc(100vw - 32px);width:max-content;display:flex;align-items:center;gap:16px;background:#14302b;color:#fff;padding:12px 14px 12px 20px;border-radius:14px;box-shadow:0 10px 30px #0003;font-size:14px;animation:toast-in .2s ease-out}
.toast button{color:#bfe7d5;font-weight:700;min-height:36px;padding:0 10px;border-radius:8px;white-space:nowrap}
.toast button:hover{background:#ffffff1a}
.loading-state{text-align:center;color:var(--muted);padding:100px 15px;font-size:14px}
.loader{display:inline-block;width:26px;height:26px;border:3px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite;margin-bottom:10px}
.no-script{padding:25px;text-align:center}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes arrive{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
@keyframes toast-in{from{opacity:0;transform:translate(-50%,8px)}to{opacity:1;transform:translate(-50%,0)}}

/* Tablet */
@media(max-width:1000px){
 .header-inner{padding:0 24px}
 main{padding:30px 24px 40px}
 .navigation>a{padding:8px 12px}
 .overview-grid{grid-template-columns:minmax(0,1.4fr) minmax(270px,1fr);gap:20px}
 .calendar-layout{grid-template-columns:1fr}
}

/* Phone: bottom tab bar, single column, today first */
@media(max-width:760px){
 :root{--header-h:56px}
 body{font-size:15px}
 .site-header{backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--bg)}
 .header-inner{padding:0 18px}
 .brand strong{font-size:25px}
 .brand-news{font-size:18px}
 .navigation{position:fixed;bottom:0;left:0;right:0;z-index:40;height:calc(var(--tabbar-h) + env(safe-area-inset-bottom));padding:6px 8px env(safe-area-inset-bottom);background:color-mix(in srgb,var(--surface) 94%,transparent);border-top:1px solid var(--line);display:grid;grid-template-columns:repeat(4,1fr);gap:4px;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px)}
 .navigation>a{flex-direction:column;justify-content:center;gap:1px;border-radius:12px;font-size:11px;padding:4px;min-height:52px}
 .navigation>a:hover{background:none}
 .navigation>a[aria-current=page]{background:none;color:var(--accent-ink)}
 .navigation>a>span[data-icon]{width:56px;height:30px;border-radius:999px;align-items:center;justify-content:center;transition:background .15s}
 .navigation>a[aria-current=page]>span[data-icon]{background:var(--accent-soft)}
 .navigation svg{width:22px;height:22px}
 .nav-count{position:absolute;top:2px;left:calc(50% + 8px);height:18px;min-width:18px;font-size:11px;padding:0 5px}
 .navigation>a[aria-current=page] .nav-count{background:var(--warn);color:#fff}
 main{padding:22px 16px calc(var(--tabbar-h) + 40px + env(safe-area-inset-bottom))}
 h1,.page-heading h1{font-size:24px}
 .page-heading,.home-heading{margin-bottom:18px;gap:12px}
 .heading-number,.home-date strong{font-size:38px}
 .home-date strong{flex-direction:column;align-items:flex-end;gap:4px}
 .home-date>span{display:none}
 .update-line{font-size:12px}
 .important-strip{padding:12px 12px 12px 14px;align-items:flex-start;gap:10px;margin-bottom:18px}
 .important-strip>svg{margin-top:2px}
 .important-strip b{display:block;margin-bottom:2px}
 .important-strip p{display:block;line-height:1.75}
 .important-strip>a{align-self:center;flex-direction:column;gap:0;font-size:11px;min-width:44px;padding:0}
 .overview-grid{grid-template-columns:1fr;gap:18px}
 .home-left,.home-right{display:contents}
 .today-panel{order:1}.deadline-panel{order:2}.feature{order:3}.latest-section{order:4}.home-hint{order:5}
 .feature-copy{padding:22px 20px 18px}
 .feature h2{font-size:22px}
 .feature-media{margin:0 14px 14px}
 .today-items{padding:2px 16px 12px}
 .panel-header{padding:14px 16px 2px}
 .deadline-content{padding:2px 16px 10px}
 .brief-list{padding:0 4px 0 16px}
 .toolbar{padding:12px;border-radius:14px}
 .filter-chips{flex-wrap:nowrap;overflow-x:auto;margin:12px -12px 0;padding:0 12px 2px;scrollbar-width:none;scroll-padding:0 12px;-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),transparent)}
 .filter-chips::-webkit-scrollbar{display:none}
 .news-list{grid-template-columns:1fr;gap:12px}
 .news-card{padding:16px 16px 10px}
 .news-card:before{top:16px;bottom:16px}
 .event-card,.calendar-day-panel .event-card{grid-template-columns:80px minmax(0,1fr) 44px;gap:8px;padding:14px 4px 10px 14px}
 .event-time{font-size:18px}
 .event-time.is-phase{font-size:13px}
 .calendar-board{padding:14px 10px}
 .calendar-grid,.calendar-week{gap:2px}
 .calendar-grid button{min-height:50px;border-radius:10px}
 .footer-bottom{flex-direction:column;align-items:flex-start;gap:6px}
 .footer-bottom p{text-align:left}
 .toast{bottom:calc(var(--tabbar-h) + 12px + env(safe-area-inset-bottom));width:calc(100vw - 24px);justify-content:space-between}
}
@media(max-width:380px){
 .brand-tag{display:none}
 .event-card,.calendar-day-panel .event-card{grid-template-columns:60px minmax(0,1fr) 40px;padding-left:12px}
 .event-card>.icon-button{width:40px;min-width:40px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.view,.toast,.loader{animation:none}*{transition:none!important}}
