:root,
.dark {
  --background: #14110e;
  --foreground: #f4efe6;
  --card: #221c16;
  --card-foreground: #f4efe6;
  --popover: #221c16;
  --popover-foreground: #f4efe6;
  --primary: #e0a15a;
  --primary-foreground: #1a140e;
  --secondary: #2c261e;
  --secondary-foreground: #f4efe6;
  --muted: #2a241c;
  --muted-foreground: #b7ab9c;
  --accent: #3a3126;
  --accent-foreground: #f3ddb4;
  --border: #e0a15a38;
  --input: #3a3228;
  --ring: #e0a15a;
  --success: #8eae86;
  --danger: #d36b58;
  --surface-bright: #3d342a;
  --gold-dim: #a68448;
  --shadow-gold: 0 18px 50px #00000066;
  --radius: 0.95rem;
  --font-sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;
  --default-font-family: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --default-mono-font-family: "IBM Plex Mono", "SFMono-Regular", ui-monospace, monospace;
}

body {
  font-family: var(--font-sans);
  background: #100e0c;
}

.cafe-page {
  background:
    radial-gradient(1200px 500px at 50% -10%, #e0a15a14, transparent 60%),
    #100e0c;
}

.cafe-page :focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.scene-shell:after {
  background:
    linear-gradient(90deg, #100e0ccc, transparent 18%, transparent 82%, #100e0c99),
    linear-gradient(0deg, #100e0ce6, transparent 28%) !important;
}

.brand {
  gap: 10px;
  padding: 4px 6px 4px 4px;
  border-radius: 12px;
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-size: 23px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.015em;
  font-variation-settings: "opsz" 72;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 0;
  object-fit: contain;
  box-shadow: none;
  filter: drop-shadow(0 2px 10px #e0a15a40);
}

.models-section footer .brand {
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-size: 20px;
}

.models-section footer .brand-logo {
  width: 26px;
  height: 26px;
}

.floor-status {
  border: 0;
  background: transparent;
  padding: 0 8px;
}

.floor-status b {
  letter-spacing: 0.14em;
  font-weight: 500;
}

.topbar {
  border: 1px solid #e0a15a33;
  background: #14110ecc;
  box-shadow: 0 16px 40px #00000040;
  backdrop-filter: blur(18px);
}

.topbar-actions {
  gap: 8px;
}

.topbar-actions button,
.topbar-x {
  border-radius: 12px;
  box-shadow: none;
  height: 36px;
}

.topbar-x {
  width: 36px;
  border-color: #e0a15a55;
}

.topbar-x:hover {
  transform: none;
  box-shadow: none;
  background: #e0a15a22;
}

.lang-toggle {
  border-radius: 12px;
  letter-spacing: 0.08em;
  font-family: var(--font-sans);
  font-weight: 600;
}

.soon {
  letter-spacing: 0.14em;
}

.room-title {
  text-shadow: none;
  pointer-events: none;
  border: 1px solid #e0a15a24;
  background: #14110ec2;
  border-radius: 20px;
  padding: 14px 16px 12px;
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px #0000002e;
}

.room-title > span {
  letter-spacing: 0.2em;
  font-size: 10px;
}

.room-title h1 {
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-weight: 520;
  letter-spacing: -0.035em;
  line-height: 0.95;
}

.room-title p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.ca-badge {
  border-radius: 12px;
  background: #f4efe60d;
  border: 1px solid #e0a15a33;
  box-shadow: none;
  margin-top: 12px;
  pointer-events: auto;
}

.ca-badge button {
  border-radius: 8px;
  background: var(--foreground);
  color: var(--background);
}

.ca-badge__tag {
  letter-spacing: 0.16em;
}

.room-presence span {
  border-radius: 999px;
  background: #14110ecc;
  border-color: #e0a15a33;
}

.scene-instruction b,
.scene-instruction small {
  letter-spacing: 0.06em;
}

.agent-dock {
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid #e0a15a33;
  background: #14110ecc;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 30px #00000033;
}

.agent-dock button {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border-color: transparent;
  background: transparent;
}

.open-seat-button {
  border-radius: 14px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: transparent;
  box-shadow: 0 10px 24px #00000040;
  height: 40px;
  padding-inline: 14px;
  font-family: var(--font-sans);
  letter-spacing: 0.01em;
}

.open-seat-button:hover {
  filter: brightness(1.06);
}

.mobile-joystick {
  width: 74px;
  height: 74px;
  border-color: #e0a15a44;
  background: #14110e8c;
}

.mobile-joystick:before {
  height: 52px;
}

.mobile-joystick:after {
  width: 52px;
}

.mobile-joystick i {
  width: 26px;
  height: 26px;
  background: var(--primary);
  box-shadow: none;
}

.live-ticker {
  height: 46px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  background: #100e0cf2;
  border-top-color: #e0a15a24;
}

.scroll-cue {
  border-radius: 999px;
  background: #14110ecc;
  backdrop-filter: blur(10px);
}

.agent-panel,
.seat-controls {
  border-radius: 20px;
  border-color: #e0a15a40;
  box-shadow: 0 24px 60px #00000073;
}

.how-section,
.fee-section,
.tools-band,
.models-section {
  border-bottom: 0;
}

.section-heading > span {
  letter-spacing: 0.22em;
  font-size: 11px;
}

.section-heading h2,
.fee-wheel strong {
  font-family: "Fraunces", "Iowan Old Style", Georgia, serif;
  font-weight: 520;
  letter-spacing: -0.03em;
}

.fee-wheel {
  box-shadow: none;
}

.fee-wheel:before {
  box-shadow: inset 0 0 0 1px #e0a15a22;
}

.steps-track article > span {
  font-family: "Fraunces", Georgia, serif;
  color: var(--primary);
  letter-spacing: 0;
}

.model-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border: 0;
  margin-top: 40px;
}

.model-list > div {
  flex: 1 1 148px;
  min-height: 0;
  border: 1px solid #e0a15a2b;
  border-radius: 999px;
  padding: 12px 16px;
  background: #221c1688;
}

.models-section footer {
  border-top: 1px solid #e0a15a22;
  margin-top: 28px;
}

.screen-terminal {
  color: #f4efe6;
  background: #14110e;
  border: 1px solid #3a3126;
  border-radius: 18px;
  box-shadow: 0 28px 70px #00000080;
}

.screen-terminal .flap-top,
.screen-terminal .flap-profile,
.screen-terminal .flap-stats,
.screen-terminal .flap-token,
.screen-terminal .flap-foot {
  border-color: #3a3126;
}

.screen-terminal .flap-logo,
.screen-terminal .flap-launch header b,
.screen-terminal .flap-tabs button.is-on,
.screen-terminal .flap-top .flap-wallet {
  color: #e4c07a;
}

.screen-terminal .flap-top .flap-wallet.is-on,
.screen-terminal .flap-empty button,
.screen-terminal .flap-create,
.screen-terminal .flap-deploy,
.screen-terminal .flap-top .flap-quick-create {
  color: #1a140e;
  background: #e4c07a;
  border-color: #e4c07a;
}

.screen-terminal .flap-avatar {
  color: #1a140e;
  background: #e4c07a;
  border-radius: 14px;
}

.screen-terminal .flap-stats,
.screen-terminal .flap-stats > div,
.screen-terminal .flap-table {
  border-color: #3a3126;
  background: transparent;
}

.screen-terminal .flap-launch input,
.screen-terminal .flap-launch textarea,
.screen-terminal .flap-models button {
  background: #1c1814;
  border-color: #3a3126;
  color: #f4efe6;
  border-radius: 10px;
}

.screen-terminal .flap-launch input:focus {
  border-color: #e4c07a;
}

@media (min-width: 901px) {
  .cafe-stage > .topbar {
    top: 16px;
    left: 18px;
    right: 18px;
    height: 64px;
    width: auto;
    padding: 0 14px 0 12px;
    border-radius: 18px;
    grid-template-columns: 1fr auto 1fr;
  }

  .cafe-stage > .room-title {
    top: auto;
    left: 28px;
    bottom: 70px;
    width: min(420px, calc(100% - 340px));
  }

  .cafe-stage > .room-title h1 {
    font-size: clamp(40px, 4vw, 58px);
  }

  .cafe-stage > .room-presence {
    top: 92px;
    bottom: auto;
    left: auto;
    right: 28px;
    transform: none;
  }

  .cafe-stage > .scene-instruction {
    left: auto;
    right: 248px;
    bottom: 128px;
    max-width: none;
    text-align: left;
  }

  .cafe-stage > .scene-instruction span {
    text-align: left;
  }

  .cafe-stage > .agent-dock {
    top: auto;
    right: 28px;
    bottom: 70px;
    left: auto;
    transform: none;
    display: flex;
  }

  .cafe-stage > .open-seat-button {
    right: 28px;
    bottom: 132px;
  }

  .cafe-stage > .scroll-cue {
    left: 50%;
    right: auto;
    bottom: 58px;
    transform: translateX(-50%);
  }

  .steps-track {
    grid-template-columns: 1.3fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 14px;
    margin-top: 48px;
    border: 0;
  }

  .steps-track article,
  .steps-track article:last-child {
    border: 1px solid #e0a15a2b;
    border-radius: 18px;
    min-height: 220px;
    padding: 22px 22px 20px;
    background: #221c16a8;
  }

  .steps-track article:first-child {
    grid-row: 1 / span 2;
    background:
      linear-gradient(180deg, #e0a15a18, transparent 55%),
      #221c16cc;
  }

  .steps-track article:first-child > span {
    font-size: 40px;
  }

  .step-icon {
    border-radius: 12px;
    background: #e0a15a14;
  }

  .tools-band {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
  }

  .tools-band .tool-grid {
    order: -1;
  }

  .tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    border: 0;
  }

  .tool-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .tool-item {
    border: 1px solid #e0a15a2b;
    border-radius: 14px;
    min-height: 78px;
    padding: 8px 14px;
    background: #221c1688;
  }
}

@media (max-width: 900px) {
  .cafe-stage > .topbar {
    top: 10px;
    left: 10px;
    right: 10px;
    height: 58px;
    width: auto;
    padding: 0 8px 0 10px;
    border-radius: 16px;
    grid-template-columns: 1fr auto;
  }

  .topbar-actions .lang-toggle {
    width: auto;
    padding: 0 10px;
    font-size: 12px;
  }

  .cafe-stage > .room-title {
    top: 78px;
    left: 12px;
    right: auto;
    bottom: auto;
    width: max-content;
    max-width: calc(100% - 24px);
  }

  .cafe-stage > .room-title h1 {
    font-size: 32px;
  }

  .cafe-stage > .room-presence {
    top: 78px;
    right: 12px;
    bottom: auto;
    left: auto;
    transform: none;
    flex-direction: column;
    align-items: flex-end;
  }

  .cafe-stage > .scene-instruction {
    left: 12px;
    bottom: 58px;
  }

  .cafe-stage > .agent-dock {
    top: auto;
    right: 12px;
    bottom: 58px;
    left: auto;
    transform: none;
    display: flex;
  }

  .cafe-stage > .open-seat-button {
    right: 12px;
    bottom: 112px;
    height: 36px;
    font-size: 12px;
  }

  .steps-track {
    gap: 10px;
    border: 0;
    margin-top: 28px;
  }

  .steps-track article,
  .steps-track article:last-child {
    border: 1px solid #e0a15a2b;
    border-bottom: 1px solid #e0a15a2b;
    border-radius: 16px;
    padding: 16px;
    background: #221c1688;
    min-height: 0;
  }

  .tool-grid {
    border: 0;
  }

  .tool-item {
    border: 1px solid #e0a15a2b;
    border-radius: 14px;
    margin-bottom: 8px;
    padding-inline: 12px;
  }

  .fee-layout,
  .tools-band {
    gap: 28px;
  }
}

@media (max-width: 1200px) {
  .cafe-stage > .scene-instruction small {
    display: none;
  }
}

.cafe-stage:has(.screen-terminal) > .room-title,
.cafe-stage:has(.seat-controls) > .room-title,
.cafe-stage:has(.screen-terminal) > .scene-instruction,
.cafe-stage:has(.seat-controls) > .scene-instruction,
.cafe-stage:has(.screen-terminal) > .scroll-cue,
.cafe-stage:has(.seat-controls) > .scroll-cue {
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .floor-status svg,
  .mobile-joystick i {
    animation: none;
  }
}
