@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --sushi-bg: #f3f0e8;
  --sushi-surface: #fffdf8;
  --sushi-surface-raised: #ffffff;
  --sushi-ink: #171916;
  --sushi-muted: #62665f;
  --sushi-quiet: #686d64;
  --sushi-line: #d7d2c7;
  --sushi-yellow: #8a5900;
  color-scheme: light;
}

html {
  min-width: 320px;
  background: var(--sushi-bg) !important;
  color: var(--sushi-ink) !important;
}

body {
  position: relative;
  max-width: none !important;
  min-width: 320px;
  min-height: 100vh;
  margin: 0 !important;
  background: var(--sushi-bg) !important;
  color: var(--sushi-ink) !important;
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  font-size: 1.0625rem;
  line-height: 27px;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 48px), 1120px) !important;
  max-width: none !important;
  margin: 0 auto !important;
  padding: 0 0 80px !important;
}

.sushi-lab-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 0 18px;
  border-bottom: 1px solid var(--sushi-line);
  background: transparent;
}

.sushi-lab-nav__brand {
  flex: 0 0 auto;
  color: var(--sushi-ink) !important;
  font-size: 1.3125rem;
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.2;
  white-space: nowrap;
}

.sushi-lab-nav__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 14px;
}

.sushi-lab-nav__links a {
  color: var(--sushi-muted) !important;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: normal;
  line-height: 20px;
}

.sushi-lab-nav__links a:hover,
.sushi-lab-nav__links a:focus-visible {
  color: var(--sushi-yellow) !important;
  opacity: 1 !important;
}

.sushi-lab-kicker {
  margin: 36px 0 8px !important;
  color: var(--sushi-yellow) !important;
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 20px;
  text-transform: uppercase;
}

h1 {
  max-width: 18ch;
  margin: 0 0 14px !important;
  color: var(--sushi-ink) !important;
  font-size: clamp(2rem, 5vw, 2.5rem) !important;
  font-weight: 700 !important;
  letter-spacing: normal;
  line-height: 1.15 !important;
}

h2,
h3,
.section-label,
.panel-title {
  color: var(--sushi-ink) !important;
}

p,
.panel-desc,
.status-text,
.status-line,
.panel-metrics,
#stats,
#metrics,
#step-info,
#tts-step-info,
#m-tts-step-info {
  color: var(--sushi-muted) !important;
}

main > h1 + p {
  max-width: 62ch;
  color: var(--sushi-muted) !important;
}

.sushi-home-intro {
  max-width: 62ch;
  margin-bottom: 2rem;
}

.sushi-home-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sushi-home-grid a {
  display: flex;
  min-height: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  padding: 18px 0 20px;
  border: 0;
  border-top: 1px solid var(--sushi-line);
  border-radius: 0;
  background: transparent;
}

.sushi-home-grid a:hover,
.sushi-home-grid a:focus-visible {
  background: color-mix(in srgb, var(--sushi-ink) 5%, transparent);
}

.sushi-home-grid__name {
  color: var(--sushi-ink);
  font-size: 1.125rem;
  font-weight: 500;
  line-height: 28px;
}

.sushi-home-grid__description {
  color: var(--sushi-muted);
  font-size: 1.0625rem;
  line-height: 27px;
}

.sushi-home-grid__mode {
  color: var(--sushi-yellow);
  font-size: 0.875rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  line-height: 20px;
  text-transform: uppercase;
}

a {
  color: var(--sushi-ink) !important;
  text-decoration: none !important;
}

a:hover,
a:focus-visible {
  color: var(--sushi-yellow) !important;
  opacity: 1 !important;
}

hr {
  border: 0;
  border-top: 1px solid var(--sushi-line);
}

button,
.voice-btn {
  border: 1px solid var(--sushi-line) !important;
  border-radius: 5px !important;
  background: var(--sushi-surface) !important;
  color: var(--sushi-ink) !important;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

button:hover:not(:disabled),
.voice-btn:hover:not(:disabled),
.voice-btn.active {
  border-color: var(--sushi-yellow) !important;
  background: var(--sushi-surface-raised) !important;
  color: var(--sushi-yellow) !important;
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled,
.voice-btn:disabled {
  border-color: var(--sushi-line) !important;
  color: var(--sushi-quiet) !important;
}

textarea,
input[type="text"] {
  border: 1px solid var(--sushi-line) !important;
  border-radius: 7px !important;
  background: #fffdf8 !important;
  color: var(--sushi-ink) !important;
}

textarea::placeholder {
  color: var(--sushi-quiet) !important;
}

textarea:focus,
input[type="text"]:focus {
  border-color: var(--sushi-yellow) !important;
  outline: 2px solid rgba(166, 107, 0, 0.2) !important;
  outline-offset: 1px;
}

#model-status,
.model-status,
.global-status,
.panel,
.chat-surface,
.voice-surface,
#app,
#results,
#transcript,
#output {
  border-color: var(--sushi-line) !important;
}

.panel,
#app {
  border-radius: 8px;
}

.model-picker,
.panel,
.chat-surface,
.voice-surface {
  background: rgba(255, 255, 255, 0.72) !important;
}

.model-picker {
  border-color: var(--sushi-line) !important;
  border-radius: 8px;
  padding: 1rem !important;
}

.model-picker legend {
  color: var(--sushi-yellow) !important;
}

.model-card,
.model-option {
  border-color: var(--sushi-line) !important;
  background: var(--sushi-surface) !important;
  color: var(--sushi-ink) !important;
}

.model-card:hover,
.model-option:hover,
.model-card:has(input:checked),
.model-option:has(input:checked) {
  border-color: var(--sushi-yellow) !important;
}

.model-card.selected {
  border-color: var(--sushi-yellow) !important;
  box-shadow: 4px 4px 0 var(--sushi-yellow) !important;
}

.model-card.selected .model-card-eyebrow,
.model-card.selected .model-card-size {
  color: var(--sushi-yellow) !important;
}

.workspace-grid {
  margin-top: 2rem !important;
}

.companion-stage {
  border-color: var(--sushi-line) !important;
  background: var(--sushi-surface) !important;
  box-shadow: 4px 4px 0 var(--sushi-yellow) !important;
}

.companion-avatar {
  background-color: #fffdf8 !important;
  background-image:
    linear-gradient(rgba(166, 107, 0, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(166, 107, 0, 0.08) 1px, transparent 1px) !important;
}

.companion-avatar::after {
  border-color: rgba(166, 107, 0, 0.18) !important;
}

.companion-stage[data-mode="speaking"] .companion-stage-state,
.companion-zoom-control span:last-child {
  color: var(--sushi-yellow) !important;
}

.companion-line {
  border-color: rgba(166, 107, 0, 0.35) !important;
  background: rgba(243, 240, 232, 0.92) !important;
  color: var(--sushi-ink) !important;
}

.companion-zoom-control {
  border-color: rgba(166, 107, 0, 0.24) !important;
  background: rgba(243, 240, 232, 0.92) !important;
}

.companion-zoom-control input[type="range"]::-webkit-slider-thumb,
.companion-zoom-control input[type="range"]::-moz-range-thumb {
  background: var(--sushi-yellow) !important;
}

.companion-zoom-control input[type="range"]::-webkit-slider-thumb {
  background: var(--sushi-yellow) !important;
}

.companion-zoom-control input[type="range"]::-moz-range-thumb {
  background: var(--sushi-yellow) !important;
}

#viewport {
  border-color: var(--sushi-line) !important;
  background: var(--sushi-surface) !important;
  box-shadow: 0 16px 44px rgba(23, 25, 22, 0.16);
}

#loading {
  background: var(--sushi-bg) !important;
}

#loading .title,
#info,
#fs-btn,
.tb {
  color: var(--sushi-ink) !important;
}

#loadfill {
  background: var(--sushi-yellow) !important;
}

#loadbar {
  background: var(--sushi-line) !important;
}

#loadpct,
#nowgpu {
  color: var(--sushi-quiet) !important;
}

#fs-btn,
.tb {
  border-color: var(--sushi-line) !important;
  background: var(--sushi-surface) !important;
}

#fs-btn:hover,
.tb:hover,
.tb.on {
  border-color: var(--sushi-yellow) !important;
  color: var(--sushi-yellow) !important;
}

@media (max-width: 700px) {
  main {
    width: min(calc(100% - 32px), 1120px) !important;
  }

  .sushi-lab-nav {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .sushi-lab-nav__links {
    justify-content: flex-start;
  }

  .sushi-home-grid {
    grid-template-columns: 1fr;
  }
}
