/* ================================================================
   CARROT MERGE - Page styles  v1.0.11
================================================================ */

:root {
  --mp-bg:        #1a0f09;
  --mp-surface:   rgba(255,230,180,0.07);
  --mp-border:    rgba(255,210,140,0.18);
  --mp-cream:     #F5EDD8;
  --mp-caramel:   #c97a35;
  --mp-muted:     rgba(245,237,216,0.50);
  --mp-topbar-h:  64px;
  --gap:          10px;
  --pad:          12px;
  --tr:           10px;
  --r:            16px;
}
@media (min-width:480px) { :root { --mp-topbar-h: 72px; } }
@media (min-width:600px) { :root { --mp-topbar-h: 76px; } }

.mp-body {
  background: var(--mp-bg);
  background-image: linear-gradient(rgba(10,5,2,0.60),rgba(10,5,2,0.60)),url('images/game-wallpaper.webp');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--mp-cream);
}
@supports (-webkit-touch-callout:none) {
  .mp-body { background-attachment: scroll; }
}
/* nav injected via nav.js */
.mp-body #cp-footer-placeholder { display: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ================================================================
   AMBIENT BACKGROUND
================================================================ */
.pw-bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
}
.pw-bg-glow {
  position: absolute; border-radius: 50%;
  filter: blur(40px); opacity: 0.18; will-change: transform;
}
.pw-bg-glow--a {
  width: 500px; height: 400px; top: -100px; left: -100px;
  background: radial-gradient(ellipse, #c97a35 0%, transparent 70%);
  animation: glowDrift 14s ease-in-out infinite alternate;
}
.pw-bg-glow--b {
  width: 400px; height: 300px; bottom: 80px; right: -80px;
  background: radial-gradient(ellipse, #8B5E3C 0%, transparent 70%);
  animation: glowDrift 18s ease-in-out infinite alternate-reverse;
}
.pw-bg-glow--c {
  width: 300px; height: 200px; top: 38%; left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, #7A5030 0%, transparent 70%);
  opacity: 0.10;
  animation: glowDriftC 23s ease-in-out infinite alternate;
}
@keyframes glowDrift {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(40px,30px) scale(1.1); }
}
@keyframes glowDriftC {
  0%   { transform: translateX(-50%) translate(0,0) scale(1); }
  100% { transform: translateX(-50%) translate(40px,30px) scale(1.1); }
}
@media (prefers-reduced-motion:reduce) {
  .pw-bg-glow { animation: none; }
}


.mp-paw-trail {
  position: absolute; pointer-events: none; object-fit: contain;
  opacity: 0;
  transform: scale(0) rotate(var(--rot, 0deg));
  animation: pawTrail 3.2s ease-out forwards;
}
@keyframes pawTrail {
  0%   { opacity: 0;    transform: scale(0)   rotate(var(--rot, 0deg)); }
  15%  { opacity: 0.14; transform: scale(1)   rotate(var(--rot, 0deg)); }
  75%  { opacity: 0.09; transform: scale(1)   rotate(var(--rot, 0deg)); }
  100% { opacity: 0;    transform: scale(1.1) rotate(var(--rot, 0deg)); }
}


/* ── Paw trail container ── */
#mp-bg {
  position: fixed; inset: 0;
  pointer-events: none; overflow: hidden; z-index: 0;
}

/* ================================================================
   TOPBAR
================================================================ */
.pw-topbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(26,15,9,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--mp-border);
  height: var(--mp-topbar-h);
}
.pw-topbar-inner {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 12px 6px;
  max-width: 520px; margin: 0 auto;
  height: 100%;
}
.pw-topbar-title {
  display: flex; flex-direction: column; align-items: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(22px, 5.5vw, 38px);
  font-weight: 400; color: #f2e8d0;
  letter-spacing: 0;
  text-shadow: 0 2px 20px rgba(0,0,0,0.7);
  min-width: 0; overflow: hidden;
}
.pw-topbar-em {
  font-style: italic; color: #c97a35;
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.pw-topbar-left  { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pw-topbar-right { display: flex; gap: 4px; flex-shrink: 0; }
.pw-home-logo {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; opacity: 0.70;
  transition: opacity 0.2s; text-decoration: none; flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.pw-home-logo:hover { opacity: 0.95; }
.pw-home-logo img  { display: block; width: 32px; height: 32px; }
/* ================================================================
   MAIN CONTENT
================================================================ */
.mp-main {
  position: relative; z-index: 1;
  padding-top: calc(var(--mp-topbar-h) + 14px);
  padding-bottom: max(40px, env(safe-area-inset-bottom, 40px));
  display: flex; flex-direction: column;
  align-items: center; gap: 12px;
  max-width: 480px; margin: 0 auto;
  padding-left: 14px; padding-right: 14px;
}

@media (min-width: 768px) {
  .mp-main { padding-top: calc(var(--mp-topbar-h) + 48px); }
}

/* ── Score bar - centred ── */
.mp-scorebar {
  width: 100%;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.mp-sbox {
  background: var(--mp-surface);
  border: 1px solid var(--mp-border);
  border-radius: 14px;
  padding: 8px 16px;
  text-align: center;
  min-width: 90px;
  box-shadow: 0 2px 10px rgba(90,45,5,.14), inset 0 1px 0 rgba(255,255,255,.06);
}
.mp-slbl {
  font-size: .58rem; text-transform: uppercase;
  letter-spacing: 1.8px; color: var(--mp-muted); font-weight: 700;
}
.mp-sval {
  font-family: 'Bree Serif', Georgia, serif;
  font-size: 1.2rem; font-weight: 900;
  letter-spacing: -.5px; color: var(--mp-cream);
}
.mp-sval.pop { animation: cmValPop .28s ease; }
@keyframes cmValPop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.35); color: var(--mp-caramel); }
  100% { transform: scale(1); }
}

/* ================================================================
   BOARD
================================================================ */
.mp-board-wrap { width: 100%; }

#board {
  width: 100%; aspect-ratio: 1/1;
  background: linear-gradient(148deg, #8B5E3C 0%, #6B3E20 100%);
  border-radius: 22px; position: relative;
  box-shadow:
    0 10px 42px rgba(80,40,5,.32),
    0 3px 10px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.10);
  user-select: none; touch-action: none;
  isolation: isolate;
  transition: background .3s;
}
#board::after {
  content: ''; position: absolute; inset: 0; border-radius: 22px;
  background: repeating-linear-gradient(
    89deg,
    transparent 0, transparent 13px,
    rgba(255,255,255,.015) 13px, rgba(255,255,255,.015) 14px
  );
  pointer-events: none; z-index: 0;
}

.gcells, #tl {
  position: absolute;
  top: var(--pad); right: var(--pad);
  bottom: var(--pad); left: var(--pad);
}
.gcells {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: var(--gap); z-index: 1;
}
.gcell {
  background: rgba(0,0,0,.18);
  border-radius: var(--tr);
  box-shadow: inset 0 2px 5px rgba(0,0,0,.14);
}
#tl { z-index: 2; }

/* ================================================================
   TILES
================================================================ */
.tile {
  position: absolute;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  border-radius: var(--tr); font-weight: 900;
  transition: transform .12s cubic-bezier(.25,.46,.45,.94);
  will-change: transform; z-index: 2;
  box-shadow:
    0 4px 10px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -1px 0 rgba(0,0,0,.08);
}
.te, .tn { pointer-events: none; line-height: 1; }
.tn { font-family: 'DM Sans', system-ui, sans-serif; font-weight: 700; }

.t2    { background: #F5EDD8; color: #4a2c0a; }
.t4    { background: #486CA0; color: #fff; }
.t8    { background: #509458; color: #fff; }
.t16   { background: #694894; color: #fff; }
.t32   { background: #B48A14; color: #fff; }
.t64   { background: #B06050; color: #fff; }
.t128  { background: #8B5E3C; color: #fff; }
.t256  { background: #C96820; color: #fff; }
.t512  { background: #4A2510; color: #F5EDD8; }
.t1024 { background: #7A1825; color: #F5EDD8; }
.t2048 {
  background: linear-gradient(135deg, #E8C44A, #c97a35);
  color: #fff;
  box-shadow:
    0 0 24px rgba(232,196,74,.45), 0 4px 10px rgba(0,0,0,.3),
    inset 0 1px 0 rgba(255,255,255,.5);
  animation: cmGoldPulse 1.6s ease-in-out infinite;
}
@keyframes cmGoldPulse {
  0%,100% { box-shadow: 0 0 18px rgba(232,196,74,.35), 0 4px 10px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.5); }
  50%     { box-shadow: 0 0 40px rgba(232,196,74,.70), 0 4px 10px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.5); }
}
@media (prefers-reduced-motion:reduce) { .t2048 { animation: none; } }

#board.board-won {
  box-shadow:
    0 0 0 3px rgba(232,196,74,0.55),
    0 10px 42px rgba(80,40,5,.32),
    0 3px 10px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.10);
  transition: box-shadow .4s ease;
}

@keyframes spawnAnim {
  0%   { transform: var(--pos) scale(0);    opacity: 0; }
  62%  { transform: var(--pos) scale(1.16); opacity: 1; }
  100% { transform: var(--pos) scale(1); }
}
.tile-new { animation: spawnAnim .22s cubic-bezier(.2,.8,.3,1.1) forwards; }

@keyframes popAnim {
  0%   { transform: var(--pos) scale(1); }
  35%  { transform: var(--pos) scale(1.2); }
  70%  { transform: var(--pos) scale(.96); }
  100% { transform: var(--pos) scale(1); }
}
.tile-pop { animation: popAnim .22s ease forwards; }

.prt {
  position: fixed; border-radius: 50%;
  pointer-events: none; z-index: 500; margin: 0;
  animation: prtBurst var(--d,.5s) ease-out forwards;
}
@keyframes prtBurst {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--px),var(--py)) scale(0); opacity: 0; }
}

.sfloat {
  position: fixed; font-size: .95rem; font-weight: 900;
  color: var(--mp-caramel);
  pointer-events: none; z-index: 300;
  text-shadow: 0 1px 3px rgba(0,0,0,.2);
  animation: sfAnim .9s ease-out forwards;
}
@keyframes sfAnim {
  0%   { transform: translateY(0) scale(1);    opacity: 1; }
  100% { transform: translateY(-56px) scale(.8); opacity: 0; }
}

/* ================================================================
   TOAST - top position, consistent with Paw Words + Connect Paws
================================================================ */
#mp-toast {
  position: fixed;
  top: calc(var(--mp-topbar-h) + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  opacity: 0;
  background: linear-gradient(135deg, rgba(255,200,100,.95), rgba(200,130,50,.95));
  color: #2c1a0a;
  border-radius: 22px; padding: 11px 22px;
  font-size: .83rem; font-weight: 700;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  z-index: 700;
  transition: transform .28s cubic-bezier(.2,.8,.3,1.1), opacity .22s;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
  max-width: calc(100vw - 40px);
  backdrop-filter: blur(6px);
}
#mp-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ================================================================
   MODALS
================================================================ */
.mp-overlay {
  display: none; position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,.60); backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center; padding: 20px;
}
.mp-overlay.open { display: flex; }
.mp-modal {
  background: linear-gradient(160deg, #2e1a0c, #1e1008);
  border: 1.5px solid rgba(255,210,140,0.22);
  border-radius: 24px; padding: 28px 24px 22px;
  text-align: center; max-width: 320px; width: 100%;
  box-shadow: 0 24px 64px rgba(0,0,0,.45);
  animation: cmModalPop .3s cubic-bezier(.2,.8,.3,1.1);
}
@keyframes cmModalPop {
  0%   { transform: scale(.72); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}
.mp-mico { font-size: 3.2rem; margin-bottom: 10px; }
.mp-mico img { display: block; margin: 0 auto; object-fit: contain; }
.mp-mtit {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem; font-weight: 400;
  color: var(--mp-cream); letter-spacing: -.5px; margin-bottom: 10px;
}

/* Character row in modals */
.mp-char-row {
  display: flex; align-items: flex-end; gap: 10px;
  justify-content: center; margin: 0 0 10px;
}
.mp-char-row:empty { display: none; margin: 0; }
.mp-char-img {
  width: 58px; height: 58px; object-fit: contain; flex-shrink: 0;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.45));
}
.mp-char-bubble {
  background: rgba(255,210,140,0.07);
  border: 1px solid var(--mp-border);
  border-radius: 14px 14px 14px 4px;
  padding: 8px 12px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: .88rem; font-style: italic;
  color: var(--mp-cream); line-height: 1.4;
  text-align: left; max-width: 190px;
}
.mp-char-bubble strong {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: .6rem; font-style: normal;
  font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mp-caramel);
  margin-bottom: 2px;
}

.mp-msub {
  font-size: .85rem; color: var(--mp-muted);
  line-height: 1.55; margin-bottom: 12px;
}
.mp-mscr {
  font-size: 1.25rem; font-weight: 900;
  color: var(--mp-caramel); margin-bottom: 16px;
}
.mp-mbtns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.mp-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 10px 16px; border: none; border-radius: 12px;
  font-size: .8rem; font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer; white-space: nowrap;
  transition: transform .12s, box-shadow .12s;
  -webkit-tap-highlight-color: transparent;
}
.mp-btn-a {
  background: linear-gradient(135deg, #c97a35, #8B5E3C);
  color: #fff;
  box-shadow: 0 4px 14px rgba(201,122,53,.3);
}
.mp-btn-a:hover  { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(201,122,53,.42); }
.mp-btn-a:active { transform: translateY(0); }
.mp-btn-b {
  background: rgba(255,230,180,0.08);
  color: var(--mp-cream);
  border: 1px solid var(--mp-border);
}
.mp-btn-b:hover  { transform: translateY(-2px); background: rgba(255,230,180,0.14); }
.mp-btn-b:active { transform: translateY(0); }

/* Cross-promo links in modals */
.mp-xpromo {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid rgba(255,210,140,0.12);
}
.mp-xlink {
  font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  color: var(--mp-caramel); text-decoration: none;
  padding: 5px 12px;
  border: 1px solid rgba(201,122,53,0.28);
  border-radius: 12px;
  transition: background .18s;
}
.mp-xlink:hover { background: rgba(201,122,53,0.12); }

/* ================================================================
   HOW TO PLAY PANEL
================================================================ */
.pw-overlay {
  position: fixed; inset: 0; z-index: 800;
  display: flex; align-items: center; justify-content: center;
  background: rgba(14,8,3,0.82);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 20px;
  animation: overlayIn .22s ease;
}
.pw-overlay[hidden] { display: none; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }

.pw-panel {
  background: linear-gradient(160deg, #2e1a0c, #1e1008);
  border: 1.5px solid rgba(255,210,140,0.22);
  border-radius: 24px; padding: 22px 18px 20px;
  width: 100%; max-width: 380px; position: relative;
  max-height: 90vh; max-height: 90dvh;
  overflow-y: auto; overscroll-behavior: contain;
  animation: panelUp .28s cubic-bezier(0.34,1.4,0.64,1);
}
@keyframes panelUp {
  from { transform: translateY(30px) scale(0.97); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}
.pw-panel-close {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: none;
  color: var(--mp-muted); font-size: 14px;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: color 0.2s;
}
.pw-panel-close::before {
  content: ''; position: absolute;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,210,140,0.1);
  border: 1px solid rgba(255,210,140,0.2);
  transition: background 0.2s;
}
.pw-panel-close:hover::before { background: rgba(255,210,140,0.2); }
.pw-panel-close:hover { color: var(--mp-cream); }
.pw-panel-close span { position: relative; z-index: 1; }
.pw-panel-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px; color: var(--mp-cream);
  margin-bottom: 6px; text-align: center;
}
.pw-panel-sub {
  font-size: 13px; color: var(--mp-muted);
  text-align: center; margin-bottom: 18px;
}
.mp-tile-guide {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-bottom: 18px;
}
.mp-tile-pip {
  display: flex; flex-direction: column;
  align-items: center; gap: 4px;
  font-size: .62rem; font-weight: 700;
  color: var(--mp-muted); letter-spacing: .03em;
}
.mp-tile-swatch {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 3px 8px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.22);
}
.pw-how-rules {
  background: rgba(255,210,140,0.06);
  border: 1px solid rgba(255,210,140,0.12);
  border-radius: 14px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 7px;
}
.pw-how-rules p {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; color: var(--mp-muted); line-height: 1.5;
}
.pw-how-rules p strong { color: var(--mp-cream); }

/* ================================================================
   RESPONSIVE
================================================================ */
@media (max-width:400px) {
  .mp-main { padding-left: 10px; padding-right: 10px; gap: 9px; }
  :root    { --gap: 7px; --pad: 9px; }
  .mp-sval { font-size: 1.05rem; }
  .mp-sbox { min-width: 68px; padding: 7px 12px; }
}
@media (prefers-reduced-motion:reduce) {
  .pw-overlay { animation: none; }
  .pw-panel   { animation: none; }
  .mp-modal   { animation: none; }
}

/* ── Leaderboard + submit modal ───────────────────────── */
.mp-modal--lb{max-width:440px}
.mp-lb-month{font-family:'DM Sans',sans-serif;font-size:.72rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase;color:#E8801C;text-align:center;margin:-6px 0 14px}
.mp-lb-list{display:flex;flex-direction:column;gap:8px;max-height:52vh;overflow-y:auto;margin:0 0 14px;text-align:left}
.mp-lb-loading{padding:24px 8px;text-align:center;color:rgba(245,237,216,.6);font-family:'DM Sans',sans-serif;font-size:.9rem}
.mp-lb-row{display:flex;align-items:center;gap:12px;padding:10px 14px;border-radius:12px;background:rgba(255,210,140,.05);border:1px solid rgba(255,210,140,.12)}
.mp-lb-row--top3{position:relative;display:flex;align-items:center;gap:12px;min-height:72px;padding:12px 18px;border-radius:28px;border:1px solid rgba(199,140,73,.45);background:linear-gradient(135deg,rgba(120,58,18,.28),rgba(49,22,6,.48));overflow:hidden}
.mp-lb-row--top3::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at center,rgba(255,255,255,.045),transparent 62%);pointer-events:none}
.mp-lb-row--me{background:rgba(201,122,53,.14);border-color:rgba(201,122,53,.45)}
.mp-lb-row--top3.mp-lb-row--me{border-color:rgba(201,122,53,.75);box-shadow:0 0 0 1px rgba(201,122,53,.35),inset 0 0 24px rgba(201,122,53,.08)}
.mp-lb-medal{position:relative;z-index:2;font-size:30px;width:40px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.mp-lb-rank{position:relative;z-index:2;width:28px;text-align:center;flex-shrink:0;font-family:'DM Sans',sans-serif;font-weight:700;color:rgba(245,237,216,.5)}
.mp-lb-av-wrap{position:relative;z-index:2;width:52px;height:52px;border-radius:50%;flex-shrink:0;padding:3px;background:linear-gradient(135deg,#dfc08f,#7a4b1f);overflow:hidden}
.mp-lb-av{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}
.mp-lb-av--blank{display:block;width:100%;height:100%;border-radius:50%;background:rgba(26,15,9,.5);border:1px solid rgba(245,237,216,.12)}
.mp-lb-name{position:relative;z-index:2;flex:1;min-width:0;font-family:'DM Sans',sans-serif;font-weight:700;font-size:1.05rem;color:#F5EDD8;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mp-lb-pts{position:relative;z-index:2;flex-shrink:0;font-family:'Cormorant Garamond',Georgia,serif;font-weight:700;font-size:1.1rem;color:#f3c84e;white-space:nowrap;margin-left:auto}
.mp-lb-rest{display:flex;flex-direction:column;gap:6px;margin-top:6px}
.mp-lb-note{font-family:'DM Sans',sans-serif;font-size:.74rem;color:rgba(245,237,216,.45);text-align:center;margin:4px 0 0;line-height:1.5}
.mp-name-input{width:100%;box-sizing:border-box;padding:13px 16px;margin:6px 0 4px;border-radius:12px;border:1.5px solid rgba(245,237,216,.25);background:rgba(26,15,9,.4);color:#F5EDD8;font-family:'DM Sans',sans-serif;font-size:1rem;outline:none;text-align:center}
.mp-name-input:focus{border-color:#E8801C;box-shadow:0 0 0 4px rgba(232,128,28,.18)}

/* ================================================================
   LIGHT MODE
================================================================ */
/* ── wallpaper & body (was .light .mp-body - BUG: light is ON body, not parent) ── */
.mp-body.light {
  background: #f7f0e0 url('images/game-wallpaper.webp') center center / cover no-repeat;
}
@supports (-webkit-touch-callout: none) {
  .mp-body.light { background-attachment: scroll; }
}

/* ── board ── */
.light #board {
  background: linear-gradient(148deg, #c9a87c 0%, #b08050 100%);
  box-shadow: 0 10px 42px rgba(80,40,5,.16), 0 3px 10px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.20);
}
.light .gcell {
  background: rgba(26,15,9,0.10);
  box-shadow: inset 0 2px 5px rgba(26,15,9,0.08);
}

/* ── score boxes ── */
.light .mp-sbox {
  background: rgba(255,255,255,0.65);
  border-color: rgba(26,15,9,0.13);
  box-shadow: 0 2px 10px rgba(26,15,9,0.07), inset 0 1px 0 rgba(255,255,255,.55);
}
.light .mp-slbl { color: rgba(26,15,9,0.48); }
.light .mp-sval { color: #1a0f09; }

/* ── topbar ── */
.light .pw-topbar {
  background: rgba(247,240,224,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(26,15,9,0.10);
  box-shadow: 0 1px 12px rgba(26,15,9,0.06);
}
.light .pw-home-logo { opacity: 0.75; }
.light .pw-home-logo img { filter: brightness(0) opacity(0.65); }
.light .pw-topbar-title { color: #1a0f09; text-shadow: none; }
.light .pw-topbar-em { color: #a85e1a; }
/* ── glow layers off ── */
.light .pw-bg-glow--a, .light .pw-bg-glow--b, .light .pw-bg-glow--c { opacity: 0; }

/* ── panels & overlays ── */
.light .pw-panel {
  background: linear-gradient(160deg,#fdf5e4,#f5edd8);
  border-color: rgba(26,15,9,0.12);
}
.light .pw-overlay { background: rgba(245,237,216,0.90); backdrop-filter: blur(8px); }
.light #mp-toast { background: rgba(26,15,9,0.92); color: #F5EDD8; }

/* v1.5.157 leaderboard clean-up */
.mp-modal--lb{
  width:min(92vw,520px);
  max-width:520px;
  padding:34px 26px 24px;
}
.mp-modal--lb .mp-mtit{
  font-size:clamp(2.2rem,6vw,3.1rem);
  margin-bottom:8px;
}
.mp-modal--lb .mp-lb-list.lb-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  max-height:58vh;
  overflow-y:auto;
  margin-top:8px;
}
.mp-modal--lb .lb-row--top3{
  display:flex;
  align-items:center;
  width:100%;
  box-sizing:border-box;
}
.mp-modal--lb .lb-name{
  min-width:0;
}
.mp-modal--lb .lb-pts{
  margin-left:auto;
}
.mp-modal--lb .lb-note{
  max-width:420px;
  margin:14px auto 0;
}
@media(max-width:560px){
  .mp-modal--lb{width:min(94vw,460px);padding:30px 18px 22px}
  .mp-modal--lb .lb-row--top3{gap:10px;padding:12px 14px}
  .mp-modal--lb .lb-medal{width:32px;font-size:26px}
  .mp-modal--lb .lb-avatar-wrap{width:50px;height:50px}
  .mp-modal--lb .lb-row--top3 .lb-name{font-size:1rem}
  .mp-modal--lb .lb-row--top3 .lb-pts{font-size:.92rem}
}


/* v1.0.26 - mobile wallpaper crop: keep dogs visible across real phones */
/* (mobile override for light mode moved below the light-mode wallpaper block - see v1.5.284) */
@media (max-width: 700px){
  .mp-body{
    background-size: auto 112dvh;
    background-position: center 78%;
  }
}

/* v1.5.169 - light-mode How to Play contrast fixes */
.mp-body.light .pw-panel,
.light .pw-panel{
  color:#2b170b;
}
.mp-body.light .pw-panel-title,
.mp-body.light .pw-panel-sub,
.mp-body.light .mp-tile-pip,
.mp-body.light .pw-panel p,
.mp-body.light .pw-panel li,
.light .pw-panel-title,
.light .pw-panel-sub,
.light .mp-tile-pip,
.light .pw-panel p,
.light .pw-panel li{
  color:#2b170b;
  opacity:1;
  text-shadow:none;
}
.mp-body.light .pw-panel-sub,
.mp-body.light .mp-tile-pip,
.light .pw-panel-sub,
.light .mp-tile-pip{
  color:rgba(43,23,11,.78);
}
.mp-body.light .pw-panel-close,
.light .pw-panel-close{
  color:#2b170b;
}


/* v1.5.174 final Merge Paws How-to light contrast */
.mp-body.light #mp-overlay-how .pw-panel,
.mp-body.light #mp-overlay-how .pw-panel *,
.mp-body.light #mp-overlay-how p,
.mp-body.light #mp-overlay-how strong,
.mp-body.light #mp-overlay-how span,
.mp-body.light #mp-overlay-how a{
  color:#241206;
  opacity:1;
  text-shadow:none;
}
.mp-body.light #mp-overlay-how .pw-panel{
  background:linear-gradient(160deg,#fff7e8,#f5edd8);
  border-color:rgba(36,18,6,.16);
}
.mp-body.light #mp-overlay-how .pw-panel-sub,
.mp-body.light #mp-overlay-how .mp-tile-pip span{
  color:rgba(36,18,6,.78);
}
.mp-body.light #mp-overlay-how .pw-how-rules{
  background:rgba(255,255,255,.44);
  border-color:rgba(36,18,6,.10);
}


/* v1.5.175 - softer overlays, header stays clear */
.pw-overlay{
  z-index:180;
  background:rgba(14,8,3,.46);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}
.light .pw-overlay, .mp-body.light .pw-overlay{
  background:rgba(245,237,216,.24);
  backdrop-filter:blur(3px);
  -webkit-backdrop-filter:blur(3px);
}


/* v1.5.176 - make light-mode home logo fully visible */
.light .pw-home-logo,
.light .cp-home-logo,
.light .mp-home-logo,
.light .pp-home-logo,
body.light .pw-home-logo,
body.light .cp-home-logo,
body.light .mp-home-logo,
body.light .pp-home-logo {
  opacity: 1;
}
.light .pw-home-logo img,
.light .cp-home-logo img,
.light .mp-home-logo img,
.light .pp-home-logo img,
body.light .pw-home-logo img,
body.light .cp-home-logo img,
body.light .mp-home-logo img,
body.light .pp-home-logo img {
  filter: brightness(0) saturate(100%) sepia(23%) saturate(740%) hue-rotate(346deg) brightness(78%) contrast(92%);
  opacity: 1;
}

/* v1.5.178 - light-mode overlay test: less washout, dark unchanged */


/* Light mode - wallpaper (25 % cream wash, settled v1.5.201) */
.mp-body.light,
body.mp-body.light {
  position: relative;
  background-color: #f7f0e0;
  background-image: linear-gradient(rgba(245,237,216,0.12), rgba(245,237,216,0.12)), url('images/game-wallpaper.webp');
  background-size: cover;
  background-position: center center;
  background-attachment: scroll;
}
.mp-body.light::before,
body.mp-body.light::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(245,237,216,0.12), rgba(245,237,216,0.12)), url('images/game-wallpaper.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: none;
  opacity: 1;
}
.mp-body.light .pw-bg { z-index: 1; opacity: 1; }
.mp-body.light .pw-bg-glow,
.mp-body.light .pw-bg-particles,
.mp-body.light .pw-particle,
.mp-body.light .mp-paw-trail,
.mp-body.light .mp-bg-particle { display: none; opacity: 0; }
.mp-body.light main,
.mp-body.light .mp-main,
.mp-body.light .mp-wrap,
.mp-body.light #game,
.mp-body.light #board-wrap { position: relative; z-index: 10; }
.mp-body.light .pw-topbar { z-index: 200; }
@media (max-width: 900px) {
  .mp-body.light::before,
  body.mp-body.light::before {
    background-size: auto 100dvh;
    background-position: center center;
  }
}
@media (max-width: 900px) and (orientation: landscape) {
  .mp-body.light::before,
  body.mp-body.light::before { background-size: cover; background-position: center center; }
}

/* v1.5.284 - mobile wallpaper crop for light mode (positioned after light-mode block so cascade wins without !important) */
@media (max-width: 700px){
  .mp-body.light{
    background-size: auto 112dvh;
    background-position: center 78%;
  }
}

/* v1.5.254 - Leaderboard and score-submission aligned with Paw Words reference
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Leaderboard panel dimensions ───────────────────────────────────────── */
#mp-lb .mp-modal--lb{
  width:100%;
  max-width:380px;
  padding:22px 18px 20px;
  box-sizing:border-box;
}

/* ── Leaderboard title: Bree Serif 22px matching Paw Words "Top Players" ──── */
#mp-lb .mp-mtit{
  font-family:'Bree Serif',Georgia,serif;
  font-size:22px;
  font-weight:700;
  letter-spacing:0;
  margin-bottom:6px;
  color:#F5EDD8;
}

/* ── Leaderboard subtitle ────────────────────────────────────────────────── */
.mp-lb-sub{
  font-family:'DM Sans',system-ui,sans-serif;
  font-size:13px;
  color:rgba(245,237,216,0.65);
  text-align:center;
  margin:-4px 0 14px;
  line-height:1.35;
}

/* ── Month label: hidden - subtitle covers reset messaging ───────────────── */
#mp-lb .mp-lb-month{ display:none; }

/* ── Shared lb-* row sizing aligned with Paw Words ──────────────────────────── */
#mp-lb .lb-row--top3{
  min-height:76px;
  padding:14px 18px;
  border-radius:28px;
  gap:12px;
}
#mp-lb .lb-medal{
  font-size:34px;
  width:44px;
  min-width:44px;
  height:auto;
}
#mp-lb .lb-avatar-wrap{
  width:56px;
  min-width:56px;
  height:56px;
}
#mp-lb .lb-avatar{
  width:100%;
  height:100%;
  border-radius:50%;
  object-fit:cover;
  display:block;
}
#mp-lb .lb-avatar--blank{
  display:block;
  width:100%;
  height:100%;
  border-radius:50%;
  background:rgba(26,15,9,.5);
  border:1px solid rgba(245,237,216,.12);
  box-sizing:border-box;
}
#mp-lb .lb-row--top3 .lb-name{
  font-size:1.2rem;
  font-weight:700;
}
#mp-lb .lb-row--top3 .lb-pts{
  font-size:1rem;
  font-weight:700;
}
#mp-lb .lb-rest{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:10px;
}
#mp-lb .lb-row--rest{
  border-radius:10px;
  padding:8px 14px;
  gap:10px;
  font-size:14px;
}
#mp-lb .lb-row--rest .lb-rank{
  width:18px;
  flex:0 0 18px;
  font-size:13px;
  font-weight:400;
  font-family:'Bree Serif',Georgia,serif;
}
#mp-lb .lb-row--rest .lb-name{
  font-size:15px;
  font-weight:500;
}
#mp-lb .lb-row--rest .lb-pts{
  font-size:13px;
}
#mp-lb .lb-list{
  gap:14px;
  margin:4px 0 14px;
}
/* Note footer */
#mp-lb .lb-note{
  margin:0;
  line-height:1.5;
}

/* ── Light mode leaderboard ──────────────────────────────────────────────── */
body.light #mp-lb .mp-mtit,
.mp-body.light #mp-lb .mp-mtit{ color:#2c1a0a; }

body.light #mp-lb .mp-lb-sub,
.mp-body.light #mp-lb .mp-lb-sub{ color:rgba(44,26,10,0.65); }

body.light #mp-lb .lb-row--top3,
.mp-body.light #mp-lb .lb-row--top3{
  background:linear-gradient(135deg,rgba(255,228,176,.72),rgba(230,195,128,.60));
  border-color:rgba(168,94,26,0.38);
}
body.light #mp-lb .lb-row--top3 .lb-name,
.mp-body.light #mp-lb .lb-row--top3 .lb-name{ color:#2c1a0a; }
body.light #mp-lb .lb-row--top3 .lb-pts,
.mp-body.light #mp-lb .lb-row--top3 .lb-pts{ color:#a85e1a; }

body.light #mp-lb .lb-row--rest,
.mp-body.light #mp-lb .lb-row--rest{
  background:rgba(255,210,140,.10);
  border-color:rgba(168,94,26,0.22);
}
body.light #mp-lb .lb-row--rest .lb-name,
.mp-body.light #mp-lb .lb-row--rest .lb-name{ color:#2c1a0a; }
body.light #mp-lb .lb-row--rest .lb-rank,
.mp-body.light #mp-lb .lb-row--rest .lb-rank{ color:rgba(44,26,10,0.45); }
body.light #mp-lb .lb-row--rest .lb-pts,
.mp-body.light #mp-lb .lb-row--rest .lb-pts{ color:#a85e1a; }

body.light #mp-lb .lb-row--me.lb-row--rest,
.mp-body.light #mp-lb .lb-row--me.lb-row--rest{
  background:rgba(201,122,53,.12);
  border-color:rgba(201,122,53,.40);
}

/* ── Mobile leaderboard ──────────────────────────────────────────────────── */
@media(max-width:560px){
  #mp-lb .mp-modal--lb{ padding:22px 14px 18px; }
  #mp-lb .lb-row--top3{ gap:10px; padding:12px 14px; min-height:76px; }
  #mp-lb .lb-medal{ font-size:26px; width:30px; min-width:30px; }
  #mp-lb .lb-avatar-wrap{ width:52px; min-width:52px; height:52px; }
  #mp-lb .lb-row--top3 .lb-name{ font-size:.92rem; }
  #mp-lb .lb-row--top3 .lb-pts{ font-size:.88rem; }
}


/* ── Score-submission modal aligned with Paw Words ──────────────────────────── */
#mp-name .mp-modal{
  max-width:360px;
  border-radius:24px;
  padding:22px 18px 20px;
  box-sizing:border-box;
}
#mp-name .mp-mtit{
  font-family:'Bree Serif',Georgia,serif;
  font-size:22px;
  font-weight:700;
  letter-spacing:0;
  margin-bottom:6px;
  color:#f4cf8a;
}
#mp-name .mp-mscr{
  font-family:'DM Sans',system-ui,sans-serif;
  font-size:13px;
  font-weight:400;
  color:rgba(245,237,216,0.65);
  margin:0 0 18px;
}
#mp-name .mp-name-input{
  background:rgba(255,255,255,0.12);
  border:2px solid rgba(244,207,138,0.85);
  border-radius:12px;
  padding:12px 16px;
  margin:0 0 16px;
  font-size:16px;
  color:#fff;
  -webkit-text-fill-color:#fff;
  text-align:left;
}
#mp-name .mp-name-input:focus{
  border-color:#c97a35;
}
#mp-name .mp-name-input::placeholder{
  color:rgba(245,237,216,0.65);
}
#mp-name .mp-mbtns{
  flex-direction:column;
  gap:0;
}
#mp-name .mp-btn-a{
  display:block;
  width:100%;
  padding:14px;
  border-radius:16px;
  background:linear-gradient(135deg,#f4cf8a,#c97a35);
  color:#2c1a0a;
  font-size:15px;
  font-weight:700;
  box-shadow:none;
  text-align:center;
}
#mp-name .mp-btn-b{
  display:block;
  width:100%;
  background:none;
  border:none;
  color:rgba(245,237,216,0.65);
  font-size:13px;
  cursor:pointer;
  padding:6px;
  text-decoration:underline;
  box-shadow:none;
  margin-top:4px;
}
#mp-name .mp-btn-b:hover{
  background:none;
  transform:none;
  color:rgba(245,237,216,0.85);
}

/* ── Score-submission light mode ─────────────────────────────────────────── */
body.light #mp-name .mp-modal,
.mp-body.light #mp-name .mp-modal{
  background:linear-gradient(160deg,#fdf5e4,#f5edd8);
  border-color:rgba(26,15,9,0.14);
}
body.light #mp-name .mp-mtit,
.mp-body.light #mp-name .mp-mtit{ color:#2c1a0a; }
body.light #mp-name .mp-mscr,
.mp-body.light #mp-name .mp-mscr{ color:rgba(44,26,10,0.65); }
body.light #mp-name .mp-name-input,
.mp-body.light #mp-name .mp-name-input{
  background:rgba(0,0,0,0.07);
  border-color:rgba(168,94,26,0.75);
  color:#2c1a0a;
  -webkit-text-fill-color:#2c1a0a;
}
body.light #mp-name .mp-name-input::placeholder,
.mp-body.light #mp-name .mp-name-input::placeholder{ color:rgba(44,26,10,0.48); }
body.light #mp-name .mp-btn-b,
.mp-body.light #mp-name .mp-btn-b{ color:rgba(44,26,10,0.52); }


/* ================================================================
   v1.5.285 - Light mode: overlay backdrops + all game modals
   (game-over, win, name-submit)
   Leaderboard chrome now uses lb-panel from leaderboard.css -
   no extra rules needed there.
================================================================ */

/* ── Overlay backdrop ──────────────────────────────────────────── */
body.light .mp-overlay,
.mp-body.light .mp-overlay {
  background: rgba(245,237,216,0.40);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

/* ── Modal panel background + border ──────────────────────────── */
body.light .mp-modal,
.mp-body.light .mp-modal {
  background: linear-gradient(160deg, #fdf5e4, #f5edd8);
  border-color: rgba(26,15,9,0.12);
  box-shadow: 0 24px 64px rgba(0,0,0,0.14);
}

/* ── Title ─────────────────────────────────────────────────────── */
body.light .mp-modal .mp-mtit,
.mp-body.light .mp-modal .mp-mtit {
  color: #2c1a0a;
}

/* ── Subtitle / flavour text ───────────────────────────────────── */
body.light .mp-modal .mp-msub,
.mp-body.light .mp-modal .mp-msub {
  color: rgba(44,26,10,0.65);
}

/* ── Score display ─────────────────────────────────────────────── */
body.light .mp-modal .mp-mscr,
.mp-body.light .mp-modal .mp-mscr {
  color: #a85e1a;
}

/* ── Secondary buttons ─────────────────────────────────────────── */
body.light .mp-modal .mp-btn-b,
.mp-body.light .mp-modal .mp-btn-b {
  background: rgba(255,255,255,0.55);
  color: #2c1a0a;
  border-color: rgba(26,15,9,0.16);
}
body.light .mp-modal .mp-btn-b:hover,
.mp-body.light .mp-modal .mp-btn-b:hover {
  background: rgba(255,255,255,0.80);
}

/* ── Cross-promo footer ────────────────────────────────────────── */
body.light .mp-modal .mp-xpromo,
.mp-body.light .mp-modal .mp-xpromo {
  border-top-color: rgba(26,15,9,0.12);
}
body.light .mp-modal .mp-xlink,
.mp-body.light .mp-modal .mp-xlink {
  color: #a85e1a;
  border-color: rgba(168,94,26,0.30);
}
body.light .mp-modal .mp-xlink:hover,
.mp-body.light .mp-modal .mp-xlink:hover {
  background: rgba(168,94,26,0.10);
}

/* ── Leaderboard lb-panel animation inside mp-overlay ─────────── */
#mp-lb .lb-panel {
  animation: panelUp .28s cubic-bezier(0.34,1.4,0.64,1);
}

/* ── Game-over icon: cream paw is invisible on cream bg in light mode ── */
body.light #mp-go .mp-mico img,
.mp-body.light #mp-go .mp-mico img {
  filter: brightness(0) saturate(100%) sepia(23%) saturate(740%)
          hue-rotate(346deg) brightness(62%) contrast(92%);
  opacity: 0.80;
}


/* ================================================================
   v1.5.286 - Result modal (game-over + win) - matches Connect Paws
================================================================ */

/* ── Panel modifier: result layout ────────────────────────────── */
.mp-modal--result {
  text-align: center;
  padding: 0 24px 28px;
  max-width: 360px;
}

/* ── Close button (top-right ×) ────────────────────────────────── */
.mp-result-close {
  position: absolute; top: 10px; right: 10px;
  width: 44px; height: 44px; border-radius: 50%;
  background: transparent; border: none;
  color: rgba(245,237,216,.65); font-size: 14px;
  cursor: pointer; display: flex;
  align-items: center; justify-content: center;
  transition: color 0.2s;
}
.mp-result-close::before {
  content: ''; position: absolute;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,210,140,0.10);
  border: 1px solid rgba(255,210,140,0.20);
  transition: background 0.2s;
}
.mp-result-close:hover::before { background: rgba(255,210,140,0.22); }
.mp-result-close:hover { color: #F5EDD8; }
.mp-result-close span { position: relative; z-index: 1; }

/* ── Avatar - circular gold ring, like Connect Paws ──────────── */
.mp-result-avatar {
  width: 90px; height: 90px;
  border-radius: 50%;
  margin: 28px auto 18px;
  padding: 3px;
  background: linear-gradient(135deg, #dfc08f, #7a4b1f);
  overflow: hidden;
}
.mp-result-avatar img {
  width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover; display: block;
}

/* ── Title ─────────────────────────────────────────────────────── */
.mp-result-title {
  font-family: 'Bree Serif', Georgia, serif;
  font-size: 1.65rem; font-weight: 700;
  color: #F5EDD8;
  margin: 0 0 7px;
}

/* ── Kicker label (orange, uppercase) ─────────────────────────── */
.mp-result-kicker {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: #E8801C;
  margin: 0 0 12px;
}

/* ── Description text ──────────────────────────────────────────── */
.mp-result-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.82rem;
  color: rgba(245,237,216,0.55);
  line-height: 1.6;
  margin: 0 0 20px;
}

/* ── Stats row ─────────────────────────────────────────────────── */
.mp-result-stats {
  display: flex; gap: 12px;
  justify-content: center;
  margin: 0 0 22px;
}
.mp-result-stat {
  background: rgba(255,210,140,0.06);
  border: 1px solid rgba(255,210,140,0.15);
  border-radius: 12px;
  padding: 10px 16px;
  min-width: 80px;
  text-align: center;
}
.mp-result-stat strong {
  display: block;
  font-family: 'Bree Serif', Georgia, serif;
  font-size: 1.8rem; font-weight: 700;
  color: #c97a35;
  line-height: 1;
}
.mp-result-stat span {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(245,237,216,0.45);
  margin-top: 4px;
}

/* ── Primary CTA: full-width orange pill ───────────────────────── */
.mp-result-action {
  display: block;
  width: 100%;
  padding: 15px 20px;
  border: none; border-radius: 50px;
  background: linear-gradient(135deg, #d4883a, #b86c28);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(201,122,53,0.35);
  transition: transform .14s, box-shadow .14s;
  margin-bottom: 18px;
  -webkit-tap-highlight-color: transparent;
}
.mp-result-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 22px rgba(201,122,53,0.50);
}
.mp-result-action:active { transform: translateY(0); }

/* ── Secondary text-link row ───────────────────────────────────── */
.mp-result-secondary {
  display: flex; gap: 16px;
  justify-content: center; flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid rgba(255,210,140,0.12);
}
.mp-result-text-btn {
  background: none; border: none;
  color: rgba(245,237,216,0.50);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer; padding: 4px 2px;
  text-decoration: underline;
  transition: color 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.mp-result-text-btn:hover { color: #F5EDD8; }

/* ── Light mode: result modal ──────────────────────────────────── */
body.light .mp-result-close,
.mp-body.light .mp-result-close { color: rgba(44,26,10,0.45); }
body.light .mp-result-close:hover,
.mp-body.light .mp-result-close:hover { color: #2c1a0a; }
body.light .mp-result-close::before,
.mp-body.light .mp-result-close::before {
  background: rgba(26,15,9,0.06);
  border-color: rgba(26,15,9,0.12);
}

body.light .mp-result-title,
.mp-body.light .mp-result-title { color: #2c1a0a; }

body.light .mp-result-sub,
.mp-body.light .mp-result-sub { color: rgba(44,26,10,0.60); }

body.light .mp-result-stat,
.mp-body.light .mp-result-stat {
  background: rgba(255,255,255,0.60);
  border-color: rgba(26,15,9,0.13);
}
body.light .mp-result-stat strong,
.mp-body.light .mp-result-stat strong { color: #a85e1a; }
body.light .mp-result-stat span,
.mp-body.light .mp-result-stat span { color: rgba(44,26,10,0.50); }

body.light .mp-result-secondary,
.mp-body.light .mp-result-secondary {
  border-top-color: rgba(26,15,9,0.12);
}
body.light .mp-result-text-btn,
.mp-body.light .mp-result-text-btn { color: rgba(44,26,10,0.50); }
body.light .mp-result-text-btn:hover,
.mp-body.light .mp-result-text-btn:hover { color: #2c1a0a; }
