@property --checker {
  syntax: "<color>";
  inherits: true;
  initial-value: #101010;
}
@property --checker-2 {
  syntax: "<color>";
  inherits: true;
  initial-value: #161616;
}
:root {
  color-scheme: dark;
  --bg: #0a0a0a;
  --ink: #ededed;
  --muted: #8a8a8a;
  --line: rgba(255, 255, 255, 0.08);
  --checker: #101010;
  --checker-2: #161616;
  --sans: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --phone-w: 449px;
  --phone-h: 892px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  overflow: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.app {
  height: 100vh;
  width: 100vw;
  display: grid;
  grid-template-columns: 260px 10px minmax(0, 1fr);
  background: #0a0a0a;
}
.app.working { grid-template-columns: 260px 10px minmax(300px, 1fr) 10px 440px; }
.app:not(.working) #splitStage { display: none; }

.split {
  width: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  position: relative;
  z-index: 3;
  touch-action: none;
}
.split::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  border-radius: 2px;
  background: transparent;
  transition: background 140ms ease;
}
.split:hover::after,
.split:focus-visible::after,
.split.dragging::after { background: rgba(255, 255, 255, 0.55); }
body.col-drag { cursor: col-resize; user-select: none; }
body.col-drag iframe { pointer-events: none; }
.side {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: #0a0a0a;
  padding: 10px 10px 12px;
}
.brand-row { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 10px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.03em; }
.mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #fff;
}
.icon-quiet {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ddd;
  display: grid;
  place-items: center;
}
.icon-quiet { transition: background 160ms ease, transform 160ms ease; }
.icon-quiet:hover { background: #171717; }
.icon-quiet:active { transform: scale(0.94); }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 4px 8px;
  padding: 0 10px;
  height: 34px;
  border-radius: 8px;
  background: #141414;
  color: #777;
  border: 1px solid transparent;
}
.search:focus-within { border-color: #2a2a2a; }
.search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  min-width: 0;
  color: #eee;
}
.search input::placeholder { color: #6d6d6d; }
.side-label-row { display: flex; align-items: center; justify-content: space-between; margin: 8px 6px 4px; }
.side-label { color: #6e6e6e; font-size: 0.72rem; margin: 0 4px; }
#clearHist {
  border: 0;
  background: transparent;
  color: #8d8d8d;
  font-size: 0.72rem;
  border-radius: 6px;
  padding: 2px 6px;
}
#clearHist:hover { background: #1a1a1a; color: #fff; }
.history-list { flex: 1; overflow: auto; min-height: 0; }
.h-row { display: flex; align-items: center; gap: 2px; border-radius: 8px; }
.h-row:hover { background: #141414; }
.h-row .h-item { flex: 1; min-width: 0; width: auto; }
.h-x {
  width: 22px;
  height: 22px;
  margin-right: 4px;
  flex: none;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #9a9a9a;
  opacity: 0.7;
}
.h-row:hover .h-x, .h-x:focus-visible { opacity: 1; }
.h-x:hover { background: #2a2a2a; color: #fff; }
.group { color: #6a6a6a; font-size: 0.7rem; margin: 10px 10px 4px; }
.h-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #d4d4d4;
  border-radius: 8px;
  padding: 7px 8px;
  display: flex;
  gap: 8px;
  align-items: center;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}
.h-item:hover { background: #161616; }
.h-item.active { background: #1c1c1c; color: #fff; box-shadow: inset 2px 0 0 #fff; }
.h-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.86rem; }
.h-ico { display: none; }
.dot { width: 7px; height: 7px; border-radius: 99px; background: #3a3a3a; flex: none; }
.dot.ok { background: #d4d4d4; }
.dot.wait { background: #d4d4d4; animation: pulse 1.1s ease infinite; }
.dot.bad { background: #737373; }
.side-foot { border-top: 1px solid var(--line); padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.side-foot button {
  text-align: left;
  border: 0;
  background: transparent;
  color: #cfcfcf;
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 160ms ease, color 160ms ease;
}
.side-foot button svg { color: #9a9a9a; flex: none; }
.side-foot button:hover { background: #161616; color: #fff; }
.side-foot button:hover svg { color: #fff; }
.me {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ddd;
  font-size: 0.86rem;
  text-align: left;
}
.me:hover { background: #161616; }
.ava { width: 22px; height: 22px; border-radius: 99px; background: linear-gradient(180deg, #d8d8d8, #8d8d8d); }

.chat {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 28px 20px;
  background: #0a0a0a;
}
.chat-bar { display: none; }
.hero h1 {
  margin: 0 0 22px;
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: -0.045em;
  text-align: center;
}
.stream { display: none; }
.app.working .chat {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  border-right: 1px solid var(--line);
}
.app.working .chat-bar {
  display: flex;
  align-items: baseline;
  gap: 10px;
  height: 52px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  flex: none;
  animation: rise 280ms ease;
}
.chat-kicker {
  color: #8d8d8d;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.chat-heading { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.chat-id {
  border: 0;
  background: transparent;
  color: #8a8a8a;
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.02em;
  padding: 0;
  cursor: pointer;
  flex: none;
}
.chat-id:hover { color: inherit; }
.h-id {
  margin-left: auto;
  color: #6e6e6e;
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  flex: none;
}
.chat-title {
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.chat-bar .icon-quiet { margin-left: auto; flex: none; }
.app.working .hero,
.app.working .starters { display: none; }
.app.working .stream {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 28px 36px 16px;
  flex-direction: column;
  gap: 14px;
}
.msg { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; animation: rise 240ms ease; max-width: 100%; }
.msg.user { align-items: flex-end; }
.msg.ai { justify-content: flex-start; }
.msg.ai .bubble {
  width: fit-content;
  max-width: min(62ch, 100%);
  background: #1c1c1c;
  border: 1px solid #2e2e2e;
  border-radius: 16px;
  padding: 12px 14px;
}
.who { display: none; }
.bubble { line-height: 1.55; white-space: pre-wrap; font-size: 0.94rem; color: #f2f2f2; }
.bubble.arrived { animation: arrive 280ms ease; }
.bubble a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.typing { display: inline-flex; gap: 5px; align-items: center; height: 1.1em; }
.typing i {
  width: 6px; height: 6px; border-radius: 99px; background: currentColor; opacity: 0.3;
  animation: blink 1.05s ease-in-out infinite;
}
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink {
  0%, 70%, 100% { opacity: 0.25; transform: translateY(0); }
  35% { opacity: 1; transform: translateY(-3px); }
}
@keyframes arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.rights-modal {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.45); padding: 24px;
}
.rights-card {
  width: min(420px, 100%); background: #171717; color: #f5f5f5; border-radius: 16px; padding: 22px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.rights-card h2 { margin: 0 0 8px; font-size: 1.15rem; font-weight: 560; }
.rights-card p { margin: 0; color: #c8c8c8; line-height: 1.45; }
.rights-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.rights-actions button {
  border: 0; border-radius: 999px; padding: 8px 14px; cursor: pointer; font: inherit;
}
#rightsNo { background: transparent; color: #ddd; }
#rightsYes { background: #f5f5f5; color: #111; }
.msg.user .bubble {
  background: #3a3a3a;
  border-radius: 16px;
  padding: 10px 14px;
  max-width: min(540px, 86%);
}
.actions-row {
  display: flex;
  gap: 2px;
  width: fit-content;
  padding: 0 2px;
  background: transparent;
}
.actions-row[hidden],
.mini[hidden] { display: none !important; }
.mini {
  width: 30px; height: 28px; border: 0; border-radius: 8px;
  background: transparent; color: #bdbdbd; display: grid; place-items: center;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}
.mini:hover { background: #222; color: #fff; }
.mini:active { transform: scale(0.92); }
.mini.on { background: #fff; color: #111; }
[data-status] { margin-top: 8px; color: #a3a3a3; font-size: 0.84rem; }
.preview-card { display: none; }

.composer, .starters, .fine, .hero { width: min(760px, 100%); }
.composer {
  border: 1px solid #2a2a2a;
  border-radius: 22px;
  background: #141414;
  padding: 12px 12px 8px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.02);
}
.composer { transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.composer:focus-within {
  border-color: #4a4a4a;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}
.composer textarea {
  width: 100%;
  min-height: 68px;
  max-height: 160px;
  resize: none;
  border: 0;
  background: transparent;
  outline: none;
  padding: 4px 6px 8px;
  font-size: 0.98rem;
}
.composer textarea::placeholder { color: #6f6f6f; }
.composer-row { display: flex; align-items: center; gap: 4px; }
.composer-row .grow { flex: 1; }
.tool, .chip {
  height: 32px;
  border: 0;
  background: transparent;
  color: #cfcfcf;
  border-radius: 999px;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}
.tool:active, .chip:active { transform: scale(0.96); }
.tool { width: 32px; display: grid; place-items: center; }
.tool:hover, .chip:hover { background: #222; color: #fff; }
.chip { padding: 0 10px; font-size: 0.78rem; color: #bdbdbd; border: 1px solid #2a2a2a; }
.send {
  width: 32px; height: 32px; border: 0; border-radius: 999px;
  background: #fff; color: #111; display: grid; place-items: center;
}
.send .ico-stop { display: none; }
.send.stop .ico-send { display: none; }
.send.stop .ico-stop { display: block; }
.send:hover { filter: brightness(0.92); transform: translateY(-1px); }
.send:active { transform: scale(0.92); }
.starters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.starters button {
  text-align: left;
  border: 1px solid #222;
  background: #111;
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.starters button { transition: background 160ms ease, transform 160ms ease, border-color 160ms ease; }
.starters button:hover { background: #171717; border-color: #333; transform: translateY(-2px); }
.starters strong { font-weight: 500; font-size: 0.88rem; }
.starters span { color: var(--muted); font-size: 0.78rem; }
.fine {
  color: #6c6c6c;
  font-size: 0.72rem;
  margin: 10px 0 0;
  display: flex;
  gap: 8px;
  align-items: center;
}
.app.working .fine { margin: 0 16px 12px; width: auto; }
.app.working .composer { width: auto; margin: 0 12px 8px; border-radius: 18px; }
.app.working .composer textarea { min-height: 44px; }
.fine input {
  appearance: none;
  width: 14px;
  height: 14px;
  margin: 0;
  border-radius: 4px;
  border: 1px solid #555;
  background: #141414;
  display: grid;
  place-items: center;
}
.fine input:checked { background: #fff; border-color: #fff; }
.fine input:checked::after { content: ""; width: 7px; height: 4px; border-left: 1.5px solid #111; border-bottom: 1.5px solid #111; transform: rotate(-45deg) translateY(-1px); }

.stage { display: none; min-width: 0; min-height: 0; background: #0c0c0c; flex-direction: column; }
.app.working .stage { display: flex; animation: rise 320ms ease; }
.stage-bar {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "host actions"
    "tools tools";
  align-items: center;
  gap: 8px 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  min-width: 0;
}
.stage-tools { grid-area: tools; display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.tab { grid-area: host; display: flex; align-items: center; gap: 8px; min-width: 0; }
.host-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.stage-clock {
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #a3a3a3;
  background: transparent;
  border: 0;
  border-radius: 0;
  padding: 0;
  flex: none;
}
.live-clock {
  font: 11px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: 0.04em;
  color: #8a8a8a;
  margin-bottom: 6px;
}
.stage-actions { grid-area: actions; }
.tab {
  font-size: 0.8rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.device-name { color: #8a8a8a; font-size: 0.68rem; letter-spacing: 0.01em; }
.view-switch {
  display: inline-flex;
  align-self: flex-start;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: #141414;
  border: 1px solid #2a2a2a;
}
.view-switch button {
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #bdbdbd;
  padding: 0 9px;
  font-size: 0.72rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.view-switch button.on { background: #fff; color: #111; }
.view-switch .count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: #2a2a2a;
  color: #eee;
  font-size: 0.64rem;
  display: inline-grid;
  place-items: center;
}
.view-switch button.on .count { background: #111; color: #fff; }
.stage-actions { display: flex; gap: 6px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.stage-btn {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  background: #141414;
  color: #eee;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, border-color 140ms ease;
}
.stage-btn:hover { background: #1c1c1c; color: #fff; }
.stage-btn:active { transform: scale(0.92); }
.linkish {
  border: 1px solid #2c2c2c;
  background: #141414;
  color: #eee;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.75rem;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.linkish:hover { background: #1e1e1e; border-color: #444; }
.linkish:active { transform: scale(0.96); }
.device-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid #2a2a2a;
  border-radius: 999px;
  background: #141414;
  flex: none;
}
.device-switch button {
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #bdbdbd;
  padding: 0 10px;
  font-size: 0.72rem;
}
.device-switch button.on { background: #fff; color: #111; }
.live { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.live-step { color: #8d8d8d; font-size: 0.82rem; }
.live-step.now { color: inherit; }
.live-step.done { color: #9a9a9a; }
.live-step.now::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 99px; background: currentColor; animation: pulse 1s ease infinite; }
.live-step.done::before { content: '✓ '; }
@keyframes pulse { 50% { opacity: 0.35; } }
#phoneView[data-device="desktop"] .phone-slot,
#phoneView[data-device="tablet"] .phone-slot {
  width: 100% !important;
  height: 100% !important;
  padding: 18px 16px;
}
#phoneView[data-device="desktop"] .device,
#phoneView[data-device="tablet"] .device {
  position: relative;
  width: 100%;
  height: 100%;
  transform: none !important;
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.35));
}
#phoneView[data-device="desktop"] .hw,
#phoneView[data-device="tablet"] .hw,
#phoneView[data-device="desktop"] .island,
#phoneView[data-device="tablet"] .island { display: none; }
#phoneView[data-device="desktop"] .bezel,
#phoneView[data-device="tablet"] .bezel {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 10px 10px 12px;
  background: #1a1a1a;
}
#phoneView[data-device="desktop"] .bezel::before,
#phoneView[data-device="tablet"] .bezel::before {
  content: '';
  display: block;
  height: 14px;
  margin: 0 4px 8px;
  background:
    radial-gradient(circle at 6px 7px, #ff5f57 5px, transparent 5.5px),
    radial-gradient(circle at 24px 7px, #febc2e 5px, transparent 5.5px),
    radial-gradient(circle at 42px 7px, #28c840 5px, transparent 5.5px);
}
#phoneView[data-device="desktop"] .screen,
#phoneView[data-device="tablet"] .screen,
#phoneView[data-device="desktop"] .screen iframe,
#phoneView[data-device="tablet"] .screen iframe {
  width: 100%;
  height: calc(100% - 22px);
  border-radius: 8px;
}
#phoneView[data-device="tablet"] .phone-slot { max-width: 860px; }
.stage-canvas {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 50% 46%, rgba(255, 255, 255, 0.045), transparent 58%),
    #0c0c0c;
  overflow: hidden;
}
.phone-slot {
  position: relative;
  width: 206px;
  height: 410px;
  flex: none;
}
.gallery-view {
  flex: 1;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #0c0c0c;
}
.gallery-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  color: #a3a3a3;
  font-size: 0.75rem;
}
.gallery-tools .stage-btn { margin-left: auto; }
.tiny-toggle { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tiny-toggle input { accent-color: #fff; }
#galleryNote {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shot-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 8px;
  padding: 10px;
  align-content: start;
}
.shot {
  border: 1px solid #242424;
  background: #111;
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.shot img {
  width: 100%;
  height: 112px;
  object-fit: contain;
  background:
    linear-gradient(45deg, var(--checker-2) 25%, transparent 25%),
    linear-gradient(-45deg, var(--checker-2) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, var(--checker-2) 75%),
    linear-gradient(-45deg, transparent 75%, var(--checker-2) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-color: var(--checker);
}
.shot span {
  display: block;
  font-size: 0.68rem;
  color: #9a9a9a;
  padding: 6px 8px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot:hover { border-color: #5a5a5a; }
.shot-miss {
  height: 112px;
  display: grid;
  place-items: center;
  color: #888;
  font-size: 0.72rem;
  padding: 8px;
  text-align: center;
}
.gallery-empty {
  color: #8d8d8d;
  text-align: center;
  padding: 28px 12px;
  margin: 0;
  grid-column: 1 / -1;
}
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
}
.lb-frame {
  margin: 0;
  max-width: min(86vw, 1080px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.lb-frame img {
  max-width: min(86vw, 1080px);
  max-height: 74vh;
  object-fit: contain;
  border-radius: 10px;
  background: #111;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.lb-frame figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ddd;
  font-size: 0.8rem;
  max-width: min(86vw, 1080px);
}
#lbName {
  max-width: 46vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#lbPos { color: #999; }
#lbDown {
  border: 0;
  background: #fff;
  color: #111;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
}
.lb-nav, .lb-x {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #333;
  background: #161616;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1;
}
.lb-nav:hover, .lb-x:hover { background: #222; }
.lb-x { position: absolute; top: 16px; right: 16px; }

.device {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--phone-w);
  height: var(--phone-h);
  transform-origin: top left;
  filter: drop-shadow(0 22px 30px rgba(0, 0, 0, 0.5));
  animation: phone-in 460ms ease;
}
.bezel {
  position: absolute;
  left: 16px;
  right: 16px;
  top: 0;
  bottom: 0;
  border-radius: 62px;
  padding: 11px;
  background:
    linear-gradient(160deg, #9a9aa0 0%, #4a4a4e 8%, #1c1c1e 28%, #2a2a2c 70%, #6a6a70 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    inset 0 0 0 2px #0b0b0b;
}
.screen {
  position: relative;
  width: 393px;
  height: 852px;
  border-radius: 50px;
  overflow: hidden;
  background: #000;
}
.screen iframe {
  width: 393px;
  height: 852px;
  border: 0;
  background: #fff;
  display: block;
}
.stage-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #8a8a8a;
  background: #0a0a0a;
  font-size: 0.9rem;
}
.island {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 126px;
  height: 37px;
  transform: translateX(-50%);
  background: #000;
  border-radius: 20px;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.hw {
  position: absolute;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(#5a5a5e, #1a1a1c);
}
.action { left: 6px; top: 142px; height: 32px; }
.vol-up { left: 6px; top: 196px; height: 56px; }
.vol-down { left: 6px; top: 264px; height: 56px; }
.power { right: 6px; top: 214px; height: 96px; }

.popover {
  position: fixed;
  left: 16px;
  top: 16px;
  width: 280px;
  background: #141414;
  border: 1px solid #2c2c2c;
  border-radius: 16px;
  padding: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.03);
  z-index: 45;
  animation: rise 160ms ease;
}
.popover h3 { margin: 4px 8px 8px; font-size: 0.92rem; font-weight: 560; letter-spacing: -0.02em; }
.popover button { font: inherit; color: inherit; cursor: pointer; }
.popover p, .menu-note { margin: 0 8px 8px; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }
.menu-act {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: #ededed;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 0.86rem;
  min-height: 36px;
}
.menu-act:hover, .menu-act:focus-visible { background: #222; }
.menu-act.danger { color: #f0b4b4; }
.menu-act.danger:hover, .menu-act.danger:focus-visible { background: #2a1717; }
.menu-act:disabled { opacity: 0.38; }
.toast {
  position: fixed;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  background: #1c1c1c;
  color: #ededed;
  border: 1px solid #2e2e2e;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.84rem;
  z-index: 80;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.history-list, .stream { scrollbar-width: thin; scrollbar-color: #2a2a2a transparent; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes phone-in { from { opacity: 0; } to { opacity: 1; } }
.stage-empty.busy::after {
  content: "";
  width: 90px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: pulse 1.1s ease infinite;
}

.hidden { display: none !important; }

.desktop-only { display: none; }
@media (max-width: 1099px) {
  body > :not(.desktop-only) { display: none !important; }
  .desktop-only {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 100;
    align-items: center;
    justify-content: center;
    padding: 28px 22px;
    background: #fff;
    color: #171717;
  }
  .desktop-card { max-width: 360px; text-align: center; }
  .desktop-card h1 { margin: 0 0 10px; font-size: 1.45rem; font-weight: 500; letter-spacing: -0.03em; }
  .desktop-card p { margin: 0; color: #525252; line-height: 1.5; }
  html[data-theme="dark"] .desktop-only { background: #0a0a0a; color: #ededed; }
  html[data-theme="dark"] .desktop-card p { color: #a3a3a3; }
}
.diff-card { margin-top: 10px; padding: 10px; border: 1px solid #2e2e2e; border-radius: 10px; }
.diff-card pre { margin: 4px 0 8px; white-space: pre-wrap; font-size: 12px; }
.diff-label { font-size: 11px; color: #8a8a8a; }
#pickBtn.on { outline: 1px solid currentColor; }

.mobile-bar, .drawer-backdrop { display: none; }

@media (max-width: 980px) {
  html, body { height: 100%; overflow: hidden; }
  .split { display: none !important; }
  .app, .app.working {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .mobile-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: calc(52px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 10px 0 8px;
    border-bottom: 1px solid var(--line);
    background: #0a0a0a;
    min-width: 0;
  }
  .mobile-bar > button {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    display: grid;
    place-items: center;
    flex: none;
  }
  #mobileTitle {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.95rem;
    font-weight: 600;
  }
  .pane-switch { display: none; margin-left: auto; border: 1px solid #2a2a2a; border-radius: 999px; overflow: hidden; flex: none; }
  .app.working .pane-switch { display: flex; }
  .pane-switch button {
    border: 0;
    background: transparent;
    color: #a3a3a3;
    padding: 6px 10px;
    font-size: 0.75rem;
  }
  .pane-switch button.on { background: #fff; color: #111; }
  .drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 35;
  }
  .drawer-backdrop.hidden { display: none !important; }
  .side {
    position: fixed;
    z-index: 40;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(88vw, 320px);
    max-height: none;
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    padding-top: env(safe-area-inset-top);
  }
  .side.open { transform: none; }
  .chat, .stage { min-height: 0; min-width: 0; }
  .chat { padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); }
  .hero h1 { font-size: 1.55rem; }
  .starters { grid-template-columns: 1fr; }
  .composer textarea, .search input { font-size: 16px; }
  .app.working .chat { border-right: 0; }
  .app.working .stream { padding: 16px 14px 12px; }
  .app.working .composer { margin-bottom: calc(8px + env(safe-area-inset-bottom)); }
  body[data-pane="preview"] .chat { display: none; }
  body:not([data-pane="preview"]) .stage { display: none !important; }
  body[data-pane="preview"] .app.working .stage { min-height: 0; height: 100%; }
  .stage-bar { flex-wrap: wrap; overflow: visible; }
  .device-switch { display: none; }
  #phoneView .phone-slot,
  #phoneView[data-device] .phone-slot {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
    padding: 0 !important;
  }
  #phoneView .device,
  #phoneView[data-device] .device {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    filter: none !important;
  }
  #phoneView .bezel,
  #phoneView[data-device] .bezel {
    position: absolute;
    inset: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }
  #phoneView .bezel::before,
  #phoneView[data-device] .bezel::before,
  #phoneView .hw,
  #phoneView .island { display: none !important; }
  #phoneView .screen,
  #phoneView[data-device] .screen,
  #phoneView .screen iframe,
  #phoneView[data-device] .screen iframe {
    width: 100% !important;
    height: 100% !important;
    border-radius: 0 !important;
  }
}

.app.chat-right .stage { order: 3; }
.app.chat-right #splitStage { order: 4; }
.app.chat-right .chat { order: 5; }
.app.chat-right.working .chat { border-right: 0; border-left: 1px solid var(--line); }
html[data-suggestions="off"] .starters { display: none !important; }

.new-chat {
  margin: 2px 4px 8px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid #2a2a2a;
  background: #141414;
  color: #eee;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.86rem;
}
.new-chat:hover { background: #1c1c1c; }
.side-nav { display: flex; flex-direction: column; gap: 2px; margin: 0 4px 8px; }
.nav-item {
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #d4d4d4;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  text-align: left;
  font-size: 0.86rem;
}
.nav-item svg { color: #9a9a9a; flex: none; }
.nav-item.on, .nav-item:hover { background: #171717; color: #fff; }
.nav-item.on svg, .nav-item:hover svg { color: #fff; }
.me-copy { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.me-copy b { font-weight: 560; font-size: 0.84rem; }
.me-copy span { color: #8a8a8a; font-size: 0.72rem; }

.popover.account-menu { padding: 8px; }
.acct-id { display: flex; gap: 8px; align-items: center; padding: 8px 8px 10px; }
.acct-id b { display: block; font-size: 0.86rem; font-weight: 560; }
.acct-id span { color: var(--muted); font-size: 0.72rem; }
.acct-row, .menu-act {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.theme-row { padding: 6px 8px; font-size: 0.84rem; }
.menu-act .chev { transition: transform 160ms ease; flex: none; }
.menu-act.on .chev { transform: rotate(90deg); }
.menu-rule { height: 1px; background: var(--line); margin: 6px 4px; }
.theme-seg { display: inline-flex; padding: 2px; border-radius: 9px; background: #111; border: 1px solid #2a2a2a; }
.theme-seg button {
  width: 28px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: #aaa;
  display: grid; place-items: center;
}
.theme-seg button.on { background: #fff; color: #111; }
.more-box { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px; padding-left: 8px; }

.settings-shell {
  position: fixed;
  inset: 0;
  z-index: 24;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  background: #0c0c0c;
  color: #ededed;
}
.settings-side {
  border-right: 1px solid var(--line);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: #0a0a0a;
}
.settings-back, .set-link {
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ddd;
  text-align: left;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
}
.settings-back { font-weight: 560; margin-bottom: 8px; }
.set-link.on, .settings-back:hover, .set-link:hover { background: #171717; color: #fff; }
.settings-main { overflow: auto; padding: 0 24px 64px; background: #0c0c0c; }
.settings-top {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0 -24px 28px;
  padding: 16px 24px;
  text-align: center;
  font-size: 0.92rem;
  background: #0c0c0c;
  border-bottom: 1px solid #1c1c1c;
}
.settings-side .side-label {
  margin: 16px 10px 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
}
.set-panel { width: min(720px, 100%); margin: 0 auto; }
.set-panel h1 { margin: 0 0 6px; font-size: 1.35rem; font-weight: 560; letter-spacing: -0.03em; }
.set-panel h2 { margin: 22px 0 8px; font-size: 0.78rem; color: #8d8d8d; font-weight: 500; }
.set-lead { margin: 0 0 8px; color: #8d8d8d; font-size: 0.86rem; }
.set-card { border: 1px solid #2a2a2a; border-radius: 14px; background: #141414; overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; }
.set-row + .set-row { border-top: 1px solid #242424; }
.set-row strong { display: block; font-size: 0.9rem; font-weight: 560; }
.set-row p { margin: 3px 0 0; color: #8d8d8d; font-size: 0.78rem; line-height: 1.35; }
.set-row select, .set-action, .side-seg {
  height: 32px;
  border-radius: 999px;
  border: 1px solid #333;
  background: #101010;
  color: #eee;
  padding: 0 12px;
  flex: none;
}
.side-seg { display: inline-flex; padding: 2px; gap: 2px; }
.side-seg button {
  border: 0;
  background: transparent;
  color: #bdbdbd;
  border-radius: 999px;
  height: 26px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.78rem;
}
.side-seg button.on { background: #fff; color: #111; }
.set-action { cursor: pointer; }
.set-action:hover { background: #1c1c1c; }
.set-action.danger { color: #f0b4b4; border-color: #5a3030; }
.set-action.danger:hover { background: #2a1717; }
.switch {
  width: 38px; height: 22px; border: 0; border-radius: 99px; background: #3a3a3a;
  position: relative; flex: none;
}
.switch::after {
  content: "";
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 99px;
  background: #fff; transition: transform 160ms ease, background-color 0.45s ease;
}
.foot-theme {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 8px 8px;
  color: #8a8a8a;
  font-size: 0.78rem;
}
.switch.on { background: #fff; }
.switch.on::after { transform: translateX(16px); background: #111; }

.feedback {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.45);
  display: grid; place-items: center; padding: 24px;
}
.feedback-card {
  width: min(440px, 100%);
  background: #161616;
  color: #eee;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.feedback-card h2 { margin: 0 0 4px; font-size: 1.05rem; }
.feedback-card p { margin: 0 0 12px; color: #8d8d8d; font-size: 0.82rem; }
.feedback-card textarea {
  width: 100%; border-radius: 10px; border: 1px solid #333; background: #101010; color: inherit;
  padding: 10px; resize: vertical;
}
.feedback-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.feedback-actions button { height: 32px; border-radius: 8px; border: 1px solid #333; background: transparent; color: inherit; padding: 0 12px; }
.feedback-actions button[type="submit"] { background: #fff; color: #111; border-color: #fff; }
#feedbackList { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 160px; overflow: auto; }
#feedbackList li { font-size: 0.8rem; color: #cfcfcf; padding-top: 8px; border-top: 1px solid #2a2a2a; }

html[data-theme="light"] body,
html[data-theme="light"] .app,
html[data-theme="light"] .side,
html[data-theme="light"] .chat { background: #fff; color: #171717; }
html[data-theme="light"] .side { border-right-color: #ececec; }
html[data-theme="light"] .brand { color: #171717; }
html[data-theme="light"] .mark { background: #171717; }
html[data-theme="light"] .new-chat,
html[data-theme="light"] .search { background: #fff; border-color: #e6e6e6; color: #171717; }
html[data-theme="light"] .search { background: #f6f6f7; }
html[data-theme="light"] .search input { color: #171717; }
html[data-theme="light"] .search input::placeholder,
html[data-theme="light"] .side-label,
html[data-theme="light"] .me-copy span,
html[data-theme="light"] .group { color: #737373; }
html[data-theme="light"] .nav-item,
html[data-theme="light"] .h-item,
html[data-theme="light"] #clearHist,
html[data-theme="light"] .me { color: #3a3a3a; }
html[data-theme="light"] .nav-item svg,
html[data-theme="light"] .h-x { color: #737373; }
html[data-theme="light"] .nav-item.on,
html[data-theme="light"] .nav-item:hover,
html[data-theme="light"] .h-item:hover,
html[data-theme="light"] .h-row:hover,
html[data-theme="light"] .me:hover,
html[data-theme="light"] .new-chat:hover { background: #f3f3f4; color: #111; }
html[data-theme="light"] .h-item.active { background: #f3f3f4; color: #111; box-shadow: inset 2px 0 0 #111; }
html[data-theme="light"] .mobile-bar { background: #fff; }
html[data-theme="light"] .pane-switch { border-color: #e4e4e4; }
html[data-theme="light"] .pane-switch button { color: #555; }
html[data-theme="light"] .pane-switch button.on { background: #111; color: #fff; }
html[data-theme="light"] .hero h1 { color: #111; }
html[data-theme="light"] .composer {
  background: #fff;
  border-color: #e7e7e7;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}
html[data-theme="light"] .composer textarea { color: #171717; }
html[data-theme="light"] .composer textarea::placeholder { color: #9a9a9a; }
html[data-theme="light"] .tool, html[data-theme="light"] .chip { color: #444; }
html[data-theme="light"] .chip { border-color: #e4e4e4; }
html[data-theme="light"] .tool:hover, html[data-theme="light"] .chip:hover { background: #f3f3f4; color: #111; }
html[data-theme="light"] .send { background: #111; color: #fff; }
html[data-theme="light"] .starters button { background: #fff; border-color: #ececec; color: #171717; }
html[data-theme="light"] .starters button:hover { background: #fafafa; border-color: #ddd; }
html[data-theme="light"] .fine { color: #737373; }
html[data-theme="light"] .fine input { background: #fff; border-color: #ccc; }
html[data-theme="light"] .fine input:checked { background: #111; border-color: #111; }
html[data-theme="light"] .fine input:checked::after { border-color: #fff; }
html[data-theme="light"] .bubble { color: #171717; }
html[data-theme="light"] .msg.ai .bubble { background: #fff; border-color: #e6e6e6; color: #171717; }
html[data-theme="light"] .device-switch { background: #f4f4f5; border-color: #e6e6e6; }
html[data-theme="light"] .device-switch button { color: #555; }
html[data-theme="light"] .device-switch button.on { background: #171717; color: #fff; }
html[data-theme="light"] .rights-card { background: #fff; color: #171717; }
html[data-theme="light"] .rights-card p { color: #4b4b4b; }
html[data-theme="light"] #rightsYes { background: #171717; color: #fff; }
html[data-theme="light"] #rightsNo { color: #333; }
html[data-theme="light"] .msg.user .bubble { background: #f4f4f5; box-shadow: none; color: #171717; }
html[data-theme="light"] .actions-row { background: transparent; }
html[data-theme="light"] .mini { color: #555; }
html[data-theme="light"] .mini:hover { background: #f3f3f4; color: #111; }
html[data-theme="light"] .mini.on { background: #111; color: #fff; }
html[data-theme="light"] .chat-bar,
html[data-theme="light"] .app.working .chat { border-color: #ececec; }
html[data-theme="light"] .chat-kicker, html[data-theme="light"] .chat-title { color: #171717; }
html[data-theme="light"] .chat-id,
html[data-theme="light"] .h-id { color: #737373; }
html[data-theme="light"] .stage-clock { color: #171717; background: #f4f4f5; border-color: #e4e4e4; }
html[data-theme="light"] .icon-quiet { color: #333; }
html[data-theme="light"] .icon-quiet:hover { background: #f3f3f4; }
html[data-theme="light"] .stage { background: #f6f6f7; }
html[data-theme="light"] .stage-bar { border-bottom-color: #ececec; }
html[data-theme="light"] .tab { color: #171717; }
html[data-theme="light"] .view-switch { background: #fff; border-color: #e6e6e6; }
html[data-theme="light"] .view-switch button { color: #555; }
html[data-theme="light"] .view-switch button.on { background: #111; color: #fff; }
html[data-theme="light"] .view-switch .count { background: #eee; color: #333; }
html[data-theme="light"] .view-switch button.on .count { background: #333; color: #fff; }
[data-tip] { position: relative; }
[data-tip]:hover::after,
[data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 5px 8px;
  border-radius: 8px;
  background: #111;
  color: #fff;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
html[data-theme="light"] #phoneView[data-device="desktop"] .bezel,
html[data-theme="light"] #phoneView[data-device="tablet"] .bezel {
  background: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] #phoneView[data-device="desktop"] .screen,
html[data-theme="light"] #phoneView[data-device="tablet"] .screen { background: #fff; }
html[data-theme="light"] .stage-btn { background: #fff; color: #171717; border-color: #e4e4e4; }
html[data-theme="light"] .stage-btn:hover { background: #f6f6f6; }
html[data-theme="light"] .stage-canvas { background: #f3f3f4; }
html[data-theme="light"] .gallery-view { background: #f6f6f7; }
html[data-theme="light"] .gallery-tools { color: #555; border-bottom-color: #ececec; }
html[data-theme="light"] .shot { background: #fff; border-color: #e6e6e6; }
html[data-theme="light"] .shot span, html[data-theme="light"] .gallery-empty { color: #666; }
html[data-theme="light"] .popover { background: #fff; border-color: #e6e6e6; color: #171717; box-shadow: 0 16px 50px rgba(0,0,0,.12); }
html[data-theme="light"] .menu-act { color: #171717; }
html[data-theme="light"] .menu-act:hover { background: #f4f4f5; }
html[data-theme="light"] .menu-note, html[data-theme="light"] .popover p { color: #737373; }
html[data-theme="light"] .theme-seg { background: #f4f4f5; border-color: #e6e6e6; }
html[data-theme="light"] .theme-seg button { color: #555; }
html[data-theme="light"] .theme-seg button.on { background: #fff; color: #111; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
html[data-theme="light"] :focus-visible { outline-color: #111; }
html[data-theme="light"] #clearHist:hover,
html[data-theme="light"] .h-x:hover,
html[data-theme="light"] .side-foot button:hover { background: #f3f3f4; color: #111; }
html[data-theme="light"] .search:focus-within { border-color: #ddd; }
html[data-theme="light"] .side-foot { border-top-color: #ececec; }
html[data-theme="light"] .settings-shell { background: #f7f7f8; color: #171717; }
html[data-theme="light"] .settings-side { background: #fff; color: #171717; }
html[data-theme="light"] .settings-main,
html[data-theme="light"] .settings-top { background: #f7f7f8; }
html[data-theme="light"] .settings-top { border-bottom-color: #ececec; color: #171717; }
html[data-theme="light"] .settings-side { border-right-color: #ececec; }
html[data-theme="light"] .settings-back,
html[data-theme="light"] .set-link { color: #333; }
html[data-theme="light"] .set-link.on,
html[data-theme="light"] .settings-back:hover,
html[data-theme="light"] .set-link:hover { background: #f3f3f4; color: #111; }
html[data-theme="light"] .set-card { background: #fff; border-color: #ececec; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); }
html[data-theme="light"] .set-action.danger { color: #9b1c1c; border-color: #f0d0d0; }
html[data-theme="light"] .set-row + .set-row { border-top-color: #f0f0f0; }
html[data-theme="light"] .set-row select,
html[data-theme="light"] .set-action,
html[data-theme="light"] .side-seg { background: #fff; color: #171717; border-color: #e4e4e4; }
html[data-theme="light"] .side-seg { background: #f4f4f5; }
html[data-theme="light"] .side-seg button { color: #555; }
html[data-theme="light"] .side-seg button.on { background: #171717; color: #fff; }
html[data-theme="light"] .set-action:hover { background: #f6f6f6; }
html[data-theme="light"] .set-action.danger:hover { background: #fdf2f2; }
html[data-theme="light"] .switch { background: #e4e4e4; }
html[data-theme="light"] .switch.on { background: #171717; }
html[data-theme="light"] .switch.on::after { background: #fff; }
html[data-theme="light"] .feedback-card { background: #fff; color: #171717; border-color: #ececec; }
html[data-theme="light"] .feedback-card textarea { background: #fff; color: #171717; border-color: #e4e4e4; }
html[data-theme="light"] .feedback-actions button { color: #171717; border-color: #e4e4e4; }
html[data-theme="light"] .feedback-actions button[type="submit"] { background: #111; color: #fff; }
html[data-theme="light"] #feedbackList li { color: #444; border-top-color: #eee; }
html[data-theme="light"] .toast {
  background: #fff;
  color: #171717;
  border-color: #e6e6e6;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}
html[data-theme="light"] .split:hover::after,
html[data-theme="light"] .split.dragging::after { background: rgba(0, 0, 0, 0.35); }
html[data-theme="light"] {
  color-scheme: light;
  background: #fff;
  --checker: #f3f3f4;
  --checker-2: #e2e2e6;
}
html[data-theme="light"] .composer:focus-within {
  border-color: #d0d0d0;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}
html[data-theme="light"] .starters span,
html[data-theme="light"] [data-status],
html[data-theme="light"] .search svg,
html[data-theme="light"] .foot-theme { color: #737373; }
html[data-theme="light"] .nav-item.on svg,
html[data-theme="light"] .nav-item:hover svg,
html[data-theme="light"] .side-foot button:hover svg { color: #111; }
html[data-theme="light"] .dot { background: #d4d4d4; }
html[data-theme="light"] .dot.ok,
html[data-theme="light"] .dot.wait { background: #171717; }
html[data-theme="light"] .dot.bad { background: #a3a3a3; }
html[data-theme="light"] .tiny-toggle input { accent-color: #171717; }
html[data-theme="light"] .shot:hover { border-color: #ccc; }
html[data-theme="light"] .shot-miss { color: #777; }
html[data-theme="light"] .history-list,
html[data-theme="light"] .stream,
html[data-theme="light"] .settings-main,
html[data-theme="light"] .shot-grid { scrollbar-color: #d0d0d0 transparent; }
html[data-theme="light"] .set-panel h2,
html[data-theme="light"] .set-lead,
html[data-theme="light"] .set-row p,
html[data-theme="light"] .feedback-card p { color: #737373; }
html[data-theme="light"] .menu-act.danger { color: #9b1c1c; }
html[data-theme="light"] .stage-btn:hover { background: #f3f3f4; color: #111; border-color: #ddd; }
html[data-theme="light"] .linkish { background: #fff; color: #171717; border-color: #e4e4e4; }
html[data-theme="light"] .linkish:hover { background: #f3f3f4; border-color: #ddd; }

body.sheet {
  overflow: auto;
  height: auto;
  min-height: 100%;
  background: #0a0a0a;
}
.sheet a { color: inherit; text-decoration: none; }
.sheet-wrap {
  width: min(640px, calc(100% - 48px));
  margin: 0 auto;
  padding: 28px 0 64px;
}
.sheet-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.sheet-kicker {
  margin: 36px 0 0;
  color: #8a8a8a;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sheet-wrap h1 {
  margin: 8px 0 0;
  font-size: 2rem;
  font-weight: 560;
  letter-spacing: -0.04em;
}
.sheet-lede, .sheet-note {
  margin: 12px 0 0;
  color: #a3a3a3;
  line-height: 1.5;
  max-width: 52ch;
}
.sheet-card {
  margin-top: 28px;
  padding: 16px;
  border: 1px solid #2a2a2a;
  border-radius: 18px;
  background: #111;
}
.sheet-drop {
  width: 100%;
  min-height: 148px;
  padding: 24px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed #3a3a3a;
  border-radius: 14px;
  background: #161616;
  color: #ededed;
  font-size: 0.95rem;
}
.sheet-drop.over, .sheet-drop:hover { border-color: #fff; background: #1c1c1c; }
.sheet-rights { margin-top: 14px; color: #c8c8c8; font-size: 0.84rem; }
.sheet-rights[hidden] { display: none; }
.sheet-actions { display: flex; gap: 8px; margin-top: 16px; }
.sheet-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid #2e2e2e;
  background: #1a1a1a;
  color: #eee;
}
.sheet-btn.solid { background: #f5f5f5; color: #111; border-color: #f5f5f5; }
.sheet-btn:disabled { opacity: 0.4; cursor: default; }
.sheet-btn:not(:disabled):hover { filter: brightness(1.08); }
.sheet-error { margin: 12px 0 0; color: #ffb4b4; }
.sheet-note { margin-top: 18px; font-size: 0.84rem; }
html[data-theme="light"] body.sheet { background: #fff; color: #171717; }
html[data-theme="light"] .sheet-lede,
html[data-theme="light"] .sheet-note,
html[data-theme="light"] .sheet-kicker { color: #737373; }
html[data-theme="light"] .sheet-card { background: #fff; border-color: #e6e6e6; }
html[data-theme="light"] .sheet-drop { background: #fafafa; border-color: #d4d4d4; color: #171717; }
html[data-theme="light"] .sheet-drop.over,
html[data-theme="light"] .sheet-drop:hover { border-color: #111; background: #f3f3f4; }
html[data-theme="light"] .sheet-rights { color: #333; }
html[data-theme="light"] .sheet-btn { background: #fff; color: #171717; border-color: #e4e4e4; }
html[data-theme="light"] .sheet-btn.solid { background: #171717; color: #fff; border-color: #171717; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
