/* Mali Moore Dress-Up — play UI.
   Visual language follows the approved splash (dist/index.html): ink ground, pink /
   lime / lilac stickers, Georgia display headings, Inter body, rounded shapes, big
   friendly tap targets. Everything sits above a full-viewport 3D canvas.

   Layout rule: while the select / closet screens are open the `.game` box (canvas +
   Stage ResizeObserver) shrinks to the area the UI leaves free — top ~54% on phones,
   left of a 400px panel on desktop — so Mali is never covered by the sheet. */

:root {
  color-scheme: dark;
  --ink: #18051f;
  --ink-soft: #2b0a35;
  --ink-2: #3a1449;
  --cream: #fff9f0;
  --pink: #ff4fa3;
  --pink-hot: #ff2e8a;
  --lime: #e9ff68;
  --lilac: #c9a7ff;
  --muted: #cbbbd1;
  --dim: #8f7b99;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.26);
  --glass: rgba(24, 5, 31, 0.82);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.38);
  --sticker: 20px 20px 20px 6px;
  --font-display: Georgia, "Times New Roman", serif;
  --font-body: Inter, ui-rounded, "SF Pro Rounded", "Avenir Next", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --tap: 44px;
  --sheet-h: 46vh; /* phones: bottom sheet height */
  --panel-w: 400px; /* desktop: right panel width */
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease-pop: cubic-bezier(0.2, 0.9, 0.25, 1.25);
}

@supports (height: 1dvh) {
  :root {
    --sheet-h: 46dvh;
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
}

button:disabled {
  cursor: default;
}

:where(button, input, [tabindex]):focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ stage box */

.game {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 70% 30%, rgba(255, 79, 163, 0.22), transparent 30rem),
    radial-gradient(circle at 10% 90%, rgba(201, 167, 255, 0.12), transparent 24rem),
    var(--ink);
}

.game-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  outline: none;
  touch-action: none;
}

.game-canvas:active {
  cursor: grabbing;
}

.game-canvas:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: -6px;
}

/* the sheet / panel takes the space the canvas gives up */
@media (max-width: 767px) {
  body[data-screen="select"] .game,
  body[data-screen="closet"] .game {
    bottom: var(--sheet-h);
  }
}

@media (min-width: 768px) {
  body[data-screen="select"] .game,
  body[data-screen="closet"] .game {
    right: var(--panel-w);
  }
}

/* ------------------------------------------------------------------ boot card */

.boot {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity 400ms ease;
}

.boot.is-done {
  opacity: 0;
  pointer-events: none;
}

.boot-card {
  display: grid;
  width: min(86vw, 340px);
  justify-items: center;
  gap: 14px;
  padding: 30px 26px 26px;
  border: 1px solid var(--line);
  border-radius: 28px 28px 28px 8px;
  background: var(--ink-soft);
  box-shadow: var(--shadow);
  text-align: center;
}

.boot-card strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.boot-card small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.boot.is-error small {
  color: var(--pink);
  text-transform: none;
  letter-spacing: 0;
}

.boot-mark {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 18px 18px 18px 5px;
  background: var(--pink);
  box-shadow: 0 10px 32px rgba(255, 79, 163, 0.35);
  color: #fff;
  font-size: 1.7rem;
  font-weight: 1000;
  letter-spacing: -0.08em;
}

.boot-bar {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.boot-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--lime));
  transition: width 300ms ease;
}

/* ------------------------------------------------------------------ overlay root */

.ui {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
}

.screen {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.screen[hidden] {
  display: none !important;
}

.screen > * {
  pointer-events: auto;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  min-height: var(--tap);
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--cream);
  font-size: 0.95rem;
  font-weight: 850;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
}

.btn:active:not(:disabled) {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.45;
}

.btn-primary {
  border: 0;
  border-radius: var(--sticker);
  background: var(--pink);
  box-shadow: 0 12px 30px rgba(255, 46, 138, 0.32);
  color: #fff;
  font-weight: 950;
}

.btn-primary:hover:not(:disabled) {
  background: var(--pink-hot);
  box-shadow: 0 16px 36px rgba(255, 46, 138, 0.4);
  transform: translateY(-2px) rotate(-1deg);
}

.btn-lime {
  border: 0;
  border-radius: 14px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 950;
}

.btn-lime:hover:not(:disabled) {
  background: #f2ff8f;
}

.btn-icon {
  width: var(--tap);
  min-width: var(--tap);
  padding: 0;
  border-radius: 50%;
  font-size: 1.2rem;
}

.mute-btn {
  flex: 0 0 auto;
  font-size: 1.05rem;
}

.btn-lg {
  min-height: 56px;
  padding: 0 24px;
  font-size: 1.05rem;
}

.btn-block {
  width: 100%;
}

/* ------------------------------------------------------------------ sheet / panel */

.sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  height: var(--sheet-h);
  flex-direction: column;
  gap: 8px;
  padding: 12px 12px calc(10px + var(--safe-b));
  border-top: 1px solid var(--line-strong);
  border-radius: 26px 26px 0 0;
  background: var(--glass);
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.sheet::before {
  position: absolute;
  top: 6px;
  left: 50%;
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  content: "";
  transform: translateX(-50%);
}

@media (min-width: 768px) {
  .sheet {
    top: 0;
    left: auto;
    width: var(--panel-w);
    height: auto;
    gap: 12px;
    padding: 20px 20px calc(18px + var(--safe-b));
    border-top: 0;
    border-left: 1px solid var(--line-strong);
    border-radius: 0;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
  }

  .sheet::before {
    display: none;
  }
}

.sheet-head {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
}

.sheet-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  -webkit-overflow-scrolling: touch;
  border-radius: 14px;
}

.sheet-foot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kicker {
  margin: 0;
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
}

.star-pill {
  display: inline-flex;
  min-height: 36px;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.star-pill .star {
  font-size: 1rem;
}

/* horizontal scroll strips (venue chips, tabs) — .strip-box adds a "more to the right"
   fade + chevron while the strip overflows (kids never guess at a hidden Poses tab) */
.strip-box {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
}

.strip-box > .strip {
  flex: 1;
}

.strip-more {
  position: absolute;
  top: 0;
  right: -3px;
  bottom: 0;
  display: none;
  width: 44px;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, transparent, var(--glass) 60%);
  color: var(--lime);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

.strip-box.is-more .strip-more {
  display: flex;
}

.sheet-head .strip-box {
  flex: 1;
}

.strip {
  display: flex;
  min-width: 0;
  flex: 0 0 auto;
  gap: 6px;
  overflow: auto hidden;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  /* room for focus outlines */
  padding: 3px;
  margin: -3px;
}

.strip::-webkit-scrollbar {
  display: none;
}

.sheet-head .strip {
  flex: 1;
}

.chip {
  display: inline-flex;
  min-height: var(--tap);
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.chip::before {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--chip-accent, var(--pink));
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
  content: "";
}

.chip.is-on {
  border-color: transparent;
  background: var(--cream);
  color: var(--ink);
}

.chip.is-locked {
  color: var(--dim);
}

.chip.is-locked::before {
  background: var(--dim);
  box-shadow: none;
}

.chip small {
  font-size: 0.7rem;
  font-weight: 800;
  opacity: 0.8;
}

.tabs {
  gap: 4px;
}

@media (min-width: 768px) {
  .tabs {
    flex-wrap: wrap;
    overflow: visible;
  }
}

.tab {
  display: inline-flex;
  min-height: var(--tap);
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 850;
  transition: background 160ms ease, color 160ms ease;
}

/* a slot tab the current character has no garments for (closet.js renderTabs) */
.tab[hidden] {
  display: none;
}

.tab:hover {
  color: var(--cream);
}

.tab.is-on {
  background: var(--pink);
  color: #fff;
}

.tab-icon {
  font-size: 1rem;
  line-height: 1;
}

.tab .count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 950;
}

/* ------------------------------------------------------------------ cards */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 2px;
}

.card {
  position: relative;
  display: flex;
  min-height: 76px;
  flex-direction: column;
  gap: 6px;
  padding: 10px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 16px 16px 16px 6px;
  background: rgba(255, 255, 255, 0.06);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.card.is-on {
  border-color: var(--pink);
  background: rgba(255, 79, 163, 0.16);
  box-shadow: 0 0 0 1px var(--pink) inset;
}

.card.is-locked {
  background: rgba(255, 255, 255, 0.03);
}

.card.is-locked .card-main {
  color: var(--dim);
}

.card.is-busy {
  opacity: 0.7;
}

.card.is-busy::after {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 14px;
  height: 14px;
  border: 2px solid var(--lime);
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: spin 700ms linear infinite;
}

.card-main {
  display: flex;
  min-height: var(--tap);
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin: -10px -10px 0;
  padding: 10px 10px 4px;
  border: 0;
  border-radius: 16px 16px 0 0;
  background: transparent;
  color: var(--cream);
  text-align: left;
}

.card-main:focus-visible {
  outline-offset: -3px;
}

.card-title {
  font-size: 0.98rem;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.card-sub {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.25;
}

.card-sub.match {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  align-self: flex-start;
  padding: 1px 8px;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(233, 255, 104, 0.16);
  color: var(--lime);
}

.badge {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.is-lock {
  position: static;
  min-height: 30px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: none;
}

.badge.is-order {
  width: 28px;
  height: 28px;
  min-height: 0;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-size: 0.85rem;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.btn-mini {
  display: inline-flex;
  min-height: var(--tap);
  align-items: center;
  gap: 5px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.btn-mini:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
}

.btn-mini.is-lime {
  border-color: transparent;
  background: var(--lime);
  color: var(--ink);
}

.btn-mini:disabled {
  opacity: 0.4;
}

/* colour / pattern swatches: 44 px hit area (kid thumbs), 30 px dot, pattern = the real texture */
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 -7px -6px;
}

.swatch {
  position: relative;
  display: grid;
  width: var(--tap);
  height: var(--tap);
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.swatch::before {
  width: 30px;
  height: 30px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  content: "";
  transition: transform 140ms var(--ease-pop), border-color 140ms ease;
}

.swatch.is-pattern::before {
  background: var(--swatch-img, none) center / 180% repeat, var(--swatch);
}

.swatch:hover::before {
  transform: scale(1.1);
}

.swatch.is-on::before {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px var(--ink), 0 0 0 4px var(--lime);
  transform: scale(1.08);
}

.swatch:disabled {
  opacity: 0.35;
}

.swatch:focus-visible {
  outline-offset: -2px;
}

/* leave room for the absolute "On" / order badge */
.card.is-on .card-title {
  padding-right: 40px;
}

/* status line in the footer (a button: it jumps to the Poses tab) */
.status {
  display: flex;
  min-width: 0;
  min-height: var(--tap);
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  padding: 0 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
}

.status:hover {
  background: rgba(255, 255, 255, 0.06);
}

.status strong {
  color: var(--cream);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.status.is-ready strong {
  color: var(--lime);
}

/* ghosted Ready: looks disabled but still takes a tap (it explains itself) */
.sheet-foot .btn-primary.is-ghost {
  opacity: 0.45;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

.sheet-foot .btn-primary.is-ghost:hover {
  opacity: 0.6;
}

.sheet-foot .btn-primary {
  flex: 1;
  min-width: 0;
}

.empty {
  padding: 24px 12px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* toast */
.toast {
  position: absolute;
  top: 100px; /* over the top of the card area, never over the canvas */
  left: 50%;
  z-index: 5;
  max-width: calc(100% - 24px);
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--lime);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  color: var(--ink);
  font-size: 0.85rem;
  font-weight: 950;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 200ms ease, transform 200ms var(--ease-pop);
  pointer-events: none;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (min-width: 768px) {
  .toast {
    top: 132px;
  }
}

/* ------------------------------------------------------------------ select screen */

.select .sheet {
  gap: 12px;
}

.select-hero {
  display: grid;
  gap: 4px;
}

.select-hero .title {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
}

.select-hero .title em {
  color: var(--pink);
  font-style: italic;
}

/* one column per character: four fit a 375 px phone (74 px cards); more wrap to a new row */
.char-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(74px, 1fr));
  gap: 8px;
}

.char-card {
  position: relative;
  display: flex;
  min-height: 108px;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 18px 18px 18px 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  text-align: center;
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.char-card.is-on {
  border-color: var(--pink);
  background: rgba(255, 79, 163, 0.16);
  box-shadow: 0 0 0 1px var(--pink) inset;
}

.char-card.is-soon,
.char-card.is-locked {
  color: var(--dim);
}

.char-face {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  place-items: center;
  border: 3px solid var(--ink-soft);
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 1000;
  overflow: hidden;
  transition: border-color 160ms ease, transform 200ms var(--ease-pop);
}

.char-card.is-on .char-face {
  border-color: var(--pink);
  transform: scale(1.06);
}

/* portraits are 4:3 head-and-shoulders renders: crop to the face, a little above centre.
   A pale lilac disc behind the render so a dark-furred friend still pops off the ink card */
.char-face.is-portrait {
  background: var(--lilac);
}

.char-face.is-portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  pointer-events: none;
}

.char-card:nth-child(2) .char-face {
  background: var(--lilac);
  color: var(--ink);
}

.char-card:nth-child(3) .char-face {
  background: var(--lime);
  color: var(--ink);
}

.char-card.is-soon .char-face {
  opacity: 0.45;
  filter: grayscale(0.4);
}

.char-card.is-locked .char-face {
  filter: grayscale(0.8) brightness(0.7);
}

/* a character still downloading: dim the face, a lime bar grows along the bottom edge */
.char-card.is-busy .char-face {
  opacity: 0.55;
}

.char-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.12);
}

.char-progress::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--p, 0%);
  min-width: 8%;
  border-radius: 0 999px 999px 0;
  background: var(--lime);
  content: "";
  transition: width 200ms ease;
}

.select-note {
  margin: -4px 0 0;
  color: var(--lime);
  font-size: 0.8rem;
  font-weight: 800;
}

.char-name {
  font-size: 0.95rem;
  font-weight: 950;
  line-height: 1.1;
}

.char-blurb {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}

.char-card.is-soon .char-blurb {
  color: var(--dim);
}

.name-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.name-row label {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 850;
}

.text-input {
  min-width: 0;
  min-height: var(--tap);
  flex: 1;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  font-size: max(16px, 1rem); /* < 16px makes iOS Safari zoom the page on focus */
  font-weight: 800;
}

.text-input::placeholder {
  color: var(--dim);
  font-weight: 700;
}

.select-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.select-meta strong {
  color: var(--cream);
}

.select-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 2px;
}

@media (max-width: 767px) {
  .select .char-blurb {
    display: none;
  }

  .select .char-card {
    min-height: 0;
    padding-top: 10px;
  }

  .select .char-face {
    width: 50px;
    height: 50px;
  }

  .select .char-name {
    font-size: 0.85rem;
  }
}

/* ------------------------------------------------------------------ HUD */

.hud {
  /* the cue ring's size lives on the screen so the coach line can sit just above it */
  --cue-size: min(64vw, 250px, 38vh);
  overflow: hidden;
  font-weight: 900;
}

.tap-layer {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}

.tap-layer:focus-visible {
  outline-offset: -4px;
}

.hud-top {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.hud-top .phase {
  margin-right: auto;
}

.phase {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .hud-top {
    gap: 6px;
  }

  .hud-top .phase {
    min-width: 0;
    padding: 0 10px;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
  }

  .hud-top .score {
    padding: 0 10px;
    font-size: 1rem;
  }
}

.hud-top .btn {
  pointer-events: auto;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.phase {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--cream);
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 200ms ease;
}

.phase::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(233, 255, 104, 0.15);
  content: "";
}

.phase:empty {
  opacity: 0;
}

.score {
  display: inline-flex;
  min-height: 38px;
  align-items: baseline;
  gap: 6px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 1000;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 38px;
}

.score small {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.score.is-bump {
  animation: bump 380ms var(--ease-pop);
}

.hud-centre {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  padding-top: calc(64px + env(safe-area-inset-top, 0px));
  pointer-events: none;
}

/* one-line how-to ("Tap when the pink ring meets the yellow one!"): pinned just above the
   POSE ring stack, never over her face while she steps out */
.coach {
  position: absolute;
  right: 0;
  bottom: calc(14px + var(--safe-b) + var(--cue-size) + 84px);
  left: 0;
  width: fit-content;
  max-width: min(92vw, 420px);
  margin-inline: auto;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--lime);
  font-size: 0.85rem;
  font-weight: 900;
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: arrive 400ms var(--ease-pop) both;
}

.coach[hidden] {
  display: none;
}

/* the 3-2-1 / GO! sits on a translucent disc over her hips, well off her face (the walk
   shot frames her head in the top fifth of a portrait screen) */
.countdown {
  display: grid;
  width: clamp(120px, 32vw, 200px);
  aspect-ratio: 1;
  place-items: center;
  margin-top: 34vh;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(24, 5, 31, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-display);
  font-size: clamp(4.4rem, 20vw, 8rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 1;
  color: var(--cream);
  text-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.countdown[hidden] {
  display: none;
}

.countdown.is-pop {
  animation: count-pop 700ms var(--ease-pop) both;
}

/* bottom stack: feedback → pose name → ring + POSE button → hint */
.hud-bottom {
  position: absolute;
  right: 0;
  bottom: calc(14px + var(--safe-b));
  left: 0;
  display: grid;
  justify-items: center;
  gap: 4px;
  pointer-events: none;
}

.cue-label {
  display: grid;
  min-height: 52px;
  justify-items: center;
  align-content: center;
  gap: 2px;
  padding: 6px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(8px);
  text-align: center;
  transition: opacity 180ms ease, transform 220ms var(--ease-pop);
}

.cue-label[hidden] {
  display: none;
}

.cue-label.is-on {
  opacity: 1;
  transform: translateY(0);
}

.cue-label small {
  color: var(--lime);
  font-size: 0.7rem;
  font-weight: 950;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.cue-label strong {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 6vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.cue {
  position: relative;
  display: grid;
  width: var(--cue-size);
  aspect-ratio: 1;
  place-items: center;
}

.cue svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 180ms ease, transform 220ms var(--ease-pop);
}

.cue.is-on svg {
  opacity: 1;
  transform: scale(1);
}

.cue.is-tapped .cue-target {
  animation: ring-hit 320ms ease-out;
}

.cue-band {
  fill: none;
  stroke: rgba(233, 255, 104, 0.18);
}

.cue-target {
  fill: none;
  stroke: var(--lime);
  stroke-width: 5;
  transform-box: fill-box;
  transform-origin: center;
}

.cue-target.is-now {
  stroke-width: 8;
  filter: drop-shadow(0 0 12px rgba(233, 255, 104, 0.7));
}

.cue-ring {
  fill: none;
  stroke: var(--pink);
  stroke-width: 7;
  stroke-linecap: round;
  filter: drop-shadow(0 0 10px rgba(255, 79, 163, 0.6));
}

.feedback[hidden] {
  display: none;
}

.feedback {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  display: grid;
  justify-items: center;
  gap: 2px;
  opacity: 0;
  transform: translate(-50%, 0);
  pointer-events: none;
  text-align: center;
}

.feedback strong {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 12vw, 4.4rem);
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.9;
  color: var(--fb, var(--lime));
  text-shadow: 0 6px 0 rgba(0, 0, 0, 0.25), 0 14px 40px rgba(0, 0, 0, 0.4);
  transform: rotate(-4deg);
}

.feedback span {
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--fb, var(--lime));
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 1000;
  font-variant-numeric: tabular-nums;
}

.feedback.is-perfect,
.feedback.is-bonus {
  --fb: var(--lime);
}

.countdown.is-go {
  color: var(--lime);
  font-size: clamp(3rem, 14vw, 5.6rem);
}

.feedback.is-great {
  --fb: var(--pink);
}

.feedback.is-ok {
  --fb: var(--lilac);
}

.feedback.is-miss {
  --fb: var(--lilac);
}

.feedback.is-miss span:empty {
  display: none;
}

.feedback.is-pop {
  animation: feedback-pop 1900ms var(--ease-pop) both;
}

.pose-btn {
  position: relative;
  display: grid;
  width: 44%;
  aspect-ratio: 1;
  place-items: center;
  border: 5px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 14px 40px rgba(255, 46, 138, 0.45), 0 0 0 10px rgba(255, 79, 163, 0.16);
  color: #fff;
  font-size: clamp(0.95rem, 4vw, 1.15rem);
  font-weight: 1000;
  letter-spacing: 0.05em;
  pointer-events: auto;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  transition: transform 120ms var(--ease-pop), box-shadow 120ms ease;
}

/* dimmed while she walks (nothing to tap yet); the cue arms it */
.pose-btn:not(.is-armed) {
  opacity: 0.55;
  box-shadow: 0 8px 24px rgba(255, 46, 138, 0.25);
}

.pose-btn:active,
.pose-btn.is-down {
  transform: scale(0.92);
  box-shadow: 0 6px 20px rgba(255, 46, 138, 0.4), 0 0 0 16px rgba(255, 79, 163, 0.12);
}

.pose-btn.is-armed {
  animation: armed 900ms ease-in-out infinite alternate;
}

.hud-hint {
  color: rgba(255, 249, 240, 0.75);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* camera pop: a soft bright vignette (bright edges, Mali stays visible in the middle) */
.flash {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.75) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease-out;
}

.flash.is-on {
  opacity: 0.5;
  transition: none;
}

/* landscape (desktop too): the ring sits bottom-right so it never covers her shins */
@media (orientation: landscape) and (min-height: 521px) {
  .hud {
    --cue-size: min(30vh, 220px);
  }

  .hud-bottom {
    right: 24px;
    left: auto;
    width: min(36vw, 420px);
    bottom: calc(18px + var(--safe-b));
  }

  .coach {
    bottom: auto;
    top: calc(72px + env(safe-area-inset-top, 0px));
  }
}

/* landscape phones: the ring sits bottom-right so it never covers her */
@media (orientation: landscape) and (max-height: 520px) {
  .hud {
    --cue-size: min(38vh, 170px);
  }

  .hud-bottom {
    right: 16px;
    left: auto;
    width: 42vw;
    bottom: calc(10px + var(--safe-b));
  }

  .coach {
    bottom: auto;
    top: calc(56px + env(safe-area-inset-top, 0px));
  }

  .hud-centre {
    padding-top: calc(56px + env(safe-area-inset-top, 0px));
  }

  .countdown {
    width: clamp(90px, 24vh, 140px);
    margin-top: 6vh;
    font-size: clamp(3rem, 14vh, 5rem);
  }

  /* the verdict pops mid-screen beside her, not over the score pill */
  .feedback {
    position: fixed;
    top: 34vh;
    bottom: auto;
    left: 50%;
  }

  .feedback strong {
    font-size: clamp(2.2rem, 12vh, 3.4rem);
  }
}

/* ------------------------------------------------------------------ results */

.results {
  display: grid;
  grid-template-rows: minmax(0, 100%);
  place-items: center;
  padding: 16px 16px calc(16px + var(--safe-b));
  pointer-events: auto; /* modal: the backdrop swallows taps */
  background: rgba(10, 1, 13, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* wide screens: the card sits to the right so Mali's finale stays in view on the left */
@media (min-width: 900px) {
  .results {
    justify-items: end;
    padding-right: 6vw;
    background: linear-gradient(90deg, rgba(10, 1, 13, 0.05), rgba(10, 1, 13, 0.55) 55%);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.results-card {
  position: relative;
  display: flex;
  width: min(100%, 460px);
  /* viewport units, not %: WebKit ignores a percentage max-height on a grid item in an
     auto row, which let the card overflow under Safari's toolbar on iPhones */
  max-height: calc(100vh - 32px - var(--safe-b));
  max-height: calc(100dvh - 32px - var(--safe-b));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 28px 28px 28px 8px;
  background: var(--ink-soft);
  box-shadow: var(--shadow);
  animation: arrive 520ms var(--ease-pop) both;
}

.results-scroll {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 12px;
  overflow: hidden auto;
  overscroll-behavior: contain;
  padding: 22px 22px 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
  -webkit-overflow-scrolling: touch;
}

.results-card::after {
  position: absolute;
  z-index: -1;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(255, 79, 163, 0.16);
  content: "";
}

.results-head {
  position: relative;
  display: grid;
  gap: 4px;
}

.results-head .title {
  color: var(--pink);
  font-size: clamp(2.2rem, 9vw, 3rem);
  font-style: italic;
}

.results-head .subline {
  margin: 2px 0 0;
  color: var(--lime);
  font-size: 0.9rem;
  font-weight: 850;
}

.results-head .subline[hidden] {
  display: none;
}

.score-hero {
  display: flex;
  align-items: center;
  gap: 16px;
}

.score-big {
  display: grid;
  width: 108px;
  height: 108px;
  flex: 0 0 auto;
  place-items: center;
  border: 8px solid var(--ink);
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.25);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 2.7rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.06em;
  line-height: 1;
  transform: rotate(-6deg);
}

.score-big small {
  display: block;
  margin-top: -2px;
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.score-side {
  display: grid;
  gap: 6px;
}

.stars {
  display: flex;
  gap: 4px;
  font-size: 2rem;
  line-height: 1;
}

.stars span {
  color: rgba(255, 255, 255, 0.18);
  transition: color 200ms ease;
}

.stars span.is-lit {
  color: var(--lime);
  text-shadow: 0 0 18px rgba(233, 255, 104, 0.6);
  animation: star-pop 500ms var(--ease-pop) both;
}

.ledger {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.ledger strong {
  color: var(--cream);
}

.breakdown {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.breakdown h3 {
  margin: 4px 0 0;
  color: var(--lime);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 12px;
  align-items: center;
}

.row-label {
  font-size: 0.92rem;
  font-weight: 850;
}

.row-label small {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.row-pts {
  color: var(--cream);
  font-size: 0.92rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.row-pts small {
  color: var(--muted);
  font-weight: 800;
}

.row-bar {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.row-bar span {
  display: block;
  width: var(--w, 0%);
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--pink), var(--lime));
  transition: width 700ms ease;
}

.row.is-zero .row-pts {
  color: var(--dim);
}

.unlocks {
  display: grid;
  gap: 8px;
}

.unlock-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.unlock-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--lilac);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 950;
  animation: arrive 500ms var(--ease-pop) both;
}

.unlock-chip small {
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  opacity: 0.7;
  text-transform: uppercase;
}

.results-actions {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 12px 22px calc(18px + var(--safe-b));
  border-top: 1px solid var(--line);
  background: var(--ink-soft);
}

@media (max-width: 380px) {
  .results-actions {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------ keyframes */

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes bump {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.18);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes count-pop {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  30% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes ring-hit {
  0% {
    transform: scale(1);
    stroke-width: 5;
  }
  40% {
    transform: scale(1.12);
    stroke-width: 12;
  }
  100% {
    transform: scale(1);
    stroke-width: 5;
  }
}

@keyframes feedback-pop {
  0% {
    opacity: 0;
    transform: translate(-50%, 20px) scale(0.6);
  }
  12% {
    opacity: 1;
    transform: translate(-50%, 0) scale(1.06);
  }
  88% {
    opacity: 1;
    transform: translate(-50%, -6px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -24px) scale(0.96);
  }
}

@keyframes armed {
  from {
    box-shadow: 0 14px 40px rgba(255, 46, 138, 0.45), 0 0 0 10px rgba(255, 79, 163, 0.16);
  }
  to {
    box-shadow: 0 14px 40px rgba(255, 46, 138, 0.55), 0 0 0 20px rgba(255, 79, 163, 0.08);
  }
}

@keyframes arrive {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes star-pop {
  0% {
    transform: scale(0.3) rotate(-30deg);
  }
  60% {
    transform: scale(1.3) rotate(8deg);
  }
  100% {
    transform: scale(1) rotate(0);
  }
}

/* ------------------------------------------------------------------ reduced motion */

@media (prefers-reduced-motion: reduce) {
  .toast,
  .cue svg,
  .cue-label,
  .chip,
  .card,
  .btn,
  .swatch::before,
  .row-bar span,
  .stars span,
  .phase {
    transition: none !important;
  }

  .score.is-bump,
  .countdown.is-pop,
  .cue.is-tapped .cue-target,
  .pose-btn.is-armed,
  .results-card,
  .unlock-chip,
  .stars span.is-lit,
  .card.is-busy::after {
    animation: none !important;
  }

  .feedback.is-pop {
    animation: feedback-static 1100ms linear both;
  }

  .flash {
    display: none;
  }

  .coach {
    animation: none !important;
  }
}

@keyframes feedback-static {
  0%,
  85% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* ------------------------------------------------------------------ beta notes */

.notes-fab {
  position: absolute;
  z-index: 6;
  left: calc(12px + env(safe-area-inset-left, 0px));
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 14px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(24, 5, 31, 0.78);
  color: var(--cream);
  font: 800 0.82rem/1 Inter, system-ui, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.notes-fab span:first-child {
  font-size: 1.15rem;
}

.notes-fab:hover {
  border-color: rgba(233, 255, 104, 0.6);
}

.notes-fab[hidden] {
  display: none;
}

@media (max-width: 767px) {
  .notes-fab {
    bottom: 10px; /* .game already stops above the sheet */
  }
}

dialog.notes {
  width: min(94vw, 480px);
  max-height: calc(100vh - 32px - var(--safe-b));
  max-height: calc(100dvh - 32px - var(--safe-b));
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px 24px 24px 8px;
  background: var(--ink-soft);
  color: var(--cream);
  box-shadow: var(--shadow);
  overflow: auto;
}

dialog.notes::backdrop {
  background: rgba(10, 1, 13, 0.7);
  backdrop-filter: blur(6px);
}

.notes-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px 22px calc(20px + var(--safe-b));
}

.notes-kicker {
  margin: 0;
  color: var(--lime);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.notes-card h2 {
  margin: 0;
  font: 700 clamp(1.5rem, 5.5vw, 2rem) / 1.05 Georgia, "Times New Roman", serif;
  letter-spacing: -0.03em;
}

.notes-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.notes-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lilac);
}

.notes-field input,
.notes-field textarea {
  font: 500 max(16px, 1rem) / 1.45 Inter, system-ui, sans-serif;
  padding: 12px 14px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.25);
  color: var(--cream);
  outline: none;
  resize: vertical;
}

.notes-field input:focus,
.notes-field textarea:focus {
  border-color: var(--pink);
}

.notes-status {
  min-height: 1.2em;
  margin: 0;
  color: var(--lime);
  font-weight: 700;
}

.notes-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.notes-history {
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.notes-history h3 {
  margin: 0 0 6px;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.notes-history p {
  margin: 4px 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.notes-history time {
  color: var(--lilac);
  font-weight: 700;
}
