:root {
  --c-ink: #1f1f1f;
  --c-ink-soft: #2f2f2f;
  --c-paper: #f7f7f5;
  --c-white: #ffffff;
  --c-accent: #1f3b58;
  --c-accent-strong: #2c5a86;
  --c-teal: #7ecad1;
  --c-sun: #f0c28b;
  --c-flamingo: #f26a9e;
  --c-flamingo-soft: #ffc1da;
  --c-line: rgba(31, 31, 31, 0.12);
  --radius-xl: 20px;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-soft: 0 18px 32px rgba(26, 26, 26, 0.08);
  --shadow-card: 0 10px 20px rgba(26, 26, 26, 0.06);
  --shadow-glow: 0 0 0 1px rgba(44, 90, 134, 0.22), 0 16px 28px rgba(44, 90, 134, 0.16);
  --font-sans: "Space Grotesk", "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;
  --site-max: 1120px;
  --site-gutter: clamp(16px, 4vw, 52px);
  --content-gutter: clamp(18px, 3.2vw, 44px);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--c-ink);
  background: var(--c-paper);
  min-height: 100vh;
  overflow-x: hidden;
  animation: page-fade 0.5s ease-out;
  background-repeat: no-repeat, no-repeat;
  background-size: 140% 120%, 170% 150%;
  background-position: center, center;
  background-attachment: fixed, fixed;
  position: relative;
  z-index: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1100px 680px at 10% 0%, rgba(31, 59, 88, 0.08), transparent 72%),
    radial-gradient(980px 640px at 92% 12%, rgba(126, 202, 209, 0.1), transparent 70%),
    radial-gradient(880px 640px at 80% 94%, rgba(240, 194, 139, 0.08), transparent 72%),
    repeating-linear-gradient(90deg, rgba(31, 31, 31, 0.03) 0, rgba(31, 31, 31, 0.03) 1px, transparent 1px, transparent 160px),
    repeating-linear-gradient(0deg, rgba(31, 31, 31, 0.025) 0, rgba(31, 31, 31, 0.025) 1px, transparent 1px, transparent 160px);
  pointer-events: none;
  z-index: 0;
}

body[data-page="home"] {
  background-image: url("/assets/backgrounds/home.svg"), url("/assets/backgrounds/home-secondary.svg");
}

body[data-page="ai"] {
  background-image: url("/assets/backgrounds/ai.svg"), url("/assets/backgrounds/ai-secondary.svg");
}

body[data-page="game"] {
  background-image: url("/assets/backgrounds/ai.svg"), url("/assets/backgrounds/ai-secondary.svg");
}

body[data-page="instructions"] {
  background-image: url("/assets/backgrounds/ai.svg"), url("/assets/backgrounds/ai-secondary.svg");
}

body[data-page="openai-wordpress-plugin"] {
  background-image: url("/assets/backgrounds/wp.svg"), url("/assets/backgrounds/wp-secondary.svg");
}

body[data-page="realtime-phone-bot"] {
  background-image: url("/assets/backgrounds/phone.svg"), url("/assets/backgrounds/phone-secondary.svg");
}

body[data-page="why-nut-it"] {
  background-image: url("/assets/backgrounds/why.svg"), url("/assets/backgrounds/why-secondary.svg");
}

body[data-page="contact"] {
  background-image: url("/assets/backgrounds/contact.svg"), url("/assets/backgrounds/contact-secondary.svg");
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

p {
  margin: 0;
  line-height: 1.7;
  color: var(--c-ink-soft);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.is-hidden {
  display: none !important;
}

main {
  padding: 36px 0 96px;
  position: relative;
}

main .page-inner {
  background: rgba(247, 247, 245, 0.9);
  border-radius: 28px;
  box-shadow: 0 20px 40px rgba(26, 26, 26, 0.08);
  padding: 28px var(--content-gutter) 56px;
  margin: 16px auto 0;
}

.parrot-scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 12;
  opacity: 0;
  transition: opacity 0.4s ease-out;
}

.parrot-scene.is-active {
  opacity: 1;
}

.parrot-3d-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.parrot-3d-stage.is-paused {
  display: none;
}

.parrot-3d-canvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--c-line);
  box-shadow: 0 8px 20px rgba(20, 20, 20, 0.08);
  backdrop-filter: blur(16px);
  isolation: isolate;
}

.page-inner {
  width: 100%;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: 0 var(--site-gutter);
}

.site-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px 0;
  position: relative;
  z-index: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: flex-end;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: linear-gradient(90deg, var(--c-accent), var(--c-teal), var(--c-sun));
  opacity: 0.9;
}

.site-header.is-open {
  box-shadow: 0 18px 36px rgba(20, 20, 20, 0.12), 0 0 0 1px rgba(44, 90, 134, 0.18);
}

.brand {
  display: grid;
  gap: 4px;
}

.brand-title {
  font-family: var(--font-sans);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-subtitle {
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  line-height: 1.45;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  background: linear-gradient(120deg, rgba(31, 59, 88, 0.12), rgba(126, 202, 209, 0.18));
  border: 1px solid var(--c-line);
  padding: 6px;
  border-radius: 999px;
  box-shadow: var(--shadow-glow);
}

.nav-break {
  flex-basis: 100%;
  height: 0;
}

.nav-link {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  padding: 8px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.nav-link.is-active {
  color: var(--c-ink);
  background: rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(26, 123, 231, 0.25);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--c-ink);
  background: rgba(255, 255, 255, 0.9);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--c-line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--c-ink);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-accent) 0%, var(--c-teal) 100%);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
}

.hero {
  display: grid;
  gap: 16px;
  max-width: 820px;
  margin: 36px auto 32px;
  text-align: left;
}

.kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  color: var(--c-accent-strong);
  margin: 0;
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  line-height: 1.05;
  margin: 0;
}

.lead {
  font-size: 1.05rem;
  color: var(--c-ink);
  max-width: 640px;
}

.section {
  margin: 36px auto;
}

.content-stack {
  max-width: 880px;
  display: grid;
  gap: 18px;
  margin: 0 auto;
}

.content-stack.is-wide {
  max-width: 1120px;
}

.section-title {
  font-family: var(--font-sans);
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  margin: 0;
}

.section-subtitle {
  font-size: 1.25rem;
  margin: 0;
  color: var(--c-ink);
  font-weight: 600;
}

.content-list {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--c-ink-soft);
}

.content-list li {
  line-height: 1.7;
}

.contact-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr);
  align-items: start;
  max-width: 980px;
  margin: 0 auto;
}

.form-card {
  background: var(--c-white);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 16px;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--c-ink);
}

.form-field span {
  font-size: 0.95rem;
}

.form-input,
.form-textarea {
  width: 100%;
  border: 1px solid rgba(31, 31, 31, 0.18);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--c-ink);
  background: var(--c-paper);
}

.form-textarea {
  resize: vertical;
  min-height: 160px;
}

.instructions-shell {
  max-width: 980px;
  margin: 0 auto;
}

.instructions-card {
  background: var(--c-white);
  border-radius: var(--radius-xl);
  padding: 24px;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 16px;
}

.instructions-card-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.instructions-pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(31, 59, 88, 0.12);
  color: var(--c-accent);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}

.instructions-textarea {
  min-height: 260px;
}

.instructions-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.instructions-status {
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.instructions-status.is-error {
  color: #7a1b1b;
}

.assistant-portal {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  pointer-events: none;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.assistant-portal > * {
  pointer-events: auto;
}

.assistant-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: clamp(120px, 16vw, 180px);
  height: clamp(120px, 16vw, 180px);
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--c-flamingo);
  font-weight: 600;
  box-shadow: none;
  position: relative;
  z-index: 22;
  overflow: hidden;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.assistant-fab-3d {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.assistant-fab-3d canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.assistant-fab-icon {
  font-size: 2.8rem;
  line-height: 1;
  filter: drop-shadow(0 6px 10px rgba(242, 106, 158, 0.4));
  transition: opacity 0.2s ease;
}

.assistant-fab.is-3d .assistant-fab-icon {
  opacity: 0;
}

.assistant-fab:hover {
  transform: translateY(-2px) scale(1.02);
}

.assistant-fab:focus-visible {
  outline: 2px solid rgba(242, 106, 158, 0.5);
  outline-offset: 4px;
}

body.flamingo-flight .assistant-panel,
body.flamingo-flight .assistant-overlay {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}

.assistant-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: min(420px, 92vw);
  background: var(--c-white);
  border-radius: 20px;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  display: grid;
  gap: 14px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 21;
}

.assistant-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.assistant-panel .chat-body {
  max-height: 320px;
}

.assistant-panel-head {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.assistant-kicker {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0 0 6px;
  color: var(--c-accent-strong);
}

.assistant-subtext {
  margin: 4px 0 0;
  color: var(--c-ink-soft);
  font-size: 0.9rem;
}

.assistant-close {
  border: 1px solid rgba(31, 59, 88, 0.2);
  background: rgba(31, 59, 88, 0.08);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.85rem;
  color: var(--c-accent);
}

.assistant-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 16, 22, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 19;
}

.assistant-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

body.assistant-open {
  overflow: hidden;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgba(31, 59, 88, 0.15);
  background: var(--c-white);
}

.form-status {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.form-status.success {
  background: rgba(31, 59, 88, 0.08);
  color: var(--c-accent);
  border: 1px solid rgba(31, 59, 88, 0.2);
}

.form-status.error {
  background: rgba(120, 24, 24, 0.08);
  color: #6b1e1e;
  border: 1px solid rgba(120, 24, 24, 0.2);
}

.form-note {
  margin: 0;
  color: var(--c-ink-soft);
  font-size: 0.9rem;
}

.form-debug {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(31, 31, 31, 0.2);
  background: rgba(31, 31, 31, 0.04);
  color: var(--c-ink-soft);
  font-size: 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.contact-card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 10px;
}

.contact-card h2 {
  font-family: var(--font-sans);
  margin: 0;
}

.divider {
  border: none;
  height: 1px;
  background: var(--c-line);
  margin: 12px 0;
}

.media-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.media-card {
  background: var(--c-white);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(31, 31, 31, 0.08);
}

.media-card-link {
  display: block;
}

.media-card-link {
  cursor: zoom-in;
}

.media-card-link:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 4px;
  border-radius: 18px;
}

.media-card img {
  border-radius: 16px;
  border: 1px solid rgba(31, 26, 21, 0.08);
  display: block;
  width: 100%;
  height: auto;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(12, 16, 20, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1200;
}

.media-lightbox.is-open {
  display: flex;
}

.media-lightbox-backdrop {
  position: absolute;
  inset: 0;
}

.media-lightbox-content {
  position: relative;
  max-width: min(1000px, 92vw);
  max-height: min(85vh, 800px);
  width: 100%;
  background: #0f141a;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  z-index: 1;
  display: grid;
  gap: 12px;
}

.media-lightbox img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 18px;
  background: #10151b;
}

.media-lightbox-caption {
  margin: 0;
  color: #d5dbe2;
  font-size: 0.95rem;
}

.media-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: none;
  background: #ffffff;
  color: #111;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.media-lightbox-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.media-card figcaption {
  margin-top: 10px;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

body[data-page="realtime-phone-bot"] .media-grid {
  grid-template-columns: 1fr;
  gap: 28px;
  max-width: 980px;
  margin: 0 auto;
}

body[data-page="realtime-phone-bot"] .media-card {
  padding: 18px;
}

body[data-page="realtime-phone-bot"] .media-card figcaption {
  font-size: 1.05rem;
}

body[data-page="realtime-phone-bot"] .media-card img {
  width: 100%;
}

.ai-window {
  margin-top: 22px;
}

.ai-window-shell {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.ai-window-header {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  background: linear-gradient(135deg, rgba(31, 59, 88, 0.08) 0%, rgba(126, 202, 209, 0.16) 100%);
  border-bottom: 1px solid var(--c-line);
}

.ai-window-brand {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

.ai-window-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin: 0;
}

.ai-window-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--c-ink);
}

.ai-window-header p,
.ai-window-subtext {
  margin: 0;
  color: var(--c-ink-soft);
}

.ai-window-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.ai-window-lang {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--c-ink-soft);
}

.ai-window-lang select {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: #ffffff;
  font: inherit;
  color: var(--c-ink);
}

.ai-window-toolbar-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-window-ghost {
  padding: 8px 12px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid rgba(31, 59, 88, 0.22);
  background: rgba(31, 59, 88, 0.08);
  color: var(--c-accent);
}

.ai-window-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  padding: 16px 22px;
  background: rgba(247, 247, 245, 0.75);
  border-bottom: 1px solid var(--c-line);
}

.ai-window-summary-card {
  background: #ffffff;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid var(--c-line);
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.ai-window-summary-card strong {
  font-size: 1.1rem;
  color: var(--c-ink);
}

.ai-window-main {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px 26px 26px;
}

.ai-window-panel {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid var(--c-line);
  padding: 18px;
  display: grid;
  gap: 14px;
}

.ai-window-panel-head {
  font-weight: 700;
  color: var(--c-ink);
}

.ai-window-form {
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
}

.ai-window-form .form-status {
  margin: 0 0 4px;
}

.ai-window-form .form-status.success {
  background: rgba(31, 59, 88, 0.08);
  color: var(--c-accent);
  border: 1px solid rgba(31, 59, 88, 0.2);
}

.ai-window-form label {
  font-weight: 600;
  color: var(--c-ink);
}

.ai-window-form input,
.ai-window-form select {
  border: 1px solid var(--c-line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #ffffff;
  color: var(--c-ink);
}

.ai-window-form button {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--c-accent);
  color: #ffffff;
  font-weight: 600;
}

.ai-window-form button:disabled,
.ai-window-form input:disabled,
.ai-window-form select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-window-help {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
}

.ai-window-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.ai-window-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

.ai-window-badge {
  background: rgba(31, 59, 88, 0.12);
  color: var(--c-accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-window-domain {
  color: var(--c-ink);
  font-weight: 600;
}

.ai-window-list {
  display: grid;
  gap: 8px;
}

.ai-window-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(247, 247, 245, 0.7);
  border: 1px solid rgba(31, 31, 31, 0.08);
  font-size: 0.9rem;
}

.ai-window-title {
  font-weight: 600;
  color: var(--c-ink);
}

.ai-window-disclaimer {
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.ai-window-chat-body {
  display: grid;
  gap: 10px;
  background: rgba(247, 247, 245, 0.7);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(31, 31, 31, 0.08);
  min-height: 180px;
}

.ai-window-msg {
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(31, 31, 31, 0.08);
  font-size: 0.92rem;
  color: var(--c-ink);
}

.ai-window-msg.user {
  background: rgba(31, 59, 88, 0.08);
  border-color: rgba(31, 59, 88, 0.2);
}

.ai-window-chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.ai-window-chat-input input {
  border: 1px solid var(--c-line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #ffffff;
}

.ai-window-chat-input button {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--c-accent);
  color: #ffffff;
  font-weight: 600;
}

.ai-window-chat-input button:disabled,
.ai-window-chat-input input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ai-window-chat-input [aria-disabled="true"],
.ai-window-toolbar [aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.ai-window-chat-input [aria-disabled="true"],
.ai-window-toolbar [aria-disabled="true"] {
  opacity: 0.6;
  pointer-events: none;
}

.ai-window-tools {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(31, 59, 88, 0.25);
  background: rgba(31, 59, 88, 0.04);
}

.ai-window-tools-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ai-window-tools-head {
  font-weight: 700;
  color: var(--c-ink);
}

.ai-window-tools textarea {
  min-height: 90px;
  border-radius: 12px;
  border: 1px solid var(--c-line);
  padding: 10px 12px;
  font: inherit;
  resize: none;
  background: #ffffff;
  color: var(--c-ink);
}

.ai-window-slider {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

.ai-window-slider input[type="range"] {
  width: 100%;
}

.ai-window-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px 20px;
  border-top: 1px solid var(--c-line);
  background: rgba(247, 247, 245, 0.75);
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

.ai-window-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-window-primary {
  border: none;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--c-accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-tool {
  margin-top: 26px;
}

.ai-tool-shell {
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.ai-tool-head {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  background: linear-gradient(135deg, rgba(31, 59, 88, 0.08) 0%, rgba(126, 202, 209, 0.16) 100%);
  border-bottom: 1px solid var(--c-line);
}

.ai-tool-head-copy {
  display: grid;
  gap: 6px;
  max-width: 600px;
}

.ai-tool-kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin: 0;
}

.ai-tool-head h3 {
  margin: 0;
  font-size: 1.4rem;
  color: var(--c-ink);
}

.ai-tool-subtext {
  margin: 0;
  color: var(--c-ink-soft);
}

.ai-tool-description {
  margin: 0;
  line-height: 1.5;
  color: var(--c-ink-soft);
}

.ai-tool-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 22px 24px 26px;
}

.panel {
  background: #ffffff;
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-ink);
}

.nav-button.soft-button {
  background: rgba(31, 59, 88, 0.08);
  border-color: rgba(31, 59, 88, 0.2);
  color: var(--c-accent);
}

.nav-button.primary-button {
  background: var(--c-accent);
  border-color: var(--c-accent);
  color: #ffffff;
  box-shadow: var(--shadow-glow);
}

.nav-button[disabled],
.nav-button.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(31, 59, 88, 0.08);
  border: 1px dashed rgba(31, 59, 88, 0.25);
  margin-bottom: 12px;
}

.summary-bar a {
  text-decoration: none;
}

.summary-bar form {
  margin: 0;
}

.summary-chat-link {
  display: none;
}

.crawl-panel.collapsed .crawl-content {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-top: 0;
  pointer-events: none;
}

.crawl-panel.open .crawl-content {
  max-height: 2000px;
  opacity: 1;
  padding-top: 12px;
  padding-bottom: 0;
  border-top: 1px dashed rgba(31, 31, 31, 0.2);
  pointer-events: auto;
}

.crawl-content {
  display: grid;
  gap: 12px;
  transition: max-height 220ms ease, opacity 220ms ease, padding 220ms ease;
  max-height: 2000px;
  opacity: 1;
}

.crawl-content label {
  font-weight: 700;
  display: block;
  margin-bottom: 6px;
}

.crawl-content .muted {
  font-size: 0.85rem;
}

.crawl-content input,
.crawl-content select {
  width: 100%;
  border: 2px solid rgba(31, 59, 88, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.98);
  color: var(--c-ink);
  box-shadow: 0 0 0 3px rgba(126, 202, 209, 0.18);
}

.crawl-content button {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--c-accent);
  color: #ffffff;
  font-weight: 600;
}

.action-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.badge {
  background: rgba(31, 59, 88, 0.12);
  color: var(--c-accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

.restart-form {
  display: flex;
  justify-content: flex-end;
}

.restart-form .nav-button {
  text-decoration: none;
}

.progress {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 59, 88, 0.12);
  border: 1px solid rgba(31, 59, 88, 0.2);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--c-accent), var(--c-teal));
  transition: width 0.2s ease;
}

.progress-label {
  font-size: 0.82rem;
}

.url-list {
  display: grid;
  gap: 8px;
}

.url-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(247, 247, 245, 0.7);
  border: 1px solid rgba(31, 31, 31, 0.08);
}

.url-item a {
  color: var(--c-accent);
  font-size: 0.85rem;
  word-break: break-all;
}

.url-item .title {
  font-weight: 600;
  color: var(--c-ink);
}

.disclaimer {
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.crawl-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(31, 59, 88, 0.08);
  border: 1px dashed rgba(31, 59, 88, 0.2);
  color: var(--c-ink-soft);
  font-size: 0.9rem;
}

.error {
  color: #7a1b1b;
  background: rgba(122, 27, 27, 0.08);
  border: 1px solid rgba(122, 27, 27, 0.2);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.chat-window {
  display: grid;
  gap: 12px;
}

.chat-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.chat-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chat-tools {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(31, 59, 88, 0.25);
  background: rgba(31, 59, 88, 0.05);
}

.chat-tools.collapsed {
  display: none;
}

.chat-tools label {
  font-weight: 700;
}

.chat-tools textarea {
  min-height: 120px;
  border-radius: 12px;
  border: 1px solid var(--c-line);
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
  background: #ffffff;
  color: var(--c-ink);
}

.chat-tools-actions {
  display: flex;
  justify-content: flex-end;
}

.chat-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.chat-note {
  font-weight: 600;
  color: var(--c-ink-soft);
  font-size: 0.85rem;
}

.chat-body {
  display: grid;
  gap: 10px;
  background: linear-gradient(135deg, rgba(31, 59, 88, 0.12), rgba(126, 202, 209, 0.14));
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(31, 59, 88, 0.18);
  min-height: 220px;
  max-height: 420px;
  overflow: auto;
  cursor: default;
}

.chat-msg {
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(31, 31, 31, 0.08);
  font-size: 0.92rem;
  color: var(--c-ink);
}

.chat-msg.user {
  margin-left: auto;
  background: rgba(31, 59, 88, 0.08);
  border-color: rgba(31, 59, 88, 0.2);
}

.chat-msg.bot {
  margin-right: auto;
}

.chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.chat-input input {
  border: 2px solid rgba(31, 59, 88, 0.35);
  border-radius: 14px;
  padding: 10px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 0 0 3px rgba(126, 202, 209, 0.18);
}

.chat-input input:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 4px rgba(31, 59, 88, 0.2);
}

.chat-input input.ready {
  background: #ffffff;
}

.chat-input button {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--c-accent);
  color: #ffffff;
  font-weight: 600;
}

.chat-input button.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.temp-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 0.9rem;
  color: var(--c-ink-soft);
}

.temp-row input[type="range"] {
  width: 100%;
}

.temp-value {
  font-weight: 600;
  color: var(--c-ink);
}

body.ai-drawer-open {
  overflow: hidden;
}

.ai-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
}

.ai-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(420px, 92vw);
  background: #ffffff;
  border-left: 1px solid var(--c-line);
  box-shadow: -18px 0 40px rgba(26, 26, 26, 0.18);
  transform: translateX(100%);
  transition: transform 0.24s ease;
  z-index: 1010;
  display: grid;
  grid-template-rows: auto 1fr;
}

.ai-drawer.is-open {
  transform: translateX(0);
}

.ai-drawer-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ai-drawer-head {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(31, 59, 88, 0.12) 0%, rgba(126, 202, 209, 0.2) 100%);
  border-bottom: 1px solid var(--c-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
  color: var(--c-ink);
}

.ai-drawer-body {
  padding: 18px;
  overflow: auto;
  display: grid;
  gap: 18px;
  align-content: start;
}

.ai-drawer-section h4 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--c-ink);
}

.ai-drawer-section ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--c-ink-soft);
}

.ai-drawer-help {
  margin: 0 0 10px;
  color: var(--c-ink-soft);
  font-size: 0.9rem;
}

.ai-drawer textarea {
  width: 100%;
  min-height: 140px;
  border-radius: 12px;
  border: 1px solid var(--c-line);
  padding: 10px 12px;
  font: inherit;
  resize: vertical;
  background: #ffffff;
  color: var(--c-ink);
}

.game-shell {
  display: grid;
  gap: 24px;
}

.game-field {
  position: relative;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--c-line);
  background: linear-gradient(
    180deg,
    rgba(31, 59, 88, 0.08) 0%,
    rgba(126, 202, 209, 0.16) 50%,
    rgba(240, 194, 139, 0.14) 100%
  );
  box-shadow: var(--shadow-soft);
}

.game-field::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(31, 31, 31, 0.03) 0,
    rgba(31, 31, 31, 0.03) 1px,
    transparent 1px,
    transparent 140px
  );
  opacity: 0.4;
  pointer-events: none;
}

.game-field > * {
  position: relative;
  z-index: 1;
}

.game-zone {
  padding: 24px 26px;
  display: grid;
  gap: 18px;
}

.game-zone-top {
  border-bottom: 1px dashed rgba(31, 31, 31, 0.18);
}

.game-zone-header {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 22px;
  align-items: center;
  justify-content: space-between;
}

.game-kicker {
  font-family: var(--font-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--c-accent);
  margin: 0;
}

.game-title {
  margin: 0;
  font-size: 1.6rem;
}

.game-subtitle {
  margin: 0;
  color: var(--c-ink-soft);
}

.game-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.game-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(31, 31, 31, 0.12);
  font-size: 0.75rem;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-board {
  width: min(1200px, 100%);
  margin: 0 auto;
  overflow-x: auto;
  padding-bottom: 4px;
}

.game-schedule {
  display: grid;
  gap: 12px;
}

.game-schedule-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) repeat(var(--slot-count, 4), minmax(90px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.game-schedule-header .game-schedule-cell {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
  color: var(--c-ink-soft);
}

.game-schedule-cell {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(31, 31, 31, 0.1);
}

.game-unit-cell {
  display: grid;
  gap: 4px;
}

.game-unit-name {
  font-weight: 600;
  color: var(--c-ink);
}

.game-unit-meta {
  font-size: 0.8rem;
  color: var(--c-ink-soft);
}

.game-slot {
  display: grid;
  gap: 4px;
  text-align: center;
}

.game-slot-state {
  font-weight: 600;
  font-size: 0.85rem;
}

.game-slot-meta {
  font-size: 0.75rem;
  color: var(--c-ink-soft);
}

.game-slot[data-status="busy"] {
  background: rgba(31, 59, 88, 0.12);
  border-color: rgba(31, 59, 88, 0.25);
}

.game-slot[data-status="vacant"] {
  background: rgba(126, 202, 209, 0.18);
  border-color: rgba(126, 202, 209, 0.4);
}

.game-slot[data-owned="true"] {
  background: rgba(44, 90, 134, 0.16);
  border-color: rgba(44, 90, 134, 0.35);
}

.game-bottom-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 20px;
  align-items: center;
}

.game-bottom-title {
  margin: 0;
  font-size: 1.2rem;
}

.game-bottom-subtitle {
  margin: 0;
  color: var(--c-ink-soft);
  font-size: 0.9rem;
}

.game-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-select-btn {
  appearance: none;
  font: inherit;
  border: 1px solid rgba(31, 31, 31, 0.15);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.game-select-btn.is-active {
  background: var(--c-accent);
  color: #ffffff;
  border-color: var(--c-accent);
  box-shadow: var(--shadow-glow);
}

.game-select-btn:focus {
  outline: 2px solid rgba(31, 59, 88, 0.4);
  outline-offset: 2px;
}

.game-bottom-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
}

.game-customers {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(31, 31, 31, 0.12);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 16px;
}

.game-customers-head h3 {
  margin: 0;
}

.game-customers-head p {
  margin: 4px 0 0;
  color: var(--c-ink-soft);
  font-size: 0.9rem;
}

.game-customer-list {
  display: grid;
  gap: 10px;
}

.game-customer-card {
  appearance: none;
  font: inherit;
  text-align: left;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(31, 31, 31, 0.12);
  background: rgba(247, 247, 245, 0.9);
  cursor: pointer;
  display: grid;
  gap: 6px;
}

.game-customer-card.is-selected {
  border-color: rgba(31, 59, 88, 0.4);
  box-shadow: var(--shadow-glow);
  background: #ffffff;
}

.game-customer-card h4 {
  margin: 0;
  font-size: 1rem;
}

.game-customer-card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

.game-customer-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.game-chat {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(31, 31, 31, 0.12);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 14px;
}

.game-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.game-chat-head h3 {
  margin: 0;
}

.game-chat-head p {
  margin: 4px 0 0;
  color: var(--c-ink-soft);
  font-size: 0.9rem;
}

.game-chat-body {
  min-height: 220px;
  max-height: 320px;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(31, 31, 31, 0.12);
  background: rgba(247, 247, 245, 0.8);
}

.game-chat-msg {
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(31, 31, 31, 0.12);
  font-size: 0.9rem;
  color: var(--c-ink);
  white-space: pre-wrap;
}

.game-chat-msg.user {
  justify-self: end;
  background: rgba(31, 59, 88, 0.08);
  border-color: rgba(31, 59, 88, 0.2);
}

.game-chat-msg.system {
  background: rgba(31, 31, 31, 0.06);
  border-color: rgba(31, 31, 31, 0.18);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--c-ink-soft);
}

.game-chat-empty {
  color: var(--c-ink-soft);
  font-size: 0.9rem;
}

.game-chat-input {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.game-chat-input input {
  border: 1px solid rgba(31, 31, 31, 0.2);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  background: #ffffff;
}

.game-chat-input button {
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--c-accent);
  color: #ffffff;
  font-weight: 600;
}

.game-chat-input button:disabled,
.game-chat-input input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.game-chat-note {
  margin: 0;
  font-size: 0.85rem;
  color: var(--c-ink-soft);
}

@media (max-width: 900px) {
  .ai-window-main {
    grid-template-columns: 1fr;
  }

  .ai-window-header {
    align-items: flex-start;
  }

  .ai-window-toolbar {
    width: 100%;
    justify-content: space-between;
  }
}

@media (min-width: 901px) {
  .media-card-link {
    pointer-events: none;
    cursor: default;
  }
}

.profile-card {
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(180px, 240px) 1fr;
  align-items: center;
  background: var(--c-white);
  padding: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-soft);
}

.profile-media img {
  border-radius: 18px;
  border: 1px solid rgba(31, 26, 21, 0.12);
}

.profile-body h2 {
  margin: 0 0 6px;
  font-family: var(--font-sans);
}

.profile-title {
  margin: 0 0 12px;
  font-weight: 600;
  color: var(--c-ink-soft);
}

.label {
  font-weight: 600;
}

.muted {
  color: var(--c-ink-soft);
}

.callout {
  background: rgba(255, 255, 255, 0.9);
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--c-line);
  box-shadow: var(--shadow-soft);
}

.callout-inner {
  display: grid;
  gap: 16px;
  max-width: 640px;
}

.site-footer {
  padding: 28px 0 22px;
  border-top: 1px solid var(--c-line);
  background: linear-gradient(180deg, rgba(238, 242, 247, 0.8) 0%, rgba(238, 242, 247, 1) 60%);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.footer-grid h3,
.footer-grid h4 {
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.2;
}

.footer-brand {
  font-weight: 600;
}

.footer-grid p {
  margin: 0;
  color: var(--c-ink-soft);
  font-size: 0.95rem;
  line-height: 1.4;
}

.footer-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
}

.footer-col {
  display: flex;
  align-items: center;
  min-height: 100%;
}

.footer-time-col,
.footer-location-col {
  justify-content: flex-start;
}

.footer-contact-col {
  justify-content: center;
}

.footer-contact-stack {
  align-items: stretch;
  justify-content: center;
  height: 100%;
}

.footer-time {
  margin-top: 4px;
}

.footer-time-row {
  display: inline-flex;
  gap: 8px;
  align-items: baseline;
}

.footer-time-label {
  color: var(--c-ink);
  font-weight: 600;
}

.footer-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: auto;
  min-height: 2.3rem;
  padding: 8px 28px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-align: center;
}

.lang-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 170px;
}

.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  border-radius: 999px;
  border: 1px solid rgba(31, 31, 31, 0.18);
  padding: 8px 36px 8px 14px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  background-image:
    linear-gradient(180deg, #ffffff 0%, #f2f6fb 100%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1l5 5 5-5' stroke='%232c5a86' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 14px center;
  background-size: 100% 100%, 12px 8px;
  color: var(--c-ink);
  box-shadow: 0 6px 14px rgba(31, 31, 31, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.lang-switch select:hover {
  border-color: rgba(31, 31, 31, 0.3);
  transform: translateY(-1px);
}

.lang-switch select:focus {
  outline: none;
  border-color: var(--c-accent-strong);
  box-shadow: var(--shadow-glow);
}

.footer-bottom {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  color: var(--c-ink-soft);
  font-size: 0.9rem;
}

.reveal {
  opacity: 1;
  transform: none;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 960px) {
  .site-header-inner {
    grid-template-columns: 1fr auto;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    grid-column: 1 / -1;
    padding: 16px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--c-line);
    box-shadow: var(--shadow-soft);
    border-radius: var(--radius-lg);
  }

  .site-nav.is-open {
    display: flex;
  }

  .nav-break {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-header-inner .btn-primary {
    grid-column: 1 / -1;
    justify-self: flex-start;
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .instructions-shell {
    width: 100%;
  }
}

@media (max-width: 900px) {
  body {
    background-size: 160% 140%, 200% 180%;
    background-position: center, center;
    background-attachment: scroll, scroll;
  }

  .ai-tool-grid {
    grid-template-columns: 1fr;
  }

  .summary-chat-link {
    display: inline-flex;
  }

  .game-board {
    width: 100%;
  }

  .game-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  main {
    padding: 24px 0 64px;
  }

  main .page-inner {
    padding: 20px 5vw 40px;
    border-radius: 20px;
  }

  .site-header-inner {
    gap: 12px;
    padding: 12px 12px;
  }

  .brand-title {
    font-size: 1.1rem;
  }

  .brand-subtitle {
    font-size: 0.65rem;
    letter-spacing: 0.18em;
  }

  .hero {
    margin: 24px auto 20px;
  }

  .hero h1 {
    font-size: clamp(1.9rem, 9vw, 2.5rem);
  }

  .lead {
    font-size: 1rem;
  }

  .section {
    margin: 28px auto;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .section-subtitle {
    font-size: 1.1rem;
  }

  .content-stack {
    gap: 14px;
  }

  .media-grid {
    grid-template-columns: 1fr;
  }

  .media-card {
    padding: 10px;
  }

  .media-lightbox {
    padding: 14px;
  }

  .media-lightbox-content {
    max-width: 96vw;
    padding: 14px;
  }

  .media-lightbox-close {
    width: 52px;
    height: 52px;
    font-size: 1.3rem;
  }

  .form-card,
  .contact-card,
  .callout {
    padding: 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .ai-tool {
    margin-top: 20px;
  }

  .ai-tool-head {
    padding: 18px;
  }

  .ai-tool-head-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .ai-tool-grid {
    padding: 16px;
    gap: 14px;
  }

  .panel {
    padding: 16px;
  }

  .summary-bar {
    align-items: flex-start;
  }

  .summary-bar .nav-button {
    width: 100%;
    justify-content: center;
  }

  .action-row {
    grid-template-columns: 1fr;
  }

  .restart-form {
    justify-content: flex-start;
  }

  .chat-head {
    align-items: flex-start;
  }

  .chat-head-actions {
    width: 100%;
  }

  .chat-input {
    grid-template-columns: 1fr;
  }

  .chat-input button {
    width: 100%;
  }

  .chat-footer {
    width: 100%;
    justify-content: flex-start;
  }

  .ai-drawer {
    width: 100%;
  }

  .ai-drawer-body {
    padding: 16px;
  }

  .game-zone {
    padding: 18px;
  }

  .game-schedule-grid {
    grid-template-columns: minmax(120px, 1fr) repeat(var(--slot-count, 4), minmax(80px, 1fr));
  }

  .game-chat-input {
    grid-template-columns: 1fr;
  }

  .game-chat-input button {
    width: 100%;
  }

  .assistant-panel {
    right: 16px;
    left: 16px;
    width: auto;
    bottom: 88px;
  }

  .assistant-fab {
    width: 120px;
    height: 120px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .parrot-3d-stage {
    display: none;
  }
}

@keyframes page-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
