*{box-sizing:border-box}
:root{--bg:#f4f7fb;--card:#fff;--text:#18212f;--muted:#65758b;--brand:#155eef;--board:#b8c3d2;--gap:10px}
body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}
.container{width:min(1000px,calc(100% - 28px));margin:auto}
.site-header{background:#fff;border-bottom:1px solid #e7ebf0}
.header-inner{display:flex;justify-content:space-between;align-items:center;padding:16px 0}
.brand{text-decoration:none;color:var(--text);font-size:1.45rem;font-weight:800}.tagline{font-size:.84rem;color:var(--muted);margin-top:2px}
main{padding:24px 0 40px}.hero{background:#fff;border-radius:22px;padding:28px;margin-bottom:22px}.hero h1{margin:0 0 8px}.hero p{margin:0;color:var(--muted)}
.games-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:18px;margin-bottom:22px}
.game-card{background:#fff;border-radius:20px;overflow:hidden;box-shadow:0 10px 30px rgba(20,33,61,.07)}
.game-icon{height:150px;display:flex;align-items:center;justify-content:center;font-size:3rem;font-weight:900;background:#dfe9ff;color:#174ea6}
.game-card-body{padding:20px}.game-card-body h2{margin:0 0 8px}.game-card-body p{color:var(--muted);line-height:1.55}
.coming-soon{opacity:.7}.primary-btn,.secondary-btn{display:inline-block;text-decoration:none;border-radius:10px;font-weight:800;padding:11px 16px;cursor:pointer}
.primary-btn{border:0;background:var(--brand);color:#fff}.secondary-btn{border:1px solid #d9e0e9;background:#fff;color:var(--text)}
.ad-placeholder,.ad-wrap{min-height:90px;border:1px dashed #bac4d1;border-radius:14px;background:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;margin:0 0 22px;color:#7a8798}
.ad-placeholder small{margin-top:5px}
.game-shell{background:#fff;border-radius:22px;padding:22px;box-shadow:0 10px 35px rgba(20,33,61,.08);position:relative}
.game-title-row{display:flex;justify-content:space-between;gap:20px;align-items:flex-start}.game-title-row h1{margin:0 0 8px}.game-title-row p{margin:0;color:var(--muted)}
.score-panel{display:flex;gap:8px}.score-box{background:#172033;color:#fff;border-radius:12px;padding:9px 14px;text-align:center;min-width:82px}.score-box span{display:block;text-transform:uppercase;font-size:.7rem;opacity:.7}.score-box strong{font-size:1.25rem}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0}
.board-wrap{display:flex;justify-content:center}.board{width:min(100%,520px);aspect-ratio:1;background:var(--board);border-radius:18px;padding:var(--gap);display:grid;grid-template-columns:repeat(4,1fr);gap:var(--gap);touch-action:none;user-select:none}
.tile{border-radius:12px;background:#eef1f5;display:flex;align-items:center;justify-content:center;font-weight:900;font-size:clamp(1.45rem,7vw,2.25rem)}.tile[data-v="0"]{color:transparent}
.tile[data-v="2"]{background:#eef3ff}.tile[data-v="4"]{background:#dfe9ff}.tile[data-v="8"]{background:#c8dcff}.tile[data-v="16"]{background:#a8c7ff}.tile[data-v="32"]{background:#7fa9ff;color:#fff}.tile[data-v="64"]{background:#5a8ff7;color:#fff}.tile[data-v="128"],.tile[data-v="256"],.tile[data-v="512"]{background:#356fe4;color:#fff}.tile[data-v="1024"],.tile[data-v="2048"],.tile[data-v="4096"]{background:#174ea6;color:#fff}
.mobile-hint{text-align:center;color:var(--muted);font-size:.9rem;margin:14px 0 6px}.keyboard-controls{text-align:center;margin-top:8px}.keyboard-controls button{width:54px;height:44px;border:1px solid #d8e0ea;background:#fff;border-radius:10px;font-size:1.2rem;margin:3px;cursor:pointer}
footer{padding:20px 0 34px;text-align:center;color:#718096}
.game-message{position:absolute;inset:0;background:rgba(255,255,255,.82);display:flex;align-items:center;justify-content:center;border-radius:22px;z-index:5}.game-message[hidden]{display:none}.message-card{background:#fff;padding:28px;border-radius:18px;text-align:center;box-shadow:0 12px 40px rgba(20,33,61,.18);width:min(90%,360px)}
.modal{position:fixed;inset:0;background:rgba(13,22,36,.56);display:flex;align-items:center;justify-content:center;padding:20px;z-index:50}.modal[hidden]{display:none}.modal-card{background:#fff;border-radius:18px;width:min(520px,100%);padding:26px;position:relative}.modal-close{position:absolute;right:14px;top:10px;border:0;background:none;font-size:2rem;cursor:pointer;color:#65758b}
@media(max-width:650px){.game-shell{padding:16px}.game-title-row{display:block}.score-panel{margin-top:15px}.score-box{flex:1}.board{--gap:7px;padding:7px}.header-inner{gap:12px}.secondary-btn{font-size:.9rem}}


/* VSR Games launcher */
.launcher-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:18px;
  margin-bottom:24px;
}
.launcher-card{
  background:#fff;
  border-radius:20px;
  padding:18px 14px 16px;
  text-align:center;
  text-decoration:none;
  color:var(--text);
  box-shadow:0 10px 28px rgba(20,33,61,.07);
  border:1px solid #edf0f4;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
  min-height:220px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
}
.launcher-card.playable:hover{
  transform:translateY(-4px);
  box-shadow:0 16px 36px rgba(20,33,61,.12);
  border-color:#c7d8ff;
}
.launcher-card.locked{
  opacity:.72;
}
.launcher-icon{
  width:112px;
  height:112px;
  border-radius:24px;
  background:#eef3ff;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:14px;
  font-size:3rem;
  box-shadow:inset 0 0 0 1px rgba(21,94,239,.08);
}
.launcher-name{
  font-size:1.05rem;
  font-weight:800;
  line-height:1.25;
}
.launcher-status{
  margin-top:6px;
  font-size:.78rem;
  font-weight:700;
  color:var(--muted);
}
.playable .launcher-status{color:var(--brand)}
.icon-merge{
  display:grid;
  grid-template-columns:repeat(2,38px);
  grid-template-rows:repeat(2,38px);
  gap:6px;
  padding:10px;
}
.mini-tile{
  display:flex;
  align-items:center;
  justify-content:center;
  background:#fff;
  border-radius:8px;
  font-size:1rem;
  font-weight:900;
  color:#174ea6;
  box-shadow:0 3px 10px rgba(20,33,61,.08);
}
.icon-sudoku{padding:15px}
.sudoku-grid{
  width:78px;
  height:78px;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  border:2px solid #174ea6;
  background:#fff;
}
.sudoku-grid span{
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:.78rem;
  font-weight:800;
  border:1px solid #c7d8ff;
}
.icon-tic,.icon-word{
  font-size:1.7rem;
  font-weight:900;
  letter-spacing:2px;
}
@media(max-width:520px){
  .launcher-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
  .launcher-card{min-height:190px;padding:14px 10px}
  .launcher-icon{width:94px;height:94px;border-radius:20px}
}


/* Snake game */
.snake-meta{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  color:var(--muted);
  font-size:.92rem;
  margin-bottom:12px;
}
.snake-board-wrap{
  display:flex;
  justify-content:center;
}
#snakeCanvas{
  width:min(100%,520px);
  aspect-ratio:1;
  background:#eef3ff;
  border:8px solid #b8c3d2;
  border-radius:18px;
  display:block;
  touch-action:none;
}
.snake-controls{
  text-align:center;
  margin-top:14px;
}
.snake-controls button{
  width:56px;
  height:46px;
  border:1px solid #d8e0ea;
  background:#fff;
  border-radius:10px;
  font-size:1.2rem;
  margin:3px;
  cursor:pointer;
}


/* VSR blue + gold branding */
:root{
  --bg:#f5f7fb;
  --card:#ffffff;
  --text:#071c3d;
  --muted:#64748b;
  --brand:#0b4f9f;
  --brand-dark:#031b3c;
  --gold:#f4b400;
  --gold-soft:#ffd45a;
  --board:#0b3569;
}
.site-header{
  background:linear-gradient(135deg,#031b3c,#064b93);
  border-bottom:3px solid var(--gold);
}
.header-inner{min-height:78px}
.brand-block{display:flex;align-items:center;gap:14px}
.site-logo{height:52px;width:auto;display:block}
.logo-link{display:flex;align-items:center}
.brand{color:#fff}
.tagline{color:#d7e7ff}
.hero{
  background:linear-gradient(135deg,#031b3c,#0b4f9f);
  color:#fff;
  border-bottom:4px solid var(--gold);
}
.hero p{color:#d7e7ff}
.primary-btn{
  background:linear-gradient(135deg,var(--gold-soft),var(--gold));
  color:#071c3d;
  box-shadow:0 6px 18px rgba(244,180,0,.25);
}
.primary-btn:hover{filter:brightness(.98)}
.secondary-btn{
  border-color:#cdd7e5;
}
.score-box{
  background:linear-gradient(135deg,#031b3c,#0b4f9f);
  border-bottom:3px solid var(--gold);
}
.launcher-card{
  border:1px solid #dfe7f1;
  box-shadow:0 10px 28px rgba(3,27,60,.08);
}
.launcher-card.playable:hover{
  border-color:var(--gold);
  box-shadow:0 16px 36px rgba(3,27,60,.14);
}
.launcher-icon{
  background:linear-gradient(145deg,#052b5e,#0b4f9f);
  color:#fff;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.08),0 8px 20px rgba(3,27,60,.12);
}
.playable .launcher-status{color:#9a6d00}
.ad-placeholder,.ad-wrap{
  border-color:#9db5d4;
  background:#f8fbff;
}
footer{
  background:linear-gradient(135deg,#031b3c,#062f63);
  color:#dce9ff;
  padding:28px 0;
  margin-top:24px;
}
.game-shell{
  border-top:4px solid var(--gold);
}

/* Memory Match */
.memory-meta{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:16px;
  color:var(--muted);
}
.memory-board{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  width:min(100%,620px);
  margin:0 auto;
}
.memory-card{
  aspect-ratio:1;
  border:0;
  background:transparent;
  padding:0;
  cursor:pointer;
  perspective:900px;
}
.memory-card-inner{
  position:relative;
  width:100%;
  height:100%;
  display:block;
  transform-style:preserve-3d;
  transition:transform .35s ease;
}
.memory-card.flipped .memory-card-inner{
  transform:rotateY(180deg);
}
.memory-card-front,.memory-card-back{
  position:absolute;
  inset:0;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  backface-visibility:hidden;
  font-weight:900;
  box-shadow:0 8px 20px rgba(3,27,60,.12);
}
.memory-card-front{
  background:linear-gradient(145deg,#031b3c,#0b4f9f);
  color:var(--gold-soft);
  border:2px solid rgba(244,180,0,.65);
  letter-spacing:1px;
}
.memory-card-back{
  background:#fff;
  color:#071c3d;
  border:2px solid var(--gold);
  transform:rotateY(180deg);
  font-size:clamp(1.8rem,7vw,3rem);
}
.memory-card.matched .memory-card-back{
  box-shadow:0 0 0 3px rgba(244,180,0,.25),0 8px 20px rgba(3,27,60,.12);
}
@media(max-width:650px){
  .site-logo{height:40px}
  .brand-block{gap:9px}
  .memory-board{gap:8px}
  .memory-card-front,.memory-card-back{border-radius:12px}
}


/* Sudoku */
.sudoku-board{
  width:min(100%,540px);
  aspect-ratio:1;
  margin:0 auto 18px;
  display:grid;
  grid-template-columns:repeat(9,1fr);
  border:3px solid #031b3c;
  background:#fff;
}
.sudoku-cell{
  border:1px solid #cbd5e1;
  background:#fff;
  font-weight:800;
  font-size:clamp(.9rem,3vw,1.35rem);
  color:#0b4f9f;
  padding:0;
}
.sudoku-cell.given{
  background:#eef3f8;
  color:#071c3d;
}
.sudoku-cell.selected{
  background:#fff3c4;
  outline:3px solid #f4b400;
  z-index:2;
}
.sudoku-cell.wrong{
  background:#fee2e2;
  color:#b91c1c;
}
.sudoku-cell:nth-child(9n+3),
.sudoku-cell:nth-child(9n+6){border-right:2px solid #031b3c}
.sudoku-cell:nth-child(n+19):nth-child(-n+27),
.sudoku-cell:nth-child(n+46):nth-child(-n+54){border-bottom:2px solid #031b3c}
.sudoku-pad{
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:8px;
  width:min(100%,540px);
  margin:0 auto;
}
.sudoku-pad button{
  padding:12px 0;
  border:1px solid #d4dce8;
  border-radius:10px;
  background:#fff;
  color:#071c3d;
  font-weight:800;
  cursor:pointer;
}

/* Tic Tac Toe */
.ttt-status{
  text-align:center;
  font-weight:800;
  color:#0b4f9f;
  margin-bottom:14px;
}
.ttt-board{
  width:min(100%,460px);
  aspect-ratio:1;
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  background:#031b3c;
  padding:10px;
  border-radius:20px;
}
.ttt-cell{
  border:0;
  border-radius:14px;
  background:#fff;
  font-size:clamp(3rem,12vw,5.5rem);
  font-weight:900;
  cursor:pointer;
}
.ttt-cell.x-cell{color:#0b4f9f}
.ttt-cell.o-cell{color:#f4b400}

/* Word Puzzle */
.word-game{
  width:min(100%,640px);
  margin:10px auto 0;
  text-align:center;
}
.word-category{
  color:var(--muted);
  margin-bottom:14px;
}
.word-scramble{
  background:linear-gradient(135deg,#031b3c,#0b4f9f);
  color:#fff;
  border-bottom:4px solid #f4b400;
  border-radius:18px;
  padding:24px 16px;
  font-size:clamp(2rem,9vw,4rem);
  letter-spacing:.22em;
  font-weight:900;
  margin-bottom:16px;
}
.word-hint{
  background:#fff8db;
  color:#7c5a00;
  border:1px solid #f4d35e;
  padding:12px 14px;
  border-radius:12px;
  margin-bottom:14px;
}
.word-form{
  display:flex;
  gap:10px;
}
.word-form input{
  flex:1;
  min-width:0;
  border:1px solid #cbd5e1;
  border-radius:10px;
  padding:12px 14px;
  font-size:1rem;
}
.word-feedback{
  min-height:26px;
  margin-top:12px;
  font-weight:800;
}
.word-feedback.good{color:#15803d}
.word-feedback.bad{color:#b91c1c}

@media(max-width:520px){
  .sudoku-pad{grid-template-columns:repeat(5,1fr)}
  .word-form{flex-direction:column}
}

.ttt-mode-picker{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  flex-wrap:wrap;background:#f7f9fc;border:1px solid #dfe7f1;
  border-radius:14px;padding:12px 14px;margin:18px 0 4px;font-weight:800
}
.ttt-mode-buttons{display:flex;gap:8px;flex-wrap:wrap}
.ttt-mode-active{box-shadow:0 5px 14px rgba(244,180,0,.22)}

.arcade-hud{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:12px auto;color:var(--muted);font-weight:700;width:min(100%,600px)}
.canvas-wrap{display:flex;justify-content:center}#bbCanvas{width:min(100%,600px);height:auto;border:7px solid #031b3c;border-radius:18px;touch-action:none}.game-tip{text-align:center;color:var(--muted)}
.mode-row,.quiz-top{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:18px 0}.cf-board{width:min(100%,560px);margin:auto;display:grid;grid-template-columns:repeat(7,1fr);gap:7px;background:#0b4f9f;padding:10px;border-radius:18px}.cf-cell{aspect-ratio:1;border:0;border-radius:50%;background:#fff;box-shadow:inset 0 2px 7px rgba(0,0,0,.15)}.cf-cell.red{background:#e33b3b}.cf-cell.yellow{background:#f4b400}
.quiz-top select{padding:10px;border:1px solid #cbd5e1;border-radius:9px;margin-left:6px}.quiz-area{max-width:680px;margin:auto}.quiz-answers{display:grid;grid-template-columns:1fr 1fr;gap:10px}.quiz-answer{padding:15px;border:1px solid #cbd5e1;border-radius:12px;background:#fff;font-weight:700;cursor:pointer}.quiz-answer.correct{background:#dcfce7;border-color:#22c55e}.quiz-answer.wrong{background:#fee2e2;border-color:#ef4444}
@media(max-width:520px){.quiz-answers{grid-template-columns:1fr}.cf-board{gap:4px;padding:7px}}

.ms-scroll{overflow:auto;padding-bottom:6px}.ms-board{display:grid;gap:2px;width:max-content;margin:10px auto;background:#031b3c;padding:5px;border-radius:10px}.ms-cell{width:34px;height:34px;border:0;background:#dce7f5;font-weight:900}.ms-cell.open{background:#fff}
.typing-text{max-width:760px;margin:18px auto;padding:20px;border-radius:15px;background:#eef3ff;font-size:1.15rem;line-height:1.8;color:#334155}.typing-input{display:block;width:min(100%,760px);height:150px;margin:auto;padding:16px;border:2px solid #9db5d4;border-radius:14px;font:inherit;line-height:1.6}
.rps-result{display:flex;justify-content:center;gap:35px;margin:24px 0}.rps-result div{text-align:center}.rps-result span{display:block;color:var(--muted)}.rps-result strong{font-size:4rem}.rps-message{text-align:center}.rps-buttons{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}.rps-buttons button{width:130px;height:120px;border:2px solid #dfe7f1;border-radius:18px;background:#fff;font-size:3rem;cursor:pointer}.rps-buttons span{display:block;font-size:.9rem;font-weight:800;color:#071c3d;margin-top:7px}


/* WordPress plugin isolation */
.vsrg-app{width:100%;max-width:none;margin:0;padding:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.vsrg-app *{box-sizing:border-box}
.vsrg-app .container{width:min(1000px,calc(100% - 28px));margin:auto}
.vsrg-content{padding-top:24px;padding-bottom:30px}
.vsrg-header{margin-left:calc(50% - 50vw);margin-right:calc(50% - 50vw)}
.vsrg-app a{text-decoration:none}
.vsrg-app .game-shell .game-shell{box-shadow:none;padding:0;border-top:0}


/* Standalone WordPress route hard reset */
html,body{margin:0;padding:0;width:100%;min-height:100%;max-width:none}
body{background:var(--bg)!important}
body > header, body > main, body > footer{width:100%}
.site-header{width:100%}
main.container{padding-top:24px;padding-bottom:40px}


/* v2.1 Number Merge rendering safeguard */
.board{
  grid-template-rows:repeat(4,1fr);
}
.board .tile{
  min-width:0;
  min-height:0;
}
