
/* 44QS compact-game presentation layer — independent catalog pass */
:root{
  --game-accent:#7be3ff;
  --game-accent2:#a9ff68;
  --game-warn:#ffd166;
  --game-bad:#ff6b7d;
  --game-good:#76f2ae;
  --game-stage:#07111f;
}
.compact-game-main{max-width:1260px}
.compact-game-title{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:24px;
  align-items:end;
  margin-bottom:20px;
  padding:26px 28px;
  border:1px solid var(--line);
  border-radius:22px;
  background:
    radial-gradient(circle at 85% 0%,rgba(123,227,255,.12),transparent 20rem),
    linear-gradient(145deg,rgba(22,35,62,.92),rgba(8,15,28,.92));
}
.compact-game-title h1{font-size:clamp(38px,5vw,66px);margin:7px 0 8px}
.compact-game-title .lead{margin:0;font-size:17px}
.game-badges{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.game-badge{
  padding:7px 10px;
  border:1px solid rgba(123,227,255,.26);
  border-radius:999px;
  background:rgba(9,18,34,.74);
  color:#b9c9de;
  font-size:12px;
  font-weight:750;
}
.compact-game-shell{grid-template-columns:minmax(0,860px) minmax(280px,340px)}
.compact-game-shell .game-panel{padding:14px}
.compact-game-shell .side-panel{display:grid;gap:16px}
.side-block{padding-top:14px;border-top:1px solid rgba(91,119,165,.25)}
.side-block:first-child{padding-top:0;border-top:0}
.side-block h2{font-size:20px;margin:0 0 8px}
.control-chips{display:flex;flex-wrap:wrap;gap:7px}
.control-chip{
  display:inline-flex;align-items:center;gap:6px;padding:7px 9px;
  border:1px solid rgba(95,126,177,.35);border-radius:10px;
  background:rgba(255,255,255,.025);color:#b9c8dd;font-size:12px
}
.control-chip kbd{
  padding:3px 6px;border:1px solid #40547f;border-bottom-width:2px;border-radius:6px;
  background:#0a1528;color:#f0f8ff;font:700 11px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace
}
#game-root{position:relative;isolation:isolate}
#game-root .hud{
  align-items:center;margin-bottom:12px;padding:8px;border:1px solid rgba(75,103,151,.28);
  border-radius:15px;background:rgba(6,14,27,.55)
}
#game-root .hud button{padding:8px 11px;border-radius:10px}
#game-root .stat{
  padding:7px 9px;border-radius:10px;background:rgba(17,29,54,.88);
  font-size:13px;white-space:nowrap
}
#game-root .game-stage{
  min-height:480px;
  background:
    radial-gradient(circle at 50% 0%,rgba(43,79,125,.18),transparent 34rem),
    linear-gradient(180deg,#081323,#06101d);
  box-shadow:inset 0 0 60px rgba(0,0,0,.28)
}
#game-root .game-canvas{display:block;width:min(100%,960px);height:auto;box-shadow:0 18px 48px rgba(0,0,0,.28)}
#game-root button:disabled{cursor:not-allowed;opacity:.48;filter:none}
.game-note{margin:11px 4px 0;color:#8fa1bd;font-size:12px;line-height:1.45}
.game-toast{
  position:fixed;left:50%;bottom:24px;z-index:1000;transform:translate(-50%,18px);
  width:min(520px,calc(100vw - 28px));padding:12px 15px;border:1px solid rgba(123,227,255,.52);
  border-radius:13px;background:rgba(6,17,31,.95);box-shadow:0 18px 50px rgba(0,0,0,.36);
  color:#edf8ff;font-weight:750;text-align:center;opacity:0;pointer-events:none;
  transition:opacity .18s ease,transform .18s ease
}
.game-toast.show{opacity:1;transform:translate(-50%,0)}
.game-toast.good{border-color:rgba(118,242,174,.58)}
.game-toast.bad{border-color:rgba(255,107,125,.64)}
.game-error{
  margin:10px 0;padding:13px;border:1px solid rgba(255,107,125,.55);border-radius:12px;
  background:rgba(88,20,35,.35);color:#ffd7df
}
.game-quality-row{display:flex;justify-content:space-between;gap:10px;color:#90a3bd;font-size:12px}
.game-quality-row strong{color:#ddebfa}
.related-strip{margin-top:38px}
.related-strip .grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.related-strip .card{min-height:120px}
.daily-mark{color:var(--game-warn)}
.game-complete{box-shadow:0 0 0 2px rgba(118,242,174,.36),0 18px 50px rgba(0,0,0,.28)!important}

/* Puzzle surfaces */
.tile-grid{padding:14px;gap:11px;background:linear-gradient(145deg,#0c172c,#07111f);border:1px solid rgba(91,119,165,.28)}
.tile{
  position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.06);
  box-shadow:inset 0 1px rgba(255,255,255,.06),0 8px 18px rgba(0,0,0,.16);
  transition:transform .11s ease,background .15s ease
}
.tile:not(:empty){background:linear-gradient(145deg,#253c67,#172848)}
.tile[data-value="2"],.tile[data-value="4"]{color:#dff7ff}
.tile[data-value="8"],.tile[data-value="16"]{background:linear-gradient(145deg,#286d80,#16435b)}
.tile[data-value="32"],.tile[data-value="64"]{background:linear-gradient(145deg,#67823a,#354c28)}
.tile[data-value="128"],.tile[data-value="256"]{background:linear-gradient(145deg,#aa7635,#674622)}
.tile[data-value="512"],.tile[data-value="1024"],.tile[data-value="2048"]{background:linear-gradient(145deg,#b84e5b,#6b253b);box-shadow:0 0 22px rgba(255,107,125,.18)}
.tile.new-tile{animation:tile-pop .16s ease}
@keyframes tile-pop{from{transform:scale(.72)}to{transform:scale(1)}}
.tube-wrap{min-height:390px;gap:18px}
.tube{
  position:relative;border-color:#7187b0;background:linear-gradient(90deg,rgba(255,255,255,.03),rgba(255,255,255,.10),rgba(255,255,255,.03));
  box-shadow:inset 0 -18px 28px rgba(0,0,0,.20),0 12px 24px rgba(0,0,0,.16);
  transition:transform .12s ease,outline-color .12s ease
}
.tube:hover{transform:translateY(-3px)}
.tube.sel{transform:translateY(-8px);outline-offset:4px}
.liq{box-shadow:inset 0 2px 5px rgba(255,255,255,.18),inset 0 -4px 8px rgba(0,0,0,.12)}
.memory-grid{gap:12px}
.mem-card{
  position:relative;transform-style:preserve-3d;transition:transform .18s ease,background .18s ease;
  box-shadow:0 10px 20px rgba(0,0,0,.18)
}
.mem-card:hover{transform:translateY(-2px)}
.mem-card.open,.mem-card.matched{background:linear-gradient(145deg,#2d4f80,#20385e)}
.mem-card.matched{box-shadow:0 0 0 2px rgba(118,242,174,.28)}
.mine-grid{padding:10px;border:1px solid rgba(91,119,165,.32);border-radius:16px;background:#081322}
.cell{border:1px solid rgba(255,255,255,.035);transition:background .10s ease,transform .08s ease}
.cell:hover:not(.open){background:#24385f;transform:translateY(-1px)}
.cell.open{background:#0d1a2d;color:#dbe9fa}
.cell.mine{background:rgba(134,30,52,.58);color:#ffd5dc}
.word-grid{padding:10px;border:1px solid rgba(91,119,165,.30);border-radius:16px;background:#081322;touch-action:none}
.letter{transition:background .10s ease,transform .08s ease}
.letter:hover{transform:translateY(-1px);background:#263c68}
.letter.selecting{background:#335b7a}
.letter.mark{background:linear-gradient(145deg,#287072,#24505f);box-shadow:inset 0 0 0 1px rgba(123,227,255,.32)}
.sudoku{
  border-radius:8px;overflow:hidden;background:#526a97;
  box-shadow:0 18px 40px rgba(0,0,0,.24)
}
.sudoku input{outline:0;border:1px solid rgba(82,106,151,.20)}
.sudoku input:focus{background:#244c66;box-shadow:inset 0 0 0 2px var(--game-accent)}
.sudoku input.same{background:#203552}
.sudoku input.err{background:#69283d}
.sudoku input.complete{background:#235344}
.typing-box{width:min(100%,760px)}
.prompt{padding:16px;border:1px solid rgba(91,119,165,.30);border-radius:14px;background:#0a162a}
.prompt .typed{color:#76f2ae}
.prompt .wrong{color:#ff8195;text-decoration:underline}
.prompt .pending{color:#b8c6da}
.type-input:focus{border-color:#7be3ff;box-shadow:0 0 0 3px rgba(123,227,255,.12)}
.reaction-panel{
  width:min(100%,700px);min-height:340px;display:grid;place-items:center;padding:30px;
  border:1px solid rgba(91,119,165,.36);border-radius:22px;background:linear-gradient(145deg,#101d35,#091322);
  text-align:center;cursor:pointer;user-select:none;transition:background .12s ease,box-shadow .12s ease
}
.reaction-panel.ready{background:linear-gradient(145deg,#2a764f,#174832);box-shadow:0 0 45px rgba(118,242,174,.16)}
.reaction-panel.too-soon{background:linear-gradient(145deg,#6e273c,#3c1828)}
.reaction-panel strong{font-size:clamp(28px,5vw,52px)}
.sol-area{min-width:680px}
.pile{position:relative}
.cardplay{position:relative;box-shadow:0 7px 14px rgba(0,0,0,.20);transition:transform .08s ease,box-shadow .08s ease}
.cardplay:hover{transform:translateY(-2px);box-shadow:0 10px 18px rgba(0,0,0,.28)}
.cardplay.selected{box-shadow:0 0 0 3px var(--game-accent),0 10px 20px rgba(0,0,0,.28)}
.cardplay.back{background:
  linear-gradient(135deg,transparent 0 42%,rgba(255,255,255,.10) 42% 48%,transparent 48%),
  linear-gradient(135deg,#173f91,#42a4d7)}
.foundation::after{content:"A";display:grid;place-items:center;height:88px;color:#536787;font:800 28px serif}
.foundation:has(.cardplay)::after{display:none}

@media(max-width:1040px){
  .compact-game-shell{grid-template-columns:1fr}
  .compact-game-title{grid-template-columns:1fr}
  .game-badges{justify-content:flex-start}
  .compact-game-shell .side-panel{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:720px){
  .compact-game-title{padding:20px}
  .compact-game-shell .side-panel{grid-template-columns:1fr}
  #game-root .game-stage{min-height:390px}
  #game-root .hud{overflow-x:auto;flex-wrap:nowrap;padding-bottom:10px}
  .related-strip .grid{grid-template-columns:1fr}
  .sol-area{min-width:620px;transform-origin:left top;transform:scale(.84);margin-right:-100px;margin-bottom:-65px}
}
@media(max-width:520px){
  .tile-grid{grid-template-columns:repeat(4,62px)!important}
  .tile{width:62px;height:62px!important}
  .memory-grid{grid-template-columns:repeat(4,64px)!important}
  .mem-card{height:64px!important}
}
@media(prefers-reduced-motion:reduce){
  .tile.new-tile,.game-toast,.mem-card,.tube,.letter,.cell,.cardplay{animation:none!important;transition:none!important}
}
