
:root{--p:#6425f5;--n:#031331;--bg:#f7f9ff;--panel:#fff;--text:#071331;--muted:#5b6780;--line:#dfe5ef}*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui,sans-serif;background:var(--bg);color:var(--text)}a{text-decoration:none;color:inherit}button,input{font:inherit}.container{width:min(1780px,calc(100% - 64px));margin:auto}header{position:sticky;top:0;z-index:20;background:#031331;color:#fff}.nav{height:68px;display:flex;align-items:center;gap:22px}.logo{display:flex;align-items:center;gap:10px;font-weight:900}.li{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(135deg,#17d8ff,#0875ff)}.lt b{color:#10d2f6}.lt small{display:block;font-size:10px;letter-spacing:.5em}.navlinks{display:flex;gap:8px;justify-content:center;flex:1}.navlinks a{padding:11px 14px;border-radius:10px;font-weight:800;font-size:14px}.navlinks a:hover,.navlinks .active{background:#211063}.acts{display:flex;gap:9px}.ib,.mb{width:42px;height:42px;border:1px solid #ffffff44;border-radius:11px;background:#ffffff08;color:#fff}.dev{padding:12px 16px;border-radius:11px;background:red;color:#fff;font-weight:900}.mb{display:none}.overlay{position:fixed;inset:0;z-index:50;background:#020818cc;display:none;padding:85px 20px}.overlay.open{display:block}.sp{width:min(850px,100%);margin:auto;background:#fff;border-radius:16px;overflow:hidden}.sh{display:flex;gap:10px;padding:15px}.sh input{flex:1;padding:12px;border:1px solid var(--line);border-radius:9px}.sr{padding:10px;max-height:65vh;overflow:auto}.sri{display:flex;justify-content:space-between;padding:12px;border-radius:9px}.sri:hover{background:#f1edff}.sri small{display:block;color:#6d7890}.adtop{min-height:130px;display:flex;flex-direction:column;justify-content:center;text-align:center;background:#fff}.al{font-size:10px;color:#8a94a8;text-transform:uppercase}.hero{text-align:center;padding:34px 0;background:linear-gradient(#fcfaff,#fff)}.crumb{font-size:13px;color:#68748a}.crumb a{color:var(--p);font-weight:800}.badge{display:inline-block;margin-top:12px;padding:8px 12px;border-radius:999px;background:#eee8ff;color:#5d27db;font-size:12px;font-weight:900}.hero h1{font-size:clamp(36px,4vw,52px);margin:12px 0 8px}.hero p{max-width:730px;margin:auto;color:#526079}.main{padding:26px 0 42px}.layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:22px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:16px;box-shadow:0 7px 24px #1a264a0d}.tool{overflow:hidden}.thead{padding:18px 20px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.thead h2{margin:0}.body{padding:20px}.btn{border:0;border-radius:10px;padding:12px 16px;background:linear-gradient(135deg,#6f2cff,#5221e9);color:#fff;font-weight:900;cursor:pointer}.status{margin:14px 0;padding:12px;border-radius:10px;background:#f4f1ff;font-weight:800;text-align:center}.side{position:sticky;top:88px}.side .panel{padding:16px}.related{display:flex;flex-direction:column;gap:8px}.related a{padding:10px;border-radius:9px;background:#f7f4ff;color:#5122c7;font-size:13px;font-weight:800}.bottomad{margin-top:22px;min-height:130px;text-align:center}.footer{background:#031331;color:#fff;padding:34px 0 18px}.fg{display:grid;grid-template-columns:1.3fr 1fr 1fr;gap:50px}.fl{display:flex;flex-direction:column;gap:8px}.fl a{color:#e6ebf5}.fb{margin-top:26px;padding-top:15px;border-top:1px solid #ffffff26;color:#c7d1e3}.game-grid{display:grid;gap:12px}.memory-grid{grid-template-columns:repeat(4,1fr);max-width:650px;margin:auto}.card{aspect-ratio:1;border:0;border-radius:14px;background:linear-gradient(135deg,#6f2cff,#2d8cff);color:#fff;font-size:34px;font-weight:900;cursor:pointer}.card.revealed,.card.matched{background:#fff;color:#111;border:2px solid #ddd}.simon{display:grid;grid-template-columns:repeat(2,150px);gap:14px;justify-content:center}.simon button{height:150px;border:0;border-radius:22px;opacity:.75}.simon button.active{opacity:1;transform:scale(1.04);box-shadow:0 0 0 5px #fff,0 0 25px #0005}.shape-grid{grid-template-columns:repeat(4,1fr)}.shape-item{min-height:110px;border:2px dashed #c9d2e0;border-radius:14px;background:#fff;font-size:52px}.color-grid{grid-template-columns:repeat(3,1fr)}.color-btn{height:110px;border:4px solid #fff;border-radius:15px;box-shadow:0 0 0 1px #ccd5e3}.pattern{display:flex;justify-content:center;gap:12px;align-items:center;flex-wrap:wrap}.pattern span,.pattern button{min-width:70px;height:70px;display:grid;place-items:center;border-radius:13px;border:1px solid #d3dbe8;background:#fff;font-size:30px}.odd-grid{grid-template-columns:repeat(5,1fr)}.odd{min-height:90px;border:1px solid #d6deea;border-radius:12px;background:#fff;font-size:42px}.scene-wrap{display:grid;grid-template-columns:1fr 1fr;gap:14px}.scene{position:relative;min-height:330px;border-radius:16px;background:linear-gradient(#8ad7ff 0 50%,#75c96c 50%);overflow:hidden;border:3px solid #fff}.obj{position:absolute;font-size:46px}.obj.found{opacity:.25;filter:grayscale(1)}.slider{display:grid;grid-template-columns:repeat(3,110px);gap:5px;justify-content:center}.tile{height:110px;border:0;border-radius:8px;background:#6425f5;color:#fff;font-size:32px;font-weight:900}.tile.empty{background:#eef1f7}.block-board{display:grid;grid-template-columns:repeat(8,42px);gap:4px;justify-content:center}.cell{width:42px;height:42px;border-radius:7px;background:#eef1f7;border:1px solid #dde4ef}.cell.on{background:#6425f5}.cards-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:15px}.tool-card{display:block;padding:20px}.tool-card h3{margin:0 0 8px}.tool-card p{color:var(--muted)}.tool-card b{color:var(--p)}body.dark{--bg:#071022;--panel:#0e1a32;--text:#fff;--muted:#b8c2d8;--line:#263653}body.dark .hero{background:#071022}body.dark .sp,body.dark .shape-item,body.dark .pattern span,body.dark .pattern button,body.dark .odd{background:#111f39;color:#fff}@media(max-width:1050px){.layout{grid-template-columns:1fr}.side{position:static}.fg{grid-template-columns:repeat(2,1fr)}}@media(max-width:900px){.navlinks{display:none}.navlinks.open{display:flex;position:absolute;top:68px;left:18px;right:18px;flex-direction:column;background:#06183a;padding:12px;border-radius:12px}.mb{display:block}.dev{display:none}}@media(max-width:620px){.container{width:calc(100% - 24px)}.fg{grid-template-columns:1fr}.shape-grid,.odd-grid{grid-template-columns:repeat(3,1fr)}.scene-wrap{grid-template-columns:1fr}.simon{grid-template-columns:repeat(2,110px)}.simon button{height:110px}.slider{grid-template-columns:repeat(3,88px)}.tile{height:88px}.block-board{grid-template-columns:repeat(8,32px)}.cell{width:32px;height:32px}}

/* Child-friendly celebrations and progress */
.celebration-toast{position:fixed;left:50%;top:105px;transform:translate(-50%,-20px) scale(.92);z-index:9999;min-width:240px;max-width:calc(100vw - 30px);padding:16px 24px;border-radius:18px;background:linear-gradient(135deg,#6f2cff,#168bff);color:#fff;text-align:center;font-size:20px;font-weight:950;box-shadow:0 20px 55px #35168d55;opacity:0;pointer-events:none;transition:.28s ease}.celebration-toast.show{opacity:1;transform:translate(-50%,0) scale(1)}
.confetti-piece{position:fixed;z-index:9998;top:80px;width:10px;height:16px;border-radius:3px;pointer-events:none;animation:confettiFall 1.4s ease-in forwards}@keyframes confettiFall{0%{opacity:1;transform:translateY(-20px) rotate(0)}100%{opacity:0;transform:translateY(55vh) rotate(620deg)}}
.status.good{background:#e8faef;color:#117646;border:1px solid #b9ebce}.status.bad{background:#fff0f1;color:#b52d37;border:1px solid #ffc8cc}.status.next{background:#fff6d9;color:#8b5b00;border:1px solid #f7df96}
.progress-row{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:0 0 14px}.progress-pill{padding:7px 11px;border-radius:999px;background:#eee8ff;color:#5821d4;font-size:12px;font-weight:900}
@media(max-width:620px){.celebration-toast{top:82px;font-size:17px;padding:13px 18px}}

.success-overlay{position:fixed;inset:0;z-index:9997;display:grid;place-items:center;background:rgba(3,19,49,.28);backdrop-filter:blur(3px);opacity:0;visibility:hidden;transition:.22s ease;pointer-events:none}.success-overlay.show{opacity:1;visibility:visible}.success-card{min-width:290px;max-width:calc(100vw - 34px);padding:28px 30px;border-radius:24px;background:#fff;text-align:center;box-shadow:0 25px 80px rgba(24,12,70,.35);transform:scale(.82);transition:.25s ease}.success-overlay.show .success-card{transform:scale(1)}.success-stars{font-size:38px;margin-bottom:8px;animation:starBounce .55s ease infinite alternate}.success-card strong{display:block;color:#5122c7;font-size:25px;line-height:1.2}.success-card span{display:block;margin-top:8px;color:#64748b;font-size:14px;font-weight:800}@keyframes starBounce{to{transform:translateY(-7px) scale(1.06)}}

.word-search{display:grid;grid-template-columns:repeat(10,42px);gap:4px;justify-content:center}
.word-cell{width:42px;height:42px;border:1px solid #d5ddea;border-radius:7px;background:#fff;font-weight:900;cursor:pointer}
.word-cell.selected{background:#ede7ff;color:#5422d4}.word-cell.found{background:#dcfce7;color:#166534}
.word-list{display:flex;gap:9px;justify-content:center;flex-wrap:wrap;margin-top:16px}.word-list span{padding:7px 10px;border-radius:999px;background:#f3f0ff;font-weight:800}.word-list span.done{text-decoration:line-through;opacity:.55}
.crossword-grid{display:grid;grid-template-columns:repeat(7,48px);gap:3px;justify-content:center}
.cross-cell{width:48px;height:48px;border:1px solid #cdd6e4;position:relative}.cross-cell.block{background:#1f2937}.cross-cell input{width:100%;height:100%;border:0;text-align:center;font-size:23px;font-weight:900;text-transform:uppercase}.cross-cell small{position:absolute;left:3px;top:1px;font-size:9px}
.clues{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px;text-align:left}
.sudoku{display:grid;grid-template-columns:repeat(4,68px);gap:4px;justify-content:center}.sudoku input{width:68px;height:68px;text-align:center;font-size:26px;font-weight:900;border:1px solid #cfd8e6;border-radius:8px}.sudoku input.fixed{background:#eee8ff;color:#5422d4}
.math-question{font-size:54px;font-weight:950;margin:15px}.math-answers{display:flex;justify-content:center;gap:12px;flex-wrap:wrap}.math-answers button{min-width:90px;padding:16px;border:2px solid #d8deea;background:#fff;border-radius:13px;font-size:24px;font-weight:900}
.picture-grid{display:grid;grid-template-columns:repeat(3,120px);gap:6px;justify-content:center}.picture-tile{height:120px;border:0;border-radius:8px;font-size:54px;background:linear-gradient(135deg,#dbeafe,#ede9fe);cursor:pointer}
.maze{display:grid;grid-template-columns:repeat(10,42px);gap:0;justify-content:center}.maze-cell{width:42px;height:42px;background:#fff;border:1px solid #e5e7eb}.maze-cell.wall{background:#1e293b}.maze-cell.player{background:#fde68a}.maze-cell.goal{background:#bbf7d0}
.ttt{display:grid;grid-template-columns:repeat(3,105px);gap:7px;justify-content:center}.ttt button{height:105px;border:2px solid #d8deea;background:#fff;border-radius:12px;font-size:48px;font-weight:900}
@media(max-width:620px){
.word-search{grid-template-columns:repeat(10,29px)}.word-cell{width:29px;height:29px;font-size:11px}
.crossword-grid{grid-template-columns:repeat(7,38px)}.cross-cell{width:38px;height:38px}
.sudoku{grid-template-columns:repeat(4,55px)}.sudoku input{width:55px;height:55px}
.picture-grid{grid-template-columns:repeat(3,88px)}.picture-tile{height:88px}
.maze{grid-template-columns:repeat(10,29px)}.maze-cell{width:29px;height:29px}
.ttt{grid-template-columns:repeat(3,82px)}.ttt button{height:82px}
.clues{grid-template-columns:1fr}
}


/* Upgraded real games */
.game-shell{max-width:1100px;margin:auto}
.game-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.game-stats{display:flex;gap:10px;flex-wrap:wrap}
.stat-pill{padding:9px 12px;border-radius:10px;background:#eef3fb;color:#29415f;font-size:13px;font-weight:900}
.difficulty-tabs{display:flex;gap:7px;flex-wrap:wrap}
.difficulty-tabs button{border:1px solid #d5ddeb;background:#fff;border-radius:9px;padding:9px 12px;font-weight:850;color:#5f6d83}
.difficulty-tabs button.active{background:#e4efff;color:#1e5ac7;border-color:#8db7f3}

/* Real maze */
.real-maze-wrap{display:flex;justify-content:center;overflow:auto;padding:10px}
.real-maze{display:grid;background:#2f8e24;padding:7px;border-radius:10px;box-shadow:0 9px 25px rgba(21,77,18,.22)}
.real-maze-cell{width:36px;height:36px;display:grid;place-items:center;background:#fff;font-size:20px;position:relative}
.real-maze-cell.wall{background:linear-gradient(135deg,#257d1e,#4db53d);box-shadow:inset 0 0 0 2px rgba(24,96,19,.23)}
.real-maze-cell.path.visited{background:#f5f6d6}
.real-maze-cell.start{background:#dbeafe}
.real-maze-cell.finish{background:#dcfce7}
.real-maze-controls{display:grid;grid-template-columns:repeat(3,52px);gap:6px;justify-content:center;margin-top:15px}
.real-maze-controls button{height:48px;border:1px solid #ced7e6;background:#fff;border-radius:10px;font-size:21px;font-weight:900}
.real-maze-controls .blank{visibility:hidden}

/* Real Sudoku */
.sudoku-app{display:grid;grid-template-columns:minmax(420px,720px) minmax(250px,360px);gap:26px;align-items:start}
.sudoku-grid9{display:grid;grid-template-columns:repeat(9,1fr);border:3px solid #334b67;background:#334b67;gap:1px}
.sudoku-cell9{aspect-ratio:1;position:relative;background:#fff}
.sudoku-cell9:nth-child(3n){border-right:2px solid #334b67}
.sudoku-cell9:nth-child(9n){border-right:0}
.sudoku-cell9.row-block{border-bottom:2px solid #334b67}
.sudoku-cell9 button{width:100%;height:100%;border:0;background:transparent;font-size:clamp(20px,3vw,38px);font-weight:600;color:#334b67}
.sudoku-cell9.fixed{background:#e8f1f8}
.sudoku-cell9.fixed button{font-weight:800}
.sudoku-cell9.selected{background:#b9daf6}
.sudoku-cell9.related{background:#e8f4fd}
.sudoku-cell9.error button{color:#d4333e;background:#ffe9eb}
.sudoku-cell9.correct button{color:#2362bc}
.sudoku-side{display:flex;flex-direction:column;gap:14px}
.sudoku-meta{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sudoku-tool-row{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.round-tool{min-height:74px;border:0;border-radius:50%;background:#edf2fa;color:#2f62bc;font-size:26px;font-weight:900}
.number-pad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.number-pad button{min-height:82px;border:0;border-radius:9px;background:#e8eef8;color:#2f61bd;font-size:42px}
.sudoku-new{width:100%;padding:16px;border:0;border-radius:9px;background:#5278c5;color:#fff;font-size:18px;font-weight:900}

/* Real word search */
.ws-layout{display:grid;grid-template-columns:minmax(400px,700px) 240px;gap:22px;align-items:start}
.ws-grid{display:grid;grid-template-columns:repeat(12,1fr);gap:3px;padding:8px;border-radius:12px;background:#edf2f8}
.ws-cell{aspect-ratio:1;border:0;border-radius:6px;background:#fff;font-size:clamp(13px,2vw,20px);font-weight:900;color:#243b59;cursor:pointer}
.ws-cell.selected{background:#d8ccff;color:#5324ca}
.ws-cell.found{background:#c9f4dc;color:#117544}
.ws-word-panel{padding:15px;border:1px solid #dce3ed;border-radius:12px;background:#fff}
.ws-word-panel h3{margin-top:0}
.ws-word{display:flex;justify-content:space-between;padding:8px 9px;border-bottom:1px solid #edf0f5;font-weight:850}
.ws-word.done{text-decoration:line-through;color:#15905b;opacity:.7}

/* Real crossword */
.crossword-app{display:grid;grid-template-columns:minmax(400px,650px) 320px;gap:24px}
.real-cross-grid{display:grid;gap:2px;background:#263a50;padding:3px;max-width:650px}
.real-cross-cell{aspect-ratio:1;background:#fff;position:relative}
.real-cross-cell.block{background:#263a50}
.real-cross-cell input{width:100%;height:100%;border:0;text-align:center;text-transform:uppercase;font-size:clamp(18px,3vw,32px);font-weight:850;color:#263a50;outline:0}
.real-cross-cell input:focus{background:#dceeff}
.real-cross-cell input.wrong{background:#ffe7e9;color:#c82f3a}
.real-cross-number{position:absolute;left:3px;top:1px;font-size:9px;font-weight:900;color:#53647b;z-index:2}
.crossword-clues{display:grid;grid-template-columns:1fr;gap:15px}
.clue-box{padding:14px;border:1px solid #dce3ed;border-radius:12px;background:#fff}
.clue-box h3{margin:0 0 10px}
.clue-box p{margin:7px 0;font-size:13px;line-height:1.4}

/* Draggable picture puzzle */
.picture-stage{max-width:660px;margin:auto;position:relative}
.real-picture-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:5px;padding:7px;border-radius:12px;background:#273b58}
.real-picture-tile{aspect-ratio:1;border:0;border-radius:6px;cursor:grab;background-size:300% 300%;box-shadow:inset 0 0 0 1px rgba(255,255,255,.45)}
.real-picture-tile.dragging{opacity:.4}
.picture-preview{width:150px;aspect-ratio:1;border-radius:10px;background-size:cover;background-position:center;margin:0 auto 12px}

/* Better game navigation */
.related{max-height:480px;overflow:auto}
.related a{display:block}
.related a:hover{background:#e9e1ff}
.brain-nav-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px;margin-top:14px}
.brain-nav-grid a{padding:9px;border:1px solid #dce3ed;border-radius:9px;background:#fff;font-size:12px;font-weight:800;color:#4f24c5;text-align:center}

@media(max-width:1000px){
.sudoku-app,.ws-layout,.crossword-app{grid-template-columns:1fr}
.sudoku-side{max-width:650px;margin:auto;width:100%}
}
@media(max-width:620px){
.real-maze-cell{width:26px;height:26px;font-size:15px}
.ws-layout{display:block}.ws-word-panel{margin-top:15px}
.sudoku-app{display:block}.sudoku-grid9{margin-bottom:15px}
.sudoku-tool-row{grid-template-columns:repeat(4,1fr)}
.round-tool{min-height:55px;font-size:20px}
.number-pad button{min-height:60px;font-size:30px}
.crossword-app{display:block}.crossword-clues{margin-top:15px}
.brain-nav-grid{grid-template-columns:1fr}
}

/* Word-search pointer sliding */
.ws-grid{
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
}
.ws-cell{
  touch-action:none;
  user-select:none;
  -webkit-user-select:none;
}

/* Picture source selector */
.picture-source-panel{
  display:grid;
  grid-template-columns:220px minmax(0,1fr);
  gap:14px;
  margin-bottom:18px;
}
.picture-upload{
  min-height:126px;
  border:2px dashed #b9c5d8;
  border-radius:13px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:#f8faff;
  color:#4e5f78;
  font-weight:900;
  cursor:pointer;
  text-align:center;
}
.picture-upload input{
  max-width:190px;
  font-size:12px;
}
.picture-defaults{
  display:grid;
  grid-template-columns:repeat(5,minmax(90px,1fr));
  gap:9px;
}
.picture-defaults button{
  border:2px solid #dce3ee;
  border-radius:11px;
  background:#fff;
  padding:7px;
  cursor:pointer;
  text-align:center;
}
.picture-defaults button.active{
  border-color:#6425f5;
  box-shadow:0 0 0 3px rgba(100,37,245,.12);
}
.picture-defaults strong{
  display:block;
  margin-top:6px;
  font-size:11px;
}
.default-art{
  display:block;
  width:100%;
  aspect-ratio:1;
  border-radius:8px;
  background-position:center;
  background-size:cover;
}
.artist-one{background-image:linear-gradient(135deg,#f6d365,#fda085)}
.artist-two{background-image:linear-gradient(135deg,#5f27cd,#48dbfb)}
.football-one{background-image:linear-gradient(135deg,#48dbfb,#1dd1a1)}
.football-two{background-image:linear-gradient(135deg,#222f3e,#54a0ff)}
.nature{background-image:linear-gradient(180deg,#74b9ff 0 50%,#00b894 50%)}

@media(max-width:850px){
  .picture-source-panel{grid-template-columns:1fr}
}
@media(max-width:620px){
  .picture-defaults{grid-template-columns:repeat(2,1fr)}
}

/* Final professional Picture Puzzle */
.picture-pro{max-width:1250px}
.picture-subtitle{margin-top:3px;color:#60708a;font-size:13px}
.picture-toolbar{display:flex;gap:8px;flex-wrap:wrap}
.picture-settings{
  display:grid;
  grid-template-columns:210px minmax(0,1fr);
  gap:14px;
  margin-bottom:18px;
}
.picture-upload{
  min-height:138px;
  padding:14px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:5px;
  border:2px dashed #b8c6dc;
  border-radius:14px;
  background:#f8faff;
  text-align:center;
  cursor:pointer;
}
.picture-upload .upload-icon{font-size:31px}
.picture-upload small{color:#748097}
.picture-upload input{width:100%;max-width:180px;font-size:12px}
.footballer-gallery{
  display:grid;
  grid-template-columns:repeat(4,minmax(130px,1fr));
  gap:10px;
}
.footballer-gallery button{
  padding:7px;
  border:2px solid #dce3ee;
  border-radius:13px;
  background:#fff;
  cursor:pointer;
}
.footballer-gallery button.active{
  border-color:#6425f5;
  box-shadow:0 0 0 3px rgba(100,37,245,.12);
}
.footballer-gallery strong{
  display:block;
  margin-top:7px;
  font-size:12px;
}
.footballer-thumb{
  display:block;
  width:100%;
  aspect-ratio:1;
  border-radius:9px;
  background-position:center top;
  background-size:cover;
}
.nature-thumb{
  background:
    radial-gradient(circle at 75% 22%,#ffe37b 0 9%,transparent 10%),
    linear-gradient(#75bfff 0 50%,#13b886 50%);
}
.picture-controlbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.picture-controlbar .difficulty-tabs{
  align-items:center;
}
.picture-controlbar .difficulty-tabs span{
  font-weight:900;
  color:#53637b;
}
.picture-stage-pro{
  width:min(760px,100%);
  margin:auto;
  padding:7px;
  border-radius:15px;
  background:#263a55;
  overflow:hidden;
}
.picture-stage-pro:fullscreen{
  width:min(90vh,90vw);
  display:grid;
  place-items:center;
  padding:20px;
  background:#10192a;
}
.picture-stage-pro:fullscreen .real-picture-grid-pro{
  width:min(85vh,85vw);
}
.real-picture-grid-pro{
  width:100%;
  display:grid;
  gap:5px;
}
.real-picture-tile-pro{
  aspect-ratio:1;
  padding:0;
  border:0;
  border-radius:7px;
  background-repeat:no-repeat;
  cursor:grab;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.42);
  transition:transform .15s ease,opacity .15s ease;
}
.real-picture-tile-pro:hover{transform:scale(.985)}
.real-picture-tile-pro.dragging{opacity:.38}
.real-picture-tile-pro.tap-selected{
  outline:5px solid #ffe066;
  outline-offset:-5px;
}
.real-picture-tile-pro.correct-piece{
  box-shadow:inset 0 0 0 2px rgba(38,185,103,.45);
}
.picture-preview-panel{
  max-width:320px;
  margin:0 auto 14px;
  padding:8px;
  border-radius:12px;
  background:#263a55;
}
.picture-preview-large{
  width:100%;
  aspect-ratio:1;
  border-radius:7px;
  background-size:cover;
  background-position:center top;
}
.picture-credit{
  margin-top:12px;
  color:#6d7890;
  font-size:11px;
  text-align:center;
}
.picture-credit a{
  color:#5422d4;
  text-decoration:underline;
}
@media(max-width:900px){
  .picture-settings{grid-template-columns:1fr}
}
@media(max-width:700px){
  .footballer-gallery{grid-template-columns:repeat(2,1fr)}
  .picture-controlbar{align-items:flex-start;flex-direction:column}
  .picture-toolbar{width:100%}
  .picture-toolbar button{flex:1}
}

/* Compact upload and guaranteed puzzle sizing */
.picture-settings{
  grid-template-columns:180px minmax(0,1fr)!important;
  align-items:stretch;
}
.compact-upload{
  min-height:104px!important;
  height:104px!important;
  padding:10px!important;
  display:grid!important;
  grid-template-columns:34px 1fr!important;
  grid-template-rows:auto auto!important;
  column-gap:9px!important;
  align-content:center!important;
  justify-items:start!important;
  text-align:left!important;
}
.compact-upload .upload-icon{
  grid-row:1/3;
  align-self:center;
  font-size:26px!important;
}
.compact-upload .upload-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
  line-height:1.1;
}
.compact-upload input{
  grid-column:2;
  width:100%!important;
  max-width:135px!important;
  font-size:10px!important;
}
.footballer-gallery{
  grid-template-columns:repeat(4,minmax(115px,1fr))!important;
}
.footballer-thumb{
  min-height:88px;
  background-color:#e8eef8;
  background-repeat:no-repeat;
}
.picture-stage-pro{
  width:min(680px,100%)!important;
  min-width:320px;
  min-height:320px;
  aspect-ratio:1/1;
  display:block!important;
}
.real-picture-grid-pro{
  width:100%!important;
  height:100%!important;
  min-height:306px;
  aspect-ratio:1/1;
}
.real-picture-tile-pro{
  width:100%!important;
  height:100%!important;
  min-width:0;
  min-height:0;
  aspect-ratio:auto!important;
  background-color:#dfe7f3;
}
.picture-preview-large{
  min-height:280px;
}
@media(max-width:900px){
  .picture-settings{grid-template-columns:1fr!important}
  .compact-upload{width:100%;max-width:320px}
}
@media(max-width:620px){
  .footballer-gallery{grid-template-columns:repeat(2,1fr)!important}
  .picture-stage-pro{min-width:0;min-height:280px}
  .real-picture-grid-pro{min-height:266px}
}


/* Compact Sudoku layout: fit full board and controls on normal desktop screens */
.sudoku-page .hero{padding:18px 0 16px}
.sudoku-page .hero .badge{margin-top:7px;padding:6px 10px}
.sudoku-page .hero h1{font-size:clamp(32px,3.2vw,46px);margin:8px 0 5px}
.sudoku-page .hero p{font-size:14px;line-height:1.4}
.sudoku-page .main{padding:16px 0 30px}
.sudoku-page .layout{grid-template-columns:minmax(0,1fr) 280px;gap:16px}
.sudoku-page .thead{padding:13px 16px}
.sudoku-page .thead h2{font-size:22px}
.sudoku-page .body{padding:14px}
.sudoku-page .game-shell{max-width:920px;margin:auto}
.sudoku-page .game-topbar{margin-bottom:10px}
.sudoku-page .difficulty-tabs{gap:6px}
.sudoku-page .difficulty-tabs button{padding:7px 10px;font-size:13px}
.sudoku-page .stat-pill{padding:7px 10px;font-size:12px}
.sudoku-page .sudoku-app{grid-template-columns:minmax(420px,520px) 230px;gap:18px;justify-content:center}
.sudoku-page .sudoku-grid9{width:min(100%,520px);max-width:520px;margin:auto;border-width:2px}
.sudoku-page .sudoku-cell9 button{font-size:clamp(20px,2.2vw,31px)}
.sudoku-page .sudoku-side{gap:10px;max-width:230px}
.sudoku-page .sudoku-meta{gap:7px}
.sudoku-page .sudoku-tool-row{gap:7px}
.sudoku-page .round-tool{min-height:52px;width:52px;font-size:20px;margin:auto}
.sudoku-page .number-pad{gap:7px}
.sudoku-page .number-pad button{min-height:58px;font-size:30px;border-radius:8px}
.sudoku-page .sudoku-new{padding:12px;font-size:15px}
.sudoku-page .status{margin:9px 0 0;padding:9px;font-size:13px}
.sudoku-page .side{top:78px}
.sudoku-page .side .panel{padding:12px}
.sudoku-page .related{gap:6px;max-height:390px}
.sudoku-page .related a{padding:8px;font-size:12px}
.sudoku-page .bottomad{margin-top:14px}

@media(max-width:1450px){
  .sudoku-page .layout{grid-template-columns:1fr}
  .sudoku-page .side{display:none}
  .sudoku-page .game-shell{max-width:790px}
}
@media(max-width:900px){
  .sudoku-page .hero{padding:14px 0}
  .sudoku-page .sudoku-app{grid-template-columns:1fr;gap:12px}
  .sudoku-page .sudoku-grid9{width:min(100%,520px)}
  .sudoku-page .sudoku-side{max-width:520px;width:100%;margin:auto}
  .sudoku-page .sudoku-tool-row{grid-template-columns:repeat(4,1fr)}
  .sudoku-page .round-tool{width:50px;height:50px}
  .sudoku-page .number-pad{grid-template-columns:repeat(9,1fr)}
  .sudoku-page .number-pad button{min-height:48px;font-size:24px}
}
@media(max-width:620px){
  .sudoku-page .container{width:calc(100% - 16px)}
  .sudoku-page .thead{padding:11px 12px}
  .sudoku-page .thead h2{font-size:18px}
  .sudoku-page .body{padding:8px}
  .sudoku-page .difficulty-tabs button{padding:6px 8px;font-size:12px}
  .sudoku-page .game-stats{width:100%;justify-content:flex-start}
  .sudoku-page .number-pad{grid-template-columns:repeat(3,1fr)}
  .sudoku-page .number-pad button{min-height:54px;font-size:28px}
  .sudoku-page .sudoku-grid9{width:100%}
}
