/* ───────────────────────── Type ─────────────────────────
   Inter Variable (OFL) is bundled so Latin text looks identical on macOS,
   Windows and Linux; its optical-size axis switches to the tighter Display
   cut at large sizes, like SF Pro. CJK, Hangul and Arabic use the best
   native face on each OS. */
@font-face { font-family: "Inter Var"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Var"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext-opsz-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ───────────────────────── Tokens ───────────────────────── */
:root {
  --font: "Inter Var", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", system-ui, sans-serif;
  --ink: #1d1d1f; --ink-2: rgba(29, 29, 31, .6); --ink-3: rgba(29, 29, 31, .34);
  --card: rgba(255, 255, 255, .8); --card-edge: rgba(0, 0, 0, .05);
  --chrome: rgba(255, 255, 255, .56); --solid: #fbfbfd;
  --fill: rgba(118, 118, 128, .1); --fill-2: rgba(118, 118, 128, .18); --hairline: rgba(0, 0, 0, .07); --thumb: #fff;
  --accent: #0071e3; --red: #ff3b30; --orange: #ff9500; --yellow: #ffcc00; --green: #34c759; --teal: #30b0c7; --indigo: #5856d6; --pink: #ff2d55;
  --shadow-s: 0 .5px 1px rgba(0, 0, 0, .06), 0 2px 6px rgba(0, 0, 0, .05);
  --shadow: 0 .5px 1px rgba(0, 0, 0, .05), 0 6px 18px rgba(0, 0, 0, .06), 0 20px 40px -20px rgba(0, 0, 0, .12);
  --shadow-l: 0 30px 80px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .06);
  --ease: cubic-bezier(.32, .72, 0, 1); --spring: cubic-bezier(.25, 1.1, .4, 1);
  --sidebar-w: 236px; --gutter: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f5f5f7; --ink-2: rgba(245, 245, 247, .62); --ink-3: rgba(245, 245, 247, .32);
    --card: rgba(44, 44, 46, .74); --card-edge: rgba(255, 255, 255, .07); --chrome: rgba(36, 36, 38, .58); --solid: #2c2c2e;
    --fill: rgba(118, 118, 128, .2); --fill-2: rgba(118, 118, 128, .32); --hairline: rgba(255, 255, 255, .08); --thumb: #636366;
    --accent: #0a84ff; --red: #ff453a; --orange: #ff9f0a; --yellow: #ffd60a; --green: #30d158; --teal: #40c8e0; --indigo: #5e5ce6; --pink: #ff375f;
    --shadow: 0 .5px 1px rgba(0, 0, 0, .2), 0 8px 24px rgba(0, 0, 0, .22); --shadow-l: 0 30px 80px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #f5f5f7; --ink-2: rgba(245, 245, 247, .62); --ink-3: rgba(245, 245, 247, .32);
  --card: rgba(44, 44, 46, .74); --card-edge: rgba(255, 255, 255, .07); --chrome: rgba(36, 36, 38, .58); --solid: #2c2c2e;
  --fill: rgba(118, 118, 128, .2); --fill-2: rgba(118, 118, 128, .32); --hairline: rgba(255, 255, 255, .08); --thumb: #636366;
  --accent: #0a84ff; --red: #ff453a; --orange: #ff9f0a; --yellow: #ffd60a; --green: #30d158; --teal: #40c8e0; --indigo: #5e5ce6; --pink: #ff375f;
  --shadow: 0 .5px 1px rgba(0, 0, 0, .2), 0 8px 24px rgba(0, 0, 0, .22); --shadow-l: 0 30px 80px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
:lang(zh-CN) { --font: "Inter Var", "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", sans-serif; }
:lang(zh-TW) { --font: "Inter Var", "PingFang TC", "Microsoft JhengHei UI", "Noto Sans CJK TC", sans-serif; }
:lang(ja) { --font: "Inter Var", "Hiragino Sans", "Yu Gothic UI", "Noto Sans CJK JP", sans-serif; }
:lang(ko) { --font: "Inter Var", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif; }
:lang(ar) { --font: "Inter Var", "SF Arabic", "Segoe UI", "Noto Sans Arabic", sans-serif; }

/* Text drawn straight on the wallpaper. */
body { --on-wall: #fff; --on-wall-2: rgba(255, 255, 255, .78); --wall-shadow: 0 1px 8px rgba(0, 0, 0, .22); }
body.light-wall { --on-wall: #1d1d1f; --on-wall-2: rgba(29, 29, 31, .6); --wall-shadow: none; }

/* ───────────────────────── Base ───────────────────────── */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font-family: var(--font); font-optical-sizing: auto; font-feature-settings: "cv11", "ss01"; color: var(--on-wall); background: #efebe5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; }
svg { display: block; }
img, a { -webkit-user-drag: none; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.material { background: var(--chrome); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%); box-shadow: inset 0 0 0 .5px var(--card-edge), var(--shadow-s); color: var(--ink); }

/* ───────────────────────── Wallpaper ─────────────────────────
   4K photo layers that cross-fade; the stack drifts slightly with the pointer. */
.wallpaper { position: fixed; inset: -24px; z-index: 0; background: #111; overflow: hidden;
  transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(1.02); transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.wall-layer { position: absolute; inset: 0; background: center / cover no-repeat; opacity: 0; transition: opacity 1.1s ease, filter 1.1s ease; }
.wall-layer.in { opacity: 1; }
.wall-layer.placeholder { filter: blur(24px) saturate(1.2); transform: scale(1.08); }
.scrim { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 42% at 50% 14%, rgba(0, 0, 0, .26), transparent 70%),
              linear-gradient(180deg, rgba(0, 0, 0, .18) 0%, transparent 32%, transparent 62%, rgba(0, 0, 0, .32) 100%); }
body.light-wall .scrim { background: radial-gradient(60% 42% at 50% 14%, rgba(255, 255, 255, .3), transparent 70%); }

/* ───────────────────────── Sidebar ───────────────────────── */
.sidebar { position: fixed; z-index: 6; top: var(--gutter); bottom: var(--gutter); inset-inline-start: var(--gutter); width: var(--sidebar-w);
  display: flex; flex-direction: column; padding: 18px 10px 10px; border-radius: 22px; color: var(--ink);
  background: var(--chrome); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%);
  box-shadow: inset 0 0 0 .5px var(--card-edge), var(--shadow-s); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 20px; }
.brand-mark { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .18)); }
.brand-name { font-size: 16px; font-weight: 650; letter-spacing: -.02em; }
.nav { display: grid; gap: 1px; overflow-y: auto; scrollbar-width: none; }
.nav-item { display: flex; align-items: center; gap: 11px; width: 100%; height: 36px; padding: 0 10px; border-radius: 9px; text-align: start;
  font-size: 14px; font-weight: 500; letter-spacing: -.008em; color: var(--ink); transition: background .15s; }
.nav-item:hover { background: var(--fill); }
.nav-item .ni { width: 19px; height: 19px; flex: none; color: var(--accent); }
.nav-item .ni svg { width: 100%; height: 100%; }
.nav-item .nl { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-item .nc { font-size: 12px; font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nav-item[aria-selected="true"] { background: var(--fill-2); font-weight: 600; }
.side-foot { position: relative; margin-top: auto; padding-top: 8px; border-top: .5px solid var(--hairline); display: grid; gap: 1px; }
.side-foot .ni { color: var(--ink-2); }

.menu { position: absolute; z-index: 20; padding: 5px; border-radius: 14px; min-width: 220px; background: var(--solid); color: var(--ink);
  box-shadow: inset 0 0 0 .5px var(--card-edge), 0 12px 40px rgba(0, 0, 0, .16), 0 1px 3px rgba(0, 0, 0, .08); animation: pop .22s var(--ease); }
.side-foot .menu { bottom: calc(100% + 8px); inset-inline-start: 0; max-height: 60vh; overflow: auto; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 6px 10px; border-radius: 9px; text-align: start; font-size: 14px; }
.menu-item:hover { background: var(--accent); color: #fff; }
.menu-item small { margin-inline-start: auto; color: var(--ink-2); font-size: 12px; }
.menu-item:hover small { color: rgba(255, 255, 255, .8); }
.menu-item .check { width: 14px; flex: none; color: var(--accent); }
.menu-item:hover .check { color: #fff; }
.menu-item img, .menu-item > [data-icon] svg { width: 18px; height: 18px; }
@keyframes pop { from { opacity: 0; transform: scale(.97); } }

/* ───────────────────────── Main column ───────────────────────── */
.main { position: relative; z-index: 1; height: 100dvh; display: flex; flex-direction: column; align-items: center;
  padding: clamp(20px, 5vh, 56px) 32px 14px; padding-inline-start: calc(var(--gutter) + var(--sidebar-w) + 32px); }
.hero { text-align: center; color: var(--on-wall); text-shadow: var(--wall-shadow); }
.date { margin: 0; font-size: 17px; font-weight: 550; letter-spacing: -.012em; color: var(--on-wall-2); }
.clock { margin: 2px 0 0; white-space: nowrap; font-size: clamp(60px, min(7.5vw, 11vh), 104px); font-weight: 280; letter-spacing: -.045em; line-height: 1;
  font-variant-numeric: tabular-nums; }
.clock .period { font-size: .26em; font-weight: 500; letter-spacing: 0; margin-inline: .22em; color: var(--on-wall-2); }

/* Search */
.search { position: relative; z-index: 4; flex: none; width: min(600px, 100%); height: 48px; margin-top: clamp(16px, 3vh, 28px); border-radius: 24px;
  display: flex; align-items: center; background: var(--card); color: var(--ink);
  -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%);
  box-shadow: inset 0 0 0 .5px var(--card-edge), var(--shadow-s); transition: box-shadow .25s var(--ease); }
.search:focus-within { box-shadow: inset 0 0 0 .5px var(--card-edge), 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow); }
.engine { display: flex; align-items: center; gap: 5px; height: 36px; padding: 0 8px 0 10px; margin-inline-start: 6px; border-radius: 18px; transition: background .15s; }
.engine:hover { background: var(--fill); }
.engine img { width: 18px; height: 18px; }
.chev svg { width: 10px; height: 10px; color: var(--ink-3); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 15.5px; letter-spacing: -.01em; padding: 0 8px; }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { display: none; }
.hint { display: grid; place-items: center; width: 22px; height: 22px; margin-inline-end: 13px; border-radius: 6px; font: 600 12px var(--font); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--hairline); }
.search:focus-within .hint { opacity: 0; }
.engine-menu { top: calc(100% + 8px); inset-inline-start: 0; }
.suggestions { position: absolute; top: calc(100% + 8px); inset-inline: 0; padding: 6px; border-radius: 18px; background: var(--solid); color: var(--ink);
  box-shadow: inset 0 0 0 .5px var(--card-edge), var(--shadow-l); animation: pop .22s var(--ease); max-height: 60vh; overflow: auto; }
.suggestions h4 { margin: 8px 10px 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); }
.suggestion { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 5px 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.suggestion .icon { --size: 28px; box-shadow: none; }
.suggestion span { font-size: 14.5px; font-weight: 500; }
.suggestion small { margin-inline-start: auto; color: var(--ink-2); font-size: 12.5px; }
.suggestion.active { background: var(--accent); color: #fff; }
.suggestion.active small { color: rgba(255, 255, 255, .8); }
.suggestion .web { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; background: var(--fill); }
.suggestion .web svg { width: 14px; height: 14px; }

/* ───────────────────────── Home grid ───────────────────────── */
.board { position: relative; flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; margin-top: clamp(14px, 3vh, 30px); }
.pages { flex: 1; min-height: 0; display: flex; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.pages::-webkit-scrollbar { display: none; }
.page { flex: 0 0 100%; display: grid; justify-content: center; align-content: start; scroll-snap-align: start;
  grid-template-columns: repeat(var(--cols), var(--cw)); grid-template-rows: repeat(var(--rows), var(--ch)); }
.item { position: relative; display: flex; min-width: 0; touch-action: none; }
.item.tile-item { justify-content: center; }
.item.widget-item { padding: calc(var(--cw) * .07); }

.tile { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; padding-top: 6px; color: var(--on-wall); text-decoration: none; border-radius: 16px; outline-offset: -2px; }
.tile > span:last-child { max-width: calc(100% - 8px); font-size: 12px; font-weight: 500; letter-spacing: -.004em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: var(--wall-shadow); }

/* App icons — Apple's geometry: a continuous-corner square ("squircle") with a
   22.5% radius and 60% corner smoothing (macOS 824px body / 185.4px radius;
   Figma's iOS preset). The site's own artwork fills the tile edge to edge,
   exactly as iOS treats an apple-touch-icon. */
:root { --squircle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cpath d='M64 0c12.601 0 18.902 0 23.715 2.452a22.5 22.5 0 0 1 9.833 9.833c2.452 4.813 2.452 11.114 2.452 23.715L100 64c0 12.601 0 18.902 -2.452 23.715a22.5 22.5 0 0 1 -9.833 9.833c-4.813 2.452 -11.114 2.452 -23.715 2.452L36 100c-12.601 0 -18.902 0 -23.715 -2.452a22.5 22.5 0 0 1 -9.833 -9.833c-2.452 -4.813 -2.452 -11.114 -2.452 -23.715L0 36c0 -12.601 0 -18.902 2.452 -23.715a22.5 22.5 0 0 1 9.833 -9.833c4.813 -2.452 11.114 -2.452 23.715 -2.452L64 0Z'/%3E%3C/svg%3E"); }
.icon { --size: 60px; position: relative; width: var(--size); height: var(--size); flex: none;
  filter: drop-shadow(0 .5px .75px rgba(0, 0, 0, .14)) drop-shadow(0 3px 7px rgba(0, 0, 0, .1));
  transition: transform .35s var(--spring), filter .3s; }
.icon-body { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: var(--tile, #fff);
  -webkit-mask: var(--squircle) center / 100% 100% no-repeat; mask: var(--squircle) center / 100% 100% no-repeat; }
.icon-body img { width: 100%; height: 100%; object-fit: cover; }
.icon.pad .icon-body img { width: var(--pad, 64%); height: var(--pad, 64%); object-fit: contain; }
.icon-edge { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.icon-edge path { fill: none; stroke: rgba(0, 0, 0, .1); stroke-width: 1px; vector-effect: non-scaling-stroke; }
:root[data-theme="dark"] .icon-edge path { stroke: rgba(255, 255, 255, .14); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .icon-edge path { stroke: rgba(255, 255, 255, .14); } }
.icon.mono .icon-body { background: linear-gradient(180deg, color-mix(in oklab, var(--b1) 82%, white), var(--b1)); color: #fff; }
.icon .mark { font-size: calc(var(--size) * .44); font-weight: 600; letter-spacing: -.03em; line-height: 1; }
.icon .mark.cjk { font-size: calc(var(--size) * .44); letter-spacing: 0; }
.board:not(.editing) .tile:hover .icon { transform: translateY(-2px); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .14)) drop-shadow(0 8px 14px rgba(0, 0, 0, .16)); }
.board:not(.editing) .tile:active .icon { transform: scale(.95); transition-duration: .1s; }
/* The permanent "+" tile at the end of the grid. */
.icon.adder { filter: none; }
.icon.adder .icon-body { background: color-mix(in srgb, var(--on-wall) 10%, transparent); color: var(--on-wall-2); }
.icon.adder .icon-edge path { stroke: color-mix(in srgb, var(--on-wall) 22%, transparent); stroke-dasharray: 4 3; }
.icon.adder svg:not(.icon-edge) { width: 34%; height: 34%; }
.tile.add-tile > span:last-child { color: var(--on-wall-2); }
.board:not(.editing) .tile.add-tile:hover .icon-body { background: color-mix(in srgb, var(--on-wall) 16%, transparent); }

/* Footer: page dots + edit */
.board-foot { position: relative; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 40px; }
.foot-side { display: flex; }
.foot-side.end { justify-content: flex-end; }
.dots { display: flex; gap: 2px; padding: 4px 6px; border-radius: 999px; }
.dots:has(button:only-child) { visibility: hidden; }
.dots button { width: 18px; height: 18px; display: grid; place-items: center; }
.dots button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--on-wall); opacity: .28; transition: opacity .2s, transform .2s; }
.dots button[aria-selected="true"]::before { opacity: .9; }
.chip { height: 28px; min-width: 28px; padding: 0 12px; border-radius: 999px; display: grid; place-items: center; font-size: 13px; font-weight: 550; color: var(--on-wall-2);
  transition: background .15s, color .15s; }
.chip:hover { background: color-mix(in srgb, var(--on-wall) 10%, transparent); color: var(--on-wall); }
.chip [data-icon] svg { width: 15px; height: 15px; }
.editing .chip { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 .5px var(--card-edge), var(--shadow-s); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
#editButton.on { background: var(--accent); color: #fff; box-shadow: none; }
#addButton { padding: 0; width: 28px; }
.add-menu { bottom: calc(100% + 6px); inset-inline-start: 0; }

/* Edit mode */
.editing .item { cursor: grab; }
.editing .item > :not(.remove) { pointer-events: none; }
.editing .tile-item .icon { animation: wiggle .28s ease-in-out infinite alternate; animation-delay: calc(var(--n, 0) * -53ms); }
.editing .widget-item .widget { animation: wiggle-s .3s ease-in-out infinite alternate; animation-delay: calc(var(--n, 0) * -71ms); }
@keyframes wiggle { from { transform: rotate(-1.2deg); } to { transform: rotate(1.2deg); } }
@keyframes wiggle-s { from { transform: rotate(-.35deg); } to { transform: rotate(.35deg); } }
.remove { position: absolute; z-index: 3; top: 0; inset-inline-start: calc(50% - 40px); width: 20px; height: 20px; border-radius: 50%; display: none; place-items: center;
  background: var(--solid); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .2), inset 0 0 0 .5px var(--card-edge); }
.widget-item .remove { top: 0; inset-inline-start: 0; }
.remove svg { width: 10px; height: 10px; }
.editing .remove { display: grid; }
.item.dragging { z-index: 30; cursor: grabbing; transition: none; }
.item.dragging .icon, .item.dragging .widget { animation: none; transform: scale(1.08); box-shadow: 0 16px 36px rgba(0, 0, 0, .22); }
.item.dragging .remove { display: none; }

/* ───────────────────────── Widgets ─────────────────────────
   Neutral cards with one accent colour each, like the system widgets. */
.widget { position: relative; flex: 1; min-width: 0; padding: 15px 16px; border-radius: 22px; overflow: hidden; display: flex; flex-direction: column;
  color: var(--ink); background: var(--card); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%);
  box-shadow: inset 0 0 0 .5px var(--card-edge), var(--shadow); }
.w-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; min-height: 18px; }
.w-title { font-size: 13px; font-weight: 600; letter-spacing: -.006em; color: var(--accent-w, var(--ink-2)); }
.badge { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: var(--fill); color: var(--ink-2); }

/* Weather keeps its sky. */
.w-weather { flex-direction: row; gap: 18px; color: #fff; background: linear-gradient(180deg, #4a90e2 0%, #7db6f0 100%); box-shadow: var(--shadow); }
.w-weather.night { background: linear-gradient(180deg, #1d2b4f 0%, #3b4a72 100%); }
.w-weather .badge { background: rgba(255, 255, 255, .2); color: #fff; }
.wx-now { display: flex; flex-direction: column; min-width: 0; flex: 0 0 40%; }
.wx-city { display: flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 600; white-space: nowrap; min-width: 0; }
.wx-city span { overflow: hidden; text-overflow: ellipsis; }
.wx-city svg { width: 10px; height: 10px; flex: none; }
.wx-temp { display: flex; align-items: flex-start; gap: 8px; font-size: 46px; font-weight: 300; letter-spacing: -.04em; line-height: 1.05; margin-top: 2px; }
.wx-temp .badge { margin-top: 8px; letter-spacing: 0; line-height: 1.4; }
.wx-cond { display: flex; align-items: center; gap: 6px; margin-top: auto; font-size: 13px; font-weight: 600; }
.wx-cond svg { width: 20px; height: 20px; flex: none; }
.wx-hl { font-size: 12.5px; font-weight: 500; opacity: .85; margin-top: 2px; }
.wx-week { flex: 1; display: grid; align-content: space-between; padding: 2px 0; min-width: 0; }
.wx-day { display: grid; grid-template-columns: minmax(2.6em, auto) 18px 2.2em 1fr 2.2em; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wx-day .lo { opacity: .65; text-align: end; }
.wx-day svg { width: 18px; height: 18px; }
.wx-bar { position: relative; height: 4px; border-radius: 4px; background: rgba(0, 0, 0, .15); }
.wx-bar i { position: absolute; top: 0; bottom: 0; inset-inline-start: var(--l); width: var(--w); border-radius: 4px; background: linear-gradient(90deg, #a5dcff, #ffe08a 60%, #ffb36b); }
.wx-bar b { position: absolute; top: 50%; inset-inline-start: var(--p); width: 6px; height: 6px; margin-top: -3px; margin-inline-start: -3px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1.5px rgba(0, 0, 0, .18); }

/* Calendar */
.w-calendar { flex-direction: row; gap: 20px; }
.cal-today { flex: 0 0 44%; display: flex; flex-direction: column; min-width: 0; }
.cal-wd { font-size: 12px; font-weight: 650; color: var(--red); text-transform: uppercase; letter-spacing: .02em; }
.cal-num { font-size: 38px; font-weight: 400; letter-spacing: -.035em; line-height: 1.05; }
.cal-events { margin-top: auto; display: grid; gap: 6px; }
.event { display: grid; grid-template-columns: 3px 1fr; gap: 8px; font-size: 12.5px; line-height: 1.25; }
.event i { border-radius: 3px; background: var(--c); }
.event b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event small { color: var(--ink-2); font-size: 11.5px; }
.cal-month { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-month-name { font-size: 12px; font-weight: 650; color: var(--red); margin-bottom: 4px; }
.cal-grid { position: relative; z-index: 0; display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 10.5px; font-weight: 550; font-variant-numeric: tabular-nums; flex: 1; align-content: space-between; }
.cal-grid .dow { color: var(--ink-3); font-size: 9.5px; font-weight: 650; }
.cal-grid span { display: grid; place-items: center; height: 18px; }
.cal-grid .muted { color: var(--ink-3); }
.cal-grid .today { position: relative; color: #fff; font-weight: 650; }
.cal-grid .today::before { content: ""; position: absolute; width: 19px; height: 19px; border-radius: 50%; background: var(--red); z-index: -1; }

/* Reminders */
.w-reminders { --accent-w: var(--orange); }
.count { font-size: 22px; font-weight: 650; color: var(--orange); line-height: 1; font-variant-numeric: tabular-nums; }
.todo { list-style: none; margin: 0; padding: 0; display: grid; overflow: hidden; }
.todo li { display: flex; align-items: center; gap: 9px; padding: 5px 0; border-bottom: .5px solid var(--hairline); font-size: 13px; line-height: 1.25; }
.todo .box { flex: none; width: 17px; height: 17px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--ink-3); display: grid; place-items: center; transition: background .2s, box-shadow .2s; }
.todo .box svg { width: 9px; height: 9px; color: #fff; opacity: 0; transition: opacity .2s; }
.todo li.done .box { background: var(--orange); box-shadow: none; }
.todo li.done .box svg { opacity: 1; }
.todo li.done .text { color: var(--ink-3); text-decoration: line-through; }
.todo .text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.new-todo { display: flex; align-items: center; gap: 9px; margin-top: auto; padding-top: 6px; }
.new-todo svg { width: 17px; height: 17px; color: var(--orange); flex: none; }
.new-todo input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--ink); }
.new-todo input::placeholder { color: var(--ink-3); }

/* Notes */
.w-notes { --accent-w: #c79400; }
.w-notes .w-title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px; background: var(--yellow); margin-inline-end: 7px; vertical-align: 1px; }
.w-notes textarea { flex: 1; resize: none; border: 0; outline: 0; background: transparent; font-size: 13.5px; line-height: 21px; letter-spacing: -.006em; color: inherit; padding: 0; }
.w-notes textarea::placeholder { color: var(--ink-3); }

/* Rings (focus, year) */
.ring { position: relative; width: 88px; height: 88px; margin: -2px auto 0; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
[dir="rtl"] .ring svg { transform: rotate(-90deg) scaleY(-1); }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: var(--fill-2); }
.ring .bar { stroke: var(--ring, var(--accent)); stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.ring .center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring time { font-size: 19px; font-weight: 550; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.w-focus { --accent-w: var(--indigo); --ring: var(--indigo); }
.w-year { --accent-w: var(--green); --ring: var(--green); }
.pill-row { display: flex; justify-content: center; gap: 8px; margin-top: auto; }
.pill-row button { height: 28px; padding: 0 16px; border-radius: 999px; font-size: 12.5px; font-weight: 600; transition: transform .2s var(--spring), background .2s; }
.pill-row button:active { transform: scale(.95); }
.pill-row .primary { background: var(--indigo); color: #fff; min-width: 72px; }
.pill-row .secondary { width: 28px; padding: 0; display: grid; place-items: center; background: var(--fill); color: var(--ink-2); }
.pill-row .secondary svg { width: 13px; height: 13px; }
.w-year .foot { margin-top: auto; text-align: center; font-size: 12px; font-weight: 550; color: var(--ink-2); }

/* World clock */
.world-row { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-items: center; }
.city-clock { display: grid; justify-items: center; text-align: center; gap: 1px; min-width: 0; }
.city-clock svg { width: 62px; height: 62px; margin-bottom: 6px; }
.city-clock b { font-size: 12px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.city-clock small { font-size: 10.5px; color: var(--ink-2); white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.face { fill: #fff; stroke: rgba(0, 0, 0, .1); stroke-width: .6; }
.night .face { fill: #1c1c1e; stroke: rgba(255, 255, 255, .12); }
.num { font-size: 8px; font-weight: 600; fill: #1d1d1f; text-anchor: middle; dominant-baseline: central; font-family: "Inter Var", sans-serif; }
.night .num { fill: #f5f5f7; }
.hand { stroke: #1d1d1f; stroke-linecap: round; }
.night .hand { stroke: #f5f5f7; }
.hand.s { stroke: var(--orange); }
.pin { fill: var(--orange); }

/* Sun & moon */
.w-sun { --accent-w: var(--orange); }
.sun-arc { position: relative; flex: 1; margin: 0 2px 6px; min-height: 0; }
.sun-arc svg { width: 100%; height: 100%; overflow: visible; }
[dir="rtl"] .sun-arc svg { transform: scaleX(-1); }
.sun-arc .path { fill: none; stroke: color-mix(in srgb, var(--orange) 55%, transparent); stroke-width: 1.4; stroke-dasharray: 3 4; }
.sun-arc .horizon { stroke: var(--hairline); stroke-width: 1; }
.sun-arc .dot { fill: var(--orange); filter: drop-shadow(0 0 4px color-mix(in srgb, var(--orange) 70%, transparent)); }
.sun-times { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sun-times span { display: grid; gap: 1px; }
.sun-times span:last-child { text-align: end; }
.sun-times small { font-size: 10.5px; font-weight: 550; color: var(--ink-2); }
.moon { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--ink-2); }
.moon svg { width: 15px; height: 15px; }
.moon .shade { fill: var(--fill-2); }
.moon .lit { fill: #e8d9a8; }

/* Countdown */
.w-countdown { --accent-w: var(--pink); }
.cd-num { margin-top: auto; font-size: 52px; font-weight: 300; letter-spacing: -.045em; line-height: 1; color: var(--pink); font-variant-numeric: tabular-nums; }
.cd-num small { font-size: 14px; font-weight: 600; letter-spacing: 0; margin-inline-start: 4px; }
.cd-label { font-size: 14.5px; font-weight: 600; margin-top: 8px; }
.cd-date { font-size: 12px; color: var(--ink-2); }

/* Breathe */
.w-breathe { --accent-w: var(--teal); }
.breath { position: relative; flex: 1; display: grid; place-items: center; }
.breath i { position: absolute; width: 80px; height: 80px; border-radius: 50%; background: color-mix(in srgb, var(--teal) 14%, transparent); animation: breathe 8s ease-in-out infinite; }
.breath i:nth-child(2) { width: 56px; height: 56px; background: color-mix(in srgb, var(--teal) 24%, transparent); animation-delay: .2s; }
.breath i:nth-child(3) { width: 32px; height: 32px; background: color-mix(in srgb, var(--teal) 70%, transparent); animation-delay: .4s; }
.breath-label { text-align: center; font-size: 13px; font-weight: 600; color: var(--ink-2); min-height: 18px; }
@keyframes breathe { 0%, 100% { transform: scale(.7); } 50% { transform: scale(1.1); } }

/* Hydration */
.w-water { --accent-w: var(--teal); }
.water-count { font-size: 22px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; color: var(--teal); }
.water-count small { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.drops { margin-top: auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; justify-items: center; }
.drops button { width: 24px; height: 30px; color: var(--fill-2); transition: transform .25s var(--spring), color .2s; }
.drops button.full { color: var(--teal); }
.drops button:hover { transform: scale(1.1); }
.drops svg { width: 100%; height: 100%; }

/* ───────────────────────── Sheets ───────────────────────── */
.sheet { border: 0; padding: 0; background: transparent; width: min(620px, calc(100vw - 32px)); max-height: min(86vh, 860px); color: var(--ink); overflow: visible; }
.sheet-wide { width: min(940px, calc(100vw - 32px)); }
.sheet-small { width: min(440px, calc(100vw - 32px)); }
.sheet::backdrop { background: rgba(0, 0, 0, .2); }
.sheet[open] .sheet-inner { animation: sheet-in .35s var(--ease); }
.sheet[open]::backdrop { animation: fade .25s ease; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes fade { from { opacity: 0; } }
.sheet-inner { display: flex; flex-direction: column; max-height: min(86vh, 860px); border-radius: 24px; overflow: hidden; background: var(--solid);
  box-shadow: inset 0 0 0 .5px var(--card-edge), var(--shadow-l); margin: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 8px; }
.sheet-head h2 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: -.02em; }
.pill-button { height: 32px; padding: 0 16px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 14px; font-weight: 600; transition: filter .15s, transform .2s var(--spring); }
.pill-button:hover { filter: brightness(1.08); }
.pill-button:active { transform: scale(.97); }
.pill-button.quiet { background: var(--fill); color: var(--ink); }
.sheet-body { overflow: auto; padding: 0 24px 24px; }
.sheet-body h3 { margin: 20px 4px 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.sheet-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, 196px); justify-content: center; gap: 18px; padding: 10px 2px 4px; }
.gallery-item { position: relative; display: flex; height: 196px; border-radius: 22px; }
.gallery-item.size-m { grid-column: span 2; }
.gallery-item .widget { pointer-events: none; transition: transform .25s var(--spring); box-shadow: inset 0 0 0 .5px var(--card-edge), 0 1px 3px rgba(0, 0, 0, .08); }
.gallery-item .widget:not(.w-weather) { background: color-mix(in srgb, var(--ink) 4%, var(--solid)); }
.gallery-item:hover .widget { transform: scale(1.02); }
.gallery-item .state { position: absolute; top: -7px; inset-inline-start: -7px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: var(--solid); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.gallery-item .state svg { width: 12px; height: 12px; }
.gallery-item[aria-pressed="true"] .state { background: var(--green); color: #fff; }

.site-preview { display: grid; place-items: center; padding: 10px 0 18px; }
.site-preview .icon { --size: 76px; }
.fields .row input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; text-align: end; font-size: 15px; color: var(--ink); }
.fields .row input::placeholder { color: var(--ink-3); }

.lang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.lang { position: relative; display: grid; gap: 1px; padding: 9px 13px; border-radius: 12px; background: var(--fill); text-align: start; transition: background .15s, box-shadow .15s; }
.lang:hover { background: var(--fill-2); }
.lang b { font-size: 14.5px; font-weight: 600; }
.lang small { font-size: 12px; color: var(--ink-2); }
.lang[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.lang[aria-pressed="true"]::after { content: ""; position: absolute; top: 50%; inset-inline-end: 12px; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }

.appearance-grid, .icon-style-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.appearance, .icon-style { display: grid; justify-items: center; gap: 8px; font-size: 13px; font-weight: 500; }
.preview { width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; position: relative; overflow: hidden; box-shadow: inset 0 0 0 1px var(--hairline); transition: box-shadow .15s; }
[aria-pressed="true"] > .preview { box-shadow: 0 0 0 3px var(--accent); }
.preview.light { background: linear-gradient(165deg, #f4efe8, #e7e8ec); }
.preview.dark { background: linear-gradient(180deg, #2a2a2e, #161618); }
.preview.auto { background: linear-gradient(115deg, #f1ece6 0 50%, #202023 50% 100%); }
.preview > i { position: absolute; border-radius: 4px; }
.preview > i:nth-child(1) { left: 22%; right: 22%; top: 24%; height: 14%; border-radius: 99px; }
.preview > i:nth-child(2) { left: 22%; width: 24%; top: 50%; height: 26%; }
.preview > i:nth-child(3) { right: 22%; width: 24%; top: 50%; height: 26%; }
.preview.light > i { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.preview.dark > i { background: #3a3a3c; }
.preview.auto > i:nth-child(1) { background: linear-gradient(115deg, #fff 50%, #3a3a3c 50%); }
.preview.auto > i:nth-child(2) { background: #fff; }
.preview.auto > i:nth-child(3) { background: #3a3a3c; }

.wallpaper-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wall { aspect-ratio: 16 / 10; border-radius: 10px; background: #ddd center / cover; overflow: hidden; box-shadow: inset 0 0 0 1px var(--hairline); transition: box-shadow .15s; }
.wall[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--accent); }
.wall[data-css="auto"] { background: linear-gradient(115deg, #f1ece6 0 50%, #202023 50% 100%); }
.wall[data-css="linen"] { background: linear-gradient(165deg, #f4efe8 0%, #ece5dc 50%, #e7e8ec 100%); }
.wall[data-css="mist"] { background: linear-gradient(180deg, #eef2f7 0%, #dfe6ef 100%); }
.wall[data-css="graphite"] { background: linear-gradient(180deg, #2a2a2e 0%, #161618 100%); }

.group { margin-top: 22px; border-radius: 12px; background: var(--fill); }
.sheet-small .group { margin-top: 0; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 14px; font-size: 14.5px; }
.row + .row { border-top: .5px solid var(--hairline); }
.mini-seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--fill); }
.mini-seg button { height: 26px; padding: 0 11px; border-radius: 6px; font-size: 12.5px; font-weight: 500; }
.mini-seg button[aria-pressed="true"] { background: var(--thumb); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.switch { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 46px; height: 28px; margin: 0; border-radius: 999px; background: var(--fill-2); cursor: pointer; transition: background .2s; }
.switch::before { content: ""; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, .15); transition: transform .25s var(--spring); }
.switch:checked { background: var(--green); }
.switch:checked::before { transform: translateX(18px); }
[dir="rtl"] .switch::before { left: auto; right: 2px; }
[dir="rtl"] .switch:checked::before { transform: translateX(-18px); }
.privacy { display: flex; gap: 10px; align-items: flex-start; margin: 22px 4px 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.privacy svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 1100px) {
  :root { --sidebar-w: 64px; }
  .brand { justify-content: center; padding-inline: 0; }
  .brand-name, .nav-item .nl, .nav-item .nc { display: none; }
  .nav-item { justify-content: center; padding: 0; height: 42px; }
  .main { padding-inline-end: 20px; padding-inline-start: calc(var(--gutter) + var(--sidebar-w) + 20px); }
}
@media (max-width: 680px) {
  .sidebar { top: auto; bottom: 10px; inset-inline: 10px; width: auto; height: 58px; flex-direction: row; align-items: center; padding: 6px; border-radius: 20px; }
  .brand { display: none; }
  .nav { display: flex; flex: 1; gap: 0; overflow-x: auto; overflow-y: hidden; }
  .nav-item { width: 44px; flex: none; }
  .side-foot { margin: 0; padding: 0; padding-inline-start: 6px; border-top: 0; border-inline-start: .5px solid var(--hairline); display: flex; }
  #addWidgetButton { display: none; }
  .side-foot .nav-item { width: 40px; }
  .side-foot .menu { inset-inline-start: auto; inset-inline-end: 0; }
  .main { padding: 28px 12px 78px; }
  .icon { --size: 54px; }
  .tile > span:last-child { font-size: 11px; }
  .wallpaper-grid { grid-template-columns: repeat(2, 1fr); }
  .sheet-head, .sheet-body { padding-inline: 18px; }
  .import-review > .sheet-actions { margin-inline: -18px; padding-inline: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
.editing .item[data-key="+"] { cursor: default; }
.editing .item[data-key="+"] > .tile { pointer-events: auto; }
.editing .tile-item .icon.adder { animation: none; }

/* ───────────────────────── Liquid Glass ─────────────────────────
   Clear glass over the photo: strong blur + saturation, a bright specular rim
   (brighter top-left, fainter bottom-right), an inner glow, and a soft light
   that follows the pointer. Content on glass uses the wallpaper's ink. */
.lg { --lg-tint: rgba(30, 32, 40, .22); --lg-rim: rgba(255, 255, 255, .62);
  --ink: #fff; --ink-2: rgba(255, 255, 255, .72); --ink-3: rgba(255, 255, 255, .46);
  --fill: rgba(255, 255, 255, .14); --fill-2: rgba(255, 255, 255, .24); --hairline: rgba(255, 255, 255, .16);
  position: relative; isolation: isolate; color: var(--ink); background: var(--lg-tint);
  -webkit-backdrop-filter: blur(26px) saturate(185%) brightness(1.06); backdrop-filter: blur(26px) saturate(185%) brightness(1.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), inset 0 -1px 0 rgba(255, 255, 255, .06), inset 0 0 24px rgba(255, 255, 255, .05),
              0 1px 2px rgba(0, 0, 0, .08), 0 14px 40px -8px rgba(0, 0, 0, .3); }
body.light-wall .lg { --lg-tint: rgba(255, 255, 255, .42); --lg-rim: rgba(255, 255, 255, .9);
  --ink: #1d1d1f; --ink-2: rgba(29, 29, 31, .62); --ink-3: rgba(29, 29, 31, .38);
  --fill: rgba(0, 0, 0, .06); --fill-2: rgba(0, 0, 0, .1); --hairline: rgba(0, 0, 0, .08); }
.lg::before { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, var(--lg-rim) 0%, rgba(255, 255, 255, .14) 28%, rgba(255, 255, 255, 0) 55%, rgba(255, 255, 255, .1) 78%, rgba(255, 255, 255, .42) 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.lg::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .2), transparent 65%); }
.lg:hover::after { opacity: 1; }

.sidebar.lg { background: var(--lg-tint); }
.sidebar .nav-item[aria-selected="true"] { background: var(--fill-2); }
.sidebar .nav-item .ni { color: var(--ink); opacity: .9; }
.sidebar .nav-item[aria-selected="true"] .ni { opacity: 1; }
.search.lg { background: var(--lg-tint); }
.search.lg:focus-within { background: color-mix(in srgb, var(--lg-tint) 70%, rgba(255, 255, 255, .2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), 0 0 0 4px rgba(255, 255, 255, .16), 0 14px 40px -8px rgba(0, 0, 0, .3); }
.search .hint { color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--hairline); }
.widget.lg { background: var(--lg-tint); }
.widget.lg .w-weather, .w-weather.lg { background: var(--lg-tint); }
.w-weather.lg.night { background: var(--lg-tint); }
.w-weather .badge, .badge { background: var(--fill); color: var(--ink-2); }
.w-notes { --accent-w: #ffd60a; }
body.light-wall .w-notes { --accent-w: #b07d00; }
.cal-grid .today { color: #fff; }
.face { fill: rgba(255, 255, 255, .92); stroke: none; }
.night .face { fill: rgba(20, 20, 24, .7); }
.gallery-item .widget.lg { --lg-tint: rgba(40, 42, 52, .92); }
body.light-wall .gallery-item .widget.lg { --lg-tint: rgba(250, 250, 252, .96); }
.gallery-item .widget:not(.w-weather) { background: var(--lg-tint); }

/* Hero: a bolder lock-screen clock. */
.date { font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--on-wall); opacity: .92; }
.clock { font-size: clamp(76px, min(9.2vw, 14vh), 132px); font-weight: 560; letter-spacing: -.045em; line-height: .98; margin-top: 0;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .22); }
body.light-wall .clock { text-shadow: 0 1px 30px rgba(255, 255, 255, .4); }
.clock .period { font-weight: 600; color: var(--on-wall); opacity: .85; }
.hero { animation: hero-in 1.1s var(--ease) both; }
@keyframes hero-in { from { opacity: 0; transform: translateY(8px) scale(.985); filter: blur(10px); } }
.search { animation: hero-in 1.1s .08s var(--ease) both; }
.sidebar { animation: side-in 1s var(--ease) both; }
@keyframes side-in { from { opacity: 0; transform: translateX(-12px); filter: blur(6px); } }
[dir="rtl"] .sidebar { animation-name: side-in-rtl; }
@keyframes side-in-rtl { from { opacity: 0; transform: translateX(12px); filter: blur(6px); } }

/* Icons and widgets arrive in a quick cascade. */
.item { animation: item-in .7s var(--ease) backwards; animation-delay: calc(140ms + var(--i, 0) * 22ms); }
@keyframes item-in { from { opacity: 0; transform: translateY(10px) scale(.94); filter: blur(6px); } }
.tile > span:last-child { font-weight: 550; text-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
body.light-wall .tile > span:last-child { text-shadow: none; }
.icon { filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18)) drop-shadow(0 6px 14px rgba(0, 0, 0, .22)); }
.icon-edge path { stroke: rgba(255, 255, 255, .22); }
body.light-wall .icon-edge path { stroke: rgba(0, 0, 0, .1); }
.icon.adder .icon-body { background: rgba(255, 255, 255, .14); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%); color: var(--on-wall); }
.icon.adder .icon-edge path { stroke: rgba(255, 255, 255, .5); stroke-dasharray: none; }
body.light-wall .icon.adder .icon-body { background: rgba(255, 255, 255, .45); }
body.light-wall .icon.adder .icon-edge path { stroke: rgba(0, 0, 0, .14); }

/* Footer chips and the photo credit. */
.chip { color: var(--on-wall); }
.credit { margin-inline-start: 6px; align-self: center; max-width: 34vw; font-size: 11.5px; font-weight: 500; color: var(--on-wall-2); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 4px rgba(0, 0, 0, .3); opacity: .8; transition: opacity .2s; }
.credit:hover { opacity: 1; text-decoration: underline; }
body.light-wall .credit { text-shadow: none; }
.editing .credit { display: none; }

/* Settings: wallpaper picker. */
.wallpaper-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
.wall { aspect-ratio: auto; background: none; box-shadow: none; display: grid; gap: 6px; text-align: center; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.wall-img { display: block; aspect-ratio: 16 / 10; border-radius: 12px; background: #333 center / cover; box-shadow: inset 0 0 0 1px var(--hairline); transition: box-shadow .15s, transform .25s var(--spring); }
.wall:hover .wall-img { transform: scale(1.02); }
.wall[aria-pressed="true"] { box-shadow: none; }
.wall[aria-pressed="true"] .wall-img { box-shadow: 0 0 0 3px var(--accent); }
.wall.dynamic .wall-img { display: grid; grid-template-columns: repeat(4, 1fr); overflow: hidden; }
.wall.dynamic .wall-img i { background: center / cover; }
.wall-name { position: absolute; }
.wall.dynamic { position: relative; }
.wall-gap { margin-top: 14px; }
#wallNote { margin: 10px 4px 0; }
.wall.dynamic .wall-name { inset: auto 0 10px; color: #fff; font-weight: 650; font-size: 12.5px; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }

@media (prefers-reduced-motion: reduce) { .wallpaper { transform: none; } }

/* Menus and suggestions opened from inside glass keep the system colours. */
:root { --sys-ink: var(--ink); --sys-ink-2: var(--ink-2); --sys-ink-3: var(--ink-3); --sys-fill: var(--fill); --sys-fill-2: var(--fill-2); --sys-hairline: var(--hairline); }
.lg .menu, .lg .suggestions { --ink: var(--sys-ink); --ink-2: var(--sys-ink-2); --ink-3: var(--sys-ink-3); --fill: var(--sys-fill); --fill-2: var(--sys-fill-2); --hairline: var(--sys-hairline); }
.sidebar.lg { position: fixed; }
.lg { --lg-tint: rgba(28, 30, 38, .3); }
body.light-wall .lg { --lg-tint: rgba(255, 255, 255, .46); }
.tile > span:last-child { text-shadow: 0 1px 2px rgba(0, 0, 0, .45), 0 0 14px rgba(0, 0, 0, .3); }
body.light-wall .tile > span:last-child { text-shadow: 0 0 10px rgba(255, 255, 255, .6); }
.date { text-shadow: 0 1px 10px rgba(0, 0, 0, .3); }
body.light-wall .date { text-shadow: none; }
.lg .cal-wd, .lg .cal-month-name { color: #ff6b61; }
body.light-wall .lg .cal-wd, body.light-wall .lg .cal-month-name { color: #e5352b; }

/* ───────── Import bookmarks ───────── */
.import-lede { margin: 2px 4px 18px; font-size: 14.5px; line-height: 1.45; color: var(--ink-2); max-width: 46ch; }
.import-sources { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.source[hidden] { display: none; }
.source { display: grid; justify-items: start; gap: 4px; padding: 18px; border-radius: 16px; background: var(--fill); text-align: start; cursor: pointer;
  transition: background .15s, transform .25s var(--spring); }
.source:hover:not(:disabled) { background: var(--fill-2); }
.source:active:not(:disabled) { transform: scale(.98); }
.source:disabled { cursor: default; }
.source:disabled .source-icon, .source:disabled b { opacity: .45; }
.source:focus-within, .source:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.source b { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.source small { font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.source-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 8px; border-radius: 11px; color: #fff;
  background: linear-gradient(160deg, #6aa6ff, #2f5bf5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.source-icon svg { width: 22px; height: 22px; }
.import-paste { margin-top: 12px; }
.import-paste textarea { width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--fill); color: var(--ink); resize: vertical;
  font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; outline: 0; }
.import-paste textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.import-paste .sheet-actions { margin-top: 10px; }
.import-error { margin: 12px 4px 0; font-size: 13.5px; color: var(--red); }
.import-ai { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(120deg, color-mix(in srgb, #7c5cff 12%, transparent), color-mix(in srgb, #2f8bff 10%, transparent)); }
.import-ai .source-icon { margin: 0; flex: none; background: linear-gradient(160deg, #a78bfa, #6d4dff); }
.ai-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.ai-text b { font-size: 14.5px; font-weight: 600; }
.ai-text small { font-size: 12.5px; line-height: 1.4; color: var(--ink-2); }
.import-ai .pill-button { flex: none; }
.import-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 16px; }
.import-foot .privacy { margin: 0; }
.link-button { padding: 0; font-size: 14px; font-weight: 550; color: var(--accent); }
.link-button:hover { text-decoration: underline; }

.import-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 16px; }
.import-stats { display: flex; gap: 22px; }
.stat { display: grid; }
.stat b { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--ink-2); }
.import-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.import-review > .sheet-actions { position: sticky; bottom: -24px; margin: 0 -24px -24px; padding: 14px 24px 20px;
  background: linear-gradient(to bottom, transparent, var(--solid) 14px); }
.ig { border-radius: 16px; background: var(--fill); padding: 12px 14px 14px; transition: opacity .2s; }
.ig.off { opacity: .55; }
.ig header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ig-check { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.ig-icon { width: 18px; height: 18px; color: var(--accent); flex: none; }
.ig-icon svg { width: 100%; height: 100%; }
.ig-name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
input.ig-name { border: 0; outline: 0; padding: 3px 6px; margin: -3px -6px; border-radius: 6px; background: transparent; color: var(--ink); font-family: inherit; }
input.ig-name:hover, input.ig-name:focus { background: var(--thumb); }
.ig-n { font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ig-sites { display: flex; flex-wrap: wrap; gap: 6px; }
.ig-site, .ig-more { display: inline-flex; align-items: center; gap: 7px; height: 32px; max-width: 220px; padding: 0 10px 0 4px; border-radius: 10px;
  background: var(--thumb); font-size: 13px; box-shadow: 0 0 0 .5px var(--hairline); transition: opacity .15s, transform .2s var(--spring); }
.ig-site:active { transform: scale(.96); }
.ig-site > span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ig-site .icon { --size: 24px; filter: none; }
.ig-site .icon .mark { font-size: 12px; }
.ig-site[aria-pressed="false"] { opacity: .38; }
.ig-site[aria-pressed="false"] > span:last-child { text-decoration: line-through; }
.ig-more { padding: 0 12px; color: var(--accent); font-weight: 550; }

/* User categories in the sidebar */
.nav-row { position: relative; }
.nav-remove { position: absolute; inset-inline-end: 6px; top: 50%; translate: 0 -50%; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--fill-2); color: var(--ink-2); opacity: 0; transition: opacity .15s; }
.nav-remove svg { width: 10px; height: 10px; }
.nav-row:hover .nav-remove, .nav-remove:focus-visible { opacity: 1; }
.nav-row:hover .nc { opacity: 0; }
.nav-remove:hover { background: var(--red); color: #fff; }

/* Toast */
.toast { position: fixed; z-index: 50; left: 50%; bottom: 28px; translate: -50% 0; display: flex; align-items: center; gap: 14px; padding: 10px 10px 10px 18px;
  border-radius: 999px; background: rgba(30, 30, 32, .86); color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 12px 40px rgba(0, 0, 0, .3);
  -webkit-backdrop-filter: blur(24px) saturate(1.6); backdrop-filter: blur(24px) saturate(1.6); animation: toast-in .4s var(--spring); }
.toast[hidden] { display: none; }
.toast button { height: 30px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font-size: 13.5px; font-weight: 600; }
.toast button:hover { background: rgba(255, 255, 255, .26); }
@keyframes toast-in { from { opacity: 0; translate: -50% 16px; } }
@media (max-width: 680px) {
  .import-sources { grid-auto-flow: row; }
  .source { grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 12px 14px; }
  .source .source-icon { grid-row: span 2; margin: 0; }
  .import-ai { display: grid; grid-template-columns: auto 1fr; }
  .import-ai .pill-button { grid-column: 1 / -1; justify-self: start; }
}
.sheet-head h2:focus { outline: none; }

/* ───────── Web icons ───────── */
.icon.web .icon-body { background: #fff; }

/* ───────── Right-click menu ───────── */
.context-menu { position: fixed; z-index: 60; min-width: 230px; padding: 5px; border-radius: 13px;
  background: color-mix(in srgb, var(--sys-solid, var(--solid)) 82%, transparent); color: var(--sys-ink, var(--ink));
  -webkit-backdrop-filter: blur(30px) saturate(1.8); backdrop-filter: blur(30px) saturate(1.8);
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .14), 0 14px 40px rgba(0, 0, 0, .24); animation: menu-in .14s ease-out; transform-origin: top left; }
@keyframes menu-in { from { opacity: 0; transform: scale(.97); } }
.context-menu .menu-item { min-height: 30px; padding: 4px 10px; border-radius: 7px; font-size: 13.5px; color: inherit; }
.context-menu .menu-item:focus-visible { outline: none; background: var(--accent); color: #fff; }
.context-menu .mi { width: 17px; height: 17px; flex: none; display: grid; place-items: center; opacity: .8; }
.context-menu .mi svg { width: 100%; height: 100%; }
.context-menu .menu-item:hover .mi, .context-menu .menu-item:focus-visible .mi { opacity: 1; }
.context-menu .menu-item.danger { color: var(--red); }
.context-menu .menu-item.danger:hover, .context-menu .menu-item.danger:focus-visible { background: var(--red); color: #fff; }
.menu-sep { height: .5px; margin: 5px 10px; background: var(--sys-hairline, var(--hairline)); }

/* ───────── Weather ───────── */
.w-weather.setup { align-items: center; justify-content: center; }
.wx-setup { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; width: 100%; }
.wx-setup > svg { width: 46px; height: 46px; }
.wx-setup p { margin: 0; font-size: 14px; font-weight: 600; }
.wx-setup .pill-row { margin-top: 4px; flex-wrap: wrap; }
.wx-setup .pill-row button { display: inline-flex; align-items: center; gap: 6px; }
.wx-setup .pill-row svg { width: 10px; height: 10px; }
.w-weather .pill-row .primary { background: rgba(255, 255, 255, .95); color: #1d4ed8; }
.w-weather .pill-row .secondary { background: rgba(255, 255, 255, .2); color: #fff; }
button.wx-city { padding: 0; color: inherit; text-align: start; max-width: 100%; }
button.wx-city:hover span { text-decoration: underline; text-underline-offset: 3px; }
.wx-wait { margin: auto 0; font-size: 13px; font-weight: 500; opacity: .9; display: grid; gap: 6px; justify-items: start; }
.w-weather .link, .w-sun .link, .link { padding: 0; font: inherit; font-weight: 600; color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ───────── Calendar ───────── */
.cal-month-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.cal-month-bar .cal-month-name { margin: 0; padding: 0; }
.cal-nav { display: flex; gap: 2px; }
.cal-nav button { width: 18px; height: 18px; border-radius: 50%; font-size: 14px; line-height: 1; color: var(--ink-2); display: grid; place-items: center; }
.cal-nav button:hover { background: var(--fill-2); color: var(--ink); }
.cal-grid button { position: relative; display: grid; place-items: center; height: 18px; padding: 0; font: inherit; color: inherit; border-radius: 50%; }
.cal-grid button:hover:not(.today)::before { content: ""; position: absolute; width: 19px; height: 19px; border-radius: 50%; background: var(--fill-2); z-index: -1; }
.cal-grid .today { position: relative; color: #fff; font-weight: 650; }
.cal-grid button.busy::after { content: ""; position: absolute; bottom: -1px; width: 3px; height: 3px; border-radius: 50%; background: var(--red); }
.cal-grid button.today.busy::after { background: #fff; bottom: 1px; }
button.event { padding: 0; text-align: start; color: inherit; width: 100%; border-radius: 6px; }
button.event:hover b { text-decoration: underline; text-underline-offset: 2px; }
.cal-add { display: inline-flex; align-items: center; gap: 6px; padding: 0; font-size: 12.5px; font-weight: 600; color: var(--red); }
.cal-add svg { width: 15px; height: 15px; }

/* ───────── Reminders ───────── */
.w-reminders .todo { overflow-y: auto; scrollbar-width: none; min-height: 0; flex: 1; align-content: start; }
.todo li { position: relative; }
.todo li.empty { color: var(--ink-3); border: 0; }
.todo-del { flex: none; margin-inline-start: auto; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--fill-2); color: var(--ink-2); opacity: 0; transition: opacity .15s; }
.todo-del svg { width: 8px; height: 8px; }
.todo li:hover .todo-del, .todo-del:focus-visible { opacity: 1; }
.todo-del:hover { background: var(--red); color: #fff; }

/* ───────── Countdown ───────── */
.w-edit { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); opacity: 0; transition: opacity .15s; }
.w-edit svg { width: 14px; height: 14px; }
.widget:hover .w-edit, .w-edit:focus-visible { opacity: 1; }
.w-edit:hover { background: var(--fill-2); color: var(--ink); }

/* ───────── Sheets: location, events, countdown ───────── */
.search-row { gap: 10px; }
.search-row [data-icon] svg { width: 16px; height: 16px; color: var(--ink-2); }
.search-row input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; color: var(--ink); text-align: start !important; }
.place-locate { margin-top: 10px; color: var(--accent); font-weight: 550; }
.place-locate:hover { color: #fff; }
.place-locate [data-icon] svg { width: 12px; height: 12px; }
.place-results { display: grid; gap: 2px; margin-top: 6px; }
.menu-item.place b { display: block; font-weight: 600; }
.menu-item.place small { display: block; margin: 0; }
.menu-item.place span:first-child svg { width: 12px; height: 12px; color: var(--accent); }
.menu-item.place:hover span:first-child svg { color: #fff; }
.place-empty { margin: 10px 4px; color: var(--ink-2); font-size: 14px; }
.fields .row input[type="date"], .fields .row input[type="time"] { flex: 0 1 auto; font-family: inherit; }
.event-list { display: grid; gap: 2px; margin-top: 12px; }
.event-list .menu-item svg { width: 16px; height: 16px; color: var(--red); }
.event-list .menu-item:hover svg { color: #fff; }
.sheet-actions .spacer { flex: 1; }
.pill-button.danger { color: var(--red); }
.wx-setup .pill-row button { width: auto; height: 30px; padding: 0 14px; white-space: nowrap; }
.wx-setup .pill-row .secondary { background: rgba(255, 255, 255, .22); color: #fff; box-shadow: inset 0 0 0 .5px rgba(255, 255, 255, .3); }
.wx-setup .pill-row .secondary:hover { background: rgba(255, 255, 255, .32); }

/* ───────────────────────── Search suggestions & image search ───────────────────────── */
.lens { display: grid; place-items: center; flex: none; width: 34px; height: 34px; margin-inline-end: 4px; border-radius: 17px; color: var(--ink-2); transition: background .15s, color .15s; }
.lens:hover { background: var(--fill); color: var(--ink); }
.lens svg { width: 19px; height: 19px; }
.mic { margin-inline-end: 0; }
.mic.listening { background: var(--red); color: #fff; animation: listen 1.2s ease-in-out infinite; }
@keyframes listen { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--red) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .mic.listening { animation: none; } }
.suggestion .words { font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggestion .words b { font-weight: 650; }
.suggest-offer { display: flex; align-items: center; gap: 4px; margin-top: 4px; padding-top: 6px; border-top: .5px solid var(--hairline); }
.suggest-offer button { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: 10px; font-size: 13.5px; color: var(--accent); }
.suggest-offer button:hover { background: var(--fill); }
.suggest-offer .offer-on { flex: 1; }
.suggest-offer .offer-on svg { width: 16px; height: 16px; }
.suggest-offer .offer-off { flex: none; width: 36px; justify-content: center; padding: 0; color: var(--ink-3); }
.suggest-offer .offer-off svg { width: 14px; height: 14px; }

/* ───────────────────────── Tidy up ───────────────────────── */
.head-actions { display: flex; gap: 8px; }
.pill-button.danger-fill { background: var(--red); }
.pill-button:disabled { opacity: .4; cursor: default; filter: none; transform: none; }
.tidy-group + .tidy-group { margin-top: 22px; }
.tidy-head { display: flex; align-items: baseline; gap: 10px; margin: 0 4px 8px; }
.tidy-head h3 { margin: 0; font-size: 15px; font-weight: 650; color: var(--ink); }
.tidy-head h3 span { margin-inline-start: 4px; font-weight: 500; color: var(--ink-2); }
.tidy-head small { flex: 1; font-size: 12.5px; color: var(--ink-2); }
.tidy-list { margin-top: 0; }
.tidy-row { justify-content: flex-start; min-height: 56px; cursor: pointer; }
.tidy-check { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); flex: none; }
.tidy-row .icon { --size: 32px; flex: none; box-shadow: none; }
.tidy-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tidy-name b, .tidy-name small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tidy-name b { font-weight: 550; }
.tidy-name small { font-size: 12px; color: var(--ink-2); }
.tidy-bar { flex: none; width: 96px; height: 6px; border-radius: 3px; background: var(--fill-2); overflow: hidden; }
.tidy-bar i { display: block; width: var(--w, 0%); min-width: 0; height: 100%; border-radius: 3px; background: var(--accent); }
.tidy-n { flex: none; width: 52px; text-align: end; font-size: 12.5px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.tidy-last { flex: none; width: 92px; text-align: end; font-size: 12.5px; color: var(--ink-2); }
.tidy-empty { margin: 8px 4px; color: var(--ink-2); }
@media (max-width: 640px) {
  .tidy-bar, .tidy-n { display: none; }
  .tidy-head { flex-wrap: wrap; }
  .tidy-head small { flex-basis: 100%; order: 3; }
}

/* YumoKit: tool tiles (drawn icons on the group colour) and the tool picker. */
.icon.tool .icon-body svg { width: 62%; height: 62%; }
.tool-note { margin: 0 4px 16px; font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.tool-group + .tool-group { margin-top: 20px; }
.tool-group h3 { display: flex; align-items: center; gap: 8px; margin: 0 4px 10px; font-size: 15px; font-weight: 650; color: var(--ink); }
.tool-group-icon { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--tile); }
.tool-group-icon svg { width: 17px; height: 17px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.tool-pick { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 12px; background: var(--fill); text-align: start; color: var(--ink); font-size: 13px; transition: background .15s; }
.tool-pick:hover { background: var(--fill-2, var(--fill)); }
.tool-pick .icon { --size: 32px; }
.tool-pick span:not(.icon):not(.icon-body) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-pick i { display: grid; width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.tool-pick i svg { width: 100%; height: 100%; }
.tool-pick[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--accent); }
.tool-pick[aria-pressed="true"] i { color: var(--accent); }

/* ───────── Widget sizes ─────────
   Small versions keep the part that matters at a glance. */
.w-weather.size-s .wx-week { display: none; }
.w-weather.size-s .wx-now { flex: 1; }
.w-calendar.size-s .cal-today { display: none; }
.w-world.size-s .world-row { grid-template-columns: repeat(2, 1fr); }
.w-world.size-s .city-clock:nth-child(n+3) { display: none; }
.menu-seg { display: flex; align-items: center; gap: 10px; min-height: 30px; padding: 2px 4px 2px 10px; font-size: 13.5px; }
.menu-seg .seg { margin-inline-start: auto; display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--fill); }
.context-menu .menu-seg .menu-item { width: auto; min-height: 24px; padding: 2px 10px; border-radius: 6px; font-size: 12.5px; }
.context-menu .menu-seg .menu-item[aria-checked="true"] { background: var(--sys-solid, var(--solid)); box-shadow: 0 1px 2px rgba(0, 0, 0, .14); font-weight: 600; }
.context-menu .menu-seg .menu-item[aria-checked="true"]:hover { color: inherit; }

/* ───────── Lunar calendar ───────── */
.w-lunar { --accent-w: var(--red); }
.lunar-date { font-size: 15px; font-weight: 600; color: var(--ink-2); line-height: 1.2; }
.lunar-date b { display: block; font-size: 30px; font-weight: 600; letter-spacing: .02em; color: var(--ink); }
.lunar-term { margin-top: 2px; font-size: 12px; font-weight: 550; color: var(--red); }
.lunar-yiji { margin-top: auto; display: grid; gap: 3px; font-size: 12px; color: var(--ink-2); }
.lunar-yiji p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lunar-yiji i { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-inline-end: 6px; border-radius: 5px; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; }
.lunar-yiji .yi { background: var(--green); }
.lunar-yiji .ji { background: var(--red); }
.w-lunar.size-m { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto 1fr; column-gap: 18px; }
.w-lunar.size-m .w-head { grid-column: 1 / -1; }
.w-lunar.size-m .lunar-yiji { grid-column: 2; grid-row: 2 / 4; margin-top: 0; align-content: center; gap: 8px; font-size: 13px; }

/* ───────── Hot lists & news ───────── */
.w-feed { padding: 13px 14px 10px; }
.w-feed .w-head { margin-bottom: 4px; }
.feed-title { display: flex; align-items: center; gap: 7px; color: var(--ink); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-title .icon { --size: 18px; filter: none; }
.feed-title:hover { text-decoration: underline; }
.w-feed .w-head .badge { margin-inline-start: auto; }
.feed-expand { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-3); transition: background .2s, color .2s; }
.feed-expand svg { width: 12px; height: 12px; }
.feed-expand:hover { background: var(--fill); color: var(--ink); }
.feed-list { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; overflow: hidden; }
.feed-list li { min-height: 0; display: flex; }
.feed-list a { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0 4px; margin: 0 -4px; border-radius: 7px; color: inherit; text-decoration: none; font-size: 13px; line-height: 1.3; }
.feed-list a:hover { background: var(--fill); }
.feed-list .rank { flex: none; width: 1.4em; text-align: center; font-size: 12px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.feed-list .rank.top { color: var(--accent-w); }
.feed-list .ft { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-list small { flex: none; font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.w-feed.size-s .feed-list small { display: none; }
.feed-list.skeleton span { flex: 1; height: 9px; margin: auto 0; border-radius: 5px; background: var(--fill-2); }
.feed-list.skeleton li:nth-child(2n) span { margin-inline-end: 28%; }
.feed-empty { flex: 1; display: grid; place-content: center; justify-items: center; gap: 8px; text-align: center; font-size: 12.5px; color: var(--ink-2); padding: 0 6px; }
.feed-empty p { margin: 0; }
.feed-allow { height: 28px; padding: 0 14px; border-radius: 999px; background: var(--accent-w, var(--accent)); color: #fff; font-size: 12.5px; font-weight: 600; }


.gallery-shelf { grid-column: 1 / -1; margin: 14px 4px -6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gallery-shelf:first-child { margin-top: 0; }

/* ───────── Compact sidebar ─────────
   In a wide window the sidebar can shrink to icons only, as it does on its own below 1100px. */
.sidebar { transition: width .3s var(--ease); }
.main { transition: padding .3s var(--ease); }
body.side-compact { --sidebar-w: 64px; }
body.side-compact .brand { justify-content: center; padding-inline: 0; }
body.side-compact .brand-name, body.side-compact .nav-item .nl, body.side-compact .nav-item .nc { display: none; }
body.side-compact .nav-item { justify-content: center; padding: 0; height: 42px; }
body.side-compact .nav-remove { display: none; }
#sideToggle .ni { transition: transform .3s var(--ease); }
body.side-compact #sideToggle .ni { transform: scaleX(-1); }
@media (max-width: 1100px) { #sideToggle { display: none; } }
.nav-add .ni { color: var(--ink-3) !important; }
.nav-add .nl { color: var(--ink-2); }

/* Category icon picker */
#catSheet h3 { margin: 18px 4px 8px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.cat-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); gap: 4px; max-height: 260px; overflow-y: auto; padding: 2px; }
.cat-icon { aspect-ratio: 1; display: grid; place-items: center; border-radius: 10px; color: var(--ink); transition: background .15s; }
.cat-icon svg { width: 20px; height: 20px; }
.cat-icon:hover { background: var(--fill); }
.cat-icon[aria-checked="true"] { background: var(--accent); color: #fff; }

/* The photo credit now sits under the wallpapers in Settings. */
.wall-credit .credit { margin: 0; max-width: none; color: var(--ink-2); text-shadow: none; opacity: 1; }

/* ───────── Expanded list ─────────
   Sources down the side with their logos; the chosen list fills the rest, tinted by its colour. */
.feed-sheet { width: min(980px, calc(100vw - 32px)); }
.feed-panel { flex-direction: row; height: min(80vh, 720px); max-height: none; }
.feed-side { flex: 0 0 216px; display: flex; flex-direction: column; gap: 1px; padding: 18px 10px; overflow-y: auto; scrollbar-width: thin;
  background: color-mix(in srgb, var(--ink) 3.5%, var(--solid)); border-inline-end: .5px solid var(--hairline); }
.feed-side h3 { margin: 14px 10px 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-3); }
.feed-side h3:first-child { margin-top: 0; }
.feed-src { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 4px 8px; border-radius: 10px; text-align: start;
  font-size: 13.5px; font-weight: 500; color: var(--ink); transition: background .15s; }
.feed-src span:last-child { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-src .icon { --size: 26px; filter: drop-shadow(0 .5px 1px rgba(0, 0, 0, .14)); }
.feed-src:hover { background: var(--fill); }
.feed-src[aria-pressed="true"] { background: color-mix(in srgb, var(--c) 14%, transparent); font-weight: 650; }

.feed-main { flex: 1; min-width: 0; display: flex; flex-direction: column;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 11%, transparent) 0, transparent 170px); transition: background .3s; }
.feed-head { flex: none; display: flex; align-items: center; gap: 14px; padding: 22px 22px 14px 26px; }
.feed-head-icon { display: flex; flex: none; }
.feed-head-icon .icon { --size: 46px; }
.feed-head-text { flex: 1; min-width: 0; }
.feed-head-text h2 { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-head-text p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); }
.feed-actions { display: flex; align-items: center; gap: 6px; }
.round-btn { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--fill); color: var(--ink); transition: background .15s, transform .2s var(--spring); }
.round-btn svg { width: 15px; height: 15px; }
.round-btn:hover { background: var(--fill-2); }
.round-btn:active { transform: scale(.92); }
.round-btn.spin svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.feed-geo { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 4px 0 10px; border-radius: 999px; background: var(--fill); color: var(--ink-2); }
.feed-geo > span { display: grid; }
.feed-geo svg { width: 14px; height: 14px; }
.feed-geo select { border: 0; outline: 0; background: transparent; color: var(--ink); font: 500 13px/1 inherit; padding: 0 4px; }

.feed-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 14px 18px; scrollbar-width: thin; }
.fr-list { list-style: none; margin: 0; padding: 0; }
.fr { display: flex; align-items: center; gap: 14px; padding: 11px 12px; border-radius: 12px; color: inherit; text-decoration: none; transition: background .15s; }
.fr:hover { background: var(--fill); }
.fr-list li { position: relative; }
.fr-list li + li::before { content: ""; position: absolute; top: 0; inset-inline: 52px 12px; height: .5px; background: var(--hairline); }
.fr-list li:hover::before, .fr-list li:hover + li::before { opacity: 0; }
.fr-rank { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-size: 13px; font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.fr-rank.top { background: var(--c); color: #fff; box-shadow: 0 2px 6px color-mix(in srgb, var(--c) 35%, transparent); }
.fr-body { flex: 1; min-width: 0; display: grid; gap: 5px; }
.fr-title { font-size: 14.5px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fr-note { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-hot { flex: none; min-width: 44px; text-align: end; font-size: 12.5px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fr-list.skeleton li { display: flex; align-items: center; gap: 14px; padding: 15px 12px; }
.fr-list.skeleton span:first-child { width: 26px; height: 26px; border-radius: 8px; background: var(--fill); }
.fr-list.skeleton span:last-child { flex: 1; height: 12px; border-radius: 6px; background: var(--fill); animation: pulse 1.2s ease-in-out infinite alternate; }
.fr-list.skeleton li:nth-child(3n) span:last-child { margin-inline-end: 30%; }
.fr-list.skeleton li:nth-child(3n+1) span:last-child { margin-inline-end: 12%; }
@keyframes pulse { to { opacity: .45; } }
.feed-body .feed-empty { height: 100%; font-size: 14px; gap: 14px; }
.feed-body .feed-allow { height: 34px; padding: 0 20px; font-size: 14px; background: var(--c); }

@media (max-width: 720px) {
  .feed-panel { flex-direction: column; height: min(86vh, 760px); }
  .feed-side { flex: none; flex-direction: row; gap: 6px; padding: 12px; overflow-x: auto; overflow-y: hidden; border-inline-end: 0; border-bottom: .5px solid var(--hairline); }
  .feed-side h3 { display: none; }
  .feed-src { width: auto; flex: none; padding: 4px 12px 4px 6px; border-radius: 999px; }
  .feed-head { padding: 16px 14px 10px 18px; }
}

/* Website demo: a banner that links back to the site, and the "in the extension" sheet. */
.demo-bar { position: fixed; z-index: 40; left: 50%; bottom: 18px; translate: -50% 0; display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; border-radius: 999px;
  background: rgba(20, 22, 28, .62); -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); color: #fff; font-size: 13px; box-shadow: 0 8px 30px rgba(0, 0, 0, .25); white-space: nowrap; }
.demo-bar a { padding: 6px 14px; border-radius: 999px; background: #fff; color: #111; font-weight: 600; text-decoration: none; }
body.demo .toast { bottom: 74px; }
.demo-text { margin: 0 0 18px; color: var(--ink-2); line-height: 1.55; }
#demoSheet .sheet-actions a { text-decoration: none; display: inline-grid; place-items: center; }
@media (max-width: 520px) { .demo-bar { font-size: 12px; max-width: calc(100% - 24px); } .demo-bar span { overflow: hidden; text-overflow: ellipsis; } }
