.companion-reprise {
  display: block;
  margin-top: 8px;
  font-size: 0.74rem;
  line-height: 1.3;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
}

:root {
  color-scheme: dark;
  --ink: #eef4f8;
  --ink-soft: #a9b7c9;
  --ink-faint: #71839a;
  --shell: #081321;
  --surface: #0b1b30;
  --surface-2: #10243b;
  --surface-3: #172e48;
  --line: #28415f;
  --line-soft: rgba(151, 176, 205, 0.17);
  --teal: #21c7b7;
  --teal-soft: rgba(33, 199, 183, 0.13);
  --electric-blue: #4aa8ff;
  --crystal-blue: #8bdcff;
  --electric-blue-soft: rgba(74, 168, 255, 0.14);
  --saffron: #ffbf47;
  --coral: #f26b5e;
  --paper: #f4eee3;
  --shadow: 0 18px 55px rgba(0, 0, 0, 0.24);
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #112238;
  --ink-soft: #54657a;
  --ink-faint: #78879a;
  --shell: #e9e2d7;
  --surface: #f8f4ec;
  --surface-2: #fffdf8;
  --surface-3: #ede6db;
  --line: #c9bdac;
  --line-soft: rgba(41, 57, 76, 0.13);
  --teal-soft: rgba(9, 153, 144, 0.11);
  --electric-blue: #177bcb;
  --crystal-blue: #36a7e9;
  --electric-blue-soft: rgba(23, 123, 203, 0.11);
  --shadow: 0 16px 45px rgba(31, 43, 57, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--shell);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
select,
textarea {
  color: inherit;
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 2px solid var(--saffron);
  outline-offset: 3px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.012) 1px, transparent 1px),
    var(--shell);
  background-size: 32px 32px;
  transition: width 180ms ease, margin-left 180ms ease;
}

body.projects-open .app-shell {
  width: calc(100% - 326px);
  margin-left: 326px;
}

.topbar {
  height: 66px;
  display: none;
  grid-template-columns: minmax(250px, 1fr) auto minmax(250px, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--shell) 88%, transparent);
  padding: 0 18px;
}

.app-shell.header-collapsed .topbar {
  display: none;
}

.app-shell.header-collapsed .workspace {
  height: 100vh;
}

.brand {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand img {
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-size: 14px;
  line-height: 1.1;
}

.brand-copy small {
  color: var(--ink-faint);
  font-size: 11px;
}

.topbar-center {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 12px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--saffron) 14%, transparent);
}

.status-dot.ready {
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
}

.status-dot.error {
  background: var(--coral);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--coral) 14%, transparent);
}

.divider {
  width: 1px;
  height: 15px;
  background: var(--line);
  margin: 0 3px;
}

.topbar-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.technical-controls {
  display: none;
}

.compact-field {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-faint);
  font-size: 11px;
}

.compact-field select,
.context-row select {
  max-width: 154px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 7px 27px 7px 9px;
}

.icon-button,
.stop-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
}

.workspace {
  height: 100vh;
  height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--shell);
}

.window-dock {
  grid-column: 1 / -1;
  grid-row: 2;
  position: relative;
  z-index: 500;
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line-soft);
  padding: 6px 10px max(6px, env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 90%, var(--shell));
  box-shadow: 0 -10px 28px color-mix(in srgb, var(--shell) 16%, transparent);
}

.dock-brand {
  min-width: 104px;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  padding: 3px 7px 3px 4px;
  color: var(--ink);
  text-align: left;
}

.dock-brand img {
  border-radius: 6px;
}

.dock-brand strong {
  font-size: 10px;
}

.dock-brand:hover,
.dock-brand[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--teal) 48%, var(--line));
  background: var(--teal-soft);
}

.dock-brand-copy {
  min-width: 0;
  display: grid;
  line-height: 1;
}

.dock-brand-copy small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 750;
}

.dock-spacer {
  min-width: 8px;
  margin-left: auto;
}

.dock-system-tray {
  min-width: 0;
  display: flex;
  flex-flow: row nowrap;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  height: 34px;
  border-left: 1px solid var(--line-soft);
  padding-left: 7px;
  white-space: nowrap;
}

.dock-system-tray > * {
  flex: 0 0 auto;
}

.activity-clock {
  height: 34px;
  min-width: 74px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 0 9px;
  color: var(--ink-soft);
}

.activity-clock:hover,
.activity-clock[data-state="active"] {
  border-color: color-mix(in srgb, var(--teal) 52%, var(--line));
}

.activity-clock-pulse {
  width: 14px;
  height: 14px;
  display: grid;
  flex: 0 0 14px;
  place-items: center;
}

.activity-clock-pulse i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.activity-clock[data-state="active"] .activity-clock-pulse i {
  background: var(--teal);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--teal) 12%, transparent);
  animation: activity-heartbeat 1.4s ease-out infinite;
}

.activity-clock-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  text-align: left;
  line-height: 1;
}

.activity-clock-copy strong {
  color: var(--ink);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
}

.activity-clock-copy small {
  color: var(--ink-faint);
  font-size: 7px;
  font-weight: 850;
}

@keyframes activity-heartbeat {
  0%, 45%, 100% { transform: scale(0.82); opacity: 0.65; }
  15% { transform: scale(1.12); opacity: 1; }
  27% { transform: scale(0.94); opacity: 0.82; }
}

.detached-return,
.dock-studio-trigger,
.together-trigger {
  height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink-soft);
}

.detached-return {
  min-width: 92px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-inline: 12px;
  font-size: 10px;
  font-weight: 850;
}

.dock-studio-trigger,
.together-trigger {
  width: 34px;
  min-width: 34px;
  padding: 0;
}

.dock-studio-trigger {
  font-size: 18px;
  line-height: 1;
}

.dock-studio-trigger:hover,
.dock-studio-trigger.is-active,
.together-trigger:hover,
.together-trigger.is-active,
.detached-return:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.together-trigger {
  display: grid;
  place-items: center;
  position: relative;
}

.together-trigger.has-notification::after {
  content: "";
  position: absolute;
  top: 4px;
  right: 4px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--surface-2);
  border-radius: 50%;
  background: var(--saffron);
}

.together-glyph {
  position: relative;
  width: 18px;
  height: 15px;
  display: inline-block;
  color: currentColor;
}

.together-glyph i {
  position: absolute;
  width: 12px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 4px;
  background: var(--surface-2);
}

.together-glyph i::after {
  position: absolute;
  bottom: -4px;
  width: 4px;
  height: 4px;
  border: solid currentColor;
  content: "";
}

.together-glyph i:first-child {
  top: 0;
  left: 0;
}

.together-glyph i:first-child::after {
  left: 2px;
  border-width: 0 0 1.5px 1.5px;
  transform: skewY(-35deg);
}

.together-glyph i:last-child {
  right: 0;
  bottom: 0;
  border-color: var(--teal);
}

.together-glyph i:last-child::after {
  right: 2px;
  border-width: 0 1.5px 1.5px 0;
  border-color: var(--teal);
  transform: skewY(35deg);
}

.dock-session-shortcuts {
  min-width: 0;
  max-width: min(28vw, 360px);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-module-tabs {
  min-width: 0;
  max-width: min(34vw, 440px);
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.dock-module-tabs[hidden] {
  display: none;
}

.dock-module-tabs::-webkit-scrollbar {
  display: none;
}

.dock-module-button {
  height: 34px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 0 10px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 850;
}

.dock-module-button:hover,
.dock-module-button.is-active {
  border-color: color-mix(in srgb, var(--teal) 58%, var(--line));
  background: var(--teal-soft);
  color: var(--teal);
}

.dock-module-button i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 10%, transparent);
}

.dock-session-shortcuts[hidden] {
  display: none;
}

.dock-session-shortcuts::-webkit-scrollbar {
  display: none;
}

.dock-session-shortcuts button {
  height: 32px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 0 9px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.dock-session-shortcuts button:hover {
  border-color: color-mix(in srgb, var(--teal) 58%, var(--line));
  color: var(--teal);
}

.dock-session-shortcuts button i,
.dock-window-row > span > i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 11%, transparent);
}

.dock-studio {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 118px;
  z-index: 930;
  width: min(780px, calc(100vw - 138px));
  max-height: min(74svh, 690px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid color-mix(in srgb, var(--teal) 42%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 24px 76px color-mix(in srgb, var(--shell) 70%, transparent);
  padding: 12px;
  backdrop-filter: blur(18px) saturate(1.12);
}

.dock-studio[hidden] {
  display: none;
}

.dock-studio-head,
.dock-studio-section-head,
.dock-window-row,
.dock-shortcut-row {
  display: flex;
  align-items: center;
}

.dock-studio-head {
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}

.dock-studio-head > span,
.dock-studio-section-head > span,
.dock-window-row > span,
.dock-shortcut-row > span {
  min-width: 0;
  display: grid;
}

.dock-studio-head small,
.dock-studio-section-head small,
.dock-window-row small,
.dock-shortcut-row small {
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.35;
}

.dock-studio-head strong,
.dock-studio-section-head strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
}

.dock-studio-head > button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 20px;
}

.dock-studio-head > button:hover {
  background: var(--teal-soft);
  color: var(--teal);
}

.dock-studio-body {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(280px, 1.05fr);
  gap: 18px;
  padding-top: 12px;
}

.dock-studio-section + .dock-studio-section {
  border-left: 1px solid var(--line-soft);
  padding-left: 18px;
}

.dock-studio-section-head {
  min-height: 34px;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.dock-studio-section-head > button,
.dock-window-row > button,
.dock-shortcut-row > button,
.dock-shortcut-form > button {
  height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.dock-studio-section-head > button {
  padding-inline: 10px;
}

.dock-window-list,
.dock-shortcut-list,
.dock-module-list {
  display: grid;
  gap: 2px;
}

.dock-window-row,
.dock-shortcut-row,
.dock-module-row {
  min-height: 48px;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
}

.dock-module-row {
  display: flex;
  align-items: center;
}

.dock-module-row > span {
  min-width: 0;
  display: grid;
  flex: 1 1 auto;
}

.dock-module-row > span small {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-module-row > button,
.dock-config-actions > button {
  height: 30px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.dock-module-row > button:not(.dock-module-pin) {
  width: 28px;
  min-width: 28px;
  padding: 0;
}

.dock-module-row > button:disabled {
  opacity: 0.25;
}

.dock-module-row > .dock-module-pin {
  min-width: 54px;
  padding-inline: 7px;
}

.dock-module-row.is-pinned > .dock-module-pin {
  border-color: color-mix(in srgb, var(--teal) 58%, var(--line));
  background: var(--teal-soft);
  color: var(--teal);
}

.dock-module-limit {
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
}

.dock-config-actions {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}

.dock-config-actions > button {
  flex: 1 1 0;
}

.dock-config-actions > button:hover {
  border-color: color-mix(in srgb, var(--teal) 58%, var(--line));
  color: var(--teal);
}

.dock-studio-subsection {
  margin-top: 13px;
  border-top: 1px solid var(--line-soft);
  padding-top: 10px;
}

.dock-window-row > span {
  position: relative;
  grid-template-columns: 10px 1fr;
  column-gap: 9px;
  flex: 1 1 auto;
}

.dock-window-row > span > i {
  grid-row: 1 / 3;
  align-self: center;
  background: var(--ink-faint);
  box-shadow: none;
}

.dock-window-row.is-open > span > i {
  background: var(--teal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 11%, transparent);
}

.dock-window-row > button:first-of-type {
  min-width: 58px;
  padding-inline: 8px;
}

.dock-window-row > button:last-child,
.dock-shortcut-row > button {
  width: 30px;
  min-width: 30px;
  padding: 0;
  font-size: 14px;
}

.dock-window-row > button.is-open {
  border-color: color-mix(in srgb, var(--teal) 58%, var(--line));
  color: var(--teal);
}

.dock-window-row.is-external > a {
  min-width: 72px;
  border: 1px solid color-mix(in srgb, var(--saffron) 58%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--saffron) 9%, var(--surface-2));
  padding: 7px 9px;
  color: var(--saffron);
  font-size: 9px;
  font-weight: 850;
  text-align: center;
  text-decoration: none;
}

.dock-window-row.is-external > a:hover {
  background: var(--saffron);
  color: var(--surface);
}

.dock-shortcut-form {
  display: grid;
  grid-template-columns: minmax(86px, 0.42fr) minmax(150px, 1fr) auto;
  gap: 7px;
}

.dock-shortcut-form label {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.dock-shortcut-form label > span {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 800;
}

.dock-shortcut-form input {
  width: 100%;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 0 9px;
  color: var(--ink);
}

.dock-shortcut-form > button {
  height: 34px;
  align-self: end;
  border-color: var(--teal);
  background: var(--teal-soft);
  padding-inline: 12px;
  color: var(--teal);
}

.dock-shortcut-list {
  margin-top: 9px;
}

.dock-shortcut-list > p,
.dock-studio-note {
  margin: 0;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.55;
}

.dock-shortcut-list > p {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
}

.dock-shortcut-row > span {
  flex: 1 1 auto;
}

.dock-studio-note {
  margin-top: 10px;
  border-top: 1px solid var(--line-soft);
  padding-top: 9px;
}

.dock-utility-tray {
  position: absolute;
  left: 10px;
  bottom: calc(100% + 8px);
  z-index: 920;
  width: min(760px, calc(100vw - 20px));
  border: 1px solid color-mix(in srgb, var(--teal) 42%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 24px 76px color-mix(in srgb, var(--shell) 72%, transparent);
  padding: 10px;
  backdrop-filter: blur(18px) saturate(1.12);
}

.dock-utility-tray[hidden] {
  display: none;
}

.together-panel {
  position: absolute;
  right: 10px;
  bottom: calc(100% + 8px);
  z-index: 925;
  width: min(540px, calc(100vw - 20px));
  max-height: min(76svh, 620px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid color-mix(in srgb, var(--teal) 46%, var(--line));
  border-radius: 11px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--ink);
  box-shadow: 0 24px 76px color-mix(in srgb, var(--shell) 72%, transparent);
  padding: 12px;
  backdrop-filter: blur(18px) saturate(1.12);
}

.together-panel[hidden] {
  display: none;
}

.together-head {
  min-height: 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}

.together-glyph.is-large {
  width: 28px;
  height: 23px;
  color: var(--ink-soft);
}

.together-glyph.is-large i {
  width: 19px;
  height: 14px;
  border-width: 2px;
  border-radius: 6px;
  background: var(--surface);
}

.together-head > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.together-head small,
.together-card small,
.together-receipts small {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.together-head strong {
  font-size: 14px;
  letter-spacing: 0.06em;
}

.together-status {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--saffron) 55%, var(--line));
  border-radius: 999px;
  padding: 0 9px;
  color: var(--saffron);
  font-size: 8px;
  font-weight: 900;
}

.together-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.together-head > button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 20px;
}

.together-head > button:hover {
  background: var(--teal-soft);
  color: var(--teal);
}

.together-lead {
  margin: 12px 0;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.55;
}

.together-lead strong {
  color: var(--ink);
}

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

.together-card {
  min-width: 0;
  min-height: 94px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-content: start;
  gap: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-2);
  padding: 10px;
}

.together-card.is-door {
  border-color: color-mix(in srgb, var(--teal) 42%, var(--line));
}

.together-card-icon {
  width: 30px;
  height: 30px;
  display: grid;
  grid-row: 1 / span 2;
  place-items: center;
  border-radius: 7px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 15px;
  font-weight: 900;
}

.together-card > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.together-card strong {
  font-size: 11px;
}

.together-card em {
  color: var(--ink-faint);
  font-size: 9px;
  font-style: normal;
  line-height: 1.45;
}

.together-card > a {
  grid-column: 2;
  width: fit-content;
  border: 1px solid var(--teal);
  border-radius: 6px;
  background: var(--teal-soft);
  padding: 6px 8px;
  color: var(--teal);
  font-size: 9px;
  font-weight: 850;
  text-decoration: none;
}

.together-card > a:hover {
  background: var(--teal);
  color: var(--surface);
}

.together-receipts {
  margin-top: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 82%, var(--surface));
  padding: 10px;
}

.together-notifications {
  margin-top: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 82%, var(--surface));
  padding: 10px;
}

.together-notifications > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.together-sync-button,
.together-notifications li > button {
  min-height: 28px;
  border: 1px solid color-mix(in srgb, var(--teal) 62%, var(--line));
  border-radius: 7px;
  padding: 5px 9px;
  color: var(--ink);
  background: color-mix(in srgb, var(--teal-soft) 72%, var(--surface));
  font-size: 8px;
  font-weight: 850;
  cursor: pointer;
}

.together-sync-button:disabled,
.together-notifications li > button:disabled {
  cursor: default;
  opacity: .58;
}

.together-notifications > header > span {
  display: grid;
  gap: 3px;
}

.together-notifications small {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.together-notifications strong {
  font-size: 10px;
}

.together-notifications ol {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.together-notifications li {
  display: grid;
  gap: 2px;
  border-top: 1px solid var(--line-soft);
  padding-top: 7px;
  color: var(--ink-faint);
  font-size: 9px;
}

.together-notifications li.is-unread {
  color: var(--ink);
}

.together-notifications li > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.together-notifications li > small {
  overflow: hidden;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.together-notifications li > button {
  justify-self: start;
  margin-top: 4px;
}

.together-lf-calls > div {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.together-lf-calls article {
  display: grid;
  gap: 3px;
  padding-top: 7px;
  border-top: 1px solid var(--line-soft);
}

.together-lf-calls article > strong { font-size: 9px; }
.together-lf-calls article > small,
.together-lf-calls p { margin: 0; color: var(--ink-faint); font-size: 8px; line-height: 1.45; }

.together-receipts > header > span {
  display: grid;
  gap: 3px;
}

.together-receipts > header strong {
  font-size: 10px;
}

.together-receipts > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 9px;
}

.together-receipts > div > span {
  min-width: 0;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 2px 7px;
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
}

.together-receipts > div i {
  width: 20px;
  height: 20px;
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-style: normal;
  font-weight: 900;
}

.together-receipts > div strong {
  font-size: 9px;
}

.together-receipts > div small {
  overflow: hidden;
  letter-spacing: 0;
  line-height: 1.4;
  text-overflow: ellipsis;
}

.together-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 8px;
}

.together-foot code {
  color: var(--teal);
  font-size: 9px;
}

.dock-utility-head {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding: 0 2px 8px;
}

.dock-utility-head > button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 20px;
}

.dock-utility-head > button:hover {
  background: var(--teal-soft);
  color: var(--teal);
}

.dock-tool-grid {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  padding-top: 10px;
}

.dock-tool-grid > :is(.kiwithing-trigger, .quest-trigger, .xp-trigger, .desktop-link-trigger) {
  width: 68px;
  min-width: 68px;
  height: 52px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.dock-tool-grid > :is(.kiwithing-trigger, .quest-trigger, .xp-trigger, .desktop-link-trigger) > small {
  position: static;
  display: block;
  color: var(--ink-faint);
  font-size: 7px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.dock-tool-grid .desktop-link-trigger {
  flex-basis: 68px;
}

.dock-tool-grid .pulse-player {
  height: 52px;
}

.dock-tool-grid .snap-controls,
.dock-tool-grid > .dock-icon-button {
  align-self: center;
}

.window-tabs,
.snap-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.snap-controls {
  position: relative;
}

.window-tabs button,
.window-tabs .toge-external-door,
.snap-controls button,
.window-actions button,
.dock-icon-button,
.pulse-player button {
  min-width: 34px;
  height: 32px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-faint);
}

.window-tabs button,
.window-tabs .toge-external-door {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
}

.window-tabs .toge-external-door {
  color: var(--ink-soft);
}

.window-tabs .toge-external-door:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.window-tabs .toge-external-door i {
  width: 7px;
  min-width: 7px;
  height: 7px;
  border: 1px solid var(--teal);
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 12%, transparent);
}

.window-tabs .toge-external-door small {
  color: currentColor;
  font-size: 9px;
  line-height: 1;
  opacity: 0.65;
}

.dock-icon-button {
  width: 32px;
  min-width: 32px;
  padding: 0;
  font-size: 15px;
}

.language-toggle {
  font-size: 9px;
  font-weight: 900;
}

.pulse-player {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 0 10px 0 3px;
}

.pulse-player button {
  width: 28px;
  min-width: 28px;
  height: 27px;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--teal);
  font-size: 10px;
}

.pulse-track {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-track strong {
  color: var(--ink-soft);
  font-size: 8px;
  white-space: nowrap;
}

.pulse-bars {
  height: 16px;
  display: flex;
  align-items: end;
  gap: 2px;
}

.pulse-bars i {
  width: 2px;
  height: 5px;
  border-radius: 999px;
  background: var(--ink-faint);
}

.pulse-player.is-playing .pulse-bars i {
  background: var(--teal);
  animation: player-bar 0.78s ease-in-out infinite alternate;
}

.pulse-player.is-playing .pulse-bars i:nth-child(2) { animation-delay: -0.32s; }
.pulse-player.is-playing .pulse-bars i:nth-child(3) { animation-delay: -0.55s; }
.pulse-player.is-playing .pulse-bars i:nth-child(4) { animation-delay: -0.18s; }

@keyframes player-bar {
  from { height: 4px; opacity: 0.55; }
  to { height: 15px; opacity: 1; }
}

.window-tabs button i,
.window-identity > i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.window-tabs button.is-open {
  border-color: color-mix(in srgb, var(--teal) 55%, var(--line));
  color: var(--ink);
}

.window-tabs button.is-open i,
.living-window.is-live .window-identity > i {
  background: var(--teal);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 14%, transparent);
}

.window-tabs button.is-live i,
.living-window.is-live .window-identity > i {
  animation: live-pulse 1s ease-out infinite;
}

.window-tabs button.is-active,
.snap-controls button.is-active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

body.is-detached-panel .window-dock {
  justify-content: center;
}

body.is-detached-panel :is(.dock-brand, .window-tabs, .together-trigger, .together-panel, .dock-studio-trigger, .dock-session-shortcuts, .dock-spacer, .dock-system-tray, .dock-utility-tray) {
  display: none !important;
}

body.is-detached-panel .detached-return {
  display: flex;
}

body.is-detached-panel .living-grid {
  gap: 0;
  padding: 0;
}

body.is-detached-panel .living-window {
  border-radius: 0;
}

.window-status {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.living-grid {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  gap: 8px;
  padding: 8px;
  overflow: hidden;
}

.dock-page-surface {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 40;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr);
  margin: 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--teal) 48%, var(--line));
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

@media (min-width: 901px) {
  body.dock-page-open .workspace {
    grid-template-columns: minmax(0, 3fr) minmax(300px, 1.1fr);
  }

  body.dock-page-open .dock-page-surface {
    grid-column: 1;
    margin-right: 4px;
  }

  body.dock-page-open .living-grid {
    grid-column: 2;
    padding-left: 4px;
  }

  body.dock-page-open .living-window:not([data-window="talk"]) {
    display: none !important;
  }

  body.dock-page-open .living-window[data-window="talk"] {
    display: grid !important;
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  body.dock-page-open .living-grid .window-resizer {
    display: none;
  }
}

@media (max-width: 900px) {
  body.dock-page-open .living-grid {
    display: none;
  }
}

.dock-page-surface[hidden] {
  display: none;
}

.dock-page-titlebar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding: 5px 7px 5px 10px;
  background: color-mix(in srgb, var(--surface) 92%, var(--shell));
}

.dock-page-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-page-identity > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.dock-page-identity small {
  color: var(--teal);
  font-size: 7px;
  font-weight: 900;
}

.dock-page-identity strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-page-description {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dock-page-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.dock-page-actions button {
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-faint);
}

.dock-page-actions button:hover {
  border-color: var(--line-soft);
  background: var(--teal-soft);
  color: var(--teal);
}

.dock-page-surface iframe {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: var(--surface-2);
}

.katoying-companion-mark {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 7px;
  background: var(--surface-2);
}

.katoying-companion-mark > i {
  position: absolute;
  top: 7px;
  left: 8px;
  width: 12px;
  height: 12px;
  border: 2px solid var(--teal);
  border-radius: 50% 50% 44% 44%;
}

.katoying-companion-mark > i::after {
  position: absolute;
  right: 2px;
  bottom: -5px;
  left: 2px;
  height: 3px;
  border-top: 2px solid var(--teal);
  border-bottom: 2px solid var(--teal);
  content: "";
}

.katoying-companion-mark > b {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 8px;
  height: 8px;
  border: 2px solid var(--coral);
  border-radius: 50%;
}

.katoying-companion-mark > em {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--paper);
  animation: katoying-gaze 2.8s ease-in-out infinite alternate;
}

@keyframes katoying-gaze {
  from { transform: translate(-1px, 0); }
  to { transform: translate(1px, 1px); }
}

.living-grid[data-layout="stack"] {
  flex-direction: column;
  overflow-y: auto;
  scroll-snap-type: y proximity;
}

.living-grid[data-layout="stack"] .living-window {
  flex: 1 0 min(42vh, 420px);
  width: 100%;
  min-height: 260px;
  scroll-snap-align: start;
}

.living-grid[data-layout="stack"] .window-resizer {
  display: none;
}

.layout-menu {
  position: fixed;
  top: auto;
  bottom: calc(58px + env(safe-area-inset-bottom));
  right: 58px;
  z-index: 880;
  width: min(330px, calc(100vw - 20px));
  border: 1px solid color-mix(in srgb, var(--teal) 42%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 96%, var(--shell));
  box-shadow: 0 24px 70px color-mix(in srgb, var(--shell) 58%, transparent);
  padding: 12px;
}

.header-collapsed .layout-menu {
  top: 50px;
}

.layout-menu[hidden] {
  display: none;
}

.layout-menu header,
.layout-menu header > span,
.layout-moves {
  display: flex;
  align-items: center;
}

.layout-menu header {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 11px;
}

.layout-menu header > span {
  align-items: baseline;
  gap: 8px;
}

.layout-menu header small {
  color: var(--ink-faint);
  font-size: 8px;
  font-weight: 850;
}

.layout-menu header strong {
  color: var(--teal);
  font-size: 11px;
}

.layout-menu header button {
  width: 30px;
  min-width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
  font-size: 18px;
}

.layout-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.layout-presets > button {
  min-width: 0;
  min-height: 76px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink-soft);
  padding: 8px 5px;
  font-size: 9px;
  font-weight: 800;
}

.layout-presets > button:hover,
.layout-presets > button.is-active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
}

.layout-preview {
  width: 42px;
  height: 28px;
  display: flex;
  gap: 3px;
  border-radius: 4px;
}

.layout-preview b {
  display: block;
  flex: 1;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.72;
}

.layout-preview.is-focus b:first-child { flex: 2; }
.layout-preview.is-stack { flex-direction: column; }
.layout-preview.is-solo b:not(:first-child) { display: none; }

.layout-moves {
  gap: 7px;
  margin-top: 9px;
}

.layout-moves button,
.layout-show-all {
  min-height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.layout-moves button {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 11px;
}

.layout-show-all {
  width: 100%;
  margin-top: 7px;
}

.layout-moves button:hover,
.layout-show-all:hover {
  border-color: var(--teal);
  color: var(--teal);
}

.living-grid[data-count="1"] {
  grid-template-columns: minmax(0, 1fr);
}

.living-grid[data-count="2"][data-layout="equal"] {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.living-grid[data-count="2"][data-layout="focus"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.living-grid[data-count="2"][data-layout="focus"] .living-window.is-active {
  grid-column: span 2;
}

.living-grid[data-count="3"][data-layout="equal"] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.living-grid[data-count="3"][data-layout="focus"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.living-grid[data-count="3"][data-layout="focus"] .living-window.is-active {
  grid-column: span 2;
}

.living-grid[data-count="4"][data-layout="equal"] {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.living-grid[data-count="4"][data-layout="focus"] {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.living-grid[data-count="4"][data-layout="focus"] .living-window.is-active {
  grid-column: span 2;
}

.living-window {
  position: relative;
  flex: var(--window-weight, 1) 1 0;
  min-width: 140px;
  min-height: 0;
  display: grid;
  grid-template-rows: 37px minmax(0, 1fr);
  overflow: visible;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 34px color-mix(in srgb, var(--shell) 25%, transparent);
  transition: flex-grow 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.living-window[hidden] {
  display: none;
}

.living-window.is-active {
  border-color: color-mix(in srgb, var(--teal) 60%, var(--line));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--teal) 12%, transparent), var(--shadow);
}

.living-window.is-dragging {
  opacity: 0.55;
}

.living-window.is-drop-target {
  border-color: var(--saffron);
}

.living-grid.is-resizing,
.living-grid.is-resizing * {
  cursor: col-resize !important;
  user-select: none !important;
}

.living-grid.is-resizing .living-window {
  transition: none;
}

.window-titlebar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 7px 7px 0 0;
  padding: 0 6px 0 10px;
  background: color-mix(in srgb, var(--surface-2) 76%, var(--surface));
  cursor: grab;
  user-select: none;
}

.window-titlebar::before {
  width: 8px;
  height: 14px;
  flex: 0 0 8px;
  background: radial-gradient(circle, var(--ink-faint) 1.1px, transparent 1.35px) 0 0 / 4px 4px;
  content: "";
  opacity: 0.48;
}

.window-titlebar:active {
  cursor: grabbing;
}

.window-identity,
.window-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.window-identity {
  min-width: 0;
}

.window-identity strong {
  color: var(--ink);
  font-size: 10px;
}

.window-identity small {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.window-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.window-actions button {
  width: 27px;
  min-width: 27px;
  height: 25px;
  border: 0;
  background: transparent;
  font-size: 15px;
}

.window-actions button:hover,
.snap-controls button:hover,
.window-tabs button:hover {
  background: var(--teal-soft);
  color: var(--teal);
}

.living-window-body {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border-radius: 0 0 7px 7px;
  container-type: inline-size;
}

:is(.pantry, .countertop, .toge-room, .living-grid) {
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--teal) 52%, transparent) transparent;
}

:is(.pantry, .countertop, .toge-room, .living-grid)::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

:is(.pantry, .countertop, .toge-room, .living-grid)::-webkit-scrollbar-track {
  background: transparent;
}

:is(.pantry, .countertop, .toge-room, .living-grid)::-webkit-scrollbar-thumb {
  border: 1px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 48%, var(--line));
  background-clip: padding-box;
}

.window-resizer {
  position: absolute;
  top: 43px;
  right: 0;
  bottom: 7px;
  z-index: 8;
  width: 12px;
  min-width: 12px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: col-resize;
  touch-action: none;
}

.window-resizer span {
  position: absolute;
  top: 34%;
  bottom: 34%;
  right: 1px;
  width: 2px;
  border-radius: 999px;
  background: var(--line);
  opacity: 0;
  transition: opacity 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.window-resizer:hover span,
.window-resizer:focus-visible span,
.living-grid.is-resizing .window-resizer span {
  background: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 12%, transparent);
  opacity: 1;
}

.living-window.is-last-visible .window-resizer,
.living-grid[data-count="1"] .window-resizer {
  display: none;
}

.pantry,
.countertop {
  width: 100%;
  height: 100%;
  min-width: 0;
  overflow-y: auto;
  background: color-mix(in srgb, var(--surface) 88%, var(--shell));
  padding: 20px 16px;
}

.toge-room {
  width: 100%;
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(240px, 1fr) auto auto;
  gap: 14px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 44%, color-mix(in srgb, var(--teal) 8%, transparent), transparent 38%),
    color-mix(in srgb, var(--surface) 88%, var(--shell));
  padding: 20px 16px;
}

.toge-hop-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border-block: 1px solid color-mix(in srgb, var(--electric-blue) 30%, var(--line-soft));
  padding: 10px 2px;
}

.toge-hop-card[hidden] { display: none; }

.toge-hop-emblem {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--electric-blue) 58%, var(--line));
  border-radius: 7px;
  background: var(--electric-blue-soft);
  color: var(--electric-blue);
  font-size: 17px;
  filter: drop-shadow(0 0 8px var(--electric-blue-soft));
}

.toge-hop-card > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.toge-hop-card strong,
.toge-hop-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toge-hop-card strong { color: var(--ink); font-size: 10px; }
.toge-hop-card small { color: var(--ink-faint); font-size: 8px; }

.toge-hop-card > button {
  min-width: 54px;
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--electric-blue) 52%, var(--line));
  border-radius: 6px;
  background: var(--electric-blue-soft);
  color: var(--electric-blue);
  font-size: 9px;
  font-weight: 900;
}

.toge-room-head,
.toge-controls,
.toge-signal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.toge-room-head h2 {
  margin: 4px 0 0;
  font-size: 18px;
}

.toge-room-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.toge-room-state i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.toge-room[data-room="open"] .toge-room-state {
  color: var(--teal);
}

.toge-room[data-room="open"] .toge-room-state i {
  background: var(--teal);
  box-shadow: 0 0 0 4px var(--teal-soft);
  animation: live-pulse 1.2s ease-out infinite;
}

.toge-table {
  position: relative;
  min-height: 240px;
  display: grid;
  grid-template-columns: repeat(2, minmax(88px, 132px));
  grid-template-rows: repeat(2, minmax(76px, 98px));
  place-content: center;
  gap: 62px 86px;
}

.toge-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid color-mix(in srgb, var(--teal) 48%, var(--line));
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  box-shadow: 0 0 0 20px color-mix(in srgb, var(--teal) 4%, transparent);
}

.toge-core span,
.toge-core i {
  position: absolute;
  inset: 9px;
  border: 1px dashed color-mix(in srgb, var(--teal) 38%, transparent);
  border-radius: 50%;
}

.toge-core i {
  inset: -10px;
  border-color: color-mix(in srgb, var(--saffron) 20%, transparent);
}

.toge-core b {
  color: var(--teal);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.toge-room[data-room="open"] .toge-core span {
  animation: toge-orbit 5s linear infinite;
}

@keyframes toge-orbit {
  to { transform: rotate(360deg); }
}

.toge-seat {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  padding: 10px;
  color: var(--ink-soft);
  text-align: left;
}

.toge-seat.is-you {
  grid-template-rows: auto auto auto;
  cursor: pointer;
}

.toge-seat.is-you:hover,
.toge-seat.is-you:focus-visible {
  border-color: color-mix(in srgb, var(--electric-blue) 62%, var(--line));
  background: color-mix(in srgb, var(--electric-blue) 8%, var(--surface-2));
}

.toge-seat > span:first-child,
.toge-seat > img {
  grid-row: 1 / 3;
}

.toge-seat.is-you > .seat-avatar { grid-row: 1 / 4; }

.toge-seat strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toge-seat small {
  color: var(--ink-faint);
  font-size: 8px;
}

.toge-seat.is-you em {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 7px;
  font-style: normal;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toge-user-devil {
  position: absolute;
  right: -7px;
  top: -12px;
  font-size: 16px;
  transform-origin: 50% 100%;
  animation: community-devil-dance 720ms ease-in-out infinite;
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--coral) 55%, transparent));
}

.toge-user-devil[hidden] { display: none; }

.seat-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
  font-weight: 900;
}

.toge-seat.is-empty {
  border-style: dashed;
  opacity: 0.72;
}

.toge-seat.is-empty > span {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  grid-row: 1 / 3;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--ink-faint);
}

.toge-seat.is-empty.is-prepared {
  border-color: color-mix(in srgb, var(--saffron) 55%, var(--line));
  opacity: 1;
}

.toge-controls {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.toge-controls button {
  min-height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 0 13px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.toge-controls .toge-primary {
  border-color: color-mix(in srgb, var(--teal) 55%, var(--line));
  background: var(--teal-soft);
  color: var(--teal);
}

.toge-controls button[aria-pressed="true"] {
  border-color: var(--saffron);
  color: var(--saffron);
}

.toge-signal {
  color: var(--ink-faint);
  font-size: 9px;
}

.toge-meter {
  height: 18px;
  display: flex;
  align-items: end;
  gap: 3px;
}

.toge-meter i {
  width: 3px;
  height: 4px;
  border-radius: 999px;
  background: var(--teal);
  opacity: 0.45;
  transition: height 80ms linear;
}

.pantry {
  border-right: 0;
}

.countertop {
  border-left: 0;
}

.panel-heading,
.bench-head,
.message-topline,
.context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-heading h2,
.bench-head h1 {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.2;
}

.bench-head h1 {
  font-size: 16px;
}

.eyebrow,
.message-label {
  color: var(--ink-faint);
  font-size: 10px;
  font-weight: 800;
}

.counter {
  min-width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
}

.new-dish {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 18px 0 16px;
  border: 1px solid color-mix(in srgb, var(--teal) 55%, transparent);
  border-radius: 7px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
}

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

.fork-shelf {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.shelf-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.fork-list {
  display: grid;
  gap: 7px;
}

.fork-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
}

.fork-open,
.fork-remove {
  border: 0;
  background: transparent;
}

.fork-open {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 10px;
  text-align: left;
}

.fork-open strong,
.fork-open span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fork-open strong {
  font-size: 10px;
}

.fork-open span {
  color: var(--ink-faint);
  font-size: 9px;
}

.fork-remove {
  color: var(--ink-faint);
}

.empty-mini,
.pin-card,
.recipe {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
}

.empty-mini {
  padding: 14px;
  color: var(--ink-faint);
  font-size: 11px;
  line-height: 1.5;
}

.pin-card {
  position: relative;
  padding: 12px 30px 12px 12px;
}

.pin-card p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
}

.pin-card button {
  position: absolute;
  top: 7px;
  right: 7px;
  border: 0;
  background: transparent;
  color: var(--ink-faint);
}

.pantry-footer {
  display: grid;
  gap: 8px;
  margin-top: 28px;
}

.recipe {
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 11px;
}

.recipe strong {
  font-size: 12px;
}

.recipe span {
  color: var(--ink-faint);
  font-size: 10px;
}

.recipe:hover,
.starter-grid button:hover,
.thinking-actions button:hover {
  border-color: color-mix(in srgb, var(--teal) 55%, transparent);
  background: var(--teal-soft);
}

.cookbench {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  background: var(--surface);
}

.bench-head {
  min-height: 54px;
  border-bottom: 1px solid var(--line-soft);
  padding: 9px 16px;
}

.heat-state {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 11px;
}

.heat-bars {
  height: 18px;
  display: flex;
  align-items: end;
  gap: 3px;
}

.heat-bars i {
  width: 3px;
  height: 7px;
  border-radius: 2px;
  background: var(--ink-faint);
}

.heat-bars i:nth-child(2) {
  height: 12px;
}

.heat-bars i:nth-child(3) {
  height: 17px;
}

.is-cooking .heat-bars i {
  background: var(--saffron);
  animation: simmer 0.8s ease-in-out infinite alternate;
}

.is-cooking .heat-bars i:nth-child(2) {
  animation-delay: 0.15s;
}

.is-cooking .heat-bars i:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes simmer {
  to { opacity: 0.35; transform: scaleY(0.55); }
}

.stream {
  min-height: 0;
  overflow-y: auto;
  padding: clamp(20px, 4cqi, 34px) clamp(16px, 5cqi, 48px) 38px;
  scroll-behavior: smooth;
}

.welcome {
  max-width: 700px;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 auto;
}

.welcome-mark {
  width: 68px;
  height: 68px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.companion-stage {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.companion-orb {
  --gaze-x: 0px;
  --gaze-y: 0px;
  flex: 0 0 68px;
  border: 0;
  background: transparent;
  padding: 0;
  transition: transform 0.2s ease;
}

.companion-orb:hover {
  transform: translateY(-2px);
}

.companion-orb svg {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 14px;
}

.companion-flame {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: companion-breathe 1.8s ease-in-out infinite alternate;
}

.companion-eye {
  transform-box: fill-box;
  transform-origin: center;
  animation: companion-blink 4.6s ease-in-out infinite;
}

.companion-pupil {
  transform: translate(var(--gaze-x), var(--gaze-y));
  transition: transform 0.12s ease-out;
}

.companion-mouth {
  display: none;
}

.companion-orb[data-emotion="curious"] .mood-smile,
.companion-orb[data-emotion="proud"] .mood-smile,
.companion-orb[data-emotion="listening"] .mood-smile,
.companion-orb[data-emotion="resting"] .mood-smile,
.companion-orb[data-emotion="focused"] .mood-focus,
.companion-orb[data-emotion="exploring"] .mood-focus,
.companion-orb[data-emotion="building"] .mood-focus,
.companion-orb[data-emotion="stuck"] .mood-stuck {
  display: block;
}

.companion-orb[data-emotion="focused"] .companion-eye circle:first-child,
.companion-orb[data-emotion="exploring"] .companion-eye circle:first-child {
  fill: var(--saffron);
}

.companion-orb[data-emotion="building"] .companion-eye circle:first-child {
  fill: var(--teal);
}

.companion-orb[data-emotion="stuck"] {
  animation: companion-shake 0.28s ease-in-out 2;
}

.companion-orb[data-heartbeat="warm"] .companion-flame {
  animation-duration: 1.25s;
}

.companion-orb[data-heartbeat="fast"] .companion-flame {
  animation-duration: 0.82s;
}

.companion-orb[data-heartbeat="sprint"] .companion-flame {
  animation-duration: 0.46s;
}

.companion-orb[data-heartbeat="stuck"] .companion-flame {
  animation-duration: 0.32s;
}

.companion-orb[data-heartbeat="warm"] .companion-eye circle:first-child,
.companion-orb[data-heartbeat="fast"] .companion-eye circle:first-child,
.companion-orb[data-heartbeat="sprint"] .companion-eye circle:first-child {
  filter: drop-shadow(0 0 8px color-mix(in srgb, var(--teal) 70%, transparent));
}

.companion-readout {
  display: grid;
  gap: 4px;
}

.companion-emotion {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.companion-emotion b {
  font-size: 19px;
}

.companion-readout small {
  max-width: 170px;
  color: var(--ink-faint);
  font-size: 10px;
}

.companion-atomlang {
  display: inline-block;
  margin-top: 3px;
  color: var(--teal);
  font-size: 13px;
  letter-spacing: 2px;
  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.companion-orb[data-emotion="focused"] ~ .companion-readout .companion-atomlang,
.companion-orb[data-emotion="exploring"] ~ .companion-readout .companion-atomlang,
.companion-orb[data-emotion="building"] ~ .companion-readout .companion-atomlang {
  opacity: 1;
  animation: atomlang-pulse 1.2s ease-in-out infinite alternate;
}

@keyframes atomlang-pulse {
  to { opacity: 0.5; transform: scale(1.06); }
}

@keyframes companion-breathe {
  to { transform: rotate(2deg) scale(.97, 1.05); }
}

@keyframes companion-blink {
  0%, 46%, 52%, 100% { transform: scaleY(1); }
  49% { transform: scaleY(.14); }
}

@keyframes companion-shake {
  50% { transform: translateX(2px); }
}

.welcome h2 {
  max-width: 680px;
  margin: 9px 0 10px;
  font-size: clamp(23px, 3.5cqi, 36px);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.welcome p {
  max-width: 600px;
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(12px, 1.8cqi, 15px);
  line-height: 1.55;
}

.starter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.starter-grid button,
.thinking-actions button {
  min-height: 48px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
  text-align: left;
  padding: 12px;
  font-size: 11px;
  line-height: 1.4;
}

.conversation {
  max-width: 820px;
  display: grid;
  gap: 20px;
  margin: 0 auto;
}

.message,
.tool-rack {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 18px;
}

.user-message {
  border-left: 3px solid var(--ink-faint);
}

.reasoning-braid {
  border-left: 3px solid var(--electric-blue);
  background: color-mix(in srgb, var(--surface-2) 94%, var(--electric-blue));
}

.reasoning-braid-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--electric-blue);
  font-size: 8px;
  font-weight: 900;
}

.reasoning-braid-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.reasoning-braid-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  align-items: stretch;
  margin-top: 13px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.reasoning-strand {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 14px 0;
}

.reasoning-strand > small,
.reasoning-shared-direction small {
  color: var(--ink-faint);
  font-size: 7px;
  font-weight: 900;
}

.human-trace-list {
  display: grid;
  gap: 7px;
}

.human-trace-fragment {
  min-width: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 8px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.45;
}

.human-trace-fragment b {
  color: var(--electric-blue);
  font-size: 7px;
  font-weight: 900;
}

.human-trace-fragment span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reasoning-strand.is-companion p {
  margin: 0;
  color: var(--ink-soft);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.reasoning-knot {
  position: relative;
  align-self: center;
  width: 24px;
  height: 24px;
  justify-self: center;
}

.reasoning-knot::before,
.reasoning-knot::after,
.reasoning-knot i {
  position: absolute;
  content: "";
}

.reasoning-knot::before,
.reasoning-knot::after {
  top: 11px;
  width: 12px;
  height: 1px;
  background: var(--line);
}

.reasoning-knot::before { right: 18px; }
.reasoning-knot::after { left: 18px; }

.reasoning-knot i {
  inset: 4px;
  border: 1px solid var(--electric-blue);
  border-radius: 50% 50% 50% 4px;
}

.reasoning-knot i:first-child { transform: rotate(45deg); }
.reasoning-knot i:last-child { transform: rotate(225deg); }

.reasoning-shared-direction {
  display: grid;
  gap: 5px;
  padding-top: 13px;
}

.reasoning-shared-direction strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.reasoning-braid[data-phase="mixing"] .reasoning-knot,
.reasoning-braid[data-phase="aligned"] .reasoning-knot {
  color: var(--teal);
  animation: reasoning-knot-pulse 1.4s ease-in-out infinite;
}

.reasoning-braid[data-phase="aligned"] {
  border-left-color: var(--teal);
}

.reasoning-braid[data-phase="aligned"] .reasoning-braid-state,
.reasoning-braid[data-phase="aligned"] .reasoning-shared-direction small {
  color: var(--teal);
}

@keyframes reasoning-knot-pulse {
  50% { transform: scale(1.08); opacity: 0.68; }
}

.thinking-message {
  border-left: 3px solid var(--saffron);
}

.answer-message {
  border-left: 3px solid var(--teal);
}

.answer-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.answer-actions button {
  border: 1px solid color-mix(in srgb, var(--teal) 48%, transparent);
  border-radius: 6px;
  background: var(--teal-soft);
  padding: 8px 10px;
  color: var(--teal);
  font-size: 10px;
  font-weight: 800;
}

.message-body {
  margin-top: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 1.7;
}

.thought-text {
  color: var(--ink-soft);
  font-family: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
}

.live-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--saffron);
  font-size: 9px;
  font-weight: 800;
}

.live-chip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--saffron);
  animation: pulse 0.9s ease-in-out infinite alternate;
}

@keyframes pulse {
  to { opacity: 0.25; }
}

.thinking-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.thinking-actions button {
  min-height: 34px;
  padding: 8px 11px;
}

@media (max-width: 620px) {
  .reasoning-braid-grid {
    grid-template-columns: 1fr;
  }

  .reasoning-knot {
    width: 22px;
    height: 22px;
    transform: rotate(90deg);
  }

  .reasoning-braid[data-phase="mixing"] .reasoning-knot,
  .reasoning-braid[data-phase="aligned"] .reasoning-knot {
    animation: none;
  }

  .reasoning-strand.is-human { padding-bottom: 5px; }
  .reasoning-strand.is-companion { padding-top: 5px; }
}

@media (prefers-reduced-motion: reduce) {
  .reasoning-braid .reasoning-knot,
  .activity-clock-pulse i,
  .katoying-companion-mark > em { animation: none !important; }
}

.tool-rack {
  background: color-mix(in srgb, var(--surface-2) 86%, var(--teal));
}

#toolList {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.tool-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--line-soft);
  padding-top: 8px;
  color: var(--ink-soft);
  font-size: 11px;
}

.tool-item i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--saffron);
}

.tool-item.done i {
  background: var(--teal);
}

.composer {
  border-top: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface) 94%, var(--shell));
  padding: 9px 14px 10px;
}

.composer-panel {
  min-width: 0;
}

.mobile-composer-toggle {
  display: none;
}

.mobile-composer-close {
  display: none;
}

.composer-toolbar {
  display: flex;
  align-items: center;
}

.composer-box {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-2);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.composer-box:focus-within {
  border-color: color-mix(in srgb, var(--teal) 62%, var(--line));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 9%, transparent);
}

.composer-toolbar {
  gap: 7px;
  min-height: 37px;
  padding: 4px 5px 5px 8px;
}

.composer-toolbar-spacer {
  flex: 1 1 auto;
}

.composer-model-field {
  min-width: 0;
  max-width: min(170px, 42%);
}

.composer-model-field select {
  width: 100%;
  min-height: 29px;
  border: 1px solid transparent;
  border-radius: 7px;
  outline: none;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  padding: 0 28px 0 9px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.composer-model-field select:hover,
.composer-model-field select:focus-visible {
  border-color: var(--line);
  color: var(--ink);
}

.voice-button,
.send-button,
.stop-button {
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
}

.voice-button {
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.voice-button:hover,
.voice-button:focus-visible {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--teal);
}

.voice-button.is-listening {
  border-color: color-mix(in srgb, var(--teal) 64%, var(--line));
  background: var(--teal-soft);
  color: var(--teal);
  animation: voice-listening-pulse 1.2s ease-in-out infinite;
}

@keyframes voice-listening-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--teal) 0%, transparent); }
  50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 14%, transparent); }
}

.kitchen-journey {
  margin-bottom: 9px;
}

.journey-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 7px;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.journey-head strong {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
  text-align: right;
  text-transform: none;
}

.journey-gate {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.journey-gate strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.journey-gate button {
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--teal) 55%, var(--line));
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.journey-gate button:hover:not(:disabled) {
  border-color: var(--teal);
  background: color-mix(in srgb, var(--teal-soft) 70%, var(--teal));
}

.journey-gate button:disabled {
  cursor: default;
  opacity: 0.46;
}

.journey-track {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.kitchen-stage {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
}

.kitchen-stage:not(:last-child)::after {
  position: absolute;
  z-index: 0;
  top: 10px;
  left: 24px;
  right: 3px;
  height: 1px;
  background: var(--line);
  content: "";
}

.kitchen-stage i {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-faint);
  font-size: 7px;
  font-style: normal;
}

.kitchen-stage span {
  position: relative;
  z-index: 1;
  min-width: 0;
  overflow: hidden;
  background: color-mix(in srgb, var(--surface) 94%, var(--shell));
  padding-right: 5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kitchen-stage.done {
  color: var(--ink-soft);
}

.kitchen-stage.done::after {
  background: color-mix(in srgb, var(--teal) 65%, var(--line));
}

.kitchen-stage.done i {
  border-color: var(--teal);
  background: var(--teal);
  color: #06221f;
}

.kitchen-stage.current {
  color: var(--teal);
}

.kitchen-stage.current i {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--teal) 12%, transparent);
  animation: kitchen-stage-breathe 1.6s ease-in-out infinite;
}

@keyframes kitchen-stage-breathe {
  50% {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--teal) 4%, transparent);
  }
}

@keyframes live-pulse {
  50% {
    transform: scale(1.7);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--teal) 8%, transparent);
  }
}

.composer textarea {
  width: 100%;
  min-height: 42px;
  max-height: 112px;
  resize: none;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 10px 12px 3px;
  line-height: 1.45;
}

.send-button {
  width: 31px;
  min-width: 31px;
  height: 31px;
  border: 0;
  border-radius: 50%;
  background: var(--teal);
  color: #06221f;
  font-size: 17px;
  font-weight: 900;
}

.send-button b {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.stop-button {
  color: var(--coral);
}

.stop-button:disabled {
  display: none;
}

.context-card,
.timeline-card,
.engine-details {
  margin-top: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
  padding: 14px;
}

.context-row {
  min-height: 34px;
  color: var(--ink-soft);
  font-size: 11px;
}

.context-row strong {
  color: var(--ink);
}

.context-row.quiet {
  min-height: 24px;
  color: var(--ink-faint);
}

.context-meter {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-3);
  margin: 3px 0 8px;
}

.context-meter i {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--teal);
  transition: width 0.3s ease;
}

.bond-pixels {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
  margin: 2px 0 9px;
}

.bond-pixels i {
  height: 5px;
  border-radius: 1px;
  background: var(--surface-3);
  transition: background 0.2s ease, transform 0.2s ease;
}

.bond-pixels i.lit {
  background: var(--teal);
  transform: translateY(-1px);
}

.bond-pixels i.warm {
  background: var(--saffron);
}

.event-list {
  display: grid;
  gap: 12px;
  margin-top: 13px;
}

.event-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.event-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  color: var(--saffron);
  font-size: 9px;
}

.event-icon.ready {
  color: var(--teal);
}

.event-item strong,
.event-item span {
  display: block;
  overflow-wrap: anywhere;
}

.event-item strong {
  font-size: 10px;
}

.event-item span {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.4;
}

.engine-details summary {
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
}

.engine-details dl {
  display: grid;
  gap: 8px;
  margin: 13px 0 0;
}

.engine-details dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-faint);
  font-size: 10px;
}

.engine-details dt,
.engine-details dd {
  margin: 0;
}

.module-summary {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 10px;
}

.module-summary small,
.assembly-details small,
.research-details small {
  color: var(--ink-faint);
  line-height: 1.45;
}

.module-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.module-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-top: 1px solid var(--line-soft);
  padding-top: 7px;
  color: var(--ink);
  text-decoration: none;
}

.module-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.module-row strong,
.module-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-row strong {
  font-size: 10px;
}

.module-row small {
  color: var(--ink-faint);
  font-size: 8px;
}

.module-state {
  max-width: 82px;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-state.found {
  color: var(--teal);
}

.assembly-picker {
  display: grid;
  gap: 6px;
  margin: 12px 0 8px;
  color: var(--ink-faint);
  font-size: 9px;
}

.assembly-picker select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-3);
  padding: 8px;
}

.research-mother,
.research-depth {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.research-mother > span {
  display: grid;
  gap: 2px;
}

.research-mother strong,
.research-mother b {
  font-size: 10px;
}

.research-mother b {
  color: var(--ink-faint);
}

.research-mother b.ready { color: var(--teal); }
.research-mother b.source { color: var(--saffron); }
.research-mother b.missing { color: var(--coral); }

.research-depth {
  color: var(--ink-soft);
  font-size: 10px;
}

.research-depth select {
  width: 120px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: var(--surface-3);
  padding: 6px 8px;
  color: var(--ink);
  font-size: 10px;
}

.research-route {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 12px 0 8px;
}

.research-route span {
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-3) 88%, transparent);
  padding: 4px 7px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 800;
}

.research-note {
  display: block;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 36px));
  transform: translateY(18px);
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
  box-shadow: var(--shadow);
  padding: 11px 14px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  font-size: 11px;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

@container (max-width: 470px) {
  .stream {
    padding-inline: 16px;
  }

  .welcome h2 {
    max-width: 360px;
    margin-block: 10px;
    font-size: 26px;
  }

  .welcome p {
    font-size: 12px;
    line-height: 1.45;
  }

  .starter-grid {
    gap: 7px;
    margin-top: 18px;
  }

  .starter-grid button {
    min-height: 44px;
    padding: 9px 10px;
    font-size: 9px;
  }
}

@media (max-width: 1050px) {
  .window-identity small {
    display: none;
  }

  .compact-field span,
  .topbar-center .divider,
  #sessionLabel {
    display: none;
  }

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

  .pulse-track strong {
    display: none;
  }
}

@media (max-width: 780px), (pointer: coarse) and (max-height: 500px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100svh;
  }

  .topbar {
    height: auto;
    min-height: 62px;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 9px 12px;
  }

  .topbar-center {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: center;
    padding-bottom: 3px;
  }

  .topbar-actions {
    grid-column: 2;
    grid-row: 1;
  }

  .compact-field {
    display: none;
  }

  .compact-field.work-mode-field {
    display: flex;
  }

  .work-mode-field span {
    display: none;
  }

  .workspace {
    height: 100svh;
    min-height: 100svh;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .header-collapsed .workspace {
    height: 100svh;
    min-height: 100svh;
  }

  .window-dock {
    gap: 5px;
    overflow: visible;
    padding-inline: 6px;
  }

  .window-dock::-webkit-scrollbar {
    display: none;
  }

  .dock-brand {
    width: 38px;
    min-width: 38px;
    padding-inline: 5px;
  }

  .dock-brand img {
    width: 26px;
    height: 26px;
  }

  .dock-brand-copy {
    display: none;
  }

  .window-tabs {
    min-width: 0;
    flex: 1 1 auto;
  }

  .window-tabs button,
  .window-tabs .toge-external-door {
    min-width: 0;
    flex: 1 1 0;
    justify-content: center;
    gap: 4px;
    padding-inline: 4px;
    font-size: 9px;
  }

  .window-tabs button i {
    width: 6px;
    min-width: 6px;
    height: 6px;
  }

  .dock-studio-trigger,
  .together-trigger {
    width: 34px;
    min-width: 34px;
  }

  .dock-module-tabs {
    max-width: 30vw;
    gap: 3px;
  }

  .dock-module-button {
    height: 34px;
    max-width: 88px;
    gap: 4px;
    padding-inline: 7px;
    overflow: hidden;
  }

  .dock-module-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .dock-session-shortcuts {
    display: none;
  }

  .dock-spacer {
    min-width: 0;
    display: block;
  }

  .dock-system-tray {
    gap: 3px;
    border-left: 0;
    padding-left: 0;
  }

  .activity-clock {
    min-width: 52px;
    gap: 4px;
    padding-inline: 6px;
  }

  .activity-clock-pulse {
    width: 8px;
    flex-basis: 8px;
  }

  .activity-clock-copy small {
    display: none;
  }

  .dock-system-tray .pulse-player {
    width: 34px;
    gap: 0;
    justify-content: center;
    padding: 0;
  }

  .dock-system-tray #pulsePlayButton {
    display: none;
  }

  .dock-system-tray .pulse-track {
    width: 32px;
    justify-content: center;
  }

  .dock-page-surface {
    grid-template-rows: 42px minmax(0, 1fr);
    margin: 5px;
  }

  .dock-page-description {
    display: none;
  }

  .dock-utility-tray {
    position: fixed;
    right: 7px;
    bottom: calc(56px + env(safe-area-inset-bottom));
    left: 7px;
    width: auto;
    max-height: min(72svh, 560px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 9px;
  }

  .dock-studio {
    position: fixed;
    right: 7px;
    bottom: calc(56px + env(safe-area-inset-bottom));
    left: 7px;
    width: auto;
    max-height: min(76svh, 650px);
    border-radius: 9px;
  }

  .together-panel {
    position: fixed;
    right: 7px;
    bottom: calc(56px + env(safe-area-inset-bottom));
    left: 7px;
    width: auto;
    max-height: min(76svh, 620px);
    border-radius: 9px;
  }

  body.together-open .mobile-composer-toggle {
    display: none;
  }

  .together-foot {
    display: grid;
    justify-content: stretch;
    gap: 3px;
  }

  .dock-studio-body {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .dock-studio-section + .dock-studio-section {
    border-top: 1px solid var(--line-soft);
    border-left: 0;
    padding-top: 12px;
    padding-left: 0;
  }

  .dock-shortcut-form {
    grid-template-columns: minmax(80px, 0.42fr) minmax(120px, 1fr);
  }

  .dock-shortcut-form > button {
    grid-column: 1 / -1;
  }

  .dock-module-row {
    flex-wrap: wrap;
    padding-block: 6px;
  }

  .dock-module-row > span {
    flex-basis: calc(100% - 8px);
  }

  .dock-utility-head .topbar-center {
    display: flex;
    min-width: 0;
    justify-content: flex-start;
    padding: 0;
  }

  .dock-tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
  }

  .dock-tool-grid > :is(.kiwithing-trigger, .quest-trigger, .xp-trigger, .desktop-link-trigger) {
    width: 100%;
    min-width: 0;
  }

  .dock-tool-grid .pulse-player {
    grid-column: span 2;
    justify-content: center;
    padding-right: 3px;
  }

  .dock-tool-grid .pulse-track {
    display: flex;
  }

  .dock-tool-grid .snap-controls {
    grid-column: span 2;
    justify-content: center;
  }

  .window-status {
    display: none;
  }

  .living-grid {
    display: flex;
    flex-direction: row !important;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 6px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .living-grid[data-layout] .living-window {
    height: 100%;
    flex: 0 0 calc(100vw - 20px);
    width: calc(100vw - 20px);
    min-width: calc(100vw - 20px);
    overflow: hidden;
    scroll-snap-align: center;
    scroll-snap-stop: always;
  }

  .living-window[hidden] {
    display: none !important;
  }

  .window-resizer {
    display: none;
  }

  .layout-menu,
  .header-collapsed .layout-menu {
    top: auto;
    bottom: calc(58px + env(safe-area-inset-bottom));
    right: 8px;
  }

  .header-collapsed .layout-menu {
    top: auto;
  }

  .pantry,
  .countertop,
  .toge-room {
    border: 0;
    padding: 12px;
  }

  .pantry {
    overflow-y: auto;
  }

  .new-dish {
    margin: 14px 0;
  }

  .cookbench {
    min-height: 0;
    grid-template-rows: auto minmax(460px, 1fr) auto;
  }

  .countertop {
    overflow-y: auto;
  }

  .toge-table {
    min-height: 300px;
    gap: 80px 38px;
  }

  .toge-core {
    width: 92px;
    height: 92px;
  }

  .countertop .context-card {
    margin: 10px 0 0;
  }

  .stream {
    padding: 24px 16px 76px;
  }

  .welcome {
    justify-content: flex-start;
  }

  .welcome h2 {
    font-size: 30px;
  }

  .companion-stage {
    align-items: flex-start;
  }

  .companion-readout small {
    max-width: 130px;
  }

  .composer {
    position: fixed;
    right: 10px;
    bottom: calc(58px + env(safe-area-inset-bottom) + var(--mobile-keyboard-inset, 0px));
    left: auto;
    z-index: 510;
    border: 0;
    background: transparent;
    padding: 0;
    box-shadow: none;
    pointer-events: none;
  }

  .composer-panel {
    display: none;
  }

  .mobile-composer-toggle {
    position: fixed;
    right: 10px;
    bottom: calc(58px + env(safe-area-inset-bottom) + var(--mobile-keyboard-inset, 0px));
    z-index: 520;
    display: grid;
    width: 50px;
    height: 50px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--teal) 62%, var(--line));
    border-radius: 50%;
    background: color-mix(in srgb, var(--surface-2) 90%, var(--teal));
    color: var(--teal);
    box-shadow: 0 10px 28px color-mix(in srgb, var(--shell) 52%, transparent);
    font-size: 21px;
    pointer-events: auto;
  }

  .mobile-composer-toggle::after {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 1px solid var(--teal);
    border-radius: 999px;
    background: var(--surface);
    color: var(--teal);
    content: attr(data-stage);
    font-size: 7px;
    font-weight: 900;
  }

  .mobile-composer-toggle.is-live {
    animation: mobile-composer-breathe 1.2s ease-in-out infinite;
  }

  .composer.is-mobile-open {
    right: 0;
    bottom: calc(env(safe-area-inset-bottom) + var(--mobile-keyboard-inset, 0px));
    left: 0;
    border-top: 1px solid var(--line-soft);
    background: color-mix(in srgb, var(--surface) 97%, var(--shell));
    padding: 10px;
    box-shadow: 0 -18px 42px color-mix(in srgb, var(--shell) 48%, transparent);
    pointer-events: auto;
  }

  .composer.is-mobile-open .composer-panel {
    display: block;
  }

  body.mobile-composer-open .mobile-composer-toggle {
    display: none;
  }

  .composer.is-mobile-open .mobile-composer-close {
    position: absolute;
    top: -19px;
    right: 10px;
    z-index: 2;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--teal) 52%, var(--line));
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--teal);
    font-size: 16px;
  }

  body.mobile-composer-open .window-dock {
    display: none;
  }

  body.mobile-composer-open .stream {
    padding-bottom: 242px;
  }

  .journey-head > span {
    display: none;
  }

  .journey-head {
    justify-content: flex-end;
  }

  .journey-track {
    gap: 2px;
    padding-bottom: 17px;
  }

  .kitchen-stage {
    justify-content: center;
  }

  .kitchen-stage:not(:last-child)::after {
    left: calc(50% + 12px);
    right: calc(-50% + 12px);
  }

  .kitchen-stage span {
    position: absolute;
    top: 25px;
    left: 50%;
    width: 40px;
    padding: 0;
    background: transparent;
    font-size: 0;
    text-align: center;
    transform: translateX(-50%);
  }

  .kitchen-stage span::after {
    content: attr(data-short);
    font-size: 7px;
  }

  .journey-gate {
    width: 100%;
  }

  .journey-gate strong {
    flex: 1 1 auto;
    text-align: left;
  }
}

@keyframes mobile-composer-breathe {
  50% {
    transform: translateY(-2px);
    box-shadow: 0 12px 34px color-mix(in srgb, var(--teal) 22%, transparent);
  }
}

/* PULSE library: compact dock outside, complete player inside. */
.pulse-player .pulse-open-button {
  width: auto;
  min-width: 68px;
  padding: 0 2px;
  justify-content: flex-start;
}

.pulse-open-button[aria-expanded="true"] .pulse-bars i,
.pulse-open-button:hover .pulse-bars i {
  background: var(--teal);
  animation: player-bar 0.78s ease-in-out infinite alternate;
}

@media (max-width: 780px), (pointer: coarse) and (max-height: 500px) {
  .dock-system-tray .pulse-player .pulse-open-button {
    width: 32px;
    min-width: 32px;
    justify-content: center;
    padding: 0;
  }
}

@media (max-width: 560px) {
  .window-dock {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 34px;
    grid-template-areas:
      "projects windows studio"
      "brand system system";
    align-items: center;
    gap: 5px;
    padding: 5px 6px max(5px, env(safe-area-inset-bottom));
  }

  .projects-trigger { grid-area: projects; }
  .dock-brand { grid-area: brand; }
  .window-tabs {
    grid-area: windows;
    display: flex;
    width: 100%;
    min-width: 0;
  }
  .dock-studio-trigger { grid-area: studio; }
  .dock-system-tray {
    grid-area: system;
    justify-self: end;
  }

  .window-tabs button,
  .window-tabs .toge-external-door {
    min-width: 0;
    padding-inline: 3px;
    font-size: 8px;
  }

  .window-tabs .toge-external-door small {
    display: none;
  }

  .dock-module-tabs {
    display: none;
  }

  .dock-spacer {
    display: none;
  }

  .dock-utility-tray,
  .dock-studio,
  .together-panel,
  .layout-menu,
  .header-collapsed .layout-menu {
    bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .composer,
  .mobile-composer-toggle {
    bottom: calc(96px + env(safe-area-inset-bottom) + var(--mobile-keyboard-inset, 0px));
  }

  .dock-page-identity small {
    display: none;
  }
}

.music-playlist-panel { position: fixed; inset: 0; z-index: 900; }
.music-playlist-panel[hidden] { display: none; }

.music-playlist-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(2, 8, 16, 0.72);
}

.music-playlist-drawer {
  position: relative;
  width: min(650px, calc(100% - 52px));
  height: 100%;
  margin-left: auto;
  border-left: 1px solid var(--line);
  background: var(--shell);
  box-shadow: -24px 0 70px rgba(0, 0, 0, 0.34);
  animation: music-drawer-in 240ms ease-out both;
}

@keyframes music-drawer-in {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}

.music-playlist-close {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.music-playlist-close:hover { border-color: var(--teal); }

.music-shell {
  display: grid;
  height: 100%;
  grid-template-rows: auto auto minmax(0, 1fr);
  padding: 26px 26px 0 72px;
  overflow: hidden;
}

.music-library-head {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 40px;
  align-items: end;
  gap: 17px;
  padding: 10px 0 22px;
  border-bottom: 1px solid var(--line-soft);
}

.music-library-head img,
.music-current-cover,
.music-track-cover {
  display: block;
  object-fit: cover;
  background: var(--surface-3);
}

.music-library-head img { width: 82px; height: 82px; }
.music-library-copy { min-width: 0; }
.music-library-copy > span { color: var(--teal); font-size: 9px; font-weight: 850; }

.music-library-copy h2 {
  margin: 5px 0 0;
  overflow: hidden;
  font-size: clamp(28px, 5vw, 48px);
  line-height: 0.95;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-library-copy p { margin: 8px 0 0; color: var(--ink-faint); font-size: 11px; }

.music-library-external {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 18px;
  text-decoration: none;
}

.music-library-external:hover,
.music-library-external:focus-visible { border-color: var(--teal); color: var(--ink); }

.music-now-playing {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.music-current-cover { width: 54px; height: 54px; }
.music-current-copy { display: grid; min-width: 0; gap: 4px; }

.music-current-copy strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-current-copy span { color: var(--ink-faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.music-controls { display: flex; align-items: center; gap: 6px; }

.music-controls button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 21px;
  line-height: 1;
}

.music-controls .music-play-toggle {
  width: 42px;
  height: 42px;
  border-color: var(--teal);
  background: var(--teal);
  color: #061a1b;
  font-size: 14px;
}

.music-controls button:disabled { cursor: default; opacity: 0.3; }

.music-now-playing input[type="range"] {
  width: 100%;
  height: 2px;
  grid-column: 1 / -1;
  margin: 2px 0 0;
  accent-color: var(--teal);
}

.music-track-list {
  min-height: 0;
  margin: 0;
  padding: 8px 0 24px;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: color-mix(in srgb, var(--teal) 48%, transparent) transparent;
  scrollbar-width: thin;
}

.music-track {
  display: grid;
  width: 100%;
  min-height: 60px;
  grid-template-columns: 28px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 9px 7px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink-soft);
  text-align: left;
}

.music-track:hover,
.music-track:focus-visible,
.music-track.is-current { background: var(--teal-soft); color: var(--ink); }
.music-track.is-current { box-shadow: inset 2px 0 var(--teal); }
.music-track-number, .music-track time { color: var(--ink-faint); font-size: 9px; font-variant-numeric: tabular-nums; }
.music-track-cover { width: 42px; height: 42px; }

.music-track strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.music-loading,
.music-load-fallback { display: grid; min-height: 170px; place-items: center; }
.music-load-fallback { color: var(--ink-soft); text-decoration: none; }
.music-playlist-loader { display: inline-flex; height: 24px; align-items: center; gap: 3px; }

.music-playlist-loader i {
  width: 2px;
  height: 6px;
  background: var(--teal);
  animation: music-wave 820ms ease-in-out infinite alternate;
}

.music-playlist-loader i:nth-child(2) { animation-delay: -520ms; }
.music-playlist-loader i:nth-child(3) { animation-delay: -220ms; }
.music-playlist-loader i:nth-child(4) { animation-delay: -640ms; }
@keyframes music-wave { to { height: 22px; } }

.music-engine {
  position: fixed !important;
  top: -2px !important;
  left: -2px !important;
  width: 1px !important;
  height: 1px !important;
  border: 0 !important;
  opacity: 0.01;
  pointer-events: none;
}

@media (max-width: 620px) {
  .music-playlist-drawer { width: 100%; border-left: 0; }
  .music-playlist-close { top: 12px; left: 12px; }
  .music-shell { padding: 62px 14px 0; }
  .music-library-head { grid-template-columns: 62px minmax(0, 1fr) 38px; gap: 11px; padding: 2px 0 16px; }
  .music-library-head img { width: 62px; height: 62px; }
  .music-library-copy h2 { font-size: 30px; }
  .music-now-playing { grid-template-columns: 46px minmax(0, 1fr); }
  .music-current-cover { width: 46px; height: 46px; }
  .music-controls { grid-column: 1 / -1; justify-content: center; }
}

.kiwithing-trigger {
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--electric-blue);
}

.crystal-heart {
  position: relative;
  display: block;
  width: 22px;
  height: 21px;
  filter: drop-shadow(0 0 5px var(--electric-blue-soft));
  transform-origin: 50% 58%;
}

.crystal-heart i {
  position: absolute;
  width: 7px;
  height: 7px;
  background: var(--electric-blue);
  clip-path: polygon(50% 0, 100% 43%, 50% 100%, 0 43%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, white 28%, transparent);
}

.crystal-heart i:nth-child(1) { left: 1px; top: 1px; width: 8px; height: 8px; transform: rotate(-8deg); }
.crystal-heart i:nth-child(2) { right: 1px; top: 1px; width: 8px; height: 8px; transform: rotate(8deg); }
.crystal-heart i:nth-child(3) { left: 4px; top: 5px; width: 8px; height: 8px; background: var(--crystal-blue); }
.crystal-heart i:nth-child(4) { right: 4px; top: 5px; width: 8px; height: 8px; }
.crystal-heart i:nth-child(5) { left: 7px; top: 9px; width: 8px; height: 8px; background: var(--crystal-blue); }
.crystal-heart i:nth-child(6) { left: 8px; top: 13px; width: 6px; height: 6px; background: color-mix(in srgb, var(--electric-blue) 72%, var(--teal)); }
.crystal-heart i:nth-child(7) { left: 9px; top: 17px; width: 4px; height: 4px; background: color-mix(in srgb, var(--electric-blue) 72%, var(--teal)); }

.crystal-heart::after { content: none; }

@container (max-width: 380px) {
  .welcome h2 { font-size: 24px; }
  .starter-grid { grid-template-columns: 1fr; }
}

.kiwithing-trigger[aria-expanded="true"],
.kiwithing-trigger:hover,
.kiwithing-trigger.is-live { border-color: var(--electric-blue); background: var(--electric-blue-soft); }

.kiwithing-trigger[aria-expanded="true"] .crystal-heart,
.kiwithing-trigger.is-searching .crystal-heart,
.kiwithing-trigger.is-live .crystal-heart { animation: crystal-heartbeat 920ms ease-in-out infinite; }

.kiwithing-trigger:focus-visible { outline-color: var(--electric-blue); }

.quest-trigger {
  position: relative;
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--electric-blue);
}

.quest-trigger:hover,
.quest-trigger[aria-expanded="true"],
.quest-trigger.is-connected {
  border-color: var(--electric-blue);
  background: var(--electric-blue-soft);
}

.quest-trigger:focus-visible { outline-color: var(--electric-blue); }

.quest-sigil {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
  filter: drop-shadow(0 0 5px var(--electric-blue-soft));
}

.quest-sigil::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--electric-blue) 72%, var(--teal));
  transform: rotate(-38deg);
  transform-origin: center;
}

.quest-sigil i {
  position: absolute;
  z-index: 1;
  width: 6px;
  height: 6px;
  border: 1px solid color-mix(in srgb, white 28%, transparent);
  background: var(--electric-blue);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

.quest-sigil i:nth-child(1) { left: 1px; bottom: 1px; }
.quest-sigil i:nth-child(2) { left: 8px; top: 8px; background: var(--crystal-blue); }
.quest-sigil i:nth-child(3) { right: 1px; top: 1px; }

.quest-sigil b {
  position: absolute;
  z-index: 2;
  right: -1px;
  top: 0;
  width: 7px;
  height: 6px;
  border-left: 2px solid var(--paper);
  border-top: 4px solid var(--coral);
  border-right: 0 solid transparent;
  border-bottom: 4px solid transparent;
  transform: translate(4px, -2px);
}

.quest-count {
  position: absolute;
  right: -5px;
  top: -6px;
  min-width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  padding: 0 3px;
  border: 2px solid var(--surface);
  border-radius: 8px;
  background: var(--coral);
  color: #fff;
  font-size: 8px;
  font-weight: 900;
}

.quest-trigger[aria-expanded="true"] .quest-sigil,
.quest-trigger.is-connected .quest-sigil { animation: quest-route-pulse 1.25s ease-in-out infinite; }

.xp-trigger {
  position: relative;
  isolation: isolate;
  width: 34px;
  min-width: 34px;
  height: 32px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink);
}

.xp-trigger-fill {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 0;
  background: linear-gradient(180deg, var(--crystal-blue), var(--electric-blue));
  opacity: 0.32;
  transition: height 360ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.xp-trigger-level {
  position: relative;
  display: block;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
}

.xp-trigger:hover,
.xp-trigger[aria-expanded="true"] {
  border-color: var(--electric-blue);
  box-shadow: 0 0 0 2px var(--electric-blue-soft);
}

.xp-trigger.is-gaining { animation: xp-gain 620ms ease; }

@keyframes quest-route-pulse {
  0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 4px var(--electric-blue-soft)); }
  45% { transform: translateY(-1px); filter: drop-shadow(0 0 9px var(--electric-blue)); }
}

@keyframes crystal-heartbeat {
  0%, 100% { transform: scale(0.88); filter: drop-shadow(0 0 4px var(--electric-blue-soft)); }
  34% { transform: scale(1.08); filter: drop-shadow(0 0 9px var(--electric-blue)); }
  52% { transform: scale(0.96); }
  68% { transform: scale(1.03); }
}

@keyframes xp-gain {
  0%, 100% { transform: translateY(0); }
  35% { transform: translateY(-2px); box-shadow: 0 0 14px var(--electric-blue); }
}

@keyframes kiwithing-orbit { to { transform: rotate(360deg); } }

.quest-panel { position: fixed; inset: 0; z-index: 930; }
.quest-panel[hidden] { display: none; }

.quest-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(2, 8, 16, 0.72);
}

.quest-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(430px, 100%);
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.quest-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.quest-head .quest-sigil.is-large { transform: scale(1.35); transform-origin: center; }
.quest-head h2 { margin: 2px 0 0; font-size: 21px; }

.quest-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 20px;
}

.quest-progression {
  display: grid;
  gap: 9px;
  margin: 16px 18px 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
}

.quest-progression > header,
.quest-xp-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.quest-progression > header div { min-width: 0; }
.quest-progression > header strong { display: block; margin-top: 4px; font-size: 12px; line-height: 1.35; }

.quest-rank {
  flex: 0 0 auto;
  padding: 5px 7px;
  border: 1px solid var(--electric-blue);
  border-radius: 5px;
  color: var(--crystal-blue);
  font-size: 9px;
  font-weight: 900;
}

.quest-xp-line span { color: var(--ink); font-size: 11px; font-weight: 900; }
.quest-xp-line small,
.quest-progression > small { color: var(--ink-faint); font-size: 9px; }

.quest-xp-track {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--line-soft);
}

.quest-xp-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--electric-blue));
  transition: width 260ms ease;
}

.quest-module-mount {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.quest-awaiting {
  min-height: 260px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  text-align: center;
}

.quest-awaiting strong { font-size: 17px; }

.xp-panel { position: fixed; inset: 0; z-index: 940; }
.xp-panel[hidden] { display: none; }

.xp-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(2, 8, 16, 0.72);
}

.xp-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 100%);
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.xp-head {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 13px;
  padding: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.xp-head h2,
.xp-sources h3,
.xp-recent h3 { margin: 3px 0 0; }
.xp-head h2 { font-size: 22px; }

.xp-level-cell {
  position: relative;
  isolation: isolate;
  width: 46px;
  height: 46px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--electric-blue);
  border-radius: 7px;
  background: var(--surface-2);
}

.xp-level-cell i {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  left: 0;
  height: 0;
  background: linear-gradient(180deg, var(--crystal-blue), var(--electric-blue));
  opacity: 0.38;
  transition: height 360ms ease;
}

.xp-level-cell strong {
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 950;
}

.xp-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 20px;
}

.xp-summary {
  display: grid;
  gap: 9px;
  margin: 16px 18px 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
}

.xp-summary-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.xp-summary-line strong { display: block; margin-top: 4px; font-size: 16px; }
.xp-rank {
  padding: 5px 7px;
  border: 1px solid var(--electric-blue);
  border-radius: 5px;
  color: var(--crystal-blue);
  font-size: 9px;
  font-weight: 900;
}

.xp-meter {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--line-soft);
}

.xp-meter i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--electric-blue));
  transition: width 360ms ease;
}

.xp-summary small,
.xp-summary p { color: var(--ink-faint); font-size: 9px; }
.xp-summary p { margin: 2px 0 0; line-height: 1.45; }

.xp-scroll {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.xp-sources,
.xp-recent { display: grid; gap: 12px; }
.xp-recent { margin-top: 24px; }
.xp-sources h3,
.xp-recent h3 { font-size: 16px; }

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

.xp-source {
  --xp-color: var(--electric-blue);
  min-width: 0;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
}

.xp-source[data-xp-source="talk"], .xp-event[data-xp-source="talk"] { --xp-color: #7d91ff; }
.xp-source[data-xp-source="taste"], .xp-event[data-xp-source="taste"] { --xp-color: var(--crystal-blue); }
.xp-source[data-xp-source="cook"], .xp-event[data-xp-source="cook"] { --xp-color: var(--teal); }
.xp-source[data-xp-source="toge"], .xp-event[data-xp-source="toge"] { --xp-color: var(--coral); }
.xp-source[data-xp-source="help"], .xp-event[data-xp-source="help"] { --xp-color: #55d7a6; }
.xp-source[data-xp-source="report"], .xp-event[data-xp-source="report"] { --xp-color: var(--saffron); }
.xp-source[data-xp-source="improve"], .xp-event[data-xp-source="improve"] { --xp-color: #c397ff; }
.xp-source[data-xp-source="quest"], .xp-event[data-xp-source="quest"] { --xp-color: var(--electric-blue); }
.xp-source[data-xp-source="play"], .xp-event[data-xp-source="play"] { --xp-color: #ff8fbd; }
.xp-source[data-xp-source="general"], .xp-event[data-xp-source="general"] { --xp-color: var(--ink-faint); }

.xp-source > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--xp-color);
  box-shadow: 0 0 8px color-mix(in srgb, var(--xp-color) 72%, transparent);
}

.xp-source div { min-width: 0; }
.xp-source strong,
.xp-source small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xp-source strong { font-size: 10px; }
.xp-source small { margin-top: 2px; color: var(--ink-faint); font-size: 8px; }
.xp-source b { color: var(--xp-color); font-size: 11px; font-variant-numeric: tabular-nums; }

.xp-recent-list { display: grid; gap: 1px; }
.xp-event {
  --xp-color: var(--electric-blue);
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.xp-event > i { width: 6px; height: 6px; border-radius: 50%; background: var(--xp-color); }
.xp-event strong,
.xp-event small { display: block; }
.xp-event strong { overflow-wrap: anywhere; font-size: 10px; }
.xp-event small { margin-top: 3px; color: var(--ink-faint); font-size: 8px; }
.xp-event b { color: var(--crystal-blue); font-size: 10px; font-variant-numeric: tabular-nums; }
.xp-empty { padding: 18px 0; color: var(--ink-faint); font-size: 10px; }
.quest-awaiting p { max-width: 310px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.quest-awaiting small { color: var(--ink-faint); font-size: 9px; font-weight: 800; text-transform: uppercase; }

.quest-route {
  position: relative;
  width: 124px;
  height: 50px;
}

.quest-route::before {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  top: 24px;
  height: 1px;
  background: linear-gradient(90deg, var(--teal), var(--electric-blue));
}

.quest-route i {
  position: absolute;
  top: 18px;
  width: 13px;
  height: 13px;
  border: 2px solid var(--surface-2);
  background: var(--electric-blue);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  animation: quest-node-breathe 1.8s ease-in-out infinite;
}

.quest-route i:nth-child(1) { left: 10px; background: var(--teal); }
.quest-route i:nth-child(2) { left: 55px; animation-delay: -600ms; }
.quest-route i:nth-child(3) { right: 10px; background: var(--coral); animation-delay: -1.2s; }

@keyframes quest-node-breathe { 50% { transform: scale(0.65); opacity: 0.58; } }

.kiwithing-panel { position: fixed; inset: 0; z-index: 920; }
.kiwithing-panel[hidden] { display: none; }

.kiwithing-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(2, 8, 16, 0.72);
}

.kiwithing-surface {
  position: relative;
  width: min(920px, calc(100% - 36px));
  max-height: min(760px, calc(100% - 64px));
  display: grid;
  grid-template-rows: auto auto auto auto minmax(120px, 1fr) auto;
  margin: 32px auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.kiwithing-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 14px;
  padding: 18px 20px 14px;
}

.crystal-heart.is-large { width: 30px; height: 28px; transform: scale(1.25); animation: crystal-heartbeat 2.4s ease-in-out infinite; }
.kiwithing-head h2 { margin: 2px 0 0; font-size: 21px; }

.kiwithing-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 20px;
}

.kiwithing-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  margin: 0 20px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.kiwithing-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-soft); }

.kiwithing-search input {
  min-width: 0;
  height: 52px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.kiwithing-search kbd {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-faint);
  font: inherit;
  font-size: 9px;
}

.kiwithing-filters {
  display: flex;
  gap: 5px;
  padding: 12px 20px;
  overflow-x: auto;
}

.kiwithing-filters button {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 99px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 9px;
  font-weight: 800;
}

.kiwithing-filters button[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); color: var(--teal); }

.useful-matcher {
  max-height: 390px;
  margin: 0 20px 12px;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--electric-blue) 28%, var(--line));
  border-radius: 7px;
  background: color-mix(in srgb, var(--electric-blue) 3%, var(--surface-2));
  scrollbar-width: thin;
}

.useful-matcher > summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}

.useful-matcher > summary::-webkit-details-marker { display: none; }
.useful-matcher > summary span { min-width: 0; display: grid; gap: 2px; }
.useful-matcher > summary strong { color: var(--electric-blue); font-size: 11px; letter-spacing: 0; }
.useful-matcher > summary small { overflow: hidden; color: var(--ink-faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.useful-matcher > summary b { flex: 0 0 auto; color: var(--electric-blue); font-size: 18px; transition: transform 160ms ease; }
.useful-matcher[open] > summary b { transform: rotate(180deg); }
.useful-matcher[open] > summary { border-bottom: 1px solid var(--line-soft); }

.useful-matcher-body { padding: 12px 14px 14px; }

.useful-matcher-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 8px;
}

.useful-matcher-form label { min-width: 0; display: grid; gap: 5px; }
.useful-matcher-form label > span { color: var(--ink-faint); font-size: 7px; font-weight: 900; }
.useful-matcher-form select,
.useful-matcher-form > button {
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 9px;
  font-weight: 800;
}

.useful-matcher-form select { width: 100%; padding: 0 8px; }
.useful-matcher-form > button { padding: 0 12px; border-color: var(--electric-blue); background: var(--electric-blue); color: #04111d; }

.useful-match { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.useful-match[hidden] { display: none; }
.useful-match > header { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.useful-match-emblem { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--electric-blue); border-radius: 50%; color: var(--electric-blue); }
.useful-match > header div { min-width: 0; display: grid; gap: 2px; }
.useful-match > header strong { font-size: 13px; }
.useful-match > header small { overflow: hidden; color: var(--electric-blue); font-size: 7px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.useful-match > header time { color: var(--ink-faint); font-size: 8px; font-weight: 900; }

.useful-match dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 12px 0 0; border-block: 1px solid var(--line-soft); }
.useful-match dl > div { min-width: 0; padding: 9px 10px; }
.useful-match dl > div + div { border-left: 1px solid var(--line-soft); }
.useful-match dt { color: var(--ink-faint); font-size: 7px; font-weight: 900; }
.useful-match dd { margin: 5px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.45; }

.useful-match-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.useful-match-actions button,
.useful-trace button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 900;
}
.useful-match-actions button.primary { border-color: var(--electric-blue); background: var(--electric-blue-soft); color: var(--electric-blue); }

.useful-taste { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.useful-taste p { margin: 0 0 9px; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.useful-taste ol { display: flex; gap: 5px; margin: 0; padding: 0; overflow-x: auto; list-style: none; }
.useful-taste li { flex: 0 0 auto; padding: 4px 7px; border: 1px solid var(--line-soft); border-radius: 99px; color: var(--ink-faint); font-size: 7px; font-weight: 800; }
.useful-taste li.is-past { border-color: color-mix(in srgb, var(--teal) 35%, var(--line)); color: var(--teal); }
.useful-taste li.is-current { border-color: var(--electric-blue); background: var(--electric-blue-soft); color: var(--electric-blue); }

.useful-trace { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 8px 0 0; border-top: 1px solid var(--line-soft); }
.useful-trace span { color: var(--teal); font-size: 7px; font-weight: 900; }
.useful-trace button { flex: 0 0 auto; min-height: 30px; padding: 0 10px; }

.kiwithing-results {
  min-height: 120px;
  padding: 0 20px 12px;
  overflow-y: auto;
  scrollbar-color: color-mix(in srgb, var(--teal) 45%, transparent) transparent;
  scrollbar-width: thin;
}

.kiwithing-result {
  width: 100%;
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.kiwithing-result:hover,
.kiwithing-result:focus-visible { background: var(--teal-soft); }
.kiwithing-result > i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px currentColor; }
.kiwithing-result[data-kind="project"] > i { background: var(--saffron); }
.kiwithing-result[data-kind="discussion"] > i { background: #8a9cff; }
.kiwithing-result[data-kind="help"] > i { background: var(--coral); }
.kiwithing-result[data-kind="research"] > i { background: #55c8ff; }
.kiwithing-result > span { min-width: 0; display: grid; gap: 3px; }
.kiwithing-result strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.kiwithing-result small { overflow: hidden; color: var(--ink-faint); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.kiwithing-result b { color: var(--ink-faint); font-size: 8px; }
.kiwithing-result.is-person {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 72px;
  margin: 4px 0;
  border: 1px solid color-mix(in srgb, var(--electric-blue) 24%, var(--line-soft));
  border-radius: 7px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--electric-blue) 4%, var(--surface-2));
}

.kiwithing-result.is-hop {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  min-height: 62px;
  border-left: 2px solid var(--electric-blue);
  background: color-mix(in srgb, var(--electric-blue) 3%, var(--surface-2));
}
.kiwithing-result.is-person > .community-result-emblem {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--electric-blue) 54%, var(--line));
  border-radius: 7px;
  background: var(--electric-blue-soft);
  color: var(--electric-blue);
  font-size: 19px;
  filter: drop-shadow(0 0 7px var(--electric-blue-soft));
}

.kiwithing-result.is-hop > .hop-result-emblem {
  border-radius: 50%;
  background: color-mix(in srgb, var(--electric-blue) 12%, var(--surface-2));
}
.community-result-meta { display: flex !important; flex-wrap: wrap; gap: 4px !important; margin-top: 3px; }
.community-result-meta i {
  padding: 2px 5px;
  border: 1px solid var(--line-soft);
  border-radius: 99px;
  color: var(--ink-faint);
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
}
.kiwithing-empty { margin: 28px 8px; color: var(--ink-faint); font-size: 12px; }

.community-profile-editor[hidden] { display: none; }
.kiwithing-surface.is-profile-editing .kiwithing-search,
.kiwithing-surface.is-profile-editing .kiwithing-filters,
.kiwithing-surface.is-profile-editing .useful-matcher,
.kiwithing-surface.is-profile-editing .kiwithing-results,
.kiwithing-surface.is-profile-editing .kiwithing-foot { display: none; }

.community-profile-editor {
  grid-row: 2 / -1;
  min-height: 0;
  overflow-y: auto;
  border-top: 1px solid var(--line-soft);
  padding: 18px 20px 22px;
  scrollbar-width: thin;
}

.community-profile-editor > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.community-profile-editor h3 { margin: 3px 0 0; font-size: 20px; }
.community-profile-editor > header button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 18px;
}

.community-profile-editor form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.55fr);
  gap: 14px 18px;
}

.community-profile-preview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(130px, 0.4fr);
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--line-soft);
  padding: 0 0 16px;
}

.community-profile-preview > span {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--electric-blue);
  border-radius: 8px;
  background: var(--electric-blue-soft);
  color: var(--electric-blue);
  font-size: 24px;
  filter: drop-shadow(0 0 9px var(--electric-blue-soft));
}

.community-profile-preview > div { min-width: 0; display: grid; gap: 4px; }
.community-profile-preview strong { overflow: hidden; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.community-profile-preview small { color: var(--ink-faint); font-size: 9px; }
.community-profile-preview small b { color: var(--electric-blue); }
.community-profile-preview progress { width: 100%; height: 6px; accent-color: var(--electric-blue); }

.community-field { min-width: 0; display: grid; align-content: start; gap: 6px; }
.community-field > span,
.community-emblems legend { color: var(--ink-soft); font-size: 9px; font-weight: 800; }
.community-field input,
.community-field textarea,
.community-devil-gate input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
  background: var(--surface-2);
  color: var(--ink);
  padding: 10px 11px;
  font: inherit;
  font-size: 11px;
}
.community-field textarea { min-height: 82px; resize: vertical; line-height: 1.45; }
.community-field input:focus,
.community-field textarea:focus,
.community-devil-gate input:focus { border-color: var(--electric-blue); box-shadow: 0 0 0 2px var(--electric-blue-soft); }
.community-request-field { grid-column: 1 / -1; }

.community-emblems { min-width: 0; display: flex; align-items: end; flex-wrap: wrap; gap: 6px; border: 0; padding: 0; }
.community-emblems legend { width: 100%; margin-bottom: 2px; }
.community-emblems button {
  width: 38px;
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 18px;
}
.community-emblems button[aria-pressed="true"] { border-color: var(--electric-blue); background: var(--electric-blue-soft); color: var(--electric-blue); }

.community-devil-gate {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 14px 0;
}
.community-devil-stage { position: relative; min-height: 62px; display: grid; place-items: center; }
.community-devil { display: block; font-size: 36px; filter: grayscale(1); opacity: 0.35; transform-origin: 50% 100%; }
.community-devil-stage output {
  position: absolute;
  right: -4px;
  top: 0;
  max-width: 70px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--ink-faint);
  padding: 3px 5px;
  font-size: 7px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.community-devil-gate > div:last-child { display: grid; gap: 5px; }
.community-devil-gate strong { font-size: 11px; }
.community-devil-gate small { color: var(--ink-faint); font-size: 9px; }
.community-devil-gate input:disabled { cursor: not-allowed; opacity: 0.45; }
.community-devil-gate[data-unlocked="true"] .community-devil { filter: none; opacity: 1; animation: community-devil-dance 720ms ease-in-out infinite; }
.community-devil-gate[data-unlocked="true"] output { border-color: var(--coral); color: var(--coral); }

.community-vault {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(190px, 0.8fr) minmax(240px, 1.2fr);
  gap: 12px 16px;
  align-items: end;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-2) 86%, transparent);
  padding: 14px;
}
.community-vault-copy { display: grid; gap: 4px; align-self: center; }
.community-vault-copy strong { font-size: 13px; }
.community-vault-copy small { color: var(--ink-faint); font-size: 9px; }
.community-vault-passphrase { margin: 0; }
.community-vault-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.community-vault-actions button { min-height: 34px; padding: 0 12px; }
.community-vault > p { grid-column: 1 / -1; margin: 0; color: var(--ink-faint); font-size: 8px; line-height: 1.45; }
.community-vault[data-state="locked"] { border-color: color-mix(in srgb, var(--coral) 48%, var(--line)); }
.community-vault[data-state="unlocked"] { border-color: color-mix(in srgb, var(--mint) 48%, var(--line)); }
.community-vault[data-state="remote"] { border-color: color-mix(in srgb, var(--electric-blue) 58%, var(--line)); }
.community-vault[data-busy="true"] { pointer-events: none; opacity: 0.65; }

.community-profile-editor form > footer { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; }
.community-profile-editor form > footer button { min-height: 38px; padding: 0 16px; }
.community-profile-editor form > footer .secondary { background: transparent; color: var(--ink-soft); }
.community-profile-editor form > footer .community-hop-button {
  margin-right: auto;
  border-color: color-mix(in srgb, var(--electric-blue) 62%, var(--line));
  background: var(--electric-blue-soft);
  color: var(--electric-blue);
}

@keyframes community-devil-dance {
  0%, 100% { transform: translateX(-3px) rotate(-7deg) scaleY(0.96); }
  50% { transform: translateX(3px) rotate(7deg) scaleY(1.04); }
}

.kiwithing-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
  border-top: 1px solid var(--line-soft);
  color: var(--ink-faint);
  font-size: 9px;
}

.module-row.is-highlighted { background: var(--teal-soft); box-shadow: inset 2px 0 var(--teal); }

@media (max-width: 700px) {
  .quest-drawer { width: 100%; border-left: 0; }
  .xp-drawer { width: 100%; border-left: 0; }
  .xp-head { padding: 14px; }
  .xp-scroll { padding: 14px; }
  .quest-head { padding: 14px; }
  .quest-module-mount { padding: 14px; }
  .kiwithing-surface { width: 100%; max-height: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; }
  .kiwithing-head { padding: 14px; }
  .kiwithing-search { margin: 0 14px; }
  .kiwithing-filters, .kiwithing-results { padding-inline: 14px; }
  .useful-matcher { margin-inline: 14px; max-height: min(430px, calc(100svh - 250px)); }
  .useful-matcher-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .useful-matcher-form > button { grid-column: 1 / -1; }
  .useful-match dl { grid-template-columns: 1fr; }
  .useful-match dl > div + div { border-left: 0; border-top: 1px solid var(--line-soft); }
  .kiwithing-search kbd, .kiwithing-result b { display: none; }
  .kiwithing-foot { padding-inline: 14px; }
  .community-profile-editor { padding-inline: 14px; }
  .community-profile-editor form { grid-template-columns: 1fr; }
  .community-profile-preview { grid-template-columns: 48px minmax(0, 1fr); }
  .community-profile-preview progress { grid-column: 1 / -1; }
  .community-vault { grid-template-columns: 1fr; }
  .community-request-field, .community-devil-gate, .community-vault, .community-profile-editor form > footer { grid-column: 1; }
}

@media (max-width: 420px) {
  .xp-source-grid { grid-template-columns: 1fr; }
}

/* First-run: one animated guide, one credential contract, no secret persistence. */
.onboarding-panel {
  position: fixed;
  inset: 0;
  z-index: 980;
  display: grid;
  place-items: center;
  padding: 20px;
}

.onboarding-panel[hidden] { display: none; }

.onboarding-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: color-mix(in srgb, var(--shell) 84%, transparent);
  backdrop-filter: blur(8px);
}

.onboarding-dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: min(760px, calc(100svh - 40px));
  display: grid;
  grid-template-rows: auto 3px auto minmax(260px, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.onboarding-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 12px;
  padding: 16px 18px 12px;
}

.onboarding-guide {
  position: relative;
  width: 48px;
  height: 48px;
}

.onboarding-guide img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  animation: onboarding-guide-breathe 2.2s ease-in-out infinite;
}

.onboarding-guide span {
  position: absolute;
  right: -1px;
  top: -1px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  background: var(--electric-blue);
  box-shadow: 0 0 13px var(--electric-blue);
  animation: onboarding-guide-pulse 1.15s ease-in-out infinite;
}

.onboarding-head > div:nth-child(2) { display: grid; gap: 3px; }
.onboarding-head strong { font-size: 15px; }

.onboarding-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-soft);
  font-size: 20px;
}

.onboarding-progress { position: relative; overflow: hidden; background: var(--line-soft); }
.onboarding-progress i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--tutorial-progress, 25%);
  background: linear-gradient(90deg, var(--electric-blue), var(--teal));
  transition: width 260ms ease;
}

.onboarding-companion-line {
  min-height: 42px;
  margin: 0;
  padding: 11px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--electric-blue-soft) 68%, transparent);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.onboarding-content {
  min-height: 0;
  padding: 28px clamp(20px, 6vw, 52px);
  overflow-y: auto;
}

.onboarding-copy { display: grid; align-content: start; gap: 13px; }
.onboarding-copy h2 { max-width: 590px; margin: 0; font-size: clamp(26px, 4vw, 38px); line-height: 1.05; }
.onboarding-copy > p { max-width: 610px; margin: 0; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }
.onboarding-copy > small { color: var(--ink-faint); font-size: 10px; line-height: 1.5; }

.onboarding-language,
.onboarding-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.onboarding-language button,
.onboarding-suggestions button,
.onboarding-actions button,
.onboarding-token-form button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-soft);
  padding: 0 14px;
  font-size: 10px;
  font-weight: 800;
}

.onboarding-language button[aria-pressed="true"] {
  border-color: var(--electric-blue);
  background: var(--electric-blue-soft);
  color: var(--ink);
}

.onboarding-workshop {
  position: relative;
  min-height: 230px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 5px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--shell);
}

.onboarding-workshop > span:not(.onboarding-workshop-flow) {
  position: relative;
  z-index: 1;
  min-height: 82px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  align-content: center;
  gap: 4px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 14px;
  animation: onboarding-window-wave 4.8s ease-in-out infinite;
}

.onboarding-workshop > span:nth-child(2) { animation-delay: -3.6s; }
.onboarding-workshop > span:nth-child(3) { animation-delay: -2.4s; }
.onboarding-workshop > span:nth-child(4) { animation-delay: -1.2s; }
.onboarding-workshop i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 12px var(--teal); }
.onboarding-workshop b { font-size: 11px; }
.onboarding-workshop small { grid-column: 2; color: var(--ink-faint); font-size: 9px; }

.onboarding-workshop-flow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 88px;
  height: 88px;
  border: 1px solid var(--electric-blue);
  border-radius: 50%;
  opacity: 0.4;
  transform: translate(-50%, -50%);
  animation: onboarding-flow 2.8s ease-out infinite;
}

.onboarding-dialog:has(.spectator-map) {
  width: min(980px, 100%);
}

.spectator-guide-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.spectator-guide-heading > span:first-child {
  display: grid;
  gap: 5px;
}

.spectator-zoom-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
}

.spectator-zoom-controls button,
.spectator-zoom-controls output {
  min-width: 34px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-soft);
  padding: 0 9px;
  font-size: 10px;
  font-weight: 800;
}

.spectator-zoom-controls button:hover {
  border-color: var(--electric-blue);
  color: var(--electric-blue);
}

.spectator-map-viewport {
  min-height: 310px;
  overflow: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--shell);
  padding: 18px;
  scrollbar-width: thin;
}

.spectator-map {
  position: relative;
  width: 820px;
  height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--shell));
  box-shadow: 0 18px 54px color-mix(in srgb, var(--shell) 48%, transparent);
  transform-origin: 0 0;
}

.spectator-map-dock {
  height: 48px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding: 0 14px;
  background: var(--surface-2);
}

.spectator-map-dock > strong {
  font-size: 10px;
}

.spectator-map-tabs,
.spectator-map-tools {
  display: flex;
  align-items: center;
  gap: 5px;
}

.spectator-map-tabs i,
.spectator-map-tools i {
  min-width: 44px;
  height: 25px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  color: var(--ink-faint);
  font-size: 7px;
  font-style: normal;
  font-weight: 850;
}

.spectator-map-tabs i::before {
  width: 5px;
  height: 5px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--ink-faint);
  content: "";
}

.spectator-map-tabs i {
  grid-auto-flow: column;
  justify-content: center;
}

.spectator-map-tabs i.is-open {
  border-color: color-mix(in srgb, var(--teal) 55%, var(--line));
  color: var(--ink);
}

.spectator-map-tabs i.is-open::before {
  background: var(--teal);
}

.spectator-map-tabs i.is-live::before {
  animation: live-pulse 1s ease-out infinite;
}

.spectator-map-tools {
  justify-self: end;
}

.spectator-map-tools i {
  min-width: 27px;
}

.spectator-map-windows {
  position: absolute;
  inset: 70px 54px 50px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.spectator-map-windows > button {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-content: start;
  gap: 9px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink-soft);
  padding: 10px;
  text-align: left;
}

.spectator-map-windows > button:hover,
.spectator-map-windows > button:focus-visible {
  border-color: var(--electric-blue);
  outline: 2px solid var(--electric-blue-soft);
}

.spectator-map-windows > button.is-closed {
  border-style: dashed;
  opacity: 0.48;
}

.spectator-map-windows > button > span {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  gap: 2px 6px;
}

.spectator-map-windows > button > span i {
  width: 6px;
  height: 6px;
  margin-top: 2px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.spectator-map-windows > button.is-open > span i {
  background: var(--teal);
}

.spectator-map-windows > button.is-live > span i {
  animation: live-pulse 1s ease-out infinite;
}

.spectator-map-windows b {
  font-size: 9px;
}

.spectator-map-windows small {
  grid-column: 2;
  color: var(--ink-faint);
  font-size: 7px;
}

.spectator-map-windows em {
  justify-self: end;
  color: var(--ink-faint);
  font-size: 7px;
  font-style: normal;
  text-transform: uppercase;
}

.spectator-map-windows u {
  display: block;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-faint);
  padding: 8px;
  font-size: 7px;
  line-height: 1.4;
  text-decoration: none;
}

.spectator-map-windows u.is-composer {
  align-self: end;
  border-color: color-mix(in srgb, var(--electric-blue) 35%, var(--line));
}

.spectator-callout {
  position: absolute;
  z-index: 3;
  max-width: 175px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 8px;
  font-weight: 750;
}

.spectator-callout::after {
  position: absolute;
  height: 1px;
  background: var(--electric-blue);
  content: "";
  transform-origin: left center;
}

.spectator-callout b {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--electric-blue);
  color: #061321;
  font-size: 8px;
}

.spectator-callout.is-tabs { left: 286px; top: 9px; }
.spectator-callout.is-tabs::after { left: -78px; top: 16px; width: 72px; transform: rotate(-4deg); }
.spectator-callout.is-move { left: 12px; bottom: 12px; }
.spectator-callout.is-move::after { left: 166px; top: 8px; width: 98px; transform: rotate(-31deg); }
.spectator-callout.is-pulse { right: 12px; bottom: 12px; }
.spectator-callout.is-pulse::after { right: 172px; top: 8px; width: 104px; transform: rotate(210deg); }
.spectator-callout.is-guide { right: 12px; top: 9px; }
.spectator-callout.is-guide::after { right: 174px; top: 15px; width: 62px; transform: rotate(184deg); }

.onboarding-token-form { display: grid; gap: 7px; margin-top: 4px; }
.onboarding-token-form label,
.onboarding-idea > span { color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.onboarding-token-form > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.onboarding-token-form input,
.onboarding-idea textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--shell);
  color: var(--ink);
  padding: 11px 13px;
  font: inherit;
  letter-spacing: 0;
}
.onboarding-token-form input:focus,
.onboarding-idea textarea:focus { border-color: var(--electric-blue); outline: 2px solid var(--electric-blue-soft); }
.onboarding-token-form button,
.onboarding-actions .onboarding-next { border-color: var(--electric-blue); background: var(--electric-blue); color: #061321; }
.onboarding-token-form button:disabled { opacity: 0.55; }
.onboarding-token-status { min-height: 18px; margin: 0 !important; color: var(--ink-faint) !important; font-size: 10px !important; }
.onboarding-token-status[data-state="ready"] { color: var(--teal) !important; }

.onboarding-idea { display: grid; gap: 7px; }
.onboarding-idea textarea { min-height: 92px; resize: vertical; line-height: 1.5; }

.onboarding-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
}

@keyframes onboarding-guide-breathe { 50% { transform: translateY(-2px) scale(1.02); } }
@keyframes onboarding-guide-pulse { 50% { transform: scale(0.65); opacity: 0.55; } }
@keyframes onboarding-window-wave { 12%, 30% { border-color: var(--teal); box-shadow: inset 2px 0 var(--teal), 0 0 18px var(--teal-soft); } }
@keyframes onboarding-flow { 0% { opacity: 0.5; transform: translate(-50%, -50%) scale(0.35); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); } }

@media (max-width: 620px) {
  .onboarding-panel { padding: 0; }
  .onboarding-dialog { width: 100%; height: 100svh; max-height: none; border: 0; border-radius: 0; }
  .onboarding-content { padding: 24px 18px; }
  .onboarding-copy h2 { font-size: 29px; }
  .onboarding-workshop { min-height: 250px; }
  .spectator-guide-heading { align-items: start; flex-direction: column; }
  .spectator-map-viewport { min-height: 330px; margin-inline: -8px; padding: 12px; }
  .spectator-zoom-controls { align-self: stretch; }
  .spectator-zoom-controls output { flex: 1; }
  .onboarding-token-form > div { grid-template-columns: 1fr; }
  .onboarding-actions { grid-template-columns: auto 1fr auto; }
  .onboarding-actions > span { display: none; }
  .onboarding-actions #onboardingBack { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* Public ING session and install surface. Kept separate from the living workspace. */
.install-app-button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--line, rgba(255, 255, 255, .16));
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.install-app-button:hover,
.install-app-button:focus-visible {
  border-color: var(--accent, #21c7b7);
}

.ing-session-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 12, 22, .88);
  backdrop-filter: blur(18px);
}

.ing-session-gate[hidden] {
  display: none;
}

.ing-session-gate article {
  width: 100%;
  max-width: 560px;
  min-width: 0;
  padding: clamp(28px, 6vw, 54px);
  border: 1px solid rgba(244, 238, 227, .18);
  border-radius: 8px;
  background: #0b1b30;
  color: #f4eee3;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .4);
}

.ing-session-gate img {
  display: block;
  margin-bottom: 28px;
}

.ing-session-gate h1 {
  max-width: 10ch;
  margin: 10px 0 18px;
  font-size: clamp(38px, 8vw, 68px);
  line-height: .96;
  letter-spacing: 0;
}

.ing-session-gate p {
  max-width: 48ch;
  color: rgba(244, 238, 227, .72);
  line-height: 1.6;
}

.ing-session-gate article > div {
  display: flex;
  gap: 10px;
  margin: 30px 0 20px;
  flex-wrap: wrap;
}

.ing-session-gate a,
.ing-session-gate button {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(244, 238, 227, .22);
  border-radius: 5px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.ing-session-gate a {
  display: inline-flex;
  align-items: center;
  background: #f4eee3;
  color: #0b1b30;
  text-decoration: none;
}

.ing-session-gate button {
  background: transparent;
  color: #f4eee3;
}

.ing-session-gate small {
  display: block;
  color: rgba(244, 238, 227, .5);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .ing-session-gate { padding: 12px; }
  .ing-session-gate article {
    max-width: calc(100vw - 24px);
    padding: 28px;
  }
  .ing-session-gate article > div { display: grid; }
  .ing-session-gate a,
  .ing-session-gate button { justify-content: center; width: 100%; }
}

/* IDEAING Link: Chrome is the browser body, the local bridge is the Windows body. */
.desktop-link-trigger {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  color: var(--ink-soft);
}

.desktop-link-trigger:hover,
.desktop-link-trigger:focus-visible,
.desktop-link-trigger[aria-expanded="true"] {
  border-color: var(--electric-blue);
  color: var(--electric-blue);
}

.desktop-link-trigger.is-live::after {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px var(--teal);
  content: "";
  animation: live-pulse 1.4s ease-out infinite;
}

.desktop-link-trigger[data-pressure="warm"] { border-color: var(--saffron); }
.desktop-link-trigger[data-pressure="tight"] { border-color: var(--coral); animation: companion-shake 560ms ease-in-out infinite alternate; }

.desktop-link-glyph {
  position: relative;
  width: 22px;
  height: 18px;
  display: block;
}

.desktop-link-glyph i {
  position: absolute;
  inset: 0 0 4px;
  border: 1.5px solid currentColor;
  border-radius: 3px;
}

.desktop-link-glyph i::after {
  position: absolute;
  left: 7px;
  bottom: -5px;
  width: 7px;
  height: 1.5px;
  background: currentColor;
  box-shadow: 0 3px currentColor;
  content: "";
}

.desktop-link-glyph b {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
}

.desktop-link-glyph.is-large {
  width: 34px;
  height: 28px;
  color: var(--electric-blue);
}

.desktop-link-panel {
  position: fixed;
  inset: 0;
  z-index: 980;
}

.desktop-link-panel[hidden] { display: none; }

.desktop-link-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: color-mix(in srgb, var(--shell) 68%, transparent);
  backdrop-filter: blur(8px);
}

.desktop-link-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(680px, 100vw);
  height: 100dvh;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  border-left: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: -20px 0 70px color-mix(in srgb, var(--shell) 70%, transparent);
}

.desktop-link-head {
  min-height: 80px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.desktop-link-head h2 { margin: 2px 0 0; font-size: 20px; }
.desktop-link-head > button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  font-size: 22px;
}

.desktop-link-status {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-2);
}

.desktop-link-status > i {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.desktop-link-status[data-state="ready"] > i { background: var(--teal); box-shadow: 0 0 14px var(--teal); }
.desktop-link-status[data-state="error"] > i { background: var(--coral); }
.desktop-link-status span { min-width: 0; display: grid; gap: 2px; }
.desktop-link-status strong { font-size: 13px; }
.desktop-link-status small { color: var(--ink-faint); font-size: 10px; }

.desktop-neck {
  display: grid;
  gap: 9px;
  padding: 12px 22px 14px;
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
}

.desktop-neck header,
.desktop-neck dl,
.desktop-neck dl > div {
  display: flex;
  align-items: center;
}

.desktop-neck header { justify-content: space-between; gap: 14px; }
.desktop-neck header span { display: grid; gap: 1px; }
.desktop-neck header small { color: var(--ink-faint); font-size: 8px; font-weight: 800; }
.desktop-neck header strong { font-size: 14px; }
.desktop-neck header > b { color: var(--teal); font-size: 10px; }
.desktop-neck[data-pressure="warm"] header > b { color: var(--saffron); }
.desktop-neck[data-pressure="tight"] header > b { color: var(--coral); }

.desktop-neck-track {
  height: 7px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--shell);
}

.desktop-neck-track i {
  display: block;
  width: var(--neck-load, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 360ms ease, background 180ms ease;
}

.desktop-neck[data-pressure="warm"] .desktop-neck-track i { background: var(--saffron); }
.desktop-neck[data-pressure="tight"] .desktop-neck-track i { background: var(--coral); }
.desktop-neck dl { gap: 18px; margin: 0; }
.desktop-neck dl > div { gap: 6px; }
.desktop-neck dt { color: var(--ink-faint); font-size: 8px; font-weight: 800; }
.desktop-neck dd { margin: 0; color: var(--ink); font-size: 10px; font-weight: 800; }

.desktop-link-scroll {
  min-height: 0;
  overflow: auto;
  padding: 20px 22px 34px;
}

.desktop-link-section + .desktop-link-section { margin-top: 26px; }
.desktop-link-section > header {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.desktop-link-section > header span { display: grid; gap: 2px; }
.desktop-link-section > header small { color: var(--electric-blue); font-size: 9px; font-weight: 800; }
.desktop-link-section > header strong { font-size: 17px; }
.desktop-link-section button,
.desktop-link-url button,
.desktop-link-row button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
}
.desktop-link-section button:hover,
.desktop-link-section button:focus-visible { border-color: var(--teal); color: var(--teal); }
.desktop-link-section button:disabled { opacity: 0.42; }

.desktop-link-url { display: grid; gap: 6px; margin-bottom: 12px; }
.desktop-link-url label { color: var(--ink-soft); font-size: 10px; font-weight: 750; }
.desktop-link-url > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.desktop-link-url input {
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--shell);
  color: var(--ink);
  padding: 0 13px;
  font: inherit;
  letter-spacing: 0;
}

.desktop-link-list { border-top: 1px solid var(--line-soft); }
.desktop-link-row {
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line-soft);
  padding: 9px 0;
}
.desktop-link-row.is-active { box-shadow: inset 2px 0 var(--teal); padding-left: 10px; }
.desktop-link-row > span:first-child { min-width: 0; display: grid; gap: 3px; }
.desktop-link-row strong,
.desktop-link-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.desktop-link-row strong { font-size: 11px; }
.desktop-link-row small { color: var(--ink-faint); font-size: 9px; }
.desktop-link-row-actions { display: flex; gap: 5px; }
.desktop-link-empty { margin: 0; padding: 24px 0; color: var(--ink-faint); font-size: 10px; }

.desktop-link-launchers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 12px;
}

.desktop-link-note {
  margin: 24px 0 0;
  border-left: 2px solid var(--electric-blue);
  padding: 8px 12px;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.55;
}

@media (max-width: 720px) {
  .desktop-link-drawer { width: 100%; border-left: 0; }
  .desktop-link-head { padding-inline: 16px; }
  .desktop-link-status { padding-inline: 16px; }
  .desktop-link-scroll { padding-inline: 16px; }
  .desktop-link-launchers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* A project is the canonical identity shared by conversation, files and runtime. */
.projects-trigger {
  position: relative;
  z-index: 1;
  width: 38px;
  min-width: 38px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink-soft);
  box-shadow: none;
}

.projects-trigger:hover,
.projects-trigger:focus-visible,
.projects-trigger[aria-expanded="true"] {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.projects-trigger > small {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.projects-glyph {
  position: relative;
  width: 24px;
  height: 20px;
  display: block;
}

.projects-glyph i {
  position: absolute;
  width: 16px;
  height: 11px;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  background: var(--surface-2);
}

.projects-glyph i:first-child { left: 0; bottom: 0; }
.projects-glyph i:nth-child(2) { top: 0; right: 0; }
.projects-glyph b {
  position: absolute;
  left: 10px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 9px var(--teal);
}

.projects-glyph.is-large {
  width: 38px;
  height: 32px;
  color: var(--teal);
}

.projects-glyph.is-large i { width: 25px; height: 18px; }
.projects-glyph.is-large b { left: 16px; top: 14px; width: 6px; height: 6px; }

.projects-panel {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 490;
  width: 326px;
}

.projects-panel[hidden] { display: none; }

.projects-backdrop {
  display: none;
}

.projects-drawer {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 12px 0 34px color-mix(in srgb, var(--shell) 36%, transparent);
  animation: projects-enter 180ms ease-out both;
}

@keyframes projects-enter {
  from { transform: translateX(-24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.projects-head {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
}

.projects-head h2 { margin: 1px 0 0; font-size: 15px; }
.projects-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.projects-head-actions > [data-close-projects] {
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  font-size: 17px;
}

.projects-demo-button {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--teal) 52%, var(--line));
  border-radius: 6px;
  background: var(--teal-soft);
  padding: 0 9px;
  color: var(--teal);
  font-size: 8px;
  font-weight: 900;
}

.projects-demo-button[aria-pressed="true"] {
  border-color: var(--saffron);
  background: color-mix(in srgb, var(--saffron) 10%, var(--surface-2));
  color: var(--saffron);
}

.showcase-badge {
  margin-left: auto;
  border: 1px solid color-mix(in srgb, var(--saffron) 56%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--saffron) 8%, var(--surface-2));
  padding: 3px 7px;
  color: var(--saffron);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: 0;
}

.showcase-badge[hidden] {
  display: none;
}

.projects-intro {
  display: none;
}

.projects-flow {
  border-bottom: 1px solid var(--line-soft);
  padding: 10px 12px 11px;
  background: color-mix(in srgb, var(--surface-2) 76%, var(--surface));
}

.projects-flow .kitchen-journey {
  margin: 0;
}

.mookating-state {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding: 0 1px 9px;
}

.mookating-bond {
  position: relative;
  width: 42px;
  height: 24px;
  display: grid;
  grid-template-columns: 12px 10px 12px;
  align-items: center;
  justify-content: center;
}

.mookating-bond::before {
  position: absolute;
  top: 50%;
  right: 8px;
  left: 8px;
  height: 1px;
  background: var(--line);
  content: "";
}

.mookating-bond i,
.mookating-bond b {
  position: relative;
  z-index: 1;
}

.mookating-bond i {
  width: 10px;
  height: 10px;
  border: 2px solid var(--teal);
  border-radius: 50%;
  background: var(--surface);
}

.mookating-bond i[data-side="companion"] {
  border-color: var(--saffron);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--saffron) 14%, transparent);
}

.mookating-bond b {
  color: var(--ink-muted);
  font-size: 9px;
  text-align: center;
}

.mookating-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.mookating-copy small {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--ink-muted);
  font-size: 7px;
  text-transform: uppercase;
}

.mookating-copy small b {
  color: var(--teal);
  font-size: 8px;
  letter-spacing: 0;
}

.mookating-copy small span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mookating-copy > strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mookating-count {
  min-width: 34px;
  display: grid;
  justify-items: end;
  color: var(--ink-muted);
}

.mookating-count output {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.mookating-count small {
  font-size: 6px;
  text-transform: uppercase;
}

.mookating-state[data-phase="mixing"] .mookating-bond i[data-side="companion"],
.mookating-state[data-phase="active"] .mookating-bond i[data-side="companion"] {
  animation: mookating-pulse 1.15s ease-in-out infinite;
}

.mookating-state[data-phase="tasting"] .mookating-bond i[data-side="human"] {
  border-color: var(--saffron);
}

.mookating-state[data-phase="digested"] .mookating-copy small b,
.mookating-state[data-phase="served"] .mookating-copy small b,
.mookating-state[data-phase="served"] .mookating-count output {
  color: var(--saffron);
}

.mookating-table {
  position: relative;
  height: 118px;
  overflow: hidden;
  margin: 0 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface-2);
}

.mookating-table::before,
.mookating-table::after {
  position: absolute;
  background: var(--line-soft);
  content: "";
}

.mookating-table::before {
  top: 50%;
  right: 10px;
  left: 10px;
  height: 1px;
}

.mookating-table::after {
  top: 10px;
  bottom: 10px;
  left: 50%;
  width: 1px;
}

.mookating-grill {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--saffron) 72%, var(--line));
  border-radius: 50%;
  background: var(--surface);
  color: var(--saffron);
  transform: translate(-50%, -50%);
}

.mookating-grill i {
  position: absolute;
  inset: 8px;
  border: 1px solid color-mix(in srgb, var(--saffron) 42%, var(--line));
  border-radius: 50%;
}

.mookating-grill i::before,
.mookating-grill i::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 1px;
  background: color-mix(in srgb, var(--saffron) 42%, var(--line));
  content: "";
  transform: translate(-50%, -50%) rotate(45deg);
}

.mookating-grill i::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.mookating-grill b {
  position: relative;
  z-index: 1;
  font-size: 7px;
}

.mookating-ingredient {
  position: absolute;
  z-index: 3;
  width: 72px;
  height: 30px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  padding: 0 7px;
  color: var(--ink-soft);
  animation: mookating-ingredient-arrive 280ms ease-out both;
}

.mookating-ingredient i {
  color: var(--teal);
  font-size: 11px;
  font-style: normal;
  text-align: center;
}

.mookating-ingredient b {
  overflow: hidden;
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mookating-ingredient[data-kind="companion"] i,
.mookating-ingredient[data-kind="result"] i { color: var(--saffron); }
.mookating-ingredient[data-kind="tool"] i { color: var(--electric-blue); }
.mookating-ingredient:nth-child(1) { top: 10px; left: 10px; }
.mookating-ingredient:nth-child(2) { top: 10px; right: 10px; }
.mookating-ingredient:nth-child(3) { bottom: 10px; left: 10px; }
.mookating-ingredient:nth-child(4) { right: 10px; bottom: 10px; }
.mookating-ingredient:nth-child(n+5) { display: none; }

.mookating-table[data-empty="true"] .mookating-grill {
  border-style: dashed;
  opacity: 0.58;
}

.mookating-table[data-phase="mixing"] .mookating-grill,
.mookating-table[data-phase="active"] .mookating-grill {
  animation: mookating-grill-heat 1.35s ease-in-out infinite;
}

@keyframes mookating-ingredient-arrive {
  from { opacity: 0; transform: translateY(5px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes mookating-grill-heat {
  50% { border-color: var(--coral); color: var(--coral); }
}

@keyframes mookating-pulse {
  50% { transform: scale(1.28); box-shadow: 0 0 0 5px color-mix(in srgb, var(--saffron) 10%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .mookating-state .mookating-bond i,
  .mookating-table .mookating-grill,
  .mookating-ingredient { animation: none !important; }
}

.projects-flow .journey-head {
  display: grid;
  justify-content: stretch;
  margin-bottom: 9px;
}

.projects-flow .journey-head > span {
  color: var(--teal);
  font-size: 7px;
}

.projects-flow .journey-gate {
  justify-content: space-between;
}

.projects-flow .journey-gate strong {
  text-align: left;
}

.projects-flow .journey-track {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  row-gap: 8px;
}

.projects-flow .kitchen-stage {
  gap: 4px;
  font-size: 7px;
}

.projects-flow .kitchen-stage i {
  flex-basis: 18px;
  width: 18px;
  height: 18px;
}

.projects-flow .kitchen-stage:not(:last-child)::after {
  top: 9px;
  left: 21px;
}

.projects-flow .kitchen-stage span {
  padding-right: 3px;
}

.projects-workspace {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.projects-rail {
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 7px;
  border-bottom: 1px solid var(--line-soft);
  padding: 7px 9px;
  background: color-mix(in srgb, var(--surface-2) 70%, var(--surface));
}

.projects-rail-list {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  gap: 6px;
  overflow-x: auto;
}

.project-rail-item,
.projects-rail-add {
  width: 46px;
  height: 38px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-soft);
}

.project-rail-item {
  position: relative;
  padding: 8px 5px;
  cursor: pointer;
}

.project-rail-item:hover,
.project-rail-item:focus-visible,
.project-rail-item.is-selected {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-soft);
}

.project-rail-item.is-active::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 9px var(--teal);
}

.project-rail-monogram { font-size: 14px; font-weight: 900; }
.project-rail-item small { color: currentColor; font-size: 7px; font-weight: 850; }
.projects-rail-add { margin-left: auto; color: var(--ink-faint); font-size: 16px; opacity: 0.48; }

.projects-list {
  min-height: 0;
  overflow: auto;
  padding: 9px;
}

.projects-empty {
  margin: 0;
  padding: 34px 0;
  color: var(--ink-faint);
  font-size: 11px;
}

.projects-empty.is-error { color: var(--coral); }

.projects-local-notice {
  margin: 0 0 7px;
  border: 1px solid color-mix(in srgb, var(--saffron) 42%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--saffron) 7%, var(--surface-2));
  padding: 7px 8px;
  color: var(--saffron);
  font-size: 8px;
  line-height: 1.4;
}

.project-card {
  border: 1px solid color-mix(in srgb, var(--teal) 40%, var(--line));
  border-radius: 7px;
  background: var(--surface-2);
  overflow: hidden;
}

.project-card[hidden] { display: none; }
.project-card.is-active { box-shadow: inset 3px 0 0 var(--teal); }

.project-card-head {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line-soft);
  padding: 9px 10px;
}

.project-card-head > span { display: grid; gap: 4px; }
.project-card-head small { color: var(--teal); font-size: 8px; font-weight: 850; }
.project-card-head strong { font-size: 14px; }
.project-live {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--ink-faint);
  font-size: 8px;
}

.project-planes {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.project-plane {
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  padding: 12px 14px;
}

.project-plane:nth-child(even) { border-right: 0; }
.project-plane:last-child:nth-child(odd) { grid-column: 1 / -1; border-right: 0; }
.project-plane > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-faint);
}

.project-plane[data-state="ready"] > i,
.project-plane[data-state="live"] > i { background: var(--teal); box-shadow: 0 0 10px var(--teal); }
.project-plane[data-state="sleeping"] > i,
.project-plane[data-state="disabled"] > i,
.project-plane[data-state="not_connected"] > i { background: var(--saffron); }
.project-plane[data-state="error"] > i { background: var(--coral); }
.project-plane > span { min-width: 0; display: grid; gap: 3px; }
.project-plane small { color: var(--ink-faint); font-size: 7px; font-weight: 850; }
.project-plane strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.project-plane em { overflow: hidden; color: var(--ink-soft); font-size: 9px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

.project-codex-lane {
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--surface-3) 54%, var(--surface-2));
}

.project-codex-lane > header,
.project-access-policy > header {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line-soft);
  padding: 11px 16px;
}

.project-codex-lane > header > span,
.project-access-policy > header > span { display: grid; gap: 3px; }
.project-codex-lane > header small,
.project-access-policy > header small { color: var(--electric-blue); font-size: 7px; font-weight: 900; }
.project-codex-lane > header strong,
.project-access-policy > header strong { font-size: 12px; }
.project-codex-lane > header b,
.project-access-policy > header b {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--ink-faint);
  font-size: 7px;
}

.project-codex-sleeping {
  min-height: 82px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  gap: 3px 11px;
  padding: 14px 16px;
}

.project-codex-sleeping > i,
.project-codex-notice > i {
  grid-row: 1 / span 2;
  align-self: center;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--saffron);
  box-shadow: 0 0 12px color-mix(in srgb, var(--saffron) 55%, transparent);
}

.project-codex-sleeping > strong { font-size: 10px; }
.project-codex-sleeping > p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 9px;
  line-height: 1.5;
}

.project-codex-notice {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 16px;
  color: var(--ink-soft);
  font-size: 9px;
}

.project-codex-notice.is-loading > i {
  background: var(--teal);
  animation: companion-breathe 1s ease-in-out infinite alternate;
}
.project-codex-notice.is-error > i { background: var(--coral); }

.project-codex-current {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
}

.project-codex-current > span {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.project-codex-current small { color: var(--ink-faint); font-size: 7px; font-weight: 900; }
.project-codex-current strong { font-size: 15px; }
.project-codex-current code {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-codex-current > b {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 8px;
  color: var(--ink-faint);
  font-size: 7px;
}
.project-codex-current > b[data-state="ready"] { border-color: var(--teal); color: var(--teal); }
.project-codex-current > b[data-state="busy"] { border-color: var(--saffron); color: var(--saffron); }

.project-codex-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  border-block: 1px solid var(--line-soft);
  list-style: none;
}
.project-codex-meta li {
  min-width: 0;
  display: grid;
  gap: 3px;
  border-right: 1px solid var(--line-soft);
  padding: 10px 12px;
}
.project-codex-meta li:last-child { border-right: 0; }
.project-codex-meta small { color: var(--ink-faint); font-size: 6px; font-weight: 900; }
.project-codex-meta strong { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }

.project-codex-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 8px;
}
.project-codex-actions button,
.project-codex-original,
.project-codex-resume button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  padding: 0 12px;
  color: var(--ink-soft);
  font: inherit;
  font-size: 8px;
  font-weight: 850;
  text-decoration: none;
}
.project-codex-actions button:first-child { border-color: var(--teal); color: var(--teal); }
.project-codex-actions button:disabled,
.project-codex-resume button:disabled { cursor: not-allowed; opacity: 0.42; }

.project-codex-resume {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 0 16px 8px;
}
.project-codex-resume input {
  min-width: 0;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  outline: none;
  background: var(--surface);
  padding: 0 11px;
  color: var(--ink);
  font: inherit;
  font-size: 8px;
}
.project-codex-resume input:focus { border-color: var(--teal); }
.project-codex-status {
  min-height: 31px;
  margin: 0;
  padding: 0 16px 11px;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.45;
}

.project-access-policy {
  display: none;
}
.project-access-policy > header { border-bottom: 0; }
.project-access-policy > ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 0 16px 11px;
  gap: 7px;
  list-style: none;
}
.project-access-policy li {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  padding: 9px;
}
.project-access-policy li > i {
  grid-row: 1 / span 2;
  align-self: center;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
}
.project-access-policy li[data-state="required"] > i { background: var(--teal); }
.project-access-policy li[data-state="planned"] > i { background: var(--electric-blue); }
.project-access-policy li[data-state="gated"] > i { background: var(--saffron); }
.project-access-policy li > span { overflow: hidden; font-size: 8px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.project-access-policy li > small { overflow: hidden; color: var(--ink-faint); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.project-access-policy > p { margin: 0; padding: 0 16px 12px; color: var(--ink-faint); font-size: 7px; line-height: 1.45; }

.project-truth {
  display: none;
}

.project-truth b { color: var(--ink-soft); }

.project-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
}

.project-open {
  min-height: 38px;
  border: 1px solid var(--teal);
  border-radius: 5px;
  background: var(--teal-soft);
  padding: 0 15px;
  color: var(--teal);
  font: inherit;
  font-size: 10px;
  font-weight: 850;
}

.project-card-actions code {
  min-width: 0;
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projects-foot {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-top: 1px solid var(--line);
  padding: 8px 11px;
  background: var(--surface-2);
}

.projects-foot > i { width: 8px; height: 8px; border-radius: 50%; background: var(--electric-blue); }
.projects-foot > span { display: grid; gap: 3px; }
.projects-foot strong { font-size: 10px; }
.projects-foot small { color: var(--ink-faint); font-size: 8px; }

@media (max-width: 780px) {
  body.projects-open .app-shell {
    width: 100%;
    margin-left: 0;
  }

  .projects-panel {
    inset: 0;
    z-index: 985;
    width: 100%;
  }

  .projects-backdrop {
    position: absolute;
    inset: 0;
    display: block;
    border: 0;
    background: color-mix(in srgb, var(--shell) 68%, transparent);
    backdrop-filter: blur(6px);
  }

  .projects-drawer {
    position: absolute;
    inset: 0 auto 0 0;
    width: min(360px, 100vw);
  }
}

@media (max-width: 600px) {
  .projects-trigger {
    position: relative;
    inset: auto;
    width: 38px;
    height: 34px;
    border-left: 1px solid var(--line);
    border-radius: 7px;
    transform: none;
  }
  .projects-trigger > small { display: none; }
  .projects-drawer { width: 100%; border-right: 0; }
  .projects-head,
  .projects-intro,
  .projects-foot { padding-inline: 15px; }
  .projects-workspace { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .projects-rail {
    flex-direction: row;
    align-items: stretch;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
    padding: 10px 15px;
  }
  .projects-rail-list { width: auto; display: flex; flex: 1; gap: 8px; overflow-x: auto; }
  .project-rail-item,
  .projects-rail-add { width: 48px; height: 48px; aspect-ratio: auto; flex: 0 0 48px; }
  .projects-rail-add { margin: 0 0 0 auto; }
  .projects-list { padding: 15px; }
  .project-planes { grid-template-columns: 1fr; }
  .project-plane,
  .project-plane:last-child:nth-child(odd) { grid-column: auto; border-right: 0; }
  .project-card-actions { align-items: stretch; flex-direction: column; }
  .project-codex-meta,
  .project-access-policy > ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-codex-meta li:nth-child(2) { border-right: 0; }
  .project-codex-meta li:nth-child(-n + 2) { border-bottom: 1px solid var(--line-soft); }
  .project-access-policy li:last-child { grid-column: 1 / -1; }
  .project-codex-resume { grid-template-columns: 1fr; }
  .project-codex-resume button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .projects-drawer { animation: none; }
}

/* FIRING is a local, non-persistent power state. One animated surface keeps it light. */
body.is-firing {
  --ink: #fff2f3;
  --ink-soft: #d4aab0;
  --ink-faint: #936a72;
  --shell: #070205;
  --surface: #12050a;
  --surface-2: #1b080e;
  --surface-3: #260b13;
  --line: #5b1b2a;
  --line-soft: rgba(255, 109, 124, 0.15);
  --teal: #ff5366;
  --teal-soft: rgba(255, 56, 81, 0.13);
  --electric-blue: #ff7b69;
  --crystal-blue: #ffb0a6;
  --saffron: #ffb43b;
  --coral: #ff4059;
}

body.is-firing .app-shell {
  background:
    linear-gradient(122deg, rgba(91, 0, 18, 0.34), transparent 42%, rgba(46, 0, 10, 0.44)),
    linear-gradient(300deg, #070205 12%, #21040d 52%, #080205 88%);
  background-size: 180% 180%, 160% 160%;
  animation: firing-flow 18s ease-in-out infinite alternate;
}

body.is-firing .living-window,
body.is-firing .window-dock,
body.is-firing .dock-utility-tray {
  box-shadow: 0 0 34px rgba(255, 33, 68, 0.09);
}

body.is-firing .dock-brand {
  border-color: rgba(255, 81, 104, 0.76);
  background: rgba(58, 7, 17, 0.88);
  box-shadow: 0 0 24px rgba(255, 35, 71, 0.24);
  animation: firing-heart 1.7s ease-in-out infinite;
}

body.is-firing .dock-brand-copy small {
  color: #ff697a;
}

body.is-firing .projects-trigger {
  border-color: rgba(255, 81, 104, 0.58);
  background: rgba(38, 6, 13, 0.94);
}

@keyframes firing-flow {
  from { background-position: 0% 20%, 10% 50%; }
  to { background-position: 100% 80%, 90% 40%; }
}

@keyframes firing-heart {
  0%, 100% { transform: scale(1); }
  42% { transform: scale(1.018); }
  58% { transform: scale(1.006); }
}

@media (prefers-reduced-motion: reduce) {
  body.is-firing .app-shell,
  body.is-firing .dock-brand { animation: none; }
}
