
/* Jr Labs RC12 — Tiny Breaks
   Secondary, quiet, intentionally non-arcade. */

.tiny-breaks-teaser{
  width:min(1180px,calc(100% - 32px));
  margin:24px auto 0;
  padding:22px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:20px;
  border:1px solid #e1e6ed;
  border-radius:20px;
  background:linear-gradient(135deg,#fbfcff 0%,#f8fafc 55%,#fffaf4 100%);
  box-shadow:0 8px 24px rgba(15,23,42,.035);
}
.tiny-breaks-teaser-copy span,
.tiny-breaks-kicker{
  display:block;
  color:#8a96a8;
  font-size:9.5px;
  line-height:1;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.075em;
}
.tiny-breaks-teaser-copy h2{
  margin:6px 0 4px;
  color:#182033;
  font-size:21px;
  line-height:1.18;
  letter-spacing:-.035em;
}
.tiny-breaks-teaser-copy p{
  margin:0;
  color:#7a8799;
  font-size:11.5px;
  line-height:1.5;
}
.tiny-breaks-teaser-actions{
  display:flex;
  align-items:center;
  gap:7px;
  flex-wrap:wrap;
}
.tiny-breaks-teaser-actions button{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:0 11px;
  border:1px solid #e1e6ed;
  border-radius:11px;
  background:#fff;
  color:#38455a;
  font-size:10.5px;
  font-weight:850;
  cursor:pointer;
  transition:.16s ease;
}
.tiny-breaks-teaser-actions button:hover{
  transform:translateY(-1px);
  border-color:#cdd6e2;
  box-shadow:0 5px 13px rgba(15,23,42,.055);
}
.tiny-breaks-explore{
  min-height:40px;
  padding:0 13px;
  border:0;
  border-radius:11px;
  background:#182033;
  color:#fff;
  font-size:10.5px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}
.tiny-breaks-explore span{margin-left:4px}

.tiny-breaks-view .app-content{
  width:min(1080px,calc(100% - 32px));
}
.tiny-breaks-content{padding-bottom:64px}
.tiny-breaks-hero{
  max-width:720px;
  margin:12px 0 26px;
}
.tiny-breaks-hero h2{
  margin:9px 0 9px;
  color:#111827;
  font-size:44px;
  line-height:1.04;
  letter-spacing:-.055em;
}
.tiny-breaks-hero p{
  margin:0;
  max-width:640px;
  color:#68768b;
  font-size:14px;
  line-height:1.65;
}
.tiny-breaks-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}
.tiny-break-card{
  min-height:220px;
  padding:20px;
  display:flex;
  flex-direction:column;
  border:1px solid #e1e6ed;
  border-radius:20px;
  background:#fff;
  box-shadow:0 8px 24px rgba(15,23,42,.035);
}
.tiny-break-icon{
  width:48px;height:48px;
  display:grid;place-items:center;
  border:1px solid #e5eaf0;
  border-radius:14px;
  background:#f8fafc;
  font-size:21px;
}
.tiny-break-number{
  font-size:11px;
  font-weight:950;
  color:#475569;
}
.tiny-break-card h3{
  margin:18px 0 5px;
  color:#111827;
  font-size:19px;
  letter-spacing:-.025em;
}
.tiny-break-card p{
  margin:0;
  color:#718096;
  font-size:12.5px;
  line-height:1.55;
}
.tiny-break-card button{
  width:max-content;
  margin-top:auto;
  padding:10px 0 0;
  border:0;
  background:transparent;
  color:#111827;
  font-size:11.5px;
  font-weight:900;
  cursor:pointer;
}
.tiny-break-card button span{margin-left:4px}

.tiny-game-heading{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:20px;
  margin:8px 0 18px;
}
.tiny-game-heading h2{
  margin:7px 0 4px;
  color:#111827;
  font-size:36px;
  line-height:1.08;
  letter-spacing:-.05em;
}
.tiny-game-heading p{
  margin:0;
  color:#718096;
  font-size:13px;
}
.tiny-game-stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-bottom:14px;
}
.tiny-game-stats-three{grid-template-columns:repeat(3,minmax(0,1fr))}
.tiny-game-stats > div{
  min-height:70px;
  padding:12px 14px;
  border:1px solid #e1e6ed;
  border-radius:14px;
  background:#fff;
}
.tiny-game-stats span{
  display:block;
  color:#8a96a8;
  font-size:9px;
  font-weight:850;
  text-transform:uppercase;
  letter-spacing:.055em;
}
.tiny-game-stats strong{
  display:block;
  margin-top:5px;
  color:#111827;
  font-size:21px;
  letter-spacing:-.025em;
}
.tiny-game-status{
  margin-top:12px;
  min-height:44px;
  padding:12px 14px;
  border:1px solid #e6eaf0;
  border-radius:13px;
  background:#f8fafc;
  color:#5e6b7d;
  font-size:12px;
  line-height:1.55;
}
.tiny-local-note{
  margin:12px 0 0;
  color:#909bad;
  font-size:10.5px;
  line-height:1.5;
}
.tiny-local-note-center{text-align:center}

.tiny-back-strip{
  margin-top:22px;
  padding:17px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  border:1px solid #e4e8ee;
  border-radius:16px;
  background:#fbfcfd;
}
.tiny-back-strip b{
  display:block;
  color:#293449;
  font-size:12.5px;
}
.tiny-back-strip span{
  display:block;
  margin-top:3px;
  color:#8490a2;
  font-size:10.5px;
}
.tiny-back-strip button{
  min-height:38px;
  padding:0 12px;
  border:1px solid #dde3eb;
  border-radius:10px;
  background:#fff;
  color:#334155;
  font-size:10.5px;
  font-weight:900;
  cursor:pointer;
  white-space:nowrap;
}

/* Snake */
.snake-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 180px;
  gap:16px;
  align-items:start;
}
.snake-board-wrap{
  min-width:0;
  padding:14px;
  border:1px solid #e1e6ed;
  border-radius:20px;
  background:#fff;
  box-shadow:0 8px 24px rgba(15,23,42,.035);
}
#snakeCanvas{
  width:100%;
  max-width:560px;
  aspect-ratio:1;
  display:block;
  margin:0 auto;
  border-radius:14px;
  background:#f7f9fc;
  touch-action:none;
  outline:none;
}
#snakeCanvas:focus-visible{
  box-shadow:0 0 0 3px rgba(99,102,241,.17);
}
.snake-side{
  padding:14px;
  border:1px solid #e1e6ed;
  border-radius:18px;
  background:#fff;
}
.snake-pause{width:100%;margin-bottom:14px}
.snake-dpad{
  display:grid;
  grid-template-columns:repeat(3,46px);
  grid-template-rows:repeat(2,46px);
  gap:6px;
  justify-content:center;
}
.snake-dpad button{
  width:46px;height:46px;
  border:1px solid #dfe5ec;
  border-radius:12px;
  background:#f8fafc;
  color:#334155;
  font-size:17px;
  font-weight:900;
  cursor:pointer;
  touch-action:manipulation;
}
.snake-dpad button:hover{background:#f1f5f9}
.snake-dpad [data-snake-dir="up"]{grid-column:2;grid-row:1}
.snake-dpad [data-snake-dir="left"]{grid-column:1;grid-row:2}
.snake-dpad [data-snake-dir="down"]{grid-column:2;grid-row:2}
.snake-dpad [data-snake-dir="right"]{grid-column:3;grid-row:2}

/* 2048 */
.game2048-board{
  width:min(560px,100%);
  aspect-ratio:1;
  margin:0 auto;
  padding:10px;
  display:grid;
  grid-template-columns:repeat(4,1fr);
  grid-template-rows:repeat(4,1fr);
  gap:9px;
  border:1px solid #dfe5ec;
  border-radius:20px;
  background:#eef1f5;
  touch-action:none;
  outline:none;
}
.game2048-board:focus-visible{box-shadow:0 0 0 3px rgba(99,102,241,.17)}
.game2048-tile{
  display:grid;
  place-items:center;
  border-radius:13px;
  background:#fff;
  color:#536176;
  font-size:clamp(17px,4vw,30px);
  font-weight:900;
  letter-spacing:-.04em;
  box-shadow:inset 0 0 0 1px rgba(15,23,42,.035);
  animation:tinyTileIn .12s ease;
}
.game2048-tile[data-value="0"]{background:rgba(255,255,255,.52);color:transparent}
.game2048-tile[data-value="2"]{background:#fff;color:#526176}
.game2048-tile[data-value="4"]{background:#f8f4eb;color:#526176}
.game2048-tile[data-value="8"]{background:#f5e7cf;color:#6f5131}
.game2048-tile[data-value="16"]{background:#f3dcc2;color:#744b2a}
.game2048-tile[data-value="32"]{background:#eed0bd;color:#743c2e}
.game2048-tile[data-value="64"]{background:#e9c3b8;color:#71302b}
.game2048-tile[data-value="128"]{background:#e7e2bd;color:#61582a}
.game2048-tile[data-value="256"]{background:#dde3b5;color:#505b29}
.game2048-tile[data-value="512"]{background:#d0e3bd;color:#385734}
.game2048-tile[data-value="1024"]{background:#c3dfd4;color:#31564f}
.game2048-tile[data-value="2048"]{background:#d8d9f4;color:#42459a}
.game2048-tile[data-value="4096"],
.game2048-tile[data-value="8192"]{background:#d8d9f4;color:#34377f;font-size:clamp(14px,3vw,24px)}

/* Memory */
.memory-board{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
}
.memory-card{
  min-height:118px;
  position:relative;
  border:1px solid #e1e6ed;
  border-radius:16px;
  background:#fff;
  cursor:pointer;
  perspective:700px;
  padding:0;
  overflow:hidden;
}
.memory-card-inner{
  position:absolute;
  inset:0;
  transition:transform .22s ease;
  transform-style:preserve-3d;
}
.memory-card.is-flipped .memory-card-inner,
.memory-card.is-matched .memory-card-inner{transform:rotateY(180deg)}
.memory-card-face{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
}
.memory-card-front{
  background:linear-gradient(145deg,#fbfcff,#f7f9fc);
  color:#94a3b8;
  font-size:16px;
  font-weight:950;
}
.memory-card-back{
  transform:rotateY(180deg);
  background:#fff;
  color:#334155;
}
.memory-card-back strong{font-size:22px}
.memory-card-back span{font-size:10px;font-weight:850;color:#64748b}
.memory-card.is-matched{
  border-color:#cfd9d3;
  box-shadow:0 0 0 2px rgba(22,101,52,.05);
}
.memory-card:focus-visible{
  outline:3px solid rgba(99,102,241,.17);
  outline-offset:2px;
}

@keyframes tinyTileIn{
  from{transform:scale(.96);opacity:.72}
  to{transform:none;opacity:1}
}

@media(max-width:900px){
  .tiny-breaks-teaser{grid-template-columns:1fr;gap:14px}
  .tiny-breaks-teaser-actions{justify-content:flex-start}
  .tiny-breaks-explore{width:max-content}
  .snake-layout{grid-template-columns:1fr}
  .snake-side{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px}
  .snake-pause{margin:0}
  .tiny-local-note{grid-column:1/-1}
}
@media(max-width:720px){
  .tiny-breaks-grid{grid-template-columns:1fr}
  .tiny-break-card{min-height:170px}
  .tiny-breaks-hero h2{font-size:36px}
  .tiny-game-heading{align-items:flex-start;flex-direction:column}
  .tiny-game-heading .soft-btn{width:100%}
  .memory-board{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
  .memory-card{min-height:92px}
  .tiny-back-strip{align-items:stretch;flex-direction:column}
  .tiny-back-strip button{width:100%}
}
@media(max-width:520px){
  .tiny-breaks-teaser{width:calc(100% - 24px);padding:17px}
  .tiny-breaks-teaser-actions{display:grid;grid-template-columns:repeat(3,1fr);width:100%}
  .tiny-breaks-teaser-actions button{width:100%;padding:0 6px}
  .tiny-breaks-explore{width:100%}
  .tiny-breaks-view .app-content{width:calc(100% - 22px)}
  .tiny-breaks-hero h2{font-size:32px}
  .tiny-game-stats > div{min-height:62px;padding:10px 11px}
  .tiny-game-stats strong{font-size:18px}
  .snake-board-wrap{padding:8px}
  .snake-side{grid-template-columns:1fr}
  .snake-dpad{margin:auto}
  .memory-board{gap:6px}
  .memory-card{min-height:78px;border-radius:12px}
  .memory-card-back strong{font-size:18px}
  .memory-card-back span{font-size:8.5px}
}
@media(prefers-reduced-motion:reduce){
  .memory-card-inner,.game2048-tile,.tiny-breaks-teaser-actions button{transition:none;animation:none}
}

/* RC13 — scalable Tiny Breaks catalog */
.tiny-breaks-catalog{display:grid;gap:24px}
.tiny-category{display:grid;gap:12px}
.tiny-category-head{display:flex;align-items:end;justify-content:space-between;gap:16px}
.tiny-category-head span{display:block;color:#9aa5b5;font-size:8.5px;font-weight:900;text-transform:uppercase;letter-spacing:.07em}
.tiny-category-head h3{margin:4px 0 3px;color:#263246;font-size:16px;letter-spacing:-.025em}
.tiny-category-head p{margin:0;color:#8591a3;font-size:10.5px;line-height:1.5}
.memory-card-front strong{font-size:30px;line-height:1;color:#66758b;font-weight:800;transform:translateY(-1px)}
@media(max-width:720px){.tiny-category{gap:10px}.tiny-breaks-catalog{gap:20px}.memory-card-front strong{font-size:26px}}
