:root { color-scheme:light dark; }
:root[data-theme="light"] { color-scheme:light; }
:root[data-theme="dark"] { color-scheme:dark; }
body { margin:0; background:light-dark(#f5f7fb,#111622); }

#app { --tod-bg:light-dark(#f5f7fb,#111622); --tod-panel:light-dark(#ffffff,#1a2130); --tod-ink:light-dark(#202b42,#edf1fb); --tod-muted:light-dark(#68748b,#a2adc2); --tod-border:light-dark(#e5e9f2,#323d52); --tod-accent:light-dark(#5554db,#aaa8ff); --tod-solid:light-dark(#5554db,#7470ef); --tod-soft:light-dark(#efefff,#2b2b4d); --tod-good:light-dark(#d0ece5,#28564d); --tod-edge:light-dark(#f6e4b7,#665335); --tod-night:light-dark(#e7eaf2,#343e54); --tod-good-ink:light-dark(#236b5a,#a0ddc9); font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--tod-ink); }
#app * { box-sizing:border-box; }
#app [hidden] { display:none !important; }
#app .tod-stage { min-height:1050px; }
#app .tod-window { container-type:inline-size; width:100%; background:var(--tod-bg); border:1px solid var(--tod-border); border-radius:20px; overflow:hidden; }
#app .tod-mobile { max-width:390px; margin-inline:auto; }
#app .tod-page { padding:28px 38px 28px; }
#app button,#app input { font:inherit; }
#app button { cursor:pointer; }
#app button:disabled { cursor:default; opacity:.5; }
#app .tod-nav { display:flex; align-items:center; justify-content:space-between; gap:16px; }
#app .tod-brand { display:flex; align-items:center; gap:9px; font-size:20px; font-weight:700; letter-spacing:-.7px; white-space:nowrap; }
#app .tod-brand-icon { display:grid; place-items:center; width:30px; height:30px; border-radius:50%; background:var(--tod-solid); color:#fff; }
#app .tod-brand-icon svg { width:19px; height:19px; }
#app .tod-brand-dot { color:var(--tod-accent); }
#app .tod-format { padding:4px; display:flex; background:var(--tod-panel); border:1px solid var(--tod-border); border-radius:10px; flex-shrink:0; }
#app .tod-format button { min-height:36px; padding:0 13px; border:0; border-radius:7px; background:transparent; color:var(--tod-muted); font-size:14px; font-weight:600; }
#app .tod-format button[aria-pressed="true"] { background:var(--tod-ink); color:var(--tod-panel); }
#app .tod-hero { margin:32px 0 25px; }
#app h1 { font-size:40px; letter-spacing:-1.6px; line-height:1.15; font-weight:650; margin:0 0 10px; }
#app .tod-subtitle { margin:0; font-size:16px; line-height:1.6; color:var(--tod-muted); }
#app .tod-planner { border:1px solid var(--tod-border); border-radius:var(--tod-radius,18px); background:var(--tod-panel); }
#app .tod-topbar { display:flex; gap:10px; align-items:center; justify-content:space-between; padding:13px 23px; border-bottom:1px solid var(--tod-border); }
#app .tod-date { display:flex; align-items:center; gap:10px; font-size:14px; min-width:0; }
#app .tod-date input { color:var(--tod-ink); background:transparent; border:0; font-size:14px; min-width:0; max-width:165px; }
#app .tod-date svg { color:var(--tod-muted); width:18px; }
#app .tod-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:8px 12px; color:var(--tod-ink); border:1px solid var(--tod-border); border-radius:9px; background:var(--tod-panel); font-size:14px; font-weight:550; }
#app .tod-button svg { width:16px; height:16px; }
#app .tod-link { border:0; background:transparent; color:var(--tod-accent); padding:8px 0; font-size:14px; font-weight:550; }
#app .tod-scrubber { padding:21px 23px 19px; background:var(--tod-soft); border-bottom:1px solid var(--tod-border); }
#app .tod-scrubber-head { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:14px; margin-bottom:11px; }
#app .tod-scrubber-head label { font-weight:600; }
#app .tod-selected { color:var(--tod-accent); font-weight:650; font-variant-numeric:tabular-nums; }
#app .tod-range { width:100%; display:block; height:24px; margin:0; accent-color:var(--tod-solid); cursor:ew-resize; }
#app .tod-axis { display:flex; justify-content:space-between; color:var(--tod-muted); font-size:12px; margin-top:4px; font-variant-numeric:tabular-nums; }
#app .tod-row { display:grid; grid-template-columns:minmax(135px,1fr) 130px minmax(180px,1.7fr) 28px; gap:18px; align-items:center; padding:24px 23px; border-bottom:1px solid var(--tod-border); }
#app .tod-place-top { display:flex; align-items:center; flex-wrap:wrap; gap:7px; margin-bottom:4px; }
#app .tod-city { font-size:17px; font-weight:650; letter-spacing:-.3px; }
#app .tod-you { font-size:11px; text-transform:uppercase; letter-spacing:.6px; font-weight:700; color:var(--tod-accent); background:var(--tod-soft); border-radius:4px; padding:3px 5px; }
#app .tod-country { color:var(--tod-muted); font-size:13px; line-height:1.5; }
#app .tod-home-change { color:var(--tod-accent); background:transparent; border:0; font-size:13px; padding:4px 0; }
#app .tod-clock { font-size:30px; line-height:1.2; font-weight:600; letter-spacing:-1px; font-variant-numeric:tabular-nums; white-space:nowrap; }
#app .tod-clock small { font-size:13px; letter-spacing:0; margin-left:4px; color:var(--tod-muted); font-weight:500; }
#app .tod-clock-date { font-size:12px; color:var(--tod-muted); margin-top:5px; }
#app .tod-timeline { min-width:0; }
#app .tod-status { display:flex; align-items:center; gap:5px; margin-bottom:8px; font-size:12px; font-weight:550; color:var(--tod-muted); }
#app .tod-status svg { width:14px; height:14px; }
#app .tod-status[data-status="good"] { color:var(--tod-good-ink); }
#app .tod-track { height:25px; display:flex; gap:2px; position:relative; }
#app .tod-segment { flex:1; min-width:0; border-radius:2px; background:var(--tod-night); }
#app .tod-segment[data-period="good"] { background:var(--tod-good); }
#app .tod-segment[data-period="edge"] { background:var(--tod-edge); }
#app .tod-marker { position:absolute; top:-4px; bottom:-4px; width:2px; border-radius:2px; background:var(--tod-accent); transform:translateX(-1px); pointer-events:none; }
#app .tod-marker::before { content:""; position:absolute; width:6px; height:6px; background:var(--tod-accent); border-radius:50%; left:-2px; top:-3px; }
#app .tod-track-labels { display:grid; grid-template-columns:repeat(4,1fr); font-size:11px; color:var(--tod-muted); margin-top:6px; font-variant-numeric:tabular-nums; }
#app .tod-remove { display:grid; place-items:center; border:0; width:28px; height:36px; padding:0; background:transparent; color:var(--tod-muted); border-radius:6px; }
#app .tod-remove svg { width:15px; height:15px; }
#app .tod-remove:hover { background:var(--tod-bg); color:var(--tod-ink); }
#app .tod-add { display:flex; align-items:center; justify-content:center; gap:8px; width:100%; min-height:66px; padding:14px; border:0; background:transparent; color:var(--tod-accent); font-size:15px; font-weight:600; border-radius:0 0 18px 18px; }
#app .tod-add:hover { background:var(--tod-soft); }
#app .tod-add svg { width:18px; height:18px; }
#app .tod-legend { display:flex; align-items:center; justify-content:center; flex-wrap:wrap; gap:20px; margin:21px 0 10px; font-size:12px; color:var(--tod-muted); }
#app .tod-legend span { display:flex; align-items:center; gap:6px; }
#app .tod-swatch { width:9px; height:9px; border-radius:3px; background:var(--tod-good); }
#app .tod-swatch.edge { background:var(--tod-edge); }
#app .tod-swatch.night { background:var(--tod-night); }
#app .tod-guide { margin:0; text-align:center; color:var(--tod-muted); font-size:12px; line-height:1.5; }
#app .tod-footer { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:30px; color:var(--tod-muted); font-size:12px; line-height:1.6; }
#app .tod-footer svg { width:14px; height:14px; }
#app .tod-picker { padding:20px 23px; border-bottom:1px solid var(--tod-border); background:var(--tod-bg); }
#app .tod-picker-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; font-size:15px; font-weight:600; }
#app .tod-search { width:100%; border:1px solid var(--tod-border); border-radius:9px; background:var(--tod-panel); color:var(--tod-ink); padding:12px; font-size:16px; }
#app .tod-choices { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:12px; }
#app .tod-choice { display:flex; flex-direction:column; gap:4px; align-items:flex-start; text-align:left; min-height:57px; padding:10px; border:1px solid var(--tod-border); border-radius:8px; color:var(--tod-ink); background:var(--tod-panel); font-size:14px; }
#app .tod-choice:hover { border-color:var(--tod-accent); }
#app .tod-choice small { color:var(--tod-muted); font-size:12px; }
#app .tod-detect { margin-top:12px; width:100%; }
#app .tod-empty { font-size:14px; color:var(--tod-muted); grid-column:1/-1; padding:10px 0; }
#app .tod-notice { color:var(--tod-muted); font-size:13px; margin:12px 0 0; }
@container (max-width:720px) {
 #app .tod-page { padding:23px 20px; }
 #app .tod-brand { font-size:18px; gap:7px; }
 #app .tod-brand-icon { width:25px; height:25px; }
 #app .tod-format button { padding:0 10px; }
 #app .tod-hero { margin:34px 0 22px; }
 #app h1 { font-size:29px; letter-spacing:-1.1px; }
 #app .tod-subtitle { font-size:14px; max-width:285px; }
 #app .tod-topbar { padding:14px 16px; }
 #app .tod-scrubber { padding:16px; }
 #app .tod-row { grid-template-columns:1fr auto 22px; gap:12px 8px; padding:18px 16px; }
 #app .tod-place { grid-column:1; }
 #app .tod-time { grid-column:2; text-align:right; }
 #app .tod-remove,#app .tod-remove-space { grid-column:3; grid-row:1; width:22px; }
 #app .tod-timeline { grid-column:1/-1; display:grid; grid-template-columns:1fr auto; }
 #app .tod-status { grid-column:2; grid-row:2; margin:6px 0 0; font-size:11px; }
 #app .tod-track { grid-column:1/-1; height:18px; }
 #app .tod-track-labels { grid-column:1; grid-row:2; width:90%; }
 #app .tod-track-labels span:nth-child(even) { visibility:hidden; }
 #app .tod-clock { font-size:28px; }
 #app .tod-country { font-size:12px; }
 #app .tod-city { font-size:16px; }
 #app .tod-home-change { padding:0; font-size:12px; }
 #app .tod-add { min-height:57px; }
 #app .tod-legend { gap:13px; font-size:11px; margin-top:18px; }
 #app .tod-guide { font-size:11px; }
 #app .tod-footer { margin-top:20px; font-size:11px; }
 #app .tod-picker { padding:16px; }
}
@container (max-width:350px) {
 #app .tod-page { padding:19px 13px; }
 #app .tod-nav { gap:7px; }
 #app .tod-brand { font-size:16px; gap:5px; }
 #app .tod-brand-icon { width:23px; height:23px; }
 #app .tod-format button { padding:0 8px; font-size:12px; }
 #app h1 { font-size:27px; }
 #app .tod-row { padding-inline:12px; }
 #app .tod-clock { font-size:25px; }
 #app .tod-date { gap:4px; }
 #app .tod-date input { max-width:141px; }
}
@media(pointer:coarse) {
 #app .tod-format button,#app .tod-button,#app .tod-home-change,#app .tod-link { min-height:44px; }
 #app .tod-remove { min-height:44px; }
}
