.screen {
  --screen-padding: clamp(0.9rem, 4vw, 2.5rem);
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding: var(--screen-padding);
  display: flex;
  justify-content: center;
  align-items: center;
}

.panel {
  width: min(92vw, calc(90vh * 4 / 3));
  width: min(92vw, calc(90vh * 4 / 3), calc(90dvh * 4 / 3));
  max-width: 100%;
  max-height: 90vh;
  max-height: min(90vh, 90dvh);
  aspect-ratio: 4 / 3;
  background-color: var(--color-panel);
  border: 4px solid var(--color-border);
  box-shadow: var(--panel-shadow);
  padding: clamp(1rem, 2.6vmin, 2rem);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

body[data-four-three-ratio-enabled="false"] .panel {
  width: 90vw;
  width: min(90vw, 90dvw);
  height: 90vh;
  height: min(90vh, 90dvh);
  max-width: 100%;
  max-height: min(90vh, 90dvh);
  aspect-ratio: auto;
}

.panel-layout {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  min-height: 0;
}

body.chat-immersive .screen {
  padding: 0;
}

body.chat-immersive .panel,
body.chat-immersive[data-four-three-ratio-enabled="false"] .panel {
  width: 100vw;
  width: 100dvw;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  box-shadow: none;
  padding: 0;
  background: transparent;
}

body.chat-immersive .panel-layout {
  gap: 0;
  height: 100%;
  min-height: 100%;
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.panel-toolbar {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.language-toggle {
  min-width: 9rem;
  max-width: 100%;
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.32);
  color: var(--color-accent);
  cursor: pointer;
  padding: 0.35rem 0.55rem;
  white-space: nowrap;
}

.language-toggle:hover,
.language-toggle:focus {
  background: var(--color-selected-bg);
  color: var(--color-selected-text);
  outline: none;
}

.panel-title {
  min-height: 4.5rem;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: auto;
}

.ascii-title {
  display: inline-block;
  margin: 0;
  white-space: pre;
  line-height: 1;
  font-size: 12px;
  text-align: left;
  letter-spacing: 0;
  font-kerning: none;
  font-variant-ligatures: none;
  font-synthesis: none;
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: auto;
}

.fallback-title {
  margin: 0;
  font-size: clamp(1.2rem, 3vmin, 2rem);
}

.panel-subtitle {
  margin: 0;
  font-size: clamp(0.9rem, 2.2vmin, 1.2rem);
}

.panel-clock {
  margin: 0;
  flex: 0 0 auto;
  min-width: 10ch;
  text-align: right;
  color: var(--color-accent);
  font-size: clamp(0.9rem, 2.2vmin, 1.2rem);
  letter-spacing: 0.08em;
}

.panel-intro {
  margin: 0;
  color: var(--color-accent);
  font-size: clamp(1rem, 2.4vmin, 1.4rem);
}

.menu-view,
.content-view,
.photography-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.menu-clock-wrap {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
  padding-top: 0.75rem;
}

.menu-clock {
  text-align: right;
}

.menu-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-size: clamp(1rem, 3vmin, 1.6rem);
  margin: 0;
  padding: 0.7rem 0.75rem 0.7rem 1.85rem;
  position: relative;
  text-align: left;
  line-height: 1.25;
  transition: background-color 120ms ease, color 120ms ease;
}

.menu-item:focus {
  outline: none;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.menu-item.selected {
  background: var(--color-selected-bg);
  color: var(--color-selected-text);
}

.menu-item.selected::before {
  content: ">";
  position: absolute;
  left: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
}

.menu-item-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.menu-item-label {
  flex: 1 1 auto;
  min-width: 0;
}

.menu-item-toggle-status {
  flex: 0 0 auto;
  min-width: 3ch;
  font-size: 0.82em;
  letter-spacing: 0.08em;
  text-align: right;
}

.secret-view {
  position: relative;
}

.secret-view::before {
  content: "";
  position: absolute;
  inset: -0.25rem;
  pointer-events: none;
  opacity: 0;
}

.secret-view::before {
  background: #000000;
  transition: opacity 180ms ease;
  z-index: 1;
}

.secret-menu-copy {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.secret-menu-copy .menu-item {
  transition: opacity 180ms ease, color 180ms ease, background-color 180ms ease;
}

.secret-copy {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  pointer-events: none;
}

.secret-message {
  max-width: min(100%, 30rem);
  margin: 0;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.82);
  color: #ff4a4a;
  font-size: clamp(1rem, 2.2vmin, 1.25rem);
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-align: center;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 220ms ease, transform 220ms ease;
}

.secret-message.visible {
  opacity: 1;
  transform: translateY(0);
}

.secret-transcript {
  display: grid;
  gap: 0.55rem;
  width: min(100%, 40rem);
  margin-top: 1rem;
}

.secret-transcript:empty {
  display: none;
}

.secret-line {
  margin: 0;
  color: #ff4a4a;
  font-size: clamp(0.95rem, 2.1vmin, 1.15rem);
  line-height: 1.5;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(0.35rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.secret-line.visible {
  opacity: 1;
  transform: translateY(0);
}

body.secret-revealed .panel {
  background: #000000;
  border-color: #000000;
  box-shadow: none;
}

body.secret-revealed .panel-header,
body.secret-revealed .secret-menu-copy,
body.secret-revealed .site-footer {
  opacity: 0;
}

body.secret-revealed .secret-view::before {
  opacity: 1;
}

.content-view {
  gap: 1rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.chat-view {
  flex: 1;
  min-height: 0;
  display: flex;
  padding: clamp(0.9rem, 4vw, 2.5rem);
  overflow-x: hidden;
  overflow-y: auto;
}

.chat-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.chat-transcript {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 0;
  border-bottom: 2px solid var(--color-border);
  background: transparent;
}

.chat-row {
  display: flex;
  flex-direction: column;
  gap: 0.24rem;
  max-width: min(100%, 31rem);
}

.chat-row-user {
  align-self: flex-end;
}

.chat-row-system {
  max-width: 100%;
}

.chat-stamp {
  margin: 0;
  color: var(--color-accent);
  font-size: clamp(0.72rem, 1.65vmin, 0.84rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-row-user .chat-stamp {
  text-align: right;
}

.chat-bubble {
  padding: 0.72rem 0.82rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(0, 0, 0, 0.5);
  line-height: 1.52;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
}

.chat-row-user .chat-bubble {
  background: rgba(255, 0, 0, 0.18);
  border-color: rgba(255, 255, 255, 0.45);
}

.chat-row-system .chat-bubble {
  background: rgba(255, 255, 255, 0.05);
  border-style: dashed;
}

.chat-bubble-typing {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  min-height: 2.5rem;
}

.chat-typing-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--color-accent);
  opacity: 0.3;
  animation: chat-typing-pulse 1s infinite ease-in-out;
}

.chat-typing-dot:nth-child(2) {
  animation-delay: 120ms;
}

.chat-typing-dot:nth-child(3) {
  animation-delay: 240ms;
}

@keyframes chat-typing-pulse {
  0%,
  80%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-0.14rem);
  }
}

.chat-composer {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border: 0;
  background: transparent;
  padding: 0.75rem;
}

.chat-send {
  border: 2px solid var(--color-border);
  background: transparent;
  color: inherit;
}

.chat-send:hover,
.chat-send:focus {
  background: var(--color-selected-bg);
  color: var(--color-selected-text);
  outline: none;
}

.chat-send:disabled,
.chat-input:disabled {
  opacity: 0.5;
  cursor: wait;
}

.chat-composer-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.6rem;
  align-items: stretch;
}

.chat-input {
  min-height: 4.25rem;
  resize: none;
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.62);
  color: inherit;
  padding: 0.65rem 0.75rem;
  font: inherit;
  line-height: 1.45;
}

.chat-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.chat-send {
  min-width: 7rem;
  padding: 0.72rem 1rem;
  cursor: pointer;
  font-size: clamp(0.95rem, 2.05vmin, 1.05rem);
  letter-spacing: 0.08em;
}

.game-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.life-view {
  gap: 0.45rem;
}

.music-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.photography-view {
  gap: 0.9rem;
}

.music-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.music-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.35fr);
  gap: 1rem;
}

.music-art-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 0;
  border: 2px solid var(--color-border);
  background:
    linear-gradient(135deg, rgba(255, 90, 54, 0.28), rgba(0, 0, 0, 0) 55%),
    linear-gradient(225deg, rgba(255, 255, 0, 0.18), rgba(0, 0, 0, 0) 50%),
    rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.music-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.music-art-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.7);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 0, 0.28), transparent 40%),
    radial-gradient(circle at 72% 78%, rgba(255, 90, 54, 0.32), transparent 42%);
}

.music-meta {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.music-now-playing,
.music-track-artist,
.music-track-index {
  margin: 0;
}

.panel-intro,
.page-heading,
.content-body,
.chat-bubble,
.chat-input,
.plan-description,
.fact-row dd,
.game-status,
.game-controls,
.photography-caption,
.photography-meta-row dd,
.music-track-title,
.music-track-artist,
.secret-message,
.secret-line,
.modal-body,
.modal-point-body {
  overflow-wrap: anywhere;
}

.music-now-playing {
  color: var(--color-accent);
  font-size: clamp(0.9rem, 2.1vmin, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.panel-intro,
.content-body,
.chat-bubble,
.plan-description,
.fact-list,
.game-status,
.game-controls,
.photography-status,
.photography-caption,
.photography-meta-list,
.music-track-artist,
.music-track-index,
.site-footer {
  font-family: var(--font-copy);
}

:is(html[lang="zh-Hans"], html[lang="ja"]) .panel-subtitle,
:is(html[lang="zh-Hans"], html[lang="ja"]) .panel-intro,
:is(html[lang="zh-Hans"], html[lang="ja"]) .page-heading,
:is(html[lang="zh-Hans"], html[lang="ja"]) .content-body,
:is(html[lang="zh-Hans"], html[lang="ja"]) .chat-bubble,
:is(html[lang="zh-Hans"], html[lang="ja"]) .chat-input,
:is(html[lang="zh-Hans"], html[lang="ja"]) .chat-send,
:is(html[lang="zh-Hans"], html[lang="ja"]) .plan-description,
:is(html[lang="zh-Hans"], html[lang="ja"]) .fact-list,
:is(html[lang="zh-Hans"], html[lang="ja"]) .game-status,
:is(html[lang="zh-Hans"], html[lang="ja"]) .game-controls,
:is(html[lang="zh-Hans"], html[lang="ja"]) .photography-status,
:is(html[lang="zh-Hans"], html[lang="ja"]) .photography-caption,
:is(html[lang="zh-Hans"], html[lang="ja"]) .photography-meta-list,
:is(html[lang="zh-Hans"], html[lang="ja"]) .music-now-playing,
:is(html[lang="zh-Hans"], html[lang="ja"]) .music-track-title,
:is(html[lang="zh-Hans"], html[lang="ja"]) .music-track-artist,
:is(html[lang="zh-Hans"], html[lang="ja"]) .music-track-index,
:is(html[lang="zh-Hans"], html[lang="ja"]) .menu-item,
:is(html[lang="zh-Hans"], html[lang="ja"]) .game-link,
:is(html[lang="zh-Hans"], html[lang="ja"]) .music-control,
:is(html[lang="zh-Hans"], html[lang="ja"]) .life-slider-label,
:is(html[lang="zh-Hans"], html[lang="ja"]) .life-slider-row-label,
:is(html[lang="zh-Hans"], html[lang="ja"]) .life-slider-copy,
:is(html[lang="zh-Hans"], html[lang="ja"]) .language-toggle,
:is(html[lang="zh-Hans"], html[lang="ja"]) .life-control,
:is(html[lang="zh-Hans"], html[lang="ja"]) .life-respawn,
:is(html[lang="zh-Hans"], html[lang="ja"]) .life-species-heading,
:is(html[lang="zh-Hans"], html[lang="ja"]) .life-stat-row,
:is(html[lang="zh-Hans"], html[lang="ja"]) .life-metric-label,
:is(html[lang="zh-Hans"], html[lang="ja"]) .site-footer {
  line-height: 1.35;
}

:is(html[lang="zh-Hans"], html[lang="ja"]) .music-now-playing {
  text-transform: none;
  letter-spacing: 0.02em;
}

:is(html[lang="zh-Hans"], html[lang="ja"]) .chat-send,
:is(html[lang="zh-Hans"], html[lang="ja"]) .chat-stamp {
  text-transform: none;
  letter-spacing: 0.02em;
}

:is(html[lang="zh-Hans"], html[lang="ja"]) .life-metric-label {
  text-transform: none;
  letter-spacing: 0.02em;
}

:is(html[lang="zh-Hans"], html[lang="ja"]) .life-slider-label {
  text-transform: none;
  letter-spacing: 0.02em;
}

:is(html[lang="zh-Hans"], html[lang="ja"]) .life-slider-row-label {
  letter-spacing: 0.02em;
}

.music-track-title {
  margin: 0;
  font-size: clamp(1.5rem, 4.1vmin, 2.8rem);
  line-height: 0.95;
}

.music-track-artist {
  font-size: clamp(0.95rem, 2.2vmin, 1.2rem);
}

.music-track-index {
  font-size: clamp(0.8rem, 1.9vmin, 0.95rem);
  color: rgba(255, 255, 255, 0.68);
}

.music-visualizer-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: stretch;
  padding: 0.55rem;
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.35);
}

.music-visualizer {
  width: 100%;
  height: 100%;
  min-height: 160px;
  display: block;
  background: #050816;
  image-rendering: pixelated;
}

.music-progress-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.music-time {
  min-width: 3ch;
  font-size: clamp(0.85rem, 2vmin, 1rem);
}

.music-slider {
  width: 100%;
  margin: 0;
  accent-color: #ffff00;
}

.music-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.music-control {
  min-width: 7.5rem;
  min-height: 2.9rem;
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--color-text);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.music-control:hover,
.music-control:focus {
  background: var(--color-selected-bg);
  color: var(--color-selected-text);
  outline: none;
}

.music-control:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.photography-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.photography-status {
  margin: 0;
  color: var(--color-accent);
  font-size: clamp(0.9rem, 2vmin, 1.05rem);
}

.photography-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 0.9rem;
  padding-right: 0.15rem;
}

.photography-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.82fr);
  gap: 0.85rem;
  padding: 0.75rem;
  border: 2px solid var(--color-border);
  background:
    linear-gradient(135deg, rgba(255, 255, 0, 0.08), transparent 40%),
    linear-gradient(225deg, rgba(255, 0, 0, 0.12), transparent 55%),
    rgba(0, 0, 0, 0.3);
}

.photography-figure,
.photography-meta-list {
  margin: 0;
}

.photography-figure {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}

.photography-image {
  width: 100%;
  max-height: 24rem;
  object-fit: cover;
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.45);
}

.photography-caption {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: clamp(0.85rem, 1.9vmin, 1rem);
  color: rgba(255, 255, 255, 0.82);
}

.photography-title {
  color: var(--color-text);
  font-size: clamp(1rem, 2.2vmin, 1.15rem);
}

.photography-meta {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.24);
}

.photography-meta-heading {
  margin: 0;
  font-size: clamp(0.88rem, 2vmin, 1rem);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
}

.photography-meta-list {
  display: grid;
  gap: 0.45rem;
}

.photography-meta-row {
  display: grid;
  grid-template-columns: minmax(7rem, 8.5rem) 1fr;
  gap: 0.55rem;
}

.photography-meta-row dt,
.photography-meta-row dd {
  margin: 0;
  font-size: clamp(0.82rem, 1.8vmin, 0.95rem);
}

.photography-meta-row dt {
  color: rgba(255, 255, 255, 0.72);
}

.photography-meta-row dd {
  color: var(--color-text);
  word-break: break-word;
}

.game-copy {
  gap: 0.35rem;
}

.pong-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.life-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.life-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(210px, 0.72fr);
  gap: 0.75rem;
}

.life-canvas-frame {
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.45rem;
  border: 2px solid var(--color-border);
  background:
    linear-gradient(180deg, rgba(0, 40, 25, 0.22), rgba(0, 0, 0, 0.18)),
    rgba(0, 0, 0, 0.36);
}

.life-canvas {
  display: block;
  width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--color-border);
  background: #02080b;
  image-rendering: pixelated;
  touch-action: none;
}

.life-sidebar {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  padding-right: 0.1rem;
}

.life-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.life-slider-card,
.life-metric,
.life-species-card {
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.28);
}

.life-metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.6rem 0.75rem;
}

.life-metric-label {
  font-size: clamp(0.8rem, 1.9vmin, 0.95rem);
  color: rgba(255, 255, 255, 0.76);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.life-metric-value {
  font-size: clamp(1.15rem, 3.2vmin, 1.9rem);
  line-height: 1;
}

.life-slider-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.75rem;
}

.life-slider-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.65rem;
}

.life-slider-label {
  font-size: clamp(0.82rem, 1.9vmin, 0.96rem);
  color: rgba(255, 255, 255, 0.76);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.life-slider-value {
  font-size: clamp(1.15rem, 3vmin, 1.6rem);
  color: var(--color-accent);
}

.life-slider-list {
  display: grid;
  gap: 0.65rem;
}

.life-slider-row {
  display: grid;
  gap: 0.35rem;
}

.life-slider-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.65rem;
}

.life-slider-row-label {
  font-size: clamp(0.78rem, 1.8vmin, 0.9rem);
  color: rgba(255, 255, 255, 0.8);
}

.life-slider-row-value {
  font-size: clamp(0.9rem, 2.1vmin, 1rem);
  color: var(--color-accent);
}

.life-slider {
  width: 100%;
  margin: 0;
  accent-color: #ffff00;
}

.life-slider-copy {
  margin: 0;
  font-size: clamp(0.78rem, 1.75vmin, 0.92rem);
  color: rgba(255, 255, 255, 0.76);
}

.life-species-list {
  display: grid;
  gap: 0.65rem;
}

.life-species-card {
  padding: 0.75rem;
}

.life-species-card.is-extinct {
  border-color: rgba(255, 118, 118, 0.7);
}

.life-species-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.life-species-heading {
  margin: 0;
  font-size: clamp(0.92rem, 2.1vmin, 1.1rem);
}

.life-species-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.life-species-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.2rem 0.45rem;
  border: 1px solid currentColor;
  font-size: clamp(0.72rem, 1.65vmin, 0.84rem);
  line-height: 1;
  white-space: nowrap;
}

.life-stat-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.life-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.life-stat-row dt,
.life-stat-row dd {
  margin: 0;
  font-size: clamp(0.82rem, 1.85vmin, 0.96rem);
}

.life-stat-row dd {
  color: var(--color-accent);
}

.life-species-actions {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.55rem;
}

.life-respawn {
  width: 100%;
  min-height: 2.3rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-accent);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

.life-respawn:hover,
.life-respawn:focus {
  border-color: var(--color-accent);
  background: rgba(255, 255, 0, 0.12);
  color: #fffbd2;
  outline: none;
}

.life-respawn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.life-controls {
  margin-top: auto;
  display: grid;
  gap: 0.55rem;
}

.life-control {
  width: 100%;
  min-height: 2.65rem;
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.3);
  color: var(--color-text);
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.life-control:hover,
.life-control:focus {
  background: var(--color-selected-bg);
  color: var(--color-selected-text);
  outline: none;
}

.game-scoreboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.game-score {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.6rem 0.8rem;
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.28);
}

.game-score-label {
  font-size: clamp(0.9rem, 2vmin, 1.1rem);
}

.game-score-value {
  font-size: clamp(1.4rem, 4.2vmin, 2.5rem);
  line-height: 1;
}

.game-canvas-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.6rem;
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.36);
}

.game-canvas {
  display: block;
  width: min(100%, 720px);
  max-height: 100%;
  aspect-ratio: 16 / 9;
  border: 2px solid var(--color-border);
  background: #02020a;
  image-rendering: pixelated;
  touch-action: none;
}

.game-status,
.game-controls {
  margin: 0;
}

.game-status {
  color: var(--color-accent);
  font-size: clamp(0.95rem, 2.2vmin, 1.2rem);
}

.game-controls {
  font-size: clamp(0.85rem, 1.9vmin, 1rem);
  color: rgba(255, 255, 255, 0.8);
}

.game-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.game-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.65rem 0.95rem;
  border: 2px solid var(--color-border);
  background: transparent;
  color: var(--color-text);
  text-decoration: none;
}

.game-link:hover,
.game-link:focus {
  background: var(--color-selected-bg);
  color: var(--color-selected-text);
  outline: none;
}

.page-heading {
  margin: 0;
  font-size: clamp(1.2rem, 3.2vmin, 2rem);
}

.content-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: clamp(0.95rem, 2.2vmin, 1.25rem);
}

.content-body p {
  margin: 0;
  line-height: 1.45;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr));
  gap: 0.75rem;
}

.plan-stack {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.75rem, 1fr));
  gap: 0.75rem;
}

.plan-card {
  --plan-card-border: var(--color-border);
  --plan-card-overlay-start: rgba(255, 255, 255, 0.06);
  --plan-card-overlay-end: rgba(255, 255, 255, 0.02);
  --plan-card-surface: rgba(0, 0, 0, 0.34);
  --plan-card-text: var(--color-text);
  --plan-card-accent: var(--color-accent);
  --plan-card-active-bg: var(--color-selected-bg);
  --plan-card-active-text: var(--color-selected-text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 11rem;
  padding: 0.9rem;
  border: 2px solid var(--plan-card-border);
  background:
    linear-gradient(180deg, var(--plan-card-overlay-start), var(--plan-card-overlay-end)),
    var(--plan-card-surface);
  color: var(--plan-card-text);
}

.plan-card-stacked {
  min-height: 0;
}

.plan-card-button {
  width: 100%;
  color: inherit;
  cursor: pointer;
  text-align: left;
  appearance: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.plan-card-button:hover,
.plan-card-button:focus,
.plan-card-button.selected {
  background: var(--plan-card-active-bg);
  color: var(--plan-card-active-text);
  outline: none;
}

.plan-card-button:hover .plan-price,
.plan-card-button:focus .plan-price,
.plan-card-button.selected .plan-price {
  color: currentColor;
}

.plan-price,
.plan-name,
.plan-description {
  margin: 0;
}

.plan-price {
  color: var(--plan-card-accent);
  font-size: clamp(0.95rem, 2vmin, 1.15rem);
}

.plan-name {
  font-size: clamp(1rem, 2.4vmin, 1.35rem);
  line-height: 1.05;
}

.plan-description {
  font-family: var(--font-copy);
  font-size: clamp(0.85rem, 1.8vmin, 1rem);
  line-height: 1.4;
}

.plan-card-lite {
  --plan-card-border: #4ad66d;
  --plan-card-overlay-start: rgba(74, 214, 109, 0.2);
  --plan-card-overlay-end: rgba(74, 214, 109, 0.04);
  --plan-card-surface: rgba(6, 30, 12, 0.84);
  --plan-card-accent: #9bff9c;
  --plan-card-active-bg: #4ad66d;
  --plan-card-active-text: #051208;
}

.plan-card-pro {
  --plan-card-border: #000000;
  --plan-card-overlay-start: rgba(255, 255, 255, 0.04);
  --plan-card-overlay-end: rgba(255, 255, 255, 0.01);
  --plan-card-surface: rgba(0, 0, 0, 0.98);
  --plan-card-accent: #d9d9d9;
  --plan-card-active-bg: #f4f4f4;
  --plan-card-active-text: #050505;
}

.plan-card-ultra {
  --plan-card-border: #d4af37;
  --plan-card-overlay-start: rgba(212, 175, 55, 0.24);
  --plan-card-overlay-end: rgba(212, 175, 55, 0.06);
  --plan-card-surface: rgba(43, 28, 0, 0.88);
  --plan-card-accent: #ffe38a;
  --plan-card-active-bg: #d4af37;
  --plan-card-active-text: #130d00;
}

.plan-card-enterprise {
  --plan-card-border: #ffffff;
  --plan-card-overlay-start: rgba(255, 255, 255, 0.92);
  --plan-card-overlay-end: rgba(232, 232, 232, 0.88);
  --plan-card-surface: rgba(245, 245, 245, 0.98);
  --plan-card-text: #000000;
  --plan-card-accent: #000000;
  --plan-card-active-bg: #ffffff;
  --plan-card-active-text: #000000;
}

.plan-card-enterprise .plan-name {
  color: #000000;
}

.plan-card-enterprise .plan-description {
  color: #000000;
}

.plan-prompt-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.plan-prompt-actions-featured {
  width: 100%;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.plan-prompt {
  margin: 0;
  align-self: center;
  font-family: var(--font-copy);
  font-size: clamp(0.9rem, 2vmin, 1.05rem);
}

.plan-prompt-button {
  padding: 0.55rem 0.8rem;
  border: 2px solid var(--color-border);
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
  text-align: center;
  appearance: none;
  transition: background-color 120ms ease, color 120ms ease;
}

.plan-prompt-button:hover,
.plan-prompt-button:focus,
.plan-prompt-button.selected {
  background: var(--color-selected-bg);
  color: var(--color-selected-text);
  outline: none;
}

.plan-prompt-button-featured {
  min-width: 12rem;
  padding: 0.75rem 1.15rem;
  border-color: #ff8a1f;
  background: linear-gradient(180deg, #ffb347, #ff8a1f);
  color: #241100;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(255, 138, 31, 0.18);
}

.plan-prompt-button-featured:hover,
.plan-prompt-button-featured:focus,
.plan-prompt-button-featured.selected {
  background: linear-gradient(180deg, #ffc567, #ff981f);
  color: #1a0b00;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-dialog {
  width: min(100%, 34rem);
  max-height: 100%;
  overflow-y: auto;
  padding: 1rem;
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 128, 0.96);
  box-shadow: var(--panel-shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.modal-title,
.modal-body,
.modal-point-title,
.modal-point-body {
  margin: 0;
}

.modal-title {
  font-size: clamp(1rem, 2.6vmin, 1.3rem);
}

.modal-close {
  min-width: 5.5rem;
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--color-border);
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  background: var(--color-selected-bg);
  color: var(--color-selected-text);
  outline: none;
}

.modal-body,
.modal-point-body {
  font-family: var(--font-copy);
  line-height: 1.4;
}

.modal-summary {
  display: grid;
  gap: 0.6rem;
  margin: 0.85rem 0 0;
}

.modal-summary-row {
  display: grid;
  grid-template-columns: minmax(4.5rem, 6rem) 1fr;
  gap: 0.75rem;
  margin: 0;
}

.modal-summary-row dt,
.modal-summary-row dd {
  margin: 0;
}

.modal-summary-row dt {
  color: var(--color-accent);
}

.modal-summary-row dd {
  font-family: var(--font-copy);
}

.cart-modal {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.cart-summary {
  margin: 0;
  font-family: var(--font-copy);
  line-height: 1.4;
}

.cart-list {
  display: grid;
  gap: 0.65rem;
}

.cart-totals {
  display: grid;
  gap: 0.45rem;
  padding-top: 0.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.cart-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-family: var(--font-copy);
}

.cart-total-row-emphasis {
  color: var(--color-accent);
}

.cart-total-label,
.cart-total-value {
  margin: 0;
}

.cart-total-value {
  text-align: right;
}

.cart-item {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(0, 0, 0, 0.22);
}

.cart-item-header,
.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cart-item-controls {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.cart-item-name,
.cart-item-meta,
.cart-item-quantity-label {
  margin: 0;
}

.cart-item-remove {
  padding: 0.35rem 0.55rem;
  border: 2px solid var(--color-border);
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
}

.cart-item-remove:hover,
.cart-item-remove:focus {
  background: var(--color-selected-bg);
  color: var(--color-selected-text);
  outline: none;
}

.cart-item-quantity-row {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-copy);
}

.cart-item-quantity-input {
  width: 4.75rem;
  padding: 0.3rem 0.4rem;
  border: 2px solid var(--color-border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--color-text);
  font: inherit;
}

.cart-item-quantity-input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.cart-item-meta {
  font-family: var(--font-copy);
  line-height: 1.4;
  color: var(--color-accent);
  justify-self: end;
  text-align: right;
}

.modal-points {
  display: grid;
  gap: 0.65rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.modal-actions-cart {
  width: 100%;
}

.modal-actions-cart .modal-action-checkout {
  margin-left: auto;
}

.modal-action {
  padding: 0.45rem 0.7rem;
  border: 2px solid var(--color-border);
  background: transparent;
  color: var(--color-accent);
  cursor: pointer;
}

.modal-action:hover,
.modal-action:focus,
.modal-action.selected {
  background: var(--color-selected-bg);
  color: var(--color-selected-text);
  outline: none;
}

.modal-status {
  margin: 0.85rem 0 0;
  color: var(--color-accent);
  font-family: var(--font-copy);
  line-height: 1.4;
}

.modal-status[hidden] {
  display: none;
}

.modal-point {
  display: grid;
  gap: 0.3rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
}

.modal-point-title {
  color: var(--color-accent);
  font-size: clamp(0.95rem, 2.2vmin, 1.05rem);
}

.fact-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  font-size: clamp(0.95rem, 2.1vmin, 1.15rem);
}

.fact-row {
  display: grid;
  grid-template-columns: minmax(7rem, 10rem) 1fr;
  gap: 0.75rem;
}

.fact-row dt,
.fact-row dd {
  margin: 0;
}

.fact-row a {
  color: var(--color-accent);
}

.action-list {
  margin-top: auto;
}

.site-footer {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 10001;
  max-width: calc(100vw - 20px);
  padding: 0.45rem 0.6rem;
  background: #000000;
  color: var(--color-accent);
  font-size: 12px;
}

@media (max-width: 900px) and (orientation: portrait), (max-width: 720px) {
  .screen {
    --screen-padding: clamp(0.75rem, 3vw, 1.4rem);
    align-items: stretch;
  }

  .panel {
    width: min(100%, 42rem);
    min-height: calc(100vh - (var(--screen-padding) * 2));
    min-height: calc(100svh - (var(--screen-padding) * 2));
    min-height: calc(100dvh - (var(--screen-padding) * 2));
    max-height: none;
    margin: 0 auto;
    aspect-ratio: auto;
    padding: clamp(0.85rem, 3.8vw, 1.35rem);
  }

  body[data-four-three-ratio-enabled="false"] .panel {
    width: 90vw;
    width: min(90vw, 90dvw);
    min-height: 0;
    height: 90vh;
    height: min(90vh, 90dvh);
    max-height: min(90vh, 90dvh);
  }

  .panel-layout {
    height: auto;
    min-height: 100%;
  }

  .panel-header {
    gap: 0.5rem;
  }

  .panel-toolbar {
    justify-content: flex-start;
  }

  .language-toggle {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }

  .panel-title {
    min-height: 3.25rem;
    justify-content: flex-start;
    padding-bottom: 0.2rem;
  }

  .ascii-title {
    font-size: clamp(6px, 1.75vw, 8px);
  }

  .panel-intro {
    font-size: clamp(0.95rem, 3.6vw, 1.2rem);
  }

  .panel-clock {
    width: 100%;
    text-align: left;
  }

  .menu-clock-wrap {
    justify-content: flex-start;
  }

  .menu-item {
    min-height: 2.85rem;
    font-size: clamp(1rem, 4.6vw, 1.18rem);
  }

  .menu-view,
  .content-view,
  .photography-view,
  .game-view,
  .music-view,
  .music-shell,
  .photography-shell,
  .pong-shell,
  .life-shell {
    flex: 0 0 auto;
    min-height: auto;
  }

  .menu-list,
  .content-view,
  .photography-grid,
  .life-sidebar {
    overflow: visible;
    padding-right: 0;
  }

  .fact-row {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

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

  .life-stage {
    grid-template-columns: 1fr;
  }

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

  .music-stage {
    grid-template-columns: 1fr;
  }

  .music-track-title {
    font-size: clamp(1.35rem, 6vw, 2.15rem);
  }

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

  .photography-image {
    max-height: 16rem;
  }

  .photography-meta-row {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .music-visualizer {
    min-height: 120px;
  }

  .music-controls {
    gap: 0.6rem;
  }

  .music-control {
    min-width: 6rem;
    flex: 1 1 30%;
  }

  .modal-overlay {
    padding: 0.75rem;
  }

  .site-footer {
    position: static;
    display: table;
    max-width: calc(100% - 1.5rem);
    margin: 0 auto clamp(0.75rem, 3vw, 1.4rem);
  }
}

@media (max-width: 540px) {
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .plan-card {
    min-height: auto;
  }

  .life-summary {
    grid-template-columns: 1fr;
  }

  .music-progress-row {
    gap: 0.45rem;
  }

  .music-control {
    flex-basis: calc(50% - 0.3rem);
  }
}

@media (max-width: 420px) {
  .music-progress-row {
    grid-template-columns: 1fr;
  }

  .music-time {
    min-width: 0;
  }

  .music-time:last-child {
    justify-self: end;
  }

  .game-score {
    flex-direction: column;
    align-items: flex-start;
  }

  .life-slider-header,
  .life-slider-row-head,
  .life-species-head,
  .modal-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat-shell {
    min-height: 0;
  }

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

  .life-species-badges {
    justify-content: flex-start;
  }

  .modal-actions {
    flex-direction: column;
  }

  .music-control,
  .modal-close,
  .modal-action,
  .chat-send,
  .game-link,
  .plan-prompt-button {
    width: 100%;
  }
}
