/* UC round-2 chrome. Loaded after the Webex kit so the banner stays one row,
   the menu sits in the header, and the phone bar does not cover the disclaimer. */

:root { --uc-glow: 0 0 18px rgba(34, 211, 238, 0.55); }

html[data-theme="bloom"] body.uc-lab {
  background:
    radial-gradient(1100px 520px at 0% -12%, rgba(34, 211, 238, 0.55), transparent 58%),
    radial-gradient(980px 460px at 100% -8%, rgba(244, 114, 182, 0.48), transparent 54%),
    radial-gradient(720px 420px at 50% 110%, rgba(167, 139, 250, 0.36), transparent 50%),
    linear-gradient(180deg, #fff7fb 0%, #e0f2fe 42%, #fae8ff 100%);
}
html[data-theme="aurora"] body.uc-lab {
  background:
    radial-gradient(1000px 480px at 8% -10%, rgba(34, 211, 238, 0.38), transparent 55%),
    radial-gradient(860px 420px at 100% 0%, rgba(232, 121, 249, 0.32), transparent 52%),
    radial-gradient(640px 380px at 40% 100%, rgba(250, 204, 21, 0.16), transparent 46%),
    linear-gradient(180deg, #05030d 0%, #0b1024 46%, #1e1b4b 100%);
}
body.uc-lab h1,
body.uc-lab h2,
body.uc-lab h3,
body.uc-lab h4 { font-family: "Canon Sans", system-ui, sans-serif; }
body.uc-lab {
  margin: 0;
  background:
    radial-gradient(900px 420px at 0% -10%, rgba(34, 211, 238, 0.18), transparent 60%),
    radial-gradient(800px 380px at 100% 0%, rgba(244, 114, 182, 0.16), transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.55;
  padding-bottom: 108px;
}
body.uc-lab.drawer-open { overflow: hidden; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #fff;
  color: #082f49;
  padding: 8px 12px;
  z-index: 100;
}
.skip:focus { top: 8px; }

.uc-top {
  position: sticky;
  top: 12px;
  z-index: 40;
  width: min(1120px, calc(100% - 20px));
  margin: 12px auto 8px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: color-mix(in srgb, #fff6fb 76%, transparent);
  backdrop-filter: blur(18px) saturate(1.45);
  box-shadow:
    0 18px 42px rgba(49, 46, 129, 0.32),
    0 0 0 1px rgba(34, 211, 238, 0.45),
    0 0 32px rgba(167, 139, 250, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}
html[data-theme="aurora"] .uc-top {
  background: color-mix(in srgb, #0b1024 74%, transparent);
  border-color: rgba(34, 211, 238, 0.5);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.55),
    0 0 36px rgba(34, 211, 238, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.uc-top .bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 6px 12px;
  max-width: 1180px;
  margin: 0 auto;
}
.menu-btn {
  order: -1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  color: #082f49;
  font-weight: 800;
  background: linear-gradient(120deg, #22d3ee, #a78bfa 55%, #f472b6);
  box-shadow: var(--uc-glow);
  cursor: pointer;
}
.menu-btn svg { width: 22px; height: 22px; }
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  min-width: 0;
}
.brand small { display: block; font-weight: 600; color: var(--ink-dim); font-size: 0.75rem; }
.nav-search { flex: 1; min-width: 0; position: relative; }
.nav-q {
  width: 100%;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--field);
  color: var(--ink);
  padding: 0 12px;
}
.search-pop {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: var(--card-bg);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-height: 280px;
  overflow: auto;
}
.search-pop a { display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; }
.search-pop a:hover, .search-pop a:focus { background: color-mix(in srgb, var(--accent) 16%, transparent); }

.display-control { position: relative !important; top: auto !important; right: auto !important; z-index: 45; margin: 0 !important; }
.display-btn, .theme-mini {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: var(--card-bg);
  color: var(--ink);
  font-weight: 700;
  padding: 0 10px;
  cursor: pointer;
}
.display-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  width: min(280px, 80vw);
  padding: 12px;
  border-radius: 16px;
  background: var(--card-bg);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  z-index: 45;
}
.display-panel label { display: block; font-size: 0.85rem; font-weight: 700; margin: 8px 0 4px; }
.a11y-font { display: flex; gap: 6px; }
.a11y-font button, .theme-row button {
  min-height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
}
.a11y-font button[aria-pressed="true"], .theme-row button[aria-pressed="true"] {
  background: linear-gradient(120deg, #22d3ee, #f472b6);
  color: #082f49;
}
.ink-input { width: 100%; height: 36px; border: 0; background: transparent; cursor: pointer; }

/* One-row banner. It scrolls away with the page. Only the header row stays put. */
.canon-banner,
body.home-world .canon-banner {
  position: relative !important;
  top: auto !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center;
  gap: 6px;
  width: min(1120px, calc(100% - 20px));
  margin: 0 auto 14px;
  max-height: 56px !important;
  min-height: 52px;
  overflow: hidden !important;
  padding: 6px 8px !important;
  z-index: 1;
  border-radius: 20px;
  border: 1px solid rgba(124, 58, 237, 0.4);
  background: color-mix(in srgb, #ffffff 72%, transparent);
  backdrop-filter: blur(14px);
  box-shadow:
    0 14px 32px rgba(49, 46, 129, 0.22),
    0 0 24px rgba(34, 211, 238, 0.35);
}
html[data-theme="aurora"] .canon-banner,
html[data-theme="aurora"] body.home-world .canon-banner {
  background: color-mix(in srgb, #111827 78%, transparent);
  border-color: rgba(34, 211, 238, 0.45);
}
.section-rail,
body.home-world .section-rail {
  display: flex !important;
  flex-wrap: nowrap !important;
  max-height: 44px !important;
  min-height: 40px !important;
  height: 44px !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  justify-content: flex-start !important;
  padding: 0 !important;
}
.canon-banner .identity-line { display: none !important; }
.rail-arrow {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 0;
  color: #082f49;
  font-size: 1.3rem;
  font-weight: 800;
  background: #fff;
  box-shadow: var(--uc-glow);
  cursor: pointer;
}
.section-rail { flex: 1; min-width: 0; }

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 30, 0.48);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 70;
}
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
.site-drawer {
  position: fixed;
  z-index: 90;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(420px, 92vw);
  transform: translateX(-105%);
  transition: transform 0.28s ease;
  background: var(--card-bg);
  color: var(--ink);
  overflow: auto;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.25);
  padding: 12px 12px 28px;
}
body.drawer-open .site-drawer { transform: translateX(0); }
.drawer-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.drawer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}
.drawer-brand img {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: #1c1917;
  display: block;
}
.drawer-search::placeholder {
  color: var(--ink);
  opacity: 0.72;
}
.drawer-bar button, .drawer-search {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
}
.drawer-search { width: 100%; margin-bottom: 8px; padding: 0 10px; }
.drawer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.drawer-list a, .drawer-list button.row {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px 10px;
  min-height: 58px;
  cursor: pointer;
}
.drawer-list .ico {
  flex: none;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg, #22d3ee, #818cf8 70%, #f472b6);
  color: #082f49;
  box-shadow: var(--uc-glow);
}
.drawer-list .ico svg { width: 22px; height: 22px; stroke: #082f49; stroke-width: 2.2; }
.drawer-list strong { display: block; }
.drawer-list span.desc { display: block; color: var(--ink-dim); font-size: 0.85rem; }

.phone-bar {
  display: grid;
  position: fixed;
  left: 12px;
  right: 148px;
  bottom: 12px;
  z-index: 80;
  width: auto;
  max-width: 760px;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: color-mix(in srgb, #fff6fb 84%, transparent);
  color: #1b1340;
  backdrop-filter: blur(18px) saturate(1.4);
  box-shadow:
    0 18px 42px rgba(49, 46, 129, 0.38),
    0 0 0 1px rgba(124, 58, 237, 0.35),
    0 0 28px rgba(244, 114, 182, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
html[data-theme="aurora"] .phone-bar {
  background: color-mix(in srgb, #0e1324 82%, transparent);
  color: #f8fafc;
  border-color: rgba(34, 211, 238, 0.45);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.55),
    0 0 28px rgba(34, 211, 238, 0.35);
}
.phone-bar a, .phone-bar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  font-size: 0.72rem;
  font-weight: 800;
}
.phone-bar svg {
  width: 22px;
  height: 22px;
  transform: perspective(90px) rotateX(14deg) rotateY(-10deg);
  filter:
    drop-shadow(0 5px 0 rgba(8, 47, 73, 0.28))
    drop-shadow(0 0 8px rgba(34, 211, 238, 0.9));
}
html[data-theme="bloom"] .phone-bar .is-menu { color: #082f49; }
.phone-bar a:hover svg,
.phone-bar button:hover svg,
.phone-bar a:focus-visible svg,
.phone-bar button:focus-visible svg {
  transform: perspective(90px) rotateX(0deg) translateY(-3px) scale(1.08);
}
@media (max-width: 800px) {
  .phone-bar { left: 8px; right: 8px; max-width: none; }
  body.uc-lab { padding-bottom: 96px; }
  .nav-search { display: none; }
  .display-btn span { display: none; }
}

.wrap { width: min(1180px, calc(100% - 28px)); margin: 0 auto; }
.hero-band {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 18px;
  padding: 22px 0 8px;
  align-items: stretch;
}
.hero-band h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; margin: 0 0 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
a.btn, button.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  background: linear-gradient(120deg, #22d3ee, #818cf8);
  color: #082f49;
  font-weight: 800;
  text-decoration: none;
  border: 0;
}
a.ghost, button.ghost {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  text-decoration: none;
  background: var(--card-bg);
  font-weight: 700;
}
.track-map, .card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.track-tile, .room-card {
  display: block;
  min-width: 0;
  padding: 14px;
  border-radius: 16px;
  text-decoration: none;
  color: #0b1020;
  background: var(--card, #fff);
  min-height: 120px;
  box-shadow: var(--shadow);
  overflow: visible;
}
.track-tile h2, .room-card h2, .room-card h3 {
  margin: 0 0 6px;
  max-width: 100%;
  font-size: clamp(1.05rem, 0.92rem + 0.9vw, 1.4rem);
  line-height: 1.2;
  letter-spacing: 0;
  overflow-wrap: break-word;
}
.track-tile h2, .track-tile p { color: #0b1020; }
.track-tile p, .room-card p {
  margin: 0 0 6px;
  overflow-wrap: break-word;
}
body.uc-lab .kicker { color: #4c1d95; }
html[data-theme="aurora"] body.uc-lab .kicker { color: #e9d5ff; }
body.uc-lab .lede { color: #1e1b4b; }
html[data-theme="aurora"] body.uc-lab .lede { color: #e0e7ff; }
body.uc-lab main a:not(.btn):not(.ghost):not(.dl-btn):not(.track-tile):not(.room-card):not(.section-chip) {
  color: #1e3a8a;
  font-weight: 700;
}
html[data-theme="aurora"] body.uc-lab main a:not(.btn):not(.ghost):not(.dl-btn):not(.track-tile):not(.room-card):not(.section-chip) {
  color: #bfdbfe;
}
.room-card { color: var(--ink); background: var(--card-bg); border: 1px solid var(--line); }
.stat-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 12px 0 20px; }
.stat { background: var(--card-bg); border-radius: 14px; padding: 10px 14px; min-width: 110px; border: 1px solid var(--line); }
.stat b { display: block; font-size: 1.4rem; }

.study-primer { max-width: 72ch; }
.study-primer p { font-size: 1.05rem; line-height: 1.55; }
.go-deeper { border: 2px solid #0f766e; border-radius: 16px; padding: 16px 18px; margin: 28px 0; background: #f0fdfa; color: #042f2e; }
html[data-theme="aurora"] .go-deeper { background: #042f2e; color: #ecfeff; border-color: #5eead4; }
.go-deeper h2 { margin-top: 0; }
.go-deeper li { margin: 6px 0; }
#sources .go-deeper { max-height: min(42vh, 320px); overflow: auto; }
.five, .worked, .eco-panel, .quiz, .sources, .room-downloads {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  margin: 12px 0;
  background: var(--card-bg);
}
.five { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2); }
.room-downloads { min-height: 64px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.section-dl { min-height: 0; margin-top: 10px; background: color-mix(in srgb, var(--card-bg) 70%, transparent); }
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.82rem;
  color: #082f49;
  background: linear-gradient(120deg, #fde047, #22d3ee 50%, #f472b6);
}
.diagram-frame { background: #0b1020; border-radius: 16px; overflow: hidden; margin: 8px 0; min-height: 180px; }
.diagram-frame svg, .diagram-frame img { width: 100%; height: auto; display: block; }
.hero-diagram {
  margin: 0;
  min-height: 0;
  height: auto;
  background: transparent;
  border-radius: 28px;
  box-shadow: 0 16px 40px rgba(49, 46, 129, 0.28);
}
.hero-diagram svg { width: 100%; height: auto; display: block; }
.quiz button.choice { display: block; width: 100%; text-align: left; margin: 6px 0; }
.quiz .is-good { outline: 3px solid #059669; }
.quiz .is-bad { outline: 3px solid #e11d48; }

.brand-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 8px 0 14px;
  padding: 10px;
  border-radius: 18px;
  border: 2px solid transparent;
  background:
    linear-gradient(var(--card-bg), var(--card-bg)) padding-box,
    linear-gradient(120deg, #22d3ee, #a78bfa, #f472b6, #fde047) border-box;
  box-shadow: 0 0 22px rgba(167, 139, 250, 0.35);
}
.site-footer { padding-bottom: 28px; }
.chart-bar { height: 18px; border-radius: 9px; background: linear-gradient(90deg, #22d3ee, #f472b6); margin: 4px 0 12px; }

.bot-dock {
  position: fixed;
  z-index: 82;
  right: 16px;
  bottom: 18px;
  width: auto;
  max-width: min(360px, calc(100% - 20px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.bot-dock.is-open { width: min(360px, calc(100% - 20px)); align-items: stretch; }
.monkey-btn {
  width: 120px;
  height: 140px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  filter: none;
}
.monkey-btn svg, .greet-mascot svg { width: 100%; height: 100%; display: block; }
.monkey-btn .arm-r, .greet-mascot .arm-r { transform-box: fill-box; transform-origin: 20% 80%; }
.monkey-btn[data-pose="wave"] .arm-r,
.monkey-btn[data-pose="cheer"] .arm-r { animation: wave 1.1s ease-in-out infinite; }
.monkey-btn .lid { transform-box: fill-box; transform-origin: center; animation: blink 4.5s infinite; }
@keyframes wave { 50% { transform: rotate(-22deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(0.12); } }
.bot-disclaimer {
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f0fdfa;
  color: #134e4a;
  font-size: 0.92rem;
  line-height: 1.45;
}
.bot-panel[hidden] { display: none !important; }
.bot-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow: auto;
  background: #ffffff;
  color: #1b1340;
  border-radius: 18px;
  border: 2px solid #0891b2;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  padding: 10px;
  margin-top: 6px;
}
.sheet-handle {
  display: none;
  width: 100%;
  min-height: 28px;
  border: 0;
  background: transparent;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.sheet-handle span {
  width: 52px;
  height: 6px;
  border-radius: 999px;
  background: #6d28d9;
}
.bot-log { max-height: 140px; overflow: auto; font-size: 0.95rem; color: #1b1340; }
.bot-log p { margin: 6px 0; }
.choice-row, .voice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.bot-panel button,
.bot-panel select,
.bot-panel summary,
.greet-card button,
.bot-form input {
  appearance: none;
  -webkit-appearance: none;
  min-height: 40px;
  border-radius: 12px;
  border: 2px solid #5b21b6;
  background-color: #ffffff;
  color: #1b1340;
  font: inherit;
  font-weight: 800;
  padding: 6px 10px;
}
.bot-panel select {
  width: 100%;
  background-image: linear-gradient(45deg, transparent 50%, #5b21b6 50%), linear-gradient(135deg, #5b21b6 50%, transparent 50%);
  background-position: calc(100% - 18px) 17px, calc(100% - 12px) 17px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 28px;
}
.choice-row button, .bot-form button, .bot-panel button[data-read] {
  background: linear-gradient(120deg, #22d3ee, #a78bfa 55%, #f472b6);
  color: #082f49;
  border-color: transparent;
  cursor: pointer;
}
.bot-extras { border-radius: 12px; background: #f5f3ff; color: #1e1b4b; }
.bot-extras summary { cursor: pointer; list-style: none; }
.bot-extras summary::-webkit-details-marker { display: none; }
.bot-extras .voice-row { padding: 0 8px 8px; }
.voice-row { display: grid; gap: 6px; }
.voice-row label { display: grid; gap: 4px; font-size: 0.85rem; font-weight: 800; color: #1e1b4b; }
.bot-panel input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #0891b2, #7c3aed);
  accent-color: #5b21b6;
}
.bot-panel input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #5b21b6;
  border: 2px solid #fff;
}
.bot-form { display: flex; gap: 6px; position: sticky; bottom: 0; background: #fff; padding-top: 6px; z-index: 2; }
.bot-form[hidden] { display: none !important; }
.bot-panel .py-chat-form {
  position: sticky;
  bottom: 0;
  z-index: 3;
  background: #fff;
  padding-top: 6px;
}
.bot-form input {
  flex: 1;
  min-width: 7.5rem;
  color: #1b1340;
  caret-color: #1b1340;
  -webkit-text-fill-color: #1b1340;
  background-color: #ffffff;
}
.bot-form input::placeholder {
  color: #5b21b6;
  -webkit-text-fill-color: #5b21b6;
  opacity: 1;
  font-weight: 700;
}
.greet-modal {
  position: fixed;
  inset: 0;
  z-index: 88;
  display: grid;
  place-items: center;
  padding: 16px;
}
.greet-backdrop { position: absolute; inset: 0; background: rgba(8, 10, 30, 0.62); }
.greet-card {
  position: relative;
  width: min(440px, 100%);
  max-height: min(70vh, 560px);
  overflow: auto;
  background: #ffffff;
  color: #1b1340;
  border-radius: 22px;
  border: 3px solid #0891b2;
  padding: 16px 16px 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.greet-card h2 { margin: 0 0 8px; color: #1e1b4b; font-size: 1.35rem; }
.greet-card p { margin: 0 0 12px; color: #1e1b4b; }
.greet-mascot { width: 150px; height: 176px; margin: 0 auto 4px; }
.read-sentence.is-spoken {
  background: #fde047;
  color: #1c1917;
  border-radius: 6px;
  box-shadow: 0 0 0 3px #fde047, 0 0 22px #facc15;
}
section.is-reading {
  outline: 3px solid #22d3ee;
  border-radius: 18px;
  box-shadow: 0 0 0 6px rgba(34, 211, 238, 0.35), 0 0 36px rgba(34, 211, 238, 0.65);
  animation: uc-read-glow 1.4s ease-in-out infinite;
}
@keyframes uc-read-glow {
  50% { box-shadow: 0 0 0 8px rgba(253, 224, 71, 0.45), 0 0 42px rgba(244, 114, 182, 0.7); }
}
.idle-note {
  background: #fff;
  color: #0b1020;
  border-radius: 12px;
  padding: 8px;
  margin-bottom: 6px;
  box-shadow: var(--shadow);
}

@media (min-width: 801px) {
  body.uc-lab main .wrap {
    width: min(1120px, calc(100% - 176px));
    margin-right: 156px;
    margin-left: auto;
  }
}
main, .wrap, .go-deeper, .lede, .go-deeper a, .go-deeper li {
  overflow-wrap: anywhere;
}
@media (max-width: 800px) {
  .greet-modal { align-items: end; padding: 0 8px calc(112px + env(safe-area-inset-bottom)); }
  .greet-card { max-height: 36vh; }
  .hero-band { grid-template-columns: 1fr; }
  .hero-diagram { margin-right: 0; }
  .track-map { padding-bottom: 130px; }
  body.uc-lab main { padding-right: 16px; }
  body.uc-lab main .lede { padding-right: 0; }
  .room-downloads { padding-right: 4px; }
  .site-drawer { padding-bottom: 120px; }
  .bot-dock:not(.is-open) {
    left: auto;
    right: 8px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
    z-index: 95;
  }
  .phone-bar { z-index: 96; }
  .bot-dock:not(.is-open) .monkey-btn,
  .bot-dock.is-parked:not(.is-open) .monkey-btn {
    width: 48px;
    height: 48px;
    overflow: hidden;
    border-radius: 14px;
  }
  .bot-dock.is-parked:not(.is-open) {
    top: auto;
    left: auto;
    right: 8px;
    bottom: calc(72px + env(safe-area-inset-bottom));
    width: 48px;
    height: 48px;
  }
  .bot-dock.is-open {
    left: 8px;
    right: 8px;
    width: auto;
    z-index: 97;
    top: 64px;
    bottom: calc(78px + env(safe-area-inset-bottom));
    height: auto;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .bot-dock.is-open .monkey-btn {
    position: absolute;
    top: 4px;
    right: 8px;
    width: 58px;
    height: 68px;
    margin: 0;
    z-index: 2;
  }
  .bot-dock.is-open .bot-panel > .bot-disclaimer:first-of-type { padding-right: 64px; }
  .bot-dock.is-open .bot-panel > p.bot-disclaimer:last-of-type { display: none; }
  .bot-dock.is-open .bot-panel {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    height: auto;
    margin-top: 0;
    padding-top: 6px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  .bot-dock.is-open [data-ztabot] {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .bot-dock.is-open .py-chat {
    flex: 1 1 auto;
    min-height: 0;
    margin-top: 4px;
    padding-top: 0;
    overflow: hidden;
  }
  body.guide-open .uc-top,
  body.guide-open .canon-banner,
  body.guide-open .phone-bar { display: none !important; }
  body.guide-open .bot-dock.is-open {
    top: 8px;
    bottom: 8px;
    height: auto;
    max-height: none;
  }
  .bot-dock.is-open .bot-disclaimer {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    padding: 4px 48px 4px 8px;
    font-size: 0.75rem;
    line-height: 1.25;
    max-height: 2.8em;
  }
  .bot-dock.is-open .py-chat-try { display: none; }
  .bot-dock.is-open .py-chat-examples,
  .bot-dock.is-open .py-chat-chips {
    flex-wrap: nowrap;
    align-items: center;
    max-height: 34px;
    margin: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .bot-dock.is-open .py-chat .bp-chip {
    flex: 0 0 auto;
    min-height: 30px;
    height: 30px;
    padding: 0 8px;
    font-size: 0.75rem;
  }
  .bot-dock.is-open .py-chat-log {
    flex: 1 1 auto;
    min-height: 140px;
    max-height: none;
  }
  .bot-dock.is-open .py-chat-form { flex: 0 0 auto; position: relative; z-index: 4; }
  .bot-dock.is-open .choice-row,
  .bot-dock.is-open .bot-log,
  .bot-dock.is-open .voice-pick,
  .bot-dock.is-open .bot-extras { display: none; }
  .bot-dock.is-open .sheet-handle { min-height: 44px; justify-content: flex-start; padding-left: 12px; }
  .bot-dock:not(.is-open) .bot-panel { display: none; }
  .sheet-handle { display: flex; }
}
@media (max-width: 800px) and (max-height: 520px) {
  .bot-dock.is-open {
    top: 56px;
    bottom: calc(68px + env(safe-area-inset-bottom));
    max-height: none;
    height: auto;
  }
  .bot-dock.is-open .monkey-btn { width: 36px; height: 42px; }
  .bot-dock.is-open .sheet-handle { min-height: 18px; }
  .bot-dock.is-open .bot-panel {
    overflow: hidden;
    gap: 4px;
    padding: 4px 8px 6px;
  }
  .bot-dock.is-open .bot-disclaimer {
    padding-right: 40px;
    font-size: 0.72rem;
  }
  .bot-dock.is-open [data-ztabot] {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .bot-dock.is-open .py-chat {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0;
    padding-top: 0;
    overflow: hidden;
  }
  .bot-dock.is-open .py-chat-log {
    flex: 1 1 auto;
    min-height: 140px;
    max-height: none;
  }
  .bot-dock.is-open .py-chat-form { flex: 0 0 auto; }
}
@media (max-width: 520px) {
  .track-tile { padding-right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .site-drawer, .drawer-backdrop, .monkey-btn .arm-r, .monkey-btn .lid { transition: none; animation: none; }
  .uc-particles, section.is-reading, .track-tile, .room-card, .section-chip, .phone-bar svg, .hero-diagram {
    animation: none !important;
    transition: none !important;
  }
  .phone-bar a:hover svg, .phone-bar button:hover svg, .track-tile:hover, .room-card:hover, .section-chip:hover {
    transform: none;
  }
}
html[data-motion="reduce"] .monkey-btn .arm-r,
html[data-motion="reduce"] .monkey-btn .lid,
html[data-motion="reduce"] .uc-particles,
html[data-motion="reduce"] section.is-reading { animation: none; }
html[data-motion="reduce"] .uc-particles { display: none; }

.disclaimer-panel {
  background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 40%, #dbeafe 100%) !important;
  color: #052e2b !important;
}
.disclaimer-panel h2,
.disclaimer-panel p,
.disclaimer-panel strong {
  color: #052e2b !important;
  -webkit-text-fill-color: #052e2b !important;
  background: none !important;
}
.disclaimer-panel a {
  color: #1e3a8a !important;
  -webkit-text-fill-color: #1e3a8a !important;
  font-weight: 800;
  text-decoration: underline;
}
.site-footer.lab-footer {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 280px;
}
@media (max-width: 800px) {
  .site-footer.lab-footer { padding-bottom: 240px; }
}
.footer-brand, .site-copy { color: #1b1340; }
html[data-theme="aurora"] .footer-brand,
html[data-theme="aurora"] .site-copy { color: #f8fafc; }

.table-wrap { overflow: auto; }
table.plain { width: 100%; border-collapse: collapse; }
table.plain th, table.plain td { border-bottom: 1px solid var(--line); text-align: left; padding: 6px; vertical-align: top; }
.confirm { border-left: 4px solid #d97706; padding-left: 10px; }

.uc-particles {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.uc-particles span {
  position: absolute;
  bottom: -12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 14px #22d3ee, 0 0 4px #fff;
  animation: uc-float linear infinite;
}
.uc-particles span:nth-child(3n) { background: #f472b6; box-shadow: 0 0 14px #f472b6; }
.uc-particles span:nth-child(3n+1) { background: #fde047; box-shadow: 0 0 14px #fde047; }
@keyframes uc-float {
  to { transform: translateY(-110vh); opacity: 0.15; }
}
body.uc-lab > header,
body.uc-lab > .canon-banner,
body.uc-lab > main,
body.uc-lab > footer {
  position: relative;
  z-index: 1;
}
body.uc-lab > header.uc-top { position: sticky; }
main section, main article { scroll-margin-top: 108px; }
.section-chip .chip-ico,
.drawer-list .ico {
  transform: perspective(80px) rotateX(12deg) rotateY(-8deg);
  filter: drop-shadow(0 5px 0 rgba(8, 47, 73, 0.22)) drop-shadow(0 0 8px rgba(34, 211, 238, 0.75));
}
.track-tile, .room-card, .section-chip, a.btn, button.btn, .brand-icon {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.track-tile:hover, .room-card:hover, .section-chip:hover, a.btn:hover, button.btn:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(49, 46, 129, 0.28), 0 0 18px rgba(34, 211, 238, 0.4);
}
.section-chip:hover .chip-ico, .section-chip:focus-visible .chip-ico {
  transform: perspective(80px) rotateX(0deg) translateY(-2px) scale(1.08);
}
.hero-diagram { transition: transform 0.2s ease; will-change: transform; }
.voice-pick {
  display: grid;
  gap: 4px;
  margin: 0 0 8px;
  font-size: 0.85rem;
  font-weight: 800;
  color: #1e1b4b;
}
.voice-pick select, .bot-panel select {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid #7c3aed;
  background: #f5f3ff;
  color: #1e1b4b;
  font-weight: 700;
  padding: 0 8px;
}
