:root {
  --bg-top: #f2d6a2;
  --bg-bottom: #d98952;
  --panel: rgba(35, 24, 18, 0.9);
  --panel-soft: rgba(68, 44, 29, 0.88);
  --text: #fdf3df;
  --accent: #9fd38d;
  --accent-strong: #f6bd60;
  --danger: #d96c5f;
  --line: rgba(255, 235, 206, 0.14);
  --shadow: 0 24px 60px rgba(45, 18, 7, 0.35);
  --ui-font-display: "Courier New", "Lucida Console", monospace;
  --ui-font-body: "Courier New", "Lucida Console", monospace;
  --ui-stage-columns: minmax(0, 1fr) 280px;
  --ui-stage-gap: 18px;
  --ui-panel-gap: 12px;
  --ui-panel-bg: rgba(68, 44, 29, 0.88);
  --ui-panel-border: rgba(255, 235, 206, 0.14);
  --ui-chip-bg: rgba(255, 255, 255, 0.06);
  --ui-chip-border: rgba(255, 243, 223, 0.16);
  --ui-status-bg: rgba(21, 14, 10, 0.64);
  --ui-status-text: #f6bd60;
  --ui-speech-bg: rgba(33, 24, 20, 0.94);
  --ui-speech-hero-bg: linear-gradient(180deg, rgba(38, 28, 18, 0.96), rgba(54, 35, 24, 0.96));
  --ui-speech-bork-bg: linear-gradient(180deg, rgba(64, 43, 24, 0.96), rgba(83, 56, 29, 0.96));
  --ui-speech-thought-bg: linear-gradient(180deg, rgba(25, 31, 42, 0.96), rgba(33, 40, 54, 0.96));
  --ui-ghost-bg: rgba(255, 255, 255, 0.06);
  --ui-badge-hero: #f6bd60;
  --ui-badge-bork: #d9a35f;
  --ui-badge-thought: #9fd3d5;
}

body[data-ui-mode="adventure"] {
  --ui-font-display: "Courier New", "Lucida Console", monospace;
  --ui-font-body: "Courier New", "Lucida Console", monospace;
  --ui-stage-columns: minmax(0, 1fr) 280px;
  --ui-stage-gap: 18px;
  --ui-panel-gap: 12px;
  --ui-panel-bg: rgba(68, 44, 29, 0.88);
  --ui-panel-border: rgba(255, 235, 206, 0.14);
  --ui-chip-bg: rgba(255, 255, 255, 0.06);
  --ui-chip-border: rgba(255, 243, 223, 0.16);
  --ui-status-bg: rgba(21, 14, 10, 0.64);
  --ui-status-text: #f6bd60;
  --ui-speech-bg: rgba(33, 24, 20, 0.94);
  --ui-speech-hero-bg: linear-gradient(180deg, rgba(38, 28, 18, 0.96), rgba(54, 35, 24, 0.96));
  --ui-speech-bork-bg: linear-gradient(180deg, rgba(64, 43, 24, 0.96), rgba(83, 56, 29, 0.96));
  --ui-speech-thought-bg: linear-gradient(180deg, rgba(25, 31, 42, 0.96), rgba(33, 40, 54, 0.96));
  --ui-ghost-bg: rgba(255, 255, 255, 0.06);
  --ui-badge-hero: #f6bd60;
  --ui-badge-bork: #d9a35f;
  --ui-badge-thought: #9fd3d5;
}

body[data-ui-mode="voyage"] {
  --ui-font-display: "Courier New", "Lucida Console", monospace;
  --ui-font-body: "Courier New", "Lucida Console", monospace;
  --ui-stage-columns: minmax(0, 1fr) 250px;
  --ui-stage-gap: 16px;
  --ui-panel-gap: 10px;
  --ui-panel-bg: rgba(24, 36, 54, 0.84);
  --ui-panel-border: rgba(216, 241, 255, 0.16);
  --ui-chip-bg: rgba(255, 255, 255, 0.08);
  --ui-chip-border: rgba(216, 241, 255, 0.18);
  --ui-status-bg: rgba(14, 24, 38, 0.74);
  --ui-status-text: #cdeaff;
  --ui-speech-bg: rgba(18, 29, 42, 0.92);
  --ui-speech-hero-bg: linear-gradient(180deg, rgba(16, 31, 45, 0.96), rgba(24, 44, 60, 0.96));
  --ui-speech-bork-bg: linear-gradient(180deg, rgba(30, 43, 54, 0.96), rgba(42, 56, 68, 0.96));
  --ui-speech-thought-bg: linear-gradient(180deg, rgba(18, 26, 38, 0.96), rgba(28, 39, 54, 0.96));
  --ui-ghost-bg: rgba(216, 241, 255, 0.08);
  --ui-badge-hero: #8fd4ff;
  --ui-badge-bork: #b6d6d0;
  --ui-badge-thought: #a7c4ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--ui-font-body);
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.22), transparent 30%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.start-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 223, 140, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(17, 15, 24, 0.7), rgba(23, 14, 9, 0.88));
  backdrop-filter: blur(8px);
}

.start-screen.hidden {
  display: none;
}

.start-card {
  width: min(620px, 100%);
  padding: 34px 28px;
  border: 4px solid rgba(255, 239, 205, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(36, 32, 54, 0.96), rgba(48, 28, 18, 0.96));
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.42),
    inset 0 0 0 4px rgba(255, 240, 208, 0.05);
  text-align: center;
}

.start-kicker {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  margin-bottom: 16px;
}

.start-title {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
  line-height: 0.95;
  color: #fff6de;
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.35),
    0 12px 28px rgba(246, 189, 96, 0.18);
}

.start-copy {
  max-width: 40ch;
  margin: 18px auto 0;
  color: rgba(253, 243, 223, 0.82);
  line-height: 1.6;
}

.start-button {
  margin-top: 24px;
  padding: 14px 22px;
  border: 2px solid rgba(255, 240, 208, 0.24);
  border-radius: 14px;
  background: linear-gradient(180deg, #f6bd60, #d98d4f);
  color: #2a1b13;
  cursor: pointer;
  font: inherit;
  font-weight: bold;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.25);
}

.start-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.game-shell {
  width: min(1380px, calc(100% - 24px));
  margin: 24px auto;
  display: block;
}

.scene-panel,
.ui-panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.scene-panel {
  padding: 20px;
  background: linear-gradient(180deg, rgba(39, 32, 47, 0.86), rgba(35, 24, 18, 0.94));
}

.scene-stage {
  margin-top: 18px;
  display: grid;
  grid-template-columns: var(--ui-stage-columns);
  gap: var(--ui-stage-gap);
  align-items: start;
}

.ui-panel {
  margin-top: 14px;
  padding: 0;
  background: transparent;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--ui-panel-gap);
  align-content: start;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.scene-header,
.panel-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.volume-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--ui-chip-border);
  border-radius: 14px;
  background: var(--ui-chip-bg);
  color: rgba(253, 243, 223, 0.86);
}

.volume-control span {
  font-size: 0.9rem;
  white-space: nowrap;
}

.volume-control input[type="range"] {
  width: 108px;
  accent-color: #f6bd60;
  cursor: pointer;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
}

.version-marker {
  display: inline-flex;
  margin-top: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(246, 189, 96, 0.14);
  border: 1px solid rgba(246, 189, 96, 0.34);
  color: #ffe8b9;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-family: var(--ui-font-display);
}

h2 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.ghost-button,
.inventory-item,
.verb-button {
  border: 1px solid var(--ui-chip-border);
  border-radius: 14px;
  color: var(--text);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.ghost-button {
  background: var(--ui-ghost-bg);
  padding: 10px 14px;
  cursor: pointer;
}

.ghost-button:hover,
.inventory-item:hover,
.verb-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 243, 223, 0.32);
}

.ghost-button.active {
  background: rgba(159, 211, 141, 0.18);
  border-color: rgba(159, 211, 141, 0.48);
}

.scene-art {
  --scene-viewport-width: 800;
  --scene-viewport-height: 520;
  --scene-viewport-target-height: 520px;
  --scene-viewport-target-height-compact: 320px;
  width: min(100%, calc(var(--scene-viewport-target-height) * (var(--scene-viewport-width) / var(--scene-viewport-height))));
  aspect-ratio: var(--scene-viewport-width) / var(--scene-viewport-height);
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  image-rendering: pixelated;
  border: 4px solid rgba(17, 11, 8, 0.55);
  box-shadow: inset 0 0 0 4px rgba(255, 240, 208, 0.06);
  background: #5f9fd1;
  margin-inline: auto;
}

.scene-art.has-background-asset,
.scene-art.dock.has-background-asset,
.scene-art.sea.has-background-asset {
  background-image: var(--scene-background-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.pixel-sprite,
.pixel-prop {
  position: absolute;
}

.scene-props,
.scene-characters,
.speech-layer,
.scene-hotspots,
.debug-layer,
.scene-overlay {
  position: absolute;
  inset: 0;
}

.speech-layer {
  pointer-events: none;
  z-index: 5;
}

.scene-hotspots {
  z-index: 6;
}

.debug-layer {
  pointer-events: none;
  z-index: 7;
  display: none;
}

.scene-overlay {
  z-index: 8;
  pointer-events: none;
}

.debug-layer.active {
  display: block;
}

.debug-box,
.debug-point {
  position: absolute;
}

.debug-box {
  border: 2px dashed rgba(255, 90, 90, 0.95);
  background: rgba(255, 90, 90, 0.08);
}

.debug-box.hotspot {
  border-color: rgba(255, 208, 73, 0.95);
  background: rgba(255, 208, 73, 0.08);
}

.debug-box.character {
  border-color: rgba(96, 220, 255, 0.95);
  background: rgba(96, 220, 255, 0.08);
}

.debug-label {
  position: absolute;
  left: -2px;
  top: -22px;
  padding: 2px 6px;
  background: rgba(19, 15, 12, 0.92);
  color: #fff4d6;
  font-size: 0.72rem;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 6px;
  border: 1px solid rgba(255, 240, 208, 0.16);
}

.debug-point {
  width: 12px;
  height: 12px;
  margin-left: -6px;
  margin-top: -6px;
  border-radius: 50%;
  background: #57f2ff;
  box-shadow: 0 0 0 2px rgba(14, 25, 32, 0.92);
}

.debug-point.target {
  background: #ffcd57;
}

.debug-point.click {
  background: #ff7b7b;
}

.debug-readout {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(19, 15, 12, 0.92);
  color: #fff4d6;
  font-size: 0.78rem;
  line-height: 1.35;
  border: 1px solid rgba(255, 240, 208, 0.16);
}

.scene-hotspot {
  position: absolute;
  background: transparent;
  border: 0;
  opacity: 0;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.scene-hotspot:focus-visible {
  outline: 2px solid rgba(255, 244, 211, 0.45);
  outline-offset: 2px;
  opacity: 1;
}

.scene-hotspot.exit-left,
.scene-hotspot.exit-right {
  top: 0;
  bottom: 0;
  width: 7%;
  border-radius: 0;
}

.scene-hotspot.exit-left {
  left: 0;
}

.scene-hotspot.exit-right {
  right: 0;
}

.pixel-prop {
  image-rendering: pixelated;
}

.pixel-prop.asset-prop {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible;
}

.prop-asset-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.pixel-prop.sea-shimmer {
  inset: 0;
  background:
    radial-gradient(circle at 25% 20%, rgba(255, 255, 255, 0.12), transparent 16%),
    radial-gradient(circle at 70% 36%, rgba(255, 255, 255, 0.08), transparent 18%),
    radial-gradient(circle at 40% 74%, rgba(255, 255, 255, 0.06), transparent 14%);
  opacity: 0.7;
}

.pixel-prop.sea-wave {
  animation: wave-wobble 1.4s ease-in-out infinite;
  transform-origin: center center;
}

.pixel-prop.sea-boat {
  width: 106px;
  height: 148px;
}

.pixel-sprite {
  width: 46px;
  height: 92px;
  bottom: 100px;
  animation: idle-bob 1.4s steps(2) infinite;
  z-index: 3;
}

.pixel-sprite.hero {
  width: 128px;
  height: 216px;
  transform-origin: center bottom;
  overflow: hidden;
}

.pixel-sprite.bork {
  width: 92px;
  height: 214px;
  animation-duration: 1.7s;
  transform-origin: center bottom;
  overflow: hidden;
}

.pixel-sprite.hero .character-shell {
  position: absolute;
  inset: 0;
  transform-origin: center bottom;
}

.pixel-sprite.bork .character-shell {
  position: absolute;
  inset: 0;
  transform-origin: center bottom;
}

.pixel-sprite.hero .character-art {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  user-select: none;
  pointer-events: none;
}

.pixel-sprite.bork .character-art {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  image-rendering: pixelated;
  user-select: none;
  pointer-events: none;
}

.pixel-sprite.hero .character-art.idle {
  object-fit: contain;
  object-position: center bottom;
}

.pixel-sprite.hero .character-art.strip {
  width: 500%;
  max-width: none;
  object-fit: fill;
  transform: translateX(calc(var(--hero-frame, 0) * -20%));
  transform-origin: left bottom;
}

.pixel-sprite.hero.facing-left .character-shell {
  transform: scaleX(-1);
}

.pixel-sprite.hero.walking {
  animation-duration: 0.9s;
}

.speech-panel {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--ui-panel-border);
  background: var(--ui-speech-bg);
}

.speech-panel.is-empty {
  opacity: 0.72;
}

.speech-panel.speaker-hero {
  background: var(--ui-speech-hero-bg);
}

.speech-panel.speaker-bork {
  background: var(--ui-speech-bork-bg);
}

.speech-panel.speaker-thought {
  background: var(--ui-speech-thought-bg);
  border-style: dashed;
}

.speech-speaker-badge {
  width: 64px;
  height: 64px;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--ui-badge-hero);
  box-shadow: inset 0 0 0 3px rgba(36, 22, 18, 0.18);
}

.speech-panel.speaker-bork .speech-speaker-badge {
  background: var(--ui-badge-bork);
}

.speech-panel.speaker-thought .speech-speaker-badge {
  background: var(--ui-badge-thought);
}

.speech-speaker-portrait {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  image-rendering: pixelated;
  pointer-events: none;
}

.speech-speaker-badge-text {
  position: absolute;
  right: 6px;
  bottom: 4px;
  min-width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(21, 14, 10, 0.82);
  color: #fff7e5;
  font-size: 0.72rem;
  font-weight: bold;
  line-height: 1;
}

.speech-panel-copy {
  min-width: 0;
}

.speech-speaker-label {
  margin: 0;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(253, 243, 223, 0.72);
}

.speech-text {
  margin: 6px 0 0;
  color: #fff7e5;
  font-size: 1rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.status-bar {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--ui-status-bg);
  border: 1px solid var(--ui-panel-border);
}

.status-bar p {
  color: var(--ui-status-text);
  min-height: 1.4em;
}

.compact-status-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.scene-status-title {
  color: #fff3dc;
  font-weight: bold;
  white-space: nowrap;
}

.scene-status-hover {
  color: var(--accent-strong);
  text-align: left;
}

.scene-description-hidden {
  display: none;
}

.debug-readout-panel {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--ui-status-bg);
  border: 1px solid var(--ui-panel-border);
}

.debug-readout-label {
  color: rgba(253, 243, 223, 0.82);
  font-size: 0.9rem;
}

.debug-readout-output {
  width: 100%;
  resize: vertical;
  min-height: 74px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 243, 223, 0.16);
  background: rgba(11, 8, 6, 0.82);
  color: #fff4d6;
  font: inherit;
  line-height: 1.35;
}

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

.scene-overlay .sea-controls {
  position: absolute;
  inset: 0;
  color: #fff4d6;
  font-size: 0.9rem;
  pointer-events: none;
}

.scene-overlay .sea-controls-header {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(16, 18, 26, 0.74);
  border: 1px solid rgba(255, 240, 208, 0.16);
  pointer-events: none;
}

.scene-overlay .sea-controls-title {
  font-weight: bold;
  color: #fff7e5;
}

.scene-overlay .sea-touch-controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.scene-overlay .sea-touch-button {
  position: absolute;
  bottom: 14px;
  width: 92px;
  min-height: 58px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 240, 208, 0.18);
  background: rgba(16, 18, 26, 0.72);
  color: #fff6e7;
  font: inherit;
  cursor: pointer;
  touch-action: none;
  pointer-events: auto;
}

.scene-overlay .sea-touch-button.is-left {
  left: 14px;
}

.scene-overlay .sea-touch-button.is-right {
  right: 14px;
}

.scene-overlay .sea-touch-button:active,
.scene-overlay .sea-touch-button.is-active {
  background: rgba(246, 189, 96, 0.24);
  border-color: rgba(246, 189, 96, 0.44);
}

.scene-overlay .sea-touch-arrow {
  font-size: 1.1rem;
  line-height: 1;
  font-weight: bold;
}

.scene-overlay .sea-meta {
  padding-left: 4px;
  color: rgba(255, 244, 214, 0.9);
  white-space: nowrap;
}

.scene-overlay .sea-countdown {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: bold;
  color: #fff8e3;
  text-shadow:
    0 4px 0 rgba(0, 0, 0, 0.34),
    0 18px 34px rgba(0, 0, 0, 0.28);
}

.scene-overlay .sea-end-screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(12, 16, 22, 0.52);
  pointer-events: auto;
}

.sea-end-card {
  width: min(420px, calc(100% - 48px));
  padding: 22px 20px;
  border-radius: 20px;
  background: rgba(33, 24, 20, 0.94);
  border: 1px solid rgba(255, 240, 208, 0.18);
  box-shadow: 0 24px 52px rgba(0, 0, 0, 0.35);
  text-align: center;
}

.sea-end-card h2 {
  margin: 0 0 10px;
  font-size: 1.5rem;
  color: #fff4dc;
}

.sea-end-card p {
  margin: 0;
  color: rgba(253, 243, 223, 0.82);
  line-height: 1.5;
}

.sea-end-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.inventory-shell {
  position: relative;
}

body[data-ui-mode="voyage"] .verbs-box {
  display: none;
}

.inventory-box-side {
  min-height: 520px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-content: start;
}

.inventory {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding-left: 0;
  margin-top: 10px;
}

.inventory-item {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  width: 100%;
  min-height: 82px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  border-style: solid;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.inventory-item-art {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.inventory-item-copy {
  display: block;
  min-width: 0;
}

.inventory-item strong {
  display: block;
  margin-bottom: 4px;
  color: #fff7e5;
  font-size: 0.95rem;
  line-height: 1.2;
  word-break: normal;
  overflow-wrap: break-word;
}

.inventory-item span,
.verbs-box p,
.panel-header p {
  color: rgba(253, 243, 223, 0.82);
  line-height: 1.45;
}

.panel-header {
  align-items: baseline;
}

.panel-header h2,
.panel-header p {
  margin: 0;
}

.panel-header p {
  text-wrap: pretty;
}

.inventory-header p {
  flex: 1;
  max-width: 16ch;
  text-align: right;
  overflow-wrap: normal;
  word-break: normal;
}

.conversation-box,
.inventory-box,
.verbs-box {
  padding: 14px;
  border-radius: 18px;
  background: var(--ui-panel-bg);
  border: 1px solid var(--ui-panel-border);
}

.conversation-box.is-collapsed {
  display: none;
}

.conversation-panel {
  display: grid;
  gap: 10px;
}

.conversation-empty {
  color: rgba(253, 243, 223, 0.68);
}

.inventory-hint {
  margin-top: 10px;
  color: rgba(253, 243, 223, 0.66);
  min-height: 1.5em;
  max-width: none;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
}

.conversation-choices {
  display: grid;
  gap: 8px;
}

.choice-button,
.verb-button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  background: var(--ui-chip-bg);
  color: var(--text);
  border: 1px solid var(--ui-chip-border);
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
}

.choice-button:hover,
.verb-button:hover {
  background: rgba(246, 189, 96, 0.16);
  border-color: rgba(246, 189, 96, 0.44);
}

.verbs-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.verbs-header h2,
.verbs-header p {
  margin: 0;
}

.verbs-header p {
  font-size: 0.92rem;
  color: rgba(253, 243, 223, 0.72);
  text-align: right;
}

.verbs-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 0;
  min-height: 46px;
}

.verb-button.active {
  background: rgba(159, 211, 141, 0.18);
  border-color: rgba(159, 211, 141, 0.5);
}

.inventory-item.active {
  background: rgba(159, 211, 141, 0.18);
  border-color: rgba(159, 211, 141, 0.48);
}

.inventory-item.used,
.hotspot.used {
  opacity: 0.65;
}

@media (max-width: 920px) {
  .scene-stage {
    grid-template-columns: 1fr;
  }

  .ui-panel {
    grid-template-columns: 1fr;
  }

  .scene-art {
    width: min(100%, calc(var(--scene-viewport-target-height-compact) * (var(--scene-viewport-width) / var(--scene-viewport-height))));
  }

  .verbs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-status-bar,
  .verbs-header,
  .panel-header {
    grid-template-columns: 1fr;
    display: grid;
    gap: 6px;
  }

  .inventory {
    padding-left: 0;
    grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  }

  .inventory-box-side {
    min-height: 0;
  }

  .inventory-header p,
  .inventory-hint {
    max-width: none;
    text-align: left;
  }

  .pixel-sprite.hero {
    left: 220px;
    width: 108px;
    height: 182px;
    bottom: 84px;
  }

  .pixel-sprite.bork {
    width: 76px;
    height: 176px;
    bottom: 86px;
    right: 120px;
  }

}

@keyframes idle-bob {
  0% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-2px);
  }

  100% {
    transform: translateY(0);
  }
}

@keyframes wave-wobble {
  0% {
    transform: translateX(-2px);
  }

  50% {
    transform: translateX(2px);
  }

  100% {
    transform: translateX(-2px);
  }
}


@keyframes stride {
  0% {
    transform: translateX(0);
  }

  50% {
    transform: translateX(1px);
  }

  100% {
    transform: translateX(0);
  }
}
