/* Good Morning, Good Night: all UI sizes inside #ui are in game pixels (the layer is 240×160, scaled up). */

:root {
  --ink: #2b2140;
  --ink2: #4a3d66;
  --deep: #1c1530;
  --paper: #fffaf2;
  --cream: #fff4e0;
  --pink: #ffb3c7;
  --rose: #e8678f;
  --blush: #ffd6e0;
  --mint: #a8e6cf;
  --green: #6cc49a;
  --sky: #8fb8ff;
  --night: #3b4a7a;
  --lilac: #c9b3ff;
  --purple: #8b6cc4;
  --yellow: #ffe08a;
  --gold: #f2b84b;
  --grey: #a5a3b8;
  --slate: #7d7896;
  --silver: #d8d6e6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  background: var(--ink);
  background: radial-gradient(circle at 50% 30%, var(--ink2), var(--ink) 70%);
  color: var(--cream);
  font-family: 'Pixelify Sans', ui-monospace, monospace;
  /* Pixelify's "fi" ligature looks like an "A" ("find" became "And"), so no ligatures anywhere. */
  font-variant-ligatures: none;
  font-feature-settings: 'liga' 0, 'clig' 0, 'calt' 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Pinned to the screen so iOS can't scroll or rubber-band the page. */
body { position: fixed; top: 0; left: 0; right: 0; bottom: 0; }

#app {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

#screen {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 0 0 4px var(--deep), 0 14px 40px rgba(0, 0, 0, 0.45);
  flex: none;
}

#game {
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: pixelated;
}

#ui {
  position: absolute;
  left: 0;
  top: 0;
  width: 240px;
  height: 160px;
  transform-origin: 0 0;
  -webkit-transform-origin: 0 0;
  font-size: 8px;
  line-height: 1.3;
  color: var(--ink);
}

@keyframes bob { from { transform: translateY(0); } to { transform: translateY(1.5px); } }
@keyframes blink { 50% { opacity: 0.2; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* ---------- Dialogue ---------- */

.dialogue {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 38px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 7px 8px 4px;
  box-shadow: inset 0 0 0 1.5px var(--cream), 0 2px 0 rgba(43, 33, 64, 0.25);
  z-index: 20;
}
.dialogue.hidden { display: none; }
.dialogue.narration { background: #f7f2ff; }
.dialogue .name {
  position: absolute;
  top: -7px;
  left: 6px;
  background: var(--cream);
  border: 1.5px solid var(--ink);
  border-radius: 3px;
  padding: 0 4px;
  font-size: 7px;
  font-weight: 600;
  line-height: 9px;
}
.dialogue .text { height: 21px; overflow: hidden; }
.dialogue .next {
  position: absolute;
  right: 6px;
  bottom: 2px;
  font-size: 6px;
  color: var(--rose);
  opacity: 0;
}
.dialogue .next.on { opacity: 1; animation: bob 0.5s infinite alternate; }

.choices {
  position: absolute;
  right: 4px;
  bottom: 46px;
  min-width: 64px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 3px 8px 3px 13px;
  z-index: 21;
  animation: drop 0.15s;
}
.choice { position: relative; padding: 1px 0; cursor: pointer; }
.choice.sel::before {
  content: '▶';
  position: absolute;
  left: -8px;
  top: 2.5px;
  font-size: 5.5px;
  color: var(--rose);
}

/* ---------- Toasts, fades, cards ---------- */

.toasts {
  position: absolute;
  top: 28px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 30;
  pointer-events: none;
}
.toast + .toast { margin-top: 2px; }
.toast {
  max-width: 220px;
  background: var(--ink);
  color: var(--cream);
  border: 1px solid var(--lilac);
  border-radius: 6px;
  padding: 1.5px 6px;
  font-size: 6.5px;
  text-align: center;
  transition: opacity 0.4s, transform 0.4s;
  animation: drop 0.3s;
}
.toast.quest::before { content: '★ '; color: var(--yellow); }
.toast.out { opacity: 0; transform: translateY(-4px); }

.fade {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--ink);
  opacity: 0;
  pointer-events: none;
  transition-property: opacity;
  z-index: 40;
}

.card {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: var(--ink);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.35s;
  z-index: 50;
}
.card.on { opacity: 1; }
.card-sub { font-size: 7px; color: var(--lilac); letter-spacing: 1px; }
.card-title { font-size: 15px; font-weight: 600; color: var(--pink); margin: 3px 12px 12px; text-align: center; }
.card-hint { font-size: 6px; opacity: 0; }
.card.ready .card-hint { opacity: 0.7; animation: blink 1.2s infinite; }

/* ---------- Title ---------- */

.title { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 10; text-align: center; color: var(--cream); }
.title-name {
  position: absolute;
  left: 0;
  right: 0;
  top: 12px;
  font-size: 17px;
  font-weight: 600;
  color: var(--yellow);
  text-shadow: 1px 1px 0 var(--ink);
}
.title-name.two { top: 31px; color: var(--pink); }
.title-sub { position: absolute; left: 0; right: 0; top: 54px; font-size: 7px; color: var(--lilac); }
.title-menu {
  position: absolute;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 21, 48, 0.7);
  border: 1px solid var(--lilac);
  border-radius: 4px;
  padding: 3px 10px 3px 15px;
  text-align: left;
  font-size: 8px;
}
.title-menu .choice.sel::before { color: var(--yellow); }

/* ---------- iPad menu ---------- */

.ipad {
  position: absolute;
  top: 5px;
  right: 5px;
  bottom: 5px;
  left: 5px;
  background: var(--deep);
  border-radius: 9px;
  padding: 6px 7px 3px;
  z-index: 35;
  display: flex;
  flex-direction: column;
  animation: drop 0.15s;
}
.tabs { display: flex; }
.tab + .tab { margin-left: 2px; }
.tab {
  flex: 1;
  text-align: center;
  font-size: 7px;
  padding: 1.5px 0;
  background: var(--night);
  color: var(--cream);
  border-radius: 3px 3px 0 0;
  cursor: pointer;
}
.tab.on { background: var(--paper); color: var(--ink); font-weight: 600; }
.ipad-body {
  flex: 1;
  position: relative;
  background: var(--paper);
  border-radius: 0 0 4px 4px;
  padding: 6px 8px;
  overflow: hidden;
}
.ipad-hint { font-size: 5.5px; color: var(--grey); text-align: center; margin-top: 2px; }
.ipad-h { font-size: 7px; color: var(--rose); font-weight: 600; }
.ipad-quest { font-size: 9px; margin: 2px 0 8px; }
.ipad-small { font-size: 6.5px; color: var(--slate); }
.ipad-small.right { position: absolute; right: 8px; top: 5px; }
.bag { display: flex; flex-direction: column; max-height: 76px; overflow: hidden; }
.bag-row + .bag-row { margin-top: 1px; }
.bag-row { display: flex; justify-content: space-between; padding: 0 4px; border-radius: 2px; font-size: 7.5px; cursor: pointer; }
.bag-row.sel { background: var(--blush); }
.bag-row .qty { color: var(--slate); }
.bag-desc {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 5px;
  font-size: 6.5px;
  color: var(--ink2);
  border-top: 1px dashed var(--silver);
  padding-top: 3px;
}
.album { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-top: 10px; }
.mini-polaroid {
  background: white;
  padding: 2px 2px 5px;
  box-shadow: 0 1px 2px rgba(43, 33, 64, 0.3);
  justify-self: center;
}
.mini-polaroid canvas { display: block; width: 32px; height: 24px; image-rendering: pixelated; }
.mini-polaroid.sel { outline: 1.5px solid var(--rose); }
.mini-polaroid:nth-child(odd) { transform: rotate(-2deg); }
.mini-polaroid:nth-child(even) { transform: rotate(2deg); }

/* ---------- Polaroid pop-up ---------- */

.polaroid-pop {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(28, 21, 48, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 45;
  opacity: 0;
  transition: opacity 0.3s;
}
.polaroid-pop.on { opacity: 1; }
.polaroid-head { color: var(--yellow); font-size: 9px; font-weight: 600; margin-bottom: 5px; }
.polaroid {
  width: 104px;
  background: white;
  padding: 5px 5px 4px;
  transform: rotate(-3deg);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.polaroid canvas { display: block; width: 94px; height: 70px; image-rendering: pixelated; }
.polaroid-title { font-weight: 600; font-size: 8px; text-align: center; margin-top: 3px; }
.polaroid-cap { font-size: 6px; text-align: center; color: var(--slate); }

/* ---------- Battles ---------- */

.battle { position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 15; }
.b-panel {
  position: absolute;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 2px 5px 3px;
  font-size: 7px;
  box-shadow: 0 2px 0 rgba(43, 33, 64, 0.25);
}
.b-enemy { left: 6px; top: 6px; width: 112px; }
.b-party { right: 6px; top: 61px; width: 104px; }
.b-name { font-weight: 600; font-size: 7px; }
.b-type { font-size: 5.5px; color: var(--slate); }
.b-member + .b-member { margin-top: 2px; border-top: 1px dashed var(--silver); padding-top: 1px; }
.b-member.down { opacity: 0.5; }
.b-bar { display: flex; align-items: center; font-size: 5.5px; line-height: 7px; }
.b-bar .lbl { width: 24px; color: var(--slate); }
.b-bar .track { flex: 1; margin: 0 3px; height: 3.5px; background: #ebe6f3; border-radius: 2px; overflow: hidden; }
.b-bar .fill { height: 100%; transition: width 0.45s; background: var(--green); }
.b-bar.mood .fill { background: var(--rose); }
.b-bar.calm .fill { background: var(--sky); }
.b-bar .fill.low { background: var(--gold); }
.b-bar .num { width: 20px; text-align: right; }

.b-menu {
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 4px;
  height: 38px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  padding: 3px 6px;
  display: grid;
  grid-template-columns: 54px 1fr;
  grid-template-rows: 1fr auto;
  gap: 0 6px;
  z-index: 22;
  box-shadow: inset 0 0 0 1.5px var(--cream);
}
.b-prompt { grid-row: 1 / 3; font-size: 7px; align-self: center; }
.b-grid { display: grid; gap: 0 6px; align-content: center; }
.b-opt {
  position: relative;
  padding-left: 7px;
  font-size: 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.b-opt.sel::before { content: '▶'; position: absolute; left: 0; top: 2px; font-size: 5px; color: var(--rose); }
.b-opt.off { color: var(--grey); }
.b-info { grid-column: 2; font-size: 5.5px; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-menu.tall { height: 54px; }
.quiz-mode .b-bar.calm { display: none; }
.b-menu.quiz { height: 50px; grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
.b-menu.quiz .b-prompt { grid-row: auto; font-weight: 600; align-self: start; margin-bottom: 2px; }
.b-menu.quiz .b-info { display: none; }
.b-menu.quiz .b-opt:last-child { grid-column: 1 / -1; color: var(--rose); }
.b-menu.quiz .b-opt.off:last-child { color: var(--grey); }

/* ---------- Touch controls ---------- */

#touch {
  display: none;
  width: 100%;
  max-width: 520px;
  justify-content: space-between;
  align-items: center;
  padding: 0 22px;
  margin-top: 18px;
  flex: none;
}
body.touch #touch { display: flex; }

/* Phones in landscape: D-pad on the left, screen in the middle, buttons on the right. */
body.touch.landscape #app { flex-direction: row; }
body.touch.landscape #touch { display: contents; }
body.touch.landscape .dpad { order: -1; margin-right: 20px; }
body.touch.landscape .side { order: 1; margin-left: 20px; }
@media (max-height: 500px) {
  body.touch.landscape .dpad { width: 116px; height: 116px; }
  body.touch.landscape .dpad::before { left: 38px; top: 4px; width: 40px; height: 108px; }
  body.touch.landscape .dpad::after { left: 4px; top: 38px; width: 108px; height: 40px; }
  body.touch.landscape .arrow.up, body.touch.landscape .arrow.down { left: 49px; }
  body.touch.landscape .arrow.left, body.touch.landscape .arrow.right { top: 49px; }
  body.touch.landscape .btn.round { width: 52px; height: 52px; font-size: 18px; }
  body.touch.landscape .ab .btn + .btn { margin-left: 10px; }
}

.dpad { position: relative; width: 132px; height: 132px; touch-action: none; }
.dpad::before, .dpad::after {
  content: '';
  position: absolute;
  background: var(--deep);
  border-radius: 9px;
  box-shadow: 0 4px 0 #120d20;
}
.dpad::before { left: 44px; top: 4px; width: 44px; height: 124px; }
.dpad::after { left: 4px; top: 44px; width: 124px; height: 44px; }
.arrow { position: absolute; width: 0; height: 0; border: 9px solid transparent; z-index: 1; pointer-events: none; }
.arrow.up { left: 57px; top: 14px; border-bottom-color: var(--lilac); border-top-width: 0; }
.arrow.down { left: 57px; bottom: 14px; border-top-color: var(--lilac); border-bottom-width: 0; }
.arrow.left { top: 57px; left: 14px; border-right-color: var(--lilac); border-left-width: 0; }
.arrow.right { top: 57px; right: 14px; border-left-color: var(--lilac); border-right-width: 0; }

.side { display: flex; flex-direction: column; align-items: flex-end; }
.side .ab { margin-top: 18px; }
.ab { display: flex; transform: rotate(-14deg); -webkit-transform: rotate(-14deg); margin-right: 4px; }
.ab .btn + .btn { margin-left: 14px; }
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  touch-action: none;
  cursor: pointer;
}
.btn.round {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--rose);
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 0 #a33d63;
}
.btn.round[data-btn='b'] { background: var(--purple); box-shadow: 0 4px 0 #5f4596; }
.btn.small {
  padding: 6px 16px;
  border-radius: 14px;
  background: var(--deep);
  color: var(--lilac);
  font-size: 13px;
  box-shadow: 0 3px 0 #120d20;
}
.btn.down { transform: translateY(3px); box-shadow: none !important; }

/* ---------- Extras for phones and tablets ---------- */

.title-tip {
  position: absolute;
  left: 30px;
  right: 30px;
  top: 98px;
  font-size: 5.5px;
  line-height: 1.35;
  color: var(--cream);
  opacity: 0.85;
}
.ipad-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 10px;
  background: var(--rose);
  color: white;
  border-radius: 6px;
  font-size: 8px;
  font-weight: 600;
  box-shadow: 0 2px 0 #a33d63;
  cursor: pointer;
}
.ipad-hint { cursor: pointer; }

/* ---------- Quest tracker ---------- */

.quest-hud {
  position: absolute;
  top: 4px;
  left: 4px;
  max-width: 132px;
  padding: 1.5px 5px 2px 4px;
  background: rgba(28, 21, 48, 0.78);
  border: 1px solid rgba(201, 179, 255, 0.7);
  border-radius: 5px;
  color: var(--cream);
  font-size: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  z-index: 12;
  cursor: pointer;
  transition: opacity 0.25s;
}
.quest-hud::before { content: '★ '; color: var(--yellow); }
.quest-hud.hidden { opacity: 0; pointer-events: none; }
.quest-done { margin-top: 1px; }
.quest-done-row { font-size: 6.5px; color: var(--slate); padding-left: 9px; position: relative; }
.quest-done-row::before { content: '✓'; position: absolute; left: 0; color: var(--green); }
.quest-done-row + .quest-done-row { margin-top: 1px; }

/* ---------- iPad apps ---------- */

.apps { margin-top: 2px; }
.app-row {
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid var(--silver);
  cursor: pointer;
}
.app-row + .app-row { margin-top: 4px; }
.app-row.sel { background: var(--blush); border-color: var(--rose); }
.app-name { font-size: 8px; font-weight: 600; }
.app-sub { font-size: 6px; color: var(--slate); }

/* ---------- Minigames (shared) ---------- */

.mg {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 14;
}

/* Snaps */
.snap-bar {
  position: absolute;
  top: 4px;
  left: 4px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.45);
  color: white;
  font-size: 6.5px;
}
.snap-hint {
  position: absolute;
  bottom: 6px;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  font-size: 7px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.6);
}

/* Wordle */
.wordle { color: var(--cream); }
.w-head {
  position: absolute;
  top: 3px;
  left: 6px;
  right: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 7px;
}
.w-title { font-weight: 600; color: var(--yellow); }
.w-close { color: var(--lilac); cursor: pointer; }
.w-grid { position: absolute; top: 14px; left: 0; right: 0; }
.w-row { display: flex; justify-content: center; margin-bottom: 2px; }
/* A plain bold font for Wordle letters: in the pixel font Z looks like 2 and B like 8. */
.w-tile, .w-key, .w-close {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
}
.w-tile {
  width: 13px;
  height: 13px;
  margin: 0 1px;
  border: 1px solid var(--ink2);
  border-radius: 2px;
  font-size: 9px;
  font-weight: 600;
  line-height: 11px;
  text-align: center;
  color: white;
}
.w-tile.typed { border-color: var(--grey); }
.w-tile.filled { border-color: transparent; }
.w-tile.g, .w-key.g, .w-sq.g { background: #5aa469; }
.w-tile.y, .w-key.y, .w-sq.y { background: #d4a72c; }
.w-tile.x, .w-key.x, .w-sq.x { background: #4a4560; }
@keyframes wflip { 0% { transform: scaleY(1); } 50% { transform: scaleY(0.05); } 100% { transform: scaleY(1); } }
.w-tile.flip { animation: wflip 0.25s ease both; }
.w-keys { position: absolute; top: 106px; left: 0; right: 0; }
.w-krow { display: flex; justify-content: center; margin-bottom: 2px; }
.w-key {
  min-width: 18px;
  height: 13px;
  margin: 0 1px;
  padding: 0 2px;
  border-radius: 2px;
  background: var(--ink2);
  color: white;
  font-size: 7px;
  line-height: 13px;
  text-align: center;
  cursor: pointer;
}
.w-key.wide { min-width: 28px; font-size: 6px; }
.w-msg {
  position: absolute;
  top: 46px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--cream);
  color: var(--ink);
  font-size: 7px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
.w-msg.on { opacity: 1; }
.w-result {
  position: absolute;
  top: 16px;
  left: 30px;
  right: 30px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #313338;
  color: #dbdee1;
  font-size: 7px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  z-index: 3;
}
.w-chan { color: #949ba4; font-weight: 600; margin-bottom: 3px; }
.w-lines { display: flex; justify-content: space-around; }
.w-who { font-weight: 600; margin-bottom: 2px; text-align: center; }
.w-line.me .w-who { color: var(--mint); }
.w-line.her .w-who { color: var(--pink); }
.w-sqrow { display: flex; justify-content: center; }
.w-sq { width: 6px; height: 6px; margin: 0.5px; border-radius: 1px; }
.w-banter { margin-top: 4px; color: var(--pink); }
.w-next { margin-top: 3px; font-size: 6px; color: #949ba4; text-align: right; }

/* White Monster race */
.race-hud {
  position: absolute;
  bottom: 3px;
  left: 4px;
  padding: 1px 6px;
  border-radius: 5px;
  background: rgba(28, 21, 48, 0.8);
  color: var(--cream);
  font-size: 6.5px;
}
.race-big {
  position: absolute;
  top: 58px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--yellow);
  text-shadow: 2px 2px 0 var(--ink);
  pointer-events: none;
}

/* Dance */
.dance-hud {
  position: absolute;
  top: 3px;
  left: 4px;
  right: 4px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--cream);
  font-size: 7px;
}
.dance-name { font-weight: 600; color: var(--yellow); text-shadow: 1px 1px 0 var(--ink); }
.dance-beats span {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin: 0 1px;
  border-radius: 50%;
  background: rgba(28, 21, 48, 0.7);
  text-align: center;
  line-height: 11px;
  font-size: 7px;
}
.dance-beats span.on { background: var(--rose); color: white; transform: scale(1.2); }
.dance-combo { min-width: 40px; text-align: right; color: var(--pink); text-shadow: 1px 1px 0 var(--ink); }
.dance-intro, .dance-result {
  position: absolute;
  top: 34px;
  left: 40px;
  right: 40px;
  padding: 6px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink);
  font-size: 7px;
  text-align: center;
}
.dance-intro-t { font-size: 11px; font-weight: 600; color: var(--rose); margin-bottom: 2px; }
.dance-intro-a { margin-top: 4px; font-size: 6px; color: var(--slate); }
.dance-grade { font-size: 22px; font-weight: 600; color: var(--rose); line-height: 1; }
.dance-lia { margin-top: 3px; color: var(--purple); }

/* ---------- Phone chat ---------- */

.chat-phone {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 50px;
  width: 140px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.35);
}
.chat-head {
  display: flex;
  align-items: center;
  padding: 3px 5px;
  border-bottom: 1px solid var(--silver);
  background: var(--cream);
}
.chat-av {
  width: 12px;
  height: 12px;
  margin-right: 3px;
  border-radius: 50%;
  background: var(--blush);
  image-rendering: pixelated;
}
.chat-name { font-size: 8px; font-weight: 600; }
.chat-app { margin-left: auto; font-size: 5px; color: var(--slate); }
.chat-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  padding: 2px 4px 3px;
}
.chat-msg {
  max-width: 84%;
  margin-top: 2px;
  padding: 2px 4px;
  border-radius: 5px;
  font-size: 6.5px;
  line-height: 1.25;
  animation: drop 0.15s;
}
.chat-msg.them { align-self: flex-start; background: #efe8fa; border-bottom-left-radius: 1px; }
.chat-msg.me { align-self: flex-end; background: var(--mint); border-bottom-right-radius: 1px; }
.chat-from { font-size: 5px; font-weight: 600; color: var(--rose); }
.chat-msg canvas { display: block; width: 60px; height: 45px; border-radius: 3px; image-rendering: pixelated; }
.chat-msg.photo .chat-text { margin-top: 1px; }
.chat-note { align-self: center; margin: 3px 0 1px; font-size: 5px; color: var(--slate); }
@keyframes typingdot { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
.chat-msg.typing .dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin: 1px 1px 0;
  border-radius: 50%;
  background: var(--slate);
  animation: typingdot 1s infinite;
}
.chat-msg.typing .dot:nth-child(2) { animation-delay: 0.15s; }
.chat-msg.typing .dot:nth-child(3) { animation-delay: 0.3s; }
.chat-opts { padding: 0 4px; }
.chat-opts:not(:empty) { padding-bottom: 3px; border-top: 1px dashed var(--silver); }
.chat-opt {
  margin-top: 2px;
  padding: 2px 4px;
  border: 1px solid var(--silver);
  border-radius: 4px;
  font-size: 6.5px;
  cursor: pointer;
}
.chat-opt.sel { background: var(--blush); border-color: var(--rose); }
.chat-hint { font-size: 5px; color: var(--slate); text-align: center; height: 0; overflow: hidden; }
.chat-hint.on { height: 8px; animation: blink 1.4s infinite; }
