:root{
  color-scheme:dark;
  --bg:#0f172a;
  --panel:#1f2937;
  --panel-2:#243044;
  --border:#374151;
  --text:#fff;
  --muted:#aab6c8;
  --blue:#3b82f6;
  --green:#22c55e;
  --green-dark:#15803d;
  --gold:#f59e0b;
  --red:#ef4444;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:110%;text-size-adjust:110%}
body{
  margin:0;
  min-height:100vh;
  background:radial-gradient(circle at top,rgba(59,130,246,.13),transparent 34%),var(--bg);
  color:var(--text);
  font-family:Arial,sans-serif;
  text-align:center;
}
.container{
  width:min(100%,500px);
  margin:auto;
  padding:max(24px,env(safe-area-inset-top)) 16px max(40px,env(safe-area-inset-bottom));
}
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:44px;
  margin-bottom:16px;
}
.brand{
  color:#fff;
  font-weight:800;
  text-decoration:none;
  letter-spacing:-.02em;
}
.balance-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:9px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  background:rgba(31,41,55,.88);
  color:#fff;
  font-weight:800;
  text-decoration:none;
}
.page-header{margin:14px 0 20px}
.page-header h1{margin:0 0 8px;font-size:clamp(30px,9vw,40px);line-height:1.08}
.page-header p{margin:0;color:#d1d5db}
h1,h2,h3{letter-spacing:-.02em}
h2{margin:6px 0 8px}
p{line-height:1.5}
.card{
  background:linear-gradient(145deg,var(--panel-2),var(--panel));
  border:1px solid var(--border);
  border-radius:20px;
  padding:20px;
  margin:14px 0;
  box-shadow:0 14px 36px rgba(0,0,0,.16);
}
.compact-card{padding:16px}
.muted{color:var(--muted);font-size:14px}
.small{font-size:13px}
.row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.row>*{min-width:0}
.stat{font-size:14px;color:#d1d5db}
.big-number{font-size:52px;font-weight:900;line-height:1;margin:8px 0}
button,.button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border:0;
  border-radius:14px;
  padding:15px 18px;
  margin:5px 0;
  background:linear-gradient(135deg,#3b82f6,#2563eb);
  color:#fff;
  font:inherit;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
  touch-action:manipulation;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;
  transition:transform 120ms ease,filter 120ms ease,opacity 120ms ease;
}
button:active,.button:active{transform:scale(.98)}
button:disabled,.button.disabled{opacity:.48;cursor:default;transform:none}
.wide{width:100%}
.green{background:linear-gradient(135deg,#22c55e,#15803d)}
.gold{background:linear-gradient(135deg,#f59e0b,#d97706)}
.secondary{background:#374151}
.ghost{background:transparent;border:1px solid #475569}
.claimed-button{
  background:#16352a;
  border:1px solid #22c55e66;
  color:#86efac;
  opacity:1!important;
}
.progress-button{
  background:#172033;
  border:1px solid #475569;
  color:#cbd5e1;
  opacity:1!important;
}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #fbbf24;outline-offset:3px}
.game-card{text-align:left}
.game-title-row{display:flex;align-items:center;justify-content:space-between;gap:12px}
.game-title-row h2{margin:0}
.play-pill{
  flex:0 0 auto;
  padding:7px 10px;
  border-radius:999px;
  background:#0f172a;
  border:1px solid #475569;
  color:#dbeafe;
  font-size:13px;
  font-weight:800;
}
.reward-rule{margin:5px 0 12px;color:#cbd5e1;font-size:14px}
.status-line{
  margin:10px 0 0;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(15,23,42,.7);
  color:#cbd5e1;
  font-size:13px;
}
.success{color:#86efac}
.warning{color:#fcd34d}
.game-meta{
  display:flex;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
  margin:8px 0 12px;
}
.meta-pill{
  padding:8px 11px;
  border:1px solid #475569;
  border-radius:999px;
  background:#111827;
  color:#e5e7eb;
  font-size:14px;
  font-weight:700;
}
canvas{
  display:block;
  margin:14px auto;
  background:#182334;
  border:2px solid #64748b;
  border-radius:12px;
  max-width:100%;
  height:auto;
  touch-action:none;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}
.controls{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin:10px auto;
}
.game-control{
  min-width:68px;
  min-height:54px;
  padding:12px 15px;
  margin:2px;
  font-size:20px;
  touch-action:manipulation;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}
.swipe-hint{margin:8px 0 0;color:#9ca3af;font-size:13px}
.game-status{
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:8px 12px;
  border-radius:999px;
  background:#172033;
  border:1px solid #374151;
  color:#cbd5e1;
  font-size:13px;
  font-weight:800;
}
.game-status.running{color:#86efac;border-color:#166534;background:#052e16}
.game-status.over{color:#fcd34d;border-color:#92400e;background:#451a03}
.challenge{
  text-align:left;
  position:relative;
  overflow:hidden;
}
.challenge strong{display:block;margin-bottom:4px}
.challenge-progress{
  height:9px;
  margin:12px 0 8px;
  overflow:hidden;
  border-radius:999px;
  background:#0f172a;
  border:1px solid #334155;
}
.challenge-progress>span{
  display:block;
  height:100%;
  width:0;
  border-radius:inherit;
  background:linear-gradient(90deg,#22c55e,#3b82f6);
  transition:width 250ms ease;
}
.reward-grid{display:grid;grid-template-columns:1fr;gap:10px;margin-top:12px}
.reward-option{
  padding:16px;
  border:1px solid #374151;
  border-radius:16px;
  background:#172033;
  text-align:left;
}
.reward-option strong{display:block;margin-bottom:4px}
.reward-option.disabled{opacity:.64}
.progress-wrap{margin:14px 0}
progress{width:100%;height:13px;accent-color:#22c55e}
.history{margin-top:12px;text-align:left}
.history-item{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:11px 0;
  border-bottom:1px solid #334155;
  font-size:14px;
}
.history-item:last-child{border-bottom:0}
.history-source{color:#e5e7eb}
.history-value{font-weight:900;color:#86efac;white-space:nowrap}
dialog{
  width:min(440px,calc(100% - 28px));
  color:#fff;
  background:linear-gradient(145deg,#243044,#1f2937);
  border:1px solid #64748b;
  border-radius:22px;
  padding:22px;
  box-shadow:0 28px 80px rgba(0,0,0,.55);
}
dialog::backdrop{background:rgba(2,6,23,.78);backdrop-filter:blur(2px)}
dialog h2{margin:2px 0 10px}
.modal-message{white-space:pre-line;color:#dbe3ef;margin:0 0 14px}
.modal-actions{display:grid;gap:8px}

/* Rewarded-ad prototype */
.reward-ad-dialog{
  text-align:center;
  padding:24px 22px 20px;
}
.reward-ad-dialog h2{
  margin:0 0 10px;
  font-size:clamp(24px,6vw,30px);
  line-height:1.15;
}
.reward-ad-dialog .modal-message{
  max-width:360px;
  margin:0 auto 16px;
  line-height:1.45;
}
.reward-ad-pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin:2px auto 16px;
  padding:9px 14px;
  border-radius:999px;
  background:#172554;
  border:1px solid #3b82f6;
  color:#dbeafe;
  font-weight:900;
  letter-spacing:.01em;
}
.reward-ad-pill.complete{
  background:#14532d;
  border-color:#22c55e;
  color:#dcfce7;
}
.reward-ad-progress{
  margin:0 0 16px;
  text-align:left;
}
.reward-ad-track{
  width:100%;
  height:16px;
  overflow:hidden;
  border-radius:999px;
  background:#0f172a;
  border:1px solid #64748b;
  box-shadow:inset 0 2px 5px rgba(0,0,0,.35);
}
.reward-ad-fill{
  width:0;
  height:100%;
  border-radius:inherit;
  background:linear-gradient(90deg,#22c55e,#4ade80);
  transition:width 90ms linear;
}
.reward-ad-countdown{
  margin-top:8px;
  text-align:center;
  color:#cbd5e1;
  font-size:14px;
  font-weight:800;
}
.reward-ad-dialog .modal-actions{
  display:flex;
  justify-content:center;
}
.reward-ad-dialog .reward-ad-cancel{
  width:auto;
  min-width:120px;
  padding:10px 18px;
  border-radius:12px;
  font-size:14px;
  background:transparent;
  border:1px solid #64748b;
  color:#cbd5e1;
  box-shadow:none;
}
.reward-ad-dialog .reward-ad-cancel:disabled{
  opacity:.45;
}

.toast{
  position:fixed;
  bottom:max(24px,env(safe-area-inset-bottom));
  left:50%;
  transform:translate(-50%,18px);
  opacity:0;
  background:#14532d;
  border:1px solid #22c55e55;
  padding:13px 18px;
  border-radius:999px;
  z-index:20;
  max-width:90%;
  pointer-events:none;
  box-shadow:0 18px 45px rgba(0,0,0,.4);
  transition:opacity 180ms ease,transform 180ms ease;
}
.toast.show{opacity:1;transform:translate(-50%,0)}
summary{cursor:pointer;color:#93c5fd;padding:5px}
a{color:#93c5fd}
[hidden]{display:none!important}
@media(pointer:coarse){.desktop-controls{display:none!important}}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{transition:none!important;animation:none!important;scroll-behavior:auto!important}
}
.touch-surface,
.touch-surface *{
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
  -webkit-tap-highlight-color:transparent;
}
.touch-surface{touch-action:none}

.game-list{display:grid;gap:10px}
.game-card.compact-game{
  padding:14px;
  margin:0;
  border-radius:17px;
}
.compact-game .game-title-row h2{font-size:21px}
.compact-game .reward-rule{
  margin:3px 0 10px;
  font-size:13px;
  line-height:1.35;
}
.compact-game .play-pill{
  padding:6px 9px;
  font-size:12px;
}
.compact-game .game-play-button{
  margin:0;
  min-height:46px;
  padding:11px 14px;
}
.compact-game .status-line{
  margin-top:8px;
  padding:8px 10px;
  font-size:12px;
}
@media(min-width:680px){
  .game-list{grid-template-columns:1fr 1fr}
}
.game-best{
  display:inline-flex;
  align-items:center;
  gap:5px;
  color:#dbeafe;
  font-size:12px;
  font-weight:800;
  margin:0 0 9px;
}
.achievement-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.achievement-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-top:12px;
}
.achievement-badge{
  min-height:92px;
  padding:11px;
  border:1px solid #374151;
  border-radius:14px;
  background:#111827;
  text-align:left;
  opacity:.48;
}
.achievement-badge.unlocked{
  opacity:1;
  border-color:#22c55e88;
  background:linear-gradient(145deg,#123524,#172033);
}
.achievement-icon{font-size:23px;display:block;margin-bottom:4px}
.achievement-badge strong{display:block;font-size:13px;margin-bottom:3px}
.achievement-badge span{font-size:11px;color:#aab6c8;line-height:1.3;display:block}
@media(max-width:370px){.achievement-grid{grid-template-columns:1fr}}

.profile-card{text-align:left}
.profile-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.profile-avatar{
  width:54px;
  height:54px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:#111827;
  border:1px solid #475569;
  font-size:27px;
  flex:0 0 auto;
}
.profile-copy{min-width:0;flex:1}
.profile-copy strong{display:block;font-size:18px}
.xp-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:8px;
  font-size:12px;
  color:#cbd5e1;
}
.xp-bar{
  height:9px;
  border-radius:999px;
  overflow:hidden;
  background:#0f172a;
  border:1px solid #334155;
  margin-top:6px;
}
.xp-bar>span{
  display:block;
  height:100%;
  width:0;
  background:linear-gradient(90deg,#3b82f6,#22c55e);
  border-radius:inherit;
}
.stats-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.stat-card{
  padding:14px;
  border-radius:15px;
  border:1px solid #374151;
  background:#172033;
  text-align:left;
}
.stat-card strong{display:block;font-size:22px;margin-bottom:3px}
.stat-card span{font-size:12px;color:#aab6c8}
.quick-section{
  margin:12px 0 16px;
  text-align:left;
}
.quick-section h2{
  margin:0 0 8px;
  font-size:16px;
}
.quick-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.quick-game{
  min-height:46px;
  margin:0;
  padding:10px 12px;
  font-size:13px;
  justify-content:flex-start;
  background:#172033;
  border:1px solid #374151;
}
.favorite-button{
  min-width:42px;
  min-height:42px;
  padding:8px;
  margin:0;
  background:#111827;
  border:1px solid #475569;
  font-size:19px;
}
.game-title-actions{
  display:flex;
  align-items:center;
  gap:6px;
  flex:0 0 auto;
}
.profile-name-form{
  display:flex;
  gap:8px;
  margin-top:12px;
}
.profile-name-form input{
  min-width:0;
  flex:1;
  border:1px solid #475569;
  border-radius:12px;
  background:#111827;
  color:#fff;
  padding:12px 13px;
  font:inherit;
  font-size:16px;
}
.profile-name-form button{margin:0;white-space:nowrap}
.best-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.best-card{
  padding:12px;
  border:1px solid #374151;
  border-radius:14px;
  background:#172033;
  text-align:left;
}
.best-card strong{display:block;font-size:13px;margin-bottom:4px}
.best-card span{font-size:12px;color:#cbd5e1}
@media(max-width:360px){
  .stats-grid,.best-grid,.quick-grid{grid-template-columns:1fr}
}

.countdown-overlay{
  position:fixed;
  inset:0;
  z-index:60;
  display:grid;
  place-items:center;
  background:rgba(2,6,23,.28);
  backdrop-filter:blur(1px);
  opacity:0;
  pointer-events:none;
  transition:opacity 120ms ease;
}
.countdown-overlay.show{opacity:1;pointer-events:auto}
.countdown-value{
  min-width:88px;
  min-height:88px;
  padding:14px;
  display:grid;
  place-items:center;
  border-radius:24px;
  background:linear-gradient(145deg,#2563eb,#172554);
  border:2px solid rgba(255,255,255,.35);
  box-shadow:0 24px 70px rgba(0,0,0,.55);
  color:#fff;
  font-size:38px;
  font-weight:1000;
  line-height:1;
}
.countdown-value.pop{animation:countdown-pop 260ms ease}
@keyframes countdown-pop{
  0%{transform:scale(.72);opacity:.45}
  70%{transform:scale(1.08);opacity:1}
  100%{transform:scale(1)}
}
.game-feel-row{
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  margin:8px 0;
}
.mini-button{
  min-height:40px;
  padding:9px 12px;
  margin:0;
  border-radius:12px;
  font-size:13px;
}
@media(prefers-reduced-motion:reduce){
  .countdown-value.pop{animation:none}
}

.mission-list{display:grid;gap:10px;margin-top:12px}
.mission-card{
  padding:14px;
  border:1px solid #374151;
  border-radius:16px;
  background:#172033;
  text-align:left;
}
.mission-card.complete{border-color:#22c55e66;background:linear-gradient(145deg,#143326,#172033)}
.mission-head{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}
.mission-title{font-weight:900;font-size:15px}
.mission-reward{font-size:12px;color:#bfdbfe;font-weight:800;white-space:nowrap}
.mission-description{margin:4px 0 9px;color:#aab6c8;font-size:12px}
.mission-progress-row{display:flex;justify-content:space-between;gap:10px;font-size:12px;color:#cbd5e1;margin-bottom:6px}
.mission-progress{
  height:9px;
  overflow:hidden;
  border-radius:999px;
  background:#0f172a;
  border:1px solid #334155;
}
.mission-progress>span{
  display:block;
  height:100%;
  width:0;
  border-radius:inherit;
  background:linear-gradient(90deg,#3b82f6,#22c55e);
}
.mission-card button{margin:10px 0 0;min-height:42px;padding:10px 12px;font-size:13px}
.activity-list{display:grid;gap:0}
.activity-item{
  display:flex;
  gap:11px;
  align-items:flex-start;
  padding:12px 0;
  border-bottom:1px solid #334155;
  text-align:left;
}
.activity-item:last-child{border-bottom:0}
.activity-icon{
  width:34px;
  height:34px;
  border-radius:11px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  background:#111827;
  border:1px solid #374151;
}
.activity-copy{min-width:0;flex:1}
.activity-copy strong{display:block;font-size:13px;margin-bottom:2px}
.activity-copy span{display:block;color:#aab6c8;font-size:12px;line-height:1.35}
.activity-time{font-size:11px!important;color:#64748b!important;margin-top:3px}
.week-summary{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  text-align:left;
}
.week-ring{
  width:58px;
  height:58px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  background:#111827;
  border:5px solid #3b82f6;
  font-weight:900;
  font-size:13px;
}
.streak-track{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:12px}
.streak-step{
  padding:10px 7px;
  border-radius:13px;
  border:1px solid #374151;
  background:#111827;
  text-align:center;
  opacity:.55;
}
.streak-step.reached{opacity:1;border-color:#f59e0b88;background:#2b2415}
.streak-step strong{display:block;font-size:14px}
.streak-step span{font-size:10px;color:#aab6c8}

.bottom-nav{
  position:fixed;
  left:50%;
  bottom:0;
  transform:translateX(-50%);
  width:min(100%,520px);
  display:grid;
  grid-template-columns:repeat(5,1fr);
  gap:2px;
  padding:8px 8px max(8px,env(safe-area-inset-bottom));
  background:rgba(15,23,42,.96);
  border-top:1px solid #334155;
  box-shadow:0 -12px 32px rgba(0,0,0,.28);
  backdrop-filter:blur(14px);
  z-index:45;
}
.bottom-nav-item{
  min-width:0;
  min-height:52px;
  padding:5px 2px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:3px;
  border-radius:12px;
  color:#94a3b8;
  text-decoration:none;
  font-weight:800;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.bottom-nav-item.active{
  color:#fff;
  background:#1e3a5f;
}
.bottom-nav-icon{font-size:20px;line-height:1}
.bottom-nav-label{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:10px;
}
.has-app-nav .container{
  padding-bottom:max(112px,calc(88px + env(safe-area-inset-bottom)));
}
.has-app-nav .toast{
  bottom:max(94px,calc(84px + env(safe-area-inset-bottom)));
}
.continue-card{
  text-align:left;
  border-color:#3b82f688;
  background:linear-gradient(145deg,#1d3558,#1f2937);
}
.continue-game-row{
  display:flex;
  gap:12px;
  align-items:center;
}
.continue-game-icon{
  width:50px;
  height:50px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:15px;
  background:#0f172a;
  border:1px solid #475569;
  font-size:26px;
}
.continue-game-copy{min-width:0;flex:1}
.continue-game-copy strong{display:block;font-size:17px;margin-bottom:3px}
.continue-game-meta{font-size:12px;color:#bfdbfe}
@media(min-width:700px){
  .bottom-nav{border-left:1px solid #334155;border-right:1px solid #334155;border-radius:18px 18px 0 0}
}

@media(pointer:coarse){
  #startButton{display:none!important}
}

.streak-reward-list{display:grid;gap:8px;margin-top:12px}
.streak-reward{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid #374151;
  background:#111827;
  text-align:left;
  opacity:.62;
}
.streak-reward.ready{opacity:1;border-color:#f59e0b88;background:#2b2415}
.streak-reward.claimed{opacity:1;border-color:#22c55e66;background:#143326}
.streak-reward-icon{font-size:22px}
.streak-reward-copy strong{display:block;font-size:13px}
.streak-reward-copy span{display:block;font-size:11px;color:#aab6c8;margin-top:2px}
.streak-reward button{margin:0;padding:9px 10px;min-height:38px;font-size:12px}
.game-stats-list{display:grid;gap:9px}
.game-stat-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
  padding:12px;
  border:1px solid #374151;
  border-radius:14px;
  background:#172033;
  text-align:left;
}
.game-stat-row strong{display:block;font-size:13px}
.game-stat-row span{display:block;font-size:11px;color:#aab6c8;margin-top:3px}
.game-stat-badge{
  padding:7px 9px;
  border-radius:999px;
  background:#0f172a;
  border:1px solid #475569;
  color:#dbeafe;
  font-size:11px;
  font-weight:900;
  white-space:nowrap;
}
.how-it-works{
  display:flex;
  gap:9px;
  align-items:center;
  justify-content:space-between;
  text-align:left;
}

/* Economy explainer */
.earnly-guide{text-align:left}
.guide-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.guide-header>div{min-width:0}
.guide-header strong{display:block;font-size:16px;margin-bottom:3px}
.economy-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
}
.economy-item{
  min-width:0;
  display:flex;
  gap:9px;
  align-items:flex-start;
  padding:11px;
  border-radius:14px;
  border:1px solid #374151;
  background:#111827;
  text-align:left;
}
.economy-icon{
  width:30px;
  height:30px;
  flex:0 0 auto;
  display:grid;
  place-items:center;
  border-radius:10px;
  background:#172033;
  font-size:17px;
}
.economy-item strong{
  display:block;
  font-size:12px;
  color:#fff;
  margin-bottom:3px;
}
.economy-item span:not(.economy-icon){
  display:block;
  color:#aab6c8;
  font-size:10px;
  line-height:1.35;
}
.prototype-note{
  margin-top:10px;
  padding:10px 11px;
  border-radius:12px;
  background:#172554;
  border:1px solid #3b82f666;
  color:#bfdbfe;
  font-size:11px;
  line-height:1.4;
  font-weight:700;
}
.reward-economy-grid{grid-template-columns:1fr}
.section-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.section-title-row h2{margin:0}
.prototype-badge{
  display:inline-flex;
  padding:6px 9px;
  border-radius:999px;
  background:#3a2c0b;
  border:1px solid #f59e0b88;
  color:#fde68a;
  font-size:10px;
  font-weight:1000;
  letter-spacing:.06em;
}
.launch-checklist{
  display:grid;
  gap:8px;
  margin-top:14px;
}
.launch-check{
  display:grid;
  grid-template-columns:28px 1fr;
  gap:9px;
  align-items:center;
  padding:10px 11px;
  border-radius:13px;
  background:#111827;
  border:1px solid #374151;
}
.launch-check>span{
  width:28px;
  height:28px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#172033;
  color:#94a3b8;
  font-weight:1000;
}
.launch-check.done>span{
  background:#14532d;
  color:#86efac;
}
.launch-check strong{display:block;font-size:12px}
.launch-check small{display:block;color:#aab6c8;font-size:10px;margin-top:2px}
.play-explainer{text-align:left}
.play-explainer-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.play-explainer-row>span{
  flex:1 1 190px;
  padding:9px 10px;
  border-radius:12px;
  background:#111827;
  border:1px solid #374151;
  color:#dbeafe;
  font-size:11px;
  line-height:1.35;
}
.play-explainer p{margin:9px 1px 0}
@media(max-width:460px){
  .economy-grid{grid-template-columns:1fr}
  .guide-header{align-items:flex-start}
}

.install-card{
  text-align:left;
  border-color:#60a5fa88;
  background:linear-gradient(145deg,#172f52,#1f2937);
}
.install-row{
  display:flex;
  align-items:center;
  gap:12px;
}
.install-icon{
  width:58px;
  height:58px;
  flex:0 0 auto;
  border-radius:17px;
  display:grid;
  place-items:center;
  overflow:hidden;
  background:#0f172a;
  border:1px solid #475569;
}
.install-icon img{width:100%;height:100%;display:block}
.install-copy{min-width:0;flex:1}
.install-copy strong{display:block;font-size:16px;margin-bottom:3px}
.install-copy span{display:block;font-size:12px;color:#bfdbfe;line-height:1.35}
.install-actions{
  display:grid;
  grid-template-columns:1fr;
  gap:7px;
  margin-top:12px;
}
.standalone-badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:6px 9px;
  border-radius:999px;
  background:#143326;
  border:1px solid #22c55e66;
  color:#86efac;
  font-size:11px;
  font-weight:900;
}
@media(display-mode:standalone){
  body{overscroll-behavior-y:none}
  .browser-only{display:none!important}
}

.account-status{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:center;
  padding:13px;
  border:1px solid #374151;
  border-radius:15px;
  background:#172033;
  text-align:left;
}
.account-status strong{display:block;font-size:14px}
.account-status span{display:block;margin-top:3px;color:#aab6c8;font-size:12px;line-height:1.35}
.status-dot{
  width:11px;
  height:11px;
  border-radius:50%;
  background:#f59e0b;
  box-shadow:0 0 0 5px rgba(245,158,11,.12);
}
.status-dot.ready{background:#22c55e;box-shadow:0 0 0 5px rgba(34,197,94,.12)}
.device-id{
  font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:11px;
  color:#93c5fd;
  word-break:break-all;
}
.data-actions{display:grid;gap:8px;margin-top:12px}
.data-note{
  padding:12px;
  border-radius:14px;
  background:#111827;
  border:1px solid #374151;
  color:#cbd5e1;
  font-size:12px;
  line-height:1.45;
  text-align:left;
}
.sync-queue{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:10px 12px;
  border-radius:13px;
  background:#111827;
  border:1px solid #374151;
  font-size:12px;
}

html{scroll-behavior:smooth}
body{animation:app-fade-in 180ms ease both}
@keyframes app-fade-in{from{opacity:.72}to{opacity:1}}
.connection-banner{
  position:fixed;
  top:max(8px,env(safe-area-inset-top));
  left:50%;
  transform:translate(-50%,-18px);
  z-index:70;
  padding:9px 13px;
  border-radius:999px;
  background:#451a03;
  border:1px solid #f59e0b66;
  color:#fde68a;
  font-size:12px;
  font-weight:900;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
  opacity:0;
  pointer-events:none;
  transition:opacity 160ms ease,transform 160ms ease;
}
.connection-banner.show{opacity:1;transform:translate(-50%,0)}
.launch-splash{
  position:fixed;
  inset:0;
  z-index:100;
  display:grid;
  place-items:center;
  align-content:center;
  gap:12px;
  background:radial-gradient(circle at 50% 30%,#1d4ed8 0,#0f172a 48%,#020617 100%);
  opacity:0;
  transition:opacity 220ms ease;
  pointer-events:none;
}
.launch-splash.show{opacity:1}
.launch-splash img{
  width:112px;
  height:112px;
  border-radius:26px;
  box-shadow:0 22px 60px rgba(0,0,0,.42);
}
.launch-splash strong{font-size:28px;letter-spacing:-.03em}
.launch-splash span{color:#bfdbfe;font-size:14px}
.setting-list{display:grid;gap:9px}
.setting-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:center;
  padding:13px;
  border-radius:15px;
  border:1px solid #374151;
  background:#172033;
  text-align:left;
}
.setting-row strong{display:block;font-size:14px}
.setting-row span{display:block;margin-top:3px;color:#aab6c8;font-size:11px;line-height:1.35}
.toggle-button{
  min-width:72px;
  min-height:40px;
  padding:9px 11px;
  margin:0;
  font-size:12px;
}
.app-status-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.app-status-card{
  padding:12px;
  border-radius:14px;
  border:1px solid #374151;
  background:#111827;
  text-align:left;
}
.app-status-card strong{display:block;font-size:13px;margin-bottom:3px}
.app-status-card span{font-size:11px;color:#aab6c8}
.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after{
  scroll-behavior:auto!important;
  animation-duration:.001ms!important;
  animation-iteration-count:1!important;
  transition-duration:.001ms!important;
}
@media(max-width:360px){.app-status-grid{grid-template-columns:1fr}}

.game-result-dialog{
  width:min(430px,calc(100% - 28px));
  padding:18px;
  border-radius:24px;
  overflow:hidden;
}
.result-hero{
  display:flex;
  align-items:center;
  gap:12px;
  text-align:left;
  margin-bottom:14px;
}
.result-icon{
  width:58px;
  height:58px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:18px;
  font-size:30px;
  background:linear-gradient(145deg,#1d4ed8,#172554);
  border:1px solid #60a5fa77;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
}
.result-heading h2{margin:0 0 4px;font-size:22px}
.result-badge{
  display:inline-flex;
  padding:5px 8px;
  border-radius:999px;
  background:#111827;
  border:1px solid #475569;
  color:#cbd5e1;
  font-size:10px;
  font-weight:900;
  letter-spacing:.05em;
}
.result-badge.best{
  color:#fde68a;
  background:#3a2c0b;
  border-color:#f59e0b88;
}
.result-main{
  padding:16px;
  border-radius:18px;
  background:linear-gradient(145deg,#172033,#111827);
  border:1px solid #374151;
  text-align:center;
}
.result-main>span{display:block;color:#aab6c8;font-size:12px;text-transform:uppercase;letter-spacing:.08em}
.result-main>strong{display:block;font-size:42px;line-height:1.05;margin:4px 0;font-weight:1000}
.result-best{font-size:12px;color:#bfdbfe;font-weight:800}
.result-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
  margin-top:10px;
}
.result-stat{
  padding:10px 6px;
  border-radius:14px;
  background:#111827;
  border:1px solid #374151;
  text-align:center;
}
.result-stat>span{display:block;font-size:17px}
.result-stat>strong{display:block;font-size:16px;margin-top:2px}
.result-stat>small{display:block;color:#94a3b8;font-size:9px;margin-top:2px}
.result-level-progress{
  display:grid;
  gap:7px;
  margin-top:9px;
  padding:10px 12px;
  border:1px solid rgba(96,165,250,.28);
  border-radius:13px;
  background:rgba(30,64,175,.12)
}
.result-level-progress>div{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:11px}
.result-level-progress strong{color:#dbeafe}
.result-level-progress span{color:#93c5fd;font-weight:800}
.result-level-progress>i{display:block;height:7px;border-radius:999px;background:#172033;overflow:hidden}
.result-level-progress>i>b{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#3b82f6,#22d3ee)}
.result-notes{
  display:grid;
  gap:6px;
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  background:#111827;
  border:1px solid #374151;
  color:#cbd5e1;
  font-size:12px;
  text-align:left;
}
.result-highlight{color:#fde68a;font-weight:900}
.result-mission-update[href]{display:block;color:#fde68a;text-decoration:underline;text-underline-offset:3px}
.result-actions{margin-top:12px}
.milestone-pop{
  position:fixed;
  left:50%;
  top:22%;
  z-index:55;
  min-width:170px;
  max-width:85%;
  transform:translate(-50%,-8px) scale(.86);
  padding:12px 18px;
  border-radius:999px;
  opacity:0;
  pointer-events:none;
  background:linear-gradient(135deg,#1d4ed8,#172554);
  border:1px solid #93c5fd88;
  color:#fff;
  font-weight:1000;
  font-size:14px;
  box-shadow:0 16px 42px rgba(0,0,0,.4);
  transition:opacity 140ms ease,transform 180ms cubic-bezier(.2,.8,.2,1.2);
}
.milestone-pop.show{opacity:1;transform:translate(-50%,0) scale(1)}
.milestone-pop.perfect{background:linear-gradient(135deg,#d97706,#713f12);border-color:#fde68a99}
.milestone-pop.score{background:linear-gradient(135deg,#15803d,#14532d);border-color:#86efac88}
@media(max-width:360px){
  .result-stats{grid-template-columns:1fr}
  .result-stat{display:grid;grid-template-columns:auto 1fr auto;align-items:center;text-align:left;gap:8px}
  .result-stat>span,.result-stat>strong,.result-stat>small{margin:0}
}


/* Home dashboard refresh */
.home-dashboard{
  background:
    radial-gradient(circle at 50% -8%,rgba(59,130,246,.16),transparent 34%),
    #0b1220;
}
.home-container{
  width:min(100%,500px);
  padding:max(18px,env(safe-area-inset-top)) 14px max(36px,env(safe-area-inset-bottom));
  text-align:left;
}
.home-hero{
  display:flex;
  align-items:center;
  gap:12px;
  margin:6px 2px 18px;
}
.home-hero-icon{
  width:50px;
  height:50px;
  flex:0 0 auto;
  border-radius:14px;
  box-shadow:0 10px 26px rgba(0,0,0,.28);
}
.home-hero-copy{min-width:0}
.home-eyebrow{
  display:block;
  margin-bottom:3px;
  color:#7dd3fc;
  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
}
.home-hero h1{
  margin:0;
  font-size:26px;
  line-height:1.08;
  letter-spacing:-.035em;
}
.home-hero p{
  margin:4px 0 0;
  color:#94a3b8;
  font-size:12px;
}

/* 0.15.23 direct Home account access */
.home-account-shortcut{
  min-height:58px;
  display:grid;
  grid-template-columns:38px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  margin:0 0 10px;
  padding:9px 11px;
  border:1px solid #3b82f680;
  border-radius:15px;
  background:linear-gradient(135deg,rgba(29,78,216,.28),rgba(15,23,42,.92));
  color:#f8fafc;
  text-decoration:none;
  box-shadow:0 8px 22px rgba(2,6,23,.2);
}
.home-account-shortcut-icon{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:#172554;
  font-size:20px;
}
.home-account-shortcut-copy{display:grid;gap:2px;min-width:0}
.home-account-shortcut-copy strong{font-size:13px;line-height:1.2}
.home-account-shortcut-copy small{color:#b9c8dc;font-size:9px;line-height:1.35}
.home-account-shortcut>b{
  padding:8px 10px;
  border-radius:10px;
  background:#2563eb;
  color:white;
  font-size:10px;
  white-space:nowrap;
}
.home-account-shortcut.connected{
  border-color:#22c55e55;
  background:linear-gradient(135deg,rgba(21,128,61,.2),rgba(15,23,42,.92));
}
.home-account-shortcut.connected .home-account-shortcut-icon{background:#123325}
.home-account-shortcut.connected>b{background:#166534;color:#bbf7d0}
.home-account-shortcut.attention{
  border-color:#f59e0b88;
  background:linear-gradient(135deg,rgba(146,64,14,.3),rgba(15,23,42,.94));
}
.home-account-shortcut.attention .home-account-shortcut-icon{background:#451a03}
.home-account-shortcut.attention>b{background:#92400e;color:#fef3c7}

.reward-protection-card{
  display:grid;
  grid-template-columns:42px minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  margin:12px 0 18px;
  padding:12px;
  border:1px solid #3b82f666;
  border-radius:16px;
  background:#17243a;
  text-align:left;
}
.reward-protection-card.ready{border-color:#22c55e66;background:#142d28}
.reward-protection-card.warning{border-color:#f59e0b66;background:#332718}
.reward-protection-icon{font-size:25px;text-align:center}
.reward-protection-card strong,.reward-protection-card small{display:block}
.reward-protection-card strong{font-size:13px;color:#f8fafc}
.reward-protection-card small{margin-top:3px;color:#aebed3;font-size:10px;line-height:1.35}
.reward-protection-card>a{
  padding:8px 9px;
  border-radius:10px;
  background:#2563eb;
  color:white;
  font-size:10px;
  font-weight:900;
  text-decoration:none;
  white-space:nowrap;
}
.reward-protection-card.ready>a{background:#166534;color:#bbf7d0}
.reward-protection-card.warning>a{background:#92400e;color:#fef3c7}

.test-readiness{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin:12px 0;
}
.test-readiness>div{
  display:grid;
  grid-template-columns:24px 1fr;
  gap:2px 7px;
  align-items:center;
  padding:10px;
  border:1px solid #35455d;
  border-radius:13px;
  background:#101a2a;
}
.test-readiness>div>span{grid-row:1/3;color:#94a3b8;font-size:18px;font-weight:900}
.test-readiness>div>span.ready{color:#4ade80}
.test-readiness strong{font-size:11px;color:#f8fafc}
.test-readiness small{font-size:8px;line-height:1.3;color:#94a3b8}
#copyTestReportButton{margin-top:8px}
.test-report-note{margin:8px 2px 0}
@media(max-width:390px){.test-readiness{grid-template-columns:1fr}}

.home-install-banner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:0 0 12px;
  padding:10px 11px;
  border:1px solid #31547d;
  border-radius:15px;
  background:rgba(23,47,82,.68);
}
.home-install-main{
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
}
.home-install-icon{
  width:38px;
  height:38px;
  flex:0 0 auto;
  overflow:hidden;
  border-radius:11px;
  background:#0f172a;
}
.home-install-icon img{display:block;width:100%;height:100%}
.home-install-copy{min-width:0}
.home-install-copy strong{
  display:block;
  color:#f8fafc;
  font-size:12px;
  line-height:1.25;
}
.home-install-copy span{
  display:block;
  margin-top:2px;
  color:#9fb4cf;
  font-size:10px;
  line-height:1.3;
}
.home-install-button{
  flex:0 0 auto;
  min-height:36px;
  margin:0;
  padding:8px 11px;
  border-radius:10px;
  background:#2563eb;
  font-size:11px;
}

.home-overview{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1px;
  overflow:hidden;
  margin:0 0 12px;
  border:1px solid #2b3a4f;
  border-radius:17px;
  background:#2b3a4f;
  box-shadow:0 12px 30px rgba(0,0,0,.14);
}
.home-metric{
  min-width:0;
  padding:14px;
  background:#182235;
  color:#fff;
  text-decoration:none;
}
.home-metric-label{
  display:block;
  color:#8ea0b8;
  font-size:10px;
  font-weight:800;
  letter-spacing:.03em;
}
.home-metric strong{
  display:block;
  margin-top:4px;
  font-size:28px;
  line-height:1;
}
.home-metric strong small{font-size:15px}
.home-metric-link{
  display:block;
  margin-top:7px;
  color:#7dd3fc;
  font-size:10px;
  font-weight:800;
}
.home-progress-row{
  grid-column:1 / -1;
  padding:11px 14px 12px;
  background:#141d2d;
}
.home-progress-copy{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:7px;
  color:#aab6c8;
  font-size:10px;
  font-weight:700;
}
.home-xp-bar{
  height:6px;
  margin:0;
  border:0;
}

.home-guide-strip{
  margin:0 0 18px;
  padding:10px 11px;
  border-radius:14px;
  background:#101827;
  border:1px solid #26364b;
}
.home-guide-chips{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.home-guide-chips span{
  padding:6px 8px;
  border-radius:999px;
  background:#172235;
  color:#b7c5d8;
  font-size:9px;
  font-weight:800;
}
.home-text-button{
  min-height:0;
  margin:8px 0 0;
  padding:0;
  background:transparent;
  color:#7dd3fc;
  font-size:10px;
  justify-content:flex-start;
}

.home-section{
  margin:0 0 16px;
  padding:0;
  border:0;
  background:transparent;
  box-shadow:none;
}
.home-section-heading{
  margin:0 2px 7px;
  color:#8293aa;
  font-size:10px;
  font-weight:900;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.home-panel{
  overflow:hidden;
  border:1px solid #2d3c51;
  border-radius:16px;
  background:#182235;
}
.home-action-row{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:12px;
}
.home-action-row-top{padding-bottom:8px}
.home-action-icon{
  width:36px;
  height:36px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:11px;
  background:#101827;
  border:1px solid #2c3a4e;
  font-size:18px;
}
.home-action-copy{min-width:0}
.home-action-copy strong{
  display:block;
  font-size:13px;
  line-height:1.25;
}
.home-action-copy span{
  display:block;
  margin-top:2px;
  color:#96a6ba;
  font-size:10px;
  line-height:1.35;
}
.home-row-button{
  width:auto;
  min-width:64px;
  min-height:36px;
  margin:0;
  padding:8px 11px;
  border-radius:10px;
  font-size:11px;
  white-space:nowrap;
}
.home-divider{
  height:1px;
  margin:0 12px;
  background:#2b3a4f;
}
.home-challenge-row{padding-bottom:11px}
.home-count-pill{
  flex:0 0 auto;
  padding:6px 8px;
  border-radius:999px;
  background:#101827;
  border:1px solid #34475f;
  color:#d7e3f1;
  font-size:10px;
  font-weight:900;
  white-space:nowrap;
}
.home-challenge-progress{
  height:6px;
  margin:0 12px 9px;
}
.home-challenge-button{
  width:auto;
  min-height:34px;
  margin:0 12px;
  padding:7px 10px;
  border-radius:10px;
  font-size:10px;
}

.continue-card{
  border:0;
  background:transparent;
}
.continue-card .home-action-row{
  border:1px solid #2e5f8f;
  border-radius:16px;
  background:linear-gradient(135deg,#172f52,#182235);
}
.continue-card .home-section-heading{color:#7dd3fc}

.home-disclosure{
  overflow:hidden;
  border:1px solid #2d3c51;
  border-radius:16px;
  background:#182235;
}
.home-disclosure summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:12px;
  color:#fff;
  list-style:none;
}
.home-disclosure summary::-webkit-details-marker{display:none}
.home-disclosure summary>div{min-width:0}
.home-disclosure summary strong{
  display:block;
  font-size:13px;
}
.home-disclosure summary span:not(.home-count-pill){
  display:block;
  margin-top:2px;
  color:#96a6ba;
  font-size:10px;
}
.home-disclosure[open] summary{
  border-bottom:1px solid #2b3a4f;
}
.home-streak-list{
  margin:0;
  padding:8px;
}
.home-streak-list .streak-reward{
  padding:9px 10px;
  border-radius:11px;
}
.home-streak-list .streak-reward-icon{font-size:17px}

.home-progress-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.home-progress-tile{
  min-width:0;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  padding:11px;
  border:1px solid #2d3c51;
  border-radius:14px;
  background:#182235;
  color:#fff;
  text-decoration:none;
}
.home-progress-icon{font-size:18px}
.home-progress-tile strong{
  display:block;
  font-size:11px;
  line-height:1.25;
}
.home-progress-tile span:not(.home-progress-icon){
  display:block;
  margin-top:2px;
  color:#8fa0b6;
  font-size:9px;
}
.home-progress-tile b{
  color:#7dd3fc;
  font-size:10px;
}

.home-prototype-note{
  margin:2px 0 0;
  padding:9px 2px;
  color:#71839a;
  font-size:10px;
}
.home-prototype-note summary{
  display:inline;
  padding:0;
  color:#71839a;
  font-size:10px;
}
.home-prototype-note p{
  margin:8px 0 0;
  color:#71839a;
  font-size:10px;
}

.home-dashboard .claimed-button{
  min-width:72px;
  background:#16352a;
  color:#86efac;
}
.home-dashboard .progress-button{
  background:#111a29;
  color:#9aa9bb;
}
.home-dashboard .bottom-nav{
  background:rgba(9,15,27,.96);
  border-top-color:#243247;
}
.home-dashboard .bottom-nav-item.active{
  background:#173456;
}

@media(max-width:360px){
  .home-progress-grid{grid-template-columns:1fr}
  .home-guide-chips span{font-size:8px}
}


/* Compact onboarding */
.onboarding-dialog{
  width:min(410px,calc(100% - 28px));
  padding:18px;
  text-align:left;
}
.onboarding-head{
  display:flex;
  gap:11px;
  align-items:center;
  margin-bottom:14px;
}
.onboarding-app-icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  border-radius:13px;
  background:#172554;
  border:1px solid #3b82f677;
  font-size:22px;
}
.onboarding-head h2{
  margin:0;
  font-size:20px;
}
.onboarding-head p{
  margin:3px 0 0;
  color:#94a3b8;
  font-size:11px;
}
.onboarding-list{
  display:grid;
  gap:7px;
}
.onboarding-row{
  display:grid;
  grid-template-columns:auto 1fr;
  gap:9px;
  align-items:start;
  padding:10px;
  border-radius:12px;
  background:#131d2d;
  border:1px solid #2d3c51;
}
.onboarding-row-icon{
  width:30px;
  height:30px;
  display:grid;
  place-items:center;
  border-radius:9px;
  background:#0e1726;
  font-size:16px;
}
.onboarding-row strong{
  display:block;
  font-size:12px;
  margin-bottom:2px;
}
.onboarding-row span:not(.onboarding-row-icon){
  display:block;
  color:#9fb0c5;
  font-size:10px;
  line-height:1.4;
}
.onboarding-actions{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:14px;
}
.onboarding-actions button{
  width:auto;
  min-height:38px;
  margin:0;
  padding:9px 13px;
  border-radius:10px;
  font-size:11px;
}
.onboarding-secondary{
  background:#182235;
  border:1px solid #34475f;
  color:#cbd5e1;
}
.onboarding-primary{
  background:#2563eb;
}

/* Rewards dashboard refresh */
.rewards-dashboard{
  background:
    radial-gradient(circle at 50% -8%,rgba(59,130,246,.14),transparent 34%),
    #0b1220;
}
.rewards-container{
  width:min(100%,500px);
  padding:max(18px,env(safe-area-inset-top)) 14px max(36px,env(safe-area-inset-bottom));
  text-align:left;
}
.rewards-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin:2px 2px 18px;
}
.rewards-brand{
  color:#fff;
  text-decoration:none;
  font-size:13px;
  font-weight:900;
}
.rewards-top-actions{
  display:flex;
  align-items:center;
  gap:7px;
}
.rewards-top-actions a,
.rewards-top-actions span{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:7px 9px;
  border:1px solid #2f4056;
  border-radius:999px;
  background:#152033;
  color:#d9e4f1;
  font-size:10px;
  font-weight:800;
  text-decoration:none;
}
.rewards-hero{
  margin:0 2px 16px;
}
.rewards-eyebrow,
.rewards-kicker{
  display:block;
  color:#7dd3fc;
  font-size:9px;
  font-weight:900;
  letter-spacing:.12em;
}
.rewards-hero h1{
  margin:4px 0 4px;
  font-size:27px;
  line-height:1.08;
  letter-spacing:-.035em;
}
.rewards-hero p{
  margin:0;
  color:#94a3b8;
  font-size:11px;
}
.rewards-balance-card{
  display:grid;
  grid-template-columns:1fr auto;
  gap:8px;
  align-items:start;
  margin-bottom:16px;
  padding:14px;
  border:1px solid #31547d;
  border-radius:17px;
  background:linear-gradient(135deg,#172f52,#182235);
  box-shadow:0 12px 28px rgba(0,0,0,.14);
}
.rewards-balance-label{
  display:block;
  color:#9fb0c5;
  font-size:10px;
  font-weight:800;
}
.rewards-balance-card strong{
  display:block;
  margin-top:3px;
  font-size:31px;
  line-height:1;
}
.rewards-balance-card strong small{font-size:16px}
.rewards-balance-card p{
  grid-column:1 / -1;
  margin:2px 0 0;
  color:#a9b7c9;
  font-size:10px;
}
.rewards-section{
  margin-bottom:17px;
}
.rewards-section-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  margin:0 2px 7px;
}
.rewards-section-heading h2{
  margin:3px 0 0;
  font-size:15px;
  letter-spacing:-.02em;
}
.rewards-status-pill{
  padding:5px 7px;
  border-radius:999px;
  background:#3a2c0b;
  border:1px solid #f59e0b66;
  color:#fde68a;
  font-size:9px;
  font-weight:900;
}
.rewards-basics{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
}
.rewards-basic-item{
  min-width:0;
  padding:10px;
  border:1px solid #2d3c51;
  border-radius:13px;
  background:#152033;
}
.rewards-basic-item>span{
  display:block;
  margin-bottom:6px;
  font-size:18px;
}
.rewards-basic-item strong{
  display:block;
  font-size:11px;
}
.rewards-basic-item small{
  display:block;
  margin-top:2px;
  color:#8fa0b6;
  font-size:8px;
  line-height:1.35;
}
.rewards-readiness{
  overflow:hidden;
  border:1px solid #2d3c51;
  border-radius:15px;
  background:#152033;
}
.rewards-readiness-row{
  display:grid;
  grid-template-columns:28px 1fr;
  gap:9px;
  align-items:center;
  padding:10px 11px;
  border-bottom:1px solid #26364a;
}
.rewards-readiness-row:last-child{border-bottom:0}
.rewards-readiness-row>span{
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#101827;
  color:#71839a;
  font-size:10px;
  font-weight:900;
}
.rewards-readiness-row.ready>span{
  background:#123c2a;
  color:#86efac;
}
.rewards-readiness-row strong{
  display:block;
  font-size:11px;
}
.rewards-readiness-row small{
  display:block;
  margin-top:2px;
  color:#8fa0b6;
  font-size:9px;
}
.rewards-options{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:7px;
}
.rewards-option{
  min-width:0;
  padding:10px;
  border:1px solid #2d3c51;
  border-radius:13px;
  background:#152033;
}
.rewards-option.primary{border-color:#31547d;background:#172f52}
.rewards-option>span{
  display:block;
  margin-bottom:7px;
  font-size:19px;
}
.rewards-option strong{
  display:block;
  font-size:11px;
}
.rewards-option small{
  display:block;
  margin-top:2px;
  color:#8fa0b6;
  font-size:8px;
}
.rewards-history{
  overflow:hidden;
  border:1px solid #2d3c51;
  border-radius:15px;
  background:#152033;
  padding:0 11px;
}
.rewards-dashboard .history-item{
  padding:10px 0;
  font-size:11px;
}
.rewards-dashboard .history-value{
  font-size:11px;
}
.rewards-empty{
  margin:0;
  padding:13px 0;
  color:#8fa0b6;
  font-size:10px;
}
.rewards-footnote{
  margin:4px 2px 0;
  color:#71839a;
  font-size:10px;
}
.rewards-footnote summary{
  display:inline;
  padding:0;
  color:#71839a;
  font-size:10px;
}
.rewards-footnote p{
  margin:7px 0 0;
  color:#71839a;
  font-size:10px;
  line-height:1.45;
}
@media(max-width:360px){
  .rewards-basics,.rewards-options{grid-template-columns:1fr}
}


/* Games list refresh */
.games-dashboard{
  background:
    radial-gradient(circle at 50% -8%,rgba(59,130,246,.14),transparent 34%),
    #0b1220;
}
.games-dashboard .container{
  width:min(100%,500px);
  padding:max(18px,env(safe-area-inset-top)) 14px max(36px,env(safe-area-inset-bottom));
}
.games-dashboard .topbar{
  margin-bottom:14px;
}
.games-dashboard .brand{font-size:13px}
.games-dashboard .balance-chip{
  padding:7px 9px;
  font-size:10px;
  background:#152033;
  border-color:#2f4056;
}
.games-hero{
  margin:0 2px 13px;
  text-align:left;
}
.games-eyebrow{
  display:block;
  color:#7dd3fc;
  font-size:9px;
  font-weight:900;
  letter-spacing:.12em;
}
.games-hero h1{
  margin:4px 0 4px;
  font-size:27px;
  line-height:1.08;
  letter-spacing:-.035em;
}
.games-hero p{
  margin:0;
  color:#94a3b8;
  font-size:11px;
}
.games-play-note{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:15px;
}
.games-play-note span{
  padding:6px 8px;
  border-radius:999px;
  background:#152033;
  border:1px solid #2d3c51;
  color:#aebdd0;
  font-size:9px;
  font-weight:800;
}
.games-dashboard .quick-section{
  margin:10px 0 13px;
}
.games-dashboard .quick-section h2{
  margin:0 2px 6px;
  color:#8293aa;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.games-dashboard .quick-grid{gap:6px}
.games-dashboard .quick-game{
  min-height:38px;
  padding:8px 10px;
  border-radius:11px;
  background:#152033;
  border-color:#2d3c51;
  font-size:10px;
}
.games-dashboard #achievements{
  padding:11px 12px;
  margin:0 0 13px;
  border-radius:14px;
  background:#152033;
  border-color:#2d3c51;
  box-shadow:none;
}
.games-dashboard #achievements summary{
  padding:0;
  font-size:11px;
}
.games-dashboard .game-list{
  gap:9px;
}
.games-dashboard .compact-game{
  padding:13px;
  margin:0;
  border-radius:15px;
  background:#182235;
  border-color:#2d3c51;
  box-shadow:none;
}
.games-dashboard .compact-game .game-title-row{
  align-items:center;
}
.games-dashboard .compact-game .game-title-row h2{
  font-size:16px;
}
.games-dashboard .favorite-button{
  min-width:34px;
  min-height:34px;
  padding:5px;
  border-radius:10px;
  font-size:15px;
}
.games-dashboard .compact-game .play-pill{
  padding:5px 7px;
  font-size:9px;
}
.games-dashboard .compact-game .reward-rule{
  margin:4px 0 7px;
  color:#8fa0b6;
  font-size:10px;
}
.games-dashboard .game-best{
  margin:0 0 8px;
  font-size:10px;
  color:#bac8da;
}
.games-dashboard .compact-game .game-play-button{
  min-height:38px;
  padding:8px 11px;
  border-radius:11px;
  font-size:11px;
}
.games-dashboard .compact-game .status-line{
  margin-top:6px;
  padding:7px 8px;
  border-radius:9px;
  font-size:9px;
}
.games-dashboard .card:not(.compact-game):not(#achievements){
  box-shadow:none;
}


/* 0.11.1 visual refinement */
.home-install-banner{
  padding:8px 10px;
  border-color:#273c55;
  background:#111b2b;
}
.home-install-icon{
  width:32px;
  height:32px;
  border-radius:9px;
}
.home-install-copy strong{font-size:11px}
.home-install-copy span{
  max-width:270px;
  font-size:9px;
}
.home-install-button{
  min-width:50px;
  min-height:32px;
  padding:6px 9px;
  border-radius:9px;
  font-size:10px;
  background:#1d4ed8;
}

.home-guide-strip{
  margin:0 2px 17px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.home-guide-chips{gap:5px}
.home-guide-chips span{
  padding:5px 7px;
  background:#131d2d;
  border:1px solid #223248;
  font-size:8.5px;
  color:#a9b8ca;
}
.home-text-button{
  margin:6px 0 0;
  font-size:9px;
  color:#67c7ee;
}

.home-row-button{
  text-decoration:none;
  color:#dbeafe;
  background:#172f52;
  border:1px solid #31547d;
}
.continue-card .home-row-button{
  min-width:56px;
  background:#1d4ed8;
  border-color:#3b82f6;
  color:#fff;
}
.home-dashboard .claimed-button{
  min-width:0;
  padding-inline:10px;
  background:#123c2a;
  border-color:#1d6a48;
  font-size:10px;
}
.home-challenge-button{
  min-width:0;
  margin-right:12px;
}
.home-panel .home-action-row{
  padding-top:10px;
  padding-bottom:10px;
}
.home-challenge-row{padding-bottom:9px}

.bottom-nav{
  gap:4px;
  padding-top:7px;
  box-shadow:0 -8px 24px rgba(0,0,0,.22);
}
.bottom-nav-item{
  position:relative;
  min-height:50px;
  border-radius:10px;
}
.bottom-nav-item.active{
  color:#eaf4ff;
  background:transparent!important;
}
.bottom-nav-item.active::after{
  content:'';
  position:absolute;
  left:50%;
  bottom:2px;
  width:22px;
  height:3px;
  transform:translateX(-50%);
  border-radius:999px;
  background:#3b82f6;
}
.bottom-nav-item.active .bottom-nav-icon{
  transform:translateY(-1px);
}
.bottom-nav-icon{font-size:19px}
.bottom-nav-label{font-size:9.5px}

.home-progress-tile{
  padding:10px;
  border-color:#27384e;
  background:#152033;
}
.home-disclosure{
  border-color:#27384e;
  background:#152033;
}

.games-dashboard .game-play-button:disabled{
  background:#111827;
  border:1px solid #2d3c51;
  color:#64748b;
  opacity:1;
}

.rewards-balance-meta{
  grid-column:1 / -1;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:4px;
}
.rewards-balance-meta>span{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:5px 7px;
  border-radius:999px;
  background:#111b2b;
  border:1px solid #2b405a;
  color:#93a5ba;
  font-size:8.5px;
  font-weight:800;
}
.rewards-balance-meta strong{
  display:inline;
  margin:0;
  color:#86efac;
  font-size:9px;
}


/* Snake mobile-first controls */
.snake-page{
  background:
    radial-gradient(circle at 50% -8%,rgba(34,197,94,.10),transparent 32%),
    #0b1220;
}
.snake-page .container{
  width:min(100%,500px);
  padding:max(12px,env(safe-area-inset-top)) 14px max(28px,env(safe-area-inset-bottom));
}
.snake-page .topbar{
  min-height:36px;
  margin-bottom:8px;
}
.snake-page .brand{font-size:12px}
.snake-page .balance-chip{
  padding:6px 9px;
  font-size:10px;
}
.snake-header{
  margin:0 0 8px;
}
.snake-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.snake-title-row h1{
  margin:0;
  font-size:23px;
  line-height:1.05;
  letter-spacing:-.035em;
}
.snake-page .game-status{
  flex:0 0 auto;
  padding:5px 8px;
  font-size:9px;
}
.snake-stats{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
  margin-top:8px;
}
.snake-stats>span{
  min-width:0;
  padding:7px 8px;
  border:1px solid #2d3c51;
  border-radius:11px;
  background:#121c2c;
  text-align:left;
}
.snake-stats small{
  display:block;
  color:#7f91a8;
  font-size:8px;
  font-weight:800;
  text-transform:uppercase;
  letter-spacing:.07em;
}
.snake-stats strong{
  display:block;
  margin-top:2px;
  color:#f8fafc;
  font-size:13px;
  line-height:1.1;
}
.snake-control-strip{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:5px;
  margin:0 0 7px;
}
.snake-control-strip>div{
  min-width:0;
  padding:6px 5px;
  border-radius:10px;
  background:#111b2b;
  border:1px solid #27394f;
  text-align:center;
}
.snake-control-strip span{
  display:block;
  font-size:13px;
  line-height:1;
}
.snake-control-strip strong{
  display:block;
  margin-top:3px;
  color:#e2e8f0;
  font-size:8.5px;
  line-height:1.15;
}
.snake-control-strip small{
  display:block;
  margin-top:1px;
  color:#8395aa;
  font-size:7.5px;
  line-height:1.2;
}
.snake-board-wrap{
  position:relative;
  width:min(100%,400px);
  margin:0 auto;
}
.snake-board-wrap canvas{
  width:100%;
  margin:0;
  border-radius:14px;
  border-color:#50647d;
}
.snake-board-overlay{
  position:absolute;
  inset:0;
  z-index:3;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:24px;
  border-radius:14px;
  background:rgba(8,15,27,.62);
  backdrop-filter:blur(2px);
  pointer-events:none;
  opacity:1;
  transition:opacity 140ms ease;
}
.snake-board-overlay.hidden{
  opacity:0;
}
.snake-overlay-icon{
  margin-bottom:7px;
  font-size:28px;
}
.snake-board-overlay strong{
  font-size:20px;
  letter-spacing:-.02em;
}
.snake-board-overlay span{
  max-width:260px;
  margin-top:5px;
  color:#c0cede;
  font-size:10px;
  line-height:1.35;
}
.snake-more-help{
  margin:7px 2px 0;
  color:#708198;
  font-size:9px;
  text-align:left;
}
.snake-more-help summary{
  color:#7890aa;
  cursor:pointer;
}
.snake-more-help p{
  margin:6px 0 0;
  color:#8293a8;
  font-size:9px;
  line-height:1.4;
}
.snake-page .desktop-controls{margin-top:8px}
.snake-page>a.button.secondary{
  min-height:38px;
  margin-top:8px;
  padding:9px 12px;
  border-radius:11px;
  font-size:11px;
}

@media(max-width:520px) and (pointer:coarse){
  .snake-board-wrap{
    width:min(100%,calc(100dvh - 300px));
    min-width:270px;
  }
}
@media(max-height:760px) and (pointer:coarse){
  .snake-page .topbar{margin-bottom:5px}
  .snake-title-row h1{font-size:20px}
  .snake-stats{margin-top:5px}
  .snake-stats>span{padding:5px 7px}
  .snake-control-strip{margin-bottom:5px}
  .snake-board-wrap{
    width:min(100%,calc(100dvh - 270px));
    min-width:240px;
  }
}


/* Shared game guide system */
.game-guide-page .container{
  width:min(100%,500px);
  padding:max(12px,env(safe-area-inset-top)) 14px max(28px,env(safe-area-inset-bottom));
}
.game-guide-page .topbar{
  min-height:36px;
  margin-bottom:7px;
}
.game-guide-page .brand{font-size:12px}
.game-guide-page .balance-chip{
  padding:6px 9px;
  font-size:10px;
}
.game-guide-page .page-header{
  margin:0 0 7px;
}
.game-guide-page .page-header h1{
  margin:0 0 5px;
  font-size:23px;
  line-height:1.05;
}
.game-guide-page .game-meta{
  gap:5px;
  margin:5px 0 6px;
}
.game-guide-page .meta-pill{
  padding:5px 7px;
  font-size:9px;
}
.game-guide-page .game-status{
  padding:5px 8px;
  font-size:9px;
}
.game-guide-strip{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:5px;
  margin:0 0 7px;
}
.game-guide-step{
  min-width:0;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:5px;
  align-items:center;
  padding:6px 7px;
  border-radius:10px;
  background:#111b2b;
  border:1px solid #27394f;
  text-align:left;
}
.game-guide-step-icon{
  font-size:14px;
  line-height:1;
}
.game-guide-step strong{
  display:block;
  color:#e2e8f0;
  font-size:8.5px;
  line-height:1.1;
}
.game-guide-step small{
  display:block;
  margin-top:1px;
  color:#8395aa;
  font-size:7.2px;
  line-height:1.2;
}
.game-guide-surface-wrap{
  position:relative;
  width:fit-content;
  max-width:100%;
  margin:0 auto;
  touch-action:none;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
  overscroll-behavior:contain;
}
.game-guide-surface{
  touch-action:none!important;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}
.game-guide-surface-wrap>.game-guide-surface{
  margin:0!important;
  max-width:100%;
}
.game-guide-surface-wrap>canvas.game-guide-surface{
  display:block;
}
.game-guide-surface-wrap>.memory-grid.game-guide-surface{
  display:grid;
}
.game-guide-overlay{
  position:absolute;
  inset:0;
  z-index:6;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:22px;
  border-radius:inherit;
  background:rgba(8,15,27,.64);
  backdrop-filter:blur(2px);
  pointer-events:none;
  opacity:1;
  transition:opacity 140ms ease;
}
.game-guide-overlay.hidden{
  opacity:0;
}
.game-guide-overlay-icon{
  margin-bottom:6px;
  font-size:27px;
}
.game-guide-overlay-title{
  font-size:19px;
  line-height:1.1;
  letter-spacing:-.02em;
}
.game-guide-overlay-text{
  max-width:280px;
  margin-top:5px;
  color:#c0cede;
  font-size:10px;
  line-height:1.35;
  text-align:center;
}
.game-guide-more{
  margin:7px 2px 0;
  color:#708198;
  font-size:9px;
  text-align:left;
}
.game-guide-more summary{
  color:#7890aa;
  cursor:pointer;
}
.game-guide-more p{
  margin:6px 0 0;
  color:#8293a8;
  font-size:9px;
  line-height:1.4;
}
.game-guide-page>a.button.secondary{
  min-height:38px;
  margin-top:8px;
  padding:9px 12px;
  border-radius:11px;
  font-size:11px;
}
@media(max-height:760px) and (pointer:coarse){
  .game-guide-page .topbar{margin-bottom:4px}
  .game-guide-page .page-header h1{font-size:20px}
  .game-guide-page .page-header{margin-bottom:5px}
  .game-guide-page .game-meta{margin:4px 0}
  .game-guide-strip{margin-bottom:5px}
}


/* Full-screen installed app sizing */
@media (display-mode:standalone) and (max-width:520px){
  .blockdrop-board{
    width:min(70vw,280px);
  }
  .tap-board{
    width:min(92vw,400px);
  }
  .memory-grid{
    width:min(92vw,400px);
    max-width:400px;
  }
  .dodger-board{
    width:min(88vw,350px);
  }
  .brick-board{
    width:min(90vw,380px);
  }
  .jungle-board,
  .tower-board{
    width:min(92vw,390px);
  }
  .snake-page .snake-board-wrap{
    width:min(92vw,400px);
  }
}

/* Keep Memory Match a clear 4x4 board on phones */
.memory-grid.game-guide-surface{
  width:min(92vw,390px);
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:8px;
}
.memory-grid.game-guide-surface .memory-card{
  width:100%;
  aspect-ratio:1;
  font-size:clamp(24px,8vw,32px);
  border-radius:14px;
}


/* 0.13.4 centered Games page */
.games-dashboard .container{
  width:min(100%,520px);
  margin-inline:auto;
  padding-inline:16px;
}
.games-dashboard .games-hero{
  width:min(100%,440px);
  margin:2px auto 15px;
  text-align:center;
}
.games-dashboard .games-eyebrow{
  text-align:center;
}
.games-dashboard .games-hero p{
  max-width:360px;
  margin-inline:auto;
}
.games-dashboard .games-play-note{
  width:min(100%,440px);
  justify-content:center;
  margin:0 auto 17px;
}
.games-dashboard .games-play-note span{
  text-align:center;
}
.games-dashboard #quickSections{
  width:min(100%,440px);
  margin-inline:auto;
}
.games-dashboard .quick-section{
  width:100%;
  margin:10px auto 14px;
  text-align:center;
}
.games-dashboard .quick-section h2{
  margin:0 0 7px;
  text-align:center;
}
.games-dashboard .quick-grid{
  width:100%;
  margin-inline:auto;
}
.games-dashboard .quick-game{
  justify-content:center;
  text-align:center;
}
.games-dashboard #achievements{
  width:min(100%,440px);
  margin:0 auto 15px;
  text-align:center;
}
.games-dashboard #achievements summary{
  text-align:center;
}
.games-dashboard .achievement-grid{
  text-align:left;
}
.games-dashboard .game-list{
  width:100%;
  grid-template-columns:1fr!important;
  justify-items:center;
  gap:11px;
}
.games-dashboard .compact-game{
  width:min(100%,440px);
  margin-inline:auto;
}
.games-dashboard .compact-game .game-title-row,
.games-dashboard .compact-game .reward-rule,
.games-dashboard .compact-game .game-best,
.games-dashboard .compact-game .status-line{
  text-align:left;
}
.games-dashboard main>details.card:not(#achievements),
.games-dashboard main>a.button.secondary{
  width:min(100%,440px);
  margin-left:auto;
  margin-right:auto;
}
@media(max-width:390px){
  .games-dashboard .quick-grid{
    grid-template-columns:1fr 1fr;
  }
  .games-dashboard .quick-game{
    min-width:0;
    padding-inline:7px;
  }
}


/* 0.13.5 simplified Home top */
.home-hero{
  position:relative;
  padding-right:38px;
  margin-bottom:14px;
}
.home-hero-copy p{display:none}
.home-info-button{
  position:absolute;
  right:0;
  top:50%;
  width:30px;
  height:30px;
  min-height:0;
  margin:0;
  padding:0;
  transform:translateY(-50%);
  display:grid;
  place-items:center;
  border-radius:50%;
  border:1px solid #2d4057;
  background:#121c2c;
  color:#7dd3fc;
  font-size:15px;
  font-weight:900;
  box-shadow:none;
}
.home-install-banner{
  min-height:46px;
  margin-bottom:10px;
  padding:7px 8px;
}
.home-install-main{
  gap:8px;
}
.home-install-icon{
  width:30px;
  height:30px;
  border-radius:9px;
}
.home-install-copy strong{
  font-size:10px;
}
.home-install-copy span{
  margin-top:1px;
  font-size:8.5px;
}
.home-install-actions{
  display:flex;
  align-items:center;
  gap:4px;
}
.home-install-button{
  min-width:44px;
  min-height:30px;
  padding:5px 8px;
  font-size:9px;
}
.home-install-dismiss{
  width:28px;
  height:28px;
  min-height:0;
  margin:0;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#71839a;
  font-size:17px;
  box-shadow:none;
}
.home-overview{
  margin-bottom:15px;
}
.home-dashboard .continue-card{
  margin-top:0;
}


/* 0.13.6 compact game result screens */
.game-result-dialog{
  width:min(390px,calc(100% - 24px));
  padding:14px;
  border-radius:20px;
}
.result-hero{
  gap:10px;
  margin-bottom:10px;
}
.result-icon{
  width:48px;
  height:48px;
  border-radius:14px;
  font-size:25px;
}
.result-heading h2{
  margin:0 0 3px;
  font-size:19px;
}
.result-badge{
  padding:4px 7px;
  font-size:9px;
}
.result-main{
  padding:11px 12px;
  border-radius:14px;
}
.result-main>span{
  font-size:10px;
}
.result-main>strong{
  font-size:34px;
  margin:2px 0;
}
.result-best{
  font-size:10px;
}
.result-stats{
  gap:6px;
  margin-top:8px;
}
.result-stat{
  padding:8px 5px;
  border-radius:12px;
}
.result-stat>span{
  font-size:15px;
}
.result-stat>strong{
  font-size:14px;
  margin-top:1px;
}
.result-stat>small{
  font-size:8px;
  margin-top:1px;
}
.result-notes{
  gap:4px;
  margin-top:8px;
  padding:8px 10px;
  border-radius:12px;
  font-size:10px;
}
.result-actions{
  display:grid;
  grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);
  gap:7px;
  margin-top:9px;
}
.result-actions button{
  min-height:42px;
  margin:0;
  padding:9px 10px;
  border-radius:11px;
  font-size:11px;
}
@media(max-width:340px){
  .result-actions{
    grid-template-columns:1fr;
  }
}


/* 0.13.7 real-phone readability: Snake + Neon Dodger */
.game-title-status-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  min-width:0;
}
.game-title-status-row h1{
  margin:0!important;
  min-width:0;
}
.game-title-status-row .title-status{
  flex:0 0 auto;
  margin:0;
  padding:5px 8px;
  font-size:9px;
  white-space:nowrap;
}

.snake-page .game-guide-strip,
.dodger-page .game-guide-strip{
  gap:7px;
  margin-bottom:8px;
}
.snake-page .game-guide-step,
.dodger-page .game-guide-step{
  gap:7px;
  min-height:48px;
  padding:8px 9px;
  border-radius:11px;
}
.snake-page .game-guide-step-icon,
.dodger-page .game-guide-step-icon{
  font-size:17px;
}
.snake-page .game-guide-step strong,
.dodger-page .game-guide-step strong{
  font-size:10px;
  line-height:1.15;
}
.snake-page .game-guide-step small,
.dodger-page .game-guide-step small{
  margin-top:2px;
  font-size:8.5px;
  line-height:1.22;
}

/* Keep the larger guides readable without making the game boards smaller. */
.snake-page .game-guide-surface-wrap,
.dodger-page .game-guide-surface-wrap{
  margin-top:0;
}

@media(max-width:390px){
  .snake-page .game-guide-strip,
  .dodger-page .game-guide-strip{
    gap:5px;
  }
  .snake-page .game-guide-step,
  .dodger-page .game-guide-step{
    padding:7px 6px;
    gap:5px;
  }
  .snake-page .game-guide-step-icon,
  .dodger-page .game-guide-step-icon{
    font-size:15px;
  }
  .snake-page .game-guide-step strong,
  .dodger-page .game-guide-step strong{
    font-size:9.5px;
  }
  .snake-page .game-guide-step small,
  .dodger-page .game-guide-step small{
    font-size:8px;
  }
}


/* 0.13.8 shared real-phone readability for every game */
.game-guide-page .game-title-status-row{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  margin-bottom:5px;
}
.game-guide-page .game-title-status-row h1{
  margin:0!important;
  min-width:0;
}
.game-guide-page .game-title-status-row .title-status{
  flex:0 0 auto;
  margin:0;
  padding:5px 8px;
  font-size:9px;
  white-space:nowrap;
}
.game-guide-page .game-guide-strip{
  gap:7px;
  margin-bottom:8px;
}
.game-guide-page .game-guide-step{
  min-height:48px;
  gap:7px;
  padding:8px 9px;
  border-radius:11px;
}
.game-guide-page .game-guide-step-icon{
  font-size:17px;
}
.game-guide-page .game-guide-step strong{
  font-size:10px;
  line-height:1.15;
}
.game-guide-page .game-guide-step small{
  margin-top:2px;
  font-size:8.5px;
  line-height:1.22;
}
@media(max-width:390px){
  .game-guide-page .game-guide-strip{
    gap:5px;
  }
  .game-guide-page .game-guide-step{
    padding:7px 6px;
    gap:5px;
  }
  .game-guide-page .game-guide-step-icon{
    font-size:15px;
  }
  .game-guide-page .game-guide-step strong{
    font-size:9.5px;
  }
  .game-guide-page .game-guide-step small{
    font-size:8px;
  }
}


/* 0.14.0 Profile + Missions dashboard refresh */
.profile-dashboard,
.missions-dashboard{
  background:
    radial-gradient(circle at 50% -10%,rgba(59,130,246,.12),transparent 34%),
    #0b1220;
}
.profile-container,
.missions-container{
  width:min(100%,520px);
  margin-inline:auto;
  padding-inline:16px;
}
.profile-dashboard .topbar,
.missions-dashboard .topbar{
  margin-bottom:12px;
}
.profile-hero{
  margin-bottom:10px;
  padding:14px;
  border:1px solid #2c4058;
  border-radius:18px;
  background:#152033;
  text-align:left;
}
.profile-eyebrow,
.missions-eyebrow{
  display:block;
  color:#7dd3fc;
  font-size:9px;
  font-weight:900;
  letter-spacing:.12em;
}
.profile-hero-row{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:10px;
  align-items:center;
  margin-top:7px;
}
.profile-hero .profile-avatar{
  width:44px;
  height:44px;
  font-size:22px;
}
.profile-hero-copy h1{
  margin:0;
  font-size:22px;
  line-height:1.05;
}
.profile-level-line{
  margin-top:3px;
  color:#9fb0c4;
  font-size:9.5px;
}
.profile-settings-link{
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:1px solid #2d4057;
  border-radius:11px;
  background:#111b2b;
  text-decoration:none;
}
.profile-xp-line{
  display:flex;
  justify-content:space-between;
  margin-top:10px;
  color:#a8b8ca;
  font-size:9px;
}
.profile-hero .xp-bar,
.missions-player-strip .xp-bar{
  height:6px;
  margin-top:5px;
}
.profile-edit-card,
.profile-section,
.profile-achievement-card,
.missions-detail-card{
  margin-bottom:10px;
  border:1px solid #293b52;
  border-radius:15px;
  background:#131e2f;
}
.profile-edit-card{
  padding:0 12px;
}
.profile-edit-card summary,
.profile-collapsible summary,
.missions-detail-card summary{
  padding:11px 0;
  cursor:pointer;
  color:#dbeafe;
  font-size:10px;
  font-weight:900;
}
.profile-edit-card .profile-name-form{
  margin-top:0;
}
.profile-edit-footer{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
  padding:8px 0 11px;
  color:#8192a8;
  font-size:8px;
}
.profile-edit-footer .mini-button{
  min-height:32px;
  padding:6px 8px;
  font-size:8px;
}
.profile-key-stats{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:6px;
  margin-bottom:9px;
}
.profile-key-stats>div,
.missions-highlights>div{
  padding:10px 6px;
  border:1px solid #2a3b50;
  border-radius:12px;
  background:#152033;
  text-align:center;
}
.profile-key-stats strong,
.missions-highlights strong{
  display:block;
  color:#f8fafc;
  font-size:17px;
}
.profile-key-stats span,
.missions-highlights span{
  display:block;
  margin-top:2px;
  color:#8fa0b6;
  font-size:7.5px;
}
.profile-secondary-stats{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:6px;
  margin-bottom:12px;
}
.profile-secondary-stats>div{
  display:flex;
  justify-content:space-between;
  gap:8px;
  align-items:center;
  padding:8px 10px;
  border-radius:11px;
  background:#111b2b;
  border:1px solid #26384e;
}
.profile-secondary-stats span{
  color:#8495aa;
  font-size:8px;
}
.profile-secondary-stats strong{
  max-width:54%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:9px;
}
.profile-section{
  padding:11px 12px;
  text-align:left;
}
.profile-section-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}
.profile-section-head h2{
  margin:0;
  font-size:12px;
}
.profile-section-head a,
.profile-achievement-card a{
  color:#7dd3fc;
  font-size:8.5px;
  text-decoration:none;
}
.profile-favorites{
  gap:6px;
}
.profile-favorites .quick-game{
  min-height:36px;
  padding:7px 8px;
  font-size:9px;
}
.profile-collapsible{
  padding:0 12px 10px;
}
.profile-collapsible summary{
  display:flex;
  justify-content:space-between;
}
.profile-collapsible summary span{
  color:#7890aa;
  font-weight:700;
}
.profile-collapsible .best-grid{
  margin-top:3px;
}
.profile-achievement-card{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:11px 12px;
}
.profile-achievement-card strong,
.profile-achievement-card span{
  display:block;
}
.profile-achievement-card strong{font-size:10px}
.profile-achievement-card span{
  margin-top:2px;
  color:#8fa0b6;
  font-size:8px;
}
.profile-shortcuts{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px;
  margin-top:10px;
}
.profile-shortcuts a{
  display:grid;
  grid-template-columns:auto 1fr;
  column-gap:7px;
  padding:10px;
  border:1px solid #2a3d55;
  border-radius:13px;
  background:#152033;
  text-decoration:none;
  text-align:left;
}
.profile-shortcuts a>span{
  grid-row:1/3;
  align-self:center;
  font-size:18px;
}
.profile-shortcuts strong{
  font-size:9px;
}
.profile-shortcuts small{
  color:#8395aa;
  font-size:7.5px;
}

/* Missions */
.missions-hero{
  margin:2px auto 11px;
  text-align:center;
}
.missions-hero h1{
  margin:4px 0 3px;
  font-size:27px;
  line-height:1.08;
  letter-spacing:-.035em;
}
.missions-hero p{
  margin:0;
  color:#94a3b8;
  font-size:10px;
}
.missions-player-strip{
  display:grid;
  grid-template-columns:1fr auto;
  gap:5px 10px;
  margin-bottom:10px;
  padding:10px 12px;
  border:1px solid #2b3e55;
  border-radius:14px;
  background:#152033;
  text-align:left;
}
.missions-player-strip>div{
  display:flex;
  gap:7px;
  align-items:center;
}
.missions-player-strip strong{
  font-size:10px;
}
.missions-player-strip span{
  color:#8fa0b6;
  font-size:8.5px;
}
.missions-player-strip .xp-bar{
  grid-column:1/-1;
}
.missions-weekly-card{
  margin-bottom:10px;
  padding:12px;
  border:1px solid #31506f;
  border-radius:17px;
  background:#17243a;
}
.missions-weekly-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  text-align:left;
}
.missions-weekly-head h2{
  margin:0;
  font-size:13px;
}
.missions-weekly-head span{
  display:block;
  margin-top:2px;
  color:#8fa0b6;
  font-size:8px;
}
.missions-weekly-head>strong{
  padding:5px 7px;
  border:1px solid #3a5471;
  border-radius:999px;
  font-size:9px;
}
.missions-dashboard .mission-list{
  gap:7px;
  margin-top:9px;
}
.missions-dashboard .mission-card{
  padding:10px;
  border-radius:12px;
}
.missions-dashboard .mission-title{font-size:10px}
.missions-dashboard .mission-reward{font-size:8px}
.missions-dashboard .mission-description{
  margin:3px 0 6px;
  font-size:8px;
}
.missions-dashboard .mission-progress-row{
  margin-bottom:4px;
  font-size:8px;
}
.missions-dashboard .mission-progress{height:6px}
.missions-dashboard .mission-card button{
  min-height:32px;
  margin-top:7px;
  padding:6px 8px;
  font-size:8.5px;
}
.missions-highlights{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:6px;
  margin-bottom:10px;
}
.missions-detail-card{
  padding:0 12px 10px;
  text-align:left;
}
.missions-detail-card summary{
  display:flex;
  justify-content:space-between;
  gap:8px;
}
.missions-detail-card summary span{
  color:#8193a9;
  font-weight:700;
}
.missions-detail-card .streak-track{
  margin-top:4px;
}
.missions-dashboard .streak-reward-list,
.missions-dashboard .game-stats-list{
  gap:6px;
  margin-top:8px;
}
.missions-dashboard .streak-reward,
.missions-dashboard .game-stat-row{
  padding:8px 9px;
  border-radius:11px;
}
.missions-dashboard .activity-item{
  padding:8px 0;
}


/* 0.14.2 Safari → Home Screen progress transfer */
.home-transfer-banner{
  margin:0 0 10px;
  padding:12px;
  border:1px solid #2f6fb0;
  border-radius:16px;
  background:linear-gradient(135deg,#142844,#162238);
  text-align:left;
}
.home-transfer-copy strong,
.home-transfer-copy span{
  display:block;
}
.home-transfer-copy strong{
  color:#f8fafc;
  font-size:11px;
}
.home-transfer-copy span{
  margin-top:4px;
  color:#a8b8ca;
  font-size:8.5px;
  line-height:1.4;
}
.home-transfer-actions{
  display:flex;
  gap:7px;
  margin-top:9px;
}
.home-transfer-actions button{
  min-height:36px;
  margin:0;
  padding:8px 10px;
  font-size:9px;
}
.home-transfer-actions .green{
  flex:1.4;
}
.home-transfer-actions .secondary{
  flex:.7;
}
.transfer-card{
  scroll-margin-top:18px;
}
.transfer-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.transfer-actions button{
  margin:0;
}
.transfer-code-input{
  width:100%;
  box-sizing:border-box;
  margin:10px 0 8px;
  padding:10px;
  border:1px solid #3a4c63;
  border-radius:12px;
  background:#0f1828;
  color:#dbeafe;
  font:8px/1.35 ui-monospace,SFMono-Regular,Menlo,monospace;
  resize:vertical;
}


/* 0.14.3 user-controlled text sizing */
.display-settings-card .muted{margin-top:0}
.text-size-options{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:12px;
}
.text-size-options button{
  min-height:54px;
  margin:0;
  padding:9px 10px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:2px;
  border:1px solid #33475f;
  border-radius:13px;
  background:#111b2b;
  color:#dbeafe;
  box-shadow:none;
}
.text-size-options button strong{font-size:12px}
.text-size-options button span{color:#8fa0b6;font-size:10px}
.text-size-options button.active{
  border-color:#3b82f6;
  background:#17335d;
  box-shadow:inset 0 0 0 1px #3b82f6;
}
.text-size-options button.active span{color:#93c5fd}
.text-size-preview{
  margin-top:10px;
  padding:10px 12px;
  border:1px solid #293b52;
  border-radius:12px;
  background:#0f1828;
}
.text-size-preview span,.text-size-preview strong{display:block}
.text-size-preview span{color:#7dd3fc;font-size:10px;font-weight:800}
.text-size-preview strong{margin-top:3px;font-size:14px}


/* 0.15.0 Earnly Cloud account + manual cloud saves */
.cloud-account-head{
  align-items:flex-start;
  margin-bottom:10px;
}
.cloud-account-head h2{
  margin:2px 0 0;
}
.section-kicker{
  display:block;
  color:#7dd3fc;
  font-size:8px;
  font-weight:900;
  letter-spacing:.12em;
}
.cloud-badge{
  padding:5px 8px;
  border:1px solid #42536a;
  border-radius:999px;
  background:#111b2b;
  color:#9fb0c4;
  font-size:8px;
  font-weight:900;
}
.cloud-badge.connected{
  border-color:#15803d;
  background:#123522;
  color:#86efac;
}
.cloud-auth-fields{
  display:grid;
  gap:8px;
  margin-top:10px;
}
.cloud-auth-fields label span{
  display:block;
  margin-bottom:4px;
  color:#9fb0c4;
  font-size:8px;
  font-weight:800;
}
.cloud-auth-fields input{
  width:100%;
  box-sizing:border-box;
  min-height:42px;
  padding:9px 10px;
  border:1px solid #35475d;
  border-radius:11px;
  background:#0f1828;
  color:#f8fafc;
  font-size:10px;
}
.cloud-auth-actions,
.cloud-save-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  margin-top:9px;
}
.cloud-auth-actions button,
.cloud-save-actions button{
  min-height:42px;
  margin:0;
  padding:8px 10px;
  font-size:9px;
}
.cloud-signed-status{
  margin-top:2px;
}
.cloud-message{
  margin-top:10px;
}
.cloud-device-meta{
  display:flex;
  justify-content:space-between;
  gap:8px;
  margin-top:10px;
  padding-top:9px;
  border-top:1px solid #314158;
  color:#8192a8;
  font-size:7.5px;
}
.cloud-device-meta strong{
  color:#9fc9ff;
}
.cloud-signout{
  margin-top:8px;
}
.cloud-safety-card{
  border-color:#254d3a;
}
@media(max-width:390px){
  .cloud-auth-actions,
  .cloud-save-actions{
    grid-template-columns:1fr;
  }
}


/* 0.15.2 automatic cloud sync */
.cloud-auto-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:10px;
  padding:10px 11px;
  border:1px solid #314158;
  border-radius:12px;
  background:#101a2a;
}
.cloud-auto-row strong,.cloud-auto-row span{display:block}
.cloud-auto-row strong{color:#f8fafc;font-size:9px}
.cloud-auto-row span{margin-top:2px;color:#91a2b7;font-size:7.5px;line-height:1.35}
.cloud-auto-toggle{
  flex:0 0 auto;
  min-width:52px;
  min-height:34px;
  margin:0;
  padding:6px 10px;
  border:1px solid #46566d;
  border-radius:999px;
  background:#1f2b3c;
  color:#aebccc;
  font-size:9px;
  font-weight:900;
}
.cloud-auto-toggle.active{border-color:#15803d;background:#12452a;color:#86efac}


/* 0.15.3 cross-device restore + password recovery */
.cloud-forgot{
  display:inline-block;
  margin-top:8px;
  padding:4px 0;
  border:0;
  background:transparent;
  color:#7dd3fc;
  font-size:8px;
  text-decoration:underline;
}
.cloud-recovery{
  margin-top:10px;
  padding:12px;
  border:1px solid #314158;
  border-radius:12px;
  background:#101a2a;
}
.cloud-recovery h3{
  margin:4px 0 4px;
}
.cloud-recovery input{
  width:100%;
  box-sizing:border-box;
  min-height:42px;
  margin:8px 0;
  padding:9px 10px;
  border:1px solid #35475d;
  border-radius:11px;
  background:#0f1828;
  color:#f8fafc;
  font-size:10px;
}


/* 0.15.4 clearer forgot-password flow */
.cloud-reset-panel{
  margin-top:10px;
  padding:12px;
  border:1px solid #314158;
  border-radius:12px;
  background:#101a2a;
}
.cloud-reset-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.cloud-reset-head h3{
  margin:3px 0 0;
}
.cloud-reset-close{
  width:32px;
  height:32px;
  min-width:32px;
  padding:0;
  border:1px solid #3b4c63;
  border-radius:10px;
  background:#162235;
  color:#dbeafe;
  font-size:14px;
}
.cloud-reset-email-label{
  display:block;
  margin-top:8px;
}
.cloud-reset-email-label > span{
  display:block;
  margin-bottom:5px;
  font-size:8px;
  font-weight:700;
  color:#a8b6ca;
}
.cloud-reset-email-label input{
  width:100%;
  box-sizing:border-box;
  min-height:44px;
  padding:9px 11px;
  border:1px solid #40536b;
  border-radius:11px;
  background:#0d1727;
  color:#f8fafc;
  font-size:10px;
}
.cloud-reset-status{
  margin-top:9px;
  padding:9px 10px;
  border:1px solid #34455b;
  border-radius:10px;
  background:#0d1727;
  color:#cbd5e1;
  font-size:8.5px;
  line-height:1.45;
}
.cloud-reset-status.success{
  border-color:#197347;
  background:#0c2d20;
  color:#9ff3c7;
}
.cloud-reset-status.error{
  border-color:#8a4a32;
  background:#331b16;
  color:#ffd0bf;
}

/* 0.15.14 account cleanup after automatic cloud restore */
.account-advanced{
  padding:0;
  overflow:hidden;
  text-align:left;
}
.account-advanced summary{
  padding:13px 14px;
}
.account-advanced-body{
  padding:0 14px 14px;
}
.account-tool-block{
  padding:13px 0 2px;
  border-top:1px solid #2b3a4f;
}
.account-tool-block:first-child{border-top:0}
.account-tool-block h3{
  margin:0 0 5px;
  font-size:14px;
}
.account-tool-block .data-actions{
  margin-top:10px;
}


/* 0.15.15 mission navigation */
.home-challenge-row.playable,
.mission-card.playable{
  cursor:pointer;
}
.home-challenge-row.playable{
  border-radius:14px;
}
.home-challenge-row.playable:focus-visible,
.mission-card.playable:focus-visible{
  outline:3px solid #60a5fa;
  outline-offset:3px;
}
.mission-card.playable{
  border-color:#3b82f680;
}
.mission-play-button{
  border:1px solid #3b82f680;
  color:#dbeafe;
}


/* 0.15.17 clearer account confirmation flow */

/* 0.15.18 mission context on game pages */
.game-goal-card{
  width:min(100%,520px);
  margin:0 auto 10px;
  padding:12px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border:1px solid #22c55e55;
  border-radius:15px;
  background:linear-gradient(145deg,#123325,#172033);
  box-shadow:0 10px 24px #02061733;
}

/* 0.15.20 full-screen Snake steering */
.snake-control-layer{
  position:fixed;
  inset:0;
  z-index:50;
  background:transparent;
  touch-action:none;
  overscroll-behavior:none;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}
.snake-control-layer[hidden]{display:none!important}
html.snake-game-active,
html.snake-game-active body{
  overflow:hidden!important;
  overscroll-behavior:none!important;
  touch-action:none!important;
}

/* 0.15.21 clearer Snake start tutorial */
.snake-page .game-guide-overlay{
  padding:14px 16px;
  background:linear-gradient(180deg,rgba(8,18,33,.94),rgba(8,18,33,.98));
}
.snake-page .game-guide-overlay-icon{margin-bottom:3px;font-size:24px}
.snake-page .game-guide-overlay-title{font-size:21px}
.snake-page .game-guide-overlay-text{max-width:300px;color:#cbd5e1}
.snake-start-callout{
  margin-top:10px;
  padding:9px 20px;
  border:2px solid #4ade80;
  border-radius:999px;
  background:#15803d;
  color:white;
  font-size:15px;
  font-weight:1000;
  letter-spacing:.05em;
  box-shadow:0 0 0 5px rgba(34,197,94,.14),0 10px 24px rgba(0,0,0,.3);
  animation:snake-start-pulse 1.6s ease-in-out infinite;
}
.snake-overlay-howto{
  width:min(100%,330px);
  display:grid;
  gap:5px;
  margin-top:12px;
  text-align:left;
}
.snake-overlay-howto>div{
  display:grid;
  grid-template-columns:27px 1fr;
  gap:9px;
  align-items:center;
  padding:6px 9px;
  border:1px solid #334155;
  border-radius:11px;
  background:rgba(15,23,42,.88);
}
.snake-overlay-howto b{
  width:27px;
  height:27px;
  display:grid;
  place-items:center;
  border-radius:50%;
  background:#2563eb;
  color:white;
  font-size:13px;
}
.snake-overlay-howto span{display:grid;gap:1px}
.snake-overlay-howto strong{font-size:12px;color:#f8fafc}
.snake-overlay-howto small{font-size:9px;line-height:1.3;color:#b8c4d5}
@keyframes snake-start-pulse{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.035)}
}
@media(prefers-reduced-motion:reduce){
  .snake-start-callout{animation:none}
}
.game-goal-copy{display:grid;gap:2px;min-width:0}
.game-goal-eyebrow{
  color:#86efac;
  font-size:9px;
  font-weight:1000;
  letter-spacing:.12em;
}
.game-goal-copy strong{font-size:14px;line-height:1.2}
.game-goal-copy small{color:#cbd5e1;font-size:11px;line-height:1.35}
.game-goal-side{display:grid;gap:5px;text-align:right;flex:0 0 auto}
.game-goal-side b{color:#fde68a;font-size:11px;white-space:nowrap}
.game-goal-side a{color:#93c5fd;font-size:11px;font-weight:900;text-decoration:none}
.result-goal-update{border-color:#22c55e66!important;background:#123325!important}
.goal-return-button{border-color:#22c55e88!important;color:#bbf7d0!important}
@media(max-width:390px){
  .game-goal-card{align-items:flex-start}
  .game-goal-copy small{font-size:10px}
}
.cloud-signup-hint{
  display:flex;
  gap:6px;
  align-items:flex-start;
  margin-top:9px;
  padding:9px 10px;
  border:1px solid #314158;
  border-radius:11px;
  background:#101a2a;
  color:#aebed1;
  font-size:8px;
  line-height:1.4;
}
.cloud-signup-hint strong{
  flex:0 0 auto;
  color:#f8fafc;
}
.cloud-signup-hint span{
  min-width:0;
}
.cloud-signup-notice{
  display:grid;
  grid-template-columns:38px 1fr;
  gap:9px 10px;
  margin-top:11px;
  padding:12px;
  border:1px solid #197347;
  border-radius:13px;
  background:#0c2d20;
  text-align:left;
}
.cloud-signup-notice[hidden]{display:none}
.cloud-signup-notice.error{
  border-color:#9a5a2c;
  background:#351e12;
}
.cloud-signup-notice-icon{
  width:38px;
  height:38px;
  display:grid;
  place-items:center;
  border-radius:11px;
  background:#132338;
  font-size:20px;
}
.cloud-signup-notice-copy{
  min-width:0;
}
.cloud-signup-notice-copy strong{
  display:block;
  color:#f8fafc;
  font-size:12px;
  line-height:1.25;
}
.cloud-signup-notice-copy span{
  display:block;
  margin-top:4px;
  color:#d9fbe8;
  font-size:9px;
  line-height:1.5;
  overflow-wrap:anywhere;
}
.cloud-signup-notice.error .cloud-signup-notice-copy span{
  color:#ffd8c2;
}
.cloud-signup-notice-copy small{
  display:block;
  margin-top:7px;
  padding-top:7px;
  border-top:1px solid rgba(255,255,255,.12);
  color:#fef3c7;
  font-size:8px;
  line-height:1.45;
}
.cloud-signup-different{
  grid-column:1 / -1;
  width:100%;
  min-height:38px;
  margin:0;
}
#cloudCreateButton:disabled{
  opacity:.72;
  cursor:not-allowed;
}


/* Desktop navigation: keep primary sections visible near the top on computers. */
.desktop-nav{display:none}
@media (min-width:600px){
  .desktop-nav{
    position:sticky;
    top:8px;
    z-index:44;
    display:grid;
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:6px;
    margin:-2px 0 14px;
    padding:7px;
    border:1px solid #334155;
    border-radius:16px;
    background:rgba(15,23,42,.95);
    box-shadow:0 10px 28px rgba(0,0,0,.2);
    backdrop-filter:blur(14px);
  }
  .desktop-nav-item{
    min-width:0;
    padding:9px 7px;
    border-radius:11px;
    color:#aab6c8;
    text-decoration:none;
    font-size:11px;
    font-weight:800;
    white-space:nowrap;
    text-align:center;
  }
  .desktop-nav-item:hover,
  .desktop-nav-item:focus-visible{
    color:#fff;
    background:#243044;
    outline:none;
  }
  .desktop-nav-item.active{
    color:#fff;
    background:#1e3a5f;
    box-shadow:inset 0 0 0 1px #3b82f666;
  }
  .bottom-nav{display:none}
  .has-app-nav .container{
    padding-bottom:max(40px,env(safe-area-inset-bottom));
  }
  .has-app-nav .toast{bottom:20px}
}


/* Game browser search + filters */
.game-browser-tools{
  margin:14px 0;
  padding:12px;
  border:1px solid #334155;
  border-radius:17px;
  background:#111b2b;
  text-align:left;
}
.game-search-box{
  display:flex;
  align-items:center;
  gap:9px;
  min-height:45px;
  padding:0 12px;
  border:1px solid #3b4c63;
  border-radius:13px;
  background:#0d1727;
}
.game-search-box>span{font-size:16px}
.game-search-box input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  padding:11px 0;
  background:transparent;
  color:#fff;
  font:inherit;
  font-size:13px;
}
.game-search-box input::placeholder{color:#718096}
.game-filter-row{
  display:flex;
  gap:7px;
  margin-top:9px;
  overflow-x:auto;
  padding-bottom:2px;
  scrollbar-width:none;
}
.game-filter-row::-webkit-scrollbar{display:none}
.game-filter{
  flex:0 0 auto;
  min-height:35px;
  margin:0;
  padding:7px 10px;
  border:1px solid #3b4c63;
  border-radius:999px;
  background:#182437;
  color:#aebed1;
  font-size:10px;
  font-weight:900;
}
.game-filter.active{
  border-color:#3b82f6;
  background:#1d4ed8;
  color:#fff;
}
.game-filter-count{
  margin:8px 2px 0;
  color:#8192a8;
  font-size:9px;
  font-weight:800;
}
.game-browser-empty{
  display:grid;
  gap:5px;
  margin:14px 0;
  padding:24px 16px;
  border:1px dashed #475569;
  border-radius:16px;
  color:#94a3b8;
}
.game-browser-empty strong{color:#e2e8f0}
.game-browser-empty span{font-size:11px}


/* Simplified Games picker */
.games-simple-note{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px 14px;
  flex-wrap:wrap;
  margin:8px 0 12px;
  color:#aebed1;
  font-size:10px;
  font-weight:800;
}
.games-simple-note>span{
  padding:7px 10px;
  border:1px solid #334155;
  border-radius:999px;
  background:#111b2b;
}
.games-simple-note details{
  position:relative;
}
.games-simple-note summary{
  cursor:pointer;
  color:#93c5fd;
  list-style:none;
}
.games-simple-note summary::-webkit-details-marker{display:none}
.games-simple-note details p{
  position:absolute;
  z-index:20;
  right:0;
  width:min(280px,82vw);
  margin:7px 0 0;
  padding:10px 12px;
  border:1px solid #334155;
  border-radius:12px;
  background:#111827;
  box-shadow:0 14px 30px rgba(0,0,0,.35);
  color:#cbd5e1;
  font-size:9px;
  line-height:1.45;
  text-align:left;
}
.games-dashboard .quick-section{
  margin:12px 0 10px;
}
.games-dashboard .quick-section h2{
  margin:0 0 7px;
  font-size:11px;
  letter-spacing:.08em;
  color:#cbd5e1;
  text-transform:uppercase;
}
.games-dashboard .quick-grid{
  gap:7px;
}
.games-dashboard .quick-game{
  min-height:38px;
  padding:9px 11px;
  font-size:11px;
}
.games-dashboard .game-browser-tools{
  margin:10px 0 12px;
  padding:9px;
}
.games-dashboard .game-search-box{
  min-height:41px;
}
.games-dashboard .game-filter-row{
  margin-top:7px;
}
.games-dashboard .game-filter{
  min-height:32px;
  padding:6px 9px;
  font-size:9px;
}
.games-dashboard .game-filter-count{
  margin-top:6px;
}
.games-dashboard .game-list{
  margin-top:0;
}


/* Scalable catalog batching */
.catalog-more-button{
  margin:10px 0 14px;
  min-height:44px;
  border:1px solid #475569;
  background:#1a2638;
  color:#cbd5e1;
}
.catalog-more-button[hidden]{display:none!important}


/* iPhone safe-area scroll mask */
@supports (padding-top: env(safe-area-inset-top)){
  body::before{
    content:"";
    position:fixed;
    z-index:999;
    top:0;
    left:0;
    right:0;
    height:env(safe-area-inset-top);
    background:#0f172a;
    pointer-events:none;
  }
}


/* Lock page movement while a game is actively running */
html.earnly-gameplay-locked,
body.earnly-gameplay-locked{
  overflow:hidden!important;
  overscroll-behavior:none!important;
}

body.earnly-gameplay-locked{
  position:fixed!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  touch-action:none;
  -webkit-overflow-scrolling:auto;
}

/* 0.15.16 iOS catalog nav stability */
@media (max-width:699px){
  body.games-dashboard .bottom-nav{
    position:sticky;
    left:auto;
    bottom:0;
    transform:none;
    width:100%;
    margin-top:12px;
  }
  body.games-dashboard.has-app-nav .container{
    padding-bottom:max(20px,env(safe-area-inset-bottom));
  }
}


/* 0.15.30 compact mobile game catalog */
@media (max-width:699px){
  .games-dashboard .game-list{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:10px;
  }
  .games-dashboard .game-card.compact-game{
    min-width:0;
    margin:0;
    padding:12px 10px;
    border-radius:16px;
    display:flex;
    flex-direction:column;
    gap:7px;
    text-align:left;
  }
  .games-dashboard .game-title-row{
    display:block;
    position:relative;
    padding-right:0;
  }
  .games-dashboard .game-title-row h2{
    margin:0;
    padding-right:38px;
    font-size:15px;
    line-height:1.2;
  }
  .games-dashboard .game-title-actions{
    position:absolute;
    top:-3px;
    right:0;
    display:block;
  }
  .games-dashboard .favorite-button{
    width:32px;
    min-width:32px;
    height:32px;
    min-height:32px;
    padding:0;
    border-radius:10px;
    font-size:17px;
  }
  .games-dashboard .play-pill{
    position:static;
    display:inline-block;
    margin-top:7px;
    padding:4px 7px;
    font-size:8px;
    white-space:nowrap;
  }
  .games-dashboard .reward-rule{
    min-height:30px;
    margin:0;
    font-size:9px;
    line-height:1.35;
  }
  .games-dashboard .game-best{
    min-height:14px;
    margin:0;
    font-size:8.5px;
    line-height:1.2;
  }
  .games-dashboard .game-best[hidden]{display:block;visibility:hidden}
  .games-dashboard .game-play-button{
    min-height:38px;
    margin-top:auto;
    padding:8px 6px;
    border-radius:11px;
    font-size:11px;
    line-height:1.15;
  }
  .games-dashboard .status-line{
    margin-top:1px;
    padding:6px;
    border-radius:9px;
    font-size:7.5px;
    line-height:1.25;
  }
  .games-dashboard .game-browser-tools{
    padding:7px 8px;
  }
}
@media (max-width:360px){
  .games-dashboard .game-list{gap:8px}
  .games-dashboard .game-card.compact-game{padding:10px 8px}
  .games-dashboard .game-title-row h2{font-size:14px}
}


/* 0.15.31 force compact mobile games catalog — must stay last */
@media (max-width:699px){
  body.games-dashboard #games.compact-catalog-grid{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    align-items:stretch!important;
    justify-items:stretch!important;
    gap:10px!important;
    width:100%!important;
  }
  body.games-dashboard #games.compact-catalog-grid > .catalog-tile{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    padding:11px 9px!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-row h2{
    font-size:14px!important;
    line-height:1.15!important;
  }
  body.games-dashboard #games .catalog-tile .reward-rule{
    font-size:9px!important;
    min-height:25px!important;
    margin:2px 0!important;
  }
  body.games-dashboard #games .catalog-tile .game-best{
    font-size:8px!important;
    min-height:12px!important;
    margin:0!important;
  }
  body.games-dashboard #games .catalog-tile .game-play-button{
    min-height:36px!important;
    padding:7px 5px!important;
    font-size:10px!important;
  }
}


/* 0.15.32 polished compact mobile game cards */
@media (max-width:699px){
  body.games-dashboard #games.compact-catalog-grid{
    gap:10px!important;
    padding-bottom:12px!important;
  }
  body.games-dashboard #games.compact-catalog-grid > .catalog-tile{
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    min-height:210px!important;
    padding:14px 12px 12px!important;
    border-radius:20px!important;
    overflow:hidden!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-row{
    display:block!important;
    padding-right:0!important;
    min-height:48px!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-row h2{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:0!important;
    padding:0 0 4px!important;
    font-size:16px!important;
    line-height:1.2!important;
    white-space:normal!important;
    overflow:visible!important;
    text-overflow:clip!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-row > div,
  body.games-dashboard #games .catalog-tile .game-title-row .game-card-actions{
    position:static!important;
    display:flex!important;
    gap:6px!important;
    align-items:center!important;
    margin-top:5px!important;
  }
  body.games-dashboard #games .catalog-tile .favorite-button,
  body.games-dashboard #games .catalog-tile .favorite-btn{
    width:32px!important;
    height:32px!important;
    min-width:32px!important;
    padding:0!important;
    border-radius:10px!important;
  }
  body.games-dashboard #games .catalog-tile .plays-badge,
  body.games-dashboard #games .catalog-tile .plays-left{
    min-height:30px!important;
    padding:5px 8px!important;
    font-size:10px!important;
    white-space:nowrap!important;
  }
  body.games-dashboard #games .catalog-tile .reward-rule{
    margin:7px 0 3px!important;
    min-height:32px!important;
    font-size:10px!important;
    line-height:1.3!important;
    overflow:hidden!important;
  }
  body.games-dashboard #games .catalog-tile .game-best{
    margin:3px 0 8px!important;
    min-height:18px!important;
    font-size:9px!important;
  }
  body.games-dashboard #games .catalog-tile .game-play-button{
    margin-top:auto!important;
    width:100%!important;
    min-height:42px!important;
    border-radius:13px!important;
    font-size:12px!important;
    font-weight:800!important;
  }
  body.games-dashboard #games .catalog-tile .bonus-unlocks,
  body.games-dashboard #games .catalog-tile .ad-unlocks-note{
    margin:7px 0 0!important;
    padding:7px!important;
    font-size:8px!important;
    line-height:1.25!important;
  }
  body.games-dashboard .back-home-button,
  body.games-dashboard .games-back-home,
  body.games-dashboard #games + .back-button{
    display:none!important;
  }
}


/* 0.15.33 slimmer mobile game catalog */
@media (max-width:699px){
  body.games-dashboard #games.compact-catalog-grid{gap:8px!important}
  body.games-dashboard #games.compact-catalog-grid > .catalog-tile{
    min-height:168px!important;
    padding:10px!important;
    border-radius:17px!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-row{
    min-height:0!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-row h2{
    font-size:15px!important;
    line-height:1.15!important;
    padding-bottom:2px!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-row > div,
  body.games-dashboard #games .catalog-tile .game-title-row .game-card-actions{
    margin-top:3px!important;
    gap:5px!important;
  }
  body.games-dashboard #games .catalog-tile .favorite-button,
  body.games-dashboard #games .catalog-tile .favorite-btn{
    width:28px!important;height:28px!important;min-width:28px!important;
  }
  body.games-dashboard #games .catalog-tile .plays-badge,
  body.games-dashboard #games .catalog-tile .plays-left{
    min-height:27px!important;padding:3px 7px!important;font-size:9px!important;
  }
  body.games-dashboard #games .catalog-tile .reward-rule{
    margin:5px 0 2px!important;
    min-height:26px!important;
    max-height:30px!important;
    font-size:9px!important;
    line-height:1.25!important;
  }
  body.games-dashboard #games .catalog-tile .game-best{
    margin:2px 0 5px!important;
    min-height:14px!important;
    font-size:8px!important;
    line-height:1.2!important;
  }
  body.games-dashboard #games .catalog-tile .game-play-button{
    min-height:36px!important;
    height:36px!important;
    border-radius:11px!important;
    font-size:11px!important;
    padding:5px 6px!important;
  }
  body.games-dashboard #games .catalog-tile .bonus-unlocks,
  body.games-dashboard #games .catalog-tile .ad-unlocks-note{
    margin:5px 0 0!important;padding:5px 6px!important;font-size:7px!important;
  }
}

/* Games onboarding */
.games-start-here{margin:10px 0 14px;padding:12px 14px;border:1px solid rgba(59,130,246,.28);border-radius:14px;background:rgba(30,64,175,.10);display:grid;gap:4px}
.games-start-here strong{font-size:14px;color:#dbeafe}
.games-start-here span{font-size:12px;line-height:1.45;color:#94a3b8}
.game-recommended-badge{display:inline-flex;align-items:center;width:max-content;margin:0 0 8px;padding:4px 8px;border-radius:999px;background:rgba(34,197,94,.12);border:1px solid rgba(34,197,94,.24);color:#bbf7d0;font-size:10px;font-weight:800;letter-spacing:.02em}
.recommended-game{border-color:rgba(34,197,94,.28)}

/* Primary home play action */
.home-primary-play{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;margin:10px 0 14px;padding:14px 16px;border-radius:16px;text-decoration:none;background:linear-gradient(135deg,#16a34a,#15803d);border:1px solid rgba(134,239,172,.45);box-shadow:0 10px 28px rgba(22,163,74,.18);color:#fff}
.home-primary-play-icon{font-size:28px;line-height:1}
.home-primary-play-copy{display:grid;gap:2px;min-width:0}
.home-primary-play-copy strong{font-size:17px;line-height:1.15}
.home-primary-play-copy small{font-size:11px;color:#dcfce7;line-height:1.35}
.home-primary-play b{font-size:13px;white-space:nowrap}
.home-primary-play:active{transform:scale(.99)}

/* Home hierarchy: keep play and active tasks visually dominant on phones */
.home-dashboard .continue-card{margin-top:2px}
.home-dashboard .home-overview{margin-top:8px}
.home-dashboard .home-account-shortcut{margin-top:18px;opacity:.92}
@media(max-width:520px){
  .home-dashboard .home-primary-play{margin-top:6px;margin-bottom:10px}
  .home-dashboard .home-section{margin-top:12px}
  .home-dashboard .home-overview{gap:8px}
  .home-dashboard .home-account-shortcut{padding:11px 13px}
}

/* Result popup clarity */
.game-result-dialog::backdrop{background:rgba(2,6,23,.78);backdrop-filter:blur(3px)}
.game-result-dialog .result-stat:first-child{border-color:rgba(250,204,21,.30);background:rgba(113,63,18,.18)}
.game-result-dialog .result-stat:nth-child(2){border-color:rgba(96,165,250,.28);background:rgba(30,64,175,.16)}
.game-result-dialog .result-stat:nth-child(3){border-color:rgba(34,197,94,.24);background:rgba(20,83,45,.16)}
.game-result-dialog .result-actions .green{font-weight:900;min-height:48px}
.game-result-dialog .result-actions .secondary{min-height:44px}
@media(max-width:430px){
  .game-result-dialog{width:min(430px,calc(100% - 20px));padding:15px;border-radius:20px}
  .result-hero{margin-bottom:10px}
  .result-icon{width:50px;height:50px;font-size:26px;border-radius:15px}
  .result-heading h2{font-size:19px}
  .result-main{padding:13px}
  .result-main>strong{font-size:38px}
  .result-notes{max-height:132px;overflow:auto;-webkit-overflow-scrolling:touch}
}

/* Shared in-game pause control */
.earnly-pause-button{margin-left:8px;min-height:36px;padding:7px 12px;font-size:12px;font-weight:800;vertical-align:middle}
.earnly-game-paused .touch-surface{filter:brightness(.72)}
@media(max-width:520px){.earnly-pause-button{min-height:34px;padding:6px 10px}.game-status+.earnly-pause-button{margin-left:6px}}

/* Pause control visibility fix: keep it obvious and tappable on real phones */
.earnly-pause-button{
  display:block;
  width:max-content;
  min-width:92px;
  margin:7px auto 8px;
  border:1px solid #64748b;
  background:#253247;
  color:#f8fafc;
  position:relative;
  z-index:55;
}
.earnly-pause-button[hidden]{display:none!important}
.earnly-game-paused .earnly-pause-button{
  border-color:#22c55e;
  background:#14532d;
}

/* Block Grid progression */
.block-grid-progress{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:7px 0 9px}
.block-grid-progress>span{display:grid;gap:2px;padding:7px 9px;border:1px solid #334155;border-radius:10px;background:#111c2d;text-align:center}
.block-grid-progress strong{font-size:11px;color:#f8fafc}
.block-grid-progress small{font-size:8px;color:#94a3b8}
.block-grid-progress .block-grid-clear{grid-column:1/-1;border-color:#22c55e66;background:#123323}
.block-grid-progress .block-grid-clear strong{color:#86efac}

/* Merge Rush progression and feedback */
.merge-progress{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;margin:7px 0 9px}
.merge-progress>span{display:grid;gap:2px;padding:6px 4px;border:1px solid #334155;border-radius:9px;background:#111c2d;text-align:center}
.merge-progress strong{font-size:10px;color:#f8fafc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.merge-progress small{font-size:7px;color:#94a3b8}
.merge-goal.merge-pop{border-color:#22c55e;background:#123323;transform:scale(1.02)}
.merge-goal.merge-pop span{color:#86efac;font-weight:800}
.merge-goal.merge-shake{animation:mergeShake .24s ease}
@keyframes mergeShake{0%,100%{transform:translateX(0)}25%{transform:translateX(-5px)}75%{transform:translateX(5px)}}
@media(max-width:380px){.merge-progress{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* Fast game finder */
.game-search-wrap{display:flex;align-items:center;gap:8px;width:100%;margin:0 0 10px;padding:9px 12px;border:1px solid #334155;border-radius:14px;background:#111c2d}
.game-search-wrap input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:#f8fafc;font:inherit;font-size:16px;font-weight:700}
.game-search-wrap input::placeholder{color:#94a3b8}
.games-empty-state{display:flex;flex-direction:column;gap:5px;align-items:center;text-align:center;padding:24px 16px;color:#cbd5e1}
.games-empty-state strong{color:#f8fafc;font-size:16px}


/* Compact pre-game summary: make plays, reward, and controls obvious before a run starts. */
.game-start-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:8px 0 9px}
.game-start-summary-item{display:flex;align-items:center;justify-content:center;min-height:38px;padding:7px 8px;border:1px solid #334155;border-radius:12px;background:#111c2d;color:#dbeafe;font-size:11px;font-weight:750;line-height:1.25;text-align:center}
.game-start-summary.out-of-plays .game-start-plays{border-color:#92400e;background:#422006;color:#fde68a}
/* The summary is useful before a run, but during gameplay it steals valuable
   board space and repeats information the HUD already shows. */
body.game-active .game-start-summary{display:none!important}
@media(max-width:600px){.game-start-summary{gap:5px;margin:6px 0 7px}.game-start-summary-item{min-height:34px;padding:6px 5px;font-size:10px}}


/* Clear account sync state */
.cloud-live-status{display:inline-flex;align-items:center;width:max-content;max-width:100%;margin-top:5px;padding:4px 8px;border:1px solid #334155;border-radius:999px;background:#111c2d;color:#cbd5e1;font-size:11px;font-weight:800;line-height:1.2}
.cloud-live-status.ready{border-color:#166534;background:#052e16;color:#bbf7d0}
.cloud-live-status.working{border-color:#1d4ed8;background:#172554;color:#bfdbfe}
.cloud-live-status.warning{border-color:#92400e;background:#422006;color:#fde68a}
.cloud-live-status:empty{display:none}


/* 0.15.34 iPhone Games page hierarchy pass */
@media (max-width:699px){
  body.games-dashboard .games-hero{margin:4px 0 6px!important}
  body.games-dashboard .games-hero h1{margin:2px 0 3px!important;font-size:30px!important}
  body.games-dashboard .games-hero p{margin:0 auto!important;max-width:330px!important;font-size:11px!important;line-height:1.35!important}
  body.games-dashboard .games-simple-note{margin:5px 0 7px!important;gap:8px!important}
  body.games-dashboard .games-start-here{margin:6px 0 8px!important;padding:8px 10px!important;gap:2px!important}
  body.games-dashboard .games-start-here strong{font-size:12px!important}
  body.games-dashboard .games-start-here span{font-size:10px!important;line-height:1.3!important}
  body.games-dashboard .games-mission-strip{
    display:flex!important;align-items:center!important;gap:7px!important;
    min-height:42px!important;padding:8px 10px!important;text-decoration:none!important
  }
  body.games-dashboard .games-mission-strip strong{font-size:12px!important;white-space:nowrap!important}
  body.games-dashboard .games-mission-strip #gamesMissionSummary{
    flex:1!important;min-width:0!important;text-align:left!important;white-space:nowrap!important;
    overflow:hidden!important;text-overflow:ellipsis!important
  }
  body.games-dashboard .games-mission-strip #gamesMissionCount{margin:0!important;white-space:nowrap!important}
  body.games-dashboard .games-mission-strip .mission-arrow{font-size:15px!important;color:#93c5fd!important}
  body.games-dashboard .game-browser-tools{margin:7px 0 8px!important;padding:7px!important}
  body.games-dashboard .game-search-wrap{margin-bottom:7px!important;min-height:38px!important;padding:6px 10px!important}
  body.games-dashboard .game-filter-row{margin-top:4px!important}
}


/* 0.15.35 Mobile game-card density pass */
@media (max-width:699px){
  body.games-dashboard #games.compact-catalog-grid{gap:8px!important}
  body.games-dashboard #games .catalog-tile{
    min-height:0!important;
    padding:10px!important;
    border-radius:15px!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-row{gap:5px!important;margin:0!important}
  body.games-dashboard #games .catalog-tile h2{font-size:15px!important;line-height:1.15!important}
  body.games-dashboard #games .catalog-tile .game-title-actions{gap:5px!important}
  body.games-dashboard #games .catalog-tile .favorite-button{
    width:31px!important;height:31px!important;min-width:31px!important;padding:0!important;
  }
  body.games-dashboard #games .catalog-tile .play-pill{
    min-height:31px!important;padding:5px 8px!important;font-size:10px!important;white-space:nowrap!important;
  }
  body.games-dashboard #games .catalog-tile .reward-rule{
    margin:7px 0 4px!important;min-height:28px!important;max-height:32px!important;
    font-size:10px!important;line-height:1.3!important;
  }
  body.games-dashboard #games .catalog-tile .game-best{
    margin:2px 0 7px!important;min-height:14px!important;font-size:9px!important;
  }
  body.games-dashboard #games .catalog-tile .game-play-button{
    min-height:40px!important;height:40px!important;margin-top:auto!important;
    padding:6px 7px!important;border-radius:11px!important;font-size:12px!important;
  }
  body.games-dashboard #games .catalog-tile .status-line{
    margin:6px 0 0!important;padding:6px 7px!important;min-height:0!important;
    font-size:9px!important;line-height:1.25!important;
  }
  body.games-dashboard #games .catalog-tile .game-recommended-badge{
    margin:0 0 6px!important;padding:3px 7px!important;font-size:9px!important;
  }
}


/* 0.15.36 Fix uneven mobile catalog rows.
   CSS grid was stretching both cards in a row to the height of the taller card,
   which created large blank areas on shorter cards. */
@media (max-width:699px){
  body.games-dashboard #games.compact-catalog-grid{
    align-items:start!important;
  }
  body.games-dashboard #games .catalog-tile{
    align-self:start!important;
    height:auto!important;
  }
}


/* 0.15.37 Games catalog redesign: compact browse rows on phones.
   One game per row removes the uneven masonry look and makes scanning easier. */
@media (max-width:699px){
  body.games-dashboard #games.compact-catalog-grid{
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:8px!important;
  }
  body.games-dashboard #games .catalog-tile{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "badge badge"
      "title action"
      "rule action"
      "best action"
      "status status"!important;
    column-gap:10px!important;
    row-gap:4px!important;
    width:100%!important;
    min-height:0!important;
    padding:11px 12px!important;
    border-radius:16px!important;
  }
  body.games-dashboard #games .catalog-tile .game-recommended-badge{
    grid-area:badge!important;margin:0 0 2px!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-row{
    grid-area:title!important;display:flex!important;align-items:center!important;
    gap:7px!important;min-width:0!important;
  }
  body.games-dashboard #games .catalog-tile h2{
    font-size:16px!important;line-height:1.15!important;margin:0!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-actions{
    margin:0!important;display:flex!important;align-items:center!important;gap:5px!important;
  }
  body.games-dashboard #games .catalog-tile .favorite-button{
    width:30px!important;height:30px!important;min-width:30px!important;
  }
  body.games-dashboard #games .catalog-tile .play-pill{
    min-height:30px!important;padding:4px 8px!important;font-size:10px!important;
  }
  body.games-dashboard #games .catalog-tile .reward-rule{
    grid-area:rule!important;margin:1px 0!important;min-height:0!important;max-height:none!important;
    font-size:10px!important;line-height:1.25!important;
  }
  body.games-dashboard #games .catalog-tile .game-best{
    grid-area:best!important;margin:1px 0!important;min-height:0!important;
    font-size:9px!important;line-height:1.2!important;
  }
  body.games-dashboard #games .catalog-tile .game-best[hidden]{display:none!important}
  body.games-dashboard #games .catalog-tile .game-play-button{
    grid-area:action!important;align-self:center!important;
    width:108px!important;min-width:108px!important;height:44px!important;min-height:44px!important;
    margin:0!important;padding:6px 8px!important;font-size:12px!important;border-radius:12px!important;
  }
  body.games-dashboard #games .catalog-tile .status-line{
    grid-area:status!important;margin:3px 0 0!important;padding:6px 8px!important;
    font-size:9px!important;line-height:1.25!important;
  }
  body.games-dashboard #games .catalog-tile:has(.status-line) .game-play-button{
    width:132px!important;min-width:132px!important;font-size:10px!important;
  }
}


/* 0.15.38 Polish compact mobile game browser */
@media (max-width:699px){
  body.games-dashboard #games.compact-catalog-grid{gap:10px!important}
  body.games-dashboard #games .catalog-tile{
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "badge badge"
      "title meta"
      "rule action"
      "best action"
      "status status"!important;
    padding:12px 13px!important;
    row-gap:5px!important;
    column-gap:12px!important;
    border-radius:17px!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-row{
    grid-area:title!important;
    min-width:0!important;
  }
  body.games-dashboard #games .catalog-tile .game-title-actions{
    grid-area:meta!important;
    justify-self:end!important;
    align-self:start!important;
    display:flex!important;
    gap:5px!important;
  }
  body.games-dashboard #games .catalog-tile h2{
    font-size:17px!important;
    line-height:1.15!important;
    white-space:normal!important;
  }
  body.games-dashboard #games .catalog-tile .reward-rule{
    grid-area:rule!important;
    align-self:start!important;
    color:var(--muted)!important;
    font-size:11px!important;
    line-height:1.3!important;
    margin:2px 0 0!important;
  }
  body.games-dashboard #games .catalog-tile .game-best{
    grid-area:best!important;
    align-self:end!important;
    font-size:10px!important;
    margin:0!important;
  }
  body.games-dashboard #games .catalog-tile .game-play-button{
    grid-area:action!important;
    align-self:center!important;
    justify-self:end!important;
    width:112px!important;
    min-width:112px!important;
    height:46px!important;
    min-height:46px!important;
    margin:0!important;
    border-radius:13px!important;
    font-size:13px!important;
  }
  body.games-dashboard #games .catalog-tile:has(.status-line) .game-play-button{
    width:142px!important;
    min-width:142px!important;
    font-size:11px!important;
  }
  body.games-dashboard #games .catalog-tile .status-line{
    grid-area:status!important;
    border-radius:10px!important;
    margin-top:3px!important;
  }
  body.games-dashboard #games .catalog-tile .favorite-button{
    width:32px!important;height:32px!important;min-width:32px!important;
    border-radius:10px!important;
  }
  body.games-dashboard #games .catalog-tile .play-pill{
    min-height:32px!important;
    border-radius:999px!important;
    font-size:10px!important;
    padding:5px 9px!important;
  }
  body.games-dashboard #games .catalog-tile .game-recommended-badge{
    justify-self:start!important;
    border-radius:999px!important;
  }
}


/* Compact Games catalog — mobile browsing pass */
@media (max-width: 700px) {
  .games-dashboard #games {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  .games-dashboard #games .catalog-tile {
    min-height: 0 !important;
    padding: 14px 15px !important;
    border-radius: 20px !important;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) auto !important;
    grid-template-areas:
      "badge badge"
      "title actions"
      "rule actions"
      "best play"
      "status status" !important;
    column-gap: 10px !important;
    row-gap: 7px !important;
    align-items: center !important;
  }
  .games-dashboard #games .game-recommended-badge { grid-area: badge; justify-self:start; margin:0 0 2px !important; }
  .games-dashboard #games .game-title-row { grid-area:title; display:block !important; min-width:0; margin:0 !important; }
  .games-dashboard #games .game-title-row h2 { margin:0 !important; font-size:19px !important; line-height:1.15 !important; }
  .games-dashboard #games .game-title-actions { grid-area:actions; display:flex !important; gap:6px !important; align-self:start; margin:0 !important; }
  .games-dashboard #games .favorite-button { width:42px !important; height:42px !important; min-width:42px !important; padding:0 !important; font-size:24px !important; }
  .games-dashboard #games .play-pill { min-height:42px !important; padding:0 10px !important; display:flex !important; align-items:center; white-space:nowrap; font-size:12px !important; }
  .games-dashboard #games .reward-rule { grid-area:rule; margin:0 !important; font-size:13px !important; line-height:1.25 !important; }
  .games-dashboard #games .game-best { grid-area:best; margin:0 !important; font-size:12px !important; align-self:center; }
  .games-dashboard #games .game-play-button {
    grid-area:play;
    width:auto !important;
    min-width:112px !important;
    min-height:46px !important;
    margin:0 !important;
    padding:10px 14px !important;
    border-radius:15px !important;
    font-size:16px !important;
    justify-self:end;
  }
  .games-dashboard #games .status-line { grid-area:status; margin:2px 0 0 !important; padding:7px 9px !important; font-size:11px !important; line-height:1.25 !important; border-radius:10px !important; }
  .games-dashboard .container > a.button.wide.secondary { margin-top:12px !important; }
}


/* Fun arcade visual refresh */
.games-dashboard {
  background:
    radial-gradient(circle at 15% 10%, rgba(0,229,255,.10), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(168,85,247,.12), transparent 30%),
    #07111f;
}
.games-dashboard .games-hero h1 {
  text-shadow: 0 0 22px rgba(56,189,248,.22);
}
.games-dashboard #games .catalog-tile {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(25,39,63,.98), rgba(15,27,47,.98)) !important;
  border: 1px solid rgba(96,165,250,.30) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.035);
}
.games-dashboard #games .catalog-tile::before {
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:4px;
  background:linear-gradient(#38bdf8,#8b5cf6);
  opacity:.9;
}
.games-dashboard #games .catalog-tile:nth-child(4n+2)::before { background:linear-gradient(#a855f7,#ec4899); }
.games-dashboard #games .catalog-tile:nth-child(4n+3)::before { background:linear-gradient(#22c55e,#06b6d4); }
.games-dashboard #games .catalog-tile:nth-child(4n+4)::before { background:linear-gradient(#f59e0b,#ef4444); }
.games-dashboard #games .game-title-row h2 {
  letter-spacing:-.02em;
}
.games-dashboard #games .game-play-button {
  background: linear-gradient(135deg,#2563eb,#3b82f6) !important;
  box-shadow:0 5px 14px rgba(37,99,235,.25);
}
.games-dashboard #games .game-play-button:active { transform:scale(.97); }
.games-dashboard #games .favorite-button {
  background:rgba(7,17,31,.55) !important;
  border-color:rgba(148,163,184,.38) !important;
}
.games-dashboard #games .play-pill {
  background:rgba(7,17,31,.48);
}
.games-dashboard #games .game-best {
  color:#fcd34d !important;
}
@media (max-width:700px) {
  .games-dashboard #games { gap:9px !important; }
  .games-dashboard #games .catalog-tile {
    min-height:142px !important;
    padding:13px 14px 12px 18px !important;
    grid-template-columns:minmax(0,1fr) auto !important;
    grid-template-areas:
      "badge badge"
      "title actions"
      "rule actions"
      "best play"
      "status status" !important;
  }
  .games-dashboard #games .game-title-row h2 { font-size:20px !important; }
  .games-dashboard #games .reward-rule { color:#a9b8ce !important; }
  .games-dashboard #games .game-play-button {
    min-width:104px !important;
    min-height:44px !important;
    padding:9px 13px !important;
  }
  .games-dashboard #games .game-best { font-size:11.5px !important; }
  .games-dashboard #games .status-line { background:rgba(7,17,31,.7) !important; }
}


/* 0.15.39 Arcade storefront polish */
.games-dashboard #games .catalog-tile{
  isolation:isolate;
  transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease;
}
.games-dashboard #games .catalog-tile::after{
  content:"";
  position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:radial-gradient(circle at 82% 12%,rgba(59,130,246,.13),transparent 34%);
}
.games-dashboard #games .catalog-tile:nth-child(4n+2)::after{background:radial-gradient(circle at 82% 12%,rgba(236,72,153,.12),transparent 34%)}
.games-dashboard #games .catalog-tile:nth-child(4n+3)::after{background:radial-gradient(circle at 82% 12%,rgba(34,197,94,.11),transparent 34%)}
.games-dashboard #games .catalog-tile:nth-child(4n+4)::after{background:radial-gradient(circle at 82% 12%,rgba(245,158,11,.11),transparent 34%)}
.games-dashboard #games .catalog-tile:active{transform:scale(.992)}
.games-dashboard #games .game-title-row h2{font-weight:900!important;color:#f8fbff}
.games-dashboard #games .game-play-button{
  position:relative;
  border:1px solid rgba(147,197,253,.45)!important;
  box-shadow:0 8px 22px rgba(37,99,235,.32),inset 0 1px 0 rgba(255,255,255,.18)!important;
}
.games-dashboard #games .game-play-button:not(:disabled)::after{content:" ›";font-size:1.15em;line-height:1}
.games-dashboard #games .game-play-button:disabled::after{content:""}
.games-dashboard #games .game-recommended-badge{
  background:linear-gradient(135deg,rgba(5,150,105,.24),rgba(16,185,129,.12))!important;
  border:1px solid rgba(52,211,153,.35)!important;
  color:#b7f7d5!important;
  box-shadow:0 0 18px rgba(16,185,129,.08);
}
.games-dashboard #games .game-best{
  display:inline-flex;align-items:center;width:max-content;max-width:100%;
  padding:4px 8px;border-radius:999px;background:rgba(245,158,11,.08);
}
.games-dashboard #games .play-pill{box-shadow:inset 0 1px 0 rgba(255,255,255,.035)}
@media (max-width:700px){
  .games-dashboard #games{gap:12px!important}
  .games-dashboard #games .catalog-tile{
    min-height:154px!important;
    padding:15px 14px 14px 19px!important;
    border-radius:21px!important;
    box-shadow:0 10px 28px rgba(0,0,0,.22),inset 0 1px 0 rgba(255,255,255,.045)!important;
  }
  .games-dashboard #games .game-title-row h2{font-size:21px!important}
  .games-dashboard #games .reward-rule{font-size:13px!important;line-height:1.35!important;color:#b6c3d6!important}
  .games-dashboard #games .favorite-button{
    width:40px!important;height:40px!important;min-width:40px!important;
    border-radius:13px!important;font-size:22px!important
  }
  .games-dashboard #games .play-pill{
    min-height:40px!important;padding:0 11px!important;font-size:11px!important;
    border-color:rgba(148,163,184,.42)!important
  }
  .games-dashboard #games .game-play-button{
    min-width:118px!important;min-height:50px!important;border-radius:16px!important;
    font-size:16px!important;font-weight:900!important
  }
  .games-dashboard #games .game-best{font-size:11px!important;padding:4px 7px!important}
  .games-dashboard #games .status-line{margin-top:5px!important}
}


/* 0.15.40 iPhone catalog tightening — clearer hierarchy, less dead space */
@media (max-width:700px){
  body.games-dashboard .container{
    padding-left:13px!important;
    padding-right:13px!important;
  }
  body.games-dashboard #games{gap:10px!important}
  body.games-dashboard #games .catalog-tile{
    min-height:132px!important;
    padding:12px 12px 11px 17px!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-areas:
      "badge badge"
      "title actions"
      "rule play"
      "best play"
      "status status"!important;
    row-gap:4px!important;
    column-gap:9px!important;
    border-radius:18px!important;
  }
  body.games-dashboard #games .game-recommended-badge{
    margin:0 0 1px!important;
    padding:4px 9px!important;
    font-size:10px!important;
  }
  body.games-dashboard #games .game-title-row h2{
    font-size:19px!important;
    line-height:1.1!important;
  }
  body.games-dashboard #games .game-title-actions{
    gap:5px!important;
  }
  body.games-dashboard #games .favorite-button{
    width:36px!important;height:36px!important;min-width:36px!important;
    border-radius:12px!important;font-size:21px!important;
  }
  body.games-dashboard #games .play-pill{
    min-height:36px!important;padding:0 9px!important;font-size:10.5px!important;
  }
  body.games-dashboard #games .reward-rule{
    margin:1px 0!important;
    font-size:11.5px!important;
    line-height:1.25!important;
    max-width:235px!important;
  }
  body.games-dashboard #games .game-best{
    margin:1px 0 0!important;
    padding:3px 7px!important;
    font-size:10px!important;
    justify-self:start!important;
  }
  body.games-dashboard #games .game-play-button{
    width:108px!important;min-width:108px!important;
    min-height:44px!important;height:44px!important;
    padding:7px 10px!important;
    border-radius:14px!important;
    font-size:14px!important;
    align-self:end!important;
  }
  body.games-dashboard #games .catalog-tile:has(.status-line) .game-play-button{
    width:132px!important;min-width:132px!important;
    min-height:48px!important;height:auto!important;
    font-size:11px!important;line-height:1.08!important;
  }
  body.games-dashboard #games .status-line{
    margin:4px 0 0!important;
    padding:5px 8px!important;
    font-size:9.5px!important;
    text-align:center!important;
  }
  body.games-dashboard .game-browser-tools{
    border-radius:18px!important;
  }
}


/* 0.15.41 arcade catalog refinement — stronger tap targets + compact premium cards */
@media (max-width:700px){
  body.games-dashboard #games .catalog-tile{
    min-height:122px!important;
    padding:11px 12px 10px 17px!important;
    row-gap:3px!important;
    overflow:hidden!important;
    background:linear-gradient(145deg,rgba(23,42,69,.98),rgba(12,27,49,.98))!important;
  }
  body.games-dashboard #games .catalog-tile::before{
    width:5px!important;
    box-shadow:0 0 16px currentColor;
  }
  body.games-dashboard #games .catalog-tile::after{
    background:
      radial-gradient(circle at 92% 18%,rgba(96,165,250,.16),transparent 30%),
      linear-gradient(110deg,rgba(255,255,255,.025),transparent 38%)!important;
  }
  body.games-dashboard #games .game-title-row{
    align-self:center!important;
  }
  body.games-dashboard #games .game-title-row h2{
    letter-spacing:-.3px!important;
    text-shadow:0 1px 8px rgba(0,0,0,.3);
  }
  body.games-dashboard #games .game-title-actions{
    align-self:center!important;
  }
  body.games-dashboard #games .reward-rule{
    color:#c2ccda!important;
    opacity:.9;
  }
  body.games-dashboard #games .game-play-button{
    background:linear-gradient(135deg,#2563eb,#3b82f6 62%,#60a5fa)!important;
    box-shadow:0 7px 18px rgba(37,99,235,.30),inset 0 1px 0 rgba(255,255,255,.28)!important;
    letter-spacing:.1px;
  }
  body.games-dashboard #games .game-play-button:active{
    transform:scale(.96)!important;
    box-shadow:0 3px 10px rgba(37,99,235,.25)!important;
  }
  body.games-dashboard #games .game-best{
    background:linear-gradient(90deg,rgba(245,158,11,.12),rgba(245,158,11,.055))!important;
    border:1px solid rgba(245,158,11,.08);
    color:#ffd96a!important;
  }
  body.games-dashboard #games .favorite-button{
    background:rgba(7,18,34,.42)!important;
    border-color:rgba(148,163,184,.38)!important;
  }
  body.games-dashboard #games .play-pill{
    background:rgba(7,18,34,.38)!important;
  }
  body.games-dashboard #games .status-line{
    background:rgba(4,14,29,.72)!important;
    border:1px solid rgba(245,158,11,.05);
  }
  body.games-dashboard .game-browser-tools{
    padding:10px!important;
    margin-bottom:11px!important;
    background:linear-gradient(180deg,rgba(15,29,49,.97),rgba(10,22,40,.97))!important;
  }
  body.games-dashboard .game-browser-tools input{
    min-height:48px!important;
    border-radius:15px!important;
  }
}


/* 0.15.42 game-card identity pass */
.games-dashboard #games .catalog-tile{--game-accent:#38bdf8;--game-accent2:#8b5cf6}
.games-dashboard #games .catalog-tile[data-game="blockDrop"],
.games-dashboard #games .catalog-tile[data-game="colorMatch"]{--game-accent:#d946ef;--game-accent2:#f43f5e}
.games-dashboard #games .catalog-tile[data-game="tapRush"],
.games-dashboard #games .catalog-tile[data-game="jungleHopper"],
.games-dashboard #games .catalog-tile[data-game="paddleRally"]{--game-accent:#22c55e;--game-accent2:#06b6d4}
.games-dashboard #games .catalog-tile[data-game="memory"],
.games-dashboard #games .catalog-tile[data-game="towerStack"],
.games-dashboard #games .catalog-tile[data-game="laneRunner"]{--game-accent:#f59e0b;--game-accent2:#ef4444}
.games-dashboard #games .catalog-tile[data-game="brickBreaker"],
.games-dashboard #games .catalog-tile[data-game="shapeFit"]{--game-accent:#a855f7;--game-accent2:#ec4899}
.games-dashboard #games .catalog-tile::before{background:linear-gradient(var(--game-accent),var(--game-accent2))!important}
.games-dashboard #games .catalog-tile::after{
  background:
    radial-gradient(circle at 88% 16%,color-mix(in srgb,var(--game-accent) 18%,transparent),transparent 34%),
    linear-gradient(110deg,rgba(255,255,255,.035),transparent 42%)!important
}
.games-dashboard #games .game-icon-bubble{
  width:44px;height:44px;min-width:44px;border-radius:14px;
  display:grid;place-items:center;font-size:25px;
  background:linear-gradient(145deg,color-mix(in srgb,var(--game-accent) 22%,#0b1729),rgba(8,18,34,.78));
  border:1px solid color-mix(in srgb,var(--game-accent) 42%,transparent);
  box-shadow:0 6px 18px color-mix(in srgb,var(--game-accent) 13%,transparent),inset 0 1px 0 rgba(255,255,255,.12)
}
.games-dashboard #games .game-name-wrap{display:flex;align-items:center;gap:10px;min-width:0}
.games-dashboard #games .game-name-wrap h2{margin:0!important}
.games-dashboard #games .game-play-button:not(:disabled){
  background:linear-gradient(135deg,color-mix(in srgb,var(--game-accent) 76%,#2563eb),color-mix(in srgb,var(--game-accent2) 55%,#3b82f6))!important;
  border-color:color-mix(in srgb,var(--game-accent) 52%,#93c5fd)!important;
  box-shadow:0 8px 22px color-mix(in srgb,var(--game-accent) 22%,transparent),inset 0 1px 0 rgba(255,255,255,.3)!important
}
@media(max-width:700px){
 body.games-dashboard #games .catalog-tile{
   min-height:128px!important;padding:12px 12px 11px 17px!important;
   grid-template-areas:"badge badge" "title actions" "rule play" "best play" "status status"!important
 }
 body.games-dashboard #games .game-title-row{overflow:visible!important}
 body.games-dashboard #games .game-icon-bubble{width:40px;height:40px;min-width:40px;border-radius:13px;font-size:23px}
 body.games-dashboard #games .game-name-wrap{gap:8px}
 body.games-dashboard #games .game-title-row h2{font-size:18px!important}
 body.games-dashboard #games .reward-rule{padding-left:48px!important;max-width:280px!important}
 body.games-dashboard #games .game-recommended-badge{margin-left:48px!important}
 body.games-dashboard #games .game-play-button{font-size:15px!important;font-weight:900!important}
}


/* 0.15.43 iPhone card alignment pass — tighter rhythm, consistent controls */
@media(max-width:700px){
  body.games-dashboard #games .catalog-tile{
    min-height:118px!important;
    padding:11px 11px 10px 17px!important;
    grid-template-columns:minmax(0,1fr) 138px!important;
    grid-template-areas:
      "badge badge"
      "title title"
      "rule best"
      "play play"
      "status status"!important;
    row-gap:6px!important;
    column-gap:8px!important;
  }
  body.games-dashboard #games .game-recommended-badge{
    margin:0 auto 0 48px!important;
    justify-self:start!important;
  }
  body.games-dashboard #games .game-title-row{
    grid-area:title!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:8px!important;
    width:100%!important;
  }
  body.games-dashboard #games .game-name-wrap{
    min-width:0!important;
    flex:1 1 auto!important;
  }
  body.games-dashboard #games .game-name-wrap h2{
    font-size:18px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.games-dashboard #games .game-title-actions{
    flex:0 0 auto!important;
    align-items:center!important;
  }
  body.games-dashboard #games .favorite-button{
    width:34px!important;height:34px!important;min-width:34px!important;
    border-radius:11px!important;font-size:20px!important;
  }
  body.games-dashboard #games .play-pill{
    min-height:34px!important;
    height:34px!important;
    padding:0 10px!important;
    font-size:10.5px!important;
  }
  body.games-dashboard #games .reward-rule{
    grid-area:rule!important;
    padding-left:48px!important;
    margin:0!important;
    max-width:none!important;
    min-width:0!important;
    font-size:11.5px!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  body.games-dashboard #games .game-best{
    grid-area:best!important;
    justify-self:end!important;
    align-self:center!important;
    margin:0!important;
    white-space:nowrap!important;
  }
  body.games-dashboard #games .game-play-button{
    grid-area:play!important;
    justify-self:center!important;
    width:142px!important;
    min-width:142px!important;
    height:45px!important;
    min-height:45px!important;
    margin:1px 0 0!important;
    border-radius:15px!important;
    font-size:15px!important;
  }
  body.games-dashboard #games .catalog-tile:has(.status-line) .game-play-button{
    width:174px!important;
    min-width:174px!important;
    min-height:48px!important;
    font-size:12px!important;
  }
  body.games-dashboard #games .status-line{
    grid-area:status!important;
    justify-self:center!important;
    width:auto!important;
    max-width:100%!important;
    margin:0!important;
    padding:5px 10px!important;
  }
  body.games-dashboard #games .game-icon-bubble{
    width:40px!important;height:40px!important;min-width:40px!important;
  }
}


/* 0.15.44 compact mobile catalog — more games visible without crowding */
@media(max-width:700px){
 body.games-dashboard #games{gap:9px!important}
 body.games-dashboard #games .catalog-tile{
   min-height:0!important;
   padding:10px 11px 9px 17px!important;
   grid-template-columns:minmax(0,1fr) 136px!important;
   grid-template-areas:"badge badge" "title title" "rule best" "play play" "status status"!important;
   row-gap:5px!important;
   border-radius:18px!important
 }
 body.games-dashboard #games .catalog-tile:not(:has(.status-line)){padding-bottom:10px!important}
 body.games-dashboard #games .game-recommended-badge{
   padding:3px 8px!important;font-size:9.5px!important;line-height:1.2!important;margin-bottom:0!important
 }
 body.games-dashboard #games .game-icon-bubble{
   width:37px!important;height:37px!important;min-width:37px!important;border-radius:12px!important;font-size:21px!important
 }
 body.games-dashboard #games .game-name-wrap{gap:8px!important}
 body.games-dashboard #games .game-name-wrap h2{font-size:17px!important}
 body.games-dashboard #games .favorite-button{
   width:32px!important;height:32px!important;min-width:32px!important;font-size:19px!important
 }
 body.games-dashboard #games .play-pill{
   height:32px!important;min-height:32px!important;padding:0 9px!important;font-size:10px!important
 }
 body.games-dashboard #games .reward-rule{
   padding-left:45px!important;font-size:11px!important;line-height:1.2!important
 }
 body.games-dashboard #games .game-best{
   padding:3px 6px!important;font-size:9.5px!important
 }
 body.games-dashboard #games .game-play-button{
   width:134px!important;min-width:134px!important;height:42px!important;min-height:42px!important;
   margin:0!important;border-radius:14px!important;font-size:14px!important
 }
 body.games-dashboard #games .catalog-tile:has(.status-line) .game-play-button{
   width:170px!important;min-width:170px!important;min-height:44px!important;font-size:11.5px!important
 }
 body.games-dashboard #games .status-line{
   margin-top:0!important;padding:4px 9px!important;font-size:9px!important;line-height:1.15!important
 }
}


/* 0.15.45 iPhone density + alignment pass */
@media(max-width:700px){
 body.games-dashboard #games{gap:8px!important}
 body.games-dashboard #games .catalog-tile{
   min-height:0!important;
   height:auto!important;
   padding:9px 10px 9px 16px!important;
   grid-template-columns:minmax(0,1fr) auto!important;
   grid-template-rows:auto auto auto!important;
   grid-template-areas:"title title" "rule best" "play play"!important;
   row-gap:5px!important;
   column-gap:8px!important;
 }
 body.games-dashboard #games .game-recommended-badge{
   position:absolute!important;top:7px!important;left:50%!important;transform:translateX(-50%)!important;
   z-index:2!important
 }
 body.games-dashboard #games .catalog-tile:has(.game-recommended-badge){padding-top:31px!important}
 body.games-dashboard #games .game-name-wrap{
   grid-area:title!important;display:flex!important;align-items:center!important;
   padding:0!important;margin:0!important;min-width:0!important
 }
 body.games-dashboard #games .game-icon-bubble{
   width:35px!important;height:35px!important;min-width:35px!important;border-radius:11px!important;font-size:20px!important
 }
 body.games-dashboard #games .game-name-wrap h2{font-size:16px!important;line-height:1.1!important;margin:0!important}
 body.games-dashboard #games .favorite-button{margin-left:auto!important}
 body.games-dashboard #games .play-pill{margin-left:4px!important}
 body.games-dashboard #games .reward-rule{
   grid-area:rule!important;padding:0 0 0 43px!important;margin:0!important;
   align-self:center!important;font-size:10.5px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important
 }
 body.games-dashboard #games .game-best{
   grid-area:best!important;margin:0!important;align-self:center!important;justify-self:end!important;
   white-space:nowrap!important;font-size:9px!important
 }
 body.games-dashboard #games .game-play-button{
   grid-area:play!important;justify-self:center!important;width:128px!important;min-width:128px!important;
   height:38px!important;min-height:38px!important;margin:1px 0 0!important;font-size:13.5px!important;border-radius:13px!important
 }
 body.games-dashboard #games .catalog-tile:has(.status-line){
   grid-template-rows:auto auto auto auto!important;
   grid-template-areas:"title title" "rule best" "play play" "status status"!important
 }
 body.games-dashboard #games .catalog-tile:has(.status-line) .game-play-button{
   width:190px!important;min-width:190px!important;height:40px!important;min-height:40px!important
 }
 body.games-dashboard #games .status-line{
   grid-area:status!important;justify-self:center!important;margin:0!important;padding:3px 8px!important;font-size:8.5px!important
 }
}


/* 0.15.46 true compact card override */
@media(max-width:700px){
 body.games-dashboard #games{gap:10px!important}
 body.games-dashboard #games .catalog-tile{
   min-height:unset!important;
   height:154px!important;
   box-sizing:border-box!important;
   padding:12px 14px 10px 16px!important;
   display:grid!important;
   grid-template-columns:minmax(0,1fr) auto!important;
   grid-template-rows:42px 24px 48px!important;
   grid-template-areas:"title title" "rule best" "play play"!important;
   row-gap:3px!important
 }
 body.games-dashboard #games .catalog-tile:has(.game-recommended-badge){
   height:176px!important;padding-top:34px!important
 }
 body.games-dashboard #games .catalog-tile:has(.status-line){
   height:186px!important;
   grid-template-rows:42px 24px 48px 20px!important;
   grid-template-areas:"title title" "rule best" "play play" "status status"!important
 }
 body.games-dashboard #games .catalog-tile:has(.game-recommended-badge):has(.status-line){
   height:208px!important
 }
 body.games-dashboard #games .game-name-wrap{height:42px!important}
 body.games-dashboard #games .reward-rule{
   padding-left:43px!important;line-height:24px!important;font-size:11px!important
 }
 body.games-dashboard #games .game-best{line-height:22px!important}
 body.games-dashboard #games .game-play-button{
   align-self:center!important;width:128px!important;min-width:128px!important;
   height:40px!important;min-height:40px!important;padding:0 12px!important
 }
 body.games-dashboard #games .catalog-tile:has(.status-line) .game-play-button{
   width:190px!important;min-width:190px!important
 }
 body.games-dashboard #games .status-line{align-self:center!important}
}


/* 0.15.47 final mobile density/alignment pass */
@media(max-width:700px){
 body.games-dashboard #games{gap:8px!important}
 body.games-dashboard #games .catalog-tile{
   height:142px!important;
   padding:10px 14px 8px 16px!important;
   grid-template-rows:38px 22px 44px!important;
   row-gap:2px!important
 }
 body.games-dashboard #games .catalog-tile:has(.game-recommended-badge){
   height:162px!important;padding-top:30px!important
 }
 body.games-dashboard #games .catalog-tile:has(.status-line){
   height:174px!important;
   grid-template-rows:38px 22px 44px 18px!important
 }
 body.games-dashboard #games .catalog-tile:has(.game-recommended-badge):has(.status-line){
   height:194px!important
 }
 body.games-dashboard #games .game-name-wrap{height:38px!important}
 body.games-dashboard #games .reward-rule{
   line-height:22px!important;margin:0!important
 }
 body.games-dashboard #games .game-best{
   line-height:20px!important;margin:0!important
 }
 body.games-dashboard #games .game-play-button{
   height:38px!important;min-height:38px!important;
   align-self:center!important;margin:0 auto!important
 }
 body.games-dashboard #games .status-line{
   margin:0 auto!important;line-height:18px!important
 }
 body.games-dashboard .back-home,
 body.games-dashboard a.back-home,
 body.games-dashboard .back-home-button{
   min-height:48px!important;height:48px!important;
   padding:0 18px!important;margin:14px 22px 10px!important;
   border-radius:14px!important;font-size:18px!important
 }
}


/* 0.15.48 in-game mobile polish */
@media(max-width:700px){
 body:not(.games-dashboard) .container{padding:14px 14px 28px!important}
 body:not(.games-dashboard) .topbar{
   min-height:48px!important;margin-bottom:10px!important;
   position:sticky;top:0;z-index:20;
   background:rgba(8,18,35,.88);backdrop-filter:blur(14px);
   border-bottom:1px solid rgba(125,180,255,.12)
 }
 body:not(.games-dashboard) .topbar .brand,
 body:not(.games-dashboard) .topbar .balance-chip{
   min-height:38px!important;display:flex!important;align-items:center!important
 }
 .snake-header{margin-bottom:10px!important}
 .snake-header h1,.game-title-status-row h1{
   font-size:24px!important;line-height:1.1!important;margin:0!important
 }
 .snake-stats{
   gap:7px!important;margin-top:10px!important;
   display:grid!important;grid-template-columns:repeat(3,1fr)!important
 }
 .snake-stats>span{
   min-height:54px!important;padding:7px 6px!important;border-radius:14px!important
 }
 .snake-stats small{font-size:10px!important}
 .snake-stats strong{font-size:16px!important}
 body:not(.games-dashboard) canvas{
   border-radius:18px!important;
   box-shadow:0 12px 32px rgba(0,0,0,.28),0 0 0 1px rgba(92,176,255,.18)!important
 }
 body:not(.games-dashboard) .button.wide,
 body:not(.games-dashboard) button.wide{
   min-height:48px!important;border-radius:15px!important;font-weight:800!important
 }
 body:not(.games-dashboard) .secondary.wide{
   margin-top:12px!important;min-height:44px!important
 }
 .game-status{border-radius:999px!important;padding:6px 10px!important}
}


/* 0.15.49 Snake compact mobile HUD */
@media(max-width:700px){
 body.snake-page .container{padding-top:8px!important}
 body.snake-page .topbar{margin-bottom:6px!important}
 body.snake-page .snake-header{margin:2px 0 6px!important}
 body.snake-page .game-title-status-row{gap:8px!important;margin-bottom:5px!important}
 body.snake-page .game-title-status-row h1{font-size:22px!important}
 body.snake-page .snake-stats{
   margin-top:6px!important;gap:6px!important;
   grid-template-columns:repeat(3,minmax(0,1fr))!important
 }
 body.snake-page .snake-stats>span{
   min-height:44px!important;padding:5px 6px!important;border-radius:12px!important
 }
 body.snake-page .snake-stats small{font-size:9px!important;letter-spacing:.08em!important}
 body.snake-page .snake-stats strong{font-size:15px!important}
 body.snake-page #startButton{margin:6px 0!important;min-height:44px!important}
 body.snake-page .game-guide,
 body.snake-page .guide-summary,
 body.snake-page .quick-guide,
 body.snake-page .game-howto{margin:6px 0!important}
 body.snake-page .game-guide-grid,
 body.snake-page .guide-steps,
 body.snake-page .quick-guide-grid{
   gap:5px!important;margin:5px 0!important
 }
 body.snake-page .guide-step,
 body.snake-page .game-guide-step,
 body.snake-page .quick-guide-item{
   min-height:46px!important;padding:6px!important
 }
 body.snake-page .guide-step small,
 body.snake-page .game-guide-step small,
 body.snake-page .quick-guide-item small{font-size:10px!important;line-height:1.15!important}
 body.snake-page canvas#game{
   margin-top:6px!important;
   max-height:min(52vh,400px)!important
 }
 body.snake-page .desktop-controls{margin:6px 0!important}
 body.snake-page details{margin-top:7px!important}
 body.snake-page .secondary.wide{margin-top:8px!important}
}


/* Reward HUD visibility pass */
.game-meta .meta-pill:has(#rewardPreview){
  border-color:rgba(250,204,21,.42);
  background:rgba(120,84,8,.12);
  color:#fde68a;
  box-shadow:0 0 12px rgba(250,204,21,.06);
}
.game-meta #rewardPreview{
  color:#fff7b2;
  font-weight:900;
  text-shadow:0 0 10px rgba(250,204,21,.12);
}
body.game-active .game-meta .meta-pill:has(#rewardPreview){
  border-color:rgba(250,204,21,.56);
  background:rgba(120,84,8,.16);
  box-shadow:0 0 14px rgba(250,204,21,.10);
}


/* Shared reward-number pulse */
.game-meta .meta-pill.earnly-reward-bump:has(#rewardPreview){animation:earnlyRewardBump .34s ease}
@keyframes earnlyRewardBump{0%{transform:scale(1)}45%{transform:scale(1.06);box-shadow:0 0 20px rgba(250,204,21,.20)}100%{transform:scale(1)}}


/* Home iPhone viewport stability — keep dynamic content clear of system/nav chrome */
body.home-dashboard{
  overflow-anchor:none;
  overscroll-behavior-y:contain;
}
body.home-dashboard.has-app-nav .home-container{
  padding-top:max(30px,calc(env(safe-area-inset-top) + 10px))!important;
  padding-bottom:max(168px,calc(134px + env(safe-area-inset-bottom)))!important;
}
@supports selector(html:has(body)){
  html:has(body.home-dashboard){
    overflow-anchor:none;
    scroll-padding-top:max(18px,calc(env(safe-area-inset-top) + 8px));
    scroll-padding-bottom:max(120px,calc(92px + env(safe-area-inset-bottom)));
  }
}


/* Games catalog screenshot polish */
.games-dashboard #games .game-play-button:disabled{
  background:#162033!important;
  border-color:#42526a!important;
  color:#cbd5e1!important;
  box-shadow:none!important;
  text-shadow:none!important;
  opacity:1!important;
}
@media(max-width:699px){
  body.games-dashboard .games-back-home{display:none!important}
}


/* Result-screen disabled actions should read as status, not look broken */
.game-result-dialog .result-actions button:disabled{
  opacity:1!important;
  cursor:default!important;
  background:#1a2638!important;
  border:1px solid #475569!important;
  color:#cbd5e1!important;
  box-shadow:none!important;
  text-shadow:none!important;
}

/* Focused mobile gameplay — keep live runs clear of the fixed app tab bar. */
@media(max-width:700px){
  body.game-active #arcadeBottomNav{
    display:none!important;
  }
  body.game-active .topbar{
    display:none!important;
  }
  body.game-active.has-app-nav .container{
    padding-top:max(8px,calc(env(safe-area-inset-top) + 4px))!important;
    padding-bottom:max(18px,calc(env(safe-area-inset-bottom) + 10px))!important;
  }
  body.game-active .toast{
    bottom:max(18px,calc(env(safe-area-inset-bottom) + 10px))!important;
  }
}
