/* Practice and tournament share each game's palette and board treatment. */
.yp-play .yp-panel { padding: clamp(14px,2.4vw,24px); background:#17251f; border-color:#466653; }
.yp-play-entry { display:flex; justify-content:space-between; align-items:center; gap:12px 20px; }
.yp-play-entry h2 { font-size:clamp(18px,2.2vw,23px); color:#f3f8ee; margin:0 0 2px; }
.yp-play-entry p, .yp-play .yp-panel p { color:#d0ddd1; font-size:14px; line-height:1.55; }
.yp-play-entry p { margin:0; }
.yp-play .yp-panel a.yp-cup-link {
  display:inline-flex; align-items:center; justify-content:center; gap:12px; flex:none;
  min-height:44px; padding:10px 17px; border:1px solid #a8db91; border-radius:12px;
  background:linear-gradient(105deg,#83dda6,#f1d47d); color:#13241c; opacity:1;
  font-size:15px; line-height:1.3; font-weight:750; box-shadow:none; text-decoration:none;
}
.yp-play .yp-panel a.yp-cup-link:hover { background:#d7edac; }
.yp-play .yp-panel .yp-miner-options { margin-top:12px; border-top:1px solid #425649; padding-top:4px; }
.yp-miner-options summary { color:#e7eee5; cursor:pointer; padding:10px 0 4px; font-size:14px; }
.yp-miner-options summary span { margin-inline-start:7px; font-size:13px; color:#f2d691; }
.yp-miner-options summary::marker { color:#92b7a4; }
.yp-miner-options .yp-pool-line a, .yp-miner-options .yp-panel-actions a { color:#d5f0c4; text-decoration:underline; text-underline-offset:3px; }
.yp-play .yp-miner-options small { font-size:13px; line-height:1.6; color:#c1cec3; }
.yp-play .yp-panel button:disabled, .yc-player .yc-challenges button:disabled {
  opacity:1; background:#29352f; border:1px solid #526259; color:#c2cbc5; box-shadow:none; cursor:not-allowed;
}
.yp-play .yp-miner-options button:disabled:hover { transform:none; }
.yp-play-entry :focus-visible, .yp-miner-options :focus-visible, .cup-round :focus-visible,
.yc-challenges :focus-visible, .yp-play .rg-game :focus-visible { outline:3px solid #ffe79b; outline-offset:3px; }

.cup-round[data-kind="2048"], .yp-play .rg-2048 { --ink:#fff5da; --accent:#efc871; --field:#382e22; --edge:#796548; --secondary:#f3dc9b; }
.cup-round[data-kind="memory"], .yp-play .rg-memory { --ink:#f6f2ff; --accent:#d3c3ff; --field:#28253c; --edge:#796e9c; --secondary:#c0d6ff; }
.cup-round[data-kind="snake"], .yp-play .rg-snake { --ink:#edf8e3; --accent:#b4e7ac; --field:#182d24; --edge:#5b8068; --secondary:#aee5cb; }

.yp-round.cup-round, .yp-play :is(.rg-2048,.rg-snake,.rg-memory) {
  box-sizing:border-box; color:var(--ink); background:#151e1c;
  background:linear-gradient(153deg,var(--field),#121b1b 72%);
  border:1px solid var(--edge); box-shadow:0 8px 24px #07100e33;
  border-radius:18px; padding:clamp(12px,2.3vw,24px); width:100%; max-width:580px; margin:12px auto;
}
.yc-player [data-classic-board]:not(:empty) { background:transparent; border:0; padding:0; }
.yp-round.cup-round h2, .yp-play :is(.rg-2048,.rg-snake,.rg-memory) h1 {
  color:var(--ink); font-size:clamp(26px,4vw,36px); letter-spacing:-.035em; text-shadow:none; margin:0 0 10px; line-height:1.16;
}
.cup-round .yp-eyebrow { display:block; font-size:12px; color:var(--accent); letter-spacing:.045em; margin-bottom:7px; }
.cup-round .yp-round-top button { color:var(--ink); background:#23322f; border:1px solid var(--edge); min-width:66px; min-height:44px; }
.cup-round .yp-objective { color:#c1cfc9; font-size:14px; margin:0 0 12px; }
.cup-round .yp-objective strong { margin-left:7px; color:var(--ink); }
.cup-round .yp-round-stats, .yp-play :is(.rg-2048,.rg-snake,.rg-memory) .rg-metrics {
  display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:8px; margin:0 0 12px;
}
.cup-round .yp-round-stats>div, .yp-play :is(.rg-2048,.rg-snake,.rg-memory) .rg-metrics>div {
  display:grid; align-content:center; gap:3px; padding:8px 12px; border:1px solid var(--edge);
  border-radius:9px; background:#111a1bd9; text-align:left; min-width:0;
}
.cup-round .yp-round-stats small, .yp-play :is(.rg-2048,.rg-snake,.rg-memory) .rg-metrics span { font-size:12px; line-height:1.4; color:#c5d2cb; }
.cup-round .yp-round-stats b, .yp-play :is(.rg-2048,.rg-snake,.rg-memory) .rg-metrics strong {
  color:var(--ink); font-size:clamp(17px,3vw,23px); line-height:1.15; font-variant-numeric:tabular-nums; text-shadow:none;
}
.cup-round .yp-round-stats>div:first-child b { color:var(--accent); }
.cup-round .ym-board { box-sizing:border-box; width:min(100%,430px); margin:14px auto; }
.cup-round .yp-round-board.is-paused { opacity:1; outline:2px dashed var(--edge); outline-offset:2px; }
.cup-round .yp-round-notice, .yp-play :is(.rg-2048,.rg-memory,.rg-snake) .rg-hint { color:#d1ddd5; font-size:14px; line-height:1.55; }
.cup-round .yp-round-footer a { color:#e0f4cf; }
.cup-round .yp-round-footer { margin-top:10px; }
.yp-play :is(.rg-2048,.rg-snake,.rg-memory) .rg-overlay { background:#101918ed; }
.yp-play :is(.rg-2048,.rg-snake,.rg-memory) .rg-overlay h2 { color:var(--ink); text-shadow:none; }
.yp-play :is(.rg-2048,.rg-snake,.rg-memory) .rg-overlay p { color:#d8ded9; }
.yp-play :is(.rg-2048,.rg-snake,.rg-memory) .rg-primary {
  background:var(--accent); color:#151c19; border:1px solid var(--accent); box-shadow:none; border-radius:10px; min-height:44px; font-weight:750;
}
.yp-play :is(.rg-2048,.rg-snake,.rg-memory) .rg-button:not(.rg-primary) { background:#25332f; border:1px solid var(--edge); color:var(--ink); min-height:44px; }
.yp-play :is(.rg-2048,.rg-snake,.rg-memory) .rg-button:disabled { opacity:1; background:#29332f; color:#c0c8c2; }
.cup-round .ym-direction { display:grid; grid-template:repeat(2,44px)/repeat(3,52px); gap:5px; justify-content:center; }
.cup-round .ym-direction button, .yp-play .rg-snake-pad button { background:#24352e; color:#f4f6e8; border:1px solid var(--edge); font-size:22px; }
.cup-round .ym-direction button { min-width:0; width:100%; height:44px; padding:0; }
.cup-round [data-dir="up"] { grid-area:1/2; }
.cup-round [data-dir="left"] { grid-area:2/1; }
.cup-round [data-dir="down"] { grid-area:2/2; }
.cup-round [data-dir="right"] { grid-area:2/3; }

.cup-round .ym-board-2048, .yp-play .rg-number-board {
  padding:9px; gap:7px; background:#29251e; border:1px solid #776246; border-radius:13px;
}
.cup-round .ym-board-2048 div, .yp-play .rg-number {
  border-radius:7px; background:#413a30; color:#211b11; font-size:clamp(22px,6vw,43px);
  font-variant-numeric:tabular-nums; font-weight:800; letter-spacing:-.035em;
}
.cup-round .ym-board-2048 [data-value="0"],.yp-play .rg-number.n-0 { background:#413a30; }
.cup-round .ym-board-2048 [data-value="2"],.yp-play .rg-number.n-2 { background:#f2eadc; color:#352d23; }
.cup-round .ym-board-2048 [data-value="4"],.yp-play .rg-number.n-4 { background:#ead49a; color:#35290f; }
.cup-round .ym-board-2048 [data-value="8"],.yp-play .rg-number.n-8 { background:#f2b778; color:#37230d; }
.cup-round .ym-board-2048 [data-value="16"],.yp-play .rg-number.n-16 { background:#ed9466; color:#342010; }
.cup-round .ym-board-2048 [data-value="32"],.yp-play .rg-number.n-32 { background:#a74936; color:#fff8ee; }
.cup-round .ym-board-2048 [data-value="64"],.yp-play .rg-number.n-64 { background:#8d3740; color:#fff4e9; }
.cup-round .ym-board-2048 [data-value="128"],.yp-play .rg-number:is(.n-128,.n-256,.n-512,.n-1024,.n-2048) { background:#f3ce6b; color:#302510; box-shadow:inset 0 0 0 2px #fff0b2; }
.yp-play .rg-number.rg-small-number { font-size:clamp(18px,5vw,32px); }

.yp-play .rg-memory { min-height:0; }
.yp-play .cup-memory-stage { position:relative; min-height:0; }
.yp-play .cup-memory-stage:has(.rg-concealed) { min-height:320px; }
.yp-play .rg-memory .rg-full-overlay { inset:0; min-height:0; padding:14px; border-radius:12px; }
.yp-play .rg-memory .rg-overlay-content { max-width:360px; margin:auto; }
.yp-play .rg-memory-levels .rg-primary { display:flex; align-items:center; justify-content:space-between; padding:10px 16px; }
.yp-play .rg-memory-levels small { color:inherit; font-size:13px; }
.cup-round .ym-board-memory { gap:8px; }
.cup-round .ym-board-memory button, .yp-play .rg-card-back {
  position:relative; display:grid; place-items:center; padding:0; overflow:hidden; border-radius:11px;
  border:1px solid #a699d0; background:repeating-linear-gradient(45deg,#383253 0 5px,#403959 5px 6px); color:#f3e8ff;
  font-size:clamp(22px,5vw,37px); font-weight:700; box-shadow:inset 0 0 0 4px #332e4c,inset 0 0 0 5px #7e7299;
}
.yp-play .rg-card-back { position:absolute; }
.cup-round .ym-board-memory button.turned,.cup-round .ym-board-memory button.matched,.yp-play .rg-card-front {
  background:#eee8ff; color:#35294f; opacity:1; border:1px solid #bba9db; box-shadow:none;
}
.cup-round .ym-board-memory button.matched,.yp-play .rg-card.matched .rg-card-front { background:#cfe7ce; border-color:#779e82; color:#254532; opacity:1; }
.cup-round .ym-board-memory button:disabled,.yp-play .rg-card:disabled { opacity:1; }
.cup-round .ym-board-memory button small { position:absolute; right:5px; bottom:4px; font-size:13px; color:#21482e; line-height:1; }
.yp-play .rg-card.matched .rg-card-front::after { content:'✓'; position:absolute; bottom:3px; right:6px; font:700 14px/1.2 sans-serif; color:#21482e; }

.cup-round .ym-board-snake { gap:1px; padding:5px; border:2px solid #68866b; background:#192d22; border-radius:12px; }
.cup-round .ym-board-snake i { background:#253c2e; border-radius:2px; display:block; }
.cup-round .ym-board-snake .body { background:#7cbb99; border-radius:4px; }
.cup-round .ym-board-snake .head { position:relative; background:#d8f1a9; border-radius:5px; }
.cup-round .ym-board-snake .head::before,.cup-round .ym-board-snake .head::after {
  content:''; position:absolute; width:17%; height:17%; background:#1a3527; border-radius:50%; right:18%; top:18%;
}
.cup-round .ym-board-snake .head::after { top:auto; bottom:18%; }
.cup-round .ym-board-snake .facing-up { transform:rotate(-90deg); }
.cup-round .ym-board-snake .facing-down { transform:rotate(90deg); }
.cup-round .ym-board-snake .facing-left { transform:rotate(180deg); }
.cup-round .ym-board-snake .food { background:#ffc46f; border-radius:50%; margin:13%; box-shadow:inset 0 0 0 2px #ffe7a5; }
.yp-play .rg-snake-wrap { border:2px solid #66876d; box-shadow:none; }
.yc-player .yc-challenges button { border-left:4px solid var(--game-edge); }
.yc-challenges [data-kind="2048"] { --game-edge:#e6bc71; }
.yc-challenges [data-kind="memory"] { --game-edge:#bbabd9; }
.yc-challenges [data-kind="snake"] { --game-edge:#94c89d; }
.yc-challenges .cup-game-title { display:flex; align-items:center; }
.yc-player .yc-challenges small { font-size:13px; line-height:1.45; color:inherit; }
@media (max-width:540px) {
  .yp-play-entry { align-items:flex-start; flex-direction:column; gap:8px; }
  .yp-play .yp-cup-link { width:100%; }
  .cup-round .yp-round-stats>div,.yp-play :is(.rg-2048,.rg-snake,.rg-memory) .rg-metrics>div { padding:7px 8px; }
  .yp-play .yp-panel { margin-bottom:10px; }
}
@media (prefers-reduced-motion:reduce) { .yp-play .rg-card-inner { transition:none; } }
