:root{color-scheme:light}
:root{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
body{margin:0}
[hidden]:not([hidden="until-found"]){display:none!important}
/* Across tools: one narrow column per tool */
:root{
  --bg:#f3f6f8; --surface:#ffffff; --ink:#13202b; --muted:#5a6a79; --line:#d9e0e7;
  --accent:#1d6a86; --accent-ink:#ffffff; --hover:#e8eef2;
  --core-bg:#d3efdf; --core-ink:#0f4a31; --edge-bg:#f8e5c2; --edge-ink:#6a4207; --off-bg:#e6ebf0; --night-bg:#d2d9e0; --core-line:#2b8f63; --edge-line:#d08a1e; --stretch-bg:#f7d9d4; --stretch-ink:#7a2a20; --stretch-line:#c8553d; --del:#d14343;
  --f-body:"Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono:"JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]){
  --bg:#0f151b; --surface:#17212b; --ink:#e4ecf2; --muted:#94a5b5; --line:#2b3947;
  --accent:#5cb2d2; --accent-ink:#06202b; --hover:#1f2c38;
  --core-bg:#1c4a36; --core-ink:#cbf3df; --edge-bg:#4d3a15; --edge-ink:#f8e2b6; --off-bg:#1e2a35; --night-bg:#121a22; --core-line:#46c28a; --edge-line:#e8b04e; --stretch-bg:#4f2621; --stretch-ink:#f6cdc6; --stretch-line:#e07a63; --del:#b83c3c; color-scheme:dark }}
:root[data-theme="dark"]{
  --bg:#0f151b; --surface:#17212b; --ink:#e4ecf2; --muted:#94a5b5; --line:#2b3947;
  --accent:#5cb2d2; --accent-ink:#06202b; --hover:#1f2c38;
  --core-bg:#1c4a36; --core-ink:#cbf3df; --edge-bg:#4d3a15; --edge-ink:#f8e2b6; --off-bg:#1e2a35; --night-bg:#121a22; --core-line:#46c28a; --edge-line:#e8b04e; --stretch-bg:#4f2621; --stretch-ink:#f6cdc6; --stretch-line:#e07a63; --del:#b83c3c; color-scheme:dark }
*{box-sizing:border-box}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:15px;line-height:1.45;
  padding-left:max(16px, env(safe-area-inset-left, 0px));padding-right:max(16px, env(safe-area-inset-right, 0px));padding-block:24px 40px}
.wrap{max-width:760px;margin:0 auto;display:flex;flex-direction:column;gap:14px}
h1{font-size:22px;font-weight:700;margin:0;letter-spacing:-.01em}
.mono{font-family:var(--f-mono);font-variant-numeric:tabular-nums}
input,button{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.qwrap{position:relative}
.top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.tag{margin:2px 0 0;color:var(--muted);font-size:14px}
.topbtns{flex:none;display:flex;gap:8px}
.iconbtn{flex:none;width:32px;height:32px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--muted);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0}
.iconbtn svg{width:16px;height:16px}
.iconbtn:hover{color:var(--ink);background:var(--hover)}
.iconbtn[hidden]{display:none}
#helpBtn{flex:none;width:32px;height:32px;border-radius:50%;border:1px solid var(--line);background:var(--surface);color:var(--muted);font-weight:700;cursor:pointer}
#helpBtn:hover{color:var(--ink);background:var(--hover)}
.tip{position:absolute;z-index:15;left:0;right:0;top:calc(100% + 10px);background:var(--ink);color:var(--bg);border-radius:12px;padding:14px 16px;box-shadow:0 12px 30px rgba(0,0,0,.2);font-size:14.5px;max-width:440px}
.tip::before{content:"";position:absolute;top:-7px;left:28px;width:14px;height:14px;background:var(--ink);transform:rotate(45deg)}
.tip p{margin:0 0 8px}
.tip i{font-style:normal;font-weight:600}
#tipOk{border:0;border-radius:8px;padding:6px 14px;background:var(--accent);color:var(--accent-ink);font-weight:700;cursor:pointer}
.tip[hidden]{display:none}
#qclear{position:absolute;right:8px;top:50%;transform:translateY(-50%);width:32px;height:32px;border:0;border-radius:50%;background:var(--hover);color:var(--muted);font-size:20px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}
#qclear:hover{color:var(--ink)}
.chipbox{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:50px;padding:7px 48px 7px 8px;border:1px solid var(--line);border-radius:10px;background:var(--surface);cursor:text}
.chipbox:focus-within{border-color:var(--accent)}
.chip{display:inline-flex;align-items:center;gap:2px;max-width:100%;background:var(--hover);border:1px solid var(--line);border-radius:999px;padding:3px 3px 3px 12px;font-size:16px;line-height:1.3;cursor:pointer}
.chip .ct{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chip .cx{flex:none;width:24px;height:24px;border:0;border-radius:50%;background:none;color:var(--muted);font-size:17px;line-height:1;padding:0;cursor:pointer}
.chip .cx:hover{color:var(--ink);background:var(--line)}
.chipedit{border:0;outline:none;background:none;font:inherit;color:var(--ink);padding:0;margin-right:9px;min-width:3ch}
#qedit{flex:1 1 90px;min-width:90px;border:0;outline:none;background:none;font-size:17px;padding:6px 6px;color:var(--ink)}
#qedit::placeholder{color:var(--muted)}
#qclear[hidden],.hist[hidden]{display:none}
#q{padding-right:48px !important;width:100%;padding:12px 14px;font-size:17px;border:1px solid var(--line);border-radius:10px;background:var(--surface)}
.resolved{font-size:13.5px;color:var(--muted);min-height:1.4em}
.resolved b{color:var(--ink);font-weight:600}
.resolved .bad{color:var(--edge-ink);background:var(--edge-bg);border-radius:5px;padding:0 5px}
.datebox{position:relative;align-self:flex-start}
#dateBtn{border:1px solid var(--line);background:var(--surface);border-radius:9px;padding:8px 12px;font-weight:600;cursor:pointer}
#dateBtn:hover{background:var(--hover)}
.cal{position:absolute;z-index:10;top:calc(100% + 6px);left:0;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.16);padding:10px;max-width:calc(100vw - 32px)}
.cal table{border-collapse:collapse}
.cal th{font-size:11.5px;color:var(--muted);font-weight:600;padding:2px 0 6px}
.cal td{padding:2px}
.cal .kw{font-size:11px;color:var(--muted);padding-right:6px;white-space:nowrap}
.cal button{width:38px;height:34px;border:0;border-radius:7px;background:none;cursor:pointer;font-variant-numeric:tabular-nums}
.cal button:hover{background:var(--hover)}
.cal button.we{color:var(--muted)}
.cal button.on{background:var(--accent);color:var(--accent-ink);font-weight:700}
.cal button.today{box-shadow:inset 0 0 0 1px var(--accent)}
.cal .mon{font-size:10px;display:block;line-height:1;color:var(--muted)}
.cal button.on .mon{color:var(--accent-ink)}
.out{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.best{font-weight:600}
.tl{overflow-x:auto;cursor:grab;-webkit-overflow-scrolling:touch;user-select:none;border-radius:8px}
.tl.drag{cursor:grabbing}
table.strip{border-collapse:separate;border-spacing:2px}
.strip th{position:sticky;left:0;z-index:2;background:var(--surface);text-align:left;padding:4px 10px 4px 0;white-space:nowrap;font-size:14px;min-width:110px}
.strip th small{display:block;color:var(--muted);font-weight:400;font-size:11.5px}
.strip td{min-width:62px;height:46px;text-align:center;border-radius:6px;font-size:14px;padding:2px 4px;vertical-align:middle}
.strip td small{display:block;font-size:10.5px;opacity:.8;line-height:1.1}
.strip td.core{background:var(--core-bg);color:var(--core-ink)}
.strip td.edge{background:var(--edge-bg);color:var(--edge-ink)}
.strip td.off{background:var(--off-bg);color:var(--ink)}
.strip td.stretch{background:var(--stretch-bg);color:var(--stretch-ink)}
.strip td.col-edge,.strip td.col-stretch{}
.strip td.best{box-shadow:inset 0 0 0 2px var(--ink)}
.strip tr.fit td span.stretch{background:var(--stretch-line)}
.strip td.night{background:var(--night-bg);color:var(--muted)}
.strip td.col-core{box-shadow:inset 0 0 0 2px var(--core-line)}
.strip tr.fit td{height:8px;padding:0;background:none}
.strip tr.fit td span{display:block;height:6px;border-radius:3px}
.strip tr.fit td span.core{background:var(--core-line)}
.strip tr.fit td span.edge{background:var(--edge-line)}
.guess{color:var(--edge-ink);background:var(--edge-bg);border-radius:5px;padding:0 5px;font-size:12.5px}
.alts{color:var(--muted,#666);font-size:13px}
.altb{font:inherit;font-size:13px;color:var(--accent,#0a66c2);background:none;border:1px solid var(--line,#ccc);border-radius:6px;padding:1px 7px;margin:2px 2px 0 0;cursor:pointer}
.altb:hover{border-color:currentColor}
.altb .cc{font-size:11.5px}
body.has-hist{padding-bottom:calc(var(--footh,0px) + 90px)}
.hist{position:fixed;left:0;right:0;bottom:var(--footh,0px);z-index:30;background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -8px 24px rgba(0,0,0,.10);border-radius:14px 14px 0 0;
  padding-bottom:env(safe-area-inset-bottom,0px);padding-left:max(16px, env(safe-area-inset-left, 0px));padding-right:max(16px, env(safe-area-inset-right, 0px))}
.hbar{position:relative;max-width:760px;margin:0 auto}
.hgrip{display:flex;flex-direction:column;align-items:center;gap:4px;width:100%;border:0;background:none;padding:8px 64px 10px;cursor:grab;touch-action:none}
#hclear{position:absolute;right:0;bottom:0;border:0;background:none;color:var(--muted);opacity:.75;font:inherit;font-size:12px;line-height:16px;font-weight:400;padding:12px 2px 10px 10px;cursor:pointer}
#hclear:hover{opacity:1;text-decoration:underline}
.hgrip i{display:block;width:40px;height:4px;border-radius:2px;background:var(--line)}
.hgrip small{font-size:13px;line-height:16px;color:var(--muted);min-height:16px}
.hlist{max-width:760px;margin:0 auto;overflow-y:auto;max-height:0;overscroll-behavior:contain}
.hist.open .hlist{max-height:60vh;padding-bottom:8px}
.hrow{position:relative;border-radius:9px;overflow:hidden}
.hrow + .hrow{margin-top:3px}
.hbg{position:absolute;inset:0;background:var(--del);color:#fff;display:flex;align-items:center;justify-content:space-between;padding:0 18px;opacity:0;transition:opacity .12s}
.hbg svg{width:22px;height:22px}
.hrow.swiping .hbg{opacity:1}
.hitem{position:relative;touch-action:pan-y;user-select:none;-webkit-user-select:none;padding:7px 10px;border-radius:9px;cursor:pointer;background:var(--surface);display:flex;flex-direction:column;gap:1px}
.hitem:hover{background:var(--hover)}
.hrow.swiping .hitem{box-shadow:0 2px 10px rgba(0,0,0,.18)}
.cc{color:var(--muted);font-size:12.5px}
.hitem .c1{font-weight:600;font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hitem .c2{font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (prefers-reduced-motion:no-preference){ .hlist{transition:max-height .25s ease} }
.note{font-size:12.5px;color:var(--muted);margin:0}
.empty{color:var(--muted);margin:0}
/* ---------- Site shell ---------- */
/* Tool dock: icon tiles in a soft tray; the active tool lifts out */
.dock{display:flex;gap:4px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;
  margin:0 -16px;padding:6px 16px 8px;scroll-padding:0 16px}
.dock::-webkit-scrollbar{display:none}
.dock a{flex:1 0 auto;min-width:74px;display:flex;flex-direction:column;align-items:center;gap:5px;padding:10px 8px 8px;border-radius:14px;
  color:var(--muted);text-decoration:none;font-size:11.5px;font-weight:600;letter-spacing:.01em;white-space:nowrap;position:relative;
  transition:background .15s,color .15s,transform .15s}
.dock a svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.dock a:hover{color:var(--ink);background:var(--hover)}
.dock a.on{color:var(--accent);background:var(--surface);box-shadow:0 1px 2px rgba(0,0,0,.06),0 6px 18px -6px rgba(29,106,134,.35)}
.dock a.on::after{content:"";position:absolute;bottom:3px;left:50%;width:16px;height:3px;margin-left:-8px;border-radius:2px;background:var(--accent)}
.dock a:active{transform:scale(.96)}
.foot-row{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}
.foot-text{margin:0;line-height:1.55;flex:1;min-width:0;padding-top:4px}
.foot .more{display:inline-flex;align-items:center;gap:5px;border:0;background:none;padding:0;font:inherit;font-weight:600;color:var(--ink);cursor:pointer;white-space:nowrap}
.foot .more::after{content:"";width:6px;height:6px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg) translateY(-2px);transition:transform .15s}
.foot .more[aria-expanded="true"]::after{transform:rotate(-135deg) translate(-2px,0)}
.foot .more:hover{color:var(--accent)}
.langpick{flex-shrink:0}
.langpick{position:relative}
#langBtn{display:inline-flex;align-items:center;gap:4px;border:0;background:none;color:var(--muted);font:inherit;font-size:12.5px;padding:4px 0;cursor:pointer}
#langBtn:hover,#langBtn[aria-expanded="true"]{color:var(--ink)}
#langBtn svg.chev{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2;transition:transform .15s}
#langBtn[aria-expanded="true"] svg.chev{transform:rotate(180deg)}
.langmenu{position:absolute;right:0;bottom:calc(100% + 6px);z-index:40;min-width:190px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:0 12px 30px rgba(0,0,0,.18);padding:5px;display:flex;flex-direction:column}
.foot .langmenu a{text-decoration:none;display:flex;align-items:center;gap:0;border:0;background:none;color:var(--ink);font:inherit;font-size:14px;text-align:left;padding:8px 10px;border-radius:8px;cursor:pointer}
.langmenu a:hover,.langmenu a:focus-visible{background:var(--hover)}
.foot .langmenu a.on{color:var(--accent);font-weight:600}
.flags{display:inline-flex;align-items:center;gap:2px;margin-right:7px;min-width:28px}
#langNow .flags{min-width:0;margin-right:5px}
#langNow{display:inline-flex;align-items:center}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
#main{display:flex;flex-direction:column;gap:14px;min-width:0}
.foot{margin-top:18px;font-size:12.5px;color:var(--muted)}
.foot a{color:inherit}
.foot details{margin:0}
.foot summary{cursor:pointer;width:max-content}
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:50;background:var(--ink);color:var(--bg);padding:8px 14px;border-radius:999px;font-size:14px;font-weight:600;opacity:0;transition:opacity .3s ease,transform .3s ease;transform:translate(-50%,6px);pointer-events:none}
.toast.show{opacity:1;transform:translate(-50%,0)}
body.has-hist .toast{bottom:calc(var(--footh,0px) + 64px + env(safe-area-inset-bottom,0px))}
.toast{margin-bottom:var(--footh,0px)}
@media (prefers-reduced-motion:reduce){.toast{transition:none}}
/* ---------- Shared form bits ---------- */
.row{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:flex-end}
.field{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted);min-width:0}
.field>span{font-weight:600}
.inp,select.inp,textarea.inp{font-size:16px;padding:9px 11px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:var(--ink);min-width:0;max-width:100%}
textarea.inp{width:100%;resize:vertical;min-height:110px;line-height:1.45}
input[type=number].inp{width:96px}
.btn{border:1px solid var(--line);background:var(--surface);border-radius:9px;padding:8px 13px;font-weight:600;cursor:pointer;font-size:14.5px}
.btn:hover{background:var(--hover)}
.btn.pri{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.seg{display:inline-flex;border:1px solid var(--line);border-radius:9px;overflow:hidden;background:var(--surface)}
.seg button{border:0;background:none;padding:7px 11px;font-weight:600;font-size:14px;cursor:pointer;color:var(--muted)}
.seg button+button{border-left:1px solid var(--line)}
.seg button.on{background:var(--accent);color:var(--accent-ink)}
.big{font-size:26px;font-weight:700;letter-spacing:-.01em;line-height:1.2}
.sub{color:var(--muted);font-size:14px}
.card{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:10px;min-width:0}
.card h2{font-size:15px;margin:0}
.list{display:flex;flex-direction:column}
.li{display:flex;gap:12px;align-items:baseline;padding:8px 0;border-top:1px solid var(--line)}
.li:first-child{border-top:0}
.li .d{flex:none;width:118px;font-variant-numeric:tabular-nums;font-weight:600}
.li .n{flex:1;min-width:0}
.li .r{flex:none;color:var(--muted);font-size:13px;text-align:right}
.li.past{opacity:.5}
.li.next .d,.li.next .n{color:var(--accent)}
.hol{font-size:13.5px;color:var(--stretch-ink);background:var(--stretch-bg);border-radius:8px;padding:6px 10px;margin:0}
.wk{font-size:13.5px;color:var(--muted);margin:0}
/* time converter */
.clock{display:flex;align-items:baseline;gap:12px;padding:10px 0;border-top:1px solid var(--line)}
.clock:first-child{border-top:0}
.clock .t{font-family:var(--f-mono);font-size:28px;font-weight:600;flex:none;font-variant-numeric:tabular-nums}
.clock .c{flex:1;min-width:0}
.clock .c b{display:block;font-size:15.5px}
.clock .c small{color:var(--muted);font-size:13px}
.clock .df{flex:none;color:var(--muted);font-size:13px;text-align:right}
.clock.you .c b{color:var(--accent)}
/* stay counter */
.trip{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.trip .inp{padding:6px 6px;font-size:14px;width:138px}
.trip .x{border:0;background:var(--hover);color:var(--muted);width:30px;height:30px;border-radius:50%;cursor:pointer;font-size:18px;line-height:1}
.trip .dn{font-size:12.5px;color:var(--muted);min-width:52px}
.meter{height:10px;border-radius:5px;background:var(--off-bg);overflow:hidden}
.meter i{display:block;height:100%;background:var(--core-line)}
.meter.warn i{background:var(--edge-line)}
.meter.over i{background:var(--stretch-line)}
/* lunar */
.lunar-big{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.moon{width:54px;height:54px;flex:none}
.cmp{font-family:var(--f-mono);font-size:15px;white-space:pre-wrap;word-break:break-word;background:var(--off-bg);border-radius:9px;padding:10px 12px;margin:0;min-height:44px}
@media (max-width:420px){ .li .d{width:96px} .clock .t{font-size:24px} }
/* workdays */
.ccpick{display:inline-flex;align-items:center;gap:4px}
.ccpick .inp{max-width:170px;padding:8px 9px;font-size:15px}
.ccpick .x{border:0;background:var(--hover);color:var(--muted);width:28px;height:28px;border-radius:50%;cursor:pointer;font-size:17px;line-height:1}
.wdt{overflow-x:auto;margin:0 -4px}
.wdt table{border-collapse:collapse;width:100%;font-variant-numeric:tabular-nums}
.wdt th,.wdt td{padding:7px 8px;text-align:right;white-space:nowrap}
.wdt th:first-child{text-align:left;font-weight:600}
.wdt thead th{font-size:12.5px;color:var(--muted);font-weight:600;max-width:110px;overflow:hidden;text-overflow:ellipsis}
.wdt tbody tr+tr td,.wdt tbody tr+tr th{border-top:1px solid var(--line)}
.wdt td{font-size:15.5px;font-weight:600}
.wdt td small{display:inline-block;margin-left:5px;font-size:11px;font-weight:600;color:var(--stretch-ink);background:var(--stretch-bg);border-radius:4px;padding:0 4px}
.wdt tr.past{opacity:.45}
.wdt tr.cur th,.wdt tr.cur td{color:var(--accent);background:var(--hover)}
.wdt tfoot th,.wdt tfoot td{border-top:2px solid var(--line)}
.wdt tfoot tr.left th,.wdt tfoot tr.left td{border-top:1px solid var(--line);color:var(--accent)}
.wdt td[title]:not([title=""]){cursor:pointer}
.flag{width:13px;height:9px;flex:none;border-radius:1.5px;box-shadow:0 0 0 .5px rgba(0,0,0,.25)}
.wdt tfoot tr.avg th,.wdt tfoot tr.avg td{border-top:1px solid var(--line);font-weight:500;color:var(--muted)}
.strip td.past{opacity:.35;box-shadow:none}
.strip th small .nowt{color:var(--ink);font-weight:600}
.linkbtn{border:0;background:none;padding:0;color:var(--accent);font:inherit;font-weight:600;text-decoration:underline;cursor:pointer}
/* Strip rows: drag a row name to move it, × removes it */
.strip tr[data-i] th{cursor:move;touch-action:none;position:sticky}
.tl.one .strip tr[data-i] th{cursor:default}
.strip td.rmc{position:sticky;right:0;z-index:2;min-width:0;width:34px;padding:0 0 0 8px;background:var(--surface);border-radius:0}
.strip tr.fit td.rmc{background:var(--surface)}
.strip .rmx{width:24px;height:24px;border:0;border-radius:50%;background:var(--hover);color:var(--muted);font-size:16px;line-height:24px;padding:0;cursor:pointer}
.strip .rmx:hover,.strip .rmx:focus-visible{color:var(--ink);background:var(--line)}
.strip tr.dragging th{color:var(--accent)}
.strip tr.drop-a th,.strip tr.drop-a td{box-shadow:inset 0 3px 0 var(--accent)}
.strip tr.drop-b th,.strip tr.drop-b td{box-shadow:inset 0 -3px 0 var(--accent)}
.best .rowsall{font-size:13px;font-weight:600;margin-left:6px}
/* Holidays timeline */
.card h2.mon{font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);margin:10px 0 0}
.card h2.mon:first-child{margin-top:0}
.hrow .hname{font-weight:500}
.hrow.season .hname,.hrow.major .hname{font-weight:700}
.hrow.minor .hname{color:var(--muted)}
.hrow.work{opacity:.75}
.hrow.work .hname{font-style:italic;color:var(--muted)}
.hb{display:inline-block;font-size:11.5px;font-weight:600;border-radius:5px;padding:0 6px;margin-left:2px;white-space:nowrap;vertical-align:1px}
.hb.s{background:var(--core-bg);color:var(--core-ink)}
.hb.m{background:var(--hover);color:var(--ink)}
.hb.n{color:var(--muted);border:1px solid var(--line)}
.hb.e{background:var(--edge-bg);color:var(--edge-ink);cursor:help}
.hb.w{background:var(--stretch-bg);color:var(--stretch-ink)}
.hrow .inc{font-size:12.5px;color:var(--muted);margin-top:2px}
.hrow .incd{white-space:nowrap}
.hlegend{margin-top:6px;font-size:12.5px}
.hrow .d{width:150px}
@media (max-width:520px){.hrow .d{width:96px;font-size:13.5px}}
/* Static about text and language links (also read by search engines) */
.foot #about{margin-top:12px;line-height:1.5;padding:12px 14px;background:var(--surface);border:1px solid var(--line);border-radius:12px}
.foot .about p{margin:0 0 6px}
.foot .about ul{margin:0 0 8px;padding-left:18px}
.foot .about li{margin:2px 0}
.foot .about .credits{margin:8px 0 0;font-size:11.5px;opacity:.85}
@media (max-width:600px){
  .langmenu{display:grid;grid-template-columns:1fr 1fr;width:min(340px,calc(100vw - 32px));min-width:0;gap:2px}
  .langmenu a{font-size:15px;padding:11px 10px}
  #langBtn{font-size:14px;padding:6px 0 6px 6px}
}
/* Holidays: flag picker and flags on rows */
.flagpick{display:flex;flex-wrap:wrap;gap:6px}
.fbtn{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:5px 6px;cursor:pointer;line-height:0;opacity:.45;filter:grayscale(.6);transition:opacity .12s,filter .12s}
.fbtn:hover{opacity:.8;filter:none}
.fbtn.on{opacity:1;filter:none;border-color:var(--accent);box-shadow:0 0 0 1px var(--accent);background:var(--hover)}
.fbtn img,.flg{display:inline-block;width:24px;height:18px;border-radius:2px;box-shadow:0 0 0 1px rgba(0,0,0,.12);object-fit:cover;vertical-align:-3px}
.hrow .hf{flex:none;width:52px;line-height:0;align-self:center;display:flex;flex-wrap:wrap;gap:3px 4px}
.addcc{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:3px 8px;cursor:pointer;font:inherit;font-size:13.5px;color:var(--ink);margin:2px 4px 2px 0}
.addcc:hover{background:var(--hover)}
.hrow .hf{align-self:flex-start;margin-top:2px}
@media (max-width:520px){
  .hrow{flex-wrap:wrap;row-gap:3px;column-gap:8px}
  .hrow .hf{width:auto;flex-wrap:nowrap;order:0}
  .hrow .d{width:auto;flex:1;order:1}
  .hrow .r{order:2}
  .hrow .n{order:3;flex-basis:100%}
}
/* Tool dock stays on top while scrolling; it gets compact once the page moves */
.dock{position:sticky;top:0;z-index:25;background:var(--bg);transition:padding .15s,box-shadow .15s}
body.scrolled .dock{padding-top:4px;padding-bottom:4px;box-shadow:0 6px 12px -10px rgba(0,0,0,.35)}
body.scrolled .dock a{min-width:58px;padding:5px 6px 6px;gap:2px;font-size:10px;border-radius:10px}
body.scrolled .dock a svg{width:18px;height:18px}
body.scrolled .dock a.on::after{bottom:1px;height:2px}
/* Date calculator */
.dcmodes{display:flex;width:100%}
.dcmodes button{flex:1;padding:10px 8px;font-size:14.5px}
.dc .row{align-items:flex-end}
.dctoday{margin-bottom:9px;font-size:14px}
.dcdur .dcn{width:96px}
.dcunits{display:flex;flex-wrap:wrap;width:100%;border:0;background:none;gap:6px;overflow:visible}
.dcunits button,.dcunits button+button{flex:1 1 auto;border:1px solid var(--line);border-radius:9px;background:var(--surface);padding:9px 12px;color:var(--ink)}
.dcunits button.on{background:var(--accent);border-color:var(--accent);color:var(--accent-ink)}
.dcres{padding:4px 0 2px}
.dcres .sub{margin-top:4px}
.dcquick{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.dcq{display:flex;flex-direction:column;align-items:flex-start;gap:2px;border:1px solid var(--line);background:var(--bg);border-radius:10px;padding:8px 10px;font:inherit;color:var(--ink);cursor:pointer;text-align:left}
.dcq span{font-size:12.5px;color:var(--muted);font-weight:600}
.dcq b{font-size:14px;font-weight:600}
.dcq:hover{border-color:var(--accent)}
.dcq.on{border-color:var(--accent);background:var(--hover)}
.dccc{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:13px;color:var(--muted)}
.dccc .inp{max-width:240px}
@media (max-width:600px){
  .dcmodes button{font-size:13px;padding:10px 4px}
  .dcquick{grid-template-columns:1fr 1fr}
}
/* Currency converter */
.amtrow{display:flex;gap:8px;align-items:center}
.amtrow #amt{flex:1;min-width:0;font-size:18px;font-variant-numeric:tabular-nums}
.amtrow select.inp{flex:none;font-weight:600}
.curout{display:flex;flex-direction:column;gap:12px;min-width:0}
.curtabs{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:12px}
.curtabs .card{padding:12px 12px 6px}
.curtabs .wdt td{font-weight:600}
.note a{color:inherit}
.ratesrc{margin:-6px 0 0;font-size:13.5px;color:var(--muted)}
.ratesrc a{color:inherit}
.ratesrc.old{color:var(--edge-ink)}
.fbtn .fcode{display:block;font-size:10.5px;font-weight:600;line-height:1;margin-top:4px;color:var(--ink);letter-spacing:.02em}
.flg.nofl{background:var(--hover)}
.curtabs h2 .flg,.clock .flg{margin-right:4px}
.ratesrc a{white-space:nowrap}
/* Phones: footer as a bar fixed at the bottom (name + language), about text opens as a sheet above it */
@media (max-width:600px){
  body{padding-bottom:calc(var(--footh,0px) + 24px)}
  .foot{position:fixed;left:0;right:0;bottom:0;z-index:35;margin:0;background:var(--surface);border-top:1px solid var(--line);box-shadow:0 -6px 18px -14px rgba(0,0,0,.35);
    padding:6px max(16px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px))}
  .foot-row{align-items:center;gap:10px;min-height:32px}
  .foot-text{padding:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
  .foot .f2,.foot #aboutSum{display:none}
  .foot .abouthead{display:flex}
  .foot .about{position:absolute;left:0;right:0;bottom:100%;max-height:70vh;overflow-y:auto;overscroll-behavior:contain;background:var(--surface);border-top:1px solid var(--line);border-radius:14px 14px 0 0;box-shadow:0 -10px 28px rgba(0,0,0,.16)}
  .foot #about{margin:0;border:0;border-radius:0;background:none;padding:14px max(16px, env(safe-area-inset-left, 0px)) 12px}
  .hist{padding-bottom:0}
}
.foot .abouthead{display:none;align-items:center;justify-content:space-between;margin:0 0 8px;font-size:15px;color:var(--ink)}
.aboutx{width:34px;height:34px;border:0;border-radius:50%;background:var(--hover);color:var(--muted);font-size:22px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0}
.aboutx:hover{color:var(--ink)}
.foot .aboutsf{margin:14px 0 4px;padding-top:14px;border-top:1px solid var(--line);text-align:center}
.foot .aboutsf p{margin:0 0 4px}
.sflogo{display:inline-block;margin-bottom:8px;line-height:0}
.sflogo img{width:140px;height:auto}
.foot .aboutsf .made{font-style:italic}
.foot .aboutsf .copy{font-size:11.5px;opacity:.85}
@media (max-width:600px){
  .foot #about{padding-top:0}
  .foot .abouthead{display:flex;position:sticky;top:0;z-index:1;background:var(--surface);padding:10px 0 8px;margin:0 0 4px}
}
/* Currency, compact: status pill, currency chips with +, picker list, one table */
.curstat{display:inline-flex;align-items:center}
.pill{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 11px;border-radius:999px;font:inherit;font-size:12.5px;font-weight:600;white-space:nowrap;border:0;background:var(--hover);color:var(--muted)}
.pill.ok{background:var(--core-bg);color:var(--core-ink)}
.pill.ok::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--core-line)}
button.pill.old{cursor:pointer;background:var(--edge-bg);color:var(--edge-ink)}
.topbtns{align-items:center}
.cadd{width:34px;height:34px;border-radius:50%;border:1px dashed var(--muted);background:none;color:var(--ink);font-size:20px;line-height:1;cursor:pointer;padding:0}
.cadd.on{border-style:solid;background:var(--hover)}
.curpick{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:8px;display:flex;flex-direction:column;gap:6px}
.curpick[hidden]{display:none}
.curpick .inp{width:100%}
.curlist{max-height:min(46vh,340px);overflow-y:auto;overscroll-behavior:contain;display:flex;flex-direction:column}
.crow{display:flex;align-items:center;gap:10px;border:0;background:none;border-radius:8px;padding:7px 8px;font:inherit;font-size:14.5px;text-align:left;cursor:pointer;color:var(--ink)}
.crow:hover{background:var(--hover)}
.crow b{width:38px;flex:none}
.crow span{flex:1;min-width:0;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crow i{font-style:normal;color:var(--accent);font-weight:700;width:16px}
.crow.on{background:var(--hover)}
.curtab{background:var(--surface);border:1px solid var(--line);border-radius:12px;margin:0;padding:2px 6px}
.curtab thead th .flg{width:18px;height:13px;margin-right:3px;vertical-align:-1px}
.curtab thead th{color:var(--ink);font-size:13px}
.curtab tr.mine th,.curtab tr.mine td{color:var(--accent);background:var(--hover)}
.curout .note{margin-top:8px}
.foot .sfs{display:none}
@media (max-width:600px){
  .foot{padding-top:2px;padding-bottom:calc(2px + env(safe-area-inset-bottom, 0px))}
  .foot-row{min-height:0}
  .foot-text{font-size:12.5px;line-height:1.3}
  .foot-text .sfl{display:none}
  .foot-text .sfs{display:inline}
  #langBtn{font-size:13px;padding:5px 0 5px 6px}
}
#langNow .lc{display:none}
@media (max-width:600px){ #langNow .ln{display:none} #langNow .lc{display:inline} }
.cadd{display:inline-flex;align-items:center;justify-content:center;line-height:0}
.cadd svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.curstat{display:flex;margin:-4px 0 -2px;min-height:28px}

/* Currency table: header cells are the currencies, last column is the +, first row takes your own amount */
.curtab{padding:2px 4px;overflow-x:auto}
.curtab table{width:100%}
.curtab th.ch{white-space:nowrap}
.curtab .chw{display:inline-flex;align-items:center;gap:0}
.curtab .cc1{display:inline-flex;align-items:center;gap:4px;border:0;background:none;padding:4px 4px;border-radius:7px;font:inherit;font-size:13px;color:var(--ink);cursor:pointer}
.curtab th.base .cc1{background:var(--hover);color:var(--accent)}
.curtab .cc1 .flg{width:18px;height:13px;margin:0}
.curtab .cx{display:inline-flex;align-items:center;justify-content:center;width:20px;height:24px;border:0;background:none;color:var(--muted);padding:0;cursor:pointer;opacity:.6}
.curtab .cx:hover{opacity:1;color:var(--ink)}
.curtab .cx svg{width:11px;height:11px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round}
.curtab .addc{width:30px;padding:2px 2px;text-align:center}
.curtab .addc.wide{width:22%}
.curtab th.addc .cadd{width:28px;height:28px;margin:0 auto}
.curtab th.addc.wide .cadd{width:34px;height:34px}
.curtab tr.mine th{padding:4px 4px 4px 0}
.curtab .amt{width:100%;min-width:84px;box-sizing:border-box;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--ink);font:inherit;font-size:16px;font-weight:600;padding:6px 8px;font-variant-numeric:tabular-nums}
.curtab .amt:focus{outline:2px solid var(--accent);outline-offset:-1px;border-color:transparent}
.curtab .amt::placeholder{font-weight:400;color:var(--muted)}
.curtab tr.mine td{color:var(--accent);font-weight:700}
.curtab tr.mine:not(.has) th,.curtab tr.mine:not(.has) td{background:none}
@media (max-width:600px){.curtab th,.curtab td{padding-left:4px;padding-right:4px;font-size:13.5px}.curtab .cc1{font-size:12.5px;padding:3px}.curtab .amt{min-width:72px;padding:5px 6px}}

/* Footer: mini Starfish mark in the bar; the sheet opens on the Starfish sign-off, the rest is folded below */
.sfmini{width:14px;height:14px;vertical-align:-2px;margin-right:4px}
.foot .abouthead{justify-content:flex-end}
.foot .aboutsf{margin:0 0 10px;padding-top:0;border-top:0}
.foot .amore{border-top:1px solid var(--line);padding-top:8px}
.foot .amore summary{width:auto;font-size:12px;color:var(--muted);padding:4px 0;list-style:none;display:flex;align-items:center;justify-content:center;gap:6px}
.foot .amore summary::-webkit-details-marker{display:none}
.foot .amore summary::after{content:"";width:5px;height:5px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg) translateY(-2px)}
.foot .amore[open] summary::after{transform:rotate(-135deg)}
.foot .amore[open] summary{margin-bottom:8px}
@media (max-width:600px){.foot .abouthead{padding:8px 0 0;margin:0;background:none;height:0;overflow:visible}.foot .abouthead .aboutx{position:relative;top:0;z-index:2}.foot #about{padding-top:10px}}
@media (min-width:601px){.foot .aboutsf p:not(.made):not(.copy){display:none}}
@media (max-width:600px){.foot-text .sfmini{width:13px;height:13px;margin-right:3px}}
@media (max-width:600px){.foot-text{font-size:12px}#langNow .flags svg+svg{display:none}}
@media (max-width:600px){.foot-row{gap:6px}#langBtn{gap:3px}}
@media (max-width:600px){.foot-text{letter-spacing:-.1px}}
/* Currency round 3: × as a small corner badge so the code stays right above its numbers */
.curtab thead th.ch{position:relative;padding-top:10px;padding-bottom:4px;text-align:right}
.curtab thead th.ch.base{text-align:left}
.curtab .chw{display:inline-block}
.curtab .cc1{padding:3px 0 3px 2px}
.curtab th.base .cc1{padding:3px 6px 3px 4px}
.curtab .cx{position:absolute;top:-1px;right:-3px;width:18px;height:18px;border-radius:50%;opacity:.5}
.curtab th.base .cx{right:auto;left:calc(100% - 15px)}
.curtab .cx svg{width:9px;height:9px}
.pill.ok a{color:inherit;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:2px}
/* Add-currency list: list first, search glued to the bottom */
.curpick .pickhead{display:flex;align-items:center;justify-content:space-between;padding:0 2px 2px}
.curpick .pickhead b{font-size:14px}
.curpick .pickhead .aboutx{width:30px;height:30px;font-size:20px}
@media (max-width:600px){
  .curpick{position:fixed;left:0;right:0;bottom:var(--footh,0px);z-index:36;border-radius:14px 14px 0 0;border:0;border-top:1px solid var(--line);box-shadow:0 -10px 28px rgba(0,0,0,.18);padding:10px 12px 10px;max-height:62vh}
  .curpick .curlist{flex:1;max-height:none;min-height:0}
  .curpick .inp{flex:none;font-size:16px}
}
.curtab .chw{position:relative}
.curtab .cx,.curtab th.base .cx{top:-11px;right:-10px;left:auto}

/* Starfish block: transparent logo (white wordmark in dark mode), tagline on its own line, © folded into Details */
.sflogo .lgd{display:none}
@media (prefers-color-scheme: dark){ :root:not([data-theme="light"]) .sflogo .lgl{display:none} :root:not([data-theme="light"]) .sflogo .lgd{display:inline} }
:root[data-theme="dark"] .sflogo .lgl{display:none}
:root[data-theme="dark"] .sflogo .lgd{display:inline}
.foot .aboutsf .tagl{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.foot .amore .copy{font-size:11.5px;opacity:.85;margin:8px 0 0}
/* Drag a currency column to reorder it */
.curtab thead th.ch{touch-action:pan-y;cursor:grab;user-select:none;-webkit-user-select:none}
.curtab.dragging,#tab.dragging{cursor:grabbing}
#tab .dragcol{position:relative;z-index:2;background:var(--hover);opacity:.92;transition:none}
#tab thead th.dropl{box-shadow:inset 3px 0 0 var(--accent)}
#tab thead th.dropr{box-shadow:inset -3px 0 0 var(--accent)}
/* Base column stays put while scrolling sideways through many currencies */
.curtab tr > :first-child{position:sticky;left:0;z-index:3;background:var(--surface);box-shadow:6px 0 6px -6px rgba(0,0,0,.18)}
.curtab tr.mine > :first-child{background:var(--surface)}
.curtab tr.mine.has > :first-child{background:var(--hover)}
.curtab{padding-left:0;padding-right:0}
.curtab thead th.ch.base{position:sticky;left:0;z-index:4}
.curtab tr > :first-child{padding-left:8px}
.curtab tr.mine > th:first-child{padding-left:6px}
/* "Your amount" looks like a normal row: same font, only a soft tint marks the field */
.curtab tr.mine > th:first-child{padding:3px 4px 3px 4px}
.curtab .amt{font-size:inherit;font-weight:600;border:0;border-radius:6px;background:var(--hover);padding:4px 4px;min-width:0;width:100%;line-height:inherit}
.curtab tr.mine td{font-weight:600}
.curtab tr.mine.has > :first-child,.curtab tr.mine.has td{background:none}
.curtab tr.mine td{color:var(--accent)}
@supports (-webkit-touch-callout: none){ .curtab .amt{font-size:16px} }  /* iOS zooms into smaller inputs */
@media (max-width:600px){ .curtab .amt{min-width:0;padding:4px 4px} }
.curtab .amt{font-size:15.5px;max-width:170px;display:block}
@media (max-width:600px){ .curtab .amt{font-size:13.5px} }
@supports (-webkit-touch-callout: none){ .curtab .amt{font-size:16px} }
/* Rates pill sits on the title row, next to the share button */
.topbtns .curstat{margin:0;min-height:0}
.topbtns .pill{height:24px;padding:0 9px;font-size:11.5px;gap:5px}
.topbtns .pill.ok::before{width:6px;height:6px}

.top:has(#stat){align-items:center}
.pill .ps{display:none}
@media (max-width:600px){ .topbtns .pill .pl{display:none} .topbtns .pill .ps{display:inline} .top:has(#stat) h1{white-space:normal;font-size:20px} }
@media (max-width:600px){ .top:has(#stat){gap:8px} .top:has(#stat) h1{font-size:19px} }
.topbtns button.pill.old{height:24px;padding:0 9px;font-size:11.5px}
/* Table packs left: base column fits about 7 digits ("1,000,000"), other columns sit right next to it, then the + */
.curtab table{width:auto}
.curtab tr > :first-child{width:6.6em;min-width:6.6em;max-width:6.6em}
.curtab .addc,.curtab .addc.wide{width:auto}
.curtab th.addc.wide .cadd{width:28px;height:28px}
.curtab th.ch:not(.base),.curtab td{padding-left:12px}
/* the amount field reads clearly as a field */
.curtab .amt{background:color-mix(in srgb, var(--accent) 12%, var(--surface));box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);border-radius:6px}
.curtab .amt::placeholder{color:color-mix(in srgb, var(--accent) 70%, var(--muted))}
.curtab .amt:focus{outline:2px solid var(--accent);outline-offset:-1px;box-shadow:none}
/* Phones: full pill text, age on a second line so it fits beside the title */
@media (max-width:600px){
  .topbtns .pill .pl{display:inline}
  .topbtns .pill{height:auto;min-height:24px;padding:3px 9px;font-size:11px;line-height:1.2;border-radius:12px;white-space:normal;text-align:left}
  .topbtns .pill.ok{display:grid;grid-template-columns:auto auto;column-gap:5px;align-items:center}
  .topbtns .pill.ok::before{grid-row:1 / span 2}
  .topbtns .pill.ok .pl,.topbtns .pill.ok .pa{grid-column:2;white-space:nowrap}
  .topbtns button.pill.old{max-width:120px}
  .top:has(#stat) h1{font-size:20px}
}
@media (max-width:600px){
  .top:has(#stat) h1{font-size:18px}
  .top:has(#stat) .topbtns{gap:6px}
  .top:has(#stat) .topbtns .pill{font-size:10.5px;padding:3px 8px}
  .top:has(#stat) #shareBtn{width:30px;height:30px}
}
/* Wise referral link under the table */
.curout .wise{align-self:flex-start;display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:600;color:var(--accent);text-decoration:none;padding:6px 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface)}
.curout .wise:hover{border-color:var(--accent)}
.curout .wisebox{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:10px 12px;border:1px dashed var(--line);border-radius:12px}
.curout .wisebox p{margin:0;flex:1 1 220px;font-size:13px;color:var(--muted);line-height:1.4}
.curout .wisebox .wise{align-self:auto;flex:none}
/* Phones: tighter columns so 4-5 currencies fit without hiding numbers behind the frozen first column */
@media (max-width:600px){
  .curtab th.ch:not(.base),.curtab td{padding-left:6px;padding-right:4px}
  .curtab tr > :first-child{width:6em;min-width:6em;max-width:6em}
  .curtab th,.curtab td{font-size:13px}
  .curtab .amt{font-size:13px}
}
/* ---------- Personal look: colour, background, text size (Settings) ---------- */
:root[data-accent="blue"]{--accent:#2457c5} :root[data-accent="violet"]{--accent:#6a3fc1} :root[data-accent="rose"]{--accent:#b4235a} :root[data-accent="orange"]{--accent:#b24d0c} :root[data-accent="green"]{--accent:#1f7a45}
:root[data-bg="sand"]{--bg:#f5f0e6} :root[data-bg="mint"]{--bg:#ecf5f0} :root[data-bg="lavender"]{--bg:#f1eff8} :root[data-bg="sky"]{--bg:#eaf2fa}
@media (prefers-color-scheme: dark){
  :root[data-accent="blue"]:not([data-theme="light"]){--accent:#7ea6f5} :root[data-accent="violet"]:not([data-theme="light"]){--accent:#b49af0} :root[data-accent="rose"]:not([data-theme="light"]){--accent:#f28bb3} :root[data-accent="orange"]:not([data-theme="light"]){--accent:#f3a061} :root[data-accent="green"]:not([data-theme="light"]){--accent:#6fd39b}
  :root[data-bg="sand"]:not([data-theme="light"]){--bg:#17140f} :root[data-bg="mint"]:not([data-theme="light"]){--bg:#0e1813} :root[data-bg="lavender"]:not([data-theme="light"]){--bg:#14121c} :root[data-bg="sky"]:not([data-theme="light"]){--bg:#0d1520}
}
:root[data-theme="dark"][data-accent="blue"]{--accent:#7ea6f5} :root[data-theme="dark"][data-accent="violet"]{--accent:#b49af0} :root[data-theme="dark"][data-accent="rose"]{--accent:#f28bb3} :root[data-theme="dark"][data-accent="orange"]{--accent:#f3a061} :root[data-theme="dark"][data-accent="green"]{--accent:#6fd39b}
:root[data-theme="dark"][data-bg="sand"]{--bg:#17140f} :root[data-theme="dark"][data-bg="mint"]{--bg:#0e1813} :root[data-theme="dark"][data-bg="lavender"]{--bg:#14121c} :root[data-theme="dark"][data-bg="sky"]{--bg:#0d1520}
:root[data-size="l"] .wrap{zoom:1.14}
.chip{border-color:color-mix(in srgb,var(--accent) 22%,var(--line))}
/* Settings sheet */
.setsheet{position:fixed;inset:0;z-index:60;background:rgba(10,18,25,.42);display:flex;align-items:flex-start;justify-content:center;padding:64px 16px 16px;overflow:auto}
.setbox{width:100%;max-width:420px;background:var(--surface);color:var(--ink);border-radius:16px;padding:14px 18px 16px;box-shadow:0 18px 48px rgba(0,0,0,.28)}
.sethead{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px;font-size:17px}
.setrow{display:flex;flex-direction:column;gap:6px;padding:10px 0;border-top:1px solid var(--line)}
.setl{font-size:13px;color:var(--muted);font-weight:600}
.seg{display:flex;border:1px solid var(--line);border-radius:10px;overflow:hidden}
.seg button{flex:1;border:0;background:none;padding:8px 6px;font-size:14px;cursor:pointer;color:var(--ink)}
.seg button+button{border-left:1px solid var(--line)}
.seg button.on{background:var(--accent);color:var(--accent-ink);font-weight:700}
.sw{display:flex;gap:10px;flex-wrap:wrap}
.sw button{width:34px;height:34px;border-radius:50%;border:2px solid var(--line);background:var(--c);cursor:pointer;padding:0}
.sw button.on{border-color:var(--ink);box-shadow:0 0 0 2px var(--surface) inset}
.setfoot{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding-top:12px;border-top:1px solid var(--line)}
.setnote{flex-basis:100%;margin:0;font-size:12.5px;color:var(--muted)}
/* Plan the chosen hour */
.strip td{cursor:pointer}
.strip td.past,.strip td.rmc{cursor:default}
.strip td.pick{box-shadow:inset 0 0 0 3px var(--accent)}
.plan{margin-top:12px;padding:12px 14px;border:1px solid var(--line);border-left:4px solid var(--accent);border-radius:10px;background:var(--surface)}
.plant{margin:0 0 10px;font-size:14.5px}

.planb{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.plabel{font-size:13px;color:var(--muted);margin-right:2px}
.planb .btn{text-decoration:none;display:inline-flex;align-items:center}
.btn.pri{background:var(--accent);color:var(--accent-ink);border-color:var(--accent);font-weight:700}
.planh{margin:8px 0 0;font-size:12.5px;color:var(--muted)}
.planb a.btn{color:var(--ink)}
.plansf{margin:8px 0 0;font-size:12.5px;color:var(--muted)}
.plansf a{color:inherit;text-decoration:underline;text-underline-offset:2px}
.workh{display:inline-flex;align-items:center;gap:6px}
.workh select{font:inherit;font-weight:600;font-size:14px;color:var(--ink);background:var(--surface);border:1px solid var(--line);border-radius:9px;padding:6px 8px}
.plandst{margin:10px 0 0;padding:8px 10px;font-size:13px;line-height:1.45;border-radius:8px;background:color-mix(in srgb,#e0a100 14%,var(--surface));color:var(--ink)}
.plandst::before{content:"⏰ "}
