/* Self-hosted typefaces (SIL Open Font License). */
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/font-sora-600.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/font-sora-700.woff2') format('woff2'); }
@font-face { font-family: 'Sora'; font-style: normal; font-weight: 800; font-display: swap; src: url('/static/font-sora-800.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/font-inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/font-inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/font-inter-600.woff2') format('woff2'); }

/* Atlandrak design tokens. Light is the default; dark applies when the user picks it
   or when the user follows the device and the device is dark. */
:root {
  --bg: #f7f4ee;
  --surface: #fffdf9;
  --surface-2: #efeae0;
  --hover: #e8e2d6;
  --selected: #efe3c8;
  --selected-text: #5e4517;
  --text: #1a1814;
  --text-2: #5e584d;
  --text-3: #8a8478;
  --border: #e2dccf;
  --accent: #8a6a2b;
  --accent-hover: #735823;
  --on-accent: #ffffff;
  --brand-a: #7a5a1f;
  --brand-b: #b38a3f;
  --brand-c: #d9b878;
  --danger: #b3261e;
  --shadow: 0 1px 2px rgba(26, 22, 14, .08), 0 6px 20px rgba(26, 22, 14, .08);
  --radius: 12px;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Sora", "Inter", system-ui, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0e0e0f;
  --surface: #17171a;
  --surface-2: #212125;
  --hover: #2a2a2f;
  --selected: #3a3122;
  --selected-text: #f1d99f;
  --text: #efece6;
  --text-2: #aaa59b;
  --text-3: #7d786f;
  --border: #2e2d30;
  --accent: #d8b46a;
  --accent-hover: #e6c584;
  --on-accent: #1a1408;
  --brand-a: #b8913f;
  --brand-b: #d8b46a;
  --brand-c: #f3dfa8;
  --danger: #ff7b72;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #0e0e0f;
    --surface: #17171a;
    --surface-2: #212125;
    --hover: #2a2a2f;
    --selected: #3a3122;
    --selected-text: #f1d99f;
    --text: #efece6;
    --text-2: #aaa59b;
    --text-3: #7d786f;
    --border: #2e2d30;
    --accent: #d8b46a;
    --accent-hover: #e6c584;
    --on-accent: #1a1408;
    --brand-a: #b8913f;
    --brand-b: #d8b46a;
    --brand-c: #f3dfa8;
    --danger: #ff7b72;
    --shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-brand); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 15px; margin-top: 24px; color: var(--text-2); }
.muted { color: var(--text-2); }
.icon { flex: none; }

/* Brand */
.logo {
  font-family: var(--font-brand);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(100deg, var(--brand-a) 0%, var(--brand-c) 45%, var(--brand-b) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.logo-sm { font-size: 22px; }
.logo-md { font-size: 30px; }
.logo-hero { font-size: clamp(56px, 12vw, 128px); line-height: 1; }

/* Top bar */
.topbar {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px 0 20px; position: sticky; top: 0; z-index: 20; background: var(--bg);
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.product-name { font-family: var(--font-brand); font-weight: 600; font-size: 20px; color: var(--text-2); }
.topbar-actions { position: relative; display: flex; align-items: center; gap: 6px; }
.icon-btn, .avatar-btn {
  border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
}
.icon-btn:hover, .avatar-btn:hover { background: var(--hover); }
.avatar, .avatar-lg, .avatar-xl { border-radius: 50%; object-fit: cover; display: grid; place-items: center; }
.avatar { width: 34px; height: 34px; }
.avatar-lg { width: 80px; height: 80px; font-size: 30px; }
.avatar-xl { width: 112px; height: 112px; font-size: 42px; }
.avatar-initials { background: linear-gradient(135deg, var(--brand-a), var(--brand-b)); color: #fff; font-weight: 500; }

.popover {
  position: absolute; top: 52px; right: 0; display: none; z-index: 30;
  background: var(--surface); border: 1px solid var(--border); border-radius: 24px; box-shadow: var(--shadow);
}
.popover.open { display: block; animation: pop .14s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.profile-pop { width: 340px; padding: 24px 20px 16px; text-align: center; }
.profile-pop .avatar-lg { margin: 0 auto 12px; }
.profile-name { font-size: 20px; font-weight: 500; }
.profile-email { color: var(--text-2); margin-bottom: 18px; word-break: break-all; }
.pill-btn {
  display: inline-block; padding: 9px 22px; border: 1px solid var(--border); border-radius: 999px;
  color: var(--accent); font-weight: 500;
}
.pill-btn:hover { background: var(--hover); }
.text-btn { display: block; margin: 16px -20px -16px; padding: 14px; border-top: 1px solid var(--border); color: var(--text-2); border-radius: 0 0 24px 24px; }
.text-btn:hover { background: var(--hover); color: var(--text); }
.apps-pop { width: 300px; padding: 16px; display: none; grid-template-columns: repeat(3, 1fr); gap: 4px; right: 48px; }
.apps-pop.open { display: grid; }
.app-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px; border-radius: 16px; color: var(--text); font-size: 13px; }
.app-tile .icon { color: var(--accent); }
.app-tile:hover { background: var(--hover); }

.signin-btn {
  background: var(--accent); color: var(--on-accent); padding: 9px 24px; border-radius: 999px; font-weight: 500;
  transition: background .15s, box-shadow .15s;
}
.signin-btn:hover { background: var(--accent-hover); box-shadow: var(--shadow); }

/* Landing and login */
body.landing, body.login { overflow: hidden; height: 100vh; height: 100dvh; }
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.aurora span {
  position: absolute; width: 55vmax; height: 55vmax; border-radius: 50%; filter: blur(90px); opacity: .28;
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora span:nth-child(1) { background: var(--brand-a); top: -20vmax; left: -12vmax; }
.aurora span:nth-child(2) { background: var(--brand-b); bottom: -26vmax; right: -14vmax; animation-delay: -8s; }
.aurora span:nth-child(3) { background: var(--brand-c); top: 30%; left: 45%; width: 35vmax; height: 35vmax; opacity: .18; animation-delay: -16s; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .aurora span { animation: none; } }
.landing-top { position: relative; z-index: 2; display: flex; justify-content: flex-end; align-items: center; padding: 14px 20px; height: 68px; }
.landing-center { position: relative; z-index: 1; height: calc(100vh - 68px); height: calc(100dvh - 68px); display: grid; place-items: center; padding-bottom: 12vh; }

.login { display: grid; place-items: center; }
.login-card {
  position: relative; z-index: 1; width: min(440px, calc(100vw - 32px)); background: var(--surface);
  border: 1px solid var(--border); border-radius: 28px; padding: 44px 40px 40px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
}
.login-card h1 { font-size: 30px; margin-top: 18px; }
.provider-btn {
  margin-top: 26px; display: flex; align-items: center; justify-content: center; gap: 12px;
  height: 46px; border: 1px solid var(--border); border-radius: 999px; font-weight: 500; background: var(--surface);
}
.provider-btn:hover { background: var(--hover); }

/* App shell */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.sidebar { padding: 8px 12px 16px 8px; display: flex; flex-direction: column; gap: 2px; }
.content {
  background: var(--surface); border-radius: 18px 0 0 0; padding: 20px 28px 40px; min-height: calc(100vh - 64px);
  margin-right: 0;
}
.nav-item {
  display: flex; align-items: center; gap: 14px; height: 36px; padding: 0 16px; border-radius: 999px; color: var(--text);
}
.nav-item:hover { background: var(--hover); }
.nav-item.active { background: var(--selected); color: var(--selected-text); font-weight: 500; }
.new-btn {
  display: inline-flex; align-items: center; gap: 12px; height: 56px; padding: 0 22px 0 16px; margin: 0 0 14px 4px;
  width: fit-content; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); font: 500 14px var(--font-ui);
  box-shadow: var(--shadow); cursor: pointer;
}
.new-btn:hover { background: var(--hover); }
.page-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.content .card { background: var(--bg); }

/* Account */
.account-hero { text-align: center; padding: 18px 0 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.photo-edit { position: relative; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; margin-bottom: 8px; }
.photo-badge {
  position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px; padding: 2px 12px; font-size: 12px; box-shadow: var(--shadow);
}
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); }
.field input, .field select {
  height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: var(--text); font: 14px var(--font-ui);
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.field input:disabled { color: var(--text-3); background: var(--surface-2); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 24px; }
.primary-btn {
  background: var(--accent); color: var(--on-accent); border: 0; border-radius: 999px; padding: 10px 28px;
  font: 500 14px var(--font-ui); cursor: pointer;
}
.primary-btn:hover { background: var(--accent-hover); }
.status { color: var(--text-2); font-size: 13px; }
.theme-options { display: flex; gap: 16px; margin-top: 16px; flex-wrap: wrap; }
.theme-option { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; }
.theme-option input { position: absolute; opacity: 0; }
.theme-swatch { width: 120px; height: 76px; border-radius: 12px; border: 2px solid var(--border); }
.theme-option input:checked + .theme-swatch { border-color: var(--accent); box-shadow: 0 0 0 3px var(--selected); }
.theme-option input:focus-visible + .theme-swatch { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-light { background: linear-gradient(180deg, #f7f4ee 30%, #fffdf9 30%); }
.theme-dark { background: linear-gradient(180deg, #0e0e0f 30%, #17171a 30%); }
.theme-system { background: linear-gradient(90deg, #f7f4ee 50%, #0e0e0f 50%); }

/* Vault */
.dropzone { position: relative; min-height: 60vh; border-radius: var(--radius); }
.drop-hint {
  display: none; position: absolute; inset: 0; border: 2px dashed var(--accent); border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent);
  flex-direction: column; align-items: center; justify-content: center; gap: 10px; font-weight: 500;
}
.dropzone.dragging .drop-hint { display: flex; }
.file-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 180px 100px 88px; align-items: center; gap: 12px;
  height: 48px; padding: 0 12px; border-bottom: 1px solid var(--border);
}
.file-row.head { color: var(--text-2); font-weight: 500; height: 40px; }
.file-row:not(.head):hover { background: var(--hover); border-radius: 8px; }
.file-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-name .icon { color: var(--accent); }
.file-meta { color: var(--text-2); }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; }
.row-actions button { width: 36px; height: 36px; }
.empty { padding: 60px 0; text-align: center; }
.toast {
  position: fixed; left: 24px; bottom: 24px; background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 10px;
  box-shadow: var(--shadow); opacity: 0; transform: translateY(10px); transition: all .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

/* Productivity */
.building { text-align: center; padding: 64px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--accent); }
.building h2 { color: var(--text); }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; padding: 0 12px 8px; }
  .new-btn { height: 40px; margin: 0; }
  .content { border-radius: 18px 18px 0 0; padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .file-row { grid-template-columns: minmax(0, 1fr) 88px; }
  .file-row > :nth-child(2), .file-row > :nth-child(3) { display: none; }
  .profile-pop { width: min(340px, calc(100vw - 32px)); }
  .login-card { padding: 32px 24px; }
}

/* Device support: notches, touch, tablets and large screens (TV). */
.topbar, .landing-top { padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
button, a, input, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.apps-pop { width: min(300px, calc(100vw - 32px)); }
@media (hover: none) {
  .icon-btn:hover, .avatar-btn:hover, .nav-item:hover, .file-row:not(.head):hover { background: transparent; }
  .nav-item.active:hover { background: var(--selected); }
}
@media (pointer: coarse) {
  .nav-item { height: 44px; }
  .file-row { height: 56px; }
  .row-actions button { width: 44px; height: 44px; }
}
@media (max-width: 760px) {
  .field input, .field select { font-size: 16px; }
  .apps-pop { right: -44px; }
  .toast { left: 16px; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .shell { grid-template-columns: 200px minmax(0, 1fr); }
  .content { padding: 20px; }
}
@media (min-width: 1800px) { body { zoom: 1.25; } }
@media (min-width: 2600px) { body { zoom: 1.75; } }

/* Landing footer and legal pages */
.landing-footer { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 24px; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); font-size: 13px; }
.landing-footer a { color: var(--text-2); }
.landing-footer a:hover { color: var(--text); }
.legal-page { max-width: 720px; margin: 0 auto; padding: 40px 20px 80px; line-height: 1.7; }
.legal-page h1 { font-size: 32px; margin: 28px 0 4px; }
.legal-page h2 { margin: 28px 0 8px; }
.legal-page a:not(.logo) { color: var(--accent); }

/* Tasks */
.primary-btn { display: inline-flex; align-items: center; gap: 8px; }
.task-toolbar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 3px; }
.segmented button { border: 0; background: transparent; color: var(--text-2); padding: 6px 14px; border-radius: 999px; font: 500 13px var(--font-ui); cursor: pointer; }
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.task-table { overflow-x: auto; }
.task-row { display: grid; grid-template-columns: minmax(220px, 1fr) 140px 110px 150px 170px 170px; gap: 8px; align-items: center; min-width: 1000px; padding: 4px 8px; border-bottom: 1px solid var(--border); }
.task-row.head { color: var(--text-2); font-weight: 500; font-size: 13px; padding: 10px 8px; }
.task-row input, .task-row select { width: 100%; height: 34px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font: 14px var(--font-ui); padding: 0 8px; }
.task-row input:hover:not(:disabled), .task-row select:hover:not(:disabled) { border-color: var(--border); }
.task-row input:focus, .task-row select:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.task-row :disabled { color: var(--text); opacity: 1; cursor: default; }
.pill-select { font-weight: 500; }
.status-not-started { color: var(--text-2); }
.status-in-progress { color: #c27c0e; }
.status-done { color: #1f9d55; }
.priority-high { color: var(--danger); }
.priority-medium { color: #c27c0e; }
.priority-low { color: var(--text-2); }
.link-btn { border: 0; background: transparent; text-align: left; cursor: pointer; padding: 0 8px; height: 34px; border-radius: 8px; font: 14px var(--font-ui); color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-btn:hover { background: var(--hover); }
.add-row { border: 0; background: transparent; color: var(--text-2); padding: 10px 8px; cursor: pointer; font: 14px var(--font-ui); text-align: left; width: 100%; border-radius: 8px; }
.add-row:hover { background: var(--hover); color: var(--text); }
.board { display: grid; grid-template-columns: repeat(3, minmax(240px, 1fr)); gap: 16px; overflow-x: auto; }
.board-col { background: var(--bg); border-radius: var(--radius); padding: 10px; min-height: 200px; }
.board-col header { display: flex; align-items: center; gap: 8px; font-weight: 500; padding: 4px 6px 10px; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.board-card { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; }
.board-card:hover { box-shadow: var(--shadow); }
.card-title { font-weight: 500; }
.card-meta { display: flex; gap: 8px; align-items: center; font-size: 12px; }
.tag { font-weight: 500; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow); z-index: 40; padding: 16px 20px max(20px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; overflow-y: auto; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.drawer-head .icon-btn { font-size: 24px; }
.drawer-title { font: 500 22px var(--font-ui); border: 0; background: transparent; color: var(--text); padding: 4px 0; }
.drawer-title:focus { outline: none; }
.drawer textarea { min-height: 90px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px/1.5 var(--font-ui); resize: vertical; }
.danger-btn { align-self: flex-start; border: 1px solid var(--border); background: transparent; color: var(--danger); padding: 8px 18px; border-radius: 999px; font: 500 14px var(--font-ui); cursor: pointer; }
@media (max-width: 760px) {
  .board { grid-template-columns: repeat(3, 85vw); }
  .drawer textarea, .drawer input, .drawer select { font-size: 16px; }
  .page-head { gap: 12px; }
}
.rename-input { flex: 1; min-width: 0; height: 32px; padding: 0 10px; border: 1px solid var(--accent); border-radius: 8px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
.file-row { grid-template-columns: minmax(0, 1fr) 180px 100px 132px; }
@media (max-width: 760px) { .file-row { grid-template-columns: minmax(0, 1fr) 132px; } .rename-input { font-size: 16px; } }

/* Workspace (Notion style) */
.ws-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
.ws-list { border-right: 1px solid var(--border); padding-right: 12px; display: flex; flex-direction: column; gap: 2px; }
.ws-list-head { display: flex; justify-content: space-between; align-items: center; color: var(--text-2); font-size: 13px; font-weight: 500; padding: 4px 4px 8px 10px; }
.ws-list-head .icon-btn { width: 32px; height: 32px; font-size: 20px; }
.ws-list-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--text); text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: 14px var(--font-ui); }
.ws-list-item:hover { background: var(--hover); }
.ws-list-item.active { background: var(--selected); color: var(--selected-text); font-weight: 500; }
.ws-list-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-list-empty { padding: 0 10px; font-size: 13px; }
.ws-role { font-size: 11px; color: var(--text-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }
.ws-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.ws-db-icon { width: 48px; height: 48px; font-size: 28px; text-align: center; border: 0; border-radius: 10px; background: transparent; color: var(--text); }
.ws-db-icon:hover:not(:disabled) { background: var(--hover); }
.ws-db-name { flex: 1; min-width: 0; font: 600 28px var(--font-ui); border: 0; background: transparent; color: var(--text); padding: 4px 0; }
.ws-db-name:focus, .ws-db-icon:focus { outline: none; }
.ws-db-name:disabled, .ws-db-icon:disabled { color: var(--text); opacity: 1; }
.text-link { border: 0; background: transparent; color: var(--text-2); font: 13px var(--font-ui); cursor: pointer; margin-left: auto; }
.text-link:hover { color: var(--danger); }
.ws-table { overflow-x: auto; border-top: 1px solid var(--border); }
.ws-tr { display: grid; grid-template-columns: var(--cols); align-items: center; min-width: max-content; border-bottom: 1px solid var(--border); }
.ws-th { color: var(--text-2); font-size: 13px; }
.ws-th > span { padding: 10px 8px; }
.ws-th-btn { display: flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--text-2); font: 500 13px var(--font-ui); padding: 10px 8px; text-align: left; cursor: pointer; border-left: 1px solid var(--border); }
.ws-th-btn:hover:not(:disabled) { background: var(--hover); color: var(--text); }
.ws-th-btn:disabled { cursor: default; }
.ws-type { font-size: 10px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); }
.ws-badge { font-size: 10px; border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; }
.ws-td { border-left: 1px solid var(--border); min-height: 40px; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 2px 4px; }
.ws-input { width: 100%; min-width: 0; height: 34px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); font: 14px var(--font-ui); padding: 0 8px; }
.ws-input:hover:not(:disabled) { border-color: var(--border); }
.ws-input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.ws-input:disabled { opacity: 1; color: var(--text); }
.ws-title { font-weight: 500; }
.ws-check { width: 18px; height: 18px; margin: 0 8px; accent-color: var(--accent); }
.ws-tag, .ws-person { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); margin: 2px 2px 2px 0; }
.ws-person { border-radius: 999px; }
.ws-link { color: var(--accent); word-break: break-all; }
.ws-open { width: 36px; height: 36px; font-size: 16px; }
.ws-choices { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 4px 0; }
.ws-choices label { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); cursor: pointer; }
.ws-choices input { accent-color: var(--accent); width: 16px; height: 16px; }
.ws-props { display: flex; flex-direction: column; gap: 4px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.ws-prop-row { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 36px; }
.ws-prop-name { color: var(--text-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.ws-page { width: min(640px, 100vw); }
.ws-body { display: flex; flex-direction: column; gap: 2px; }
.ws-block { display: flex; align-items: flex-start; gap: 6px; }
.ws-block-type { width: 22px; height: 28px; opacity: .35; border: 0; background: transparent; color: var(--text); cursor: pointer; flex: none; }
.ws-block:hover .ws-block-type, .ws-block-type:focus { opacity: 1; width: auto; }
.ws-block textarea { flex: 1; border: 0; background: transparent; color: var(--text); font: 15px/1.6 var(--font-ui); resize: none; padding: 3px 0; overflow: hidden; }
.ws-block textarea:focus { outline: none; }
.ws-block-h1 textarea { font-size: 26px; font-weight: 600; }
.ws-block-h2 textarea { font-size: 21px; font-weight: 600; }
.ws-block-h3 textarea { font-size: 17px; font-weight: 600; }
.ws-block-bullet textarea { padding-left: 18px; background: radial-gradient(circle at 6px 15px, var(--text) 2.5px, transparent 3px) no-repeat; }
.ws-block-quote textarea { border-left: 3px solid var(--text); padding-left: 12px; }
.ws-todo { margin-top: 8px; accent-color: var(--accent); }
.ws-hint { font-size: 12px; }
.ws-share-form { display: grid; grid-template-columns: minmax(0, 1fr) 120px auto; gap: 8px; }
.ws-share-form .ws-input { border-color: var(--border); }
.ws-roles { font-size: 13px; padding-left: 18px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.ws-members { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.ws-member { display: grid; grid-template-columns: minmax(0, 1fr) 130px 36px; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 14px; word-break: break-all; }
.ws-member .ws-input { border-color: var(--border); }
.ws-stack { display: flex; flex-direction: column; gap: 14px; }
.drawer .field input, .drawer .field select { height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
.drawer .field textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
.board-card .card-meta { justify-content: space-between; }
@media (max-width: 900px) {
  .ws-layout { grid-template-columns: 1fr; }
  .ws-list { border-right: 0; border-bottom: 1px solid var(--border); padding: 0 0 10px; flex-direction: row; overflow-x: auto; }
  .ws-list-head span { display: none; }
  .ws-list-item { white-space: nowrap; }
  .ws-db-name { font-size: 22px; }
  .ws-share-form { grid-template-columns: 1fr; }
  .ws-input, .ws-block textarea { font-size: 16px; }
}

/* Vault v2 */
.sidebar { position: relative; }
.new-pop { top: 64px; left: 4px; right: auto; width: 220px; padding: 6px; border-radius: 14px; }
.new-pop button, .item-menu button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: var(--text); padding: 10px 12px; border-radius: 8px; font: 14px var(--font-ui); cursor: pointer; text-align: left; }
.new-pop button:hover, .item-menu button:hover { background: var(--hover); }
.storage-mini { margin: 18px 8px 0 16px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; }
.storage-mini .pill-btn { align-self: flex-start; font-size: 13px; padding: 6px 14px; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.meter span.full { background: var(--danger); }
.meter-lg { height: 10px; margin: 12px 0; }
.vault-top { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.vault-search { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); }
.vault-search input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: 15px var(--font-ui); outline: none; }
.segmented button .icon { display: block; }
.crumbs { font-size: 22px; }
.crumbs a:hover { text-decoration: underline; }
.trash-note { margin: -8px 0 14px; font-size: 13px; }
.file-row { position: relative; cursor: default; }
.file-row[data-folder], .vault-card { cursor: pointer; }
.file-thumb { width: 28px; height: 28px; display: grid; place-items: center; color: var(--accent); flex: none; }
.file-thumb img { width: 28px; height: 28px; object-fit: cover; border-radius: 6px; }
.row-actions { position: relative; }
.item-menu { position: absolute; right: 0; top: 40px; z-index: 30; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); }
.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.vault-card { position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; overflow: visible; }
.vault-card:hover { box-shadow: var(--shadow); }
.vault-card-media { height: 160px; display: grid; place-items: center; color: var(--accent); border-radius: 13px 13px 0 0; overflow: hidden; background: var(--surface-2); }
.vault-card-media .icon { width: 48px; height: 48px; }
.vault-card-media.is-image img { width: 100%; height: 100%; object-fit: contain; background: var(--surface-2); }
.vault-card-foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 4px 6px 12px; font-size: 14px; }
.vault-card-foot > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, .45); display: grid; place-items: center; padding: 16px; }
.modal { width: min(460px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.picker-crumbs { font-size: 14px; color: var(--text-2); }
.picker-crumbs button { border: 0; background: transparent; color: var(--accent); font: 14px var(--font-ui); cursor: pointer; padding: 2px; }
.picker-list { max-height: 300px; overflow-y: auto; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; padding: 6px; }
.picker-item { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); padding: 10px; border-radius: 8px; font: 14px var(--font-ui); cursor: pointer; text-align: left; }
.picker-item:hover { background: var(--hover); }
.picker-item .icon { color: var(--accent); }
.storage-card { max-width: 720px; }
.storage-big { font-size: 18px; }
.storage-big strong { font-family: var(--font-brand); font-size: 28px; }
.plans-title { margin: 8px 0 14px; }
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.plan { border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; background: var(--bg); }
.plan.current { border-color: var(--accent); }
.plan-size { font-family: var(--font-brand); font-weight: 700; font-size: 22px; }
.plan-price { font-size: 18px; font-weight: 600; }
.plan-price span { font-size: 13px; font-weight: 400; }
#toast a { color: inherit; text-decoration: underline; }
@media (max-width: 760px) {
  .vault-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vault-card-media { height: 120px; }
  .vault-search input { font-size: 16px; }
  .storage-mini { display: none; }
}

/* Footer, ads and internal */
.site-footer { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; padding: 40px 16px 24px; font-size: 13px; }
.site-footer a, .landing-footer a { color: var(--text-2); }
.site-footer a:hover, .landing-footer a:hover { color: var(--text); text-decoration: underline; }
.shell.with-ads { grid-template-columns: 256px minmax(0, 1fr) 200px; }
.ad-column { padding: 8px 12px; display: flex; flex-direction: column; gap: 16px; }
.ad-slot { min-height: 250px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; position: relative; background: var(--surface); }
.ad-label { position: absolute; top: 4px; left: 8px; font-size: 10px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.legal .ad-column { max-width: 728px; margin: 0 auto 24px; padding: 0 16px; }
.update { border-top: 1px solid var(--border); padding: 18px 0; }
.update h2 { margin: 6px 0; }
.update-tech { font-size: 13px; }
.internal-hero { text-align: center; }
.internal-hero p { margin-top: 12px; font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 1100px) { .shell.with-ads { grid-template-columns: 200px minmax(0, 1fr); } .shell.with-ads .ad-column { display: none; } }
@media (max-width: 760px) { .shell.with-ads { grid-template-columns: 1fr; } }

/* AI */
.ai-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); }
.ai-bar strong { font-family: var(--font-brand); font-size: 18px; }
.ai-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.ai-card { display: flex; flex-direction: column; text-align: left; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); color: var(--text); padding: 0; overflow: hidden; cursor: pointer; font: 14px var(--font-ui); }
.ai-card:hover { box-shadow: var(--shadow); border-color: var(--accent); }
.ai-thumb { height: 150px; background: var(--surface-2); }
.ai-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ai-card-body { display: flex; flex-direction: column; gap: 4px; padding: 12px; }
.ai-card-body .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-price { color: var(--accent); font-weight: 600; font-size: 13px; }
.ai-run { width: min(620px, 100%); }
.ai-desc { font-size: 13px; max-height: 80px; overflow: auto; }
.ai-run textarea { padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 15px var(--font-ui); resize: vertical; }
.ai-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.ai-result { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--bg); }
.ai-media img, .ai-media video { width: 100%; display: block; background: var(--surface-2); }
.ai-status { height: 200px; display: grid; place-items: center; text-align: center; padding: 16px; color: var(--text-2); background: var(--surface-2); }
.ai-status.failed { color: var(--danger); }
.ai-meta { padding: 12px; font-size: 13px; }
.ai-meta p { margin: 6px 0; }
@media (max-width: 760px) { .ai-run textarea { font-size: 16px; } .ai-bar { flex-direction: column; align-items: flex-start; } }
.key-new { display: flex; gap: 10px; margin: 14px 0; }
.key-new input { flex: 1; height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
.key-reveal { border: 1px solid var(--accent); border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; word-break: break-all; }
.key-reveal code { font-size: 13px; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }
.key-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }

/* Sync */
.chat-list { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.chat-item { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; color: var(--text); padding: 8px 12px; border-radius: 999px; cursor: pointer; font: 14px var(--font-ui); text-align: left; }
.chat-item:hover { background: var(--hover); }
.chat-item.active { background: var(--selected); color: var(--selected-text); font-weight: 500; }
.chat-avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: var(--surface-2); color: var(--accent); flex: none; }
.chat-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-unread { background: var(--accent); color: var(--on-accent); border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 600; }
.chat-empty { padding: 0 12px; font-size: 13px; }
#sync-app { display: flex; flex-direction: column; height: calc(100vh - 140px); height: calc(100dvh - 140px); }
.chat-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.chat-head h1 { font-size: 20px; }
.chat-add { margin-left: auto; display: flex; gap: 8px; }
.chat-add input { height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: 13px var(--font-ui); }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: min(560px, 85%); align-self: flex-start; }
.msg.mine { align-self: flex-end; text-align: right; }
.msg-meta { font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.msg-body { display: inline-block; text-align: left; padding: 9px 14px; border-radius: 16px; background: var(--surface-2); line-height: 1.45; word-break: break-word; }
.msg.mine .msg-body { background: var(--selected); color: var(--selected-text); }
.chat-compose { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--border); }
.chat-compose textarea { flex: 1; resize: none; padding: 11px 14px; border: 1px solid var(--border); border-radius: 22px; background: var(--surface); color: var(--text); font: 15px var(--font-ui); max-height: 160px; }
.chat-new { max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.chat-new .field input { height: 42px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
@media (max-width: 760px) { .chat-compose textarea, .chat-add input { font-size: 16px; } #sync-app { height: calc(100dvh - 220px); } }

/* Mail */
.mail-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.mail-row { display: grid; grid-template-columns: 220px minmax(0, 1fr) 80px; gap: 12px; align-items: center; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: var(--text); padding: 12px 10px; text-align: left; cursor: pointer; font: 14px var(--font-ui); }
.mail-row:hover { background: var(--hover); }
.mail-row.unread { font-weight: 600; }
.mail-from, .mail-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-date { text-align: right; font-size: 12px; }
.mail-read h1 { margin: 16px 0 8px; font-size: 22px; }
.mail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mail-head { display: flex; flex-direction: column; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--border); font-size: 14px; }
.mail-frame { width: 100%; min-height: 60vh; border: 1px solid var(--border); border-radius: 12px; margin-top: 12px; background: #fff; }
.mail-text { white-space: pre-wrap; font: 14px/1.6 var(--font-ui); margin-top: 12px; }
.mail-compose { width: min(640px, 100%); }
.mail-compose input, .mail-compose textarea { padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
@media (max-width: 760px) { .mail-row { grid-template-columns: minmax(0, 1fr) 60px; } .mail-from { grid-column: 1 / -1; } .mail-compose input, .mail-compose textarea { font-size: 16px; } }

/* Vault selection */
.file-row.selected, .vault-card.selected { background: var(--selected); color: var(--selected-text); border-radius: 8px; }
.vault-card.selected { outline: 2px solid var(--accent); }
.file-row, .vault-card { user-select: none; -webkit-user-select: none; }
.select-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; margin-bottom: 12px; border-radius: 14px; background: var(--surface-2); }
.select-bar strong { margin-right: 6px; }
.marquee { position: fixed; z-index: 70; border: 1px solid var(--accent); background: color-mix(in srgb, var(--accent) 15%, transparent); pointer-events: none; border-radius: 4px; }
.help-btn { white-space: nowrap; }
#vault-app { min-height: 70vh; }

.price-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.price-table th, .price-table td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); }
.landing-footer { gap: 18px; flex-wrap: wrap; }

.help-link { font: 700 18px var(--font-brand); color: var(--text-2); }
.help-article { max-width: 820px; line-height: 1.7; }
.help-article h3 { margin-top: 24px; color: var(--text); }
.help-grid .plan { text-decoration: none; }
.help-grid .plan:hover { border-color: var(--accent); }

.topbar-right { display: flex; align-items: center; gap: 6px; }
.select-bar .pill-btn { color: var(--text); background: var(--surface); }

.lang-select { margin-top: 14px; height: 44px; min-width: 240px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
[dir="rtl"] .sidebar, [dir="rtl"] .content { text-align: right; }

/* Vault space: ring + tier list (our own layout). */
.space-layout { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 32px; align-items: start; max-width: 980px; }
@media (max-width: 760px) { .space-layout { grid-template-columns: 1fr; } }
.space-ring { position: relative; text-align: center; padding: 8px; }
.space-ring svg { width: 220px; height: 220px; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--border); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset .6s ease; }
.ring-fill.full { stroke: #c4553d; }
.ring-label { position: absolute; top: 8px; left: 0; right: 0; height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.ring-label strong { font-family: var(--font-brand); font-weight: 800; font-size: 40px; }
.space-tiers h1 { margin: 0 0 16px; }
.tier-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.tier { display: grid; grid-template-columns: 1fr auto 110px; align-items: center; gap: 16px; padding: 16px 4px; border-bottom: 1px solid var(--border); }
.tier.current .tier-size { color: var(--accent); }
.tier-size { font-family: var(--font-brand); font-weight: 700; font-size: 20px; }
.tier-price { font-weight: 600; }
.tier-action { text-align: end; }
.tier-badge { display: inline-block; padding: 4px 12px; border: 1px solid var(--accent); color: var(--accent); border-radius: 6px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.update-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.update-list li { display: flex; gap: 10px; align-items: baseline; }
.update-tag { flex: none; min-width: 74px; text-align: center; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--border); }
.tag-new { color: var(--accent); border-color: var(--accent); }
.ai-kind { display: flex; align-items: center; justify-content: center; height: 100%; font-family: var(--font-brand); font-weight: 700; color: var(--accent); font-size: 15px; letter-spacing: .02em; }
.ai-tabs { margin: 6px 0 14px; }
.ai-inputs { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ai-input { position: relative; width: 72px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.ai-input img { width: 100%; height: 100%; object-fit: cover; }
.ai-input button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }
.ai-quote strong { font-family: var(--font-brand); font-size: 20px; }
.ai-run pre { white-space: pre-wrap; word-break: break-all; font-size: 12px; }
/* Vault: details column, invitations, share dialog */
.vault-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; }
.vault-split.with-panel { grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; }
.details-panel { position: sticky; top: 0; align-self: start; height: calc(100vh - 96px); overflow-y: auto; padding: 18px 18px 24px;
  border-left: 2px solid var(--accent); background: var(--surface, var(--bg)); border-radius: 0 14px 14px 0; }
.details-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.details-head strong { font-family: var(--font-brand); font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.details-preview { margin: 14px 0; border-radius: 12px; border: 1px solid var(--border); min-height: 120px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.details-preview img { width: 100%; max-height: 220px; object-fit: contain; }
.details-preview .icon { width: 56px; height: 56px; color: var(--accent); }
.details-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.details-panel h3 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted, inherit); margin: 18px 0 8px; }
.detail-row, .access-row { display: grid; grid-template-columns: 84px 1fr; gap: 10px; padding: 6px 0; font-size: 14px; word-break: break-word; }
.access-row { grid-template-columns: 1fr auto 28px; align-items: center; border-bottom: 1px solid var(--border); }
.invites { margin: 6px 0 18px; }
.invites h2 { font-size: 15px; margin: 0 0 8px; }
.invite-row { display: grid; grid-template-columns: 28px 1fr auto auto; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--accent); border-radius: 12px; margin-bottom: 8px; }
.invite-card { max-width: 560px; margin: 40px auto; }
.notice { border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 10%, transparent); }
@media (max-width: 900px) {
  .vault-split.with-panel { grid-template-columns: 1fr; }
  .details-panel { position: fixed; inset: auto 0 0 0; height: 70vh; z-index: 40; border-left: 0; border-top: 2px solid var(--accent); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.35); }
}

.plan-summary { display: flex; flex-wrap: wrap; gap: 28px; margin: 14px 0 6px; }
.plan-summary > div { display: flex; flex-direction: column; gap: 4px; }
.plan-summary strong { font-family: var(--font-brand); font-size: 18px; }
.form-actions.start { justify-content: flex-start; flex-wrap: wrap; }

.lang-picker { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 18px; font-size: 13px; }
.lang-picker a { color: var(--accent); text-decoration: none; }
.lang-picker a.active { font-weight: 700; text-decoration: underline; }
.lang-picker .unavailable { opacity: .35; cursor: default; }

/* Help: wiki layout. The footer always sits at the bottom of the page. */
.content { display: flex; flex-direction: column; }
.content > .site-footer { margin-top: auto; }
.wiki { max-width: 820px; width: 100%; }
.wiki h1 { margin: 4px 0 10px; }
.wiki-crumbs { font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.wiki-crumbs a { color: var(--accent); text-decoration: none; }
.wiki-index { margin: 26px 0 8px; }
.wiki-index h2 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); margin: 0 0 10px; }
.wiki-index ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--border); }
.wiki-index li { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 12px 4px; border-bottom: 1px solid var(--border); }
.wiki-index li a { font-weight: 600; color: var(--text); text-decoration: none; }
.wiki-index li a:hover { color: var(--accent); }
.wiki-index.internal h2, .wiki-nav-group.internal .wiki-nav-title { color: var(--accent); }
.wiki-nav-group { margin-bottom: 14px; }
.wiki-nav-title { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); padding: 6px 16px; }
.help-article .lang-picker { margin: 0 0 22px; }
@media (max-width: 640px) { .wiki-index li { grid-template-columns: 1fr; gap: 4px; } }

.ai-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ad-preview { display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(45deg, transparent 0 10px, color-mix(in srgb, var(--accent) 6%, transparent) 10px 20px); }
.ad-preview:last-child { min-height: 600px; }
.legal .ad-preview { min-height: 90px; }
.ad-size { font-size: 12px; color: var(--text-3); }

/* Internal team flags: white on red, readable in light and dark mode. */
.internal-flags { display: inline-flex; gap: 6px; margin-left: 12px; align-items: center; }
.internal-flag { background: #c62828; color: #fff; font-family: var(--font-ui, inherit); font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 6px; line-height: 1.4; }
.internal-flag.stage { background: #8e1b1b; }
.internal-corner { position: fixed; top: 14px; left: 16px; z-index: 60; }
.internal-corner .internal-flags { margin-left: 0; }
.app-tile { position: relative; }
.tile-flag { position: absolute; top: 4px; right: 4px; background: #c62828; color: #fff; font-size: 9px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; padding: 1px 5px; border-radius: 4px; }

.internal-table td, .internal-table th { vertical-align: middle; }
.internal-table .center { text-align: center; }
.internal-table .on { color: #2e7d32; font-weight: 700; }
.stage-chip { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: #c62828; color: #fff; }
.stage-chip.dogfood { background: #8e1b1b; }
.stage-chip.internal { background: #5d4037; }
.table-scroll { overflow-x: auto; }

/* Tools */
.tool-intro { font-size: 17px; color: var(--text-2); max-width: 720px; }
.tool-app { margin: 22px 0; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface, transparent); }
.tool-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 34px 16px; border: 2px dashed var(--border); border-radius: 14px; cursor: pointer; text-align: center; }
.tool-drop.dragging, .tool-drop:hover { border-color: var(--accent); }
.tool-drop strong { color: var(--accent); font-size: 17px; }
.tool-files { display: grid; gap: 8px; margin: 14px 0; }
.tool-file { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; word-break: break-all; }
.tool-file.done { border-color: var(--accent); grid-template-columns: 1fr auto auto; }
.tool-options { display: grid; gap: 10px; max-width: 520px; }
.tool-privacy { font-size: 14px; color: var(--text-2); border-left: 3px solid var(--accent); padding-left: 10px; }
.tool-page h2 { margin-top: 28px; }
.check { display: flex; gap: 8px; align-items: center; }

/* Public preview badge (gold), distinct from the red internal flags. */
.preview-flag { background: var(--accent); color: #141414; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px; line-height: 1.4; }
.preview-flag.small { font-size: 9px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.tile-flag.preview { background: var(--accent); color: #141414; }
.stage-chip.teamfood { background: #a83a1f; }
.signin-btn { white-space: nowrap; }
@media (max-width: 520px) {
  .brand .internal-flags { margin-left: 6px; gap: 4px; }
  .brand .preview-flag, .brand .internal-flag { font-size: 9px; padding: 2px 6px; letter-spacing: .05em; }
  .topbar .product-name { font-size: 18px; }
}

/* Full-window apps (Sync): the page never scrolls; the conversation scrolls inside. */
@media (min-width: 761px) {
  .app-fit { overflow: hidden; }
  .app-fit .shell { height: calc(100dvh - 64px); min-height: 0; }
  .app-fit .content { min-height: 0; overflow: hidden; }
  .app-fit #sync-app { flex: 1; min-height: 0; height: auto; }
  .app-fit .content > .site-footer { padding: 10px 16px 4px; }
}
.chat-compose .icon-btn { align-self: center; }
.msg-image img { max-width: min(320px, 100%); max-height: 320px; border-radius: 12px; display: block; cursor: zoom-in; }
.notify-btn { margin: 12px 12px 0; font-size: 13px; }
.chat-item.flash { animation: chatflash 1.2s ease 2; }
@keyframes chatflash { 50% { background: var(--selected); } }

.icon-btn, .app-tile { position: relative; }
.unread-badge { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #d32f2f; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.unread-badge.dot { min-width: 10px; width: 10px; height: 10px; padding: 0; top: 4px; right: 4px; }
.field.narrow { max-width: 360px; margin-top: 16px; }
.msg-delete { border: 0; background: transparent; color: var(--text-3); font-size: 12px; cursor: pointer; padding: 2px 4px; visibility: hidden; }
.msg:hover .msg-delete { visibility: visible; }

/* Chat dock: bottom-right bar and windows on every page. */
.chat-dock { position: fixed; right: 16px; bottom: 0; z-index: 70; display: flex; align-items: flex-end; gap: 10px; flex-direction: row-reverse; pointer-events: none; }
.chat-dock > * { pointer-events: auto; }
.dock-bar { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--border); border-bottom: 0; border-radius: 12px 12px 0 0;
  background: var(--surface, var(--bg)); color: var(--text); font: 600 14px var(--font-ui); cursor: pointer; box-shadow: 0 -4px 16px rgba(0,0,0,.18); align-self: flex-end; }
.dock-dot { width: 8px; height: 8px; border-radius: 50%; background: #2e7d32; }
.dock-count:not(:empty) { background: #d32f2f; color: #fff; border-radius: 9px; min-width: 18px; padding: 0 5px; font-size: 11px; line-height: 18px; text-align: center; }
.dock-bar.flash { animation: chatflash 1s ease 3; }
.dock-panel, .dock-window { width: 300px; max-height: 420px; display: flex; flex-direction: column; border: 1px solid var(--border); border-bottom: 0; border-radius: 12px 12px 0 0;
  background: var(--bg); box-shadow: 0 -6px 24px rgba(0,0,0,.25); overflow: hidden; }
.dock-panel { position: absolute; right: 0; bottom: 40px; overflow-y: auto; }
.dock-window { height: 400px; margin-right: 0; }
.dock-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.dock-link { font-size: 12px; color: var(--accent); text-decoration: none; }
.dock-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; background: transparent; color: var(--text); text-align: left; cursor: pointer; font: 14px var(--font-ui); }
.dock-item:hover { background: var(--hover); }
.dock-item.unread .dock-name { font-weight: 700; }
.dock-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dock-name small { color: var(--text-2); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock-messages { flex: 1; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.dock-messages .msg-image img { max-width: 200px; max-height: 200px; }
.dock-compose { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
.dock-compose textarea { flex: 1; resize: none; padding: 8px 10px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
.dock-empty { padding: 12px; font-size: 13px; }
@media (max-width: 600px) { .chat-dock { right: 8px; } .dock-panel, .dock-window { width: calc(100vw - 16px); } .dock-window { position: absolute; right: 0; bottom: 40px; } }
.chat-dock [hidden] { display: none !important; }
.link-btn { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
/* Test cases (internal QA) */
.nav-label { margin: 14px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.qa { max-width: 1000px; }
.qa-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.qa-head h1 { margin: 0; }
.qa-back { display: inline-block; margin-bottom: 8px; color: var(--text-2); text-decoration: none; font-size: 14px; }
.qa-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.qa-head .qa-actions { margin: 0; }
.pill-btn.danger { color: var(--danger); }
.qa-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 16px 0 12px; }
.qa-tabs button { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 999px; padding: 6px 14px; font: 500 13px var(--font-ui); cursor: pointer; }
.qa-tabs button.active { background: var(--selected); color: var(--selected-text); border-color: transparent; }
.qa-tabs button span { opacity: .7; margin-left: 4px; }
.qa-runs { display: grid; gap: 10px; }
.qa-run { display: block; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.qa-run:hover { background: var(--hover); }
.qa-run-top { display: flex; justify-content: space-between; gap: 8px; }
.qa-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-2); margin: 10px 0 6px; }
.qa-bar span { display: block; height: 100%; }
.qa-bar .passed { background: #2e7d32; } .qa-bar .failed { background: #c62828; } .qa-bar .blocked { background: #ef6c00; } .qa-bar .skipped { background: #9e9e9e; }
.qa-count { font-size: 13px; color: var(--text-2); }
.qa-count .bad { color: #c62828; }
.qa-empty { padding: 28px; text-align: center; color: var(--text-2); border: 1px dashed var(--border); border-radius: var(--radius); }
.qa-note { margin: 12px 0; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); color: var(--text-2); font-size: 14px; }
.qa-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0; }
.qa-filters input, .qa-filters select, .qa-field input, .qa-field select, .qa-field textarea { height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: 14px var(--font-ui); }
.qa-filters input { flex: 1; min-width: 180px; }
.qa-field textarea { height: auto; padding: 8px 10px; resize: vertical; width: 100%; }
.qa-group { font-size: 16px; margin: 22px 0 8px; }
.qa-cases { display: grid; gap: 6px; }
.qa-case { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.qa-case.open { border-color: var(--accent); }
.qa-case-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 0; background: none; color: var(--text); font: 14px var(--font-ui); text-align: left; cursor: pointer; border-radius: var(--radius); }
.qa-case-row:hover { background: var(--hover); }
.qa-id { font: 600 12px var(--font-ui); color: var(--text-3); min-width: 52px; }
.qa-title { flex: 1; font-weight: 500; }
.qa-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.qa-tags span { font-size: 12px; color: var(--text-2); background: var(--surface-2); border-radius: 6px; padding: 2px 8px; }
.qa-prio { font: 700 11px var(--font-ui); padding: 2px 7px; border-radius: 6px; color: #fff; background: #757575; }
.qa-prio.P0 { background: #b71c1c; } .qa-prio.P1 { background: #e65100; } .qa-prio.P2 { background: #8a6a2b; } .qa-prio.P3 { background: #546e7a; } .qa-prio.P4 { background: #9e9e9e; }
.qa-status { font: 600 12px var(--font-ui); padding: 2px 9px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.qa-status.passed { background: #e8f5e9; color: #1b5e20; } .qa-status.failed { background: #ffebee; color: #b71c1c; } .qa-status.blocked { background: #fff3e0; color: #b33c00; }
[data-theme="dark"] .qa-status.passed { background: #1b3a1e; color: #a5d6a7; } [data-theme="dark"] .qa-status.failed { background: #3d1515; color: #ef9a9a; } [data-theme="dark"] .qa-status.blocked { background: #3d2a12; color: #ffcc80; }
@media (prefers-color-scheme: dark) { [data-theme="system"] .qa-status.passed { background: #1b3a1e; color: #a5d6a7; } [data-theme="system"] .qa-status.failed { background: #3d1515; color: #ef9a9a; } [data-theme="system"] .qa-status.blocked { background: #3d2a12; color: #ffcc80; } }
.qa-case-body { padding: 4px 16px 16px; border-top: 1px solid var(--border); }
.qa-pre { margin: 12px 0; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.qa-pre p { margin: 4px 0 0; white-space: pre-wrap; }
.qa-steps { margin: 12px 0; padding-left: 22px; display: grid; gap: 10px; }
.qa-steps li { font-size: 14px; }
.qa-step-do { white-space: pre-wrap; }
.qa-step-exp { margin-top: 4px; color: var(--text-2); white-space: pre-wrap; }
.qa-step-exp span { display: inline-block; margin-right: 6px; font: 700 11px var(--font-ui); text-transform: uppercase; letter-spacing: .05em; color: #2e7d32; }
.qa-result { display: grid; gap: 10px; margin-top: 8px; }
.qa-verdict { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.qa-btn { min-width: 84px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 14px var(--font-ui); cursor: pointer; }
.qa-btn.passed.on, .qa-btn.passed:hover { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.qa-btn.failed.on, .qa-btn.failed:hover { background: #c62828; color: #fff; border-color: #c62828; }
.qa-btn.blocked.on, .qa-btn.blocked:hover { background: #ef6c00; color: #fff; border-color: #ef6c00; }
.qa-btn.skipped.on, .qa-btn.skipped:hover { background: #757575; color: #fff; border-color: #757575; }
.qa-hist { font-size: 13px; color: var(--text-2); }
.qa-hist ul { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.qa-modal { width: min(680px, 100%); max-height: calc(100vh - 32px); overflow: auto; }
.qa-modal h2 { margin: 0; }
.qa-field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); flex: 1; min-width: 0; }
.qa-field .muted { font-weight: 400; }
.qa-row { display: flex; gap: 12px; flex-wrap: wrap; }
.qa-row > .qa-field { min-width: 200px; }
.qa-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-chip input { position: absolute; opacity: 0; pointer-events: none; }
.qa-chip span { display: inline-block; padding: 5px 11px; border: 1px solid var(--border); border-radius: 99px; font: 500 13px var(--font-ui); color: var(--text-2); cursor: pointer; }
.qa-chip input:checked + span { background: var(--selected); color: var(--selected-text); border-color: transparent; }
.qa-chip input:focus-visible + span { outline: 2px solid var(--accent); }
.qa-step-edit { display: grid; grid-template-columns: 1fr 1fr 32px; gap: 8px; margin-bottom: 8px; }
.qa-match { margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 640px) { .qa-step-edit { grid-template-columns: 1fr 32px; } .qa-step-edit textarea[name="expected"] { grid-column: 1; } .qa-tags { display: none; } }
/* Mobile app home */
.app-home { max-width: 640px; margin: 0 auto; padding: 24px 16px 40px; }
.app-home h1 { font-family: var(--font-brand); margin: 8px 0 20px; }
.app-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.app-home-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 8px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 500; font-size: 14px; }
.app-home-tile .icon { color: var(--accent); }
.app-home-tile:active { background: var(--hover); }
.in-app body { padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
/* Test cases glossary */
.qa-glossary { margin: 8px 0 14px; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 14px; }
.qa-glossary summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.qa-glossary h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 14px 0 6px; }
.qa-glossary dl { margin: 0; display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 6px 14px; }
.qa-glossary dt { font-weight: 600; }
.qa-glossary dd { margin: 0; color: var(--text-2); }
@media (max-width: 640px) { .qa-glossary dl { grid-template-columns: 1fr; } .qa-glossary dd { margin-bottom: 6px; } }
.help-dl { display: grid; grid-template-columns: minmax(150px, max-content) 1fr; gap: 6px 16px; } .help-dl dt { font-weight: 600; } .help-dl dd { margin: 0; } @media (max-width: 640px) { .help-dl { grid-template-columns: 1fr; } }
/* Phones: nothing may be wider than the screen. */
html, body { overflow-x: clip; }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .content, .sidebar { min-width: 0; }
  .sidebar .nav-item { flex-shrink: 0; white-space: nowrap; }
  .sidebar .nav-label { display: none; }
  .vault-top { flex-wrap: wrap; }
  .topbar { gap: 8px; padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(8px, env(safe-area-inset-right)); }
  .brand { min-width: 0; flex: 1 1 auto; flex-wrap: wrap; align-items: center; row-gap: 2px; gap: 8px; }
  .topbar-right { flex-shrink: 0; gap: 2px; }
  .topbar .icon-btn, .topbar .avatar-btn { width: 40px; height: 40px; }
  .help-link { font-size: 16px; padding: 0 6px; }
  .topbar .internal-flags { margin-left: 0; gap: 4px; }
}
@media (max-width: 480px) {
  .topbar .logo-sm { font-size: 19px; }
  .topbar .product-name { font-size: 17px; }
  /* The red flags move under the product name. */
  .brand .internal-flags { flex-basis: 100%; }
  .brand .internal-flags + .internal-flags { flex-basis: auto; }
  .topbar .internal-flag, .topbar .preview-flag { font-size: 9px; padding: 1px 6px; letter-spacing: .06em; }
}
/* Test runs: picking cases */
.qa-step { font-size: 15px; margin: 6px 0 0; color: var(--text); }
.qa-pick-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; margin-bottom: 6px; }
.qa-pick-head .link-btn { color: var(--accent); }
.qa-pick-list { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.qa-pick-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); font-size: 13px; cursor: pointer; }
.qa-pick-row:last-child { border-bottom: 0; }
.qa-pick-row .qa-title { flex: 1; min-width: 0; }
.qa-case.pickable { display: flex; align-items: flex-start; flex-wrap: wrap; }
.qa-case.pickable .qa-case-pick { margin: 15px 0 0 14px; width: 16px; height: 16px; }
.qa-case.pickable .qa-case-row { flex: 1; min-width: 0; width: auto; }
.qa-case.pickable .qa-case-body { flex-basis: 100%; }
.qa-pick-bar { position: sticky; top: 72px; z-index: 5; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; padding: 10px 14px; border-radius: var(--radius); background: var(--selected); color: var(--selected-text); }
.qa-pick-bar[hidden] { display: none; }
/* Vault: the selection actions float at the bottom so selecting never moves the list (double click needs the row to stay put). */
#vault-app .select-bar { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 40; margin: 0; max-width: calc(100vw - 32px); box-shadow: var(--shadow); border: 1px solid var(--border); background: var(--surface); }
@media (max-width: 760px) { #vault-app .select-bar { bottom: max(64px, calc(env(safe-area-inset-bottom) + 56px)); justify-content: center; } }
/* Dashboard */
.dash { max-width: 1180px; margin: 0 auto; padding: 8px 20px 40px; }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 8px 0 20px; }
.dash-head h1 { font-family: var(--font-brand); margin: 0; }
.dash-head p { margin: 4px 0 0; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; align-items: start; }
.dash-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 18px; min-width: 0; }
.dash-card.wide { grid-column: 1 / -1; }
.dash-card header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.dash-card h2 { font-size: 15px; margin: 0; }
.dash-more { font-size: 13px; color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
.dash-empty { color: var(--text-3); margin: 6px 0; }
.dash-big { font: 700 26px var(--font-brand); margin: 2px 0 6px; }
.dash-big .muted { font: 400 14px var(--font-ui); }
.dash-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.dash-apps a { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border-radius: 14px; color: var(--text); text-decoration: none; font-size: 13px; text-align: center; }
.dash-apps a:hover { background: var(--hover); }
.dash-apps .icon { color: var(--accent); }
.dash-row { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 10px; color: var(--text); text-decoration: none; }
.dash-row:hover { background: var(--hover); }
.dash-row .icon { color: var(--accent); flex-shrink: 0; }
.dash-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dash-row-main strong, .dash-row-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-row-main strong { font-weight: 600; font-size: 14px; }
.dash-row.unread strong { font-weight: 800; }
.dash-time { font-size: 12px; flex-shrink: 0; }
.dash-badge { background: #c62828; color: #fff; border-radius: 99px; font: 700 11px var(--font-ui); padding: 2px 7px; }
.dash-meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.dash-meter span { display: block; height: 100%; background: var(--accent); }
.dash-meter.full span { background: #c62828; }
.dash-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.dash-thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; background: var(--surface-2); }
.dash-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-chips a { padding: 6px 12px; border: 1px solid var(--border); border-radius: 99px; color: var(--text); text-decoration: none; font-size: 13px; }
.dash-chips a:hover { background: var(--hover); }
.dash-list { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); display: grid; gap: 4px; }
.dash-credit { font-size: 11px; margin: 10px 0 0; }
.dash-weather-now { display: flex; align-items: center; gap: 12px; }
.dash-weather-icon { font-size: 40px; line-height: 1; }
.dash-weather-next { display: flex; justify-content: space-between; gap: 6px; margin-top: 12px; }
.dash-weather-next span { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 13px; }
.dash-weather-next small { color: var(--text-3); }
.dash-news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.dash-news-list a { display: flex; gap: 10px; align-items: flex-start; color: var(--text); text-decoration: none; padding: 6px; border-radius: 10px; font-size: 14px; }
.dash-news-list a:hover { background: var(--hover); }
.dash-news-list img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.dash-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dash-pick label { display: flex; gap: 8px; align-items: center; font-size: 14px; }
@media (max-width: 640px) { .dash { padding: 4px 12px 32px; } .dash-grid { grid-template-columns: 1fr; } .dash-pick { grid-template-columns: 1fr; } }
/* Profile header, posts and new dashboard cards */
.pf-head { background: var(--surface); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; margin-bottom: 16px; padding-bottom: 16px; }
.pf-cover { height: 150px; }
.pf-id { display: flex; align-items: flex-end; gap: 16px; padding: 0 22px; margin-top: -48px; flex-wrap: wrap; }
.pf-avatar { width: 112px; height: 112px; border-radius: 50%; border: 5px solid var(--surface); object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font: 700 36px var(--font-brand); color: var(--accent); }
.pf-names { flex: 1; min-width: 180px; padding-bottom: 6px; }
.pf-names h1 { margin: 0; font-family: var(--font-brand); font-size: 26px; }
.pf-user { margin: 2px 0 0; color: var(--accent); font-weight: 600; }
.pf-bio { margin: 12px 22px 0; max-width: 680px; white-space: pre-wrap; }
.pf-meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 22px 0; color: var(--text-2); font-size: 14px; }
.pf-meta span { display: inline-flex; align-items: center; gap: 6px; }
.pf-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 22px 0; }
.pf-links a { padding: 5px 12px; border-radius: 99px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: 13px; }
.pf-claim { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 16px; background: var(--selected); color: var(--selected-text); margin-bottom: 14px; }
.pf-claim span { flex: 1; min-width: 200px; }
.pf-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; }
.pf-tabs button { border: 0; background: none; padding: 8px 16px; border-radius: 99px; font: 600 14px var(--font-ui); color: var(--text-2); cursor: pointer; }
.pf-tabs button.active { background: var(--selected); color: var(--selected-text); }
.pf-vis { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.dash-greet { font-family: var(--font-brand); margin: 0; font-size: 22px; }
.dash-private { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: -8px 0 12px; }
.pf-section { font-size: 17px; margin: 18px 0 10px; }
.pf-compose { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 12px; margin-bottom: 12px; }
.pf-compose textarea { width: 100%; border: 0; background: transparent; resize: vertical; font: 15px var(--font-ui); color: var(--text); outline: none; }
.pf-compose div { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-posts { display: grid; gap: 10px; max-width: 720px; }
.pf-post { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; }
.pf-post p { margin: 0 0 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pf-post footer { display: flex; justify-content: space-between; font-size: 12px; }
.pf-link-row { margin-bottom: 6px; }
.dash-notes { width: 100%; min-height: 120px; border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--bg); color: var(--text); font: 14px var(--font-ui); resize: vertical; }
.dash-saved { font-size: 12px; }
.dash-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.dash-shortcut { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 99px; padding-left: 12px; font-size: 13px; }
.dash-shortcut a { color: var(--text); text-decoration: none; }
.dash-shortcut .icon-btn { width: 28px; height: 28px; font-size: 16px; }
.dash-inline { display: flex; gap: 6px; flex-wrap: wrap; }
.dash-inline input, .dash-inline select { flex: 1; min-width: 100px; height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: 13px var(--font-ui); }
.dash-clocks { display: grid; gap: 4px; margin-bottom: 10px; }
.dash-clock { display: flex; align-items: center; gap: 10px; }
.dash-clock span { flex: 1; display: flex; flex-direction: column; font-weight: 600; font-size: 14px; }
.dash-clock small { color: var(--text-3); font-weight: 400; }
.dash-clock b { font: 700 20px var(--font-brand); }
.dash-clock .icon-btn { width: 28px; height: 28px; }
.chat-sub { display: block; font-size: 11px; color: var(--text-3); font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-people small { color: var(--text-3); }
.bad { color: #c62828; }
@media (max-width: 640px) { .pf-cover { height: 110px; } .pf-avatar { width: 88px; height: 88px; } .pf-id { padding: 0 14px; } .pf-bio, .pf-meta, .pf-links { margin-left: 14px; margin-right: 14px; } .pf-vis { margin-left: 0; } }
.dash-thumbs video { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; display: block; background: var(--surface-2); }
@media (max-width: 640px) { .pf-names { padding-top: 52px; } .pf-names h1 { font-size: 22px; } }
/* Dashboard: three columns with the feed in the middle */
.dash.wide { max-width: 1380px; }
.dash-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.dash-3col { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(250px, 300px); gap: 18px; align-items: start; }
.dash-side { display: grid; gap: 14px; min-width: 0; }
.dash-side .dash-private { margin: 0; }
.dash-feed { min-width: 0; max-width: 680px; width: 100%; justify-self: center; }
.dash-feed .pf-posts { max-width: none; }
@media (max-width: 1150px) { .dash-3col { grid-template-columns: minmax(0, 1fr) minmax(250px, 300px); } .dash-3col > .dash-side:first-child { grid-column: 2; grid-row: 1 / span 2; } .dash-feed { grid-column: 1; grid-row: 1; } .dash-3col > .dash-side:last-child { grid-column: 1 / -1; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
@media (max-width: 760px) { .dash-3col { grid-template-columns: 1fr; } .dash-3col > * { grid-column: 1 !important; grid-row: auto !important; } .dash-feed { order: -1; } .dash-3col > .dash-side:last-child { grid-template-columns: 1fr; } }
.pf-headline { margin: 4px 0 0; color: var(--text-2); }
.pf-available { background: #2e7d32; color: #fff; border-radius: 99px; padding: 2px 10px; font-size: 12px; font-weight: 600; }
.pf-actions { display: flex; gap: 8px; flex-wrap: wrap; padding-bottom: 6px; }
.pf-public { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; padding: 8px 10px; border-radius: 10px; background: #e8f5e9; color: #1b5e20; margin-bottom: 8px; }
[data-theme="dark"] .pf-public { background: #16301a; color: #a5d6a7; }
@media (prefers-color-scheme: dark) { [data-theme="system"] .pf-public { background: #16301a; color: #a5d6a7; } }
.pf-compose-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.pf-photo-btn { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.pill-btn.sm, .primary-btn.sm { padding: 4px 12px; font-size: 13px; height: auto; }
.pf-post-head { display: flex; gap: 10px; align-items: flex-start; position: relative; margin-bottom: 8px; }
.pf-post-head > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pf-post-head a { color: var(--text); text-decoration: none; }
.pf-post-head .muted { font-size: 12px; }
.pf-face { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--surface-2); display: inline-grid; place-items: center; font: 700 14px var(--font-brand); color: var(--accent); flex-shrink: 0; }
.pf-face.sm { width: 32px; height: 32px; font-size: 12px; }
.pf-more { width: 32px; height: 32px; }
.pf-menu { position: absolute; right: 0; top: 34px; z-index: 5; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow); padding: 4px; }
.pf-menu button { border: 0; background: none; padding: 8px 12px; cursor: pointer; color: var(--text); font: 14px var(--font-ui); }
.pf-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 8px; }
.pf-img { width: 100%; max-height: 640px; object-fit: contain; border-radius: 12px; background: var(--surface-2); display: block; margin-bottom: 8px; }
.pf-counts { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin: 4px 0; }
.pf-actions-bar { display: flex; gap: 4px; border-top: 1px solid var(--border); padding-top: 6px; }
.pf-act { flex: 1; border: 0; background: none; padding: 8px; border-radius: 10px; font: 600 14px var(--font-ui); color: var(--text-2); cursor: pointer; }
.pf-act:hover, .pf-act.on { background: var(--hover); color: var(--accent); }
.pf-react-wrap { flex: 1; display: flex; position: relative; }
.pf-react-pick { display: none; position: absolute; bottom: 100%; left: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; box-shadow: var(--shadow); padding: 4px; gap: 2px; }
.pf-react-wrap:hover .pf-react-pick, .pf-react-wrap:focus-within .pf-react-pick { display: flex; }
.pf-react-pick button { border: 0; background: none; font-size: 22px; cursor: pointer; padding: 2px 6px; border-radius: 99px; }
.pf-react-pick button:hover { background: var(--hover); transform: scale(1.15); }
.pf-comments { display: grid; gap: 8px; margin-top: 8px; }
.pf-comment { display: flex; gap: 8px; }
.pf-bubble { background: var(--surface-2); border-radius: 14px; padding: 6px 12px; }
.pf-bubble a { color: var(--text); text-decoration: none; font-size: 13px; }
.pf-bubble p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; }
.pf-cmeta { font-size: 11px; margin-left: 10px; }
.pf-comment-form { display: flex; gap: 6px; margin-top: 8px; }
.pf-comment-form input { flex: 1; height: 36px; border: 1px solid var(--border); border-radius: 99px; padding: 0 14px; background: var(--bg); color: var(--text); font: 14px var(--font-ui); }
.pf-sentinel { text-align: center; padding: 18px 0; }
.pf-public-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .pf-public-grid { grid-template-columns: 1fr; } }
.pf-box { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 14px 18px; margin-bottom: 14px; }
.pf-box h2 { font-size: 16px; margin: 0 0 10px; }
.pf-box .pf-bio { margin: 0; }
.pf-item { display: flex; flex-direction: column; padding: 8px 0; border-top: 1px solid var(--border); }
.pf-item:first-of-type { border-top: 0; }
.pf-item p { margin: 6px 0 0; white-space: pre-wrap; }
.pf-skills { display: flex; flex-wrap: wrap; gap: 6px; }
.pf-skills span { padding: 4px 12px; border-radius: 99px; background: var(--surface-2); font-size: 13px; }
.pf-entry { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; border: 1px dashed var(--border); border-radius: 10px; margin-bottom: 6px; }
.pf-entry textarea { grid-column: 1 / -1; }
.pf-check span { display: flex; gap: 8px; align-items: center; height: 38px; }
.dash-person { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.dash-person img, .dash-person-i { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--surface-2); display: inline-grid; place-items: center; font: 700 12px var(--font-brand); color: var(--accent); flex-shrink: 0; }
.dash-person a { color: var(--text); text-decoration: none; }
.dash-person-act { display: flex; gap: 4px; }
.dash-search { width: 100%; height: 36px; border: 1px solid var(--border); border-radius: 99px; padding: 0 14px; background: var(--bg); color: var(--text); font: 13px var(--font-ui); margin-bottom: 6px; }
.dash-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dash-stat { display: flex; flex-direction: column; }
.dash-stat b { font: 700 22px var(--font-brand); }
.dash-stat span { font-size: 12px; color: var(--text-2); }
.dash-checks { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; font-size: 14px; color: var(--text-2); }
.dash-checks li.ok { color: var(--text-3); text-decoration: line-through; }
.dash-thumbs.three { grid-template-columns: repeat(3, 1fr); }
.pf-menu[hidden] { display: none; }
/* Social, round 2 */
.pf-cover { position: relative; overflow: hidden; }
.pf-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-cover { height: 190px; }
.pf-id { position: relative; }
.pf-actions label.pill-btn { cursor: pointer; }
.dash-bar-actions { display: flex; gap: 8px; }
.pf-bell b { background: #c62828; color: #fff; border-radius: 99px; padding: 0 7px; font-size: 11px; margin-left: 4px; }
.pf-notes { position: relative; z-index: 30; max-width: 460px; margin: -6px 0 14px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 8px; max-height: 480px; overflow: auto; }
.pf-notes-head { padding: 6px 8px; }
.pf-note { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; font-size: 14px; }
.pf-note.unread { background: var(--selected); }
.pf-note > span:nth-child(2) { flex: 1; }
.pf-note small { display: block; }
.pf-filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 14px 0 10px; }
.pf-filters button { border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 99px; padding: 6px 14px; font: 600 13px var(--font-ui); cursor: pointer; }
.pf-filters button.active { background: var(--selected); color: var(--selected-text); border-color: transparent; }
.pf-tag { font-weight: 700; color: var(--accent); }
.pf-pinned { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.pf-removed { font-size: 13px; padding: 8px 10px; border-radius: 10px; background: #ffebee; color: #b71c1c; margin-bottom: 8px; }
.pf-post.removed { opacity: .75; }
.pf-bubble.removed { outline: 1px dashed #c62828; }
.pf-bubble small { color: #c62828; }
.pf-embed { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; background: var(--bg); }
.pf-mention, .pf-hashtag { color: var(--accent); font-weight: 600; text-decoration: none; }
.pf-edit { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 10px; font: 15px var(--font-ui); background: var(--bg); color: var(--text); }
.pf-menu button { display: block; width: 100%; text-align: left; white-space: nowrap; border-radius: 8px; }
.pf-menu button:hover { background: var(--hover); }
.pf-posts.narrow { max-width: 720px; }
.pf-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; }
.pf-photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }
.pf-people { display: grid; gap: 4px; max-width: 640px; }
.pf-skill { display: inline-flex; align-items: center; gap: 6px; }
.pf-skill b { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; font-size: 11px; }
.pf-skill .link-btn { font-size: 12px; color: var(--accent); }
.pf-about-own { margin-top: 18px; }
.pf-about-own summary { cursor: pointer; font-weight: 600; color: var(--accent); margin-bottom: 10px; }
.mod-item { border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; background: var(--surface); }
.mod-body { margin: 8px 0; padding: 8px 12px; border-left: 3px solid #c62828; background: var(--surface-2); white-space: pre-wrap; }
.mod-body img { display: block; max-width: 320px; margin-top: 8px; border-radius: 8px; }
.qa-tabs a.pill-btn.active { background: var(--selected); color: var(--selected-text); }
@media (max-width: 640px) { .pf-cover { height: 130px; } .pf-actions-bar { flex-wrap: wrap; } .pf-act { flex: 1 1 45%; } .pf-notes { max-width: none; } }
/* Round 3: viewers, audience, stories, albums, featured */
body.lb-open { overflow: hidden; }
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(0, 0, 0, .88); display: flex; align-items: center; justify-content: center; padding: 16px; }
.lb-close { position: absolute; top: 14px; left: 14px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .15); color: #fff; font-size: 18px; cursor: pointer; }
.lb-photo { width: min(1300px, 100%); height: min(860px, calc(100vh - 32px)); display: grid; grid-template-columns: minmax(0, 1fr) 380px; background: var(--surface); border-radius: 14px; overflow: hidden; }
.lb-media { background: #000; display: flex; align-items: center; justify-content: center; min-height: 0; }
.lb-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-side { padding: 16px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.lb-side .pf-actions-bar .pf-act { font-size: 20px; }
.lb-comments { display: grid; gap: 8px; flex: 1; align-content: start; }
.lb-owner { display: flex; gap: 6px; flex-wrap: wrap; }
.lb-owner.center { justify-content: center; margin-top: 16px; }
.lb-single { text-align: center; }
.lb-single img { max-width: min(1100px, 92vw); max-height: 78vh; border-radius: 12px; object-fit: contain; }
.lb-empty { color: #fff; padding: 60px; font-size: 18px; }
.lb-card { background: var(--surface); color: var(--text); border-radius: 18px; padding: 20px; width: min(460px, 100%); display: grid; gap: 10px; }
.lb-card h2 { margin: 0; }
.lb-choice { text-align: left; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 12px; padding: 10px 14px; font: 600 15px var(--font-ui); cursor: pointer; display: grid; gap: 2px; }
.lb-choice:hover { background: var(--hover); }
.lb-choice small { font-weight: 400; color: var(--text-2); }
.pf-avatar-btn { border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; }
.pf-cover[data-view-cover] { cursor: pointer; }
.pf-audience { height: 34px; border: 1px solid var(--border); border-radius: 99px; padding: 0 10px; background: var(--bg); color: var(--text); font: 600 13px var(--font-ui); }
.pf-public.private { background: var(--surface-2); color: var(--text-2); }
.pf-featured { display: flex; gap: 8px; margin: 14px 22px 0; overflow-x: auto; }
.pf-featured img { width: 110px; height: 140px; object-fit: cover; border-radius: 12px; cursor: pointer; flex-shrink: 0; }
.pf-img { cursor: zoom-in; }
.pf-photos img { cursor: zoom-in; }
.pf-photos.small { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); margin-top: 8px; }
.pf-album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pf-album { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.pf-album-cover { aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: var(--surface-2); margin-bottom: 6px; }
.pf-album-cover img { width: 100%; height: 100%; object-fit: cover; }
.st-bar { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; }
.st-item { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 6px; font: 600 12px var(--font-ui); color: var(--text-2); cursor: pointer; flex-shrink: 0; width: 84px; }
.st-ring { width: 76px; height: 108px; border-radius: 14px; position: relative; display: flex; align-items: flex-start; justify-content: flex-start; padding: 6px; border: 3px solid var(--border); box-sizing: border-box; background: var(--surface-2); }
.st-ring.new { border-color: var(--accent); }
.st-ring.add { align-items: center; justify-content: center; font-size: 32px; color: var(--accent); background: var(--surface); border-style: dashed; }
.st-face { border: 2px solid #fff; }
.lb-stories { background: #000; }
.st-view { position: relative; width: min(420px, 100%); height: min(760px, calc(100vh - 32px)); border-radius: 16px; overflow: hidden; background: #111; color: #fff; }
.st-progress { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 4px; z-index: 2; }
.st-progress span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .35); }
.st-progress span.done { background: #fff; }
.st-progress span.now { background: linear-gradient(90deg, #fff 0, #fff 0) no-repeat, rgba(255, 255, 255, .35); animation: st-fill 6s linear forwards; background-size: 0 100%; }
@keyframes st-fill { to { background-size: 100% 100%; } }
.st-head { position: absolute; top: 22px; left: 12px; right: 12px; z-index: 2; display: flex; align-items: center; gap: 8px; font-size: 14px; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.st-head span { opacity: .8; }
.st-body { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.st-body img { max-width: 100%; max-height: 100%; object-fit: contain; }
.st-body p { font: 700 26px var(--font-brand); text-align: center; padding: 24px; margin: 0; white-space: pre-wrap; }
.st-body p.cap { position: absolute; bottom: 60px; left: 12px; right: 12px; font-size: 18px; background: rgba(0,0,0,.45); border-radius: 12px; padding: 10px; }
.st-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.2); color: #fff; font-size: 26px; cursor: pointer; }
.st-nav.prev { left: 8px; } .st-nav.next { right: 8px; }
.st-foot { position: absolute; bottom: 12px; left: 12px; right: 12px; z-index: 2; display: flex; justify-content: space-between; }
.st-foot .link-btn { color: #fff; }
.st-new textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; padding: 10px; background: var(--bg); color: var(--text); font: 15px var(--font-ui); }
.st-colors { display: flex; gap: 8px; }
.st-colors input { display: none; }
.st-colors span { display: block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; }
.st-colors input:checked + span { border-color: var(--text); }
@media (max-width: 900px) { .lb-photo { grid-template-columns: 1fr; grid-template-rows: minmax(0, 55%) 1fr; } }
/* Communities, Showcases, Shop, invitations */
.hub-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.hub-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.hub-nav a.active, .hub-nav a:hover { background: var(--selected); color: var(--selected-text); border-color: transparent; }
.hub-nav .icon { color: var(--accent); }
.hub-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.hub-head h1 { margin: 0; font-family: var(--font-brand); }
.hub-head p { margin: 4px 0 0; }
.hub-search { max-width: 320px; margin: 0; }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 8px; }
.hub-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; color: var(--text); text-decoration: none; padding-bottom: 12px; }
.hub-card > *:not(.hub-cover) { margin: 0 14px; }
.hub-card p { font-size: 13px; color: var(--text-2); margin-top: 4px !important; }
.hub-card:hover { border-color: var(--accent); }
.hub-cover { display: block; height: 70px; margin-bottom: 8px; }
.hub-badge { align-self: flex-start; font-size: 11px; font-weight: 700; text-transform: uppercase; background: var(--selected); color: var(--selected-text); border-radius: 6px; padding: 2px 8px; }
.hub-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 14px 22px 0; }
.hub-title h1 { margin: 0; font-family: var(--font-brand); }
.hub-title p { margin: 4px 0 0; }
.pf-ctx { color: var(--accent); font-weight: 600; text-decoration: none; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.shop-card { display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; }
.shop-card img, .shop-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; background: var(--surface-2); display: grid; place-items: center; font-size: 40px; margin-bottom: 6px; }
.shop-card b { font-size: 16px; }
.shop-card span { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-item { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.shop-main { width: 100%; max-height: 560px; object-fit: contain; background: #000; border-radius: 16px; }
.shop-thumbs { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; }
.shop-thumbs img { width: 70px; height: 70px; object-fit: cover; border-radius: 10px; cursor: pointer; }
.shop-noimg.big { aspect-ratio: 4 / 3; font-size: 80px; }
.shop-info h1 { margin: 0; }
.shop-price { font: 800 26px var(--font-brand); margin: 6px 0; }
.shop-thread { border-top: 1px solid var(--border); padding: 10px 0; display: grid; gap: 6px; }
.shop-msg { max-width: 80%; background: var(--surface-2); border-radius: 14px; padding: 8px 12px; font-size: 14px; white-space: pre-wrap; }
.shop-msg.mine { justify-self: end; background: var(--selected); color: var(--selected-text); }
.shop-msg small { display: block; font-size: 11px; opacity: .7; }
.shop-safety { font-size: 12px; }
.dash-shop { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.dash-shop a { display: flex; flex-direction: column; color: var(--text); text-decoration: none; font-size: 12px; }
.dash-shop img, .dash-shop-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 28px; }
.dash-shop span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-invite-out input { width: 100%; margin-top: 6px; height: 32px; border: 1px solid var(--border); border-radius: 8px; padding: 0 8px; background: var(--bg); color: var(--text); }
.invite-banner { background: var(--selected); color: var(--selected-text); border-radius: 12px; padding: 10px 14px; }
.waitlist-form { display: grid; gap: 8px; margin: 14px 0; }
.waitlist-form input { height: 44px; border: 1px solid var(--border); border-radius: 12px; padding: 0 12px; font: 15px var(--font-ui); background: var(--surface); color: var(--text); }
@media (max-width: 800px) { .shop-item { grid-template-columns: 1fr; } }
/* Public website */
body.site { background: var(--bg); }
.site-nav { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 12px max(16px, calc((100vw - 1180px) / 2)); background: var(--bg); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.site-nav nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.site-nav nav a { padding: 6px 12px; border-radius: 99px; color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 14px; }
.site-nav nav a:hover, .site-nav nav a.active { background: var(--hover); color: var(--text); }
.site-main { max-width: 1180px; margin: 0 auto; padding: 0 16px 40px; }
.site-hero { position: relative; overflow: hidden; text-align: center; padding: 80px 16px 60px; }
.site-hero h1 { font: 800 clamp(32px, 6vw, 58px)/1.08 var(--font-brand); margin: 0 0 16px; position: relative; }
.site-hero p { max-width: 680px; margin: 0 auto 18px; font-size: 18px; color: var(--text-2); position: relative; }
.site-cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; position: relative; }
.site-band { padding: 36px 0; border-top: 1px solid var(--border); }
.site-band h2 { font: 700 26px var(--font-brand); margin: 0 0 8px; }
.site-band.two { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; }
.site-grid.three { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.site-card { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.site-card span { color: var(--text-2); font-size: 14px; }
a.site-card:hover { border-color: var(--accent); }
.site-tag { font-size: 11px !important; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--accent) !important; }
.site-list { padding-left: 18px; color: var(--text-2); display: grid; gap: 4px; }
.site-page { max-width: 820px; margin: 32px auto; line-height: 1.7; }
.site-page h1 { font: 800 36px/1.15 var(--font-brand); }
.site-lead { font-size: 19px; color: var(--text-2); }
.site-article h2 { margin-top: 28px; }
.site-form { display: grid; gap: 12px; max-width: 560px; }
.site-form label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.site-form input, .site-form select, .site-form textarea { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font: 15px var(--font-ui); background: var(--surface); color: var(--text); }
.site-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.site-foot { max-width: 1180px; margin: 0 auto; padding: 32px 16px 48px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 24px; }
.site-foot div { display: flex; flex-direction: column; gap: 6px; }
.site-foot a:not(.logo) { color: var(--text-2); text-decoration: none; font-size: 14px; }
.site-foot a:hover { color: var(--text); }
@media (max-width: 760px) { .site-band.two { grid-template-columns: 1fr; } .site-foot { grid-template-columns: 1fr 1fr; } .site-nav nav { order: 3; width: 100%; } }

/* Legal center */
.legal-page h3 { margin: 18px 0 6px; font-size: 17px; }
.legal-page table.price-table { width: 100%; font-size: 14px; }
.legal-page table.price-table td, .legal-page table.price-table th { vertical-align: top; }
.legal-toc { border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; margin: 18px 0 8px; background: var(--surface); }
.legal-toc ol { margin: 6px 0 0; padding-left: 20px; columns: 2; column-gap: 28px; font-size: 14px; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; }
.legal-nav a[aria-current] { font-weight: 600; text-decoration: underline; }
.legal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 20px 0; }
.legal-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text) !important; text-decoration: none; line-height: 1.45; }
.legal-tile:hover { border-color: var(--accent); }
.legal-tile span { color: var(--text-2); font-size: 13.5px; }
.legal-faq dt { font-weight: 600; margin-top: 12px; }
.legal-faq dd { margin: 4px 0 0; color: var(--text-2); }
@media (max-width: 640px) { .legal-toc ol { columns: 1; } }

/* ===== Header switches (language, currency, light/dark) ===== */
.list-pop { width: 260px; max-height: min(420px, 70vh); overflow-y: auto; padding: 6px; }
.list-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 8px; color: var(--text); font: inherit; cursor: pointer; }
.list-pop button:hover, .list-pop button[aria-checked="true"] { background: var(--selected); color: var(--selected-text); }
.currency-btn span { font: 700 11px var(--font-ui); letter-spacing: .02em; }
.theme-toggle .theme-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .theme-sun { display: inline-flex; }
:root[data-theme="dark"] .theme-toggle .theme-moon { display: none; }
@media (prefers-color-scheme: dark) { :root[data-theme="system"] .theme-toggle .theme-sun { display: inline-flex; } :root[data-theme="system"] .theme-toggle .theme-moon { display: none; } }
.profile-pop-actions { display: grid; gap: 8px; margin: 14px 0 8px; }
.profile-pop-actions .pill-btn { justify-content: center; display: inline-flex; align-items: center; gap: 8px; }
.verified-mark { display: inline-block; vertical-align: -3px; margin-left: 6px; flex: none; }
@media (max-width: 640px) { .topbar-actions .currency-btn, .topbar-actions [data-popover="lang-pop"] { display: none; } }

/* ===== Profile header: name never touches the cover ===== */
.pf-cover { height: 210px; }
.pf-id { margin-top: 0; align-items: flex-start; gap: 18px; padding: 0 24px; }
.pf-avatar-wrap { position: relative; margin-top: -64px; flex: none; border-radius: 50%; }
.pf-avatar { width: 128px; height: 128px; }
.pf-names { padding: 14px 0 0; min-width: 200px; }
.pf-names h1 { font-size: 28px; line-height: 1.2; display: flex; align-items: center; flex-wrap: wrap; gap: 0; }
.pf-actions { padding: 16px 0 0; margin-left: auto; align-self: flex-start; }
.pf-cover-btn { position: absolute; right: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; backdrop-filter: blur(6px); z-index: 2; }
.pf-cover-btn:hover { background: rgba(0,0,0,.72); }
.pf-avatar-cam { position: absolute; right: 6px; bottom: 6px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 3px solid var(--surface); color: var(--text); cursor: pointer; z-index: 3; }
.pf-avatar-cam:hover { background: var(--hover); }
.pf-status { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 5px 12px; border-radius: 99px; background: var(--surface-2); font-size: 14px; max-width: 100%; }
.pf-status.empty { color: var(--text-3); border: 1px dashed var(--border); background: none; }
.pf-status[role="button"] { cursor: pointer; }
.pf-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 24px 0; font-size: 14px; color: var(--text-2); }
.pf-facts span { display: inline-flex; align-items: center; gap: 6px; }
.pf-facts b { color: var(--text); font-weight: 600; }
.pf-meta { margin: 10px 24px 0; }
.pf-badges { display: flex; gap: 8px; align-items: center; padding: 16px 0 0; flex-wrap: wrap; }
.pf-badge { width: 46px; height: 46px; padding: 0; border: 0; background: none; cursor: pointer; transition: transform .15s; filter: drop-shadow(0 3px 6px rgba(0,0,0,.25)); }
.pf-badge:hover { transform: translateY(-2px) scale(1.06); }
.pf-badge svg, .dash-badge svg, .badge-tile svg, .badge-art-cell svg { width: 100%; height: 100%; display: block; }
@media (max-width: 760px) {
  .pf-cover { height: 150px; }
  .pf-id { padding: 0 16px; gap: 10px; }
  .pf-avatar-wrap { margin-top: -54px; }
  .pf-avatar { width: 104px; height: 104px; }
  .pf-names { width: 100%; padding-top: 4px; }
  .pf-names h1 { font-size: 23px; }
  .pf-actions { margin-left: 0; padding-top: 6px; }
  .pf-facts, .pf-meta { margin-left: 16px; margin-right: 16px; }
}

/* ===== Photo frames ===== */
.pf-avatar-wrap[class*="frame-"]:not(.frame-none)::before { content: ''; position: absolute; inset: -7px; border-radius: 50%; z-index: 0; pointer-events: none; }
.pf-avatar-wrap > * { position: relative; z-index: 1; }
.pf-avatar-wrap::after { position: absolute; z-index: 2; pointer-events: none; font-size: 22px; line-height: 1; }
.frame-aurora::before { background: conic-gradient(from 0deg, #ff6b9a, #ffb86b, #f7f36b, #6bf7b0, #6bc8ff, #b86bff, #ff6b9a); animation: frame-spin 6s linear infinite; }
.frame-gold::before { background: conic-gradient(#8a5a12, #ffe9a8, #e0a33a, #fff3c9, #8a5a12, #e0a33a, #ffe9a8, #8a5a12); }
.frame-gold::after { content: '🌿'; left: -10px; bottom: 6px; transform: rotate(-30deg); }
.frame-bloom::before { background: conic-gradient(#ff9ec7, #ffd1e4, #ff7eb6, #ffe0ee, #ff9ec7); }
.frame-bloom::after { content: '🌸'; right: -6px; top: -2px; }
.frame-ocean::before { background: conic-gradient(#0d6b74, #57cbd5, #bff0f4, #1d5fa6, #0d6b74); }
.frame-ocean::after { content: '🌊'; left: -8px; bottom: 2px; }
.frame-neon::before { background: conic-gradient(#00f5d4, #9b5de5, #f15bb5, #fee440, #00f5d4); filter: blur(.5px) saturate(1.3); box-shadow: 0 0 18px rgba(155, 93, 229, .55); animation: frame-spin 4s linear infinite; }
.frame-harvest::before { background: conic-gradient(#f28c28, #1a1208, #f2a541, #3a2410, #f28c28); }
.frame-harvest::after { content: '🎃'; right: -8px; bottom: 0; }
.frame-class2026::before { background: conic-gradient(#e0a33a, #1b3a4b, #3fd0c9, #1b3a4b, #e0a33a); }
.frame-class2026::after { content: '✦'; color: #ffe9a8; right: 2px; top: -2px; text-shadow: 0 0 6px #e0a33a; }
.frame-festive::before { background: repeating-conic-gradient(#c62828 0 15deg, #2e7d32 15deg 30deg); }
.frame-festive::after { content: '🎄'; left: -8px; bottom: 0; }
@keyframes frame-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .frame-aurora::before, .frame-neon::before { animation: none; } }
.frame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px; }
.frame-opt { display: grid; justify-items: center; gap: 10px; padding: 16px 8px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; color: var(--text); font: inherit; font-size: 13px; }
.frame-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; }
.frame-opt .pf-avatar { width: 64px; height: 64px; border-width: 3px; font-size: 22px; }
.frame-opt .pf-avatar-wrap { margin: 0; }

/* ===== Dashboard: sections nav, Atlas, edit mode ===== */
.hub-nav { gap: 8px; }
.atlas-title { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; font: 700 18px var(--font-brand); margin: 0 0 10px; }
.atlas-title .icon { color: var(--accent); align-self: center; }
.atlas-title .muted { font: 400 13px var(--font-ui); }
.dash-grip { display: none; color: var(--text-3); margin-right: 2px; }
.dash-card header { justify-content: flex-start; }
.dash-card header > :last-child:not(h2) { margin-left: auto; }
.dash-editing .dash-grip { display: inline-flex; }
.dash-editing .dash-card > header { cursor: grab; touch-action: none; user-select: none; }
.dash-editing .dash-card { outline: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.dash-editing .dash-side { min-height: 120px; padding: 6px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 6%, transparent); }
.dash-editing .dash-clock { cursor: grab; touch-action: none; }
.dash-edit-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin: 0 0 14px; border-radius: 14px; background: var(--selected); color: var(--selected-text); font-size: 14px; }
.dash-edit-note .primary-btn { margin-left: auto; }
.sort-placeholder { border: 2px dashed var(--accent); border-radius: 16px; background: color-mix(in srgb, var(--accent) 8%, transparent); list-style: none; }
.sort-dragging { box-shadow: 0 18px 40px rgba(0,0,0,.25); opacity: .95; transform: rotate(1deg); }
body.sorting { user-select: none; cursor: grabbing; }
.dash-card.wg { border-top: 4px solid var(--wc, var(--accent)); }
.wg-note { white-space: normal; margin: 0; line-height: 1.55; }
.wg-count { display: grid; gap: 4px; }
.wg-count b { font: 800 26px var(--font-brand); color: var(--accent); }
.wg-check { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.wg-check input:checked + span { text-decoration: line-through; color: var(--text-3); }
.wg-quote { margin: 0; font: 600 16px/1.5 var(--font-brand); }
.wg-quote cite { display: block; margin-top: 6px; font: 400 13px var(--font-ui); color: var(--text-2); }
.wg-counter { display: flex; align-items: center; gap: 10px; }
.wg-counter b { font: 800 30px var(--font-brand); min-width: 60px; text-align: center; }
.wg-img { margin: 0; }
.wg-img img { width: 100%; border-radius: 12px; display: block; cursor: zoom-in; }
.wg-img figcaption { font-size: 13px; color: var(--text-2); margin-top: 6px; }
.dash-checks a { color: var(--text); text-decoration: none; }
.dash-checks a:hover { color: var(--accent); }
.dash-done summary { cursor: pointer; font-size: 13px; color: var(--text-2); margin-top: 6px; }
.dash-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 10px; }
.dash-badge { display: grid; justify-items: center; gap: 6px; padding: 8px 4px; border: 0; background: none; cursor: pointer; color: var(--text); font-size: 12px; text-align: center; }
.dash-badge svg { width: 54px; height: 54px; }
.dash-badge.locked svg { filter: grayscale(1) opacity(.35); }
.badge-view { text-align: center; }
.badge-view-art svg { width: 140px; height: 140px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.3)); }
.soon-view { text-align: center; }
.soon-ico { font-size: 44px; }
.st-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.set-emoji { width: 64px; text-align: center; font-size: 20px; }

/* Habits */
.hb-head, .hb-row { display: grid; grid-template-columns: minmax(0, 1fr) repeat(7, 26px) 28px 22px; gap: 4px; align-items: center; }
.hb-head small { text-align: center; color: var(--text-3); font-size: 11px; }
.hb-row { padding: 4px 0; }
.hb-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.hb-day { width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--border); background: var(--surface-2); cursor: pointer; padding: 0; }
.hb-day.today { border-color: var(--accent); }
.hb-day.on { background: var(--accent); border-color: var(--accent); }
.hb-day.on::after { content: '✓'; color: var(--on-accent); font-size: 13px; font-weight: 700; }
.hb-streak { text-align: center; font-size: 13px; }
.hb-del { opacity: 0; }
.hb-row:hover .hb-del, .hb-row:focus-within .hb-del { opacity: 1; }
.hb-sum { margin: 8px 0 0; }

/* Calendar card */
.dash-cal-month b { display: block; margin-bottom: 6px; font-size: 14px; }
.cal-mini-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: 12px; }
.cal-mini-grid > * { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; color: var(--text); text-decoration: none; border: 0; background: none; font: inherit; cursor: pointer; position: relative; }
.cal-mini-grid > span { cursor: default; }
.cal-mini-grid .out { color: var(--text-3); }
.cal-mini-grid .today { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.cal-mini-grid .sel:not(.today) { background: var(--selected); color: var(--selected-text); }
.cal-mini-grid .busy:not(.today)::after { content: ''; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.cal-mini-grid a:hover, .cal-mini-grid button:hover { background: var(--hover); }
.dash-cal-list { margin-top: 10px; display: grid; gap: 2px; }
.cal-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

/* Shops (stores) */
.store-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; margin-bottom: 18px; }
.store-head h1 { margin: 0; }
.store-logo { width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; font: 800 32px var(--font-brand); color: var(--on-accent); background: linear-gradient(135deg, var(--brand-a), var(--brand-c)); }
.store-actions { margin-left: auto; display: flex; gap: 8px; }
.store-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.store-item { display: grid; gap: 4px; padding: 10px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; position: relative; }
.store-item img, .store-noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; font-size: 36px; }
.store-item em { position: absolute; top: 16px; left: 16px; background: var(--danger); color: #fff; font-style: normal; font-size: 12px; padding: 2px 8px; border-radius: 99px; }

/* Profile extra sections */
.pf-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
.pf-dl dt { color: var(--text-2); }
.pf-dl dd { margin: 0; }
.aud-chip { font-size: 11px; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-2); }
.pf-int h3, .pf-box h3 { font-size: 13px; color: var(--text-2); margin: 12px 0 6px; text-transform: uppercase; letter-spacing: .04em; }
.pf-chip-link { display: inline-block; padding: 5px 12px; border-radius: 99px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: 14px; }
.pf-chip-link:hover { background: var(--selected); color: var(--selected-text); }
.pf-watch-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pf-watch { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pf-watch.finished b { color: var(--text-2); }
.pf-watch-s { margin-left: auto; font-size: 12px; color: var(--accent); }
.pf-watch.finished .pf-watch-s { color: var(--text-3); }

/* ===== Settings ===== */
.settings { max-width: 860px; display: grid; gap: 26px; padding-bottom: 40px; }
.set-sec { scroll-margin-top: 80px; }
.set-sec > h2 { font: 700 22px var(--font-brand); margin: 0 0 12px; }
.set-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; margin-bottom: 14px; }
.set-card h3 { margin: 0 0 6px; font-size: 16px; }
.set-card h3 + .muted { margin-top: 0; }
.set-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.set-row input:not([type=checkbox]):not([type=radio]), .set-row select, .set-grid input, .set-grid select, .aud-custom { padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; min-width: 0; }
.set-row input[name=text], .set-row input[name=w_title] { flex: 1; min-width: 160px; }
.set-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: end; }
.set-grid.one { grid-template-columns: 1fr; }
.set-grid label { display: grid; gap: 4px; font-size: 14px; color: var(--text-2); }
.aud-sel { padding: 6px 8px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; }
.aud-custom { display: block; margin-top: 6px; width: 100%; font-size: 13px; }
.set-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.set-modes { display: flex; gap: 12px; flex-wrap: wrap; }
.set-mode { display: grid; gap: 8px; justify-items: center; cursor: pointer; font-size: 14px; }
.set-mode input { position: absolute; opacity: 0; }
.set-mode-prev { width: 120px; height: 76px; border-radius: 12px; border: 2px solid var(--border); background: linear-gradient(#f7f4ee 0 30%, #fffdf9 30%); }
.set-mode.dark .set-mode-prev { background: linear-gradient(#0e0e0f 0 30%, #17171a 30%); }
.set-mode.system .set-mode-prev { background: linear-gradient(90deg, #f7f4ee 50%, #0e0e0f 50%); }
.set-mode input:checked + .set-mode-prev { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.palette-opt { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); cursor: pointer; text-align: left; color: var(--text); font: inherit; }
.palette-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.palette-logo { font: 800 22px var(--font-brand); color: transparent; letter-spacing: -.02em; }
.palette-sw { display: flex; gap: 6px; }
.palette-sw i { width: 22px; height: 22px; border-radius: 50%; display: block; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); }
.set-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.set-sort { list-style: none; padding: 6px; margin: 8px 0 0; border: 1px dashed var(--border); border-radius: 14px; min-height: 60px; display: grid; gap: 6px; }
.set-card-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--surface-2); border-radius: 10px; }
.sort-handle { cursor: grab; touch-action: none; color: var(--text-3); padding: 2px 4px; user-select: none; }
.set-toggle { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.set-toggle:last-child { border: 0; }
.set-links { display: flex; flex-wrap: wrap; gap: 8px; }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.pill-btn.danger, .primary-btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); }
.act-list { list-style: none; padding: 0; margin: 10px 0; display: grid; }
.act-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: 14px; }
.act-list label { display: flex; gap: 8px; align-items: flex-start; min-width: 0; }
.act-text { overflow-wrap: anywhere; }
.act-list time { white-space: nowrap; font-size: 12px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.badge-tile { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 18px 14px; border: 1px solid var(--border); border-radius: 16px; background: var(--bg); }
.badge-tile svg { width: 96px; height: 96px; }
.badge-tile.locked svg { filter: grayscale(1) opacity(.35); }
.badge-tile .dash-meter { width: 100%; }
.badges-admin .badge-art-cell { width: 54px; height: 54px; }
.badges-admin form { display: inline-flex; gap: 6px; margin: 2px; flex-wrap: wrap; }
@media (max-width: 700px) { .set-cols, .set-grid { grid-template-columns: 1fr; } }

/* ===== Calendar app ===== */
.cal-page .content, .cal-page main.cal-app { max-width: none; }
.cal-app { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; padding: 14px 18px 24px; min-height: calc(100vh - 64px); }
.cal-side { display: grid; gap: 16px; align-content: start; }
.cal-create { justify-self: start; padding: 12px 22px; border-radius: 16px; font-size: 15px; box-shadow: var(--shadow); }
.cal-mini-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-size: 14px; }
.cal-cals-head { display: flex; justify-content: space-between; align-items: center; }
.cal-cals ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 2px; }
.cal-cals li { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 4px 6px; border-radius: 8px; font-size: 14px; }
.cal-cals li:hover { background: var(--hover); }
.cal-cals li label { display: flex; align-items: center; gap: 8px; cursor: pointer; min-width: 0; }
.cal-cals input[type=checkbox] { width: 16px; height: 16px; }
.cal-io { font-size: 13px; }
.cal-keys { font-size: 12px; line-height: 1.8; }
.cal-keys kbd { font: 600 11px var(--font-ui); padding: 1px 5px; border-radius: 5px; border: 1px solid var(--border); background: var(--surface); }
.icon-btn.sm { width: 28px; height: 28px; font-size: 14px; }
.cal-main { min-width: 0; display: flex; flex-direction: column; }
.cal-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-title { font: 600 22px var(--font-brand); margin: 0 auto 0 6px; }
.cal-nav { display: inline-flex; gap: 2px; }
.cal-nav .icon-btn { font-size: 22px; }
.cal-views { display: inline-flex; border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.cal-views button { border: 0; background: none; padding: 8px 14px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.cal-views button[aria-selected="true"] { background: var(--selected); color: var(--selected-text); font-weight: 600; }
.cal-view { flex: 1; min-height: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; }
.cal-chip { display: flex; gap: 4px; width: 100%; text-align: left; padding: 2px 6px; border: 0; border-radius: 6px; font: inherit; font-size: 12px; line-height: 1.5; cursor: pointer; color: var(--text); background: color-mix(in srgb, var(--c) 18%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.allday { background: var(--c); color: #fff; }
.cal-chip-t { color: var(--text-2); flex: none; }
.cal-chip.pending { background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--c) 18%, transparent) 6px 12px); outline: 1px dashed var(--c); }
.cal-chip span:last-child { overflow: hidden; text-overflow: ellipsis; }
.cal-month { display: grid; grid-template-rows: auto 1fr; height: 100%; min-height: 640px; }
.cal-mh, .cal-mg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-mh span { padding: 8px; font-size: 12px; text-align: center; color: var(--text-2); border-bottom: 1px solid var(--border); text-transform: uppercase; }
.cal-mg { grid-template-rows: repeat(6, 1fr); }
.cal-cell { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4px; display: flex; flex-direction: column; gap: 2px; min-height: 100px; min-width: 0; cursor: pointer; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.out { background: color-mix(in srgb, var(--surface-2) 45%, transparent); }
.cal-cell.out .cal-daynum { color: var(--text-3); }
.cal-daynum { align-self: center; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; width: 26px; height: 26px; border-radius: 50%; cursor: pointer; color: var(--text); white-space: nowrap; }
.cal-cell.today .cal-daynum { background: var(--accent); color: var(--on-accent); width: auto; padding: 0 8px; border-radius: 99px; }
.cal-more { font-size: 12px; text-align: left; }
.cal-grid { display: grid; grid-template-rows: auto auto 1fr; height: calc(100vh - 170px); min-height: 520px; }
.cal-gh, .cal-ad { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.cal-tz { font-size: 10px; color: var(--text-3); align-self: end; padding: 4px; }
.cal-gday { display: grid; justify-items: center; padding: 8px 0; border: 0; background: none; cursor: pointer; color: var(--text); font: inherit; }
.cal-gday small { font-size: 11px; color: var(--text-2); text-transform: uppercase; }
.cal-gday b { font: 600 22px var(--font-brand); width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.cal-gday.today b { background: var(--accent); color: var(--on-accent); }
.cal-ad > span { font-size: 10px; padding: 4px; align-self: center; }
.cal-adcell { border-left: 1px solid var(--border); padding: 2px; display: grid; gap: 2px; min-height: 26px; align-content: start; cursor: pointer; }
.cal-scroll { overflow-y: auto; position: relative; }
.cal-body { display: grid; grid-template-columns: 56px repeat(var(--days), minmax(0, 1fr)); position: relative; }
.cal-hours span { display: block; height: 48px; font-size: 11px; color: var(--text-3); text-align: right; padding-right: 6px; transform: translateY(-7px); }
.cal-col { position: relative; border-left: 1px solid var(--border); touch-action: none; }
.cal-col.today { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.cal-slot { height: 48px; border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent); }
.cal-slot.off { background: color-mix(in srgb, var(--surface-2) 40%, transparent); }
.cal-ev { position: absolute; border-radius: 8px; padding: 3px 7px; font-size: 12px; line-height: 1.3; overflow: hidden; background: color-mix(in srgb, var(--c) 85%, #000 0%); color: #fff; cursor: pointer; border: 1px solid color-mix(in srgb, var(--c) 70%, #000); box-shadow: 0 1px 2px rgba(0,0,0,.15); user-select: none; z-index: 2; }
.cal-ev b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev span { opacity: .9; font-size: 11px; }
.cal-ev.pending { background: repeating-linear-gradient(135deg, var(--c) 0 6px, color-mix(in srgb, var(--c) 70%, #fff) 6px 12px); }
.cal-ev.ghost { background: color-mix(in srgb, var(--accent) 35%, transparent); border: 2px dashed var(--accent); color: var(--text); left: 2px; right: 2px; z-index: 3; }
.cal-resize { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; cursor: ns-resize; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 4; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -5px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.cal-year { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; padding: 20px; }
.cal-ym b { font-size: 15px; }
.cal-sched { padding: 10px 20px 30px; display: grid; gap: 4px; }
.cal-sched h3 { font-size: 14px; margin: 14px 0 4px; }
.cal-sched h3.today .link-btn { color: var(--accent); font-weight: 700; }
.cal-srow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 10px; text-align: left; font: inherit; color: var(--text); cursor: pointer; flex-wrap: wrap; }
.cal-srow:hover { background: var(--hover); }
.cal-srow-t { width: 140px; color: var(--text-2); font-size: 13px; }
.cal-pop { position: fixed; z-index: 900; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 12px 18px 16px; max-height: 80vh; overflow: auto; }
.cal-pop h3 { display: flex; gap: 10px; align-items: center; margin: 4px 0 6px; font-size: 19px; }
.cal-pop-bar { display: flex; justify-content: flex-end; gap: 4px; }
.cal-desc { white-space: normal; }
.cal-guests { padding-left: 18px; margin: 4px 0; }
.cal-rsvp { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.cal-rsvp .on { background: var(--selected); color: var(--selected-text); }
.cal-editor { width: min(640px, 96vw); }
.cal-ed-title { width: 100%; font: 600 22px var(--font-brand); border: 0; border-bottom: 2px solid var(--border); background: none; color: var(--text); padding: 6px 2px; margin-bottom: 12px; }
.cal-ed-title:focus { outline: none; border-color: var(--accent); }
.cal-ed-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.cal-ed-row input, .cal-ed-row select, .cal-editor select, .cal-editor input[type=search] { padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; max-width: 100%; }
.cal-ed-row select[name=tz] { max-width: 240px; }
.cal-byday { display: flex; gap: 6px; margin: 6px 0; }
.cal-byday input { position: absolute; opacity: 0; }
.cal-byday span { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); cursor: pointer; font-size: 13px; }
.cal-byday input:checked + span { background: var(--accent); color: var(--on-accent); }
.cal-custom { border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.cal-rems, .cal-guest-chips, .cal-guest-results { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.cal-rem { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); font-size: 13px; }
.cal-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.cal-colors input { position: absolute; opacity: 0; }
.cal-colors span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--border); font-size: 11px; }
.cal-colors input:checked + span { box-shadow: 0 0 0 2px var(--text); }
.cal-scope { display: grid; gap: 10px; margin: 10px 0; }
@media (max-width: 900px) {
  .cal-app { grid-template-columns: 1fr; padding: 10px; }
  .cal-side { order: 2; }
  .cal-views { width: 100%; overflow-x: auto; }
  .cal-views button { flex: 1; padding: 8px 10px; }
  .cal-title { font-size: 18px; }
  .cal-cell { min-height: 72px; }
  .cal-chip-t { display: none; }
}

/* ===== Help search, tools subdomain ===== */
.help-search { width: 100%; max-width: 560px; padding: 12px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); font: inherit; font-size: 16px; margin: 6px 0 4px; }
.help-steps li { margin: 6px 0; }

/* ===== Tools ===== */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 8px; }
.tool-tile, .tool-related a { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); text-decoration: none; line-height: 1.4; }
.tool-tile:hover, .tool-related a:hover { border-color: var(--accent); }
.tool-tile span, .tool-related span { color: var(--text-2); font-size: 13.5px; }
.tool-related { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tool-group h2 { margin-top: 26px; }
.tool-opts { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; margin: 14px 0; }
.tool-opts.col { flex-direction: column; align-items: stretch; }
.tool-opts .field { display: grid; gap: 4px; margin: 0; min-width: 140px; }
.tool-opts .field span { font-size: 13px; color: var(--text-2); }
.tool-opts input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), .tool-opts select, .tool-text, .calc-row input { padding: 9px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; min-width: 0; }
.tool-opts input[type=color] { width: 46px; height: 38px; padding: 2px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.tool-opts .check, .check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.tool-text { width: 100%; box-sizing: border-box; resize: vertical; line-height: 1.5; margin: 8px 0; }
.mono, .tool-text.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; }
.tool-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tool-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.tool-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin: 12px 0; }
.tool-stat { padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); display: grid; gap: 2px; }
.tool-stat b { font: 700 20px var(--font-brand); }
.tool-stat span { font-size: 12.5px; color: var(--text-2); }
.tool-stat.add b { color: #2e8b57; } .tool-stat.del b { color: var(--danger); }
.tool-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.tool-chips span { padding: 4px 10px; border-radius: 99px; background: var(--surface-2); font-size: 13px; }
.tool-msg { min-height: 1.4em; }
.ok { color: #2e8b57; font-weight: 600; } .bad { color: var(--danger); font-weight: 600; }
.tool-big { font: 700 20px var(--font-brand); margin: 8px 0; }
.tool-card { border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; margin: 12px 0; background: var(--surface); }
.tool-card h3 { margin: 0; }
.tool-saved { font-weight: 600; color: #2e8b57; }
.tool-drop.over, .tool-drop.dragging { border-color: var(--accent); background: var(--selected); }
.tool-preview { max-width: 100%; border-radius: 12px; margin: 10px 0; display: block; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 99px; overflow: hidden; margin: 6px 0 10px; }
.seg.wrap { flex-wrap: wrap; border-radius: 14px; }
.seg button { border: 0; background: none; padding: 8px 14px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; }
.seg button.on { background: var(--selected); color: var(--selected-text); font-weight: 600; }
.crop-stage { position: relative; display: inline-block; max-width: 100%; margin: 10px 0; touch-action: none; }
.crop-stage canvas { display: block; max-width: 100%; border-radius: 8px; }
.crop-box { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); cursor: move; touch-action: none; }
.crop-box i { position: absolute; width: 16px; height: 16px; background: #fff; border-radius: 50%; border: 2px solid var(--accent); }
.crop-box i[data-h=nw] { left: -9px; top: -9px; cursor: nwse-resize; } .crop-box i[data-h=ne] { right: -9px; top: -9px; cursor: nesw-resize; }
.crop-box i[data-h=sw] { left: -9px; bottom: -9px; cursor: nesw-resize; } .crop-box i[data-h=se] { right: -9px; bottom: -9px; cursor: nwse-resize; }
.picker-wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(220px, 1fr); gap: 16px; margin-top: 12px; }
.picker-canvas { max-width: 100%; border-radius: 12px; cursor: crosshair; }
.swatch { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--border); }
.swatch i { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); flex: none; }
.diff-out { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13.5px/1.6 ui-monospace, Menlo, Consolas, monospace; max-height: 520px; overflow: auto; }
.diff-out .da { background: color-mix(in srgb, #2e8b57 22%, transparent); }
.diff-out .dd { background: color-mix(in srgb, var(--danger) 22%, transparent); text-decoration: line-through; }
.md-out { border: 1px solid var(--border); border-radius: 12px; padding: 4px 16px; background: var(--surface); overflow: auto; max-height: 540px; }
.md-out table { border-collapse: collapse; } .md-out td, .md-out th { border: 1px solid var(--border); padding: 4px 10px; }
.md-out pre { background: var(--surface-2); padding: 10px; border-radius: 8px; overflow: auto; } .md-out img { max-width: 100%; }
.hash-row { display: grid; grid-template-columns: 80px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.hash-row code { overflow-wrap: anywhere; font-size: 13px; }
.hash-row.match { background: color-mix(in srgb, #2e8b57 12%, transparent); }
.regex-line { align-items: center; gap: 4px; } .regex-line input[data-re] { flex: 1; min-width: 200px; } .regex-line .flags { width: 70px; }
.regex-hl { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13.5px/1.6 ui-monospace, Menlo, Consolas, monospace; }
.regex-hl mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; border-radius: 3px; }
.calc-rows { display: grid; gap: 10px; }
.calc-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.calc-row input { width: 110px; } .calc-row b { font: 700 18px var(--font-brand); }
.unit-line { align-items: end; } .unit-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; font-size: 14px; }
.unit-all div { padding: 6px 10px; background: var(--surface-2); border-radius: 8px; overflow-wrap: anywhere; }
.pw-out { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); margin: 8px 0; }
.pw-out code { flex: 1; font: 600 18px ui-monospace, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.pw-meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; } .pw-meter span { display: block; height: 100%; transition: width .2s; }
.qr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 20px; align-items: start; }
.qr-preview { text-align: center; } .qr-preview canvas { width: 256px; height: 256px; border-radius: 12px; border: 1px solid var(--border); image-rendering: pixelated; }
.tz-grid { display: grid; gap: 8px; }
.tz-row { display: grid; grid-template-columns: minmax(120px, 1fr) 140px minmax(160px, 2fr) 30px; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.tz-row small { display: block; font-size: 12px; } .tz-time { font: 700 18px var(--font-brand); }
.tz-strip { display: grid; grid-template-columns: repeat(24, 1fr); gap: 1px; height: 22px; }
.tz-strip i { border-radius: 2px; background: #2b2b33; } .tz-strip i.awake { background: color-mix(in srgb, var(--accent) 30%, var(--surface-2)); }
.tz-strip i.work { background: #2e8b57; } .tz-strip i.now { outline: 2px solid var(--text); outline-offset: 1px; }
.contrast-demo { padding: 20px; border-radius: 14px; border: 1px solid var(--border); margin: 10px 0; } .contrast-demo b { font-size: 24px; }
.clock-big { font: 800 clamp(44px, 10vw, 84px) var(--font-brand); font-variant-numeric: tabular-nums; margin: 10px 0; letter-spacing: -.02em; }
.clock-big.done { color: var(--danger); animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.laps { font-variant-numeric: tabular-nums; }
.pick-result { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; align-items: center; }
.pick-result > b { font: 800 30px var(--font-brand); padding: 10px 18px; border-radius: 14px; background: var(--selected); color: var(--selected-text); }
.pick-result .die { width: 56px; height: 56px; display: grid; place-items: center; padding: 0; }
.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; width: 100%; }
.teams > div { border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; background: var(--surface); }
.tool-now { margin: 6px 0; }
@media (max-width: 760px) { .tool-two, .picker-wrap, .qr-layout { grid-template-columns: 1fr; } .tz-row { grid-template-columns: 1fr auto; } .tz-strip { grid-column: 1 / -1; } .hash-row { grid-template-columns: 1fr auto; } .hash-row code { grid-column: 1 / -1; } }

/* ===== Ads in Atlas and Ads Manager ===== */
.ad-post .muted { font-size: 12.5px; }
.ad-face { background: linear-gradient(135deg, var(--brand-a), var(--brand-c)); color: var(--on-accent); font-weight: 800; }
.ad-media { display: block; margin: 8px -16px -6px; color: var(--text); text-decoration: none; border-top: 1px solid var(--border); }
.ad-media img { width: 100%; display: block; max-height: 420px; object-fit: cover; }
.ad-art { display: grid; place-items: center; gap: 4px; aspect-ratio: 1.91; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.ad-art b { font-size: 64px; line-height: 1; } .ad-art span { font: 700 18px var(--font-brand); }
.ad-art.empty { background: var(--surface-2); color: var(--text-3); text-shadow: none; }
.ad-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; background: var(--surface-2); }
.ad-foot > span:first-child { display: grid; min-width: 0; } .ad-foot b { overflow: hidden; text-overflow: ellipsis; }
.ad-hidden { padding: 8px 0; margin: 0; }
.ads-app { max-width: 1200px; margin: 0 auto; padding: 18px; }
.ads-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.ads-head h1 { margin: 2px 0; } .ads-head-actions { display: flex; gap: 8px; align-items: center; }
.ads-head-actions select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.ads-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 14px; }
.ads-kpi { padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); display: grid; gap: 4px; }
.ads-kpi span { color: var(--text-2); font-size: 13px; } .ads-kpi b { font: 700 24px var(--font-brand); }
.ads-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding-top: 6px; }
.ads-chart span { flex: 1; background: var(--accent); border-radius: 4px 4px 0 0; min-width: 4px; }
.ads-table-wrap { overflow-x: auto; } .ads-table { min-width: 760px; }
.ads-status { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; text-transform: capitalize; background: var(--surface-2); }
.ads-status.active { background: color-mix(in srgb, #2e8b57 20%, transparent); color: #2e8b57; } .ads-status.paused { background: color-mix(in srgb, #d98a00 22%, transparent); }
.ads-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.ads-card { display: grid; gap: 8px; } .ads-card .pf-post { margin: 0; }
.ads-card-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); }
.ads-editor { width: min(940px, 96vw); display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; }
.ads-preview .pf-post { margin-top: 8px; }
.ads-langs { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; }
@media (max-width: 800px) { .ads-editor { grid-template-columns: 1fr; } }

/* ===== Wallet ===== */
.wallet { max-width: 860px; margin: 0 auto; padding: 18px; display: grid; gap: 14px; }
.wallet-hero { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); }
.wallet-bal { font: 800 46px var(--font-brand); margin: 4px 0; }
.wallet-card { width: 260px; aspect-ratio: 1.6; border-radius: 18px; padding: 18px; display: grid; align-content: space-between; color: #fff; background: linear-gradient(135deg, var(--brand-a), var(--brand-b) 55%, var(--brand-c)); box-shadow: var(--shadow); }
.wallet-card .logo { color: #fff; background: none; -webkit-background-clip: initial; background-clip: initial; }
.wallet-card b { font: 700 20px var(--font-brand); }
.wallet-amounts { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.wallet-amounts .on { background: var(--selected); color: var(--selected-text); border-color: var(--accent); }
.wallet-custom input { width: 90px; padding: 8px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); }
.wallet-uses { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.wallet-soon.flash { color: var(--accent); font-weight: 600; }
.upgrade-btn { margin: 8px 12px; }

/* Fixes after review */
[hidden] { display: none !important; }
.pf-avatar-wrap { width: 128px; height: 128px; }
.pf-avatar-btn, .pf-avatar-btn .pf-avatar { display: block; }
.frame-opt .pf-avatar-wrap { width: 64px; height: 64px; }
@media (max-width: 760px) { .pf-avatar-wrap { width: 104px; height: 104px; } }
.hb-head, .hb-row { grid-template-columns: repeat(7, minmax(18px, 1fr)) 26px 22px; gap: 4px; }
.hb-head > span:first-child { display: none; }
.hb-name { grid-column: 1 / -1; margin-top: 6px; font-weight: 600; }
.hb-day { width: 100%; max-width: 30px; height: 26px; justify-self: center; }

/* ===== Stories (our own design: tiles, a single card and a countdown ring) ===== */
.st-bar, .sp-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 10px; scrollbar-width: thin; }
.sp-tile { position: relative; flex: none; width: 86px; display: grid; justify-items: center; gap: 6px; border: 0; background: none; padding: 0; cursor: pointer; color: var(--text); font: inherit; }
.sp-thumb { width: 86px; height: 112px; border-radius: 18px; display: grid; place-items: center; overflow: hidden; border: 2px solid var(--border); box-sizing: border-box; transition: transform .15s; }
.sp-tile:hover .sp-thumb { transform: translateY(-2px); }
.sp-thumb em { font: 700 11px/1.25 var(--font-brand); color: #fff; font-style: normal; padding: 8px; text-align: center; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.sp-tile.fresh .sp-thumb { border: 3px solid var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.sp-tile.add .sp-thumb { border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.sp-tile.add b { font-size: 30px; color: var(--accent); }
.sp-who { position: absolute; top: 88px; left: 50%; transform: translateX(-50%); }
.sp-face { width: 28px; height: 28px; border-radius: 9px; object-fit: cover; display: grid; place-items: center; background: var(--surface-2); border: 2px solid var(--surface); font: 700 11px var(--font-ui); color: var(--accent); }
.sp-name { font-size: 12px; margin-top: 10px; max-width: 86px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-layer { --sp-dark: #0b0b0d; background: rgba(8, 8, 10, .92); display: grid; place-items: center; }
.sp-stage { display: flex; align-items: center; gap: 18px; }
.sp-card { position: relative; width: min(420px, 92vw); height: min(760px, 86vh); border-radius: 28px; overflow: hidden; background: var(--sp-dark); box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.sp-card.sp-in { animation: sp-in .32s cubic-bezier(.2,.8,.2,1); }
@keyframes sp-in { from { opacity: 0; transform: scale(.96) rotate(-.6deg); } to { opacity: 1; transform: none; } }
.sp-media { position: absolute; inset: 0; display: grid; place-items: center; }
.sp-media img { width: 100%; height: 100%; object-fit: contain; }
.sp-words { font: 800 clamp(22px, 5vw, 34px)/1.2 var(--font-brand); color: #fff; text-align: center; padding: 0 30px; letter-spacing: -.01em; text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.sp-caption { position: absolute; left: 16px; right: 16px; bottom: 76px; padding: 10px 14px; border-radius: 16px; background: rgba(0,0,0,.45); color: #fff; font: 600 15px var(--font-ui); backdrop-filter: blur(8px); }
.sp-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 18px; background: rgba(0,0,0,.38); backdrop-filter: blur(10px); color: #fff; }
.sp-ring { position: relative; width: 44px; height: 44px; display: grid; place-items: center; flex: none; }
.sp-ring .sp-face.lg { width: 34px; height: 34px; border-radius: 50%; border: 0; }
.sp-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.sp-ring circle { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 125.7; stroke-dashoffset: 0; animation: sp-count var(--d) linear forwards; }
.sp-card.paused .sp-ring circle { animation-play-state: paused; }
@keyframes sp-count { to { stroke-dashoffset: 125.7; } }
.sp-meta { display: grid; min-width: 0; flex: 1; }
.sp-meta strong { font: 700 14px var(--font-brand); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-meta small { opacity: .8; font-size: 12px; }
.sp-count { font: 700 12px var(--font-ui); padding: 3px 9px; border-radius: 99px; background: rgba(255,255,255,.16); }
.sp-btn { border: 0; background: rgba(255,255,255,.16); color: #fff; height: 32px; min-width: 32px; border-radius: 10px; cursor: pointer; font: 600 13px var(--font-ui); padding: 0 10px; }
.sp-btn:hover { background: rgba(255,255,255,.28); }
.sp-bottom { position: absolute; left: 14px; right: 14px; bottom: 14px; display: flex; gap: 8px; align-items: center; padding: 8px; border-radius: 18px; background: rgba(0,0,0,.38); backdrop-filter: blur(10px); }
.sp-bottom .wide { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-aud { height: 32px; border-radius: 10px; border: 0; background: rgba(255,255,255,.16); color: #fff; font: inherit; font-size: 13px; padding: 0 8px; }
.sp-aud option { color: #111; }
.sp-arrow { width: 48px; height: 48px; border-radius: 16px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-size: 26px; cursor: pointer; }
.sp-arrow:hover { background: rgba(255,255,255,.18); }
.sp-swatches { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.sp-swatches input { position: absolute; opacity: 0; }
.sp-swatches span { width: 34px; height: 46px; border-radius: 10px; display: block; cursor: pointer; border: 3px solid transparent; }
.sp-swatches input:checked + span { border-color: var(--text); }
.pf-stories { margin: 0 0 14px; }
.pf-avatar-wrap.has-story .pf-avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--accent); }
@media (max-width: 640px) { .sp-arrow { display: none; } .sp-card { width: 100vw; height: 100dvh; border-radius: 0; } }
@media (min-width: 900px) { .shell > .sidebar { position: sticky; top: 64px; align-self: start; max-height: calc(100vh - 72px); overflow-y: auto; } }

/* ===== Sync end-to-end encryption ===== */
.e2ee-bar { margin: 4px 0 10px; font-size: 13px; }
.e2ee-bar .pill-btn { width: 100%; justify-content: flex-start; }
.e2ee-on { color: var(--accent); font-weight: 600; }
.e2ee-line { flex-basis: 100%; display: grid; gap: 6px; }
.e2ee-note { margin: 0; font-size: 12px; color: var(--text-3); }
.e2ee-warn { margin: 0; font-size: 13px; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, #d97706 14%, var(--surface)); color: var(--text); }
.e2ee-badge { justify-self: start; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); border-radius: 99px; padding: 4px 12px; font: 600 12px var(--font-ui); cursor: pointer; }
.e2ee-badge.ok { border-color: var(--accent); color: var(--accent); }
.e2ee-dialog { border: 0; padding: 0; border-radius: 22px; background: var(--surface); color: var(--text); width: min(460px, 94vw); box-shadow: 0 24px 70px rgba(0,0,0,.35); }
.e2ee-dialog::backdrop { background: rgba(0,0,0,.45); }
.e2ee-card { padding: 24px; display: grid; gap: 12px; }
.e2ee-card h2 { font-size: 20px; margin: 0; }
.e2ee-card h3 { font-size: 15px; margin: 6px 0 0; }
.e2ee-card p { margin: 0; line-height: 1.5; }
.e2ee-code { display: flex; align-items: center; gap: 18px; padding: 14px; border-radius: 16px; background: var(--surface-2); }
.e2ee-code strong { font: 700 20px/1.5 var(--font-brand); letter-spacing: .06em; }
.e2ee-grid { display: grid; grid-template-columns: repeat(5, 14px); gap: 3px; flex: none; }
.e2ee-grid i { width: 14px; height: 14px; border-radius: 4px; background: hsl(var(--h) 30% 85%); }
.e2ee-grid i.on { background: hsl(var(--h) 65% 40%); }
.msg-sealed { font-style: italic; color: var(--text-3); }
.msg-image img[data-sealed-img]:not([src]) { width: 160px; height: 120px; background: var(--surface-2); border-radius: 12px; display: block; }
.dock-sealed { margin: 0; padding: 10px 12px; font-size: 12px; border-top: 1px solid var(--border); }

/* ===== Private Vault ===== */
.pv-hero { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.pv-hero h1 { margin: 0 0 6px; }
.pv-hero p { margin: 0; max-width: 640px; line-height: 1.55; color: var(--text-2); }
.pv-mark { flex: none; width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.pv-card { max-width: 560px; padding: 22px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); display: grid; gap: 12px; }
.pv-card h2 { margin: 0; font-size: 18px; }
.pv-points { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.5; }
.pv-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pv-top h1 { display: flex; align-items: center; gap: 8px; margin: 0; }
.pv-top p { margin: 4px 0 0; }
.pv-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-busy { padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--surface)); margin-bottom: 10px; font-size: 14px; }
.pv-drop { border: 2px dashed transparent; border-radius: 18px; min-height: 180px; transition: border-color .15s; }
.pv-drop.over { border-color: var(--accent); }
.pv-list { display: grid; }
.pv-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 110px auto; gap: 12px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--border); }
.pv-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pv-row-actions { display: flex; gap: 10px; }
.pv-foot { margin-top: 16px; font-size: 13px; }
.pv-code { font: 700 18px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; padding: 14px; border-radius: 14px; background: var(--surface-2); text-align: center; word-break: break-all; user-select: all; }
.link-btn.danger, .pill-btn.danger, .primary-btn.danger { color: #c0392b; }
.primary-btn.danger { background: #c0392b; color: #fff; }
@media (max-width: 640px) { .pv-row { grid-template-columns: minmax(0, 1fr) auto; } .pv-row > .muted:nth-of-type(3) { display: none; } .pv-row-actions { grid-column: 1 / -1; } }
