/* =============================================================================
   AKAREC SIGNATURE FEATURES (CL-143): styles for the custom cursor, the "Mix the brand colors"
   bar (bottom right) and the Random Aura / Random Texture toolbar (bottom left).
   Shared by site/index.html and every page built from site/_build/template.html; the behaviour
   lives in /js/akarec-brand-mixer.js. Frank, 2026-11-21: signature features, never remove,
   hide or shrink them (CLAUDE.md). Sections 1-6 were moved here unchanged from site/index.html.
   ============================================================================= */

/* ---------- 1. Surface textures (Random Texture; on home they finish the Brand Studio card and hero stage) ---------- */
/* =========================================================================
   2. TACTILE SURFACE TEXTURES (5 LIVE SHADERS)
   ========================================================================= */
.tex-brushed-obsidian {
  background-color: var(--p-obsidian);
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.018) 0px, rgba(255,255,255,0.018) 1px, transparent 1px, transparent 3px),
    radial-gradient(circle at 80% 20%, rgba(2, 132, 199, 0.16), transparent 60%),
    linear-gradient(135deg, var(--p-navy) 0%, #050811 65%, #090E1A 100%);
}
.tex-carbon-weave {
  background-color: #070A12;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.06) 15%, transparent 16%),
    radial-gradient(rgba(255, 255, 255, 0.06) 15%, transparent 16%),
    linear-gradient(135deg, #0F172A 0%, #05070C 100%);
  background-size: 8px 8px, 8px 8px, 100% 100%;
  background-position: 0 0, 4px 4px, 0 0;
}
.tex-architectural-linen {
  background-color: #161412;
  background-image:
    repeating-linear-gradient(0deg, rgba(250, 248, 245, 0.035) 0px, rgba(250, 248, 245, 0.035) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(250, 248, 245, 0.035) 0px, rgba(250, 248, 245, 0.035) 1px, transparent 1px, transparent 4px),
    linear-gradient(135deg, #1E1B18 0%, #0C0A09 100%);
}
.tex-hammered-gold {
  background-color: #130D04;
  background-image:
    radial-gradient(ellipse at 30% 40%, rgba(253, 224, 71, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 70%, rgba(217, 119, 6, 0.18) 0%, transparent 55%),
    linear-gradient(135deg, #271A07 0%, #0C0802 70%, #1C1104 100%);
}
.tex-blueprint {
  background-color: #060D1A;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.09) 1px, transparent 1px),
    linear-gradient(135deg, #071326 0%, #040811 100%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}

/* ---------- 2. Cursor lens + dot (never blocks clicks) ---------- */
/* =========================================================================
   4. CONTEXT-AWARE TRANSLUCENT CURSOR FOLLOWER (NEVER BLOCKS CLICKS)
   ========================================================================= */
#cursor-lens, #cursor-dot {
  pointer-events: none !important;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  z-index: 9999;
}
#cursor-lens {
  width: 46px;
  height: 46px;
  border: 1.5px solid rgba(245, 158, 11, 0.55);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
  transition: width 0.22s ease, height 0.22s ease, border-color 0.22s ease, background 0.22s ease, border-radius 0.22s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
#cursor-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ak-citron);
  box-shadow: 0 0 12px var(--ak-amber);
  z-index: 10000;
}
#cursor-tag {
  pointer-events: none !important;
  position: absolute;
  top: calc(100% + 6px);
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(6, 10, 18, 0.92);
  color: var(--ak-citron);
  border: 1px solid rgba(245, 158, 11, 0.4);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease;
}
body.cursor-hover-btn #cursor-lens {
  width: 68px;
  height: 68px;
  border-color: var(--ak-lerp-sky);
  background: rgba(2, 132, 199, 0.16);
}
body.cursor-hover-btn #cursor-tag { opacity: 1; color: var(--ak-lerp-sky); border-color: var(--ak-lerp-sky); }
body.cursor-hover-card #cursor-lens {
  width: 82px;
  height: 82px;
  border-color: var(--ak-citron);
  background: radial-gradient(circle, rgba(253, 224, 71, 0.22) 0%, transparent 72%);
}
body.cursor-hover-card #cursor-tag { opacity: 1; }
body.cursor-hover-emerald #cursor-lens {
  width: 66px;
  height: 66px;
  border-color: var(--p-emerald);
  background: rgba(16, 185, 129, 0.16);
}
body.cursor-hover-emerald #cursor-tag { opacity: 1; color: var(--p-emerald); border-color: var(--p-emerald); }
/* CL-321 (Frank 2026-11-29: "i want the cursor/circle from mouse to turn my emerald green when target is verified"):
   whenever the tag reads [ TARGET VERIFIED ], the lens and the tag are emerald (the lens keeps its size for buttons / cards) */
body.cursor-verified #cursor-lens { border-color: var(--p-emerald) !important; background: radial-gradient(circle, rgba(16, 185, 129, 0.24) 0%, rgba(16, 185, 129, 0.10) 72%) !important; box-shadow: 0 0 22px -4px var(--p-emerald); }
body.cursor-verified #cursor-tag { color: var(--p-emerald) !important; border-color: var(--p-emerald) !important; }
@media (pointer: coarse) {
  #cursor-lens, #cursor-dot { display: none !important; }
}

/* ---------- 3. Brand mixer bar, bottom right (CL-016) ---------- */
/* 1. Brand Mixer: always available, bottom right */
.brand-mixer {
  position: fixed; right: 16px; bottom: 16px; z-index: 1600;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  font-family: 'Inter', 'Inter AKfb', system-ui, sans-serif; color: var(--p-linen);
  max-width: calc(100vw - 32px);
}
.bm-toggle {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.65rem;
  min-height: 50px; padding: 0.55rem 1.05rem; border-radius: 999px;
  background: linear-gradient(180deg, #131C2E 0%, var(--p-obsidian) 100%); color: var(--p-linen);
  border: 1.5px solid var(--p-amber); font: 600 0.95rem 'Inter', 'Inter AKfb', sans-serif;
  box-shadow: 0 12px 30px rgba(0,0,0,0.6), 0 0 22px -6px rgba(245,158,11,0.55);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bm-toggle:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0,0,0,0.65), 0 0 28px -4px rgba(245,158,11,0.75); }
.bm-toggle:focus-visible, .bm-btn:focus-visible, .bm-swatch:focus-visible { outline: 2px solid var(--p-citron); outline-offset: 3px; }
.bm-toggle__dots { display: inline-flex; }
.bm-toggle__dots i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--p-obsidian); margin-left: -6px; display: block; }
.bm-toggle__dots i:first-child { margin-left: 0; background: var(--ak-amber); }
.bm-toggle__dots i:nth-child(2) { background: var(--ak-lerp-blue); }
.bm-toggle__dots i:nth-child(3) { background: var(--ak-citron); }
.bm-toggle__now { font-weight: 500; font-size: 0.82rem; color: #D4B483; padding-left: 0.65rem; border-left: 1px solid rgba(255,255,255,0.22); }
.bm-toggle__chev { font-size: 0.8rem; transition: transform 0.2s ease; }
.brand-mixer:not(.is-collapsed) .bm-toggle__chev { transform: rotate(180deg); }
.bm-panel {
  width: min(460px, calc(100vw - 32px)); padding: 1.1rem; border-radius: 16px;
  background: rgba(8, 13, 24, 0.97); border: 1px solid rgba(245,158,11,0.45);
  box-shadow: 0 26px 60px rgba(0,0,0,0.75); backdrop-filter: blur(14px);
  max-height: min(70vh, 560px); overflow-y: auto;
}
.bm-head { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 0.85rem; }
.bm-head strong { font: 800 1.1rem 'Montserrat', 'Montserrat AKfb', 'Inter', 'Inter AKfb', sans-serif; }
.bm-head span { font-size: 0.86rem; color: var(--p-slate-300); }
.bm-swatches { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem; }
.bm-swatch {
  appearance: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 0.6rem 0.4rem; border-radius: 12px; background: rgba(255,255,255,0.05);
  border: 1.5px solid rgba(255,255,255,0.14); color: var(--p-slate-100); font: 600 0.8rem/1.2 'Inter', 'Inter AKfb', sans-serif; text-align: center;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.bm-swatch:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.45); }
.bm-swatch.is-active { border-color: var(--p-citron); background: rgba(245,158,11,0.14); box-shadow: 0 0 18px -4px rgba(245,158,11,0.6); }
.bm-swatch__chip { width: 100%; height: 30px; border-radius: 8px; display: flex; overflow: hidden; box-shadow: 0 0 0 1px rgba(255,255,255,0.5), 0 0 0 2px rgba(0,0,0,0.35); }
.bm-swatch__chip i { display: block; height: 100%; min-width: 0; }   /* CL-311: exact color blocks, no blend, a fine ring */
html[data-theme="day"] .bm-swatch__chip { box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba(11,25,48,0.25); }
.bm-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.85rem; }
.bm-btn {
  appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 44px; padding: 0.5rem 0.8rem; border-radius: 10px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.22); color: var(--p-linen); font: 600 0.88rem 'Inter', 'Inter AKfb', sans-serif;
}
.bm-btn:hover { border-color: var(--p-amber); }
.bm-btn--primary { background: linear-gradient(180deg, #FBBF24 0%, var(--p-amber) 100%); color: var(--p-obsidian); border-color: var(--p-citron); }
.bm-custom { margin-top: 0.8rem; font-size: 0.86rem; color: var(--p-slate-300); }
.bm-custom summary { cursor: pointer; font-weight: 600; padding: 0.3rem 0; }
.bm-custom__row { display: flex; flex-wrap: wrap; gap: 0.9rem; padding-top: 0.5rem; }
.bm-custom__row label { display: inline-flex; align-items: center; gap: 0.4rem; }
.bm-custom__row input[type="color"] { width: 40px; height: 32px; padding: 0; border: 1px solid rgba(255,255,255,0.3); border-radius: 6px; background: none; cursor: pointer; }
@media (max-width: 760px) {
  .brand-mixer { right: 12px; bottom: 12px; }
  .bm-toggle__now { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bm-toggle, .bm-swatch { transition: none; } }

/* ---------- 4. Mixer chevron pulse + 10 s auto-tuck hint ---------- */
/* Brand Mixer Pulsing Chevron & 10s Auto-Tuck Cue */
@keyframes bmChevronPulse {
  0%, 100% { transform: rotate(180deg) translateY(0); color: var(--p-citron); }
  50% { transform: rotate(180deg) translateY(-3px); color: var(--p-white); }
}
.brand-mixer:not(.is-collapsed) .bm-toggle__chev {
  animation: bmChevronPulse 1.3s ease-in-out infinite;
  display: inline-block;
}
.bm-autohide-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  color: var(--p-slate-400);
  padding-top: 0.55rem;
  margin-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}
.bm-autohide-hint strong {
  color: var(--mx-hi, var(--p-citron));
  cursor: pointer;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}
.bm-autohide-hint strong:hover {
  background: rgba(245, 158, 11, 0.2);
  color: var(--p-white);
}

/* ---------- 5. Random Aura / Random Texture toolbar, bottom left ---------- */
/* New 2-Button Random Aura + Random Texture Floating Dock (Bottom-Left) */
.ak-quick-shuffler {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1650;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(19, 28, 46, 0.96) 0%, rgba(6, 10, 18, 0.98) 100%);
  border: 1.5px solid var(--mx-pri, var(--p-amber));
  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.65),
    0 0 22px -6px color-mix(in srgb, var(--mx-pri, var(--p-amber)) 55%, transparent);
  backdrop-filter: blur(12px);
  font-family: 'Inter', 'Inter AKfb', system-ui, sans-serif;
}
.ak-quick-shuffler__btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--p-linen);
  font: 700 0.78rem/1 'Inter', 'Inter AKfb', sans-serif;
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  white-space: nowrap;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.ak-quick-shuffler__btn:hover {
  transform: translateY(-2px);
  border-color: var(--mx-hi, var(--p-citron));
  background: color-mix(in srgb, var(--mx-pri, var(--p-amber)) 22%, rgba(255, 255, 255, 0.08));
  box-shadow: 0 6px 16px -4px color-mix(in srgb, var(--mx-pri, var(--p-amber)) 55%, transparent);
}
.ak-quick-shuffler__btn:active {
  transform: translateY(0);
}
.ak-quick-shuffler__btn:focus-visible {
  outline: 2px solid var(--mx-hi, var(--p-citron));
  outline-offset: 2px;
}
.ak-quick-shuffler__toast {
  position: absolute;
  left: 8px;
  bottom: calc(100% + 8px);
  background: rgba(6, 10, 18, 0.95);
  color: var(--mx-hi, var(--p-citron));
  border: 1px solid var(--mx-pri, var(--p-amber));
  border-radius: 8px;
  padding: 0.32rem 0.65rem;
  font-family: var(--f-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}
.ak-quick-shuffler__toast.is-showing {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .ak-quick-shuffler {
    left: 10px;
    bottom: 12px;
    padding: 4px;
    gap: 4px;
  }
  .ak-quick-shuffler__btn {
    padding: 0.5rem 0.68rem;
    font-size: 0.72rem;
  }
  .ak-quick-shuffler__btn span.shuf-lbl-full {
    display: none;
  }
  .ak-quick-shuffler__btn span.shuf-lbl-short {
    display: inline !important;
  }
}

/* ---------- 6. "Put it back" (CL-028) ---------- */
/* "Put it back" button in the bottom-left dock; appears once something has changed */
/* Sits just above the dock (never beside it), so it never covers the color-mixer button */
html #akPutItBack {
  display: none; align-items: center; gap: 0.4rem;
  position: absolute; left: 5px; bottom: calc(100% + 8px);
  background: linear-gradient(180deg, #0F2A22 0%, #06120E 100%) !important;
  border: 1.5px solid var(--p-emerald) !important; color: #A7F3D0 !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55), 0 0 18px -4px rgba(16, 185, 129, 0.7);
}
html #akPutItBack.is-showing { display: inline-flex; animation: akPopIn 0.32s cubic-bezier(0.22, 1.35, 0.36, 1); }
html #akPutItBack .shuf-lbl-full { display: inline !important; }
.ak-quick-shuffler:has(#akPutItBack.is-showing) .ak-quick-shuffler__toast { bottom: calc(100% + 52px); }
@keyframes akPopIn { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html #akPutItBack.is-showing { animation: none; } }
@media (max-width: 640px) { html #akPutItBack { min-height: 38px; padding: 0.5rem 0.9rem !important; font-size: 0.82rem !important; } }

/* ---------- 7. Built pages only (html.akp-root, from site/_build/template.html) ---------- */
/* Page tokens the mixer needs; brand colours in akarec-pages.css read var(--mx-*, <default>) so a mix recolours them. */
html.akp-root { --ak-lerp-blue: var(--p-blue); --ak-lerp-sky: var(--ak-sky); }
html.akp-root[data-mix] { --ak-sky: var(--ak-lerp-sky); --ak-gold: var(--mx-pri-deep); }
html.akp-root[data-mix]:not([data-theme="day"]) {
  --ak-border: color-mix(in srgb, var(--mx-pri) 28%, transparent);
  --ak-midnight: color-mix(in srgb, var(--mx-sec-deep) 22%, var(--mx-bg-dark));
}
html.akp-root[data-mix][data-theme="day"] { --ak-midnight: color-mix(in srgb, var(--mx-sec) 8%, #F3F1EC); }
/* the header logo follows the mix (painted before first frame, no flash) */
html.akp-root[data-mix] #solarAmberGrad stop:nth-child(1) { stop-color: var(--mx-hi); }
html.akp-root[data-mix] #solarAmberGrad stop:nth-child(2) { stop-color: var(--mx-pri); }
html.akp-root[data-mix] #solarAmberGrad stop:nth-child(3) { stop-color: var(--mx-logo-sol3); }
html.akp-root[data-mix] #lerpBlueGrad stop:nth-child(1) { stop-color: var(--mx-logo-lb1); }
html.akp-root[data-mix] #lerpBlueGrad stop:nth-child(2) { stop-color: var(--mx-sec); }
html.akp-root[data-mix] #lerpBlueGrad stop:nth-child(3) { stop-color: var(--mx-logo-lb3); }

/* Random Texture on built pages: the finish lies over the page's first section (the hero), like the hero stage on home */
html.akp-root[data-texture] main > section:first-of-type { position: relative; isolation: isolate; }
html.akp-root[data-texture] main > section:first-of-type::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; }
html.akp-root[data-texture="tex-carbon-weave"] main > section:first-of-type::after {
  background-image: radial-gradient(rgba(255,255,255,0.09) 15%, transparent 16%), radial-gradient(rgba(255,255,255,0.09) 15%, transparent 16%), linear-gradient(135deg, rgba(15,23,42,0.55) 0%, rgba(5,7,12,0.35) 100%);
  background-size: 8px 8px, 8px 8px, 100% 100%; background-position: 0 0, 4px 4px, 0 0;
}
html.akp-root[data-texture="tex-architectural-linen"] main > section:first-of-type::after {
  background-image: repeating-linear-gradient(0deg, rgba(250,248,245,0.06) 0px, rgba(250,248,245,0.06) 1px, transparent 1px, transparent 4px), repeating-linear-gradient(90deg, rgba(250,248,245,0.06) 0px, rgba(250,248,245,0.06) 1px, transparent 1px, transparent 4px), linear-gradient(135deg, rgba(30,27,24,0.6) 0%, rgba(12,10,9,0.4) 100%);
}
html.akp-root[data-texture="tex-hammered-gold"] main > section:first-of-type::after {
  background-image: radial-gradient(ellipse at 30% 40%, rgba(253,224,71,0.16) 0%, transparent 50%), radial-gradient(ellipse at 75% 70%, rgba(217,119,6,0.2) 0%, transparent 55%), linear-gradient(135deg, rgba(39,26,7,0.6) 0%, rgba(12,8,2,0.35) 70%, rgba(28,17,4,0.55) 100%);
}
html.akp-root[data-texture="tex-blueprint"] main > section:first-of-type::after {
  background-image: linear-gradient(rgba(56,189,248,0.13) 1px, transparent 1px), linear-gradient(90deg, rgba(56,189,248,0.13) 1px, transparent 1px), linear-gradient(135deg, rgba(7,19,38,0.55) 0%, rgba(4,8,17,0.3) 100%);
  background-size: 28px 28px, 28px 28px, 100% 100%;
}
html.akp-root[data-theme="day"][data-texture="tex-carbon-weave"] main > section:first-of-type::after {
  background-image: radial-gradient(rgba(11,25,48,0.1) 15%, transparent 16%), radial-gradient(rgba(11,25,48,0.1) 15%, transparent 16%), linear-gradient(135deg, rgba(203,213,225,0.45) 0%, rgba(241,245,249,0.2) 100%);
}
html.akp-root[data-theme="day"][data-texture="tex-architectural-linen"] main > section:first-of-type::after {
  background-image: repeating-linear-gradient(0deg, rgba(60,40,10,0.07) 0px, rgba(60,40,10,0.07) 1px, transparent 1px, transparent 4px), repeating-linear-gradient(90deg, rgba(60,40,10,0.07) 0px, rgba(60,40,10,0.07) 1px, transparent 1px, transparent 4px), linear-gradient(135deg, rgba(234,224,205,0.6) 0%, rgba(245,241,233,0.3) 100%);
}
html.akp-root[data-theme="day"][data-texture="tex-hammered-gold"] main > section:first-of-type::after {
  background-image: radial-gradient(ellipse at 30% 40%, rgba(234,179,8,0.22) 0%, transparent 50%), radial-gradient(ellipse at 75% 70%, rgba(217,119,6,0.18) 0%, transparent 55%), linear-gradient(135deg, rgba(254,243,199,0.6) 0%, rgba(253,230,138,0.25) 100%);
}
html.akp-root[data-theme="day"][data-texture="tex-blueprint"] main > section:first-of-type::after {
  background-image: linear-gradient(rgba(3,105,161,0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(3,105,161,0.12) 1px, transparent 1px), linear-gradient(135deg, rgba(224,242,254,0.6) 0%, rgba(240,249,255,0.3) 100%);
}

/* "Save my colors" on built pages: the colour codes to keep, plus the way to the home Brand Studio */
.akmx-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem; background: rgba(3, 6, 12, 0.72); backdrop-filter: blur(6px); }
.akmx-modal[hidden] { display: none; }
.akmx-modal__box {
  width: min(460px, 100%); max-height: calc(100vh - 2rem); overflow-y: auto; display: grid; gap: 0.9rem; padding: 1.5rem; --ak-pop-pt: 1.5rem; --ak-pop-px: 1.5rem; --ak-pop-bg: rgb(8, 13, 24); border-radius: 16px;
  background: rgba(8, 13, 24, 0.98); border: 1px solid color-mix(in srgb, var(--mx-pri, var(--p-amber)) 45%, transparent); color: var(--p-linen);
  font-family: 'Inter', 'Inter AKfb', system-ui, sans-serif; box-shadow: 0 26px 60px rgba(0, 0, 0, 0.75);
}
.akmx-modal__head { display: flex; margin-bottom: -0.3rem; justify-content: space-between; align-items: center; gap: 1rem; }
.akmx-modal__head h2 { font: 800 1.3rem/1.2 'Montserrat', 'Montserrat AKfb', 'Inter', sans-serif; }
.akmx-modal__close { appearance: none; cursor: pointer; min-height: 44px; padding: 0.4rem 0.9rem; border-radius: 999px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.22); color: var(--p-linen); font: 600 0.88rem 'Inter', 'Inter AKfb', sans-serif; }
@media (max-width: 640px) { .akmx-modal__box { --ak-pop-pt: 0.6rem; padding-top: 0.6rem; } }
.akmx-modal p { color: var(--p-slate-300); font-size: 0.95rem; }
.akmx-modal a:not(.ak-button) { color: var(--mx-hi, var(--p-citron)); }
.akmx-codes { list-style: none; display: grid; gap: 0.4rem; font: 600 0.9rem/1.3 'JetBrains Mono', 'JetBrains Mono AKfb', monospace; }
.akmx-codes li { display: flex; align-items: center; gap: 0.6rem; }
.akmx-codes i { width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.3); display: inline-block; }
.akmx-modal .ak-button { width: 100%; }
.akmx-modal .ak-button--ghost { color: var(--p-linen); border-color: rgba(255, 255, 255, 0.3); }

/* CL-154 (Fable): on touch screens the two toolbar buttons are a full 44 px tall (the toolbar never shrinks; CLAUDE.md) */
@media (max-width: 899px), (pointer: coarse) {
  .ak-quick-shuffler__btn { min-height: 44px; }
  .ak-quick-shuffler__btn span.shuf-lbl-short { font-size: 0.84rem; }
  html #akPutItBack { min-height: 44px; }
  .bm-toggle { min-height: 48px; }
}

/* CL-158 (Fable): on narrow phones the two bars stack instead of colliding. "Mix the brand colors" sits at the bottom,
   Random Aura / Random Texture just above it, both full size and fully tappable (neither is shrunk or hidden; CLAUDE.md).
   From 521 px up they fit side by side as before. */
.bm-toggle { white-space: nowrap; }
@media (max-width: 520px) {
  .brand-mixer { right: 10px; bottom: 10px; max-width: calc(100vw - 20px); }
  .ak-quick-shuffler { left: 10px; bottom: 68px; }
  .brand-mixer:not(.is-collapsed) { z-index: 1700; }                       /* the open colour panel lies over the toolbar, not under it */
  html body > footer, html body .akp-footer { padding-bottom: 9.5rem !important; }   /* the last footer links clear both bars */
}

/* ---------- 8. First-visit hints and the one toast (js/akarec-nudges.js, CL-201) ---------- */
/* They sit ABOVE the bars (the script measures where the bars are) and never cover, move or shrink them.
   Dark in Day and in Night, like the bars themselves; the outline and link follow the visitor's mix. */
.ak-hint, .ak-toast {
  position: fixed; z-index: 1590; max-width: min(calc(100vw - 20px), 420px);
  display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.25rem 0.35rem 0.9rem;
  border: 1px solid var(--mx-pri, var(--p-amber)); border-radius: 12px; background: var(--p-navy); color: var(--p-slate-50);
  font: 500 0.86rem/1.4 Inter, 'Inter AKfb', system-ui, sans-serif; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.ak-hint--right { right: 16px; }
.ak-hint--left { left: 16px; }
.ak-toast { left: 50%; transform: translateX(-50%); width: max-content; }
.ak-hint::after { content: ""; position: absolute; bottom: -7px; width: 12px; height: 12px; background: var(--p-navy); border-right: 1px solid var(--mx-pri, var(--p-amber)); border-bottom: 1px solid var(--mx-pri, var(--p-amber)); transform: rotate(45deg); }
.ak-hint--right::after { right: 30px; }
.ak-hint--left::after { left: 30px; }
.ak-hint button, .ak-toast button { flex: none; width: 44px; height: 44px; border: 0; border-radius: 8px; background: none; color: inherit; font-size: 1.25rem; line-height: 1; cursor: pointer; }
.ak-toast a { color: var(--mx-hi, var(--p-citron)); font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .ak-hint, .ak-toast { animation: akHintIn 0.25s ease both; }
  @keyframes akHintIn { from { opacity: 0; translate: 0 6px; } }
}
@media (max-width: 640px) {
  .ak-hint--right { right: 10px; }
  .ak-hint--left { left: 10px; }
}

/* ---------- 9. CL-223 (Frank 2026-11-24): phone dock ----------
   Under 768 px, Random Aura, Random Texture and Put it back sit INSIDE the Mix bar as ONE dock: one row, 52 px tall, 12 px above
   the bottom (plus the iPhone safe area), 12 px gutters. The open mixer is a compact bottom sheet (at most 62% of the screen):
   one-line intro, the four actions first, the ten mixes as a 2-row swipe row, then "Pick my own colors".
   Desktop and tablets from 768 px up are unchanged. js/akarec-brand-mixer.js (mountDock) moves the elements in and out of #bmDock. */
.bm-head__short, .bm-toggle__text--short { display: none; }
html #akPutItBack .shuf-lbl-short { display: none !important; }
.bm-panel[hidden] { display: none; }
@media (max-width: 767px) {
  html body .brand-mixer {
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: none !important;
    align-items: stretch; gap: 8px;
  }
  .bm-dock { position: relative; display: flex; align-items: stretch; gap: 6px; height: 52px; }
  html body .bm-dock .ak-quick-shuffler {
    position: static; display: flex; flex: 0 0 auto; align-items: stretch; gap: 6px; padding: 0; border: 0; background: none; box-shadow: none;
    backdrop-filter: none; -webkit-backdrop-filter: none;
  }
  html body .bm-dock .ak-quick-shuffler__btn, html body .bm-dock #akPutItBack.is-showing {
    position: static; flex-direction: column; justify-content: center; gap: 2px; width: 52px; min-width: 52px; height: 52px; min-height: 52px; padding: 0 !important;
    font: 700 0.62rem/1 'Inter', 'Inter AKfb', sans-serif !important; border-radius: 16px; letter-spacing: 0;
    background: linear-gradient(180deg, #131C2E 0%, var(--p-obsidian) 100%); border: 1.5px solid var(--mx-pri, var(--p-amber));
    box-shadow: 0 8px 20px rgba(0,0,0,0.55);
  }
  html body .bm-dock #akPutItBack { display: none; }
  html body .bm-dock #akPutItBack.is-showing {
    display: inline-flex;
    background: linear-gradient(180deg, #0F2A22 0%, #06120E 100%) !important; border: 1.5px solid var(--p-emerald) !important; color: #A7F3D0 !important;
  }
  html body .bm-dock .ak-quick-shuffler__btn > span:first-child { font-size: 1.15rem; line-height: 1; }
  html body .bm-dock .ak-quick-shuffler__btn span.shuf-lbl-full, html body .bm-dock #akPutItBack .shuf-lbl-full { display: none !important; }
  html body .bm-dock .ak-quick-shuffler__btn span.shuf-lbl-short { display: block !important; font-size: 0.62rem; line-height: 1; }
  html body .bm-dock .bm-toggle {
    flex: 1 1 auto; min-width: 0; min-height: 52px; height: 52px; justify-content: center; gap: 0.45rem; padding: 0 0.6rem; font-size: 0.88rem; border-radius: 16px;
  }
  html body .bm-dock #akPutItBack .shuf-lbl-short { display: block !important; }
  html body .bm-dock .bm-toggle:hover { transform: none; }
  .bm-dock .bm-toggle__dots i { width: 15px; height: 15px; margin-left: -5px; }
  .bm-dock .bm-toggle__dots i:first-child { margin-left: 0; }
  .bm-dock .bm-toggle__text { overflow: hidden; text-overflow: ellipsis; }
  .bm-dock:has(#akPutItBack.is-showing) .bm-toggle__text:not(.bm-toggle__text--short) { display: none; }
  .bm-dock:has(#akPutItBack.is-showing) .bm-toggle__text--short { display: inline; }
  .bm-dock .ak-quick-shuffler__toast, .ak-quick-shuffler:has(#akPutItBack.is-showing) .ak-quick-shuffler__toast { left: 0; bottom: calc(100% + 8px); }
  .bm-dock .ak-quick-shuffler:has(#akPutItBack.is-showing) .ak-quick-shuffler__toast { bottom: calc(100% + 8px); }
  .brand-mixer:not(.is-collapsed) .ak-quick-shuffler__toast { display: none; }

  /* the open mixer: a compact bottom sheet */
  .bm-panel {
    display: flex; flex-direction: column; width: 100%; padding: 0.7rem 0.75rem 0.6rem; border-radius: 16px;
    max-height: 62vh; max-height: 62dvh; overflow-y: auto;
  }
  .bm-panel[hidden] { display: none; }
  .bm-head { order: 1; margin-bottom: 0.5rem; gap: 0; }
  .bm-head strong, .bm-head__long { display: none; }
  .bm-head__short { display: block; font-size: 0.84rem; line-height: 1.3; }
  .bm-actions { order: 2; margin-top: 0; gap: 0.4rem; }
  .bm-btn { min-height: 44px; padding: 0.4rem 0.5rem; font-size: 0.84rem; }
  .bm-swatches {
    order: 3; margin-top: 0.6rem; display: grid; grid-template-columns: none !important; grid-template-rows: repeat(2, auto); grid-auto-flow: column;
    grid-auto-columns: 46%; gap: 0.4rem; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 0.2rem;
    scrollbar-width: thin;
  }
  .bm-swatch { padding: 0.4rem 0.35rem; gap: 0.25rem; font-size: 0.74rem; scroll-snap-align: start; }
  .bm-swatch__chip { height: 20px; }
  .bm-swatch small { display: none; }
  .bm-custom { order: 4; margin-top: 0.4rem; }
  .bm-custom summary { padding: 0.5rem 0; }
  .bm-autohide-hint { order: 5; margin-top: 0.3rem; padding-top: 0.4rem; }
  html body > footer, html body .akp-footer { padding-bottom: 6rem !important; }
}
@media (max-width: 379px) {
  .bm-dock .bm-toggle__text:not(.bm-toggle__text--short) { display: none; }
  .bm-dock .bm-toggle__text--short { display: inline; }
}
