/* PORTRAIT_LAYOUT_PATCH_V1 */
:root {
  color-scheme: dark;
  --bg-base: #080d1c;
  --bg-deep: #111935;
  --panel: rgba(9, 16, 35, 0.54);
  --panel-border: rgba(255, 255, 255, 0.14);
  --text: #f4f7ff;
  --muted: #bfc8e8;
  --accent: #ff7ab6;
  --accent-soft: rgba(255, 122, 182, 0.2);
  --accent-2: #79f2ff;
  --good: #5df3b2;
  --bad: #ff8a8a;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-text: #172038;
  --shadow-strong: 0 24px 70px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.2);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  background:
    radial-gradient(circle at 15% 15%, rgba(121, 242, 255, 0.16), transparent 22%),
    radial-gradient(circle at 85% 15%, rgba(255, 122, 182, 0.18), transparent 24%),
    linear-gradient(180deg, var(--bg-deep), var(--bg-base));
  color: var(--text);
}

body {
  overflow-x: hidden;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

#app {
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

.site-backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 1;
  transition: opacity 220ms ease;
}

.site-backdrop.hidden {
  opacity: 0;
}

.site-backdrop-glow {
  position: absolute;
  width: min(90vmin, 980px);
  aspect-ratio: 1;
  border-radius: 48px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 24%, transparent), transparent 68%);
  filter: blur(40px);
  opacity: 0.55;
}

.site-backdrop-image {
  position: relative;
  width: clamp(260px, 48vmin, 620px);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 42px;
  border: 1px solid rgba(255,255,255,0.12);
  opacity: 0.32;
  box-shadow: 0 28px 80px rgba(0,0,0,0.34);
  filter: saturate(1.05);
}

.screen {
  position: relative;
  z-index: 1;
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: flex;
}

.shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.shell-select {
  padding: clamp(28px, 4vw, 48px) 0 42px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.hero {
  padding: clamp(26px, 4vw, 42px);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.11);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(12px);
}

.eyebrow,
.meta-label,
.label,
.micro-note,
.slot-caption,
.instruction-title {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.76rem;
  color: var(--muted);
}

.hero h1 {
  margin: 10px 0 10px;
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.05;
}

.hero-copy {
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.8;
  color: var(--muted);
}

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

.character-card {
  position: relative;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
  text-align: left;
  color: var(--text);
  overflow: hidden;
}

.character-card::before {
  content: "";
  position: absolute;
  inset: auto -10% 58% auto;
  width: 160px;
  height: 160px;
  background: radial-gradient(circle, rgba(255,255,255,0.24), transparent 65%);
  pointer-events: none;
}

.character-card:hover,
.character-card:focus-visible {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--char-accent) 62%, white 18%);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255,255,255,0.08) inset;
}

.character-card.selected {
  background: linear-gradient(180deg, color-mix(in srgb, var(--char-accent) 22%, rgba(255,255,255,0.08)), rgba(255,255,255,0.04));
  border-color: color-mix(in srgb, var(--char-accent) 75%, white 10%);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.3), 0 0 0 2px color-mix(in srgb, var(--char-accent) 55%, transparent) inset;
}

.character-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.character-avatar,
.hud-avatar,
.portrait {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 74%, white 10%), color-mix(in srgb, var(--accent-2) 82%, white 6%));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.38), 0 14px 30px rgba(0,0,0,0.25);
}

.avatar-text {
  position: relative;
  z-index: 1;
  line-height: 1;
}

.avatar-image,
.avatar-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
  background: rgba(8, 14, 26, 0.42);
}

.avatar-video {
  pointer-events: none;
}

.character-avatar {
  width: 76px;
  height: 76px;
  font-size: 2rem;
  flex: 0 0 auto;
}

.character-name {
  font-size: 1.4rem;
  font-weight: 800;
}

.character-subtitle,
.hud-subtitle,
.character-description,
.feedback-note,
.history-item-sub,
.overlay-summary {
  color: var(--muted);
}

.character-description {
  margin: 12px 0 14px;
  line-height: 1.7;
  min-height: 3.2em;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.9rem;
}

.tag::before {
  content: "✦";
  color: var(--accent-2);
  font-size: 0.8rem;
}

.instruction-box {
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.instruction-list {
  margin: 12px 0 0;
  padding-left: 1.25rem;
  line-height: 1.8;
  color: var(--muted);
}

.cta-row {
  display: flex;
  justify-content: center;
}

.primary-button,
.ghost-button {
  border: none;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 700;
  transition: transform 160ms ease, filter 160ms ease, opacity 160ms ease, background 160ms ease, color 160ms ease;
}

.primary-button:hover,
.ghost-button:hover,
.primary-button:focus-visible,
.ghost-button:focus-visible {
  transform: translateY(-2px);
}

.primary-button {
  color: #0d1327;
  min-width: 220px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 75%, white 22%), color-mix(in srgb, var(--accent-2) 80%, white 18%));
  box-shadow: 0 18px 28px rgba(0, 0, 0, 0.26);
}

.ghost-button {
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
}

.ghost-button:disabled,
.primary-button:disabled {
  opacity: 0.48;
  cursor: default;
  transform: none;
}

.shell-game {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 18px 0 calc(18px + env(safe-area-inset-bottom));
}

.hud {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.2fr) minmax(220px, 0.85fr);
  gap: 14px;
}

.hud-block,
.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.hud-block {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.hud-character {
  justify-content: flex-start;
}

.hud-center {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}

.hud-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.hud-avatar {
  width: 56px;
  height: 56px;
  font-size: 1.5rem;
}

#game-screen .hud-avatar {
  display: none;
}

#game-screen .hud-character {
  gap: 0;
}

.hud-name {
  font-weight: 800;
  font-size: 1.1rem;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(100px, 1fr));
  gap: 10px;
}

.score-box {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.07);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-box strong {
  font-size: 1.35rem;
  line-height: 1;
}

.score-box.compact strong {
  font-size: 1.1rem;
}

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

.life-bar {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.life-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--bad) 75%, white 8%), color-mix(in srgb, var(--good) 90%, white 10%));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.24), 0 0 20px color-mix(in srgb, var(--good) 25%, transparent);
  transition: width 240ms ease;
}

.life-value {
  min-width: 2ch;
  text-align: right;
}

.arena {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(360px, 1.3fr) minmax(240px, 0.82fr);
  gap: 18px;
  align-items: stretch;
}

.panel {
  padding: 18px;
}

.character-panel,
.history-panel,
.play-panel {
  min-height: 0;
}

.character-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.character-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.portrait-stage {
  display: grid;
  place-items: center;
}

.character-points {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.character-meta {
  min-width: 0;
}

.portrait {
  width: min(100%, 280px);
  aspect-ratio: 1;
  margin: 0 auto;
  font-size: clamp(4.5rem, 11vw, 6rem);
  position: relative;
  overflow: hidden;
}

.portrait::before,
.portrait::after {
  content: "";
  position: absolute;
  inset: auto;
  border-radius: 999px;
  pointer-events: none;
}

.portrait::before {
  width: 75%;
  height: 75%;
  background: radial-gradient(circle, rgba(255,255,255,0.28), transparent 65%);
  top: -10%;
  left: -10%;
}

.portrait::after {
  width: 44%;
  height: 44%;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 70%);
  bottom: -6%;
  right: -6%;
}

.character-meta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.character-points .tag-row {
  min-width: 0;
  align-items: flex-start;
}

.speech {
  min-height: 4.8em;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.07);
  line-height: 1.8;
  font-size: 1rem;
}

.feedback {
  min-height: 2.2em;
  font-weight: 700;
  color: var(--accent-2);
}

.feedback.bad {
  color: var(--bad);
}

.play-panel,
.history-panel,
.hand-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.play-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.play-head h2 {
  margin: 4px 0 0;
  font-size: 1.2rem;
}

.phase-hint {
  min-height: 1.8em;
  font-weight: 700;
  color: var(--accent-2);
}

.miss-hint-box {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 216, 147, 0.16), rgba(255,255,255,0.05));
  border: 1px solid rgba(255, 206, 120, 0.24);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.miss-hint-box.strong {
  border-color: rgba(255, 149, 121, 0.42);
  background: linear-gradient(180deg, rgba(255, 192, 129, 0.22), rgba(255,255,255,0.06));
}

.miss-hint-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

.miss-hint-title {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
  font-weight: 800;
  margin-bottom: 4px;
}

.miss-hint-summary {
  font-weight: 800;
  line-height: 1.6;
  color: #fff5e3;
}

.miss-hint-level {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.miss-hint-list {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 6px;
  color: rgba(255,255,255,0.92);
  line-height: 1.6;
}

.miss-hint-list li::marker {
  color: var(--accent-2);
}

.slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.slot {
  min-height: 168px;
  border-radius: 24px;
  border: 2px dashed rgba(255,255,255,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  display: grid;
  place-items: center;
  position: relative;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.slot.empty {
  color: rgba(255,255,255,0.24);
  font-size: 1.1rem;
  font-weight: 800;
}

.slot.active-drop {
  border-color: color-mix(in srgb, var(--accent) 65%, white 12%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 32%, transparent) inset, 0 10px 28px rgba(0,0,0,0.24);
  transform: translateY(-2px);
}

.slot.filled {
  border-style: solid;
  border-color: rgba(255,255,255,0.12);
}

.slot.locked {
  border-color: color-mix(in srgb, var(--good) 72%, white 10%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 24%, transparent) inset, 0 12px 24px rgba(0,0,0,0.22);
}

.slot.success {
  animation: successFlash 480ms ease;
}

.slot.fail {
  animation: failFlash 420ms ease;
}

.slot-card,
.hand-card {
  width: 100%;
}

.card {
  position: relative;
  padding: 18px 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(23, 32, 56, 0.12);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,249,255,0.92));
  box-shadow: 0 16px 26px rgba(6, 13, 26, 0.16), inset 0 1px 0 rgba(255,255,255,0.6);
  color: var(--card-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 136px;
  touch-action: none;
  user-select: none;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease, opacity 180ms ease;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.44), transparent 35%);
  pointer-events: none;
}

.hand-card {
  cursor: grab;
}

.hand-card:hover,
.slot-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 32px rgba(6, 13, 26, 0.2), inset 0 1px 0 rgba(255,255,255,0.7);
}

.hand-card.dragging {
  cursor: grabbing;
  z-index: 20;
  box-shadow: 0 24px 36px rgba(6, 13, 26, 0.28), 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent);
}

.card-text {
  font-size: clamp(1.15rem, 2.3vw, 1.45rem);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.03em;
  text-wrap: balance;
}

.card-sub {
  font-size: 0.76rem;
  color: #55627f;
  letter-spacing: 0.12em;
}

.card-lock,
.card-slot-number {
  position: absolute;
  top: 10px;
  right: 10px;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(23, 32, 56, 0.08);
  color: #34415f;
  font-weight: 800;
  font-size: 0.8rem;
}

.card-lock.locked {
  background: color-mix(in srgb, var(--good) 82%, white 16%);
  color: #0b3424;
}

.card-slot-number {
  left: 10px;
  right: auto;
}

.slot-card.ready {
  animation: readyPulse 1s ease-in-out infinite;
}

.slot-card.locked-card {
  box-shadow: 0 20px 34px rgba(6, 13, 26, 0.22), 0 0 0 2px color-mix(in srgb, var(--good) 30%, transparent);
}

.hand-panel {
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

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

.hand-card.deal {
  animation: dealIn 360ms cubic-bezier(0.2, 0.9, 0.22, 1) backwards;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  max-height: 100%;
}

.history-empty {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  line-height: 1.7;
}

.history-item {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.history-item-title {
  font-weight: 800;
}

.history-item-score {
  color: var(--good);
  font-weight: 900;
}

.history-item-sub {
  font-size: 0.9rem;
  line-height: 1.6;
}

.overlay {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(3, 7, 18, 0.62);
  backdrop-filter: blur(10px);
  z-index: 50;
  padding: 20px;
}

.overlay-card {
  width: min(520px, 100%);
  padding: 24px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(20, 28, 56, 0.96), rgba(12, 19, 38, 0.96));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-strong);
}

.overlay-card h2 {
  margin: 10px 0 10px;
  font-size: 1.8rem;
}

.overlay-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}

.fx-ring,
.fx-particle,
.fx-float,
.fx-trail {
  position: fixed;
  pointer-events: none;
  will-change: transform, opacity;
}

.fx-ring {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 3px solid color-mix(in srgb, var(--accent) 64%, white 18%);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 42%, transparent);
}

.fx-particle {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 84%, white 20%), color-mix(in srgb, var(--accent-2) 86%, white 18%));
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 36%, transparent);
}

.fx-float {
  font-size: 1rem;
  font-weight: 900;
  color: var(--good);
  text-shadow: 0 4px 10px rgba(0,0,0,0.28);
  white-space: nowrap;
}

.fx-float.bad {
  color: var(--bad);
}

.fx-trail {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,0.8), color-mix(in srgb, var(--accent) 64%, transparent));
  filter: blur(1px);
}

.portrait.happy {
  animation: bounceHappy 460ms cubic-bezier(0.2, 0.85, 0.2, 1.1);
}

.arena.fail {
  animation: arenaShake 420ms ease;
}

@keyframes dealIn {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes readyPulse {
  0%,
  100% {
    box-shadow: 0 18px 28px rgba(6, 13, 26, 0.18), 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }
  50% {
    box-shadow: 0 18px 28px rgba(6, 13, 26, 0.18), 0 0 0 10px color-mix(in srgb, var(--accent) 10%, transparent);
  }
}

@keyframes successFlash {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 0%, transparent); }
  35% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--good) 18%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 0%, transparent); }
}

@keyframes failFlash {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 0%, transparent); }
  35% { box-shadow: 0 0 0 12px color-mix(in srgb, var(--bad) 18%, transparent); }
  100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bad) 0%, transparent); }
}

@keyframes bounceHappy {
  0% { transform: scale(1); }
  35% { transform: scale(1.07) translateY(-4px); }
  70% { transform: scale(0.98) translateY(2px); }
  100% { transform: scale(1); }
}

@keyframes arenaShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(4px); }
}

@media (max-width: 1100px) {
  #game-screen.active .character-overview {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  #game-screen.active .portrait-stage {
    order: 0;
  }

  #game-screen.active .character-points {
    order: 1;
  }
}

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

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

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

  .history-list {
    max-height: none;
  }

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

@media (max-width: 720px) {
  .shell {
    width: min(100%, calc(100% - 18px));
  }

  .shell-game {
    gap: 14px;
    padding-top: 12px;
  }

  .panel,
  .hud-block {
    padding: 14px;
  }

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

  .score-box:first-child {
    grid-column: 1 / -1;
  }

  .play-head,
  .hud-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .slots {
    gap: 10px;
  }

  .slot {
    min-height: 128px;
  }

  .card {
    min-height: 110px;
    border-radius: 18px;
    padding: 16px 10px 12px;
  }

  .card-text {
    font-size: 1rem;
  }

  .card-lock,
  .card-slot-number {
    min-width: 28px;
    height: 28px;
    top: 8px;
    right: 8px;
    font-size: 0.68rem;
  }

  .card-slot-number {
    left: 8px;
    right: auto;
  }

  .hand-card .card-sub {
    display: none;
  }
}

@media (max-width: 520px) {
  .hand {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .card-text {
    font-size: 1.08rem;
  }

  .hand-card {
    min-height: 96px;
  }

  .hand-card .card-lock {
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    font-size: 0.58rem;
  }
}

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


/* --- Admin edition additions --- */

.hero-actions,
.toolbar,
.overlay-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.info-grid,
.admin-note-grid,
.overview-stats {
  display: grid;
  gap: 18px;
}

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

.info-panel {
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.1);
  background: linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  box-shadow: var(--shadow-soft);
}

.info-panel h2,
.info-panel h3 {
  margin: 8px 0 10px;
}

.info-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.shell-game {
  padding: 18px 0 34px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.score-sub {
  font-size: 0.85rem;
  color: var(--muted);
}

.meter-wrap,
.life-wrap {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.meter-bar,
.life-bar {
  position: relative;
  height: 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.1);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.meter-fill,
.life-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 50%;
  border-radius: inherit;
  transition: width 220ms ease, filter 220ms ease;
}

.meter-fill {
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 78%, white 8%), color-mix(in srgb, var(--accent-2) 90%, white 8%));
  box-shadow: 0 0 24px color-mix(in srgb, var(--accent) 45%, transparent);
}

.life-fill {
  background: linear-gradient(90deg, #63f2b6, #ffe470);
  box-shadow: 0 0 24px rgba(99, 242, 182, 0.35);
}

.meter-text,
.life-value {
  min-width: 72px;
  text-align: right;
}

.tag-row.small .tag {
  font-size: 0.82rem;
  padding: 6px 10px;
}

.breakdown-list {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.breakdown-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
}

.breakdown-item .value {
  font-weight: 800;
}

.breakdown-item.negative .value {
  color: var(--bad);
}

.breakdown-item.positive .value {
  color: var(--good);
}

.feedback {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  line-height: 1.6;
}

.feedback.bad {
  border-color: rgba(255, 138, 138, 0.3);
  color: #ffe4e4;
}

.history-item-score {
  font-weight: 900;
}

.hud-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}

.shell-admin {
  padding: clamp(24px, 3vw, 36px) 0 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.admin-hero {
  padding: clamp(22px, 3vw, 30px);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: var(--shadow-strong);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
}

.admin-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 10px;
  padding: 16px;
}

.admin-nav-button {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: var(--text);
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.admin-nav-button:hover,
.admin-nav-button:focus-visible {
  transform: translateX(2px);
  border-color: rgba(255,255,255,0.18);
}

.admin-nav-button.active {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,0.08)), rgba(255,255,255,0.04));
  border-color: color-mix(in srgb, var(--accent) 60%, white 12%);
}

.admin-content {
  display: grid;
  gap: 18px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.field-note {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.6;
}

.file-input {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(6, 11, 26, 0.78);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
}

.asset-preview {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.04);
  border: 1px dashed rgba(255,255,255,0.18);
  color: var(--muted);
  overflow: hidden;
}

.asset-preview.square {
  aspect-ratio: 1;
  width: min(100%, 320px);
}

.asset-preview img,
.asset-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--radius-md) - 4px);
  display: block;
}

.asset-preview .avatar-text {
  font-size: clamp(2rem, 7vw, 4rem);
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.overview-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.stat-card {
  padding: 18px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
}

.stat-card .meta-label {
  display: block;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 2rem;
}

.split-admin {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.admin-list-wrap,
.admin-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.admin-list {
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}

.admin-item {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.admin-item:hover,
.admin-item:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,0.16);
}

.admin-item.selected {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,0.08)), rgba(255,255,255,0.04));
  border-color: color-mix(in srgb, var(--accent) 68%, white 10%);
}

.admin-item-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.admin-item-sub {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

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

.form-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-field {
  display: grid;
  gap: 8px;
}

.form-field.wide {
  grid-column: 1 / -1;
}

.form-field span {
  font-size: 0.86rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.form-field input[type="text"],
.form-field input[type="number"],
.form-field input[type="color"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(6, 11, 26, 0.78);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  resize: vertical;
}

.form-field input[type="color"] {
  min-height: 48px;
  padding: 8px;
}

.form-field textarea {
  min-height: 84px;
}

.check-input {
  width: 22px;
  height: 22px;
  accent-color: var(--accent);
}

.rules-modal-body {
  display: grid;
  gap: 14px;
  text-align: left;
}

.rules-modal-body .rule-line {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  line-height: 1.65;
}

.modal-card {
  width: min(780px, calc(100% - 24px));
}

.primary-button,
.ghost-button,
.admin-nav-button,
.admin-item,
.card,
.character-card {
  touch-action: manipulation;
}

.ghost-button.danger,
.primary-button.danger {
  border-color: rgba(255, 138, 138, 0.35);
  color: #ffe0e0;
}

.overlay-card h2 {
  margin-top: 10px;
}

.fx-heart,
.fx-bad {
  position: fixed;
  pointer-events: none;
  z-index: 60;
  font-size: 1.4rem;
}

.fx-heart {
  color: var(--accent);
}

.fx-bad {
  color: var(--bad);
}

.empty-state {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(255,255,255,0.15);
  color: var(--muted);
  text-align: center;
}

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

  .admin-layout,
  .split-admin {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .overview-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .hud-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .character-grid,
  .info-grid,
  .admin-note-grid,
  .overview-stats,
  .form-grid,
  .form-grid.compact,
  .admin-sidebar {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .toolbar,
  .overlay-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .shell {
    width: min(100%, calc(100% - 20px));
  }
}



/* --- Immersive background / fullscreen tuning --- */
.site-backdrop {
  overflow: hidden;
}

.site-backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 30%),
    radial-gradient(circle at 82% 16%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 32%),
    linear-gradient(180deg, rgba(5, 10, 24, 0.34), rgba(5, 10, 24, 0.76));
}

.site-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, transparent 0, transparent 30%, rgba(4, 8, 18, 0.18) 58%, rgba(4, 8, 18, 0.52) 100%),
    linear-gradient(180deg, rgba(5, 10, 24, 0.08), rgba(5, 10, 24, 0.16));
}

.site-backdrop-glow {
  inset: -18%;
  width: auto;
  aspect-ratio: auto;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 52%),
    radial-gradient(circle at 26% 65%, color-mix(in srgb, var(--accent-2) 14%, transparent), transparent 48%);
  filter: blur(120px);
  opacity: 0.72;
}

.site-backdrop-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  border-radius: 0;
  border: 0;
  opacity: 0.54;
  box-shadow: none;
  filter: saturate(1.08) brightness(0.7) contrast(1.04);
  transform: scale(1.06);
}

#app[data-screen="select"] .site-backdrop-image {
  opacity: 0.5;
}

#app[data-screen="admin"] .site-backdrop-image {
  opacity: 0.46;
}

#app[data-screen="game"] .site-backdrop-image {
  opacity: 0.68;
  filter: saturate(1.08) brightness(0.56) contrast(1.06) blur(2px);
  transform: scale(1.1);
}

.hero,
.info-panel,
.admin-hero {
  background: linear-gradient(180deg, rgba(10, 16, 33, 0.54), rgba(10, 16, 33, 0.72));
}

.hud-block,
.panel,
.admin-sidebar {
  background: linear-gradient(180deg, rgba(8, 14, 30, 0.42), rgba(8, 14, 30, 0.68));
}

.score-box,
.speech,
.feedback,
.breakdown-item,
.admin-item,
.admin-nav-button,
.asset-preview,
.stat-card,
.rules-modal-body .rule-line {
  background: rgba(7, 12, 26, 0.46);
}

#game-screen.active {
  align-items: stretch;
}

body[data-screen="game"] {
  overflow-y: hidden;
}

#game-screen.active .shell-game {
  width: min(1440px, calc(100% - 24px));
  min-height: 100dvh;
}

@media (min-width: 1101px) {
  #game-screen.active .shell-game {
    height: 100dvh;
    padding: 12px 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 12px;
    overflow: hidden;
  }

  #game-screen.active .hud {
    gap: 12px;
  }

  #game-screen.active .hud-block {
    min-height: 0;
    padding: 12px 14px;
    gap: 12px;
  }

  #game-screen.active .hud-avatar {
    width: 52px;
    height: 52px;
  }

  #game-screen.active .hud-name {
    font-size: 1rem;
  }

  #game-screen.active .hud-subtitle {
    font-size: 0.88rem;
  }

  #game-screen.active .score-row {
    grid-template-columns: minmax(0, 1.25fr) repeat(3, minmax(82px, 0.78fr));
    gap: 8px;
  }

  #game-screen.active .score-box {
    padding: 10px 12px;
    gap: 4px;
  }

  #game-screen.active .score-box strong {
    font-size: 1.16rem;
  }

  #game-screen.active .score-box.compact strong {
    font-size: 1rem;
  }

  #game-screen.active .meter-wrap,
  #game-screen.active .life-wrap {
    margin-top: 2px;
    gap: 8px;
  }

  #game-screen.active .meter-bar,
  #game-screen.active .life-bar {
    height: 14px;
  }

  #game-screen.active .arena {
    height: 100%;
    min-height: 0;
    gap: 12px;
    grid-template-columns: minmax(232px, 0.84fr) minmax(0, 1.28fr) minmax(220px, 0.72fr);
    overflow: hidden;
  }

  #game-screen.active .panel {
    padding: 14px;
  }

  #game-screen.active .character-panel,
  #game-screen.active .play-panel,
  #game-screen.active .history-panel,
  #game-screen.active .hand-panel {
    min-height: 0;
    overflow: hidden;
  }

  #game-screen.active .character-panel {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    gap: 12px;
  }

  #game-screen.active .play-panel {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 12px;
  }

  #game-screen.active .history-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px;
  }

  #game-screen.active .hand-panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 10px;
    max-height: clamp(150px, 23dvh, 204px);
    padding-top: 12px;
  }

  #game-screen.active .character-overview {
    grid-template-columns: minmax(124px, 156px) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
  }

  #game-screen.active .portrait-stage {
    align-self: start;
    position: relative;
    z-index: 1;
  }

  #game-screen.active .portrait {
    width: clamp(128px, 12vw, 166px);
    margin: 0;
    font-size: clamp(3.4rem, 5vw, 4.6rem);
  }

  #game-screen.active .character-points {
    gap: 10px;
    align-content: start;
  }

  #game-screen.active .character-meta {
    gap: 8px;
  }

  #game-screen.active .tag {
    padding: 6px 9px;
    font-size: 0.82rem;
    gap: 6px;
  }

  #game-screen.active .speech {
    min-height: 3.6em;
    padding: 12px 14px;
    font-size: 0.94rem;
    line-height: 1.68;
  }

  #game-screen.active .feedback {
    margin-top: 0;
    padding: 12px 14px;
    font-size: 0.94rem;
    line-height: 1.58;
  }

  #game-screen.active .breakdown-list,
  #game-screen.active .history-list {
    min-height: 0;
    overflow: auto;
    padding-right: 4px;
  }

  #game-screen.active .breakdown-list {
    gap: 8px;
  }

  #game-screen.active .breakdown-item {
    padding: 9px 11px;
    gap: 8px;
  }

  #game-screen.active .play-head {
    gap: 8px;
  }

  #game-screen.active .play-head h2 {
    font-size: 1.08rem;
  }

  #game-screen.active .phase-hint,
  #game-screen.active .slot-caption,
  #game-screen.active .micro-note {
    font-size: 0.82rem;
  }

  #game-screen.active .miss-hint-box {
    gap: 8px;
    padding: 11px 12px;
    border-radius: 16px;
  }

  #game-screen.active .miss-hint-title,
  #game-screen.active .miss-hint-level {
    font-size: 0.72rem;
  }

  #game-screen.active .miss-hint-summary,
  #game-screen.active .miss-hint-list {
    font-size: 0.82rem;
    line-height: 1.52;
  }

  #game-screen.active .slots {
    gap: 12px;
    align-items: stretch;
    min-height: 0;
  }

  #game-screen.active .slot {
    min-height: clamp(114px, 17dvh, 152px);
    height: clamp(114px, 17dvh, 152px);
    border-radius: 20px;
  }

  #game-screen.active .card {
    padding: 14px 12px 12px;
    border-radius: 18px;
  }

  #game-screen.active .card-text {
    font-size: clamp(1rem, 1.42vw, 1.22rem);
  }

  #game-screen.active .card-sub {
    font-size: 0.74rem;
  }

  #game-screen.active .card-lock {
    min-width: 38px;
    height: 26px;
    padding: 0 8px;
    font-size: 0.62rem;
  }

  #game-screen.active .card-slot-number {
    min-width: 28px;
    height: 28px;
    font-size: 0.68rem;
  }

  #game-screen.active .history-item {
    padding: 12px 13px;
  }

  #game-screen.active .hand-head h2 {
    font-size: 1.02rem;
  }

  #game-screen.active .hand {
    min-height: 0;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
  }

  #game-screen.active .hand-card {
    min-height: 96px;
    padding: 12px 10px 10px;
  }

  #game-screen.active .hand-card .card-text {
    font-size: 0.98rem;
  }

  #game-screen.active .hand-card .card-sub {
    font-size: 0.7rem;
  }
}

@media (min-width: 1101px) and (max-height: 850px) {
  #game-screen.active .hud-block {
    padding: 10px 12px;
  }

  #game-screen.active .hud-avatar {
    width: 46px;
    height: 46px;
  }

  #game-screen.active .score-box {
    padding: 8px 10px;
  }

  #game-screen.active .score-box strong {
    font-size: 1.04rem;
  }

  #game-screen.active .tag {
    padding: 5px 8px;
    font-size: 0.78rem;
  }

  #game-screen.active .character-overview {
    grid-template-columns: minmax(112px, 140px) minmax(0, 1fr);
    gap: 12px;
  }

  #game-screen.active .portrait {
    width: clamp(114px, 10.6vw, 146px);
  }

  #game-screen.active .speech {
    min-height: 3em;
    padding: 10px 12px;
  }

  #game-screen.active .slot {
    min-height: clamp(104px, 14dvh, 138px);
    height: clamp(104px, 14dvh, 138px);
  }

  #game-screen.active .hand-panel {
    max-height: clamp(138px, 20dvh, 178px);
  }

  #game-screen.active .hand-card {
    min-height: 82px;
    padding: 10px 9px 9px;
  }
}

@media (max-width: 1100px) {
  body[data-screen="game"] {
    overflow-y: auto;
  }

  #game-screen.active .shell-game {
    min-height: 100dvh;
    width: min(100%, calc(100% - 20px));
  }
}


.ai-builder-head {
  margin-top: 18px;
}

.warning-panel {
  border-color: rgba(255, 157, 122, 0.3);
  background: linear-gradient(180deg, rgba(255, 161, 122, 0.08), rgba(255,255,255,0.03));
}

.ai-question-grid {
  align-items: start;
}

.ai-question-grid .form-field,
#ai-freeform-list .form-field {
  min-height: 100%;
}

.ai-status {
  margin-top: 18px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.7;
}

.ai-status.good {
  border-color: color-mix(in srgb, var(--good) 46%, transparent);
  color: var(--text);
}

.ai-status.bad {
  border-color: color-mix(in srgb, var(--bad) 56%, transparent);
  color: #ffd4d4;
}

.preview-box {
  margin-top: 14px;
  min-height: 160px;
  align-items: flex-start;
  justify-content: flex-start;
  white-space: pre-wrap;
  text-align: left;
}

.wrap-toolbar {
  flex-wrap: wrap;
}

.admin-item-sub .pill-note,
.pill-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem;
  color: var(--text);
}

.pill-note.echo {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,0.04));
}

@media (max-width: 900px) {
  .preview-box {
    min-height: 220px;
  }
}
