/* ============ dashboard ============ */
.banner { position: relative; display: flex; align-items: center; gap: 24px; min-height: 210px; padding: 30px 34px; border-radius: 22px; color: #1f2421; overflow: hidden; margin: 6px 0 18px; isolation: isolate; animation: rise 500ms var(--ease); }
.banner::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(600px 220px at 90% 110%, rgb(255 255 255 / .35), transparent 70%); }
.banner.on-dark { color: #f5f1ea; }
.banner .eyebrow { color: inherit; opacity: .7; }
.banner h1 { font-size: clamp(28px, 3.6vw, 40px); }
.banner .sub { margin-top: 8px; font-size: 15px; opacity: .85; }
.banner blockquote { margin-top: 14px; font-size: 14px; font-style: italic; opacity: .72; max-width: 46ch; }
.banner-text { flex: 1; min-width: 0; }
.banner-buddy { flex: none; margin-right: 10px; animation: buddy-in 700ms var(--spring) 150ms both; }
.banner-buddy .mascot { filter: drop-shadow(0 14px 18px rgb(0 0 0 / .14)); }
.banner-edit { position: absolute; top: 12px; right: 12px; color: inherit; opacity: 0; background: rgb(255 255 255 / .25); backdrop-filter: blur(6px); }
.banner:hover .banner-edit, .banner-edit:focus-visible { opacity: 1; }
.banner-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.banner-pick label { position: relative; cursor: pointer; }
.banner-pick span { display: block; height: 54px; border-radius: 12px; transition: transform 200ms var(--spring), box-shadow 200ms; }
.banner-pick em { display: block; font-style: normal; font-size: 12px; text-transform: capitalize; color: var(--muted); margin-top: 4px; text-align: center; }
.banner-pick input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); transform: scale(1.03); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; animation: rise 450ms var(--ease) both; }
.stat:nth-child(2) { animation-delay: 40ms; } .stat:nth-child(3) { animation-delay: 80ms; } .stat:nth-child(4) { animation-delay: 120ms; }
.stat-label { font-size: 13px; color: var(--muted); font-weight: 500; }
.stat b { font: 800 30px/1.15 var(--display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 3px; }
.stat .muted { font-size: 12px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid > .card { animation: rise 500ms var(--ease) both; }
.grid > .card:nth-child(2) { animation-delay: 60ms; } .grid > .card:nth-child(3) { animation-delay: 100ms; } .grid > .card:nth-child(n+4) { animation-delay: 140ms; }
.span-2 { grid-column: span 2; grid-row: span 2; }
.more { display: block; margin: 8px 0 0 12px; }
.agenda li button, .activity li { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 8px; border-radius: 10px; text-align: left; font-size: 14px; }
.agenda li button:hover { background: var(--surface-2); }
.agenda .muted, .activity time { font-size: 12px; white-space: nowrap; }
.ag-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex: none; }
.activity li { justify-content: space-between; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.activity li:last-child { border: 0; }
.activity li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 130px; padding-top: 6px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; }
.bar i { width: 100%; max-width: 26px; height: max(4px, var(--h)); border-radius: 6px 6px 3px 3px; background: color-mix(in oklab, var(--accent) 35%, var(--surface-2)); transform-origin: bottom; animation: bar-up 700ms var(--ease) both; }
.bar:nth-child(2) i { animation-delay: 40ms; } .bar:nth-child(3) i { animation-delay: 80ms; } .bar:nth-child(4) i { animation-delay: 120ms; } .bar:nth-child(5) i { animation-delay: 160ms; } .bar:nth-child(6) i { animation-delay: 200ms; } .bar:nth-child(7) i { animation-delay: 240ms; }
.bar.today i { background: var(--accent); }
.bar span { font-size: 11px; color: var(--dim); font-weight: 600; }
.progress-list li { margin-bottom: 12px; }
.progress-list a { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; }
.progress-list a:hover { color: var(--accent-ink); }
.progress-list .muted { font-size: 12px; }

/* ============ calendar ============ */
.cal-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 14px; align-items: start; }
.cal { padding: 12px; overflow: hidden; }
.cal.slide-l .cal-grid { animation: slide-l 360ms var(--ease); }
.cal.slide-r .cal-grid { animation: slide-r 360ms var(--ease); }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); padding: 4px 0 8px; }
.cal-head span { text-align: center; font-size: 12px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.day { position: relative; min-height: 96px; padding: 6px; border-radius: 10px; text-align: left; display: flex; flex-direction: column; gap: 3px; border: 1px solid transparent; transition: background var(--t), border-color var(--t); overflow: hidden; }
.day:hover { background: var(--surface-2); }
.day.other { opacity: .4; }
.day.sel { border-color: var(--accent); background: var(--accent-soft); }
.dn { font-size: 13px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.day.today .dn { background: var(--accent); color: #fff; }
.day-items { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ev-chip { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: color-mix(in oklab, var(--c) 18%, transparent); color: color-mix(in oklab, var(--c) 70%, var(--text)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day .more { font-size: 11px; color: var(--muted); margin: 0 0 0 4px; }
.tk-dots { display: flex; gap: 3px; margin-top: auto; padding-left: 4px; }
.tk-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--warn); }
.tk-dots i.done { background: var(--dim); }
.day-panel { position: sticky; top: 76px; animation: rise 400ms var(--ease); }
.mini-h { font: 700 11px var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin: 16px 0 8px; }
.timeline li button { display: flex; flex-direction: column; width: 100%; text-align: left; padding: 9px 12px; border-left: 3px solid var(--c); border-radius: 4px 10px 10px 4px; background: color-mix(in oklab, var(--c) 8%, transparent); margin-bottom: 6px; transition: transform var(--t) var(--ease); }
.timeline li button:hover { transform: translateX(3px); }
.timeline time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timeline small { color: var(--muted); font-size: 12px; }
.date-flag { display: flex; align-items: center; gap: 6px; width: 100%; padding: 8px 10px; border-radius: 10px; background: color-mix(in oklab, var(--warn) 12%, transparent); color: var(--warn); font-weight: 600; font-size: 13px; margin-top: 4px; }
.tasks.compact .task { padding: 2px; }
.timeline li button.cancelled b { text-decoration: line-through; opacity: .6; }
.ls-count { font-size: 11px; font-weight: 600; color: var(--muted); padding-left: 4px; }
.cal-title { flex-wrap: wrap; row-gap: 10px; }
.untis-hint { margin-top: 8px; }
.steps { padding-left: 20px; display: grid; gap: 8px; margin-bottom: 12px; }
.steps code { font-size: 12px; padding: 1px 5px; border-radius: 5px; background: var(--surface-2); }
.lessons-link { text-decoration: underline; text-underline-offset: 3px; }

/* week / day time grid */
.tg-card { padding: 8px 12px 12px; overflow-x: auto; }
.tg-card.slide-l .tg { animation: slide-l 360ms var(--ease); }
.tg-card.slide-r .tg { animation: slide-r 360ms var(--ease); }
.tg { --gut: 52px; min-width: 640px; }
.tg.tg-one { min-width: 0; }
.tg-row { display: grid; grid-template-columns: var(--gut) repeat(var(--cols), minmax(0, 1fr)); }
.tg-head { padding-bottom: 6px; }
.tg-dh { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 10px; transition: background var(--t); }
.tg-dh:hover { background: var(--surface-2); }
.tg-dh small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--dim); }
.tg-dh b { font: 700 18px/1 var(--display); width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; }
.tg-dh.today b { background: var(--accent); color: #fff; }
.tg-dh.sel:not(.today) b { box-shadow: inset 0 0 0 2px var(--accent); }
.tg-allday { border-top: 1px solid var(--line); padding: 4px 0; }
.tg-lbl { font-size: 10px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; align-self: center; }
.tg-ad { display: flex; flex-direction: column; gap: 2px; padding: 0 2px; min-width: 0; }
.tg-chip { font-size: 11px; font-weight: 600; text-align: left; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; --c: var(--accent); background: color-mix(in oklab, var(--c) 16%, transparent); color: color-mix(in oklab, var(--c) 70%, var(--text)); }
.tg-chip.flag { --c: var(--warn); display: flex; align-items: center; gap: 4px; }
.tg-chip.task { --c: var(--warn); background: transparent; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 45%, transparent); }
.tg-chip.task.done, .tg-chip.cancelled { text-decoration: line-through; opacity: .55; }
.tg-body { position: relative; border-top: 1px solid var(--line); }
.tg-times span { display: block; height: var(--hh); font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; transform: translateY(-7px); padding-right: 8px; text-align: right; }
.tg-times span:first-child { visibility: hidden; }
.tg-col { position: relative; border-left: 1px solid var(--line); cursor: copy; background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--hh) - 1px), var(--line) calc(var(--hh) - 1px) var(--hh)); }
.tg-col.today { background-color: color-mix(in oklab, var(--accent) 4%, transparent); }
.tg-ev { position: absolute; display: flex; flex-direction: column; justify-content: flex-start; gap: 1px; padding: 3px 6px; margin-left: 2px; border-radius: 6px; text-align: left; overflow: hidden; cursor: pointer; border-left: 3px solid var(--c); background: color-mix(in oklab, var(--c) 16%, var(--surface)); color: color-mix(in oklab, var(--c) 55%, var(--text)); transition: transform var(--t) var(--ease), box-shadow var(--t); }
.tg-ev:hover { z-index: 2; box-shadow: var(--shadow); transform: translateY(-1px); }
.tg-ev b { font-size: 12px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-ev small { font-size: 11px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.tg-ev.short { flex-direction: row; align-items: center; gap: 6px; padding-block: 1px; }
.tg-ev.cancelled { background: repeating-linear-gradient(135deg, color-mix(in oklab, var(--c) 8%, var(--surface)) 0 6px, var(--surface) 6px 12px); opacity: .7; }
.tg-ev.cancelled b { text-decoration: line-through; }
.tg-now { position: absolute; left: -1px; right: 0; height: 2px; background: var(--danger); z-index: 2; pointer-events: none; }
.tg-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

/* ============ dates ============ */
.countdown { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; cursor: pointer; background: linear-gradient(120deg, var(--surface), color-mix(in oklab, var(--accent) 10%, var(--surface))); transition: transform var(--t) var(--ease), box-shadow var(--t); animation: rise 450ms var(--ease); }
.countdown:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.cd-num { text-align: center; flex: none; }
.cd-num b { display: block; font: 800 56px/1 var(--display); letter-spacing: -0.04em; color: var(--accent-ink); }
.cd-num span { font-size: 13px; color: var(--muted); }
.date-list { display: flex; flex-direction: column; gap: 8px; }
.date-list li { animation: rise 350ms var(--ease) both; }
.date-list button { display: flex; align-items: center; gap: 16px; width: 100%; padding: 12px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: transform var(--t) var(--ease), border-color var(--t); }
.date-list button:hover { transform: translateX(4px); border-color: var(--line-2); }
.date-list button.past { opacity: .55; }
.cal-tile { display: flex; flex-direction: column; align-items: center; width: 48px; flex: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.cal-tile small { width: 100%; text-align: center; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; padding: 2px 0; }
.cal-tile b { font: 800 20px/1.5 var(--display); }
.dl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dl-when { font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* ============ mind map ============ */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.map-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; transition: transform var(--t) var(--ease), box-shadow var(--t); animation: rise 400ms var(--ease) both; }
.map-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.map-card div { display: flex; flex-direction: column; }
.map-card .muted { font-size: 12px; }
.map-thumb { width: 100%; height: 130px; background: var(--surface-2); border-radius: 10px; }
.mm { display: flex; flex-direction: column; height: calc(100dvh - 90px); gap: 10px; }
.mm-top { display: flex; align-items: center; gap: 8px; }
.mm-name { font: 800 22px var(--display); letter-spacing: -0.02em; border: 0; background: none; outline: 0; padding: 4px 8px; border-radius: 8px; min-width: 0; flex: 0 1 420px; }
.mm-name:hover, .mm-name:focus { background: var(--surface); }
.mm-k { min-width: 60px; justify-content: center; font-variant-numeric: tabular-nums; }
.mm-body { flex: 1; display: flex; gap: 12px; min-height: 0; }
.mm-canvas { flex: 1; position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); cursor: grab; touch-action: none; outline: 0;
  background: var(--surface) radial-gradient(circle, var(--line-2) 1px, transparent 1.2px) 0 0 / 22px 22px; }
.mm-canvas.panning { cursor: grabbing; }
.mm-canvas:focus-visible { box-shadow: 0 0 0 3px var(--accent-soft); }
.mm-layer { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.mm-edges { position: absolute; overflow: visible; }
.mm-edges path { fill: none; stroke-width: 2.2; opacity: .55; stroke-linecap: round; }
.mm-node { position: absolute; transform: translate(-50%, -50%); padding: 9px 16px; border-radius: 14px; background: var(--surface); border: 2px solid color-mix(in oklab, var(--c) 55%, transparent); font-weight: 600; font-size: 14px; white-space: nowrap; max-width: 260px; box-shadow: var(--shadow-sm); cursor: pointer; user-select: none; transition: box-shadow 200ms, border-color 200ms, transform 200ms var(--spring); }
.mm-node .mm-text { display: block; overflow: hidden; text-overflow: ellipsis; outline: 0; }
.mm-node .mm-text[contenteditable="plaintext-only"], .mm-node .mm-text[contenteditable="true"] { cursor: text; user-select: text; text-overflow: clip; min-width: 40px; }
.mm-node:hover { box-shadow: var(--shadow); }
.mm-node.root { background: var(--c); color: #fff; border-color: transparent; font-size: 16px; padding: 12px 22px; border-radius: 18px; }
.mm-node.sel { box-shadow: 0 0 0 4px color-mix(in oklab, var(--c) 30%, transparent), var(--shadow); border-color: var(--c); }
.mm-node.dragging { transform: translate(-50%, -50%) scale(1.06); box-shadow: var(--shadow-lg); cursor: grabbing; transition: none; }
.mm-node.pop { animation: node-pop 380ms var(--spring); }
.mm-note-dot { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--c); border: 2px solid var(--surface); }
.mm-hint { position: absolute; left: 14px; bottom: 12px; font-size: 12px; color: var(--dim); pointer-events: none; }
.mm-panel { width: 0; padding: 0; opacity: 0; overflow: hidden; transition: width 300ms var(--ease), padding 300ms var(--ease), opacity 200ms; display: flex; flex-direction: column; gap: 14px; }
.mm-panel.open { width: 290px; padding: 20px; opacity: 1; overflow-y: auto; }
.mm-panel:not(.open) { width: 220px; padding: 20px; opacity: 1; }
.mm-actions { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============ focus ============ */
.focus-wrap { display: grid; grid-template-columns: 1fr 320px; gap: 14px; align-items: start; }
.focus-card { display: flex; flex-direction: column; align-items: center; gap: 24px; padding: 30px; transition: background 600ms var(--ease); }
.focus-card.running.mode-focus { background: linear-gradient(180deg, var(--surface), color-mix(in oklab, var(--accent) 7%, var(--surface))); }
.focus-card.mode-break { --accent: #4f9bd1; }
.ring { position: relative; width: min(340px, 80vw); aspect-ratio: 1; }
.ring > svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring > svg circle { fill: none; stroke-width: 9; }
.ring-bg { stroke: var(--surface-2); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--p)); opacity: min(1, calc(var(--p) * 400)); transition: stroke-dashoffset 300ms linear, stroke 400ms; }
.ring-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.ring-time { font: 800 clamp(48px, 9vw, 72px)/1 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.ring-buddy { margin-bottom: 8px; }
.running .ring { animation: breathe-ring 5s ease-in-out infinite; }
.focus-controls { display: flex; align-items: center; gap: 14px; }
.focus-task { width: min(420px, 100%); }
.tomatoes { display: flex; flex-wrap: wrap; gap: 8px; min-height: 30px; }
.tomatoes i { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); animation: node-pop 400ms var(--spring) both; }

/* ============ settings ============ */
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.set-sec { display: flex; flex-direction: column; gap: 4px; }
.set-h { margin-bottom: 10px; }
.set-h p { font-size: 13px; margin-top: 2px; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.set-row > span { font-weight: 500; font-size: 14px; }
.set-row .input { width: 200px; }
.mascot-sec { grid-row: span 2; }
.mascot-stage { display: grid; place-items: center; height: 200px; border-radius: 16px; margin: 4px 0 8px;
  background: radial-gradient(circle at 50% 80%, color-mix(in oklab, var(--buddy) 20%, transparent), transparent 60%), var(--surface-2); }
.mood-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-bottom: 10px; }
.color-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.custom-color { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 1.5px dashed var(--line-2); display: grid; place-items: center; color: var(--muted); cursor: pointer; overflow: hidden; }
.custom-color input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.custom-color:hover { border-color: var(--accent); color: var(--accent); }
.switch { position: relative; width: 44px; height: 26px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--line-2); transition: background var(--t); }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform 260ms var(--spring); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(18px); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper input { width: 72px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); text-align: center; outline: 0; }
.stepper input:focus { border-color: var(--accent); }
.stepper em { font-style: normal; color: var(--muted); font-size: 13px; }

/* ============ keyframes ============ */
@keyframes bar-up { from { transform: scaleY(0); } }
@keyframes slide-l { from { opacity: 0; transform: translateX(24px); } }
@keyframes slide-r { from { opacity: 0; transform: translateX(-24px); } }
@keyframes node-pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.6); } }
.tomatoes i { animation-name: tomato-pop; }
@keyframes tomato-pop { from { opacity: 0; transform: scale(.5); } }
@keyframes breathe-ring { 50% { transform: scale(1.015); } }
@keyframes buddy-in { from { opacity: 0; transform: translateY(20px) scale(.85); } }

/* ============ responsive ============ */
@media (max-width: 1100px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .span-2 { grid-row: auto; }
  .cal-wrap, .focus-wrap { grid-template-columns: 1fr; }
  .day-panel { position: static; }
  .settings { grid-template-columns: 1fr; }
  .mascot-sec { grid-row: auto; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar-slot { display: contents; }
  .sb-toggle { display: none; }
  .top-crumbs { display: none; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 40; background: var(--surface); transform: translateX(-100%); transition: transform 320ms var(--ease); box-shadow: var(--shadow-lg); }
  .nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgb(0 0 0 / .3); opacity: 0; pointer-events: none; transition: opacity 300ms; }
  .nav-open .scrim { opacity: 1; pointer-events: auto; }
  #menu-btn { display: inline-grid; }
  .stats { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .banner { padding: 24px; min-height: 0; }
  .banner-buddy { display: none; }
  .day { min-height: 58px; }
  .ev-chip { display: none; }
  .search { margin-left: 0; width: 100%; }
  .row-3 { grid-template-columns: 1fr 1fr; }
  .row-3 > :first-child { grid-column: span 2; }
  .mm-body { flex-direction: column; }
  .mm-panel.open, .mm-panel:not(.open) { width: auto; }
  .mm-panel:not(.open) { display: none; }
  .mm-hint { display: none; }
  .row-del { opacity: 1; }
  .buddy { right: 12px; bottom: 10px; }
  .buddy-art .mascot { width: 48px; height: 38px; }
}
@media (max-width: 480px) {
  .row-2 { grid-template-columns: 1fr; }
  .emoji-grid { grid-template-columns: repeat(6, 1fr); }
  .cd-num b { font-size: 40px; }
}

/* ============ shortcuts ============ */
.site-ic { position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; overflow: hidden;
  background: hsl(var(--h) 45% 92%); color: hsl(var(--h) 45% 32%); font: 800 15px var(--display); }
[data-theme="dark"] .site-ic { background: hsl(var(--h) 25% 22%); color: hsl(var(--h) 50% 78%); }
.site-ic img { position: absolute; inset: 0; margin: auto; width: 60%; height: 60%; object-fit: contain; background: inherit; }
.site-ic.lg { width: 52px; height: 52px; border-radius: 14px; font-size: 20px; }
.site-ic.lg img { width: 56%; height: 56%; }

.link-add { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; margin-bottom: 18px; transition: border-color var(--t), box-shadow var(--t); }
.link-add:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.link-add-ic { color: var(--muted); display: grid; }
.link-add input { border: 0; outline: 0; background: none; color: var(--text); height: 38px; min-width: 0; font-size: 15px; }
.link-add #link-url { flex: 2; }
.link-add #link-name { flex: 1; border-left: 1px solid var(--line); padding-left: 12px; }

.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; margin-bottom: 22px; }
.link-tile { position: relative; animation: rise 350ms var(--ease) both; }
.link-tile > a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px 14px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); text-align: center; transition: transform var(--t) var(--ease), box-shadow var(--t), border-color var(--t); }
.link-tile > a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.link-tile > a .site-ic { margin-bottom: 6px; }
.link-tile b { font-size: 14px; font-weight: 600; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-tile small { font-size: 12px; color: var(--dim); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-edit { position: absolute; top: 6px; right: 6px; opacity: 0; }
.link-tile:hover .tile-edit, .tile-edit:focus-visible { opacity: 1; }
@media (hover: none) { .tile-edit { opacity: .7; } }

.suggest .card-h h3 { display: flex; align-items: center; gap: 6px; }
.suggest .card-h h3 .ic { color: var(--accent); }
.suggest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; transition: opacity var(--t); }
.suggest-grid.is-loading { opacity: .5; pointer-events: none; }
.sg-card { display: grid; grid-template-columns: auto 1fr auto; align-items: start; column-gap: 12px; row-gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); animation: rise 380ms var(--ease) both; transition: border-color var(--t); }
.sg-card:hover { border-color: var(--line-2); }
.sg-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sg-main a { display: inline-flex; align-items: center; gap: 4px; align-self: flex-start; max-width: 100%; }
.sg-main a b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-main a .ic { flex: none; color: var(--dim); opacity: 0; transform: translateX(-3px); transition: opacity var(--t), transform var(--t) var(--ease); }
.sg-main a:hover b { text-decoration: underline; }
.sg-main a:hover .ic, .sg-main a:focus-visible .ic { opacity: 1; transform: none; }
.sg-main small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-x { margin: -4px -4px 0 0; color: var(--dim); }
.sg-foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sg-foot em { font-style: normal; font-size: 12px; color: var(--accent-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; flex: none; }
.sg-card.skeleton { height: 112px; border-style: dashed; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%) 0 0 / 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.suggest-foot { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 12px; }
.spin { display: inline-grid; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(-360deg); } }
.set-row.inline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.quick-launch { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: -4px 0 18px; scrollbar-width: thin; }
.quick-launch a { display: flex; align-items: center; gap: 8px; flex: none; height: 46px; padding: 0 14px 0 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600; transition: transform var(--t) var(--ease), border-color var(--t); animation: rise 450ms var(--ease) both; }
.quick-launch a:hover { transform: translateY(-2px); border-color: var(--line-2); }
.quick-launch .site-ic { width: 32px; height: 32px; border-radius: 9px; }
.quick-launch .ql-all { padding-left: 14px; color: var(--muted); }

@media (max-width: 640px) {
  .link-add { flex-wrap: wrap; padding: 10px; }
  .link-add #link-url { flex-basis: calc(100% - 40px); }
  .link-add #link-name { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
}
[data-motion="reduced"] .spin, [data-motion="reduced"] .sg-card.skeleton { animation: none; }
