:root {
  --bg: #101211;
  --bg2: #171918;
  --bg3: #202221;
  --text: #eceeed;
  --sub: #adb5b2;
  --gold: #e8b845;
  --gold-bright: #ffd97a;
  --gold-deep: #b7841f;
  --gold-dim: #b7841f;
  --core: #0b0b0c;
  --obsidian: #070a10;
  --green: #34d399;
  --danger: #e5484d;
  --stroke: #373b39;
  --ink: #1a1305;
  color-scheme: dark;
  font-family: ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow-x: clip; }
button, input { font: inherit; color: inherit; }
.app { display: grid; grid-template-rows: auto auto 1fr; height: 100%; }
.topbar, .cmdbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 0;
  box-shadow: inset 0 -1px 0 color-mix(in srgb, var(--gold) 72%, transparent);
  backdrop-filter: blur(22px) saturate(1.35);
  -webkit-backdrop-filter: blur(22px) saturate(1.35);
}
.cmdbar { background: rgba(28,28,34,.9); flex-wrap: wrap; }
.brand { font-weight: 800; letter-spacing: .02em; color: var(--gold); margin-right: 8px; }
.ghost, .icon, .chip, .run {
  border: 1px solid var(--stroke); background: var(--bg2); color: var(--text);
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 13px;
}
.icon { padding: 8px 10px; }
.run { background: linear-gradient(135deg, #f0d78a, var(--gold), var(--gold-dim)); color: var(--ink); border: 0; }
.ghost:hover, .icon:hover, .chip:hover { border-color: var(--gold); }
#docName {
  background: var(--bg2); border: 1px solid var(--stroke); border-radius: 8px;
  padding: 8px 10px; min-width: 180px; max-width: 280px;
}
#commandInput {
  flex: 1; min-width: 220px; background: var(--bg2); border: 1px solid var(--stroke);
  border-radius: 8px; padding: 10px 12px;
}
#commandInput:focus, #docName:focus, #roomId:focus { outline: 1px solid var(--gold); }
.spacer { flex: 1; }
.meta { width: 100%; display: flex; gap: 10px; align-items: center; font-size: 11px; color: var(--sub); margin-top: 2px; }
.tag { color: var(--gold); font-weight: 800; margin-left: auto; }
.chip[data-state="live"] { border-color: var(--green); }
.chip .dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--sub); margin-right: 6px; vertical-align: middle;
}
.chip[data-state="live"] .dot { background: var(--green); }
.chip[data-state="connecting"] .dot { background: var(--gold); }
.chip[data-state="error"] .dot { background: var(--danger); }
#micBtn.hot { border-color: rgba(255,255,255,.55); }
#micBtn.live {
  border-radius: 16px;
  box-shadow: 0 0 0 2px #34d399, 0 0 18px rgba(52, 211, 153, .75);
}
.cmdbar {
  position: absolute; width: 0; height: 0; overflow: hidden;
  margin: 0; padding: 0; border: 0; background: transparent;
  pointer-events: none; z-index: 0;
}
.cmdbar .meta, #commandInput, #runBtn, #roomChip { display: none !important; }
.cmdbar { perspective: 900px; }
.plasma-field {
  position: fixed; inset: 0; z-index: 28; pointer-events: none;
  transform-style: preserve-3d;
}
.plasma {
  position: absolute; left: var(--ox); top: var(--oy);
  width: var(--size); height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255,255,255,.95), rgba(255,246,208,.55) 18%, rgba(232,184,69,.28) 42%, transparent 68%);
  filter: blur(2px);
  animation: emerge 3.4s cubic-bezier(.16,.72,.2,1) infinite;
  animation-delay: var(--delay);
}
.plasma, .plasma-field { display: none !important; }
.voice-orb {
  pointer-events: auto;
  position: static;
  width: 56px; height: 56px; margin: 0;
  padding: 0; border: 0; background: transparent; cursor: pointer;
}
.voice-orb:disabled { cursor: default; }
.spade {
  width: 44px; height: 44px; display: block; border-radius: 12px;
  animation: none;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.4));
}
#voiceStage.listening .plasma,
#voiceStage.speaking .plasma,
#voiceStage.answered .plasma { animation-duration: 1.7s; }
#voiceStage.listening .spade,
#voiceStage.speaking .spade,
#voiceStage.answered .spade { animation-duration: .65s; }
@keyframes emerge {
  0% { transform: translate3d(0, 40px, -160px) scale(.35); opacity: .25; filter: blur(16px); }
  30% { opacity: 1; filter: blur(6px); }
  70% { opacity: .9; filter: blur(1px); }
  100% { transform: translate3d(var(--dx), var(--dy), 260px) scale(1.7); opacity: .15; filter: blur(0); }
}
@keyframes bulge {
  0%, 100% { transform: translateZ(0) scale(1); }
  50% { transform: translateZ(48px) scale(1.12); }
}
@media (prefers-reduced-motion: reduce) {
  .plasma, .spade { animation: none; }
  .plasma { opacity: .55; transform: translate3d(var(--dx), var(--dy), 40px); }
}
@media (forced-colors: active) {
  .plasma { display: none; }
  .voice-orb { border: 2px solid ButtonText; }
}
.view.editor .app { position: relative; }
.view.editor { background: #010205; }
.view.editor .topbar {
  position: relative; z-index: 5;
  top: auto; right: auto; bottom: auto; left: auto;
  width: auto; margin: 0; transform: none;
  padding: 14px 20px;
  border-radius: 0;
  background: #070a10;
  border: 0;
  border-bottom: 1px solid rgba(232,184,69,.32);
  box-shadow: none;
  backdrop-filter: none;
  pointer-events: auto;
}
.view.editor #stageMode,
.view.editor #btnReloadSite,
.view.editor #btnBrandKit,
.view.editor #usageChip,
.view.editor #accountChip,
.view.editor #btnUndo,
.view.editor #btnRedo { display: none !important; }
.view.editor .brand {
  display: block; font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: #ffd97a; background: none;
}
.view.editor #docName {
  display: block; width: 180px; background: transparent; border: 0; box-shadow: none;
  color: #eceeed; font-size: 15px;
}
.view.editor #btnPublish,
.view.editor #btnSettings {
  display: inline-flex; margin: 0; background: transparent; border: 0; box-shadow: none;
  color: #eceeed; border-radius: 999px;
}
.view.editor #btnPublish { color: #ffd97a; }
.workspace { display: grid; grid-template-columns: 1fr 320px; gap: 0; min-height: 0; padding: 0; }
.stage-wrap { position: relative; min-height: 0; background: #010205; border-radius: 0; overflow: hidden; }
.stage-wrap.phone { display: flex; justify-content: center; align-items: stretch; }
.stage-wrap.phone iframe {
  width: 390px; max-width: 100%; height: 100%;
  border-radius: 28px;
  box-shadow: 0 0 0 1px rgba(232,184,69,.4), 0 24px 50px rgba(0,0,0,.45);
}
.rail-link, #liveOpen, .page-row, .prim-row, #roomId, label[for="roomId"], .junk { display: none !important; }
.page-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.page-row button, .live-open {
  border: 1px solid rgba(232,184,69,.35); background: transparent; color: #ffd97a;
  border-radius: 999px; padding: 6px 10px; font-size: 12px; text-decoration: none;
}
.live-open { display: inline-block; margin: 4px 0 12px; }
.view.editor .side {
  display: flex; flex-direction: column; gap: 18px;
  position: relative;
  background: linear-gradient(180deg, #12161c 0%, #070a10 28%, #010205 100%);
  border: 0; border-radius: 0; margin: 0;
  box-shadow: inset 1px 0 0 rgba(232,184,69,.55);
  padding: 28px 22px 32px;
  overflow: auto;
}
.view.editor .side::after {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 1px; pointer-events: none;
  background: linear-gradient(180deg, transparent, #ffd97a 40%, #e8b845 60%, transparent);
  animation: edge-travel 8s ease-in-out infinite;
}
@keyframes edge-travel {
  0% { transform: translateY(-45%); opacity: .35; }
  50% { opacity: 1; }
  100% { transform: translateY(45%); opacity: .35; }
}
.rail-head .spade { width: 56px; height: 56px; border-radius: 14px; }
@media (prefers-reduced-motion: reduce) {
  .view.editor .side::after { animation: none; }
}
#siteFrame {
  width: 100%; height: 100%; border: 0; display: block; background: #070707;
}
#stage { display: none !important; }
.topbar {
  margin: 10px 10px 0;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(7,10,16,.45));
  border: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,217,122,.4), 0 12px 30px rgba(0,0,0,.28);
}
.side {
  border: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(7,10,16,.5));
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255,217,122,.38), 0 16px 36px rgba(0,0,0,.32);
  padding: 16px 14px 24px; overflow: auto;
}
.rail-head { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; }
#inspector.moving { animation: rail-nudge .5s cubic-bezier(.2,.8,.2,1); }
@keyframes rail-nudge {
  0% { transform: translateX(0) scale(1); }
  45% { transform: translateX(10px) scale(1.03); }
  100% { transform: none; }
}
.photo-hit {
  display: flex; align-items: center; justify-content: center;
  height: 72px; margin: 8px 0 12px; border-radius: 16px; cursor: pointer;
  color: #ffd97a; letter-spacing: .08em; text-transform: uppercase; font-size: 11px;
  background: #010205; border: 1px solid rgba(232,184,69,.45);
}
.photo-hit input { display: none; }
.swatches { display: flex; gap: 10px; margin: 4px 0 12px; }
.swatches button {
  width: 36px; height: 36px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid rgba(255,217,122,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 8px 16px rgba(0,0,0,.35);
}
.swatches button:active { transform: scale(1.08); }
.size-row { display: flex; gap: 8px; }
.size-row button {
  flex: 1; height: 40px; border-radius: 12px; cursor: pointer;
  background: transparent; color: #eceeed;
  border: 1px solid rgba(232,184,69,.35);
  transition: transform .35s cubic-bezier(.2,.8,.2,1);
}
.size-row button:active { transform: scale(1.06); }
#exactText {
  width: 100%; min-height: 120px; margin-top: 12px; resize: vertical;
  background: #010205; color: #eceeed; border: 1px solid rgba(232,184,69,.35);
  border-radius: 14px; padding: 12px; font: 15px/1.45 ui-sans-serif, system-ui, sans-serif;
}
.rail-head img { width: 52px; height: 52px; border-radius: 14px; }
.rail-kicker { margin: 0; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-bright); }
.grok-live {
  margin: 4px 0 0; color: #ffd97a; font-size: 12px; letter-spacing: .2em; font-weight: 700;
  animation: grok-pulse 1.6s ease-in-out infinite;
}
@keyframes grok-pulse { 50% { opacity: .45; } }
.rail-title { margin: 2px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -.02em; text-transform: capitalize; }
.rail-sub { margin: 2px 0 14px; color: var(--sub); font-size: 13px; }
.rail-link {
  margin: 0 0 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: color-mix(in srgb, var(--sub) 80%, transparent); font-size: 11px;
}
.prim-row { margin-top: 8px; }
.side code { font-size: 11px; color: var(--gold); }
.kv {
  display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: baseline;
  gap: 8px; padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--gold) 16%, transparent);
  font-size: 12px;
}
.kv:last-child { border-bottom: 0; }
.kv b { font-size: 10px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--sub); }
.kv span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: end; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; color: var(--sub); }
.prim-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.prim-row .ghost {
  min-height: 40px; border-radius: 12px;
  background: color-mix(in srgb, white 5%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 34%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 28%, transparent);
}
.topbar .ghost, .topbar .icon, #docName, #stageMode {
  border-radius: 12px;
  background: color-mix(in srgb, white 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
  box-shadow: inset 0 1px 0 color-mix(in srgb, white 32%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.muted { color: var(--sub); font-size: 12px; line-height: 1.45; }
#roomId {
  width: 100%; margin: 8px 0 12px; background: var(--bg2); border: 1px solid var(--stroke);
  border-radius: 8px; padding: 8px 10px; font-size: 12px;
}
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--bg3); border: 1px solid var(--gold); color: var(--text);
  padding: 10px 16px; border-radius: 12px; font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 40px rgba(0,0,0,.45); z-index: 80;
}
@media (max-width: 980px) {
  .view.editor .workspace { grid-template-columns: 1fr; grid-template-rows: minmax(70dvh, 1fr) auto; }
  .view.editor .stage-wrap { min-height: 70dvh; }
  .view.editor .side { max-height: 28dvh; border-left: 0; border-top: 1px solid rgba(232,184,69,.4); }
}

/* BYOK settings + connect banner */
.connect-banner[hidden] { display: none !important; }
.connect-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; background: rgba(226, 85, 85, 0.12);
  border-bottom: 1px solid rgba(226, 85, 85, 0.45); color: var(--text);
  font-size: 13px;
}
.connect-banner strong { color: #f0a0a0; }
.connect-banner span { color: var(--sub); flex: 1; min-width: 180px; }
.settings-panel {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.settings-panel[hidden] { display: none !important; }
.settings-card {
  width: min(440px, 100%); background: var(--bg2); border: 1px solid var(--gold);
  border-radius: 16px; padding: 18px 18px 16px; box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
.settings-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.settings-head h2 { margin: 0; font-size: 16px; color: var(--gold); }
.settings-card a { color: var(--gold); }
#apiKeyInput {
  width: 100%; margin: 6px 0 12px; background: var(--bg); border: 1px solid var(--stroke);
  border-radius: 8px; padding: 10px 12px; font-size: 13px; font-family: ui-monospace, Menlo, monospace;
}
.settings-actions { display: flex; gap: 8px; margin-bottom: 10px; }
button:disabled, .run:disabled, .icon:disabled {
  opacity: 0.45; cursor: not-allowed; filter: grayscale(0.3);
}

/* Full product views */
.view[hidden] { display: none !important; }

/* Post-sign-in starting point */
.view.gallery { min-height: 100dvh; background: #090c0b; color: #f5f2e9; font-family: Inter, ui-sans-serif, system-ui, sans-serif; }
.gallery-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem clamp(1.25rem, 4vw, 4.5rem); border-bottom: 1px solid #344039; }
.gallery-head .bl-nav-name { color: #f5f2e9; text-decoration: none; }
.gallery-account { max-width: 50%; color: #aebcb2; font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-main { max-width: 90rem; padding: clamp(2rem, 5vw, 5rem) clamp(1.25rem, 4vw, 4.5rem) 7rem; margin: auto; }
.gallery-kicker { margin: 0 0 .9rem; color: #d7b967; font-size: .72rem; letter-spacing: .18em; font-weight: 800; text-transform: uppercase; }
.gallery-main > h1 { margin: 0; font-size: clamp(2.8rem, 6vw, 5.5rem); line-height: 1; letter-spacing: -.065em; }
.gallery-intro { color: #b6c1b9; font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.5; }
.gallery-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-block: 2rem 4.5rem; }
.gallery-plan { display: flex; flex-direction: column; min-width: 0; min-height: 18rem; padding: clamp(1.15rem, 2vw, 1.7rem); border: 1px solid #38463c; border-radius: .75rem; background: #111914; }
.gallery-plan-lifetime { border-color: #a9864d; background: linear-gradient(145deg, #29251b, #171a14 70%); }
.gallery-plan-eyebrow { margin: 0 0 1rem; color: #d7b967; font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.gallery-plan h2 { margin: 0; font-size: clamp(1.45rem, 2vw, 2rem); letter-spacing: -.04em; }
.gallery-plan-price { margin: .55rem 0 .8rem; color: #f7e6aa; font-size: clamp(2rem, 3vw, 2.75rem); font-weight: 760; letter-spacing: -.06em; line-height: 1; }
.gallery-plan-price span { color: #b8c4ba; font-size: .85rem; font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.gallery-plan .gallery-plan-detail { margin: 0 0 1.5rem; color: #b8c4ba; font-size: .88rem; line-height: 1.5; }
.gallery-plan-action { width: 100%; min-height: 3rem; margin-top: auto; padding: .7rem .8rem; border: 1px solid #bda166; border-radius: .38rem; background: transparent; color: #f5e7b5; font: inherit; font-size: .78rem; font-weight: 780; cursor: pointer; }
.gallery-plan-action:hover { background: #e8c467; color: #171b16; }
.gallery-plan-action:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.gallery-plan-action:disabled { opacity: .6; cursor: default; }
.gallery-plan-action:disabled:hover { background: transparent; color: #f5e7b5; }
.gallery-plan-lifetime .gallery-plan-action { background: #e8c467; color: #171b16; }
.gallery-plan-lifetime .gallery-plan-action:hover { background: #f4d990; }
.gallery-primary, .template-action { display: inline-flex; align-items: center; justify-content: center; min-height: 2.9rem; padding: .72rem 1.2rem; border: 1px solid #e8c467; border-radius: .35rem; background: #e8c467; color: #171b16; font: inherit; font-size: .88rem; font-weight: 800; cursor: pointer; text-align: center; white-space: nowrap; }
.gallery-primary:hover, .template-action:hover { background: #f3d990; }
.gallery-primary:focus-visible, .template-action:focus-visible, .gallery a:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.gallery-primary:disabled, .template-action:disabled { opacity: .55; cursor: wait; }
.gallery-section-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 1.3rem; }
.gallery-section-head h2, .gallery-offers h2 { margin: 0; font-size: clamp(2rem, 3.8vw, 3.6rem); letter-spacing: -.06em; }
.gallery-section-head > p { color: #aab7ad; margin: 0 0 .3rem; }
.gallery-controls { display: flex; align-items: end; gap: 1rem; margin: 0 0 1.3rem; flex-wrap: wrap; }
.gallery-controls label { display: grid; gap: .45rem; min-width: min(100%, 16rem); color: #c7d3ca; font-size: .78rem; font-weight: 750; }
.gallery-controls input, .gallery-controls select { width: 100%; min-height: 2.9rem; padding: .65rem .85rem; border: 1px solid #526356; border-radius: .35rem; background: #141b17; color: #f5f2e9; font: inherit; font-size: .9rem; }
.gallery-controls input:focus-visible, .gallery-controls select:focus-visible { outline: 3px solid #e8c467; outline-offset: 2px; }
.gallery-count { margin-inline-start: auto; padding-bottom: .7rem; color: #b8c6bb; font-size: .83rem; }
.template-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.2rem; }
.template-card { min-width: 0; overflow: hidden; border: 1px solid #35443b; border-radius: .7rem; background: #141b17; }
.template-preview { position: relative; aspect-ratio: 1.5; overflow: hidden; background: #242924; }
.template-preview img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.template-preview video { display: block; width: 100%; height: 100%; object-fit: cover; }
.template-motion-label { position: absolute; z-index: 1; right: .65rem; bottom: .65rem; padding: .32rem .55rem; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; background: rgba(10,15,13,.78); color: #fff; font-size: .65rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.template-card-body { padding: 1.15rem; }
.template-card .category { margin: 0 0 .4rem; color: #d7b967; font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.template-card h3 { margin: 0 0 .4rem; font-size: 1.4rem; letter-spacing: -.04em; }
.template-card .line { min-height: 2.7rem; margin: 0 0 1rem; color: #b0beb3; font-size: .88rem; line-height: 1.5; }
.template-action { width: 100%; background: transparent; color: #f5e7b5; }
.template-action:hover { color: #161b16; }
.template-card[data-owned="true"] .template-action { background: #e8c467; color: #171b16; }
.gallery-pack { display: flex; justify-content: space-between; align-items: center; gap: 2rem; margin-top: 1.5rem; padding: 1.35rem 1.5rem; border: 1px solid #7d6742; border-radius: .6rem; background: #242018; }
.gallery-pack strong { font-size: 1.15rem; }
.gallery-pack p { color: #d2c4a9; font-size: .88rem; margin: .35rem 0 0; }
.gallery-status { min-height: 1.5rem; color: #f0d68d; }
.recent-projects { border-top: 1px solid #344039; padding-top: 2rem; margin-top: 3rem; }
.recent-projects h2 { font-size: 1.5rem; }
#recentProjects { display: flex; flex-wrap: wrap; gap: .65rem; }
#recentProjects button { padding: .7rem 1rem; background: #1d2821; border: 1px solid #526356; border-radius: .35rem; color: #f5f2e9; font: inherit; cursor: pointer; }
.gallery-load-more { margin-top: 1rem; min-height: 3rem; padding: .65rem 1rem; border: 1px solid #8c784c; border-radius: .35rem; background: transparent; color: #f5e7b5; font: inherit; font-weight: 700; cursor: pointer; }
.gallery-load-more:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.gallery-offers { margin-top: 5rem; padding-top: 2.7rem; border-top: 1px solid #344039; }
.offer-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1rem; margin-top: 1.5rem; }
.offer-card { padding: 1.3rem; border: 1px solid #35443b; border-radius: .6rem; background: #111713; }
.offer-card h3 { margin: 0 0 .5rem; font-size: 1.13rem; }
.offer-card p { color: #afbbb1; font-size: .85rem; line-height: 1.5; }
.offer-card .offer-price { margin: 1.2rem 0 .2rem; color: #e8c467; font-weight: 800; font-size: 1.15rem; }
.offer-link { display: inline-block; color: #f5e7b5; font-size: .82rem; font-weight: 750; margin-top: .6rem; text-underline-offset: .25rem; }
.gallery-back { margin-inline-start: .7rem; }
@media(max-width: 70rem) { .gallery-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media(max-width: 60rem) { .template-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .offer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width: 40rem) { .gallery-plans, .template-grid, .offer-grid { grid-template-columns: 1fr; } .gallery-plan { min-height: 0; } .gallery-pack, .gallery-section-head { align-items: stretch; flex-direction: column; gap: 1.2rem; } .gallery-main { padding-top: 2.5rem; } .gallery-controls label { width: 100%; } .gallery-count { margin-inline-start: 0; } }
.view.editor {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
}
.view.editor .app { height: 100%; min-height: 0; }
.view.editor .workspace { height: 100%; min-height: 0; overflow: hidden; }
.view.editor .stage-wrap { height: 100%; min-height: 0; }
.view.editor .side { min-height: 0; max-height: 100%; overflow: auto; }
body:has(#view-editor:not([hidden])) { overflow: hidden; }
.wizard {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 32px 16px; background:
    radial-gradient(1200px 600px at 20% -10%, rgba(217,182,92,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(111,208,140,.08), transparent 50%),
    var(--bg);
}
.landing-card, .wizard-card {
  width: min(520px, 100%); background: rgba(20,20,24,.92); border: 1px solid var(--stroke);
  border-radius: 20px; padding: 28px 26px; box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.brand.lg { font-size: 28px; font-weight: 800; color: var(--gold); }
.tagline { font-size: 18px; margin: 10px 0 8px; }
.landing-actions, .row { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 10px; }
.run.lg, .ghost.lg { padding: 12px 18px; font-size: 14px; }
.fine { font-size: 11px; margin-top: 18px; }
.email-gate { margin-top: 12px; display: grid; gap: 8px; }
.email-gate input, .wizard-card input, .panel input {
  width: 100%; background: var(--bg); border: 1px solid var(--stroke);
  border-radius: 10px; padding: 10px 12px; margin: 6px 0 10px;
}
.wizard-steps { display: flex; gap: 10px; margin-bottom: 18px; }
.wstep { font-size: 12px; color: var(--sub); padding: 6px 10px; border-radius: 999px; border: 1px solid var(--stroke); }
.wstep.on { color: var(--ink); background: var(--gold); border-color: var(--gold); font-weight: 700; }
.wizard-card h1 { margin: 0 0 8px; font-size: 22px; }
.wizard-card h3 { margin: 0 0 6px; font-size: 14px; color: var(--gold); }
.panel { border: 1px solid var(--stroke); border-radius: 14px; padding: 14px; margin: 14px 0; background: rgba(0,0,0,.2); }
.instructions { padding-left: 18px; }
.status { min-height: 1.2em; color: var(--gold); font-size: 13px; }
.ghost.sm { padding: 6px 10px; font-size: 12px; }
#stageMode {
  background: var(--bg2); border: 1px solid var(--stroke); border-radius: 999px;
  padding: 8px 12px; color: var(--text);
}
.connect-banner[hidden] { display: none !important; }

/* Auth + PAYG */
.fine-top { margin: 8px 0 0; font-size: 12px; color: var(--gold); }
.auth-gate { margin-top: 16px; display: grid; gap: 6px; }
.auth-gate[hidden] { display: none !important; }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 8px; }
.auth-tab {
  border: 1px solid var(--stroke); background: var(--bg); color: var(--sub);
  border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 12px; font-weight: 600;
}
.auth-tab.on { background: var(--gold); color: var(--ink); border-color: var(--gold); }
#btnGuest { margin-top: 8px; width: 100%; }
.usage-chip, .account-chip {
  font-size: 11px; font-weight: 700; color: var(--sub);
  border: 1px solid var(--stroke); border-radius: 999px; padding: 6px 10px;
  white-space: nowrap;
}
.usage-chip.warn { color: #f0d78a; border-color: var(--gold); }
.usage-chip.gated { color: #f0a0a0; border-color: var(--danger); }
.account-chip.authed { color: var(--green); border-color: rgba(111,208,140,.45); }
.payg-banner[hidden] { display: none !important; }
.payg-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; background: rgba(217,182,92,.12);
  border-bottom: 1px solid rgba(217,182,92,.45); color: var(--text); font-size: 13px;
}
.payg-banner strong { color: var(--gold); }
.payg-banner span { color: var(--sub); flex: 1; min-width: 160px; }
.payg-gate {
  position: absolute; inset: 0; z-index: 12;
  background: rgba(7,7,9,.72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.payg-gate[hidden] { display: none !important; }
.payg-card {
  width: min(420px, 100%); background: var(--bg2); border: 1px solid var(--gold);
  border-radius: 18px; padding: 22px 20px; text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.55);
}
.payg-card h2 { margin: 0 0 8px; color: var(--gold); font-size: 20px; }
.payg-card .price { color: var(--gold); font-weight: 800; margin: 12px 0 16px; }
.settings-hr { border: 0; border-top: 1px solid var(--stroke); margin: 12px 0; }
#btnSignOut { margin-top: 10px; width: 100%; }

.domain-results { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.domain-results .domain-pick { text-align: left; }
#resetLinkBox { margin-top: 10px; }
#siteUrlHint, #previewUrlHint { word-break: break-all; }

.byok-advanced { margin: 16px 0; padding: 12px; border: 1px solid rgba(217,182,92,.25); border-radius: 10px; }
.byok-advanced summary { cursor: pointer; color: var(--gold); margin-bottom: 8px; }
#btnConnectGrokBot { width: 100%; margin: 8px 0 4px; }

/* One-button Grok Bot */
.grokbot-panel {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #2a2a32;
  background: #121218;
}
.user-code {
  font-size: 28px;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--gold);
  margin: 10px 0;
  text-align: center;
}
.advanced-byok {
  margin-top: 18px;
  border-top: 1px solid #2a2a32;
  padding-top: 12px;
  color: var(--sub);
}
.advanced-byok summary {
  cursor: pointer;
  color: var(--muted, #8b8b96);
  font-size: 13px;
  margin-bottom: 10px;
}
.advanced-byok[open] summary { color: var(--gold); }

/* ===== Grok Bot dock (in-editor) ===== */
.grokbot-dock {
  display: flex;
  flex-direction: column;
  min-height: 0;
  gap: 0;
}
.gb-head { align-items: flex-start; gap: 10px; }
.gb-head-text { flex: 1; min-width: 0; }
.gb-status {
  font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  border-radius: 999px; padding: 5px 8px; border: 1px solid var(--stroke); color: var(--sub);
  white-space: nowrap; margin-top: 4px;
}
.gb-status[data-state="connected"] { color: var(--green); border-color: rgba(111,208,140,.5); }
.gb-status[data-state="live"] {
  color: #052e1c;
  background: var(--green);
  border-color: var(--green);
}
.gb-status[data-state="live"]::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #052e1c;
  box-shadow: 0 0 0 3px rgba(5, 46, 28, .25);
}
.gb-status[data-state="working"] { color: var(--gold); border-color: rgba(217,182,92,.55); }
.gb-status[data-state="speaking"] { color: #9ecbff; border-color: rgba(120,170,255,.45); }
.gb-status[data-state="disconnected"] { color: #f0a0a0; border-color: rgba(240,160,160,.35); }
.gb-tabs {
  display: flex; gap: 6px; padding: 8px 0 10px; border-bottom: 1px solid var(--stroke); margin-bottom: 8px;
}
.gb-tab {
  flex: 1; border: 1px solid var(--stroke); background: transparent; color: var(--sub);
  border-radius: 10px; padding: 8px 10px; font-weight: 700; cursor: pointer; font-size: 12px;
}
.gb-tab.on { color: var(--gold); border-color: rgba(217,182,92,.55); background: rgba(217,182,92,.08); }
.gb-chat-pane {
  display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 8px;
}
.gb-thread {
  flex: 1; min-height: 180px; max-height: min(52vh, 520px); overflow: auto;
  padding: 8px 2px; display: flex; flex-direction: column; gap: 10px;
}
.gb-empty {
  margin: auto; text-align: center; color: var(--sub); font-size: 13px; padding: 24px 12px; line-height: 1.45;
}
.gb-msg { display: flex; gap: 8px; max-width: 100%; }
.gb-user { justify-content: flex-end; }
.gb-bot { justify-content: flex-start; align-items: flex-start; }
.gb-avatar {
  width: 28px; height: 28px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(145deg, #2a2a32, #121218);
  border: 1px solid rgba(217,182,92,.35);
}
.gb-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 92%; }
.gb-name { font-size: 10px; font-weight: 800; color: var(--gold); letter-spacing: .06em; text-transform: uppercase; }
.gb-bubble {
  border-radius: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.4;
  border: 1px solid var(--stroke); background: #121218; color: var(--text);
  white-space: pre-wrap; word-break: break-word;
}
.gb-user .gb-bubble {
  background: rgba(217,182,92,.14); border-color: rgba(217,182,92,.4); color: var(--text);
}
.gb-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.gb-chip {
  font-size: 10px; font-weight: 700; color: var(--sub);
  border: 1px solid var(--stroke); border-radius: 999px; padding: 3px 8px;
}
.share-screen { width: 100%; margin: 8px 0 0; }
.share-screen.on { border-color: rgba(217,182,92,.7); color: #ffd97a; }
.gb-composer {
  display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end;
  padding-top: 8px; border-top: 1px solid var(--stroke);
}
.gb-composer textarea {
  width: 100%; resize: none; min-height: 52px; max-height: 120px;
  border-radius: 12px; border: 1px solid var(--stroke); background: #0c0c10;
  color: var(--text); padding: 10px 12px; font: inherit; font-size: 13px;
}
.gb-composer textarea:focus { outline: none; border-color: rgba(217,182,92,.55); }
.gb-composer .run { height: 40px; padding: 0 14px; }
.gb-gate {
  border: 1px solid rgba(217,182,92,.4); background: rgba(217,182,92,.08);
  border-radius: 12px; padding: 12px; margin-bottom: 4px;
}
.gb-gate .run { width: 100%; margin-top: 8px; }
.gb-inspect-pane { display: flex; flex-direction: column; gap: 8px; overflow: auto; min-height: 0; flex: 1; }
.gb-inspect-pane[hidden], .gb-chat-pane[hidden], .gb-gate[hidden] { display: none !important; }


/* Per-user install & configure */
.install-panel { margin: 12px 0 18px; padding: 14px; border: 1px solid rgba(217,182,92,.28); border-radius: 12px; background: rgba(0,0,0,.22); }
.install-panel.compact { margin: 8px 0 14px; padding: 10px 12px; }
.install-h2 { margin: 18px 0 8px; font-size: 15px; color: var(--gold); font-weight: 600; }
.install-steps { margin: 0 0 14px; padding-left: 1.2rem; color: var(--muted, #a8a8b0); line-height: 1.45; }
.install-steps.compact { font-size: 13px; }
.install-steps li { margin: 0 0 8px; }
.install-checklist { list-style: none; margin: 0; padding: 0; }
.install-checklist li { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; font-size: 14px; }
.install-checklist .mark { width: 1.4em; flex: none; color: var(--gold); font-weight: 700; }
.install-checklist li.ok .mark { color: #6dcf8a; }
.install-checklist li.todo .mark { color: #888; }
.install-checklist-wrap { margin: 8px 0; }
.linkish { display: inline-block; margin-left: 8px; text-decoration: none; }
.install-guide h1 { margin: 8px 0 10px; font-size: 24px; }

/* inspect-unhide — show prim/page rows inside Grok Bot Inspect */
.gb-inspect-pane .prim-row,
.gb-inspect-pane .page-row,
#grokBotInspectPane .prim-row,
#grokBotInspectPane .page-row {
  display: flex !important;
}

/* Money / pricing */
.pricing-block { margin: 22px 0 8px; text-align: left; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 10px; }
.price-card { border: 1px solid rgba(217,182,92,.28); border-radius: 12px; padding: 14px; background: rgba(0,0,0,.2); }
.price-card.featured { border-color: rgba(217,182,92,.7); box-shadow: 0 0 0 1px rgba(217,182,92,.25); }
.price-card h3 { margin: 0 0 6px; font-size: 14px; color: var(--gold); }
.price-card .price { margin: 0 0 6px; font-size: 28px; font-weight: 700; }

/* Editor chrome — one surface, no stacked boxes */
.view.editor .topbar {
  background: #070a10;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: none;
  padding: 12px 22px;
}
.view.editor .connect-banner {
  position: relative;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 7px 22px;
  gap: 14px;
  font-size: 13px;
}
.view.editor .connect-banner strong {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.view.editor .connect-banner span {
  flex: 1 1 auto;
  min-width: 0;
  color: #9aa19c;
}
.view.editor .connect-banner .run,
.view.editor .connect-banner .ghost {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #ffd97a;
  padding: 0;
  border-radius: 0;
  font-size: 13px;
  font-weight: 560;
}
.view.editor .side {
  background: #090b0e;
  box-shadow: inset 1px 0 0 rgba(255,255,255,.06);
  padding: 18px 18px 14px;
  gap: 0;
}
.view.editor .side::after { display: none; }
.view.editor .gb-head {
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.view.editor .voice-orb { width: 40px; height: 40px; }
.view.editor .rail-head .spade,
.view.editor .rail-head img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: none;
  filter: none;
}
.view.editor #micBtn.live {
  border-radius: 12px;
  box-shadow: 0 0 0 1px #34d399, 0 0 14px rgba(52,211,153,.4);
}
.view.editor .rail-kicker {
  font-size: 10px;
  letter-spacing: .14em;
  color: #8d948f;
}
.view.editor .rail-title {
  margin: 1px 0 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.view.editor .rail-sub { margin: 2px 0 0; font-size: 12px; }
.view.editor .gb-status {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
}
.view.editor .gb-status[data-state="live"],
.view.editor .gb-status[data-state="connected"] {
  color: #34d399;
  background: transparent;
  border: 0;
}
.view.editor .gb-status[data-state="live"]::before,
.view.editor .gb-status[data-state="disconnected"]::before,
.view.editor .gb-status[data-state="connected"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: none;
}
.view.editor .gb-tabs {
  gap: 18px;
  padding: 0;
  margin: 0 0 10px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.view.editor .gb-tab {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 8px 0 9px;
  color: #8d948f;
  font-weight: 550;
  box-shadow: none;
}
.view.editor .gb-tab.on {
  color: #eceeed;
  background: transparent;
  border: 0;
  box-shadow: inset 0 -1px 0 #eceeed;
}
.view.editor .gb-empty {
  margin: 8px 0 auto;
  text-align: left;
  padding: 4px 0 16px;
}
.view.editor .gb-bubble,
.view.editor .gb-user .gb-bubble {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
}
.view.editor .gb-avatar { display: none; }
.view.editor .gb-gate {
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 0 0 8px;
}
.view.editor .gb-gate .run {
  width: auto;
  margin-top: 8px;
  background: transparent;
  color: #ffd97a;
  border: 0;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.view.editor .share-screen {
  width: auto;
  align-self: flex-start;
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #8d948f;
  font-size: 12px;
  font-weight: 550;
}
.view.editor .gb-composer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 4px 4px 4px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.045);
}
.view.editor .gb-composer textarea {
  flex: 1;
  min-height: 36px;
  max-height: 88px;
  border: 0;
  background: transparent;
  border-radius: 0;
  padding: 8px 0;
}
.view.editor .gb-composer textarea:focus { border: 0; }
.view.editor .gb-composer .run {
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: #ffd97a;
  color: #1a1305;
  box-shadow: none;
}
.view.editor .size-row,
.view.editor .prim-row,
.view.editor .page-row { gap: 14px; }
.view.editor .size-row button,
.view.editor .prim-row .ghost,
.view.editor .page-row button {
  flex: 0 0 auto;
  height: auto;
  min-height: 0;
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #c8cdc9;
}
@media (max-width: 980px) {
  .view.editor .side { border-top: 1px solid rgba(255,255,255,.08); }
}
.price-card button { width: 100%; margin-top: 8px; }

/* Landing — guide css-layout: grid for the window, flex for the nav, container query type. */
.view.landing {
  display: block;
  min-block-size: 100dvb;
  padding: 0;
  background: #070707;
  max-inline-size: 100%;
}
body:has(#view-landing:not([hidden])) {
  block-size: auto;
  background: #070707;
}
.bl-site {
  position: relative;
  color: #f7f3ea;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #070707;
  max-inline-size: 100%;
}
.bl-nav {
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-block-size: 4rem;
  padding-block: 0.85rem;
  padding-inline: clamp(1.25rem, 5cqi, 7vw);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent);
  border: 0;
}
#work,
.bl-moves {
  scroll-margin-block-start: 4.5rem;
}
.bl-nav-name {
  color: #f7f3ea;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  min-inline-size: 0;
}
.bl-nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-inline-size: 0;
}
.bl-nav-links a,
.bl-nav-links button {
  border: 0;
  background: none;
  padding-block: 0.5rem;
  padding-inline: 0;
  color: #f7f3ea;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
}
.bl-nav-links a:hover,
.bl-nav-links button:hover { color: #e8b845; }
.bl-nav a:focus-visible,
.bl-nav button:focus-visible,
.bl-sign-in:focus-visible,
.signin-screen a:focus-visible,
.signin-screen button:focus-visible,
.signin-screen input:focus-visible {
  outline: 2px solid #e8b845;
  outline-offset: 3px;
}
.store-frame {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-block-size: 100dvb;
  max-inline-size: 100%;
  min-inline-size: 0;
  padding-block: 7.5rem 3rem;
  padding-inline: 1.25rem;
  background: #050505;
  text-align: center;
}
.store-glass {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  min-inline-size: 0;
  max-inline-size: 16em;
}
.store-hours {
  margin: 0;
  color: rgba(244, 240, 232, 0.72);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.bl-sign {
  margin: 0;
  color: #f4f0e8;
  font-size: clamp(4.6rem, 16cqi, 8.4rem);
  font-weight: 500;
  line-height: 0.86;
  letter-spacing: -0.05em;
  text-wrap: balance;
}
.store-line {
  margin: 0;
  max-inline-size: 18rem;
  color: rgba(244, 240, 232, 0.78);
  font-size: 1.05rem;
  line-height: 1.4;
  text-wrap: balance;
}
.store-cases {
  display: block;
  inline-size: min(640px, 100%);
  block-size: auto;
  margin-block-start: 0.5rem;
}
.bl-sign-in {
  margin-block-start: 0.35rem;
  border: 0;
  border-block-end: 1px solid rgba(247, 243, 234, 0.7);
  background: none;
  padding-block: 0.35rem 0.3rem;
  padding-inline: 0;
  color: #f7f3ea;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}
.bl-work {
  padding-block: 6rem 5rem;
  padding-inline: clamp(1.25rem, 5cqi, 8vw);
  background: #070707;
}
.bl-kicker {
  margin: 0 0 1.1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 650;
  color: #f0d078;
}
.bl-work h2 {
  margin: 0;
  max-inline-size: 12ch;
  font-size: clamp(2.6rem, 7cqi, 5.2rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 600;
  text-wrap: balance;
}
.bl-prose {
  max-inline-size: 38rem;
  margin-block-start: 2rem;
}
.bl-prose p {
  margin: 0 0 1.1rem;
  font-size: 1.15rem;
  line-height: 1.55;
  color: rgba(247, 243, 234, 0.9);
}
.bl-night-line {
  align-self: end;
  justify-self: start;
  margin: 0;
  padding-block: 8vh 1.5rem;
  padding-inline: clamp(1.25rem, 6cqi, 6rem);
  max-inline-size: 12ch;
  color: #f8f1df;
  font-size: clamp(2.6rem, 8cqi, 5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 600;
  text-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
  text-wrap: balance;
}
.bl-moves {
  padding-block: 1.5rem 1.25rem;
  padding-inline: clamp(1.25rem, 5cqi, 8vw);
  background: #070707;
}
.bl-moves ol {
  list-style: none;
  margin: 0;
  padding: 0;
  max-inline-size: 46rem;
}
.bl-moves li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 2rem;
  border-block-start: 1px solid rgba(255, 255, 255, 0.14);
  min-inline-size: 0;
}
.bl-moves li:last-child { border-block-end: 1px solid rgba(255, 255, 255, 0.14); }
.bl-moves li span {
  padding-block-start: 0.45rem;
  color: #f0d078;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.16em;
}
.bl-moves h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3cqi, 2.35rem);
  font-weight: 600;
  letter-spacing: -0.03em;
}
.bl-moves li p {
  margin: 0.5rem 0 0;
  max-inline-size: 36rem;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(247, 243, 234, 0.86);
}
.bl-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding-block: 1.75rem 3rem;
  padding-inline: clamp(1.25rem, 5cqi, 8vw);
  color: rgba(247, 243, 234, 0.62);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: #070707;
}
.bl-foot nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.bl-foot a { color: inherit; text-decoration: none; }
.bl-foot a:hover { color: #f7f3ea; }
.bl-foot a:focus-visible { outline: 2px solid #e8b845; outline-offset: 3px; }

.view.signin {
  min-block-size: 100dvb;
  color: #f4f0e8;
  background: #050505;
}
.signin-screen {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  box-sizing: border-box;
  inline-size: min(100%, 28rem);
  margin-inline: auto;
  padding-block: 10vh 3rem;
  padding-inline: 1.25rem;
  min-inline-size: 0;
}
.bl-auth-title {
  margin: 0.4rem 0 0.2rem;
  font-size: clamp(2.4rem, 12cqi, 3.75rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: #f7f3ea;
  text-wrap: balance;
}
.signin-screen .auth-gate,
.signin-screen #authGate,
.signin-screen #resetPanel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  inline-size: 100%;
  min-inline-size: 0;
  margin: 0;
}
.signin-alt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.15rem;
  margin: 0.25rem 0 0;
}
.signin-screen .auth-tab {
  border: 0;
  background: none;
  padding: 0.25rem 0;
  color: rgba(247, 243, 234, 0.62);
  font-size: 0.95rem;
  font-weight: 550;
  text-decoration: none;
}
.signin-screen .auth-tab.on { color: #f7f3ea; }
.bl-guest,
#btnShowPassword {
  border: 0;
  background: none;
  padding: 0.35rem 0;
  color: rgba(247, 243, 234, 0.72);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: start;
}
.bl-guest:hover,
#btnShowPassword:hover { color: #f7f3ea; }
.signin-screen label {
  color: rgba(247, 243, 234, 0.78);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.signin-screen input {
  inline-size: 100%;
  max-inline-size: 100%;
  min-inline-size: 0;
  background: transparent;
  border: 0;
  border-block-end: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 0;
  padding-block: 0.65rem 0.75rem;
  padding-inline: 0;
  color: #f7f3ea;
  font-size: 1rem;
}
.signin-screen input:focus { outline: none; border-block-end-color: #e8b845; }
.google-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  inline-size: 100%;
  min-block-size: 2.75rem;
  margin-block-start: 0.4rem;
  background: #f7f3ea;
  color: #1a1305;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 650;
}
.google-signin::before {
  content: "G";
  display: inline-grid;
  place-items: center;
  inline-size: 1.35rem;
  block-size: 1.35rem;
  border-radius: 50%;
  background: #1a1305;
  color: #f7f3ea;
  font-weight: 700;
  font-size: 0.85rem;
}
.google-signin:focus-visible { outline: 2px solid #e8b845; outline-offset: 3px; }
.signin-screen .run {
  inline-size: fit-content;
  margin-block-start: 0.35rem;
  border: 0;
  border-radius: 0;
  background: #e8b845;
  color: #1a1305;
  padding-block: 0.8rem;
  padding-inline: 1.35rem;
  min-block-size: 2.75rem;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.signin-screen .mono {
  display: block;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}
@media (max-width: 420px) {
  .bl-moves li { grid-template-columns: 3rem minmax(0, 1fr); gap: 0.75rem; }
  .store-lettering { max-inline-size: 100%; }
}

/* Brandlit studio: clear first action, generous canvas, and a usable Grok rail. */
.store-frame {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  min-block-size: 100dvh;
  padding-block: 5.5rem 2rem;
  padding-inline: clamp(1.5rem, 5vw, 6rem);
  gap: clamp(2rem, 5vw, 6rem);
  background: radial-gradient(circle at 75% 55%, #1b1610, #080909 55%);
  text-align: start;
}
.store-glass { align-items: flex-start; max-inline-size: 44rem; gap: 1.35rem; }
.store-hours { color: #e8b845; letter-spacing: .2em; }
.bl-sign {
  max-inline-size: 11ch;
  font-size: clamp(3.25rem, 6vw, 6.75rem);
  line-height: .98;
}
.store-headline { margin: 0; font-size: clamp(2rem, 3vw, 3.25rem); line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
.store-line {
  max-inline-size: 29rem;
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.store-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .85rem 1.5rem; }
.store-actions .bl-sign-in {
  display: inline-flex;
  align-items: center;
  gap: 1.25rem;
  min-block-size: 3.2rem;
  margin: 0;
  border: 1px solid #e8b845;
  border-radius: .2rem;
  background: #e8b845;
  color: #17130b;
  padding-inline: 1.3rem;
  font-size: .82rem;
  letter-spacing: .1em;
}
.store-actions .bl-sign-in:hover { background: #f6d680; }
.store-secondary { color: #f7f3ea; text-decoration-color: #e8b845; text-underline-offset: .35em; font-size: .9rem; }
.store-secondary:focus-visible { outline: 2px solid #e8b845; outline-offset: 4px; }
.store-footnote { margin: 0; color: #a9a49b; font-size: .82rem; }
.store-visual { position: relative; min-inline-size: 0; justify-self: stretch; }
.store-cases {
  inline-size: 100%;
  block-size: min(72dvh, 45rem);
  object-fit: cover;
  object-position: center 48%;
  margin: 0;
  border: 1px solid rgba(232,184,69,.3);
}
.store-visual-label {
  position: absolute;
  inset-inline: 1.2rem;
  inset-block-end: 1.2rem;
  color: #f7f3ea;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px #000;
}

.view.editor .app { display: flex; flex-direction: column; }
.view.editor .topbar {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem 1.3rem;
  min-block-size: 4.25rem;
  padding: .75rem 1.25rem;
}
.topbar-start, .topbar-tools, .topbar-actions { display: flex; align-items: center; gap: .55rem; min-inline-size: 0; }
.topbar-start { flex: 0 1 auto; }
.topbar-tools { flex: 1 1 auto; }
.topbar-actions { flex: 0 1 auto; margin-inline-start: auto; }
.topbar-divider { align-self: stretch; inline-size: 1px; background: rgba(255,255,255,.16); margin-inline: .35rem; }
.view.editor #docName { min-inline-size: 8rem; inline-size: clamp(8rem, 16vw, 15rem); padding: .45rem .55rem; }
.view.editor #stageMode,
.view.editor #btnReloadSite,
.view.editor #btnBrandKit,
.view.editor #usageChip,
.view.editor #accountChip,
.view.editor #btnUndo,
.view.editor #btnRedo { display: inline-flex !important; }
.view.editor .topbar :is(button, select) { min-block-size: 2.25rem; white-space: nowrap; }
.view.editor .topbar .ghost,
.view.editor .topbar .icon { padding: .45rem .7rem; background: transparent; border: 1px solid transparent; box-shadow: none; }
.view.editor .topbar .ghost:hover,
.view.editor .topbar .icon:hover { border-color: rgba(232,184,69,.45); }
.view.editor .topbar .icon { min-inline-size: 2.25rem; font-size: 1.2rem; line-height: 1; }
.view.editor #btnPublish {
  min-block-size: 2.4rem;
  padding-inline: 1rem;
  border: 1px solid #e8b845;
  border-radius: .35rem;
  background: #e8b845;
  color: #17130b;
  font-weight: 700;
}
.view.editor #btnPublish:hover { background: #f6d680; }
.view.editor :is(.usage-chip, .account-chip) { border: 0; border-radius: 0; padding-inline: .3rem; }
.view.editor #connectBanner { display: none !important; }
.view.editor .workspace { flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem); height: auto; min-height: 0; }
.view.editor .stage-wrap,
.view.editor .stage-wrap.phone {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-items: stretch;
  height: 100%;
}
.canvas-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-block-size: 3.2rem;
  padding-inline: 1.25rem;
  border-block-end: 1px solid rgba(255,255,255,.1);
  background: #101316;
}
.canvas-label { color: #f7f3ea; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.canvas-hint { color: #a7ada9; font-size: .8rem; }
.video-library-trigger,
.video-move-controls button {
  min-block-size: 2.2rem;
  padding: .35rem .7rem;
  border: 1px solid rgba(232,184,69,.55);
  border-radius: .35rem;
  background: #191c1a;
  color: #f6d680;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
}
.video-library-trigger:hover,
.video-move-controls button:hover { background: #2b2b21; }
.video-move-controls { display: flex; gap: .35rem; }
.video-move-controls[hidden] { display: none; }
.video-library-trigger:focus-visible,
.video-move-controls button:focus-visible,
.video-library button:focus-visible {
  outline: 3px solid #ffd97a;
  outline-offset: 3px;
}
.video-library {
  inline-size: min(980px, calc(100vw - 2rem));
  max-block-size: min(85dvh, 850px);
  padding: 1.5rem;
  border: 1px solid rgba(232,184,69,.55);
  border-radius: .75rem;
  background: #0d1210;
  color: #f7f3ea;
  box-shadow: 0 30px 90px rgba(0,0,0,.7);
}
.video-library::backdrop { background: rgba(0,0,0,.75); }
.video-library-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.video-library-head h2 { margin: .25rem 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.video-library-head p:last-child { color: #b0beb3; font-size: .85rem; }
.video-library-close {
  min-inline-size: 2.5rem; min-block-size: 2.5rem; border: 1px solid #596459;
  border-radius: .4rem; background: transparent; color: #f7f3ea; cursor: pointer;
}
.video-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.video-library-card { min-inline-size: 0; overflow: hidden; border: 1px solid #35443b; border-radius: .6rem; background: #171e19; }
.video-library-card video { display: block; inline-size: 100%; block-size: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #050807; }
.video-library-card-body { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .8rem; }
.video-library-card-body h3 { margin: 0; font-size: 1rem; }
.video-library-card-body p { margin: .15rem 0 0; color: #afbaae; font-size: .75rem; }
.video-library-card-body button {
  flex: 0 0 auto; min-block-size: 2.25rem; padding: .4rem .7rem;
  border: 0; border-radius: .35rem; background: #e8c467; color: #171b16;
  font: inherit; font-size: .8rem; font-weight: 800; cursor: pointer;
}
@media (max-width: 800px) {
  .canvas-toolbar { flex-wrap: wrap; padding-block: .5rem; }
  .canvas-hint { display: none; }
  .video-library-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .video-library *, .video-library-trigger { animation-duration: 0s !important; transition-duration: 0s !important; }
}
.canvas-toolbar .size-row { margin-inline-start: auto; gap: .25rem; }
.view.editor .canvas-toolbar .size-row button {
  min-block-size: 2.2rem;
  min-inline-size: 3.5rem;
  padding-inline: .65rem;
  border: 1px solid transparent;
  border-radius: .3rem;
  color: #a7ada9;
}
.view.editor .canvas-toolbar .size-row button[aria-pressed="true"] {
  border-color: rgba(232,184,69,.55);
  color: #f6d680;
}
.view.editor #siteFrame { min-height: 0; }
.view.editor .stage-wrap.phone #siteFrame {
  inline-size: min(390px, 100%);
  justify-self: center;
  block-size: 100%;
  border-radius: 24px;
  box-shadow: 0 0 0 1px rgba(232,184,69,.4), 0 24px 50px rgba(0,0,0,.45);
}
.view.editor .side { padding: 1.2rem; }
.view.editor .gb-head { align-items: flex-start; margin-block-end: 1rem; }
.view.editor .rail-title { font-size: 1.45rem; font-weight: 700; }
.view.editor .rail-sub { line-height: 1.4; }
.view.editor .voice-orb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  inline-size: 100%;
  block-size: auto;
  min-block-size: 3.5rem;
  padding: .55rem 1rem;
  border: 1px solid rgba(232,184,69,.7);
  border-radius: .45rem;
  background: rgba(232,184,69,.1);
  color: #f6d680;
  font-weight: 700;
  text-align: center;
}
.view.editor .voice-orb:hover:not(:disabled) { background: rgba(232,184,69,.18); }
.view.editor .voice-orb .spade { inline-size: 2rem; block-size: 2rem; flex: none; }
.view.editor #micBtn.live { box-shadow: inset 0 0 0 1px #34d399; border-color: #34d399; }
.view.editor .rail-usage { margin-block: .65rem 1rem; color: #8f9893; font-size: .72rem; }
.view.editor .gb-tab { min-block-size: 2.75rem; }
.view.editor .gb-chat-pane { gap: .7rem; }
.view.editor .gb-thread { min-height: 4rem; max-height: none; }
.view.editor .gb-composer-label { color: #c8cdc9; font-size: .8rem; font-weight: 650; }
.view.editor .gb-composer {
  align-items: stretch;
  gap: .5rem;
  padding: .45rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: .5rem;
  background: #111519;
}
.view.editor .gb-composer:focus-within { border-color: #e8b845; }
.view.editor .gb-composer textarea { min-block-size: 4.5rem; max-block-size: 12rem; padding: .5rem; resize: vertical; }
.view.editor .gb-composer textarea:focus-visible { outline: 2px solid #e8b845; outline-offset: -2px; }
.view.editor .gb-composer .run { align-self: flex-end; min-block-size: 2.5rem; block-size: auto; border-radius: .35rem; }
.view.editor .gb-gate { padding: .75rem; border: 1px solid rgba(232,184,69,.35); border-radius: .4rem; background: rgba(232,184,69,.06); }
.view.editor .gb-gate p { margin: 0 0 .45rem; }
.view.editor .gb-gate .run { min-block-size: 2.4rem; margin: 0; padding-inline: .7rem; border: 1px solid #e8b845; border-radius: .3rem; }
.view.editor :is(button, input, textarea, select, a):focus-visible { outline: 2px solid #e8b845; outline-offset: 3px; }

@media (max-width: 70rem) {
  .view.editor .topbar-actions { margin-inline-start: 0; }
  .view.editor .workspace { grid-template-columns: minmax(0, 1fr) minmax(19rem, 22rem); }
  .view.editor #usageChip { display: none !important; }
}
@media (max-width: 61.25rem) {
  html:has(#view-editor:not([hidden])),
  body:has(#view-editor:not([hidden])) { height: auto; min-height: 100dvh; overflow-y: auto; }
  .view.editor { height: auto; max-height: none; overflow: visible; }
  .view.editor .app { min-height: 100dvh; height: auto; }
  .view.editor .workspace { display: flex; flex-direction: column; overflow: visible; height: auto; }
  .view.editor .stage-wrap { flex: none; height: min(57dvh, 34rem); min-height: 20rem; }
  .view.editor .side { flex: none; max-height: none; min-height: 28rem; overflow: visible; border-block-start: 1px solid rgba(255,255,255,.12); }
  .view.editor .gb-thread { max-height: 18rem; }
  body:has(#view-editor:not([hidden])) { overflow: auto; }
}
@media (max-width: 46rem) {
  .store-frame { grid-template-columns: 1fr; padding-block: 7rem 3rem; gap: 2.5rem; }
  .store-glass { gap: 1rem; }
  .bl-sign { font-size: clamp(3.15rem, 13vw, 5rem); }
  .store-cases { block-size: min(55dvh, 29rem); }
  .view.editor .topbar { padding: .7rem; gap: .35rem; }
  .view.editor .topbar-start { flex: 1 1 100%; }
  .view.editor .topbar-tools { flex: 1 1 auto; overflow-x: auto; }
  .view.editor .topbar-actions { flex: 1 1 100%; justify-content: space-between; }
  .view.editor #accountChip { display: none !important; }
  .view.editor .stage-wrap { height: 52dvh; min-height: 18rem; }
  .canvas-toolbar { gap: .5rem; padding-inline: .7rem; }
  .canvas-hint { display: none; }
  .view.editor .side { padding: 1rem; }
}

/* Voice and edit actions use distinct, readable surfaces. */
.view.editor .voice-orb {
  justify-content: flex-start;
  gap: .8rem;
  min-block-size: 3.25rem;
  border: 0;
  border-radius: .55rem;
  background: #e8b845;
  color: #17130b;
  padding-inline: .85rem 1.1rem;
  font-size: .9rem;
}
.view.editor .voice-orb:hover:not(:disabled) { background: #f6d680; }
.view.editor .voice-orb .spade {
  inline-size: 2.2rem;
  block-size: 2.2rem;
  border-radius: .4rem;
  background: #17130b;
}
.view.editor #micBtn.live { background: #c3eed6; color: #10251a; border: 0; box-shadow: none; }
.voice-status {
  min-block-size: 1.3rem;
  margin: .45rem 0 0;
  color: #aeb8b1;
  font-size: .8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.voice-status[data-state="error"] { color: #ffb5a9; }
.voice-status[data-state="listening"],
.voice-status[data-state="heard"] { color: #9ee9bd; }
.voice-status[data-state="speaking"] { color: #f6d680; }
.voice-status[data-state="hearing"] { color: #c3eed6; }
.mic-controls { display: grid; gap: .4rem; margin-block: .65rem .4rem; }
.mic-controls label { color: #c8cdc9; font-size: .76rem; font-weight: 650; }
.mic-controls select { inline-size: 100%; min-block-size: 2.5rem; padding: .45rem .7rem; border: 1px solid rgba(255,255,255,.25); border-radius: .4rem; background: #111519; color: #f4f5f2; font: inherit; }
.mic-signal-row { display: flex; align-items: center; gap: .65rem; color: #aeb8b1; font-size: .73rem; }
.mic-signal-row meter { inline-size: 5rem; block-size: .55rem; flex: none; accent-color: #34d399; }
.view.editor .grok-live { display: none !important; }
.view.editor .rail-usage { margin-block: .2rem .9rem; }
.view.editor .gb-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: .55rem;
  padding: .6rem;
  border: 1px solid #3d4943;
  border-radius: .65rem;
  background: #171d1b;
}
.view.editor .gb-composer:focus-within { border-color: #e8b845; }
.view.editor .gb-composer textarea {
  min-block-size: 5rem;
  max-block-size: 14rem;
  color: #f7f3ea;
  font-size: .9rem;
  line-height: 1.45;
}
.view.editor .gb-composer textarea::placeholder { color: #aeb8b1; }
.view.editor .gb-composer .run {
  min-block-size: 2.75rem;
  padding-inline: 1rem;
  border-radius: .4rem;
  background: #e8b845;
}
.gb-composer-help { margin: .1rem 0 0; color: #828d87; font-size: .72rem; }
@media (max-width: 46rem) {
  .view.editor .gb-composer { grid-template-columns: 1fr; }
  .view.editor .gb-composer .run { justify-self: end; }
}
