/* cloud-apps.net — the 2026 look, chosen element by element in the design lab:
   two colour schemes (Lagúna, the default, and Csillagfény), each by day and by night;
   the signed-out hero with floating apps and two slogans in turn; the signed-in home
   screen of favourites or recently opened apps; the catalogue as cards or as icons, with
   an app's sheet; and every view (sign-in, account, friends, support) in the same hand.
   public/js/look.js sets data-palette, data-theme and data-list on <html> before the first
   paint; the CSP allows no style="", so every position and colour lives here (the apps'
   own colours in /accents.css, as --a and --b). */

/* ---- tokens --------------------------------------------------------------------------------- */
:root {
  color-scheme: light;
  --ink: #17202c;
  --muted: #5d6878;
  --faint: #98a1ae;
  --line: rgba(20, 32, 44, 0.08);
  --line-2: rgba(20, 32, 44, 0.14);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-line: rgba(255, 255, 255, 0.8);
  --surface: color-mix(in srgb, #fff 90%, var(--tint));
  --surface-2: color-mix(in srgb, #fff 48%, var(--tint));
  --sheet: color-mix(in srgb, #fff 95%, var(--tint));
  --field: color-mix(in srgb, #fff 70%, var(--tint));
  --star: #f0a42a;
  --love: #e8577a;
  --danger: #c2410c;
  --ok: #15915f;
  --shadow: 0 1px 2px rgba(16, 30, 44, 0.05), 0 10px 30px -14px rgba(16, 30, 44, 0.18);
  --shadow-2: 0 2px 4px rgba(16, 30, 44, 0.06), 0 26px 50px -20px rgba(16, 30, 44, 0.32);
  --icon-shadow: 0 2px 4px rgba(16, 30, 60, 0.1), 0 24px 44px -20px rgba(16, 30, 60, 0.5);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.3, 1.5, .5, 1);
  --page: 1240px;
  --gutter: 28px;
  /* Lagúna by day: the default */
  --bg: #eef6f7;
  --tint: #dff0f1;
  --wall:
    radial-gradient(55% 50% at 8% 2%, #c6edef 0%, transparent 66%),
    radial-gradient(50% 46% at 94% 8%, #d3e4ff 0%, transparent 66%),
    radial-gradient(60% 45% at 60% 100%, #dcf4e5 0%, transparent 66%),
    linear-gradient(180deg, #f1f9fa, #eef6f7 60%);
  --stars: none;
  --stars-o: 0;
  --brand: #0e8790;
  --grad: linear-gradient(92deg, #0e8790 0%, #2f7fd8 100%);
  --btn: linear-gradient(180deg, #23a6b0, #0e7f88);
  --btn-ink: #fff;
  --glow: rgba(14, 135, 144, 0.45);
  --ring: color-mix(in srgb, var(--brand) 42%, transparent);
  /* the SDK's cookie banner and dialog take the page's accent */
  --ca-accent: var(--brand);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eaf0f4;
  --muted: #9aa7b4;
  --faint: #5f6d7c;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --glass: rgba(18, 26, 38, 0.56);
  --glass-line: rgba(255, 255, 255, 0.08);
  --surface: color-mix(in srgb, #111a24 86%, var(--tint));
  --surface-2: color-mix(in srgb, #1a2532 76%, var(--tint));
  --sheet: color-mix(in srgb, #121b26 90%, var(--tint));
  --field: color-mix(in srgb, #0c131b 80%, var(--tint));
  --star: #ffc04d;
  --love: #ff7d9c;
  --danger: #fb923c;
  --ok: #3ddc97;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 10px 30px -14px rgba(0, 0, 0, 0.6);
  --shadow-2: 0 2px 4px rgba(0, 0, 0, 0.35), 0 26px 50px -20px rgba(0, 0, 0, 0.8);
  --icon-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 24px 44px -20px rgba(0, 0, 0, 0.8);
  --bg: #061317;
  --tint: #0f2a30;
  --wall:
    radial-gradient(55% 50% at 8% 2%, #0f3c46 0%, transparent 66%),
    radial-gradient(50% 46% at 94% 8%, #112f52 0%, transparent 66%),
    radial-gradient(60% 45% at 60% 100%, #0c3a2f 0%, transparent 66%),
    #061317;
  --brand: #66d6de;
  --grad: linear-gradient(92deg, #7fe3e9 0%, #8bb8ff 100%);
  --btn: linear-gradient(180deg, #2fb6c0, #168f99);
  --glow: rgba(47, 182, 192, 0.45);
}
/* Csillagfény: indigo by day, a starry night by night */
:root[data-palette="csillag"] {
  --bg: #eef1fa;
  --tint: #e2e7f8;
  --wall:
    radial-gradient(80% 55% at 70% 0%, #d9e0f8 0%, transparent 70%),
    radial-gradient(60% 50% at 0% 20%, #e8e2fb 0%, transparent 70%),
    #eef1fa;
  --stars: url(img/stars-light.svg);
  --stars-o: 0.2;
  --brand: #4352c8;
  --grad: linear-gradient(92deg, #4352c8 0%, #8a6fe0 100%);
  --btn: linear-gradient(180deg, #5262d6, #3a48b8);
  --btn-ink: #fff;
  --glow: rgba(67, 82, 200, 0.45);
}
:root[data-palette="csillag"][data-theme="dark"] {
  --bg: #070b1a;
  --tint: #141c3c;
  --wall:
    radial-gradient(80% 55% at 70% 0%, #1b2557 0%, transparent 70%),
    radial-gradient(60% 50% at 0% 24%, #1a1745 0%, transparent 70%),
    #070b1a;
  --stars: url(img/stars-dark.svg);
  --stars-o: 0.9;
  --brand: #a9b8ff;
  --grad: linear-gradient(92deg, #c3ccff 0%, #ffd98a 100%);
  --btn: linear-gradient(180deg, #ffeab8, #ffcf6e);
  --btn-ink: #10142b;
  --glow: rgba(255, 196, 80, 0.45);
}
/* the settings' swatches show each scheme in the page's current light */
.sw[data-palette="laguna"] { --wall: radial-gradient(70% 60% at 10% 0%, #c6edef 0%, transparent 70%), radial-gradient(60% 60% at 100% 10%, #d3e4ff 0%, transparent 70%), linear-gradient(180deg, #f1f9fa, #e3f3ee); --btn: linear-gradient(180deg, #23a6b0, #0e7f88); --stars: none; --stars-o: 0; }
.sw[data-palette="csillag"] { --wall: radial-gradient(80% 60% at 70% 0%, #d9e0f8 0%, transparent 70%), radial-gradient(60% 60% at 0% 20%, #e8e2fb 0%, transparent 70%), #eef1fa; --btn: linear-gradient(180deg, #5262d6, #3a48b8); --stars: url(img/stars-light.svg); --stars-o: 0.25; }
[data-theme="dark"] .sw[data-palette="laguna"] { --wall: radial-gradient(70% 60% at 10% 0%, #0f3c46 0%, transparent 70%), radial-gradient(60% 60% at 100% 10%, #112f52 0%, transparent 70%), #061317; --btn: linear-gradient(180deg, #2fb6c0, #168f99); }
[data-theme="dark"] .sw[data-palette="csillag"] { --sw-ink: #10142b; --wall: radial-gradient(80% 60% at 70% 0%, #1b2557 0%, transparent 70%), radial-gradient(60% 60% at 0% 24%, #1a1745 0%, transparent 70%), #070b1a; --btn: linear-gradient(180deg, #ffeab8, #ffcf6e); --stars: url(img/stars-dark.svg); --stars-o: 0.9; }

/* ---- base ------------------------------------------------------------------------------------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
/* no background of its own: it would cover the wallpaper (.wall, behind everything) */
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", Inter, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; color: inherit; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.92em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.i.dots { fill: currentColor; stroke: none; }
.i.star { stroke-width: 1.7; }
.i.mark { stroke-width: 1.6; }
.glyph { display: grid; place-items: center; color: #fff; font-weight: 700; background: linear-gradient(135deg, var(--a, #64748b), var(--b, #334155)); }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--brand) 26%, transparent); }

/* the wallpaper: fixed behind everything, stars on top of it for Csillagfény */
.wall { position: fixed; inset: 0; z-index: -1; background: var(--wall); pointer-events: none; }
.wall::after { content: ""; position: absolute; inset: 0; background-image: var(--stars); background-size: 400px 400px; opacity: var(--stars-o); }
/* the old wallpaper, fading out over the new one when the colours change (settings.js) */
.wall-old { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.wall-old i { position: absolute; inset: 0; background-size: 400px 400px; }
.pg { min-height: 100dvh; display: flex; flex-direction: column; overflow-x: clip; }
main { flex: 1; display: flex; flex-direction: column; }

/* ---- buttons ---------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-weight: 600; font-size: 15px; letter-spacing: -0.005em; white-space: nowrap; cursor: pointer; text-decoration: none;
  transition: transform 220ms var(--ease), box-shadow 220ms ease, background 220ms ease, border-color 220ms ease, filter 160ms ease;
}
.btn .i { width: 18px; height: 18px; }
.btn.sm { min-height: 38px; padding: 0 16px; font-size: 14.5px; }
.btn.small { min-height: 36px; padding: 0 15px; font-size: 14px; }
.btn.lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn.block { width: 100%; }
.btn.primary { color: var(--btn-ink); background: var(--btn); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 10px 24px -10px var(--glow); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 16px 30px -10px var(--glow); }
.btn.ghost { color: var(--ink); background: var(--glass); border-color: var(--line-2); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn.ghost:hover { background: var(--surface); }
.btn.danger { color: var(--danger); background: transparent; border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 8%, transparent); }
.btn.danger-fill { color: #fff; background: linear-gradient(180deg, #e2574c, #c2362c); box-shadow: 0 10px 22px -12px rgba(194, 54, 44, 0.8); }
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.55; cursor: progress; transform: none; }
.link-btn { border: 0; background: none; padding: 6px 8px; margin: -6px -8px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--brand); cursor: pointer; text-decoration: none; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
.icon-btn, .round-btn {
  display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: var(--glass); color: var(--muted); cursor: pointer;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: color 160ms ease, transform 220ms var(--ease), background 160ms ease;
}
.icon-btn:hover, .round-btn:hover { color: var(--ink); background: var(--surface); }
#settings-open:hover { transform: rotate(-10deg); }

/* ---- header ----------------------------------------------------------------------------------- */
.top { position: relative; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; max-width: var(--page); margin: 0 auto; padding: 16px var(--gutter); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 19px; font-weight: 700; letter-spacing: -0.02em; white-space: nowrap; }
.brand img { width: 40px; height: 40px; transition: transform 380ms var(--spring); }
.brand:hover img { transform: rotate(-6deg) scale(1.05); }
.brand em { font-style: normal; color: var(--muted); font-weight: 500; }
.tools { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-area { position: relative; display: flex; align-items: center; }
.avatar {
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: #fff; font-weight: 650; font-size: 15px;
  background: linear-gradient(145deg, var(--av, #0e8790), color-mix(in srgb, var(--av, #0e8790) 68%, #000));
  box-shadow: 0 0 0 2px var(--surface), 0 6px 14px -6px rgba(0, 0, 0, 0.45);
  transition: transform 220ms var(--spring);
}
button.avatar:hover { transform: scale(1.06); }
span.avatar { cursor: default; }

/* popovers: the account menu and the catalogue's sort */
.menu {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 40; min-width: 240px; padding: 6px;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-2);
  transform-origin: top right; animation: pop-menu 200ms var(--ease) both;
}
@keyframes pop-menu { from { opacity: 0; transform: translateY(-6px) scale(0.96); } }
.menu .who { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.menu .who .avatar { width: 38px; height: 38px; font-size: 14px; box-shadow: none; }
.menu .who b { display: flex; align-items: center; gap: 6px; font-weight: 650; }
.menu .who small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 11px; min-height: 42px; padding: 0 12px; border-radius: 12px; border: 0; background: none; font: inherit; font-size: 15px; color: inherit; cursor: pointer; text-align: left; }
.menu a .i, .menu button .i { width: 19px; height: 19px; color: var(--muted); }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--surface-2); outline: none; }
.menu .sep { height: 1px; margin: 4px 8px; background: var(--line); }
.menu .love .i { color: var(--love); }

/* ---- notices under the header ------------------------------------------------------------------- */
.notices { position: relative; z-index: 5; display: grid; gap: 10px; width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.notices:empty { display: none; }
.notice-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 16px; border-radius: 18px; border: 1px solid var(--glass-line); background: var(--glass); box-shadow: var(--shadow); font-size: 14px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); animation: fade 240ms ease both; }
.notice-bar .grow { flex: 1 1 260px; min-width: 0; }
.notice-bar b { display: block; margin-bottom: 2px; }
.notice-bar span { color: var(--muted); }
.notice-bar.soft { background: color-mix(in srgb, var(--brand) 8%, var(--glass)); }
.notice-bar.install { flex-wrap: nowrap; }
.install-icon { flex: none; width: 44px; height: 44px; border-radius: 11px; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, 0.3); }
.install-steps { display: block; margin-top: 6px; color: var(--ink) !important; animation: fade 200ms ease both; }
.install-actions { display: flex; flex: none; align-items: center; gap: 4px 14px; }
body:not([data-view="home"]) .notice-bar.install { display: none; }

/* ---- what shows when: a view replaces the page; signed in, the home screen replaces the hero ---- */
body:not([data-view="home"]) :is(.hero, .home, .catalog) { display: none !important; }
.home { display: none; }
body.signed-in .home, html[data-signed] body:not(.signed-out) .home { display: block; }
body.signed-in .hero, html[data-signed] body:not(.signed-out) .hero { display: none; }

/* ---- the signed-out hero ---------------------------------------------------------------------- */
.hero { position: relative; isolation: isolate; margin-top: -76px; padding: 156px 24px 76px; text-align: center; }
.hero-in { position: relative; max-width: 800px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 24px; padding: 6px 15px 6px 11px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); font-size: 13.5px; font-weight: 550; color: var(--muted); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.hero-badge i { width: 8px; height: 8px; border-radius: 50%; background: #35b68c; box-shadow: 0 0 0 4px rgba(53, 182, 140, 0.18); }
.hero h1 { margin: 0 0 20px; font-size: clamp(40px, 6.2vw, 76px); line-height: 1.03; letter-spacing: -0.045em; font-weight: 700; text-wrap: balance; }
.slogans .sl > span, .hello h1 .first { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.06em; }
/* the slogans take turns (look.js picks this visit's first; catalog.js turns them): the next
   rises in, the last drifts up and out */
.slogans { display: grid; }
.slogans .sl { grid-area: 1 / 1; display: block; opacity: 0; transform: translateY(14px); filter: blur(8px); pointer-events: none; }
html:not([data-slogan="1"]) .slogans .sl:first-child, html[data-slogan="1"] .slogans .sl:last-child { opacity: 1; transform: none; filter: none; pointer-events: auto; transition: opacity 800ms ease, transform 900ms var(--ease), filter 800ms ease; }
.slogans .sl.out { opacity: 0 !important; transform: translateY(-14px) !important; filter: blur(8px) !important; transition: opacity 600ms ease, transform 700ms cubic-bezier(.4, 0, .6, 1), filter 600ms ease !important; }
.lead { margin: 0 auto 32px; max-width: 52ch; font-size: 19px; color: var(--muted); text-wrap: pretty; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.pillars { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin: 40px 0 0; padding: 0; color: var(--muted); font-size: 14px; font-weight: 550; }
.pillars li { display: flex; align-items: center; gap: 8px; }
.pillars .i { width: 18px; height: 18px; color: var(--brand); stroke-width: 1.7; }

/* the quiet line under the pillars and under the greeting: a tap opens the Support page */
.support-line { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin-top: 22px; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--faint); text-align: left; transition: color 200ms ease, background 200ms ease; }
.support-line .heart { width: 16px; height: 16px; stroke-width: 1.7; color: var(--love); transition: fill 220ms ease, transform 300ms var(--spring); }
.support-line .i:last-child { width: 15px; height: 15px; opacity: 0; transform: translateX(-4px); transition: opacity 200ms ease, transform 260ms var(--ease); }
.hero .support-line { display: inline-block; text-align: center; text-wrap: balance; }
.hero .support-line .i { display: inline-block; vertical-align: -3px; margin: 0 6px 0 0; }
.hero .support-line .i:last-child { margin: 0 0 0 6px; }
.support-line:hover { color: var(--muted); background: color-mix(in srgb, var(--love) 7%, transparent); }
.support-line:hover .heart { fill: var(--love); transform: scale(1.12); }
.support-line:hover .i:last-child { opacity: 1; transform: none; }

/* the floating apps on both sides of the slogan: small groups, a soft glow, a slow bob */
.float { position: absolute; inset: 0; z-index: -1; pointer-events: none; --zs: 1; }
.float img {
  --zz: calc(var(--z) * var(--zs));
  --room: calc(50% - 420px - var(--zz));
  position: absolute; top: calc(84px + (100% - 170px) * var(--y) / 100); width: var(--zz); height: var(--zz);
  border-radius: 23%; rotate: var(--r);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 0 52px -4px var(--glow), var(--icon-shadow);
  animation: bob 9s ease-in-out infinite; animation-delay: calc(var(--k) * -1.37s);
}
.float img:nth-child(-n + 6) { left: calc(var(--room) * var(--f) + 18px); }
.float img:nth-child(n + 7) { right: calc(var(--room) * var(--f) + 18px); }
.float img:nth-child(1) { --f: 0.3; --y: 8; --z: 86px; --r: -8deg; --k: 0; }
.float img:nth-child(2) { --f: 0.74; --y: 18; --z: 60px; --r: 10deg; --k: 1; }
.float img:nth-child(3) { --f: 0.5; --y: 30; --z: 50px; --r: -4deg; --k: 2; }
.float img:nth-child(4) { --f: 0.18; --y: 62; --z: 70px; --r: 6deg; --k: 3; }
.float img:nth-child(5) { --f: 0.6; --y: 68; --z: 88px; --r: -6deg; --k: 4; }
.float img:nth-child(6) { --f: 0.36; --y: 84; --z: 54px; --r: 8deg; --k: 5; }
.float img:nth-child(7) { --f: 0.24; --y: 10; --z: 90px; --r: 7deg; --k: 6; }
.float img:nth-child(8) { --f: 0.7; --y: 6; --z: 58px; --r: -9deg; --k: 7; }
.float img:nth-child(9) { --f: 0.62; --y: 26; --z: 50px; --r: 5deg; --k: 8; }
.float img:nth-child(10) { --f: 0.3; --y: 60; --z: 66px; --r: -6deg; --k: 9; }
.float img:nth-child(11) { --f: 0.72; --y: 70; --z: 84px; --r: 8deg; --k: 10; }
.float img:nth-child(12) { --f: 0.2; --y: 86; --z: 56px; --r: -4deg; --k: 11; }
@keyframes bob { 50% { transform: translateY(-12px); } }
.paused .float img { animation-play-state: paused; }
@media (max-width: 1360px) { .float { --zs: 0.8; } }
/* narrower: the apps gather in a row above the slogan instead */
.hero-row { display: none; justify-content: center; align-items: center; margin: 0 0 26px; }
.hero-row img { width: 60px; height: 60px; margin: 0 -5px; border-radius: 23%; box-shadow: var(--icon-shadow); }
.hero-row img:nth-child(odd) { rotate: -6deg; }
.hero-row img:nth-child(even) { rotate: 6deg; }
.hero-row img:nth-child(3), .hero-row img:nth-child(5) { width: 68px; height: 68px; z-index: 1; }
.hero-row img:nth-child(4) { width: 78px; height: 78px; rotate: 0deg; z-index: 2; }

/* ---- the signed-in home screen ------------------------------------------------------------------ */
.home { width: 100%; max-width: var(--page); margin: 0 auto; padding: 6px var(--gutter) 12px; animation: fade 300ms ease both; }
.home-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin: 18px 0 18px; }
.hello { flex: 1 1 320px; min-width: 0; }
.hello h1 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.08; letter-spacing: -0.04em; font-weight: 700; text-wrap: balance; }
.greet-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 0; color: var(--muted); font-size: 16.5px; }
.plan-line { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hello .support-line { align-items: flex-start; margin: 8px 0 0 -12px; }
.hello .support-line .heart { margin-top: 2px; }
.home-tools { display: flex; align-items: center; gap: 8px; }
.round-btn { width: 40px; height: 40px; }
.round-btn .i { width: 18px; height: 18px; }
/* the editor's pencil turns into a round check while it is on */
#edit-favs .i:last-child { display: none; }
#edit-favs[aria-pressed="true"] { border-color: transparent; background: var(--btn); color: var(--btn-ink); box-shadow: 0 8px 18px -8px var(--glow); }
#edit-favs[aria-pressed="true"] .i:first-child { display: none; }
#edit-favs[aria-pressed="true"] .i:last-child { display: block; width: 20px; height: 20px; stroke-width: 2.4; animation: check-in 380ms var(--spring); }
@keyframes check-in { from { transform: scale(0.4) rotate(-20deg); opacity: 0; } }

.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--glass); border: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.seg button, .seg a { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 0 15px; border: 0; border-radius: 999px; background: none; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; transition: color 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.seg .i { width: 17px; height: 17px; }
.seg button:hover, .seg a:hover { color: var(--ink); }
.seg [aria-pressed="true"] { color: var(--ink); background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 0 0 1px var(--line); }
.seg [data-home="favs"][aria-pressed="true"] .star { fill: var(--star); stroke: var(--star); }
.seg.wide { display: flex; width: 100%; background: var(--surface-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
.seg.wide > * { flex: 1; }

/* the board: a glass panel of icons; the edit hint sits in its bottom margin, never pushing */
.board { position: relative; padding: 24px 22px 30px; border-radius: 30px; background: var(--glass); border: 1px solid var(--glass-line); box-shadow: var(--shadow); backdrop-filter: blur(26px) saturate(1.5); -webkit-backdrop-filter: blur(26px) saturate(1.5); }
.board + .board { margin-top: 16px; }
.board.testing h2 { margin: 0 0 2px; font-size: 16px; font-weight: 650; }
.board .hint { margin: 0 0 16px; color: var(--muted); font-size: 13.5px; }
.board-note { margin: 2px 0; color: var(--muted); text-align: center; text-wrap: pretty; }
.edit-hint { position: absolute; left: 16px; right: 16px; bottom: 8px; margin: 0; overflow: hidden; color: var(--faint); font-size: 11.5px; line-height: 15px; font-weight: 550; text-align: center; white-space: nowrap; text-overflow: ellipsis; opacity: 0; transform: translateY(3px); pointer-events: none; transition: opacity 240ms ease, transform 240ms ease; }
.board.editing .edit-hint { opacity: 1; transform: none; }

.spring { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px 8px; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.tile { position: relative; min-width: 0; }
.tile > a, .tile > .tile-add {
  display: flex; flex-direction: column; align-items: center; gap: 7px; width: 100%; padding: 4px 2px; border: 0; border-radius: 18px; background: none;
  font: inherit; color: inherit; text-decoration: none; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none;
}
.t-icon { position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 17px; transition: transform 320ms var(--spring); }
.t-icon .ai { width: 100%; height: 100%; border-radius: inherit; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 12px 22px -12px color-mix(in srgb, var(--b, #334155) 85%, transparent); }
.t-icon .glyph { font-size: 22px; }
.tile b { max-width: 100%; font-size: 12.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile small { margin-top: -5px; font-size: 11px; color: var(--faint); }
.tile > a:active .t-icon { transform: scale(0.94); }
@media (hover: hover) { .tile > a:hover .t-icon, .tile > button:hover .t-icon { transform: scale(1.07) translateY(-2px); } }
/* the add tile: an outline, a plus */
.tile.add .t-icon { border: 1.5px dashed var(--line-2); color: var(--muted); background: color-mix(in srgb, var(--surface) 50%, transparent); }
.tile.add .t-icon .i { width: 26px; height: 26px; }
.tile.add b { color: var(--muted); }
.tile.add > button:hover .t-icon { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.editing .tile.add { opacity: 0.4; pointer-events: none; }
/* editing: the icons jiggle, a minus takes one out, a drag reorders */
.editing .tile:not(.add) { touch-action: none; cursor: grab; -webkit-user-select: none; user-select: none; }
.editing .tile:not(.add) .t-icon { animation: jiggle 0.3s ease-in-out infinite alternate; }
.editing .tile:nth-child(even):not(.add) .t-icon { animation-duration: 0.34s; animation-delay: -0.17s; }
@keyframes jiggle { from { rotate: -1.8deg; } to { rotate: 1.8deg; } }
.rm {
  position: absolute; z-index: 2; top: -4px; left: calc(50% - 47px); display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%;
  background: var(--sheet); color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22), 0 0 0 1px var(--line); cursor: pointer; animation: rm-in 300ms var(--spring) both;
}
.rm .i { width: 15px; height: 15px; stroke-width: 2.6; }
.rm:hover { color: #e5484d; }
@keyframes rm-in { from { scale: 0; } }
.tile.dragging { z-index: 5; cursor: grabbing; pointer-events: none; }
.tile.dragging .t-icon { animation: none; scale: 1.12; }
.tile.dragging .t-icon .ai { box-shadow: 0 26px 40px -14px rgba(0, 0, 0, 0.45); }
.tile.dragging .rm, .tile.dragging b { opacity: 0; }
.tile.settling { transition: translate 300ms var(--ease); }

/* ---- the catalogue ------------------------------------------------------------------------------- */
.catalog { width: 100%; max-width: var(--page); margin: 0 auto; padding: 26px var(--gutter) 40px; }
.catalog > h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 12px; margin: 0 0 4px; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; }
.catalog > h2 .count { font-size: 15px; font-weight: 550; letter-spacing: 0; color: var(--faint); }
.stick-mark { display: block; height: 0; }
/* the tools stick to the top; once they do, a soft veil gathers behind them and fades into
   the wallpaper — above and below on a phone, on the sides too on a wide screen */
.toolbar { position: sticky; top: 0; z-index: 10; display: flex; flex-direction: column; gap: 12px; padding: 14px 0 12px; }
.toolbar::before {
  content: ""; position: absolute; z-index: -1; inset: 0 -40px -22px; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 74%, transparent);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  -webkit-mask: linear-gradient(to bottom, transparent, #000 10px, #000 calc(100% - 30px), transparent), linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(to bottom, transparent, #000 10px, #000 calc(100% - 30px), transparent), linear-gradient(to right, transparent, #000 56px, #000 calc(100% - 56px), transparent);
  mask-composite: intersect;
  opacity: 0; transition: opacity 260ms ease;
}
.toolbar.stuck::before { opacity: 1; }
.tool-row { display: flex; align-items: center; gap: 10px; }
.search { position: relative; display: block; flex: 0 1 540px; min-width: 0; }
.search .i { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; translate: 0 -50%; color: var(--faint); pointer-events: none; }
.search input {
  width: 100%; height: 46px; padding: 0 44px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 16px; box-shadow: var(--shadow); -webkit-appearance: none; appearance: none; transition: border-color 160ms ease, box-shadow 160ms ease;
}
.search input::placeholder { color: var(--faint); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search input:focus { outline: none; border-color: color-mix(in srgb, var(--brand) 55%, transparent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.search kbd { position: absolute; right: 13px; top: 50%; translate: 0 -50%; font: 600 12px ui-monospace, "SF Mono", monospace; color: var(--faint); border: 1px solid var(--line-2); border-radius: 6px; padding: 1px 6px; }
.search input:focus + kbd, .search input:not(:placeholder-shown) + kbd { display: none; }
/* typed something: an × on the right empties the search */
.clear-q { position: absolute; right: 9px; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; animation: clear-in 260ms var(--spring); transition: color 150ms ease, background 150ms ease; }
.clear-q .i { position: static; width: 15px; height: 15px; translate: none; color: inherit; stroke-width: 2.3; }
.clear-q:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 10%, var(--surface-2)); }
@keyframes clear-in { from { opacity: 0; scale: 0.5; } }
.sorter { position: relative; flex: none; }
.tool-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px 0 15px; border-radius: 16px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--muted); font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow); cursor: pointer; white-space: nowrap; transition: color 160ms ease, border-color 160ms ease;
}
.tool-btn .i { width: 19px; height: 19px; }
.tool-btn .chev { width: 16px; height: 16px; color: var(--faint); transition: transform 240ms var(--ease); }
.tool-btn span { color: var(--ink); }
.tool-btn:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--line-2)); }
.tool-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.sort-menu { min-width: 210px; }
.sort-menu button { justify-content: space-between; }
.sort-menu button .i { width: 18px; height: 18px; color: var(--brand); opacity: 0; transform: scale(0.6); transition: opacity 160ms ease, transform 240ms var(--spring); }
.sort-menu button[aria-checked="true"] { font-weight: 650; }
.sort-menu button[aria-checked="true"] .i { opacity: 1; transform: none; }
.view-seg { margin-left: auto; padding: 4px; height: 46px; background: var(--surface); box-shadow: var(--shadow); border-color: var(--line-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
.view-seg button { min-height: 36px; padding: 0 14px; }
.view-seg [aria-pressed="true"] { background: var(--surface-2); box-shadow: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 3px 32px 3px 3px; margin: -3px; -webkit-mask: linear-gradient(to right, #000 calc(100% - 32px), transparent); mask: linear-gradient(to right, #000 calc(100% - 32px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; transition: background 180ms ease, color 180ms ease, border-color 180ms ease; }
.chip small { font-size: 12px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; }
.chip:hover { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip[aria-pressed="true"] small { color: color-mix(in srgb, var(--bg) 62%, transparent); }

.apps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.app { --a: #64748b; --b: #334155; position: relative; min-width: 0; }
.hit { position: relative; display: grid; border-radius: 22px; color: inherit; }
.ic { position: relative; grid-area: ic; }
.star-dot { display: none; }
.app.is-hidden { opacity: 0.45; }
.app.soon .ai { filter: saturate(0.3); opacity: 0.7; }
.mt { display: none; }
.tg { display: none; }

/* cards */
html:not([data-list="icons"]) .hit { grid-template-columns: 64px minmax(0, 1fr); grid-template-rows: auto auto 1fr; grid-template-areas: "ic nm" "ic tg" "ic mt"; column-gap: 16px; height: 100%; padding: 18px 18px 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform 280ms var(--ease), box-shadow 280ms ease, border-color 280ms ease; }
html:not([data-list="icons"]) .hit::before { content: ""; position: absolute; inset: 0; background: radial-gradient(90% 70% at 0% 0%, color-mix(in srgb, var(--a) 16%, transparent), transparent 70%); opacity: 0.55; transition: opacity 280ms ease; pointer-events: none; }
html:not([data-list="icons"]) .app:hover .hit { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--a) 32%, var(--line)); }
html:not([data-list="icons"]) .app:hover .hit::before { opacity: 1; }
html:not([data-list="icons"]) .ai { width: 64px; height: 64px; border-radius: 15px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 10px 18px -10px color-mix(in srgb, var(--b) 85%, transparent); transition: transform 380ms var(--spring); }
html:not([data-list="icons"]) .ai.glyph { font-size: 21px; }
html:not([data-list="icons"]) .app:hover .ai { transform: scale(1.06) rotate(-3deg); }
html:not([data-list="icons"]) .nm { position: relative; grid-area: nm; margin: 2px 66px 0 0; font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
html:not([data-list="icons"]) .tg { position: relative; grid-area: tg; display: -webkit-box; margin: 4px 0 12px; font-size: 14px; line-height: 1.45; color: var(--muted); -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
html:not([data-list="icons"]) .mt { position: relative; grid-area: mt; align-self: end; display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--faint); }
.ct { display: inline-flex; align-items: center; gap: 7px; }
.ct::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: linear-gradient(135deg, var(--a), var(--b)); }
.mk { display: inline-grid; place-items: center; color: var(--muted); }
.mk .i { width: 17px; height: 17px; }
.mk + .mk { margin-left: -2px; }
.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 650; }
.mt .tag { margin-left: auto; }
.fav, .more { position: absolute; top: 12px; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--faint); cursor: pointer; transition: color 180ms ease, background 180ms ease, opacity 180ms ease; }
.fav { right: 46px; }
.more { right: 12px; }
.fav .i { width: 21px; height: 21px; }
.fav:hover, .more:hover { color: var(--ink); background: var(--surface-2); }
.fav[aria-pressed="true"] { color: var(--star); }
.fav[aria-pressed="true"] .star { fill: var(--star); }
.fav.pop .i { animation: star-pop 420ms var(--spring); }
@keyframes star-pop { 40% { transform: scale(1.45) rotate(18deg); } }
body:not(.signed-in) .more { display: none; }
html:not([data-list="icons"]) body:not(.signed-in) .nm { margin-right: 0; }
body.signed-in .app:not(:has(.fav:not([hidden]))) .more { right: 12px; }
@media (hover: hover) {
  .more { opacity: 0; }
  .app:hover .more, .more:focus-visible { opacity: 1; }
}

/* icons: a home-screen grid; a tap opens the app's sheet */
html[data-list="icons"] .apps { gap: 26px 8px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
html[data-list="icons"] .hit { grid-template-areas: "ic" "nm"; justify-items: center; row-gap: 8px; padding: 4px 2px; }
html[data-list="icons"] .ai { width: 74px; height: 74px; border-radius: 17px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 12px 22px -12px color-mix(in srgb, var(--b) 85%, transparent); transition: transform 320ms var(--spring); }
html[data-list="icons"] .ai.glyph { font-size: 22px; }
html[data-list="icons"] .nm { grid-area: nm; max-width: 100%; padding: 0 2px; font-size: 12.5px; font-weight: 550; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[data-list="icons"] :is(.fav, .more) { display: none; }
html[data-list="icons"] .is-fav .star-dot { position: absolute; right: -6px; top: -6px; display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: var(--sheet); color: var(--star); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); }
.star-dot .i { width: 13px; height: 13px; fill: currentColor; stroke: none; }
html[data-list="icons"] .hit:active .ai { transform: scale(0.93); }
@media (hover: hover) { html[data-list="icons"] .hit:hover .ai { transform: scale(1.07) translateY(-2px); } }

.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.hidden-note { display: flex; justify-content: center; align-items: center; gap: 12px; margin: 26px 0 0; color: var(--faint); font-size: 14px; }
.hidden-note .link-btn { margin: 0; }

/* ---- sheets: an app's card, settings, the favourites picker, a question --------------------------- */
/* a card growing out of what was tapped on wide screens, a sheet sliding up on a phone */
.layer { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.scrim { position: absolute; inset: 0; background: rgba(8, 16, 24, 0.36); opacity: 0; transition: opacity 280ms ease; }
.sheet {
  position: relative; width: min(420px, 100%); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain;
  border-radius: 30px; background: var(--sheet); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 50px 100px -30px rgba(6, 14, 24, 0.6); outline: none;
  opacity: 0; transform: scale(0.5); transition: transform 460ms cubic-bezier(.2, 1.15, .3, 1), opacity 200ms ease;
}
.sheet.wide { width: min(520px, 100%); }
.layer.open .scrim { opacity: 1; }
.layer.open .sheet { opacity: 1; transform: none; }
.layer.closing .sheet { transition-duration: 260ms, 200ms; transition-timing-function: cubic-bezier(.4, 0, 1, 1), ease; }
.layer.instant :is(.scrim, .sheet) { transition: none; }
.x { position: absolute; top: 14px; right: 14px; z-index: 2; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.x .i { width: 17px; height: 17px; }
.x:hover { color: var(--ink); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 22px 8px; }
.sheet-head h2 { margin: 0; font-size: 21px; letter-spacing: -0.02em; }
.sheet-head .x { position: static; }

/* an app's sheet */
.app-sheet { --a: #64748b; --b: #334155; position: relative; padding: 26px 24px 22px; overflow: hidden; }
.as-glow { position: absolute; inset: 0 0 auto; height: 240px; background: radial-gradient(90% 100% at 18% 0%, color-mix(in srgb, var(--a) 34%, transparent), transparent 72%); pointer-events: none; }
.as-head { position: relative; display: flex; align-items: center; gap: 18px; margin: 6px 40px 16px 0; }
.as-icon { flex: none; }
.as-head .ai { flex: none; width: 92px; height: 92px; border-radius: 22px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.14), 0 20px 36px -16px color-mix(in srgb, var(--b) 90%, transparent); }
.as-head .ai.glyph { font-size: 28px; }
.layer.open .as-head .ai { animation: pop-in 560ms var(--spring) 60ms both; }
@keyframes pop-in { from { transform: scale(0.6) rotate(-10deg); opacity: 0; } }
.as-head h2 { margin: 0 0 4px; font-size: 24px; line-height: 1.15; letter-spacing: -0.025em; }
.as-cat { margin: 0; color: var(--muted); font-size: 14px; font-weight: 550; }
.as-marks { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.as-marks li { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--a) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--a) 20%, var(--line)); font-size: 12.5px; font-weight: 600; color: var(--ink); }
.as-marks .i { width: 16px; height: 16px; color: color-mix(in srgb, var(--a) 70%, var(--ink)); }
.as-tg { position: relative; margin: 0 0 22px; color: var(--muted); font-size: 15.5px; line-height: 1.55; text-wrap: pretty; }
.as-open { width: 100%; }
.as-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.as-btn { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 12px; border-radius: 15px; border: 1px solid var(--line-2); background: var(--surface); font-size: 14.5px; font-weight: 600; cursor: pointer; transition: background 180ms ease, border-color 180ms ease, color 180ms ease; }
.as-btn .i { width: 19px; height: 19px; }
.as-btn:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line-2)); }
.as-btn[aria-pressed="true"] { color: var(--ink); border-color: color-mix(in srgb, var(--star) 55%, transparent); background: color-mix(in srgb, var(--star) 13%, var(--surface)); }
.as-btn[aria-pressed="true"] .star { fill: var(--star); stroke: var(--star); }
.as-cta { display: grid; gap: 10px; }
.as-note { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--faint); }
.as-link { display: flex; align-items: center; justify-content: center; gap: 6px; width: fit-content; margin: 16px auto 0; padding: 6px 10px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 600; transition: color 160ms ease; }
.as-link .i { width: 16px; height: 16px; transition: transform 240ms var(--ease); }
.as-link:hover { color: var(--brand); }
.as-link:hover .i { transform: translateX(3px); }

/* settings */
.settings { padding: 22px 22px 24px; }
.settings > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.settings h2 { margin: 0; font-size: 22px; letter-spacing: -0.02em; }
.settings .x { position: static; }
.settings section { padding: 16px 0 4px; }
.settings section + section { border-top: 1px solid var(--line); margin-top: 12px; }
.settings h3 { margin: 0 0 4px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.settings section > p { margin: 0 0 12px; font-size: 13.5px; color: var(--faint); }
.palettes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 4px; }
.palettes button { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 0; border: 0; border-radius: 18px; background: none; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.sw { position: relative; display: block; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 16px; background: var(--wall); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), 0 6px 14px -10px rgba(0, 0, 0, 0.45); transition: transform 280ms var(--spring), box-shadow 200ms ease; }
.sw::after { content: ""; position: absolute; inset: 0; background-image: var(--stars); background-size: 200px 200px; opacity: var(--stars-o); }
.sw i { position: absolute; z-index: 1; left: 9px; bottom: 9px; width: 26px; height: 8px; border-radius: 4px; background: var(--btn); }
.sw b { position: absolute; z-index: 1; right: 7px; top: 7px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--btn); color: var(--sw-ink, #fff); opacity: 0; scale: 0.5; transition: opacity 200ms ease, scale 300ms var(--spring); }
.sw b .i { width: 14px; height: 14px; stroke-width: 2.4; }
.palettes button:hover .sw { transform: translateY(-2px); }
.palettes button[aria-pressed="true"] { color: var(--ink); }
.palettes button[aria-pressed="true"] .sw { box-shadow: 0 0 0 2px var(--sheet), 0 0 0 4px var(--brand), 0 8px 18px -10px var(--glow); }
.palettes button[aria-pressed="true"] .sw b { opacity: 1; scale: 1; }
.hid { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.hid li { display: flex; align-items: center; gap: 12px; }
.hid .ai { width: 36px; height: 36px; border-radius: 9px; font-size: 13px; }
.hid b { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hid .link-btn { margin: 0; }

/* the favourites picker: a search and the list, stars on the right */
.picker { display: flex; flex-direction: column; max-height: inherit; }
.sheet:has(.picker) { display: flex; flex-direction: column; overflow: hidden; }
.picker .search { flex: none; margin: 4px 22px 10px; }
.picker .search input { height: 44px; box-shadow: none; background: var(--field); }
.pick-list { list-style: none; margin: 0; padding: 2px 12px 18px; overflow-y: auto; overscroll-behavior: contain; display: grid; gap: 2px; }
.pick-list button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 14px; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; text-align: left; transition: background 140ms ease; }
.pick-list button:hover { background: var(--surface-2); }
.pick-list .ai { width: 42px; height: 42px; border-radius: 11px; flex: none; font-size: 14px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.pick-list .grow { flex: 1; min-width: 0; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-list .star { width: 22px; height: 22px; color: var(--faint); transition: transform 300ms var(--spring); }
.pick-list [aria-pressed="true"] .star { fill: var(--star); stroke: var(--star); color: var(--star); transform: scale(1.08); }

/* a question before something that cannot be undone */
.ask { padding: 28px 24px 22px; text-align: center; }
.ask-art { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.ask-art .i { width: 26px; height: 26px; }
.ask h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: -0.02em; text-wrap: balance; }
.ask p { margin: 0 0 22px; color: var(--muted); text-wrap: pretty; }
.ask .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* the home-screen steps (install.js) */
.install-body { display: grid; gap: 14px; padding: 4px 22px 24px; }
.install-body .install-icon { width: 64px; height: 64px; border-radius: 16px; }
.install-lead { margin: 0; color: var(--muted); }
.install-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; }
.install-body .btn.primary { justify-self: start; }

.toast { position: fixed; z-index: 70; left: 0; right: 0; bottom: max(28px, calc(env(safe-area-inset-bottom) + 18px)); width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 11px 18px; border-radius: 20px; text-wrap: balance; background: var(--ink); color: var(--bg); font-size: 14.5px; font-weight: 600; box-shadow: var(--shadow-2); text-align: center; animation: toast-in 320ms cubic-bezier(.2, .9, .3, 1.2) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(0.96); } }

/* ---- footer: the live site's, in the new hand; the heart fills on hover ---------------------------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 18px; width: 100%; max-width: var(--page); margin: 24px auto 0; padding: 26px var(--gutter) max(30px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; text-align: center; }
.foot-meta { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 9px; margin: 0; }
.foot-meta img { width: 22px; height: 22px; }
.foot .dot { opacity: 0.6; }
.support-link { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; color: var(--muted); font-weight: 600; transition: color 200ms ease, background 200ms ease; }
.support-link .heart { width: 16px; height: 16px; stroke-width: 1.8; color: var(--love); transition: fill 220ms ease, transform 300ms var(--spring); }
.support-link:hover { color: var(--ink); background: color-mix(in srgb, var(--love) 8%, transparent); }
.support-link:hover .heart { fill: var(--love); transform: scale(1.15); }
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; flex-basis: 100%; }
.legal-links a, .legal-links .link-btn { margin: 0; padding: 2px 0; color: var(--muted); font-size: 13px; font-weight: 500; }
.legal-links a:hover, .legal-links .link-btn:hover { color: var(--ink); text-decoration: none; }
.legal-links a[aria-current] { color: var(--ink); }

/* ---- views: sign-in, account, friends, support ------------------------------------------------ */
.view { width: 100%; max-width: 1080px; margin: 0 auto; padding: 18px var(--gutter) 30px; animation: rise 300ms var(--ease) both; }
.auth {
  position: relative; overflow: hidden; width: min(100%, 440px); margin: 3vh auto 0; padding: 32px 30px 26px; border-radius: 30px;
  background: var(--sheet); border: 1px solid var(--glass-line); box-shadow: var(--shadow-2);
}
.auth::before { content: ""; position: absolute; inset: -30% -20% auto; height: 300px; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 20%, transparent), transparent); }
.auth > * { position: relative; }
.auth .mark { width: 60px; height: 60px; margin: -6px 0 14px -4px; }
.auth h1 { margin: 0 0 6px; font-size: 27px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; text-wrap: balance; }
.auth .lead { margin: 0 0 20px; color: var(--muted); font-size: 15px; text-align: left; }
.auth .return-to { display: flex; align-items: center; gap: 12px; margin: -6px 0 20px; padding: 8px 14px 8px 8px; border-radius: 16px; background: var(--surface-2); color: var(--muted); font-size: 14px; line-height: 1.35; text-wrap: pretty; }
.auth .return-icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; overflow: hidden; }
.auth .return-icon img { width: 100%; height: 100%; }
.form { display: grid; gap: 13px; margin: 0; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13px; font-weight: 600; color: var(--muted); }
.field small { color: var(--faint); font-size: 12.5px; }
.field .wrap { position: relative; display: flex; }
.field input, .field select, .panel textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--field);
  color: var(--ink); font: inherit; font-size: 16px; outline: none; -webkit-appearance: none; appearance: none; transition: border-color 150ms, box-shadow 150ms, background 150ms;
}
.field select { padding-right: 38px; background-image: linear-gradient(45deg, transparent 50%, var(--faint) 50%), linear-gradient(135deg, var(--faint) 50%, transparent 50%); background-position: right 19px center, right 14px center; background-size: 5px 5px; background-repeat: no-repeat; }
.field input:focus, .field select:focus, .panel textarea:focus { border-color: color-mix(in srgb, var(--brand) 60%, transparent); background-color: var(--surface); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent); }
.field .reveal { position: absolute; right: 6px; top: 7px; bottom: 7px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.field .reveal:hover { color: var(--ink); background: var(--surface-2); }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--brand); }
.check.terms { align-items: flex-start; line-height: 1.45; }
.check.terms input { margin-top: 1px; flex: none; }
.check.terms a { color: var(--brand); font-weight: 600; }
.error { margin: 0; padding: 10px 13px; border-radius: 12px; background: color-mix(in srgb, #ef4444 12%, var(--surface)); color: #b91c1c; font-size: 14px; }
[data-theme="dark"] .error { color: #fca5a5; }
.error:empty { display: none; }
.notice { margin: 0; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 14px; }
.notice.ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); color: color-mix(in srgb, var(--ok) 65%, var(--ink)); }
.notice.warn { background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: color-mix(in srgb, var(--danger) 70%, var(--ink)); }
.auth .notice { margin-bottom: 14px; }
.alt { display: grid; gap: 4px; margin-top: 14px; justify-items: center; }
.alt .link-btn { margin: 0; padding: 8px 10px; }
.join-signin { margin: 0 0 18px; }
.fine { margin: 14px 0 0; color: var(--faint); font-size: 12.5px; text-align: center; text-wrap: pretty; }
details.forgot { margin-top: 6px; text-align: center; }
details.forgot summary { display: inline-block; padding: 4px 8px; border-radius: 8px; cursor: pointer; color: var(--brand); font-weight: 600; font-size: 14px; list-style: none; }
details.forgot summary::-webkit-details-marker { display: none; }
details.forgot p { color: var(--muted); font-size: 14px; text-align: left; margin: 10px 0 0; }
details.forgot .form { margin-top: 10px; text-align: left; }
.oauth { display: grid; gap: 14px; margin: 2px 0 16px; }
.oauth .btn { margin: 0; }
/* Google's own colours for its button (its branding rules), light and dark */
.btn.google { background: #fff; color: #1f1f1f; border-color: #747775; gap: 10px; border-radius: 999px; }
.btn.google:hover { background: #f6f8fb; }
[data-theme="dark"] .btn.google { background: #131314; color: #e3e3e3; border-color: #8e918f; }
[data-theme="dark"] .btn.google:hover { background: #1d1d1f; }
.btn.google svg { flex: none; }
.or { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--faint); font-size: 12.5px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }

.page-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 22px; }
.page-head h1 { margin: 0; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; letter-spacing: -0.035em; font-weight: 700; }
.page-head .count-pill { align-self: center; padding: 3px 11px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 650; }
.view > .hint, .page-lead { max-width: 62ch; margin: -10px 0 22px; color: var(--muted); font-size: 15.5px; text-wrap: pretty; }
.panels { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.panel { position: relative; padding: 22px 22px 20px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 14px; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.panel h2 + h2 { margin-top: 18px; }
.panel > h2:not(:first-child) { margin-top: 22px; }
.panel p { color: var(--muted); font-size: 14.5px; margin: 0 0 14px; }
.panel .row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.panel.danger-zone { border-color: color-mix(in srgb, var(--danger) 28%, var(--line)); }
.panel textarea { resize: vertical; min-height: 84px; }
.hint { color: var(--faint); font-size: 13px; }
.who-card { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.who-card .avatar { width: 58px; height: 58px; font-size: 22px; }
.who-card b { display: flex; align-items: center; gap: 6px; font-size: 18px; }
.who-card small { color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.list li { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.list .grow { flex: 1 1 auto; min-width: 0; }
.list .grow b { display: block; font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .grow small, .list small { color: var(--faint); font-size: 12.5px; }
.list .avatar { width: 38px; height: 38px; font-size: 15px; flex: none; box-shadow: none; }
.list.compact li { padding-block: 8px; }
.mail-state { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 6px; }
.mail-state .link-btn { font-size: 13px; }
.tag.ok { background: color-mix(in srgb, var(--ok) 12%, var(--surface)); border-color: color-mix(in srgb, var(--ok) 22%, transparent); color: color-mix(in srgb, var(--ok) 70%, var(--ink)); }
.linked { margin: 18px 0 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.linked h3 { margin: 0 0 8px; font-size: 15px; font-weight: 650; }
.linked .grow { flex: 1 1 200px; color: var(--muted); font-size: 14.5px; }
details.unlink { margin-top: 10px; }
details.unlink summary { cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 600; }
details.unlink .form { margin-top: 10px; }
.legal-row { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 14px; }
.legal-row .link-btn { margin: 0; padding: 4px 0; }
.pill, .roles .pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: var(--muted); border: 1px solid var(--line-2); background: var(--surface); }
.plan-line .pill.accent { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 26%, transparent); background: color-mix(in srgb, var(--brand) 10%, var(--surface)); }
.roles { margin: 6px 0 0; }

/* supporters' hearts */
.heart-badge { display: inline-flex; align-items: center; gap: 5px; vertical-align: middle; }
.heart-badge svg { width: 15px; height: 15px; fill: var(--love); flex: none; }
.heart-badge:not(.mini) { padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12.5px; font-weight: 650; color: color-mix(in srgb, var(--love) 80%, var(--ink)); background: color-mix(in srgb, var(--love) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--love) 26%, transparent); }
.heart-badge.mini svg { width: 14px; height: 14px; }
.badge-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 4px 0 10px; color: var(--ink) !important; }

/* support, thank you, cancelled */
.support-hero { display: grid; justify-items: start; gap: 2px; overflow: hidden; }
.support-hero::before { content: ""; position: absolute; inset: -40% 30% auto -20%; height: 280px; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--love) 14%, transparent), transparent); }
.support-hero > * { position: relative; }
.support-hero > p:not(.support-lead):not(.hint):not(.signoff) { margin: 0 0 10px; max-width: 58ch; text-wrap: pretty; }
.support-art { width: 96px; height: 96px; margin: -4px 0 8px -6px; fill: var(--love); animation: beat 2.8s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.06); } 24% { transform: scale(1); } }
.panel .support-lead { margin: 0 0 12px; max-width: 54ch; color: var(--ink); font-size: 18px; font-weight: 550; line-height: 1.45; text-wrap: pretty; }
.support-hero .hint, .panel > .hint { margin: 10px 0 0; max-width: 58ch; }
.signoff { margin: 14px 0 4px !important; font-weight: 600; color: var(--ink) !important; }
.donate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 8px 0 2px; }
#donate-button { min-height: 52px; display: flex; align-items: center; }
#donate-button img { display: block; cursor: pointer; }
.support-back { margin-top: 14px; }
.claim { margin: 6px 0 10px; }
.claim .btn { margin-top: 4px; }
.choices { display: grid; gap: 6px; margin: 0 0 14px; padding: 0; border: 0; }
.choices legend { margin-bottom: 6px; padding: 0; font-size: 14px; font-weight: 600; }
.choice { display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 14.5px; transition: border-color 160ms ease, background 160ms ease; }
.choice:has(input:checked) { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.choice input { accent-color: var(--brand); margin: 0; }
.premium-hero { display: grid; justify-items: start; gap: 2px; overflow: hidden; }
.premium-art { width: 92px; height: 92px; margin: -4px 0 8px -6px; color: var(--brand); }
.panel .premium-lead { margin: 0 0 12px; max-width: 54ch; color: var(--ink); font-size: 17px; line-height: 1.45; text-wrap: pretty; }
.panel .premium-you { margin: 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); color: var(--ink); font-size: 14px; font-weight: 550; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.perks li { position: relative; padding-left: 30px; color: var(--muted); font-size: 14.5px; }
.perks li::before { content: "✓"; position: absolute; left: 0; top: -1px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); }
.premium-apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.premium-apps a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.premium-apps .icon { width: 40px; height: 40px; flex: none; overflow: hidden; border-radius: 11px; }
.premium-apps .icon img { width: 100%; height: 100%; }

/* friends: an invitation to make, the friends as cards, the open links */
.invite-card { overflow: hidden; padding: 26px 26px 22px; background: var(--sheet); border-color: var(--glass-line); box-shadow: var(--shadow-2); }
.invite-card::before { content: ""; position: absolute; inset: -50% -10% auto 30%; height: 320px; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--brand) 18%, transparent), transparent); }
.invite-card > * { position: relative; }
.invite-art { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 14px; border-radius: 17px; background: var(--btn); color: var(--btn-ink); box-shadow: 0 12px 24px -12px var(--glow); }
.invite-art .i { width: 28px; height: 28px; stroke-width: 1.7; }
.invite-card h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.025em; }
.invite-card > p { margin: 0 0 16px; font-size: 15px; }
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 18px; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 34px 10px 10px; border-radius: 14px; background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 550; line-height: 1.35; counter-increment: step; }
.steps li::before { content: counter(step); position: absolute; left: 10px; top: 9px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); color: var(--brand); font-size: 12px; font-weight: 750; box-shadow: 0 0 0 1px var(--line); }
.invite-make { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.invite-make .seg { margin: 0; background: var(--surface-2); backdrop-filter: none; -webkit-backdrop-filter: none; }
.created { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); animation: rise 320ms var(--ease) both; }
.created h3 { margin: 0 0 8px; font-size: 14px; font-weight: 650; }
.linkbox { display: flex; gap: 8px; align-items: stretch; margin: 0 0 8px; }
.linkbox input { flex: 1; min-width: 0; min-height: 46px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--field); color: var(--ink); font: 13.5px ui-monospace, "SF Mono", Menlo, monospace; }
.linkbox .btn { flex: none; }
.people { list-style: none; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); margin: 0; padding: 0; }
.person { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px; background: var(--surface-2); border: 1px solid var(--line); animation: rise 320ms var(--ease) both; }
.person .avatar { width: 44px; height: 44px; font-size: 17px; box-shadow: none; }
.person .grow { flex: 1; min-width: 0; }
.person b { display: flex; align-items: center; gap: 5px; font-weight: 650; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.person small { display: block; color: var(--faint); font-size: 12.5px; }
.person .x { position: static; width: 32px; height: 32px; background: transparent; color: var(--faint); opacity: 0.8; }
.person .x:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); opacity: 1; }
.people-empty { grid-column: 1 / -1; display: grid; justify-items: center; gap: 6px; padding: 18px 8px 8px; text-align: center; }
.people-empty .avatars { display: flex; margin-bottom: 6px; }
.people-empty .avatars span { width: 40px; height: 40px; margin: 0 -6px; border-radius: 50%; border: 3px solid var(--surface); background: var(--surface-2); }
.people-empty .avatars span:nth-child(2) { background: color-mix(in srgb, var(--brand) 22%, var(--surface-2)); transform: translateY(-4px); z-index: 1; }
.people-empty b { font-size: 16px; }
.people-empty p { margin: 0; }

/* ---- the legal pages (rendered on the server, printable) ------------------------------------------- */
.legal-doc { max-width: 760px; margin: 0 auto; padding: 26px 30px 30px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); line-height: 1.65; }
.legal-doc h1 { margin: 0 0 14px; font-size: 30px; line-height: 1.15; letter-spacing: -0.03em; font-weight: 700; }
.legal-doc h2 { margin: 34px 0 10px; font-size: 19px; letter-spacing: -0.01em; font-weight: 650; scroll-margin-top: 16px; }
.legal-doc h3 { margin: 22px 0 8px; font-size: 16px; font-weight: 650; }
.legal-doc p, .legal-doc li { color: color-mix(in srgb, var(--ink) 86%, var(--muted)); font-size: 15.5px; }
.legal-doc ul, .legal-doc ol { padding-left: 22px; }
.legal-doc a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
.legal-doc table { display: block; width: 100%; overflow-x: auto; margin: 14px 0; border-collapse: collapse; font-size: 14px; }
.legal-doc th, .legal-doc td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal-doc th { background: var(--surface-2); color: var(--ink); font-weight: 650; }
.legal-doc aside.note { margin: 14px 0; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--muted); font-size: 14.5px; }
.legal-doc mark.todo { padding: 0 4px; border-radius: 4px; background: color-mix(in srgb, #f59e0b 30%, transparent); color: inherit; }
.legal-doc .table-wrap { margin: 14px 0; overflow-x: auto; }
.legal-doc .table-wrap table { display: table; margin: 0; }
.legal-doc code { padding: 1px 5px; border-radius: 6px; background: var(--surface-2); font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ---- narrower screens ---------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .float { display: none; }
  .hero-row { display: flex; }
  .hero { padding-top: 128px; }
}
@media (max-width: 860px) {
  .hero { padding: 110px 20px 54px; }
  .lead { font-size: 17px; }
  .pillars { gap: 10px 18px; }
}
@media (max-width: 720px) {
  /* the veil behind the stuck tools: full width, fading above and below only */
  .toolbar::before { inset: 0 calc(var(--gutter) * -1) -22px; -webkit-mask: linear-gradient(to bottom, transparent, #000 10px, #000 calc(100% - 30px), transparent); mask: linear-gradient(to bottom, transparent, #000 10px, #000 calc(100% - 30px), transparent); }
  #sort-label, .tool-btn .chev { display: none; }
  .tool-btn { width: 46px; justify-content: center; padding: 0; }
  .view-seg span { display: none; }
  .view-seg button { padding: 0 11px; }
  .steps { grid-template-columns: 1fr; }
  .steps li { padding: 10px 10px 10px 40px; }
  .steps li::before { top: 50%; translate: 0 -50%; }
}
@media (max-width: 640px) {
  .layer { place-items: end stretch; padding: 0; }
  .sheet { width: 100% !important; max-height: 92dvh; border-radius: 28px 28px 0 0; padding-bottom: env(safe-area-inset-bottom); opacity: 1; transform: translateY(104%); transition: transform 440ms cubic-bezier(.2, .85, .25, 1); }
  .layer.closing .sheet { transition: transform 300ms cubic-bezier(.4, 0, 1, 1); }
  .menu { position: fixed; top: auto; right: 12px; left: 12px; bottom: max(12px, env(safe-area-inset-bottom)); min-width: 0; transform-origin: bottom center; animation-name: pop-menu-up; }
  @keyframes pop-menu-up { from { opacity: 0; transform: translateY(16px); } }
  .account-area .menu { padding: 8px 8px 10px; border-radius: 24px; box-shadow: 0 0 0 100vmax rgba(8, 16, 24, 0.3), var(--shadow-2); }
  .sorter .menu { position: absolute; top: calc(100% + 8px); bottom: auto; left: auto; right: 0; width: 220px; transform-origin: top right; animation-name: pop-menu; }
}
@media (max-width: 560px) {
  :root { --gutter: 16px; }
  .top { padding: 12px var(--gutter); gap: 10px; }
  .brand { font-size: 17px; gap: 9px; }
  .brand img { width: 36px; height: 36px; }
  .icon-btn, .avatar { width: 38px; height: 38px; }
  .hero { margin-top: -64px; padding: 92px 18px 40px; }
  .hero-row img:first-child, .hero-row img:last-child { display: none; }
  .cta .btn { flex: 1 1 100%; }
  .support-line { font-size: 13px; }
  .home { padding-top: 0; }
  .home-head { margin-top: 10px; }
  .home-tools { width: 100%; }
  .home-tools .seg { flex: 1; }
  .home-tools .seg button { flex: 1; }
  .board { padding: 20px 10px 28px; border-radius: 26px; }
  .spring { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 4px; }
  .t-icon { width: 60px; height: 60px; border-radius: 14px; }
  .tile b { font-size: 11px; }
  .rm { left: calc(50% - 40px); }
  .catalog { padding-top: 18px; padding-bottom: 30px; }
  .catalog > h2 { font-size: 26px; }
  .toolbar { padding: 10px 0; gap: 10px; }
  .search input, .tool-btn, .view-seg { height: 44px; }
  .tool-btn { width: 44px; }
  .search kbd { display: none; }
  html:not([data-list="icons"]) .hit { grid-template-columns: 56px minmax(0, 1fr); padding: 16px 16px 14px; column-gap: 14px; }
  html:not([data-list="icons"]) .ai { width: 56px; height: 56px; border-radius: 13px; }
  html[data-list="icons"] .apps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 4px; }
  html[data-list="icons"] .ai { width: 60px; height: 60px; border-radius: 14px; }
  html[data-list="icons"] .nm { font-size: 11px; }
  .view { padding-top: 8px; }
  .auth { padding: 26px 20px 20px; border-radius: 26px; margin-top: 1vh; }
  .panel { padding: 20px 18px 18px; border-radius: 22px; }
  .legal-doc { padding: 20px 18px 22px; border-radius: 22px; }
  .notice-bar.install { flex-wrap: wrap; align-items: flex-start; }
  .notice-bar.install .grow { flex: 1 1 0; }
  .install-actions { flex: 1 1 100%; justify-content: flex-end; }
  .foot { gap: 8px 14px; }
}
@media (max-width: 350px) {
  .brand em { display: none; }
  .tools > .account-area .btn { padding: 0 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .float img { animation: none; }
}
@media print {
  .top, .foot, .notices, .wall { display: none !important; }
  .legal-doc { max-width: none; border: 0; box-shadow: none; }
  .legal-doc a { color: inherit; }
}
