:root {
  --accent: #7CC4B8;
  --text: #F2F5F7;
  --text-60: rgba(242, 245, 247, .6);
  --text-38: rgba(242, 245, 247, .38);
  --text-14: rgba(242, 245, 247, .14);
  --text-08: rgba(242, 245, 247, .08);
  --glass: rgba(255, 255, 255, .10);
  --glass-line: rgba(255, 255, 255, .14);
  --glass-blur: 14px;
  --radius: 16px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-clock: var(--font);
  --panel-bg: rgba(14, 17, 22, .88);
  --panel-w: 420px;
  --ease: cubic-bezier(.2, .7, .25, 1);
  --tiles-align: center;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font);
  color: var(--text);
  background: #0E1116;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---------- background stack ---------- */
#bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; background: #0E1116; }
#bgLayer {
  position: absolute; inset: -12%;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  transform-origin: center center;
  will-change: transform, filter;
}
#bgLayer.tile {
  inset: 0 !important;
  transform-origin: top left;
}
#bgLayer.contain { background-size: contain; }
#bgLayer.stretch { background-size: 100% 100%; }
#bgLayer.original { background-size: auto; }
.fx { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
#dim { background: #000; opacity: .24; }
#tint { mix-blend-mode: soft-light; opacity: 0; }
#vignette { background: radial-gradient(120% 90% at 50% 45%, transparent 38%, rgba(0, 0, 0, .55) 100%); opacity: .3; }
#grain {
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='260' height='260' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* reposition mode */
#bg.adjust { cursor: grab; z-index: 60; }
#bg.adjust.dragging { cursor: grabbing; }
#bg.adjust::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(to right, transparent calc(33.333% - 1px), rgba(255, 255, 255, .3) 33.333%, transparent calc(33.333% + 1px)),
    linear-gradient(to right, transparent calc(66.666% - 1px), rgba(255, 255, 255, .3) 66.666%, transparent calc(66.666% + 1px)),
    linear-gradient(to bottom, transparent calc(33.333% - 1px), rgba(255, 255, 255, .3) 33.333%, transparent calc(33.333% + 1px)),
    linear-gradient(to bottom, transparent calc(66.666% - 1px), rgba(255, 255, 255, .3) 66.666%, transparent calc(66.666% + 1px));
}
.adjust-hint {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  z-index: 61; display: none; gap: 10px; align-items: center;
  padding: 10px 14px 10px 16px; border-radius: 999px;
  background: rgba(10, 12, 16, .82); border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  font-size: 13px; color: var(--text-60); box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
}
body.adjusting .adjust-hint { display: flex; }
body.adjusting .stage, body.adjusting .gear { opacity: 0; pointer-events: none; }
.adjust-hint b { color: var(--text); font-weight: 500; }
.adjust-hint button {
  padding: 6px 14px; border-radius: 999px; background: var(--accent);
  color: #0B0E13; font-size: 13px; font-weight: 600;
}

/* ---------- stage ---------- */
.stage {
  position: relative; z-index: 10;
  height: 100%; width: 100%;
  display: flex; flex-direction: column;
  padding: clamp(20px, 4vw, 44px);
  overflow: auto; scrollbar-width: none;
  transition: opacity .35s var(--ease);
}
.stage::-webkit-scrollbar { display: none; }
.stage-inner {
  width: 100%; max-width: var(--content-w, 740px);
  margin-inline: auto;
  padding-top: max(0px, calc((100vh - 440px) * var(--vpos, .35)));
  padding-bottom: 70px;
  display: flex; flex-direction: column; gap: clamp(20px, 3.6vh, 36px);
  text-align: var(--align, center);
  align-items: var(--align-items, center);
}
body.align-left .stage-inner { --align: left; --align-items: flex-start; }
body.align-right .stage-inner { --align: right; --align-items: flex-end; }

/* ---------- clock ---------- */
.hero { display: flex; flex-direction: column; gap: 6px; width: 100%; align-items: var(--align-items, center); }
.hero-avatar-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.hero-avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-line);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .25);
  background: var(--glass);
  backdrop-filter: blur(10px);
  transition: transform .2s var(--ease);
}
.hero-avatar:hover { transform: scale(1.06); }
.greeting {
  font-size: clamp(14px, 1.6vw, 17px);
  color: var(--text-60);
  letter-spacing: .01em;
  margin-bottom: 2px;
  font-weight: 400;
  transition: color .2s var(--ease);
}
.clock {
  font-family: var(--font-clock);
  font-size: calc(clamp(56px, 11vw, 128px) * var(--clock-scale, 1));
  font-weight: var(--clock-weight, 200);
  letter-spacing: var(--clock-track, -.03em);
  line-height: .94;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .28);
  cursor: pointer;
  user-select: none;
  transition: opacity .15s ease, transform .15s ease;
}
.clock:hover { opacity: .92; }
.clock:active { transform: scale(.99); }
.clock:focus-visible { outline: 2px solid var(--accent); border-radius: 8px; }
.clock .sec { font-size: 1em; color: var(--text-38); }
.clock .mer { font-size: .3em; color: var(--text-38); letter-spacing: .02em; margin-left: .18em; }
.clock .colon { transition: opacity .28s linear; }
body.blink .clock .colon.off { opacity: .18; }
.datefull {
  font-size: clamp(13px, 1.5vw, 16px);
  color: var(--text-60);
  letter-spacing: .015em;
}

/* ---------- search ---------- */
.search { width: 100%; display: flex; justify-content: var(--align-items, center); }
.search-shell {
  position: relative; display: flex; align-items: center; gap: 12px;
  width: min(100%, var(--search-w, 560px));
  padding: 0 16px; height: 52px;
  border-radius: calc(var(--radius) * .9);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  transition: border-color .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease);
}
body.search-solid .search-shell { background: rgba(12, 15, 20, .72); border-color: rgba(255, 255, 255, .08); }
body.search-outline .search-shell { background: transparent; border-color: var(--text-38); backdrop-filter: none; -webkit-backdrop-filter: none; }
body.search-minimal .search-shell { background: transparent; border: 0; border-bottom: 1px solid var(--text-14); border-radius: 0; backdrop-filter: none; -webkit-backdrop-filter: none; padding-inline: 4px; }
.search-shell:focus-within { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent); }
.search-shell input {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0;
  font-size: 15.5px; letter-spacing: .01em;
}
.search-shell input::placeholder { color: var(--text-38); }
.search-icon { width: 17px; height: 17px; flex: none; color: var(--text-38); }
.search-custom-icon { width: 22px; height: 22px; object-fit: contain; flex: none; border-radius: 4px; }
.engine-btn {
  flex: none; display: flex; align-items: center; gap: 6px;
  padding: 5px 9px; border-radius: 8px; font-size: 12px; color: var(--text-60);
  background: var(--text-08); transition: color .18s, background .18s;
}
.engine-btn:hover { color: var(--text); background: var(--text-14); }

/* ---------- shortcuts with configurable alignment ---------- */
.tiles {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: var(--tile-gap, 18px);
  justify-content: var(--tiles-align, center);
  align-items: flex-start;
  transition: justify-content .2s var(--ease);
}
.tiles.align-left { justify-content: flex-start; }
.tiles.align-center, .tiles.align-middle { justify-content: center; }
.tiles.align-right { justify-content: flex-end; }

.tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  width: calc((100% - (var(--cols, 6) - 1) * var(--tile-gap, 18px)) / var(--cols, 6));
  min-width: var(--tile-size, 76px);
  max-width: calc(var(--tile-size, 76px) + 38px);
  padding: 0;
  color: var(--text);
  flex: 0 0 auto;
}
.tile-face {
  position: relative;
  width: var(--tile-size, 76px); height: var(--tile-size, 76px);
  display: grid; place-items: center;
  border-radius: var(--tile-radius, 18px);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  overflow: hidden;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease);
}
body.tiles-solid .tile-face { background: rgba(12, 15, 20, .7); border-color: rgba(255, 255, 255, .07); }
body.tiles-outline .tile-face { background: transparent; border-color: var(--text-14); backdrop-filter: none; -webkit-backdrop-filter: none; }
body.tiles-bare .tile-face { background: transparent; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tile:hover .tile-face, .tile:focus-visible .tile-face { transform: translateY(-3px); background: var(--text-14); }

/* Prevent dragging shortcut icons (icons, emojis, letters) to avoid background image change */
.tile-face img,
.tile-face svg,
.tile-face .letter,
.tile-face .emoji,
.tile-label {
  pointer-events: none !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}
.tile-face img { width: 52%; height: 52%; object-fit: contain; display: block; }
.tile-face .letter { font-size: calc(var(--tile-size, 76px) * .36); font-weight: 500; color: var(--text); }
.tile-face .emoji { font-size: calc(var(--tile-size, 76px) * .42); line-height: 1; }

.tile-label {
  font-size: 12.5px; color: var(--text-60);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: .01em;
}
body.no-labels .tile-label { display: none; }
.tile-add .tile-face { border-style: dashed; border-color: var(--text-14); background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.tile-add svg { width: 20px; height: 20px; color: var(--text-38); }
.tile[draggable="true"] { cursor: grab; }
.tile.drag-over .tile-face { border-color: var(--accent); transform: scale(1.05); }
.tile.drag-file-over .tile-face { border-color: var(--accent) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent) !important; transform: scale(1.08); }
.tile.dragging { opacity: .35; }
.tile-edit {
  position: absolute; top: -7px; right: calc(50% - var(--tile-size, 76px)/2 - 7px);
  width: 22px; height: 22px; border-radius: 50%;
  display: none; place-items: center;
  background: var(--accent); color: #0B0E13;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  cursor: pointer;
  pointer-events: auto !important;
}
body.editing-tiles .tile-edit { display: grid; }
body.editing-tiles .tile { cursor: grab; }
.tile-edit svg { width: 12px; height: 12px; }

/* ---------- weather ---------- */
.weather { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text-60); }
.weather.corner {
  position: fixed; top: clamp(20px, 3.2vw, 36px); left: clamp(22px, 3.6vw, 44px); z-index: 11;
  background: transparent;
  border: none;
  border-radius: 0;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 4px 6px;
  box-shadow: none;
  max-width: min(340px, calc(100vw - 80px));
}
.weather.corner:hover { border-color: transparent; box-shadow: none; }
.weather.corner .weather-now,
.weather.corner .weather-icon,
.weather.corner .weather-temp,
.weather.corner .weather-meta,
.weather.corner .wx-action {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.45));
}
.weather-now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.weather-icon { width: 26px; height: 26px; flex: none; color: var(--text); display: block; }
.weather-temp {
  font-size: 20px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
  font-weight: 500;
  line-height: 1;
  display: inline-flex;
  align-items: center;
}
.weather-meta { display: flex; flex-direction: column; gap: 1px; line-height: 1.35; min-width: 0; }
.weather-meta .l1 { color: var(--text); font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weather-meta .l2 { font-size: 12px; color: var(--text-38); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.weather.inline {
  justify-content: var(--align-items, center); width: 100%;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: var(--radius);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  padding: 12px 18px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}
.weather.compact .weather-meta, .weather.compact .weather-sep { display: none; }
.weather-sep { width: 1px; height: 22px; background: var(--text-14); flex: none; }
.weather button.wx-action { color: var(--accent); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- settings gear: spaced out nicely from the top right corner ---------- */
.gear {
  position: fixed;
  right: clamp(20px, 3vw, 36px);
  top: clamp(20px, 3vw, 34px);
  z-index: 40;
  height: 42px;
  width: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--text-60);
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  opacity: .55;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
  transition: opacity .2s var(--ease), color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.gear:hover { opacity: 1; color: var(--text); background: var(--text-14); transform: scale(1.05); box-shadow: 0 6px 22px rgba(0, 0, 0, .3); }
.gear svg { width: 20px; height: 20px; }

/* ---------- widget containers (above, below, side docks) ---------- */
.widget-shelf {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 4px 0;
}
.widget-shelf:empty { display: none; }

.dock-left, .dock-right {
  position: fixed;
  top: clamp(80px, 12vh, 120px);
  bottom: clamp(30px, 6vh, 60px);
  z-index: 15;
  width: clamp(240px, 19vw, 290px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  pointer-events: none;
}
.dock-left { left: clamp(16px, 2.5vw, 36px); }
.dock-right { right: clamp(16px, 2.5vw, 36px); }
.dock-left::-webkit-scrollbar, .dock-right::-webkit-scrollbar { display: none; }
.dock-left > *, .dock-right > * { pointer-events: auto; }
.dock-left:empty, .dock-right:empty { display: none; }

/* ---------- individual widget components ---------- */
.app-widget {
  background: var(--widget-bg, var(--glass));
  border: 1px solid var(--widget-border, var(--glass-line));
  border-radius: var(--radius);
  backdrop-filter: blur(var(--widget-blur, var(--glass-blur))) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--widget-blur, var(--glass-blur))) saturate(1.4);
  padding: 14px 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
  transition: border-color .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
  width: 100%;
}
.app-widget:hover { border-color: rgba(255, 255, 255, .22); box-shadow: 0 10px 36px rgba(0, 0, 0, .24); }
.app-widget.has-custom-bg { position: relative; overflow: hidden; }
.widget-bg-layer {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: var(--widget-art-opacity, 0.2);
  filter: blur(var(--widget-art-blur, 0px));
  pointer-events: none; z-index: 0;
}
.app-widget > * { position: relative; z-index: 1; }
.widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.widget-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-60);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.widget-title svg { width: 14px; height: 14px; color: var(--accent); }
.widget-actions { display: flex; align-items: center; gap: 6px; }

/* Notes widget */
.notes-textarea {
  width: 100%;
  min-height: 100px;
  max-height: 240px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: calc(var(--radius) * .6);
  padding: 10px 12px;
  font-size: 13.5px;
  line-height: 1.5;
  resize: vertical;
  outline: 0;
  color: var(--text);
  transition: border-color .16s, background .16s;
  scrollbar-width: thin;
  scrollbar-color: var(--text-14) transparent;
}
.notes-textarea::-webkit-scrollbar { width: 7px; }
.notes-textarea::-webkit-scrollbar-thumb { background: var(--text-14); border-radius: 99px; }
.notes-textarea::-webkit-scrollbar-thumb:hover { background: var(--text-38); }
.notes-textarea:focus { border-color: var(--accent); background: rgba(255, 255, 255, .07); }
.notes-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-38);
}

/* Todo widget */
.todo-input-row { display: flex; gap: 8px; margin-bottom: 10px; }
.todo-input-row input {
  flex: 1;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  outline: 0;
}
.todo-input-row input:focus { border-color: var(--accent); }
.todo-input-row button {
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--text-14);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}
.todo-input-row button:hover { background: var(--accent); color: #0B0E13; }
.todo-list {
  display: flex; flex-direction: column; gap: 6px; max-height: 190px; overflow-y: auto; padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--text-14) transparent;
}
.todo-list::-webkit-scrollbar { width: 7px; }
.todo-list::-webkit-scrollbar-thumb { background: var(--text-14); border-radius: 99px; }
.todo-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .03);
  font-size: 13px;
}
.todo-item:hover { background: rgba(255, 255, 255, .06); }
.todo-check {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--text-38);
  display: grid; place-items: center; cursor: pointer; flex: none;
}
.todo-check.done { background: var(--accent); border-color: var(--accent); }
.todo-check svg { width: 10px; height: 10px; stroke: #0B0E13; stroke-width: 3; display: none; }
.todo-check.done svg { display: block; }
.todo-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-item.done .todo-text { text-decoration: line-through; color: var(--text-38); }
.todo-del { opacity: 0; padding: 2px; color: var(--text-38); cursor: pointer; }
.todo-item:hover .todo-del { opacity: 1; }
.todo-del:hover { color: #F08E7E; }

/* Quote widget */
.quote-text {
  font-size: 14px;
  line-height: 1.55;
  font-style: italic;
  color: var(--text);
  margin-bottom: 8px;
  position: relative;
}
.quote-author {
  font-size: 12px;
  color: var(--text-60);
  text-align: right;
  font-style: normal;
  letter-spacing: .02em;
}

/* Focus Pomodoro widget */
.timer-display {
  font-variant-numeric: tabular-nums;
  font-size: 38px;
  font-weight: 300;
  text-align: center;
  line-height: 1.1;
  margin: 6px 0 10px;
  letter-spacing: -.02em;
  color: var(--text);
}
.timer-modes { display: flex; gap: 4px; margin-bottom: 12px; }
.timer-modes button {
  flex: 1; padding: 4px 6px; border-radius: 6px;
  font-size: 11px; color: var(--text-38); background: var(--text-08);
}
.timer-modes button.active { background: var(--text-14); color: var(--text); font-weight: 500; }
.timer-controls { display: flex; gap: 8px; justify-content: center; }
.timer-btn {
  padding: 6px 14px; border-radius: 8px; font-size: 12.5px;
  background: var(--text-14); color: var(--text); font-weight: 500;
}
.timer-btn.play { background: var(--accent); color: #0B0E13; font-weight: 600; }

/* Progress widget */
.progress-group { display: flex; flex-direction: column; gap: 10px; }
.progress-row { display: flex; flex-direction: column; gap: 4px; }
.progress-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-60); }
.progress-bar-bg { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.progress-bar-fill { height: 100%; border-radius: 99px; background: var(--accent); transition: width .4s ease; }

/* Calculator widget */
.calc-sub {
  font-size: 11px;
  color: var(--text-38);
  min-height: 15px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
}
.calc-display {
  width: 100%;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 8px;
  padding: 8px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: var(--text);
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.calc-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.calc-btn {
  padding: 8px 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .07);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  user-select: none;
  cursor: pointer;
  transition: background .12s, transform .1s;
}
.calc-btn:hover { background: rgba(255, 255, 255, .12); }
.calc-btn:active { transform: scale(.96); }
.calc-btn.op { background: rgba(255, 255, 255, .09); color: var(--accent); font-weight: 600; }
.calc-btn.eq, .calc-btn.equals { background: var(--accent); color: #0B0E13; font-weight: 600; }
.calc-btn.fn, .calc-btn.clear { color: #F08E7E; }
.calc-btn.zero { grid-column: span 2; }

/* Calendar widget */
.calendar-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.cal-days, .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}
.cal-dow {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-38);
  padding: 3px 0;
  text-transform: uppercase;
}
.cal-day {
  font-size: 11.5px;
  padding: 5px 0;
  border-radius: 6px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  cursor: default;
  transition: background .12s;
}
.cal-day.other-month { color: var(--text-14); opacity: .35; }
.cal-day.today {
  background: var(--accent);
  color: #0B0E13;
  font-weight: 700;
}

/* World Clock widget */
.worldclock-list, .world-clocks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.worldclock-row, .world-clock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  background: rgba(255, 255, 255, .03);
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .05);
}
.worldclock-city, .world-clock-city {
  display: flex;
  flex-direction: column;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}
.worldclock-label, .world-clock-offset {
  font-size: 10.5px;
  color: var(--text-38);
  margin-top: 1px;
}
.worldclock-time, .world-clock-time {
  font-family: var(--font-clock);
  font-size: 14.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.worldclock-diff {
  font-size: 10px;
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--text-08);
  color: var(--text-60);
}

output[data-out] {
  cursor: pointer;
  border-bottom: 1px dotted var(--text-38);
  padding: 1px 4px;
  border-radius: 4px;
  transition: color .15s, background .15s, border-color .15s;
  user-select: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 38px;
}
output[data-out]:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--text-08);
}
.inline-num-input {
  width: 58px !important;
  padding: 1px 4px !important;
  font-size: 12.5px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace !important;
  text-align: right !important;
  background: rgba(0, 0, 0, .45) !important;
  border: 1.5px solid var(--accent) !important;
  border-radius: 5px !important;
  color: var(--text) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(124, 196, 184, 0.25) !important;
  margin: 0 !important;
}

/* Theme mode slider */
.theme-slider-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme-slider-wrap input[type="range"] {
  width: 72px !important;
  cursor: pointer;
}
.theme-slider-wrap .mode-label {
  font-size: 13px;
  color: var(--text-38);
  cursor: pointer;
  user-select: none;
  transition: color .15s, font-weight .15s;
}
.theme-slider-wrap .mode-label.active {
  color: var(--accent);
  font-weight: 600;
}

/* Widget: Daily Habits */
.habits-widget { min-width: 250px; }
.habit-progress-wrap { margin-bottom: 10px; }
.habit-progress-bar {
  height: 5px;
  background: var(--text-08);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 5px;
}
.habit-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width .3s ease;
}
.habit-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}
.habit-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .04);
  font-size: 13px;
  color: var(--text);
  transition: background .15s;
}
.habit-item:hover { background: rgba(255, 255, 255, .06); }
.habit-check {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--text-38);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
  transition: all .15s;
}
.habit-item.done .habit-check {
  background: var(--accent);
  border-color: var(--accent);
}
.habit-check svg {
  width: 10px;
  height: 10px;
  stroke: #0B0E13;
  stroke-width: 3;
  display: none;
}
.habit-item.done .habit-check svg { display: block; }
.habit-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.habit-item.done .habit-name {
  text-decoration: line-through;
  color: var(--text-38);
}
.habit-streak {
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}
.habit-del {
  opacity: 0;
  background: none;
  border: 0;
  padding: 2px 4px;
  color: var(--text-38);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.habit-item:hover .habit-del { opacity: 1; }
.habit-del:hover { color: #F08E7E; }
.habit-input-row {
  display: flex;
  gap: 6px;
}
.habit-input-row input {
  flex: 1;
  padding: 5px 8px;
  font-size: 12.5px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
}
.habit-input-row button {
  padding: 5px 10px;
  border-radius: 7px;
  background: var(--accent);
  color: #0B0E13;
  font-weight: 600;
  font-size: 12px;
}

/* Widget: Stopwatch */
.stopwatch-widget { min-width: 240px; text-align: center; }
.sw-display {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 34px;
  font-weight: 300;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 6px 0 12px;
  font-variant-numeric: tabular-nums;
}
.sw-controls {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin-bottom: 10px;
}
.sw-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  background: var(--text-08);
  color: var(--text);
  transition: background .15s;
}
.sw-btn:hover { background: var(--text-14); }
.sw-btn.primary {
  background: var(--accent);
  color: #0B0E13;
  font-weight: 600;
}
.sw-laps {
  max-height: 90px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  color: var(--text-60);
  padding-top: 6px;
  border-top: 1px solid var(--text-08);
}
.sw-lap-row {
  display: flex;
  justify-content: space-between;
  padding: 2px 4px;
}

/* Widget: Unit Converter */
.converter-widget { min-width: 250px; }
.conv-cat-row {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.conv-cat-btn {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-38);
  background: var(--text-08);
  white-space: nowrap;
}
.conv-cat-btn.active {
  background: var(--accent);
  color: #0B0E13;
  font-weight: 600;
}
.conv-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.conv-field {
  display: flex;
  gap: 6px;
  align-items: center;
}
.conv-field input {
  flex: 1;
  padding: 6px 8px;
  font-size: 13px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.conv-field select {
  width: 85px !important;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .08);
}
.conv-swap-wrap {
  display: flex;
  justify-content: center;
  margin: -3px 0;
}
.conv-swap-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--text-08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-60);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.conv-swap-btn:hover { background: var(--text-14); color: var(--text); }
.conv-swap-btn svg { width: 12px; height: 12px; }

/* ---------- settings panel ---------- */
.scrim { position: fixed; inset: 0; z-index: 70; background: rgba(6, 8, 11, .55); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); backdrop-filter: blur(3px); }
body.panel-open .scrim { opacity: 1; pointer-events: auto; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80;
  width: var(--panel-w); max-width: 100vw;
  display: flex; flex-direction: column;
  background: var(--panel-bg);
  border-left: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(30px) saturate(1.6); -webkit-backdrop-filter: blur(30px) saturate(1.6);
  transform: translateX(102%);
  transition: transform .38s var(--ease);
  box-shadow: -30px 0 80px rgba(0, 0, 0, .45);
}
body.panel-open .panel { transform: none; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 14px; flex: none; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 550; letter-spacing: -.01em; }
.panel-head .sub { font-size: 12px; color: var(--text-38); margin-top: 3px; }
.icon-btn { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--text-60); }
.icon-btn:hover { background: var(--text-08); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }
.tabs {
  display: flex; gap: 4px; padding: 0 14px 10px; flex: none; overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--text-14) transparent;
}
.tabs::-webkit-scrollbar { height: 4px; }
.tabs::-webkit-scrollbar-thumb { background: var(--text-14); border-radius: 99px; }
.tabs::-webkit-scrollbar-thumb:hover { background: var(--text-38); }
.tab { flex: none; padding: 7px 11px; border-radius: 9px; font-size: 12.5px; color: var(--text-38); white-space: nowrap; transition: color .16s, background .16s; }
.tab:hover { color: var(--text-60); }
.tab.on { color: var(--text); background: var(--text-08); }
.panel-body { flex: 1; overflow-y: auto; padding: 4px 20px 24px; scrollbar-width: thin; scrollbar-color: var(--text-14) transparent; }
.panel-body::-webkit-scrollbar { width: 7px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--text-14); border-radius: 99px; }
.pane { display: none; flex-direction: column; gap: 2px; }
.pane.on { display: flex; }
.group { padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.group:last-child { border-bottom: 0; }
.group-title { font-size: 12px; color: var(--text-38); margin-bottom: 10px; letter-spacing: .02em; text-transform: uppercase; }
.row { display: flex; align-items: center; gap: 12px; min-height: 34px; padding: 3px 0; }
.row label, .row .rl { flex: 1; font-size: 13.5px; color: var(--text-60); min-width: 0; }
.row .hint { display: block; font-size: 11.5px; color: var(--text-38); margin-top: 2px; }
.row.stack { flex-direction: column; align-items: stretch; gap: 7px; }
.row.stack label { flex: none; }
output[data-out] {
  font-size: 12px; color: var(--text-60); font-variant-numeric: tabular-nums;
  min-width: 46px; text-align: center;
  padding: 3px 6px; border-radius: 6px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09);
  cursor: pointer; user-select: none; transition: border-color .15s, background .15s, color .15s;
}
output[data-out]:hover {
  color: var(--text); border-color: var(--accent); background: rgba(255, 255, 255, .12);
}
output.editing {
  outline: 2px solid var(--accent); background: rgba(0, 0, 0, .4);
}

input[type=range] { -webkit-appearance: none; appearance: none; background: none; width: 150px; flex: none; height: 18px; }
input[type=range]::-webkit-slider-runnable-track { height: 3px; border-radius: 99px; background: var(--text-14); }
input[type=range]::-moz-range-track { height: 3px; border-radius: 99px; background: var(--text-14); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%;
  background: var(--text); margin-top: -5.5px; border: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .4); transition: transform .15s var(--ease);
}
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--text); border: 0; }
input[type=range]:active::-webkit-slider-thumb { transform: scale(1.25); background: var(--accent); }

input[type=text], input[type=url], input[type=number], input[type=time], select, textarea {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 9px; padding: 8px 10px; font-size: 13px;
  outline: 0; width: 100%; transition: border-color .16s, background .16s;
}
input[type=text]:focus, input[type=url]:focus, input[type=number]:focus, input[type=time]:focus, select:focus, textarea:focus { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: rgba(255, 255, 255, .07); }
.row input[type=text], .row input[type=url], .row input[type=number], .row select { width: 160px; flex: none; }
.row.stack input, .row.stack select, .row.stack textarea { width: 100%; }
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%239AA6B2' stroke-width='1.6'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 26px; }
select option { background: #151A21; color: #F2F5F7; }

.color-field-wrap {
  display: flex; align-items: center; gap: 8px; flex: none;
}
.hex-input {
  width: 82px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: center;
  padding: 5px 8px !important;
  flex: none !important;
}

input[type=color] {
  -webkit-appearance: none; appearance: none; width: 34px; height: 26px; flex: none;
  padding: 0; border: 1px solid var(--glass-line); border-radius: 7px; background: none; cursor: pointer;
}
input[type=color]::-webkit-color-swatch-wrapper { padding: 2px; }
input[type=color]::-webkit-color-swatch { border: 0; border-radius: 5px; }

/* Theme cards */
.theme-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 6px;
}
.theme-card {
  padding: 10px 8px; border-radius: 10px; border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, .04); display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; transition: transform .15s, border-color .15s, box-shadow .15s;
}
.theme-card:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .25); }
.theme-card.on { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); background: rgba(255, 255, 255, .08); }
.theme-preview-dots { display: flex; align-items: center; gap: 4px; }
.theme-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); }
.theme-card-name { font-size: 11px; font-weight: 500; color: var(--text); text-align: center; }

/* Light mode overrides */
body.theme-light {
  --panel-bg: rgba(248, 250, 252, .94);
  --glass: rgba(15, 23, 42, .06);
  --glass-line: rgba(15, 23, 42, .12);
  --text-60: rgba(24, 32, 42, .68);
  --text-38: rgba(24, 32, 42, .45);
  --text-14: rgba(24, 32, 42, .14);
  --text-08: rgba(24, 32, 42, .08);
}
body.theme-light .panel {
  background: var(--panel-bg);
  border-left-color: rgba(0, 0, 0, .1);
  box-shadow: -30px 0 80px rgba(0, 0, 0, .15);
}
body.theme-light .panel-footer {
  background: rgba(241, 245, 249, .95);
  border-top-color: rgba(0, 0, 0, .08);
}
body.theme-light input[type=text],
body.theme-light input[type=url],
body.theme-light input[type=number],
body.theme-light input[type=time],
body.theme-light select,
body.theme-light textarea {
  background: rgba(0, 0, 0, .04);
  border-color: rgba(0, 0, 0, .12);
  color: #0F172A;
}
body.theme-light select option { background: #FFFFFF; color: #0F172A; }
body.theme-light .btn {
  background: rgba(0, 0, 0, .05);
  border-color: rgba(0, 0, 0, .1);
  color: #0F172A;
}
body.theme-light .btn:hover { background: rgba(0, 0, 0, .09); }
body.theme-light .modal-card {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, .12);
  color: #0F172A;
}

.switch { position: relative; width: 38px; height: 22px; flex: none; border-radius: 99px; background: var(--text-14); transition: background .2s var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .22s var(--ease); }
.switch.on { background: var(--accent); }
.switch.on::after { transform: translateX(16px); background: #0B0E13; }

.seg { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .05); flex: none; }
.seg.wide { width: 100%; }
.seg button {
  flex: 1; padding: 6px 10px; border-radius: 7px; font-size: 12px; color: var(--text-38);
  white-space: nowrap; transition: background .16s, color .16s;
}
.seg button:hover { color: var(--text-60); }
.seg button.on { background: rgba(255, 255, 255, .12); color: var(--text); }

.btn {
  padding: 9px 14px; border-radius: 10px; font-size: 13px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .1);
  color: var(--text); transition: background .16s, border-color .16s; text-align: center;
}
.btn:hover { background: rgba(255, 255, 255, .12); }
.btn.small { padding: 5px 10px; font-size: 12px; border-radius: 8px; }
.btn.primary { background: var(--accent); color: #0B0E13; border-color: transparent; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: #F08E7E; }
.btn.full { width: 100%; }
.btn-row { display: flex; gap: 8px; margin-top: 4px; }
.btn-row .btn { flex: 1; }

.drop {
  border: 1px dashed var(--text-14); border-radius: 12px;
  padding: 18px 14px; text-align: center; font-size: 13px; color: var(--text-60);
  transition: border-color .18s, background .18s; cursor: pointer;
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(255, 255, 255, .04); }
.drop.compact { padding: 12px 10px; font-size: 12px; border-radius: 10px; }
.drop b { display: block; color: var(--text); font-weight: 500; margin-bottom: 3px; }
.drop small { font-size: 11.5px; color: var(--text-38); }
.upload-preview-card {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .05); border: 1px solid var(--glass-line);
  margin-top: 8px;
}
.upload-preview-thumb {
  width: 44px; height: 44px; border-radius: 8px; object-fit: contain;
  background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 255, 255, .1);
}
.thumb { width: 100%; height: 96px; border-radius: 11px; object-fit: cover; border: 1px solid var(--glass-line); margin-bottom: 10px; display: block; background: #11151b; }
.presets { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; margin-top: 4px; }
.preset { aspect-ratio: 1; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .12); transition: transform .15s var(--ease), box-shadow .15s; }
.preset:hover { transform: scale(1.09); }
.preset.on { box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px rgba(0, 0, 0, .3); }

.sc-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.sc-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 9px; border-radius: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid transparent; transition: border-color .15s, background .15s;
}
.sc-item:hover { background: rgba(255, 255, 255, .07); }
.sc-item.drag-over { border-color: var(--accent); }
.sc-item.dragging { opacity: .4; }
.sc-ico { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: rgba(255, 255, 255, .07); flex: none; overflow: hidden; font-size: 13px; }
.sc-ico img { width: 16px; height: 16px; object-fit: contain; }
.sc-txt { flex: 1; min-width: 0; }
.sc-txt .n { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-txt .u { font-size: 11px; color: var(--text-38); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-grab { color: var(--text-38); cursor: grab; display: grid; place-items: center; width: 20px; }
.sc-grab svg { width: 13px; height: 13px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 20px; background: rgba(6, 8, 11, .65); backdrop-filter: blur(6px); }
.modal.on { display: grid; }
.modal-card {
  width: min(420px, 100%); border-radius: 18px; padding: 20px;
  background: rgba(20, 24, 31, .97); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  animation: pop .26s var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 550; }
.field { margin-bottom: 11px; }
.field label { display: block; font-size: 12px; color: var(--text-60); margin-bottom: 5px; }

/* panel footer (keyboard shortcuts guide at bottom of whole settings menu) */
.panel-footer {
  flex: none;
  padding: 12px 18px;
  background: rgba(10, 13, 18, .75);
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.panel-footer-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-38);
}
.footer-shortcuts-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
}
.footer-shortcut-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: var(--text-60);
}
.footer-key {
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 10.5px;
  color: var(--text);
  white-space: nowrap;
}

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 14px);
  z-index: 95; padding: 8px 15px; border-radius: 99px; font-size: 12.5px;
  background: rgba(14, 17, 22, .9); border: 1px solid var(--glass-line);
  color: var(--text-60); backdrop-filter: blur(14px);
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast .dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-right: 7px; vertical-align: 1px; }

/* boot fade */
body { opacity: 0; transition: opacity .4s var(--ease); }
body.ready { opacity: 1; }
body.ready.fade .stage-inner > * { animation: rise .6s var(--ease) both; }
body.ready.fade .stage-inner > *:nth-child(2) { animation-delay: .07s; }
body.ready.fade .stage-inner > *:nth-child(3) { animation-delay: .13s; }
body.ready.fade .stage-inner > *:nth-child(4) { animation-delay: .19s; }
@keyframes rise { from { opacity: 0; transform: translateY(9px); } }

#weatherInline { width: 100%; }
#weatherInline:empty { display: none; }
.hidden { display: none !important; }

@media (max-width: 960px) {
  .dock-left, .dock-right { display: none !important; }
}
@media (max-width: 640px) {
  :root { --panel-w: 100vw; }
  .tiles { gap: 12px; }
  .tile { width: calc((100% - (var(--cols-m, 4) - 1) * var(--tile-gap, 12px)) / var(--cols-m, 4)); }
  .weather.corner { top: 16px; left: 16px; }
  .gear { top: max(16px, env(safe-area-inset-top)); right: 16px; }
}
