/* ============================================================================
   798 Hands design layer — round 1
   ----------------------------------------------------------------------------
   Loaded AFTER style.css, and changes only shape, depth, motion and type:
   every colour still comes from the theme in style.css (and the admin theme
   and members' accents), so those keep working exactly as before.

   To go back to the old look: remove the design.css line from base.html.
   ============================================================================ */

/* ── Fonts: served from this site (static/fonts/), never a third party.
      If the files aren't there yet, the browser's default font is used —
      exactly what the site showed before. ─────────────────────────────── */
@font-face { font-family: "Outfit"; font-weight: 400; font-display: swap; src: url("/static/fonts/outfit-400.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 500; font-display: swap; src: url("/static/fonts/outfit-500.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 600; font-display: swap; src: url("/static/fonts/outfit-600.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-weight: 700; font-display: swap; src: url("/static/fonts/outfit-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/static/fonts/plex-mono-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/static/fonts/plex-mono-500.woff2") format("woff2"); }

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius-xs: 8px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-1: 0 4px 14px rgba(0, 0, 0, .28);
  --shadow-2: 0 14px 38px rgba(0, 0, 0, .42);
  --shadow-pop: 0 18px 48px rgba(0, 0, 0, .55);
  --ring: 0 0 0 3px color-mix(in srgb, var(--accent) 38%, transparent);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --t-fast: .14s;
  --t-med: .22s;

  --tint-accent: color-mix(in srgb, var(--accent) 18%, transparent);
  --surface-soft: color-mix(in srgb, var(--bg-panel) 70%, var(--bg-base) 30%);
}

/* ── Type ───────────────────────────────────────────────────────────────── */
body { font-family: var(--font-body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -.01em; }
/* Prices and counts line up in columns. */
.mono,
code,
.tx-table td { font-variant-numeric: tabular-nums; }

/* ── Panels and blocks: rounded, soft depth ─────────────────────────────── */
.crate-panel,
.block-panel,
.chat-users,
.chat-log,
.ac-detail td {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-2);
}
.chat-log { box-shadow: none; }
.crate-panel-strap { border-radius: 0 0 var(--radius-xs) var(--radius-xs); }

/* ── Header: one rounded strip; nav links as pills ──────────────────────── */
.site-header {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-1);
}
.site-nav-link {
  border-radius: var(--radius-pill);
  padding: 8px 14px;
  height: auto;
  line-height: 1.2;
  align-self: center;
  display: inline-flex;
  align-items: center;
  border-bottom: 0;
  box-shadow: none;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.site-nav-link:hover { background: color-mix(in srgb, var(--text-main) 8%, transparent); }
.site-nav-link.nav-active { background: var(--tint-accent); color: var(--accent-bright); border-bottom: 0; box-shadow: none; }
.site-nav-link.nav-active::after, .site-nav-link.nav-active::before { display: none; }
.notif-bell { border-radius: var(--radius-pill); }
.notif-count, .nav-badge { border-radius: var(--radius-pill); }

/* ── Buttons: pills, gentle lift ────────────────────────────────────────── */
.btn, button.btn, a.btn {
  border-radius: var(--radius-pill);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary:hover { box-shadow: 0 6px 18px color-mix(in srgb, var(--accent) 40%, transparent); }

/* ── Inputs: rounded, with a soft focus ring ────────────────────────────── */
input[type="text"], input[type="search"], input[type="number"], input[type="email"],
input[type="password"], input[type="url"], select, .profile-input {
  border-radius: var(--radius-pill);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
textarea, textarea.profile-input { border-radius: var(--radius-md); }
input:focus-visible, select:focus-visible, textarea:focus-visible, .profile-input:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--ring);
}
:focus-visible { outline-color: var(--accent-bright); }

/* ── Tabs, toggles and chips: pills ─────────────────────────────────────── */
.admin-tab,
.edit-tab,
.tab-btn,
.inbox-tab,
.inbox-filter,
.rx-chip,
.rx-add,
.group-chip,
.chat-card-lock,
.chat-role,
.ac-chip,
.bbc-btn {
  border-radius: var(--radius-pill);
}
.inbox-tab { border-radius: var(--radius-md) var(--radius-md) 0 0; }

/* ── Cards and tiles: rounded, lift on hover ────────────────────────────── */
.member-card,
.chat-card,
.dm-row,
.note-row,
.wall-post,
.avatar-choice,
.ac-report,
.bbcode-video {
  border-radius: var(--radius-md);
  transition: transform var(--t-med) var(--ease), box-shadow var(--t-med) var(--ease),
              border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.member-card:hover,
.chat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}

/* ── Tables: softer rows ────────────────────────────────────────────────── */
.tx-table tbody tr,
.data-table tbody tr {
  transition: background var(--t-fast) var(--ease);
}
.tx-table tbody tr:hover,
.data-table tbody tr:hover { background: color-mix(in srgb, var(--text-main) 5%, transparent); }

/* ── Pop-overs: menus, the colour wheel ─────────────────── */
.bbc-menu-body,
.cw-pop,
.call-banner {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
}

.cw-swatch, .cw-done, .cw-hex { border-radius: var(--radius-sm); }

/* ── Avatars: round ─────────────────────────────────────────────────────── */
.sidebar-avatar,
.sidebar-avatar-placeholder,
.member-avatar,
.fr-avatar { border-radius: 50%; }

/* ── Pagination ─────────────────────────────────────────────────────────── */
.list-bar a,
.list-bar button,
.list-bar select {
  border-radius: var(--radius-pill);
}

/* ── Scrollbars: thin, in the theme ─────────────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: var(--border-hairline) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--border-hairline); border-radius: var(--radius-pill);
                             border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ── Anyone who prefers less motion gets none ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover,
.member-card:hover,
.chat-card:hover { transform: none; }
}

/* ── List controls: ONE row, top and bottom, on every list ─────────────────
   The controls sit on a single line, with the pager pinned to its right end.
   Only when the window really can't fit them do the controls wrap — inside
   their own group, so the pager never drops to a line of its own. */
.list-bar { flex-wrap: nowrap; gap: 8px; align-items: flex-start; justify-content: flex-start; }
.list-bar-left { flex: 1 1 auto; min-width: 0; flex-wrap: wrap; gap: 5px; justify-content: flex-start; align-items: center; }
/* The old style pushes every menu right; here only per-page goes right,
   beside the pager, and everything else packs to the left. */
.list-bar-left > select { margin-left: 0; }
.list-bar-left > select[name="per_page"] { margin-left: auto; width: 112px; padding: 0 22px 0 10px; }
.list-bar-left > select[name="sort"] { max-width: 172px; }
.list-dir .btn { padding: 0 10px; }
.list-bar-pager { flex: none; gap: 4px; }
.list-bar .btn-sm, .list-bar select { height: 34px; }
.list-bar select { padding: 0 28px 0 12px; width: auto; }
.list-page-btn { width: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; }
.list-page-label { font-family: var(--font-mono); font-size: 13px; color: var(--text-muted); padding: 0 4px; white-space: nowrap; cursor: default; }
.list-filters { gap: 2px; padding: 3px; border-radius: var(--radius-pill); background: var(--surface-soft);
                border: 1px solid var(--border-hairline); }
.list-filters .btn { border: 0; height: 28px; }
.list-filters .btn.is-on { background: var(--tint-accent); color: var(--accent-bright); }

/* Search: a magnifying glass that opens into a box. */
.list-search-wrap { display: inline-flex; align-items: center; gap: 4px; }
.list-search-toggle { width: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.list-search-wrap .list-search { width: 0; min-width: 0; padding-left: 0; padding-right: 0; border-width: 0;
                                 opacity: 0; pointer-events: none;
                                 transition: width var(--t-med) var(--ease), opacity var(--t-fast) var(--ease); }
.list-search-wrap.is-open .list-search { width: 220px; padding-left: 14px; padding-right: 14px; border-width: 1px;
                                         opacity: 1; pointer-events: auto; height: 34px; }
.list-search-wrap.is-open .list-search-toggle { color: var(--accent-bright); }
@media (max-width: 700px) {
  .list-bar { flex-direction: row; flex-wrap: wrap; }
  .list-search-wrap.is-open .list-search { width: 160px; }
}
.list-dir { display: inline-flex; gap: 4px; padding: 3px; border-radius: var(--radius-pill);
            background: var(--surface-soft); border: 1px solid var(--border-hairline); }
.list-dir .btn { border: 0; }
.list-dir .btn.is-on { background: var(--accent); color: var(--text-main); }

/* ── The Arcade ─────────────────────────────────────────────────────────── */
.arcade-head h1 { margin: 0 0 4px; }
.arcade-head p { margin: 0 0 14px; }
.arcade-screen { position: relative; width: 100%; max-width: 1152px; margin: 0 auto; aspect-ratio: 16 / 9;
                 background: #0b0807; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-2);
                 border: 1px solid var(--border-hairline); }
.arcade-screen canvas { width: 100%; height: 100%; display: block; image-rendering: pixelated; image-rendering: crisp-edges; }
.arcade-screen canvas:focus-visible { outline: 3px solid var(--accent-bright); outline-offset: -3px; }
.arcade-hint { text-align: center; margin: 8px 0 18px; }

.arcade-card { background: var(--surface-soft); border: 1px solid var(--border-hairline); border-radius: var(--radius-lg); padding: 14px 18px; }
.arcade-card h2 { margin: 0 0 10px; font-size: 17px; }

.arcade-more { margin-top: 12px; }
.arcade-more > summary { list-style: none; cursor: pointer; }
.arcade-more > summary::-webkit-details-marker { display: none; }
.arcade-more > summary h2 { display: inline; margin: 0; }
.arcade-more > summary::after { content: " ▸"; color: var(--text-muted); }
.arcade-more[open] > summary::after { content: " ▾"; }
.arcade-more ul { margin: 10px 0 0; padding-left: 20px; line-height: 1.6; }

.info-dot { color: var(--text-muted); font-size: 12px; cursor: help; }

/* ── The Pool Hall ─────────────────────────────────────────────────────── */
.pool-screen { position: relative; width: 100%; max-width: 1280px; margin: 0 auto; aspect-ratio: 16 / 9; background: #0b0908;
               border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; border: 1px solid var(--border-hairline); }
.pool-screen canvas { width: 100%; height: 100%; display: block; }
.arcade-games { display: flex; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.arcade-games a { padding: 8px 14px; border: 1px solid var(--border-hairline); border-radius: var(--radius-pill); text-decoration: none; color: var(--text-main); }
.arcade-games a:hover, .arcade-games a.is-here { border-color: var(--accent); color: var(--accent-bright); }

/* ── Phones: the sidebar becomes a slide-out drawer ──────────────────────
   Narrow screens, and short landscape ones (a phone held sideways). The
   page gets the full width; ☰ in the header opens the drawer with the
   profile, the site's pages and every left-column block.
   Wider screens are untouched. The same test is in base.html's script. */
.drawer-toggle, .drawer-head, .drawer-nav, .drawer-backdrop { display: none; }
@media (max-width: 860px), (max-height: 520px) and (orientation: landscape) {
  .site-header { padding: 6px 10px; gap: 8px; position: sticky; top: 0; z-index: 50; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
  .brand { gap: 8px; min-width: 0; }

  .brand-name { font-size: 15px; }
  .brand-name-sub, .site-nav, .header-account { display: none; }
  .header-right { margin-left: auto; gap: 8px; }
  .drawer-toggle { display: inline-flex; flex-direction: column; justify-content: center; gap: 4px; flex: none; width: 42px; height: 42px; padding: 0 11px;
                   border-radius: 10px; background: transparent; border: 1px solid var(--border-hairline); cursor: pointer; }
  .drawer-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--text-main); }
  #app { display: block; min-height: 0; }
  .col-center { padding: 10px 8px 16px; }
  .col-left {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 1000;
    width: min(86vw, 330px); height: 100dvh; max-height: none;
    padding: 0 10px 28px; overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg-base, #120e0b); box-shadow: 10px 0 34px rgba(0, 0, 0, 0.6);
    transform: translateX(-105%); visibility: hidden;
    transition: transform 0.22s ease, visibility 0s linear 0.22s;
  }
  body.drawer-open .col-left { transform: none; visibility: visible; transition: transform 0.22s ease, visibility 0s; }
  body.drawer-open { overflow: hidden; }
  .drawer-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2;
                 margin: 0 -10px 6px; padding: 10px 10px 8px; background: var(--bg-base, #120e0b); }
  .drawer-title { font: 700 13px var(--font-display); letter-spacing: 0.12em; color: var(--text-muted); }
  .drawer-close { width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border-hairline); background: transparent; color: var(--text-main); font-size: 18px; cursor: pointer; }
  .drawer-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
  .drawer-nav a { display: block; padding: 11px 12px; border-radius: 10px; text-decoration: none; color: var(--text-main);
                  background: color-mix(in srgb, var(--text-main) 6%, transparent); font: 600 12.5px var(--font-display); letter-spacing: 0.03em; }
  .drawer-nav a.nav-active { background: var(--tint-accent); color: var(--accent-bright); }
  .drawer-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 999; background: rgba(0, 0, 0, 0.55); }
  .col-right { position: static; width: auto; max-height: none; padding: 0 8px 16px; }

  /* Pages: give the content the width. Desktop frames a page twice (the
     main panel's 24px plus each panel's 22px); on a phone that ate 108px
     of a 390px screen. */
  .col-center { padding: 8px 6px 16px; }
  .col-center > .main-panel { padding: 0 !important; }
  .col-center .crate-panel { padding: 16px 12px 14px; }
  .col-center .crate-panel[style*="padding:2"], .col-center .crate-panel[style*="padding: 2"] { padding: 16px 12px 14px !important; }
  .col-center code { overflow-wrap: anywhere; }
  .col-center iframe, .col-center video { max-width: 100%; }
  /* The page never scrolls sideways (style.css hides it), so anything
     wider was simply cut off. Tabs wrap; wide tables get their own
     sideways scroll (base.html's script wraps them in .phone-scroll). */
  .admin-tabs-bar { flex-wrap: wrap; }
  .admin-tab { padding: 9px 12px; }
  .phone-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  .phone-scroll > table { min-width: 100%; }

}

@media (prefers-reduced-motion: reduce) { .col-left { transition: none !important; } }


/* ── 798 Hands additions ──────────────────────────────────────────────── */
/* Admin tabs wrap on every screen size, not only phones. */
.admin-tabs-bar { flex-wrap: wrap; row-gap: 4px; }
/* Links inside page content follow the theme instead of browser blue. */
.col-center a:not(.btn):not(.site-nav-link) { color: var(--accent-bright, var(--accent)); }
.col-center a:not(.btn):not(.site-nav-link):hover { text-decoration: underline; }
/* The union disclaimer and privacy link at the foot of every page. */
.site-footer { max-width: 900px; margin: 24px auto 28px; padding: 0 16px; text-align: center;
               font-family: var(--font-mono, monospace); font-size: 11px; line-height: 1.7; color: var(--text-muted, #8a8172); }
.site-footer a { color: inherit; text-decoration: underline; }
/* Sign-in / register form: label above a full-width field. 16px text stops
   phones zooming in when a field is tapped. */
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.form-field label { font-size: 13px; color: var(--text-muted); }
.form-field input { width: 100%; box-sizing: border-box; padding: 10px 12px; font-size: 16px; border-radius: 10px; }

/* ── Themes (engine: frenscore/themes.py in the shared core; 798's steel
   presets: app/site_themes.py) ────────────────────────────────────────────
   base.html sets data-trim (brushed | heat | glow | strap | none) and
   data-mode (light | dark) on <html>. Colours come from the theme's :root
   block. "strap" is the trim of the shared Ocean, Seasons and Events themes. */
.site-header { position: relative; }
.site-header::after { content: ""; position: absolute; left: 20px; right: 20px; bottom: -2px; height: 2px;
                      border-radius: 2px; pointer-events: none; background: var(--border-hairline); }
/* Cold steel and light: brushed-metal grain on the header, accent rule under it. */
html[data-trim="brushed"] .site-header {
  background-image: repeating-linear-gradient(90deg,
    color-mix(in srgb, var(--text-main) 5%, transparent) 0 1px, transparent 1px 3px,
    color-mix(in srgb, var(--text-main) 2.5%, transparent) 3px 4px, transparent 4px 7px);
}
html[data-trim="brushed"] .site-header::after { background: var(--accent); }
/* Hot steel: the heat-tint run of a weld, straw to bronze to purple to blue. */
html[data-trim="heat"] .site-header::after { height: 3px; bottom: -3px;
  background-image: linear-gradient(90deg, #e6c56a, #c4743a, #8a4fb8, #3f6fb5); }
/* Molten: a glowing rule and buttons that glow. */
html[data-trim="glow"] .site-header::after { background: var(--accent); box-shadow: 0 0 12px 1px var(--accent); }
html[data-trim="glow"] .btn-primary { box-shadow: 0 0 18px -4px var(--accent); }
html[data-trim="glow"] .crate-panel-strap { box-shadow: 0 0 10px -1px var(--accent); }
/* Shared themes (Ocean, Seasons, Events): a plain accent rule under the header. */
html[data-trim="strap"] .site-header::after { background: var(--accent); }
/* Light themes: softer shadows, fainter page stripes. */
html[data-mode="light"] {
  --shadow-1: 0 3px 10px rgba(20, 24, 30, .10);
  --shadow-2: 0 10px 28px rgba(20, 24, 30, .12);
  --shadow-pop: 0 16px 40px rgba(20, 24, 30, .18);
}
/* The sidebar scrolls, which clips big shadows into a visible box on light
   backgrounds: keep its panels' shadow small. */
html[data-mode="light"] .col-left .crate-panel,
html[data-mode="light"] .col-left .block-panel { box-shadow: 0 2px 6px rgba(20, 24, 30, .10); }
html[data-mode="light"] body {
  background: repeating-linear-gradient(135deg, rgba(0, 0, 0, .025) 0 2px, transparent 2px 40px), var(--bg-base);
}

/* "Change look" popup (templates/fragments/theme_picker.html, static/theme_picker.js).
   Docked at the bottom so the page behind it stays visible as the preview. */
.tp-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tp-summary-text { font-size: 14px; }
.tp-summary .tp-result { flex-basis: 100%; }
.tp-wrap.tp-compact .tp-summary .tp-chips,
.tp-wrap.tp-compact .tp-summary-text { display: none; }
.tp-chips { display: inline-flex; width: 56px; height: 22px; flex: none; border-radius: 7px; overflow: hidden; box-sizing: border-box;
            border: 1px solid color-mix(in srgb, var(--text-main) 30%, transparent); }
.tp-chips span { flex: 1; }
.tp-sheet { position: fixed; z-index: 1200; left: 50%; bottom: 14px; transform: translateX(-50%);
            width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 28px); overflow-y: auto; box-sizing: border-box;
            margin: 0; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 12px;
            background: var(--bg-panel); color: var(--text-main); border: 1px solid var(--border-hairline);
            border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); }
.tp-sheet[hidden] { display: none; }
.tp-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.tp-count { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; color: var(--text-muted); }
.tp-close { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
            border-radius: 50%; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }
.tp-close:hover { background: var(--bg-panel-raised); color: var(--text-main); }
.tp-stage { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 8px; touch-action: pan-y; }
.tp-step { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
           border-radius: 50%; border: 1px solid var(--border-hairline); background: var(--bg-panel-raised); color: var(--text-main);
           transition: border-color var(--t-fast) var(--ease); }
.tp-step:hover { border-color: var(--accent); color: var(--accent-bright); }
.tp-show { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.tp-chips-big { width: 100%; max-width: 260px; height: 34px; border-radius: 10px; margin-bottom: 6px; }
.tp-show-name { font-size: 22px; font-weight: 700; line-height: 1.15; }
.tp-show-family { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--brass); }
.tp-show-desc { font-size: 13px; color: var(--text-muted); min-height: 2.6em; }
.tp-fine { border-top: 1px solid var(--border-hairline); padding-top: 10px; }
.tp-fine summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.tp-fine[open] summary { margin-bottom: 8px; }
.tp-wheels { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 8px; }
.tp-wheel { display: flex; flex-direction: column; gap: 6px; }
.tp-own { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.tp-own input { accent-color: var(--accent); }
.tp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tp-actions .tp-reset { margin-left: auto; }
/* The colour wheel opens above the popup. */
.cw-pop { z-index: 1300; }
/* Room at the foot of the page so the popup never hides the last lines. */
body.tp-sheet-open { padding-bottom: 300px; }
/* Group chips take the group's colour; on light themes it is darkened
   toward the text colour so pale group colours stay readable. */
.group-chip-colored { border-color: var(--chip); color: var(--chip); }
html[data-mode="light"] .group-chip-colored { color: color-mix(in srgb, var(--chip) 40%, var(--text-main)); }
/* Profile page: "Change look" next to "Edit profile" (owner only). */
.profile-owner-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: flex-start; gap: 8px; max-width: 60%; }
.profile-owner-btns .tp-result { text-align: right; }
@media (max-width: 780px) { .profile-owner-btns { display: flex; justify-content: flex-start; max-width: none; } }
