:root {
  --bg: #061725;
  --bg-deep: #03101c;
  --panel: rgba(12, 36, 56, .88);
  --panel-strong: #0b263c;
  --panel-soft: #102f49;
  --line: rgba(188, 220, 241, .12);
  --line-strong: rgba(237, 190, 101, .34);
  --text: #f6f1e8;
  --muted: #a8b9c7;
  --muted-2: #7990a3;
  --gold: #f2b64d;
  --gold-2: #ffd077;
  --gold-deep: #d99122;
  --blue: #45bfe5;
  --success: #6fd5a5;
  --danger: #ff7c79;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
  --header-h: 78px;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg-deep); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 74% 9%, rgba(41, 129, 173, .13), transparent 34%),
    radial-gradient(circle at 15% 20%, rgba(242, 182, 77, .07), transparent 28%),
    linear-gradient(180deg, #061827 0%, #071d2f 40%, #04131f 100%);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}
body.game-open { overflow: hidden; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.ambient { position: fixed; pointer-events: none; filter: blur(70px); opacity: .12; z-index: -1; }
.ambient-one { width: 420px; height: 420px; border-radius: 50%; background: #1ba6d8; top: 8%; right: -180px; }
.ambient-two { width: 340px; height: 340px; border-radius: 50%; background: #e5a83c; left: -170px; top: 45%; }

.app { min-height: 100vh; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  padding: 0 clamp(20px, 4vw, 68px);
  display: flex;
  align-items: center;
  gap: 30px;
  background: rgba(3, 16, 28, .82);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px) saturate(130%);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 30px; font-weight: 700; letter-spacing: -.03em; white-space: nowrap; }
.brand-symbol { width: 34px; height: 34px; display: inline-grid; place-items: center; color: var(--gold); }
.brand-symbol svg { width: 100%; height: 100%; fill: currentColor; }
.desktop-nav { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; }
.nav-link { border: 0; background: transparent; color: #d5e0e8; display: inline-flex; align-items: center; gap: 8px; padding: 12px 14px; border-radius: 12px; cursor: pointer; font-weight: 650; font-size: 14px; transition: .2s ease; }
.nav-link:hover { background: rgba(255,255,255,.055); color: #fff; transform: translateY(-1px); }
.nav-icon { color: var(--gold-2); font-size: 16px; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.button {
  border: 1px solid transparent;
  border-radius: 13px;
  min-height: 46px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 750;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button.primary { color: #15202b; background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 12px 28px rgba(240, 174, 63, .22); }
.button.primary:hover { box-shadow: 0 16px 34px rgba(240, 174, 63, .32); }
.button.secondary { background: rgba(255,255,255,.055); border-color: var(--line); color: #f1f5f7; }
.button.secondary:hover, .button.ghost:hover { background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); }
.button.ghost { background: transparent; border-color: var(--line); color: #dbe4ea; }
.button.compact { min-height: 44px; padding: 0 17px; font-size: 14px; }
.button.large { min-height: 56px; padding: 0 27px; border-radius: 15px; font-size: 16px; }
.button.full { width: 100%; }
.button.outline-light { border-color: rgba(255,255,255,.42); background: rgba(1,14,23,.2); color: #fff; backdrop-filter: blur(10px); }
.button.outline-light:hover { border-color: var(--gold-2); background: rgba(4,22,36,.6); }
.play-icon { font-size: 14px; }
.mobile-menu-button { display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; font-size: 20px; }
.mobile-menu { position: absolute; left: 16px; right: 16px; top: calc(100% + 8px); padding: 12px; background: #0a2438; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.mobile-menu button { width: 100%; border: 0; border-radius: 10px; padding: 13px 14px; text-align: left; background: transparent; cursor: pointer; }
.mobile-menu button:hover { background: rgba(255,255,255,.06); }

.home-view { width: min(1510px, 100%); margin: 0 auto; padding: 0 clamp(20px, 3vw, 46px) 42px; }
.hero-section { min-height: 610px; display: grid; grid-template-columns: .82fr 1.18fr; align-items: center; gap: clamp(36px, 6vw, 92px); padding: 36px 0 30px; }
.hero-copy { padding: 20px 0 10px; }
.eyebrow, .overline { color: var(--gold-2); font-size: 12px; line-height: 1; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.spark { display: inline-block; margin-right: 8px; }
.hero-copy h1 { margin: 18px 0 18px; font-family: var(--serif); font-size: clamp(50px, 5.2vw, 82px); line-height: .98; letter-spacing: -.045em; font-weight: 700; }
.hero-copy h1 em { color: var(--gold-2); font-style: italic; font-weight: 500; }
.hero-copy > p { max-width: 610px; color: #bdcbd5; font-size: clamp(17px, 1.35vw, 20px); line-height: 1.68; margin: 0; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 13px; margin: 28px 0 27px; }
.hero-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.hero-benefits > div { min-width: 0; display: flex; align-items: flex-start; gap: 10px; color: #bdcad4; font-size: 12px; }
.hero-benefits > div > span { color: var(--gold); font-size: 22px; }
.hero-benefits p { margin: 0; line-height: 1.45; }
.hero-benefits strong { color: #eff4f7; font-size: 13px; }

.featured-puzzle { position: relative; min-height: 505px; overflow: hidden; border-radius: var(--radius-lg); border: 1px solid rgba(229, 201, 147, .25); box-shadow: var(--shadow); isolation: isolate; background: #0a263b; }
.featured-puzzle > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, transform .7s ease; }
.featured-puzzle:hover > img { transform: scale(1.018); }
.featured-vignette { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3,13,22,.05) 20%, rgba(2,12,20,.12) 50%, rgba(2,12,20,.94) 100%), linear-gradient(90deg, rgba(3,15,24,.1), transparent 60%); }
.featured-topline { position: absolute; left: 24px; right: 24px; top: 22px; display: flex; justify-content: space-between; align-items: center; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .02em; }
.pill.warm { color: #ffe2a7; background: rgba(9,28,42,.72); border: 1px solid rgba(244,182,79,.42); backdrop-filter: blur(10px); }
.pill.dark { color: var(--gold-2); background: rgba(1,15,25,.68); border: 1px solid rgba(255,255,255,.18); }
.like-pill { border: 1px solid rgba(255,255,255,.2); background: rgba(4,20,32,.65); color: #fff; padding: 9px 13px; border-radius: 999px; cursor: pointer; backdrop-filter: blur(10px); }
.like-pill.liked { color: #ff9aa8; border-color: rgba(255,154,168,.5); }
.featured-content { position: absolute; left: 30px; right: 28px; bottom: 28px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.featured-content h2 { margin: 0 0 3px; font-family: var(--serif); font-size: clamp(31px, 3vw, 48px); line-height: 1; }
.featured-content p { margin: 0 0 15px; color: #d1dae1; }
.verified { color: var(--gold); font-size: 11px; }
.puzzle-meta { display: flex; flex-wrap: wrap; gap: 20px; color: #e6edf1; font-size: 14px; }
.puzzle-meta b { font-weight: 750; }
.circle-play { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 50%; border: 0; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #11202b; display: grid; place-items: center; font-size: 22px; cursor: pointer; box-shadow: 0 12px 35px rgba(240,178,67,.32); transition: .2s ease; }
.circle-play:hover { transform: scale(1.06); }
.featured-dots { position: absolute; left: 50%; transform: translateX(-50%); bottom: 10px; display: flex; gap: 7px; }
.featured-dots button { width: 26px; height: 3px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.25); cursor: pointer; transition: .2s ease; }
.featured-dots button.active { width: 42px; background: var(--gold); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .6fr); gap: 18px; }
.panel { background: linear-gradient(145deg, rgba(13,42,64,.94), rgba(8,30,48,.94)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 18px 44px rgba(0,0,0,.13); }
.collections-panel { padding: 22px; }
.panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.panel-heading.tight { align-items: start; margin-bottom: 14px; }
.panel-heading h2, .section-heading h2 { font-size: 22px; line-height: 1.1; margin: 7px 0 0; letter-spacing: -.025em; }
.text-action { border: 0; padding: 6px 0; background: transparent; color: var(--gold-2); font-weight: 750; cursor: pointer; font-size: 13px; }
.collection-strip { display: grid; grid-template-columns: repeat(6, minmax(118px, 1fr)); gap: 10px; }
.collection-card { position: relative; min-height: 142px; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 14px; background: #0a263a; cursor: pointer; text-align: left; }
.collection-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: .35s ease; }
.collection-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(2,11,18,.9) 100%); }
.collection-card:hover img { transform: scale(1.07); }
.collection-card > div { position: absolute; z-index: 2; left: 12px; right: 10px; bottom: 10px; }
.collection-card strong { display: block; font-size: 13px; line-height: 1.2; }
.collection-card small { color: #c6d2da; font-size: 11px; }
.challenge-panel { padding: 22px; }
.piece-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.piece-option { min-height: 65px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: #eff4f7; cursor: pointer; display: flex; flex-direction: column; justify-content: center; align-items: center; transition: .18s ease; }
.piece-option strong { font-size: 22px; line-height: 1; }
.piece-option span { color: var(--muted); font-size: 10px; margin-top: 4px; }
.piece-option:hover { border-color: rgba(244,182,79,.45); background: rgba(255,255,255,.055); }
.piece-option.active { color: #142231; border-color: var(--gold); background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 10px 25px rgba(229,160,43,.18); }
.piece-option.active span { color: #4c391e; }
.selection-hint { color: var(--muted-2); font-size: 12px; margin: 13px 0 0; text-align: center; }
.most-played-panel { padding: 22px; }
.most-played-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.most-card { position: relative; min-height: 140px; border: 1px solid rgba(255,255,255,.09); border-radius: 14px; overflow: hidden; background: #0a2538; cursor: pointer; text-align: left; padding: 0; }
.most-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: .3s ease; }
.most-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(3,13,21,.94) 100%); }
.most-card:hover img { transform: scale(1.06); }
.most-card .rank { position: absolute; z-index: 2; left: 8px; top: 8px; width: 25px; height: 25px; border-radius: 8px; background: var(--gold-2); color: #1e2932; display: grid; place-items: center; font-size: 11px; font-weight: 900; }
.most-card .most-info { position: absolute; z-index: 2; left: 10px; right: 8px; bottom: 8px; }
.most-card strong { display: block; font-size: 12px; line-height: 1.25; }
.most-card small { color: #c9d5dc; font-size: 9px; }
.leaderboard-panel { padding: 22px; grid-row: span 1; }
.leaderboard-list, .ranking-card ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.leaderboard-list li, .ranking-card li { display: grid; grid-template-columns: 22px 30px 1fr auto; align-items: center; gap: 8px; min-height: 36px; color: #d8e2e8; font-size: 12px; }
.leaderboard-list li:first-child { color: #fff; }
.leaderboard-list .rank-number { color: var(--gold); font-weight: 900; }
.avatar { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, #3d7999, #c27683); font-weight: 850; color: #fff; font-size: 10px; border: 2px solid rgba(255,255,255,.16); }
.leaderboard-list .score { color: #c3d1da; font-weight: 750; }
.daily-card { position: relative; min-height: 220px; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(235,197,126,.26); }
.daily-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.daily-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(4,17,29,.95) 0%, rgba(4,17,29,.74) 47%, rgba(4,17,29,.08) 100%); }
.daily-copy { position: relative; z-index: 2; width: min(470px, 75%); padding: 25px; }
.daily-copy h2 { margin: 14px 0 7px; font-family: var(--serif); font-size: 29px; }
.daily-copy p { color: #c5d2da; margin: 0 0 17px; font-size: 13px; }

.experience-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 18px 0 70px; }
.experience-card { position: relative; min-height: 280px; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line); }
.experience-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: .45s ease; }
.experience-card:hover img { transform: scale(1.045); }
.experience-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,17,25,.94) 0%, rgba(5,17,25,.62) 55%, rgba(5,17,25,.1) 100%); }
.experience-card > div:last-child { position: relative; z-index: 2; padding: 26px; width: 78%; }
.experience-card h2 { font-family: var(--serif); font-size: 31px; line-height: 1.04; margin: 11px 0 9px; }
.experience-card p { color: #d0dbe1; margin: 0 0 18px; }
.overline.light { color: #fff2cb; }

.all-puzzles-section { padding: 10px 0 72px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.section-heading h2 { font-family: var(--serif); font-size: clamp(34px, 3.4vw, 52px); margin-top: 11px; }
.library-tools { display: flex; align-items: center; gap: 10px; }
.search-field { min-width: 240px; height: 48px; border: 1px solid var(--line); background: rgba(255,255,255,.035); border-radius: 13px; display: flex; align-items: center; gap: 10px; padding: 0 14px; }
.search-field span { color: var(--gold); font-size: 18px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: #fff; }
.search-field input::placeholder { color: var(--muted-2); }
.library-tools select { height: 48px; padding: 0 37px 0 14px; border: 1px solid var(--line); border-radius: 13px; background: #0c2a41; color: #e8eef2; outline: 0; }
.filter-chips { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: #cbd7de; font-weight: 700; font-size: 13px; cursor: pointer; }
.filter-chip.active { color: #16222b; background: var(--gold-2); border-color: var(--gold-2); }
.puzzle-library { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.puzzle-card { background: rgba(12,39,60,.88); border: 1px solid var(--line); border-radius: 17px; overflow: hidden; transition: .22s ease; }
.puzzle-card:hover { transform: translateY(-5px); border-color: rgba(244,182,79,.35); box-shadow: 0 18px 45px rgba(0,0,0,.22); }
.puzzle-card-image { position: relative; aspect-ratio: 1.45; overflow: hidden; cursor: pointer; }
.puzzle-card-image img { width: 100%; height: 100%; object-fit: cover; transition: .45s ease; }
.puzzle-card:hover .puzzle-card-image img { transform: scale(1.045); }
.puzzle-card-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 56%, rgba(2,12,20,.62)); pointer-events: none; }
.card-favorite { position: absolute; z-index: 2; right: 11px; top: 11px; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(2,15,25,.63); color: #fff; cursor: pointer; backdrop-filter: blur(8px); }
.card-favorite.active { color: #ff9fb0; background: rgba(52,20,28,.7); }
.card-category { position: absolute; z-index: 2; left: 11px; bottom: 10px; padding: 6px 9px; border-radius: 999px; background: rgba(3,16,26,.7); font-size: 10px; font-weight: 800; }
.puzzle-card-body { padding: 14px; }
.puzzle-card-title-row { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.puzzle-card h3 { margin: 0; font-size: 17px; line-height: 1.2; }
.puzzle-card .play-mini { flex: 0 0 auto; width: 37px; height: 37px; border-radius: 50%; border: 0; background: var(--gold); color: #11202a; cursor: pointer; }
.puzzle-card-meta { display: flex; gap: 12px; color: var(--muted); font-size: 11px; margin-top: 9px; }
.empty-state { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }

.stats-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); padding: 24px 0; margin-top: 0; }
.stats-strip > div { display: grid; grid-template-columns: 34px auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; padding-left: 26px; border-right: 1px solid var(--line); }
.stats-strip > div:last-child { border-right: 0; }
.stats-strip > div > span { grid-row: 1 / 3; color: var(--gold); font-size: 27px; }
.stats-strip strong { font-size: 18px; }
.stats-strip small { color: var(--muted); }
.site-footer { display: grid; grid-template-columns: 1.4fr repeat(3, .55fr) 1.35fr; gap: 32px; padding: 42px 0 28px; }
.footer-brand p, .site-footer p { color: var(--muted); }
.site-footer h3 { font-size: 13px; margin: 0 0 13px; }
.site-footer > div:not(.footer-brand) a { display: block; color: var(--muted); margin: 7px 0; font-size: 13px; }
.site-footer a:hover { color: #fff; }
.newsletter form { display: flex; height: 45px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.newsletter input { flex: 1; min-width: 0; border: 0; background: rgba(255,255,255,.035); color: #fff; padding: 0 13px; outline: 0; }
.newsletter button { width: 48px; border: 0; background: var(--gold); color: #13212b; cursor: pointer; }

/* Game */
.game-view { position: fixed; inset: 0; z-index: 100; background: #041522; min-height: 100dvh; overflow: auto; }
.game-header { height: 70px; position: sticky; top: 0; z-index: 25; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: rgba(3,17,29,.94); backdrop-filter: blur(18px); }
.game-header-left, .game-header-actions { display: flex; align-items: center; gap: 14px; }
.game-brand { font-size: 26px; padding-right: 22px; border-right: 1px solid var(--line); }
.game-back { border: 0; background: transparent; color: #d1dde4; cursor: pointer; font-weight: 700; }
.game-back:hover { color: #fff; }
.game-action { min-height: 42px; padding: 0 15px; border: 1px solid var(--line); background: rgba(255,255,255,.025); font-size: 13px; }
.profile-button { width: 43px; height: 43px; position: relative; border-radius: 50%; border: 1px solid rgba(244,182,79,.45); background: linear-gradient(135deg,#b26b4b,#496b90); color: #fff; font-weight: 900; cursor: pointer; }
.profile-button i { position: absolute; width: 10px; height: 10px; right: -1px; bottom: 1px; border-radius: 50%; background: #42d189; border: 2px solid #061725; }
.game-shell { min-height: calc(100dvh - 70px); display: grid; grid-template-columns: 102px minmax(720px, 1fr) 320px; gap: 14px; padding: 14px; }
.game-toolbar { background: rgba(8,32,49,.8); border: 1px solid var(--line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 9px; align-self: start; position: sticky; top: 84px; }
.tool-button { min-height: 85px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.018); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #e9f0f4; transition: .18s ease; }
.tool-button:hover, .tool-button.active { transform: translateY(-1px); background: rgba(255,255,255,.06); border-color: rgba(244,182,79,.4); }
.tool-button.highlight { border-color: rgba(244,182,79,.55); background: linear-gradient(180deg, rgba(244,182,79,.08), rgba(255,255,255,.015)); }
.tool-icon { font-size: 24px; color: var(--gold); line-height: 1; }
.tool-button strong { font-size: 12px; }
.tool-button small { color: var(--muted); font-size: 10px; }
.tool-button.highlight small { position: absolute; transform: translate(27px,-30px); width: 23px; height: 23px; border-radius: 50%; background: var(--gold); color: #15212b; display: grid; place-items: center; font-weight: 900; }
.workspace-panel { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.game-workspace { position: relative; height: clamp(620px, calc(100dvh - 172px), 920px); min-height: 620px; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: radial-gradient(circle at 50% 35%, #143651 0%, #0b263b 47%, #071c2d 100%); touch-action: none; }
.puzzle-board { position: absolute; left: 2.2%; top: 2.3%; width: 95.6%; height: 73%; border-radius: 13px; background: #061523; border: 1px solid rgba(244,182,79,.38); box-shadow: 0 16px 44px rgba(0,0,0,.24), inset 0 0 0 8px rgba(0,0,0,.08); overflow: hidden; transform-origin: center center; transition: transform .22s ease; }
.board-surface { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 24px 24px; }
.board-reference { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.board-reference.visible { opacity: .34; }
.board-reference img { width: 100%; height: 100%; object-fit: contain; }
.hint-target { position: absolute; border: 3px solid var(--gold); border-radius: 9px; box-shadow: 0 0 0 8px rgba(244,182,79,.17), 0 0 35px rgba(244,182,79,.7); animation: hintPulse 1s ease infinite; pointer-events: none; z-index: 99990; }
@keyframes hintPulse { 50% { box-shadow: 0 0 0 14px rgba(244,182,79,.04), 0 0 45px rgba(244,182,79,.85); } }
.piece-tray { position: absolute; left: 2.2%; right: 2.2%; bottom: 2.1%; height: 20.5%; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(180deg, rgba(4,20,32,.82), rgba(4,20,32,.96)); }
.tray-tabs { position: absolute; left: 12px; right: 138px; top: 8px; height: 38px; display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.tray-tabs::-webkit-scrollbar { display: none; }
.tray-tab { height: 34px; padding: 0 14px; border-radius: 10px; border: 1px solid transparent; background: transparent; color: #adbfca; cursor: pointer; white-space: nowrap; font-size: 12px; font-weight: 750; }
.tray-tab.active { color: var(--gold-2); border-color: rgba(244,182,79,.48); background: rgba(244,182,79,.08); }
.tray-navigation { position: absolute; right: 11px; top: 8px; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.tray-navigation button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #fff; cursor: pointer; font-size: 20px; }
.tray-guide { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.pieces-layer { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.puzzle-piece { position: absolute; pointer-events: auto; cursor: grab; touch-action: none; user-select: none; background-repeat: no-repeat; filter: drop-shadow(0 4px 4px rgba(0,0,0,.48)); will-change: transform, left, top; transition: opacity .15s ease, filter .15s ease, transform .12s ease; }
.puzzle-piece:hover { filter: drop-shadow(0 8px 8px rgba(0,0,0,.58)) brightness(1.07); transform: translateY(-2px); }
.puzzle-piece.dragging { cursor: grabbing; filter: drop-shadow(0 14px 14px rgba(0,0,0,.62)) brightness(1.09); transform: scale(1.055); transition: none; }
.puzzle-piece.locked { cursor: default; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.puzzle-piece.locked:hover { transform: none; filter: drop-shadow(0 1px 1px rgba(0,0,0,.2)); }
.puzzle-piece.hidden-piece { opacity: 0; pointer-events: none; }
.puzzle-piece.hint-piece { filter: drop-shadow(0 0 12px var(--gold)) brightness(1.18); animation: piecePulse .7s ease infinite alternate; }
@keyframes piecePulse { to { transform: scale(1.08); } }
@keyframes snapPop { 50% { transform: scale(1.09); filter: brightness(1.25) drop-shadow(0 0 10px rgba(244,182,79,.65)); } }
.puzzle-piece.snap-pop { animation: snapPop .25s ease; }
.game-bottom-bar { min-height: 82px; border: 1px solid var(--line); border-radius: 16px; background: rgba(8,31,48,.92); display: grid; grid-template-columns: minmax(150px,1.2fr) repeat(3,.55fr) minmax(150px,.8fr) minmax(180px,1fr) minmax(190px,1fr); align-items: stretch; }
.game-title-block, .bottom-stat { padding: 14px 18px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.game-title-block strong { font-size: 15px; }
.game-title-block small, .bottom-stat small { color: var(--muted); font-size: 10px; }
.bottom-stat strong { font-size: 16px; }
.game-bottom-bar > .button { align-self: center; margin: 0 14px; }
.feature-toggle { min-width: 0; padding: 10px 12px; display: grid; grid-template-columns: 35px 1fr 39px; align-items: center; gap: 8px; border-left: 1px solid var(--line); cursor: pointer; }
.feature-toggle input { display: none; }
.feature-toggle > span:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.feature-toggle strong { font-size: 11px; }
.feature-toggle small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.feature-icon { font-size: 23px; }
.feature-toggle i { width: 37px; height: 21px; border-radius: 99px; background: #345065; position: relative; transition: .2s ease; }
.feature-toggle i::after { content: ''; position: absolute; width: 17px; height: 17px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: .2s ease; }
.feature-toggle input:checked + i { background: var(--gold); }
.feature-toggle input:checked + i::after { transform: translateX(16px); }
.game-side { display: flex; flex-direction: column; gap: 10px; }
.game-card { background: linear-gradient(145deg, rgba(13,42,64,.97), rgba(7,28,45,.97)); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.game-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.game-card h3 { margin: 0; font-size: 14px; }
.game-card-heading button, .reference-peek, .smart-card button { border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.025); color: var(--gold-2); cursor: pointer; min-height: 30px; padding: 0 9px; font-size: 10px; }
.game-card-heading span { color: var(--muted); font-size: 9px; }
.reference-card img { width: 100%; aspect-ratio: 1.6; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); transition: .2s ease; }
.reference-card img.hidden-reference { opacity: .08; filter: blur(4px); }
.reference-peek { width: 100%; margin-top: 9px; min-height: 34px; }
.progress-layout { display: grid; grid-template-columns: 114px 1fr; gap: 13px; align-items: center; }
.progress-ring { --progress: 0deg; width: 108px; height: 108px; border-radius: 50%; background: conic-gradient(var(--gold) var(--progress), rgba(255,255,255,.09) 0); display: grid; place-items: center; position: relative; }
.progress-ring::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: #0a2940; }
.progress-ring strong { position: relative; z-index: 1; font-size: 24px; }
.progress-layout dl { margin: 0; }
.progress-layout dl > div { padding: 6px 0; border-bottom: 1px solid var(--line); }
.progress-layout dl > div:last-child { border-bottom: 0; }
.progress-layout dt { color: var(--muted); font-size: 9px; }
.progress-layout dd { margin: 0; font-weight: 800; font-size: 14px; }
.smart-card { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; }
.smart-orb { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg,#6e59ff,#35a9e5); box-shadow: 0 0 22px rgba(83,96,240,.32); }
.smart-card h3 { margin: 0; }
.smart-card p { color: var(--muted); font-size: 9px; margin: 3px 0 0; }
.ranking-card { flex: 1; min-height: 220px; }
.ranking-card ol { gap: 5px; }
.ranking-card li { grid-template-columns: 20px 27px 1fr auto; min-height: 31px; font-size: 10px; }
.ranking-card li.you { margin-top: 6px; padding: 7px; background: rgba(244,182,79,.07); border-radius: 9px; color: var(--gold-2); }
.game-shell.focus-mode { grid-template-columns: minmax(720px,1fr); }
.game-shell.focus-mode .game-toolbar, .game-shell.focus-mode .game-side { display: none; }
.game-shell.focus-mode .game-workspace { height: calc(100dvh - 172px); }
.pause-overlay { position: fixed; inset: 70px 0 0; z-index: 90; background: rgba(2,11,18,.86); backdrop-filter: blur(14px); display: grid; place-items: center; text-align: center; }
.pause-overlay > div { padding: 40px; }
.pause-overlay span { font-size: 54px; color: var(--gold); }
.pause-overlay h2 { font-family: var(--serif); font-size: 43px; margin: 7px 0; }
.pause-overlay p { color: var(--muted); margin: 0 0 24px; }

/* Dialogs */
.modal { width: 100%; height: 100%; max-width: none; max-height: none; border: 0; padding: 20px; background: rgba(2,10,17,.76); backdrop-filter: blur(16px); color: var(--text); }
.modal::backdrop { background: transparent; }
.modal[open] { display: grid; place-items: center; }
.modal-card { width: min(520px, 100%); position: relative; border: 1px solid rgba(244,182,79,.24); border-radius: 24px; background: linear-gradient(145deg,#0e3049,#081f31); box-shadow: 0 30px 100px rgba(0,0,0,.5); padding: 32px; }
.modal-close { position: absolute; right: 15px; top: 15px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.035); color: #fff; cursor: pointer; font-size: 22px; }
.modal-icon, .completion-icon { width: 55px; height: 55px; border-radius: 17px; display: grid; place-items: center; background: rgba(244,182,79,.12); color: var(--gold); font-size: 26px; margin-bottom: 17px; }
.modal-card h2 { font-family: var(--serif); font-size: 37px; line-height: 1.05; margin: 0 0 11px; }
.modal-card > p { color: var(--muted); margin: 0 0 22px; }
.auth-card label { display: grid; gap: 7px; margin: 13px 0; font-size: 12px; font-weight: 750; }
.auth-card input, .global-search input { height: 50px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); color: #fff; padding: 0 14px; outline: 0; }
.auth-card input:focus, .global-search input:focus { border-color: rgba(244,182,79,.55); box-shadow: 0 0 0 3px rgba(244,182,79,.08); }
.auth-card .button { margin-top: 9px; }
.auth-card > small { display: block; color: var(--muted-2); text-align: center; margin-top: 14px; }
.picker-card { width: min(1080px, 100%); max-height: 90dvh; overflow: auto; }
.modal-heading { padding-right: 50px; }
.modal-heading h2 { margin-top: 10px; }
.modal-piece-selector { display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap; }
.modal-piece-selector .piece-option { min-width: 93px; min-height: 54px; }
.modal-puzzle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.modal-puzzle { position: relative; aspect-ratio: 1.35; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; padding: 0; cursor: pointer; background: #0a263b; text-align: left; }
.modal-puzzle img { width: 100%; height: 100%; object-fit: cover; transition: .3s ease; }
.modal-puzzle::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(2,12,20,.9)); }
.modal-puzzle:hover img { transform: scale(1.06); }
.modal-puzzle div { position: absolute; z-index: 2; left: 11px; right: 8px; bottom: 9px; }
.modal-puzzle strong { display: block; font-size: 13px; }
.modal-puzzle small { color: #c2d0d9; font-size: 10px; }
.search-modal-card { width: min(820px, 100%); padding-top: 68px; max-height: 82dvh; overflow: auto; }
.global-search { display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px; }
.global-search > span { font-size: 27px; color: var(--gold); }
.global-search input { width: 100%; font-size: 17px; }
.search-results { margin-top: 17px; display: grid; gap: 8px; }
.search-result { display: grid; grid-template-columns: 82px 1fr auto; gap: 13px; align-items: center; padding: 8px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: rgba(255,255,255,.025); }
.search-result:hover { background: rgba(255,255,255,.055); border-color: rgba(244,182,79,.3); }
.search-result img { width: 82px; height: 58px; border-radius: 8px; object-fit: cover; }
.search-result strong { display: block; }
.search-result small { color: var(--muted); }
.completion-card { width: min(670px, 100%); text-align: center; overflow: hidden; }
.completion-icon { margin: 0 auto 14px; border-radius: 50%; background: var(--gold); color: #17222a; }
.completion-score { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 22px 0; }
.completion-score div { padding: 18px 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.completion-score strong { display: block; font-size: 27px; color: var(--gold-2); }
.completion-score small { color: var(--muted); }
.completion-actions { display: flex; justify-content: center; gap: 10px; }
.completion-card > .text-action { margin-top: 20px; }
.info-card { text-align: center; }
.info-card .modal-icon { margin: 0 auto 17px; }
.info-card .button { margin-top: 5px; }
.toast-region { position: fixed; z-index: 300; right: 20px; bottom: 20px; display: grid; gap: 9px; pointer-events: none; }
.toast { min-width: 260px; max-width: 380px; padding: 13px 15px; border: 1px solid rgba(244,182,79,.34); background: rgba(8,34,52,.96); border-radius: 12px; box-shadow: var(--shadow); color: #eff4f7; font-size: 13px; animation: toastIn .25s ease; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1250px) {
  .desktop-nav { gap: 0; }
  .nav-link { padding-inline: 10px; font-size: 12px; }
  .header-actions .button.ghost:first-child span { display: none; }
  .collection-strip { grid-template-columns: repeat(3, 1fr); }
  .collection-card { min-height: 120px; }
  .most-played-grid { grid-template-columns: repeat(5, minmax(110px, 1fr)); overflow-x: auto; }
  .puzzle-library { grid-template-columns: repeat(3, 1fr); }
  .game-shell { grid-template-columns: 88px minmax(650px, 1fr) 290px; padding: 10px; gap: 10px; }
  .game-toolbar { padding: 8px; }
  .tool-button { min-height: 76px; }
  .game-bottom-bar { grid-template-columns: 1.2fr repeat(3,.5fr) .8fr; }
  .feature-toggle { display: none; }
}

@media (max-width: 1020px) {
  .desktop-nav { display: none; }
  .header-actions .button.ghost:first-child { display: none; }
  .mobile-menu-button { display: block; }
  .hero-section { grid-template-columns: 1fr; padding-top: 48px; }
  .hero-copy { max-width: 760px; }
  .featured-puzzle { min-height: 520px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .collections-panel, .most-played-panel { overflow: hidden; }
  .experience-cards { grid-template-columns: 1fr; }
  .experience-card { min-height: 320px; }
  .puzzle-library { grid-template-columns: repeat(2, 1fr); }
  .site-footer { grid-template-columns: 1.4fr repeat(3, .7fr); }
  .newsletter { grid-column: 1 / -1; }
  .game-shell { grid-template-columns: 76px minmax(0,1fr); }
  .game-side { display: none; }
  .game-header-actions .game-action { display: none; }
  .game-workspace { height: calc(100dvh - 176px); }
  .game-bottom-bar { grid-template-columns: 1.2fr repeat(3,.55fr) .8fr; }
}

@media (max-width: 720px) {
  :root { --header-h: 66px; }
  body { font-size: 14px; }
  .site-header { padding: 0 14px; gap: 12px; }
  .brand { font-size: 24px; }
  .brand-symbol { width: 29px; height: 29px; }
  .header-actions .button { display: none; }
  .home-view { padding: 0 14px 30px; }
  .hero-section { min-height: auto; gap: 28px; padding-top: 34px; }
  .hero-copy h1 { font-size: clamp(44px, 13vw, 65px); }
  .hero-copy > p { font-size: 16px; }
  .hero-buttons { display: grid; }
  .hero-buttons .button { width: 100%; }
  .hero-benefits { grid-template-columns: 1fr; }
  .featured-puzzle { min-height: 430px; }
  .featured-content { left: 20px; right: 20px; bottom: 24px; }
  .featured-content h2 { font-size: 32px; }
  .circle-play { width: 60px; height: 60px; }
  .puzzle-meta { gap: 10px; font-size: 12px; }
  .collections-panel, .challenge-panel, .most-played-panel, .leaderboard-panel { padding: 16px; }
  .collection-strip { display: flex; overflow-x: auto; padding-bottom: 5px; scroll-snap-type: x mandatory; }
  .collection-card { min-width: 150px; scroll-snap-align: start; }
  .most-played-grid { display: flex; }
  .most-card { min-width: 145px; }
  .daily-card { min-height: 280px; }
  .daily-copy { width: 90%; }
  .experience-card { min-height: 310px; }
  .experience-card > div:last-child { width: 92%; padding: 22px; }
  .section-heading { align-items: start; flex-direction: column; }
  .library-tools { width: 100%; display: grid; grid-template-columns: 1fr; }
  .search-field { min-width: 0; width: 100%; }
  .puzzle-library { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2,1fr); gap: 0; }
  .stats-strip > div { border-bottom: 1px solid var(--line); padding: 16px 8px; }
  .site-footer { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .footer-brand, .newsletter { grid-column: 1 / -1; }
  .modal-puzzle-grid { grid-template-columns: repeat(2, 1fr); }
  .completion-actions { display: grid; }

  .game-header { height: 62px; padding: 0 10px; }
  .game-brand { font-size: 22px; border-right: 0; padding-right: 0; }
  .game-brand > span:last-child { display: none; }
  .game-back { font-size: 12px; }
  .game-header-actions .button.primary { display: none; }
  .game-shell { min-height: calc(100dvh - 62px); display: block; padding: 8px; }
  .game-toolbar { position: fixed; z-index: 45; left: 8px; right: 8px; bottom: 8px; top: auto; padding: 6px; flex-direction: row; background: rgba(5,25,40,.96); backdrop-filter: blur(16px); }
  .tool-button { flex: 1; min-width: 0; min-height: 58px; padding: 4px; }
  .tool-button strong { font-size: 9px; }
  .tool-button small { display: none; }
  .tool-icon { font-size: 19px; }
  .tool-button.highlight small { display: grid; transform: translate(18px,-20px); }
  .workspace-panel { padding-bottom: 70px; }
  .game-workspace { height: calc(100dvh - 150px); min-height: 560px; }
  .puzzle-board { left: 2%; width: 96%; height: 67%; }
  .piece-tray { left: 2%; right: 2%; height: 26%; }
  .tray-tabs { right: 103px; }
  .tray-tab { padding: 0 10px; font-size: 10px; }
  .tray-navigation { right: 7px; }
  .game-bottom-bar { display: none; }
  .pause-overlay { inset: 62px 0 0; }
  .game-shell.focus-mode { display: block; }
  .game-shell.focus-mode .game-toolbar { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* =========================================================
   Puzlium Game Workspace V3 — playability-first redesign
   ========================================================= */
.game-view {
  background:
    radial-gradient(circle at 18% 12%, rgba(31, 90, 128, .18), transparent 34%),
    linear-gradient(180deg, #031522 0%, #061c2c 100%);
  overflow: auto;
}
.game-header {
  height: 68px;
  padding: 0 18px;
  background: rgba(3, 17, 28, .97);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}
.header-puzzle-name { display: flex; flex-direction: column; min-width: 0; }
.header-puzzle-name strong { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.header-puzzle-name small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.game-shell {
  min-height: calc(100dvh - 68px);
  display: grid;
  grid-template-columns: minmax(760px, 1fr) 326px;
  gap: 12px;
  padding: 12px;
}
.workspace-panel { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.game-workspace {
  position: relative;
  height: clamp(660px, calc(100dvh - 166px), 980px);
  min-height: 660px;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(164, 204, 229, .14);
  background:
    radial-gradient(circle at 42% 38%, rgba(22, 70, 102, .86), rgba(8, 35, 55, .92) 47%, #041827 100%),
    linear-gradient(135deg, #0b2b43, #041522);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 28px 70px rgba(0,0,0,.24);
  touch-action: none;
}
.workspace-hud {
  position: absolute;
  z-index: 20000;
  top: 14px;
  left: 14px;
  right: 14px;
  min-height: 54px;
  padding: 6px;
  display: flex;
  align-items: stretch;
  gap: 6px;
  border: 1px solid rgba(172, 207, 228, .14);
  border-radius: 16px;
  background: rgba(4, 24, 39, .9);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0,0,0,.22);
}
.hud-stat { min-width: 86px; padding: 5px 12px; display: flex; flex-direction: column; justify-content: center; border-radius: 11px; }
.hud-stat span { color: #8da8b9; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .09em; }
.hud-stat strong { font-size: 15px; margin-top: 1px; font-variant-numeric: tabular-nums; }
.hud-stat.primary-stat { background: rgba(244,182,79,.11); }
.hud-stat.primary-stat strong { color: var(--gold-2); }
.hud-spacer { flex: 1; }
.hud-button {
  min-width: 82px;
  border: 1px solid rgba(172,207,228,.14);
  border-radius: 11px;
  background: rgba(255,255,255,.035);
  color: #eaf2f6;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: .18s ease;
}
.hud-button:hover, .hud-button.active { border-color: rgba(244,182,79,.5); background: rgba(244,182,79,.1); color: var(--gold-2); }
.hud-button.icon-only { min-width: 42px; width: 42px; font-size: 20px; }
.hud-button.zoom-readout { min-width: 58px; }

.board-stage {
  position: absolute;
  z-index: 20;
  transform-origin: center center;
  transition: transform .2s ease;
  will-change: transform;
}
.board-stage.pan-active { cursor: grab; }
.board-stage.panning { cursor: grabbing; transition: none; }
.puzzle-board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 15px;
  border: 2px solid rgba(244,182,79,.48);
  background: #041420;
  box-shadow: 0 18px 54px rgba(0,0,0,.36), 0 0 0 7px rgba(3,15,25,.38);
  overflow: visible;
  transform: none !important;
}
.board-surface {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 13px;
  background-color: #061724;
  background-image:
    linear-gradient(rgba(255,255,255,.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.024) 1px, transparent 1px);
  background-size: 28px 28px;
}
.board-reference {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 13px;
  opacity: .16;
  pointer-events: none;
  transition: opacity .16s ease;
}
.board-reference.visible { opacity: var(--ghost-opacity, .16); }
.board-reference.peek { opacity: 1 !important; z-index: 8; }
.board-reference img { width: 100%; height: 100%; display: block; object-fit: fill; }
.board-pieces-layer { position: absolute; inset: 0; z-index: 10; overflow: visible; pointer-events: none; }
.drag-layer { position: absolute; inset: 0; z-index: 50000; pointer-events: none; overflow: visible; }
.hint-target { z-index: 20; }

.piece-tray {
  position: absolute;
  z-index: 15000;
  top: 82px;
  right: 14px;
  bottom: 90px;
  width: 344px;
  height: auto;
  left: auto;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid rgba(172,207,228,.16);
  background: linear-gradient(180deg, rgba(7,31,49,.97), rgba(3,19,31,.985));
  box-shadow: 0 24px 58px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.025);
  overflow: hidden;
  transition: width .22s ease, transform .22s ease;
}
.tray-header { min-height: 58px; padding: 12px 12px 9px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid rgba(172,207,228,.11); }
.tray-header > div { display: flex; flex-direction: column; gap: 2px; }
.tray-kicker, .card-kicker { color: #7899ad; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.tray-header strong { font-size: 14px; }
.tray-header strong b { color: var(--gold-2); }
.tray-header button { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #fff; font-size: 23px; cursor: pointer; }
.tray-tabs { position: static; height: auto; min-height: 48px; padding: 8px 10px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid rgba(172,207,228,.08); overflow-x: auto; scrollbar-width: none; }
.tray-tab { height: 32px; padding: 0 11px; font-size: 10px; border-radius: 9px; }
.tray-pieces-layer { position: relative; flex: 1; min-height: 0; overflow: hidden; pointer-events: none; }
.tray-navigation { position: static; min-height: 46px; padding: 6px 12px 8px; display: flex; align-items: center; justify-content: center; gap: 12px; border-top: 1px solid rgba(172,207,228,.08); color: #a7bbc7; }
.tray-navigation button { width: 34px; height: 34px; }
.tray-guide { position: static; transform: none; padding: 0 8px 9px; text-align: center; font-size: 9px; color: #66879a; }
.game-workspace.tray-collapsed .piece-tray { width: 66px; }
.game-workspace.tray-collapsed .tray-header { padding-inline: 14px; justify-content: center; }
.game-workspace.tray-collapsed .tray-header > div,
.game-workspace.tray-collapsed .tray-tabs,
.game-workspace.tray-collapsed .tray-pieces-layer,
.game-workspace.tray-collapsed .tray-navigation,
.game-workspace.tray-collapsed .tray-guide { display: none; }
.game-workspace.tray-collapsed .tray-header button { transform: rotate(180deg); }

.puzzle-piece {
  position: absolute;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  background-repeat: no-repeat;
  filter: drop-shadow(0 5px 5px rgba(0,0,0,.55));
  will-change: transform, left, top;
  transition: opacity .15s ease, filter .15s ease, transform .14s ease;
}
.board-pieces-layer .puzzle-piece { pointer-events: auto; }
.tray-pieces-layer .puzzle-piece { pointer-events: auto; }
.drag-layer .puzzle-piece { pointer-events: auto; }
.puzzle-piece:hover { filter: drop-shadow(0 10px 9px rgba(0,0,0,.62)) brightness(1.09); }
.puzzle-piece.dragging { cursor: grabbing; filter: drop-shadow(0 18px 16px rgba(0,0,0,.7)) brightness(1.1); transition: none; }
.puzzle-piece.locked { cursor: default; filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.puzzle-piece.locked:hover { filter: drop-shadow(0 1px 1px rgba(0,0,0,.15)); }
.puzzle-piece.hidden-piece { opacity: 0; pointer-events: none; }

.play-tools {
  position: absolute;
  z-index: 16000;
  left: 14px;
  bottom: 14px;
  max-width: calc(100% - 386px);
  padding: 6px;
  display: flex;
  align-items: stretch;
  gap: 6px;
  border: 1px solid rgba(172,207,228,.14);
  border-radius: 16px;
  background: rgba(4,24,39,.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 34px rgba(0,0,0,.24);
}
.play-tool {
  min-width: 92px;
  min-height: 58px;
  padding: 7px 10px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #dce8ee;
  cursor: pointer;
  transition: .18s ease;
}
.play-tool:hover, .play-tool.active { background: rgba(255,255,255,.055); border-color: rgba(244,182,79,.28); color: #fff; }
.play-tool.primary-tool { background: rgba(244,182,79,.11); border-color: rgba(244,182,79,.36); color: var(--gold-2); }
.play-tool span { font-size: 18px; line-height: 1; }
.play-tool strong { font-size: 10px; }
.play-tool small { position: absolute; top: 4px; right: 5px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: #12212a; font-size: 9px; font-weight: 900; }

.game-bottom-bar { min-height: 78px; }
.game-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.game-card { border-radius: 18px; padding: 14px; }
.game-card-heading { margin-bottom: 10px; }
.game-card-heading > div { min-width: 0; }
.game-card-heading h3 { font-size: 14px; margin-top: 3px; }
.reference-card { padding-bottom: 13px; }
.reference-image-button { width: 100%; padding: 0; position: relative; display: block; overflow: hidden; border: 1px solid rgba(244,182,79,.22); border-radius: 13px; background: #03131f; cursor: zoom-in; }
.reference-image-button img { width: 100%; height: min(255px, 28dvh); min-height: 180px; display: block; object-fit: contain; background: #03131f; transition: opacity .2s ease, filter .2s ease; }
.reference-image-button span { position: absolute; right: 8px; bottom: 8px; padding: 6px 8px; border-radius: 8px; background: rgba(2,14,23,.82); color: #fff; font-size: 9px; font-weight: 800; }
.reference-image-button img.hidden-reference { opacity: .08; filter: blur(5px); }
.reference-peek { min-height: 40px; width: 100%; margin-top: 9px; font-size: 11px; font-weight: 800; }
.ghost-control { margin-top: 11px; padding-top: 10px; display: grid; grid-template-columns: 1fr 86px 34px; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.ghost-control span { display: flex; flex-direction: column; }
.ghost-control strong { font-size: 11px; }
.ghost-control small { color: var(--muted); font-size: 8px; line-height: 1.3; }
.ghost-control input { width: 100%; accent-color: var(--gold); }
.ghost-control output { color: var(--gold-2); font-size: 10px; font-weight: 900; text-align: right; }
.progress-layout { grid-template-columns: 96px 1fr; }
.progress-ring { width: 92px; height: 92px; }
.progress-ring strong { font-size: 20px; }
.helper-card { display: block; }
.helper-row { min-height: 54px; padding: 9px 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); cursor: pointer; }
.helper-row span { display: flex; flex-direction: column; }
.helper-row b { font-size: 11px; }
.helper-row small { max-width: 190px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.helper-checkbox { appearance: none; width: 42px; height: 24px; flex: 0 0 auto; border-radius: 99px; background: #2b4658; position: relative; cursor: pointer; transition: .2s ease; }
.helper-checkbox::after { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s ease; }
.helper-checkbox:checked { background: var(--gold); }
.helper-checkbox:checked::after { transform: translateX(18px); }
.wide-helper-button { width: 100%; min-height: 39px; margin-top: 8px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); color: #c9d7df; cursor: pointer; font-size: 10px; font-weight: 800; }
.wide-helper-button:hover { border-color: rgba(244,182,79,.42); color: var(--gold-2); }
.shortcuts-card { margin-top: auto; }
.shortcut-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 7px; color: #9db4c2; font-size: 9px; }
.shortcut-grid span { display: flex; align-items: center; gap: 6px; }
kbd { min-width: 24px; height: 23px; display: inline-grid; place-items: center; border: 1px solid rgba(255,255,255,.15); border-bottom-width: 2px; border-radius: 6px; background: rgba(255,255,255,.04); color: #eef4f7; font: 800 9px/1 var(--sans); }
.reference-lightbox { position: fixed; inset: 0; z-index: 400; padding: 28px; display: grid; place-items: center; background: rgba(0,8,14,.9); backdrop-filter: blur(14px); }
.reference-lightbox[hidden] { display: none; }
.reference-lightbox img { max-width: min(92vw, 1400px); max-height: 90dvh; object-fit: contain; border-radius: 18px; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.reference-lightbox button { position: fixed; top: 22px; right: 24px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color: #fff; font-size: 28px; cursor: pointer; }

.game-shell.focus-mode { grid-template-columns: minmax(760px, 1fr); }
.game-shell.focus-mode .game-side { display: none; }
.game-shell.focus-mode .game-workspace { height: calc(100dvh - 84px); }
.game-shell.focus-mode .game-bottom-bar { display: none; }
.pause-overlay { inset: 68px 0 0; }

@media (max-width: 1280px) {
  .game-shell { grid-template-columns: minmax(680px,1fr) 292px; }
  .piece-tray { width: 300px; }
  .play-tools { max-width: calc(100% - 342px); }
  .play-tool { min-width: 76px; }
  .game-bottom-bar { grid-template-columns: minmax(150px,1.2fr) repeat(3,.55fr) minmax(180px,.9fr); }
  .game-bottom-bar .feature-toggle { display: none; }
}

@media (max-width: 1020px) {
  .game-shell { grid-template-columns: 1fr; }
  .game-side { display: grid; grid-template-columns: 1fr 1fr; }
  .shortcuts-card { margin-top: 0; }
  .game-workspace { height: 760px; }
  .game-header-actions .game-action:not(#fullscreenButton) { display: none; }
}

@media (max-width: 820px) {
  .game-header { height: 60px; padding: 0 10px; }
  .game-brand > span:last-child, .header-puzzle-name, #fullscreenButton { display: none; }
  .game-back { font-size: 11px; }
  .game-shell { min-height: calc(100dvh - 60px); padding: 7px; display: block; }
  .game-workspace { height: calc(100dvh - 74px); min-height: 610px; border-radius: 16px; }
  .workspace-hud { top: 7px; left: 7px; right: 7px; min-height: 48px; gap: 3px; }
  .hud-stat { min-width: 58px; padding: 4px 7px; }
  .hud-stat span { font-size: 7px; }
  .hud-stat strong { font-size: 12px; }
  .hud-button { min-width: 40px; width: 40px; font-size: 0; }
  .hud-button span { font-size: 14px; }
  .hud-button.icon-only { min-width: 36px; width: 36px; }
  .hud-button.zoom-readout { min-width: 46px; width: 46px; font-size: 9px; }
  .hud-spacer { min-width: 4px; }
  .piece-tray { top: auto; left: 7px; right: 7px; bottom: 74px; width: auto; height: 228px; }
  .game-workspace.tray-collapsed .piece-tray { width: auto; height: 57px; }
  .game-workspace.tray-collapsed .tray-header { min-height: 57px; }
  .game-workspace.tray-collapsed .tray-header button { transform: rotate(90deg); }
  .tray-header button { transform: rotate(90deg); }
  .tray-header { min-height: 48px; padding: 7px 10px; }
  .tray-header strong { font-size: 12px; }
  .tray-tabs { min-height: 40px; padding: 4px 8px; }
  .tray-tab { height: 29px; }
  .tray-navigation { position: absolute; right: 7px; top: 8px; min-height: 32px; padding: 0; border: 0; }
  .tray-navigation button { width: 30px; height: 30px; }
  .tray-navigation span { font-size: 8px; }
  .tray-guide { display: none; }
  .play-tools { left: 7px; right: 7px; bottom: 7px; max-width: none; padding: 4px; gap: 3px; }
  .play-tool { min-width: 0; flex: 1; min-height: 54px; padding: 4px 2px; }
  .play-tool span { font-size: 16px; }
  .play-tool strong { font-size: 8px; }
  .game-bottom-bar { display: none; }
  .game-side { display: none; }
  .pause-overlay { inset: 60px 0 0; }
}

@media (max-width: 820px) {
  .workspace-hud .hud-stat:nth-of-type(3), #panButton { display: none; }
  .workspace-hud .hud-spacer { display: none; }
  #referenceBoardButton { display: inline-flex; align-items: center; justify-content: center; }
}

/* =========================================================
   Game UX V4 — large board, bottom piece ribbon, pick & place
   ========================================================= */
.game-shell {
  position: relative;
  display: block;
  min-height: calc(100dvh - 70px);
  padding: 0;
}
.workspace-panel { display: block; min-width: 0; }
.game-workspace {
  height: calc(100dvh - 70px);
  min-height: 670px;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 48% 36%, rgba(27,72,101,.95) 0%, rgba(8,35,55,.98) 46%, #041522 100%);
}
.game-bottom-bar { display: none !important; }

.workspace-hud {
  top: 12px;
  left: 96px;
  right: 242px;
  min-height: 52px;
  padding: 6px;
  border-radius: 15px;
  background: rgba(4,23,37,.88);
  box-shadow: 0 12px 30px rgba(0,0,0,.2);
}
.hud-stat { min-width: 86px; min-height: 40px; }
.hud-button { min-height: 40px; }

.play-tools {
  left: 12px;
  top: 82px;
  bottom: auto;
  max-width: none;
  width: 76px;
  padding: 6px;
  flex-direction: column;
  border-radius: 18px;
}
.play-tool {
  min-width: 62px;
  width: 62px;
  min-height: 60px;
  padding: 6px 4px;
}
.play-tool span { font-size: 20px; }
.play-tool strong { font-size: 9px; }

.piece-tray {
  top: auto;
  left: 96px;
  right: 18px;
  bottom: 16px;
  width: auto;
  height: 194px;
  display: grid;
  grid-template-rows: 56px 42px minmax(88px,1fr);
  border-radius: 20px;
  border-color: rgba(244,182,79,.22);
  background: linear-gradient(180deg, rgba(7,31,49,.965), rgba(3,18,30,.99));
  box-shadow: 0 26px 70px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.04);
  overflow: hidden;
}
.tray-header {
  min-height: 56px;
  padding: 8px 10px 8px 16px;
  border-bottom: 1px solid rgba(172,207,228,.1);
}
.tray-title { min-width: 190px; }
.tray-title small { color: #7896a8; font-size: 9px; margin-top: 2px; }
.tray-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.tray-action,
.tray-collapse,
.piece-size-control button {
  min-height: 36px;
  border: 1px solid rgba(172,207,228,.16);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  color: #dfeaf0;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  cursor: pointer;
}
.tray-action { padding: 0 12px; }
.tray-action:hover,
.tray-collapse:hover,
.piece-size-control button:hover { border-color: rgba(244,182,79,.46); color: var(--gold-2); background: rgba(244,182,79,.08); }
.tray-action.primary { border-color: rgba(244,182,79,.42); color: var(--gold-2); background: rgba(244,182,79,.1); }
.tray-collapse { width: 38px; font-size: 18px; }
.piece-size-control {
  height: 36px;
  display: grid;
  grid-template-columns: 34px 50px 34px;
  align-items: center;
  border: 1px solid rgba(172,207,228,.12);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(1,13,22,.32);
}
.piece-size-control button { height: 34px; min-height: 34px; border: 0; border-radius: 0; font-size: 18px; }
.piece-size-control span { color: #a9bdc9; font-size: 9px; font-weight: 850; text-align: center; }
.tray-tabs {
  min-height: 42px;
  height: 42px;
  padding: 5px 154px 5px 12px;
  border-bottom: 1px solid rgba(172,207,228,.08);
}
.tray-tab { height: 31px; font-size: 10px; padding-inline: 12px; }
.tray-pieces-layer {
  position: relative;
  min-height: 88px;
  overflow: visible;
  pointer-events: none;
}
.tray-navigation {
  position: absolute;
  z-index: 8;
  right: 12px;
  top: 61px;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: rgba(3,18,30,.9);
  border-radius: 10px;
}
.tray-navigation button { width: 32px; height: 32px; }
.tray-guide { display: none; }
.game-workspace.tray-collapsed .piece-tray {
  left: auto;
  right: 18px;
  width: 220px;
  height: 58px;
  grid-template-rows: 58px;
}
.game-workspace.tray-collapsed .tray-header { min-height: 58px; padding: 8px; }
.game-workspace.tray-collapsed .tray-title,
.game-workspace.tray-collapsed .tray-tabs,
.game-workspace.tray-collapsed .tray-pieces-layer,
.game-workspace.tray-collapsed .tray-navigation,
.game-workspace.tray-collapsed .tray-action,
.game-workspace.tray-collapsed .piece-size-control { display: none; }
.game-workspace.tray-collapsed .tray-actions { width: 100%; justify-content: flex-end; }
.game-workspace.tray-collapsed .tray-collapse { transform: rotate(180deg); }

.puzzle-piece { transform-origin: top left; }
.puzzle-piece.dragging,
.puzzle-piece.held { transition: none; }
.puzzle-piece.held {
  pointer-events: none !important;
  filter: drop-shadow(0 20px 18px rgba(0,0,0,.72)) brightness(1.12) saturate(1.08);
}
.puzzle-piece.snap-ready {
  filter: drop-shadow(0 0 8px rgba(255,209,103,.95)) drop-shadow(0 14px 16px rgba(0,0,0,.55)) brightness(1.18);
}
.puzzle-board.drop-active {
  border-color: rgba(255,208,102,.95);
  box-shadow: 0 18px 54px rgba(0,0,0,.36), 0 0 0 5px rgba(244,182,79,.13), inset 0 0 32px rgba(244,182,79,.06);
}
.piece-tray.drop-active { border-color: rgba(107,195,255,.75); box-shadow: 0 0 0 4px rgba(107,195,255,.08), 0 26px 70px rgba(0,0,0,.4); }

.hand-hint {
  position: absolute;
  z-index: 60000;
  left: 50%;
  top: 76px;
  transform: translateX(-50%);
  min-width: 330px;
  min-height: 54px;
  padding: 8px 9px 8px 12px;
  display: grid;
  grid-template-columns: 36px 1fr 34px;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(244,182,79,.5);
  border-radius: 15px;
  background: rgba(5,27,43,.96);
  box-shadow: 0 18px 50px rgba(0,0,0,.42);
  pointer-events: auto;
}
.hand-hint[hidden] { display: none; }
.hand-piece-icon { font-size: 23px; }
.hand-hint div { display: flex; flex-direction: column; }
.hand-hint strong { color: var(--gold-2); font-size: 12px; }
.hand-hint small { color: #9eb4c1; font-size: 9px; }
.hand-hint kbd { padding: 1px 5px; border: 1px solid rgba(255,255,255,.18); border-radius: 5px; background: rgba(255,255,255,.05); }
.hand-hint button { width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 9px; background: rgba(255,255,255,.04); color: #fff; font-size: 18px; cursor: pointer; }

.game-side {
  position: absolute;
  z-index: 17000;
  top: 82px;
  right: 18px;
  width: 204px;
  display: flex;
  gap: 8px;
}
.game-side .helper-card,
.game-side .shortcuts-card { display: none; }
.game-side .game-card { padding: 10px; border-radius: 15px; background: rgba(5,27,43,.91); backdrop-filter: blur(16px); }
.game-side .game-card-heading { margin-bottom: 7px; }
.game-side .game-card-heading h3 { font-size: 11px; }
.game-side .reference-image-button img { height: 116px; min-height: 116px; object-fit: cover; }
.game-side .reference-peek { min-height: 34px; font-size: 9px; }
.game-side .ghost-control { grid-template-columns: 1fr; gap: 5px; }
.game-side .ghost-control span,
.game-side .ghost-control output { display: none; }
.game-side .progress-card { padding: 9px 10px; }
.game-side .progress-layout { grid-template-columns: 62px 1fr; gap: 8px; }
.game-side .progress-ring { width: 58px; height: 58px; }
.game-side .progress-ring::after { inset: 7px; }
.game-side .progress-ring strong { font-size: 14px; }
.game-side .progress-layout dl > div { padding: 3px 0; }
.game-side .progress-layout dt { font-size: 7px; }
.game-side .progress-layout dd { font-size: 10px; }

.game-shell.focus-mode { display: block; }
.game-shell.focus-mode .game-workspace { height: calc(100dvh - 70px); }
.game-shell.focus-mode .game-side { display: none; }
.game-shell.focus-mode .piece-tray { right: 18px; }

@media (max-width: 1100px) {
  .workspace-hud { right: 16px; }
  .game-side { width: 174px; opacity: .92; }
  .game-side .progress-card { display: none; }
  .game-side .reference-image-button img { height: 98px; min-height: 98px; }
  .tray-action:not(.primary) { display: none; }
}

@media (max-width: 820px) {
  .game-shell { min-height: calc(100dvh - 60px); }
  .game-workspace { height: calc(100dvh - 60px); min-height: 610px; }
  .workspace-hud { top: 6px; left: 7px; right: 7px; min-height: 48px; }
  .workspace-hud .hud-stat:nth-of-type(3),
  #panButton,
  #fullscreenButton { display: none; }
  .hud-stat { min-width: 64px; padding-inline: 8px; }
  .hud-button { min-width: 39px; width: 39px; font-size: 0; }
  .hud-button span { font-size: 16px; }
  .hud-button.zoom-readout { min-width: 52px; width: 52px; font-size: 10px; }
  .play-tools {
    top: auto;
    left: 7px;
    right: 7px;
    bottom: 205px;
    width: auto;
    max-width: none;
    flex-direction: row;
    justify-content: space-between;
    padding: 4px;
  }
  .play-tool { min-width: 0; width: auto; flex: 1; min-height: 45px; }
  .play-tool span { font-size: 16px; }
  .play-tool strong { font-size: 8px; }
  .play-tool:nth-child(4),
  .play-tool:nth-child(5) { display: none; }
  .piece-tray {
    left: 7px;
    right: 7px;
    bottom: 7px;
    height: 190px;
    grid-template-rows: 54px 38px minmax(86px,1fr);
    border-radius: 17px;
  }
  .tray-header { min-height: 54px; padding: 7px 8px 7px 12px; }
  .tray-title small { display: none; }
  .tray-action { padding: 0 9px; }
  .tray-action.primary { font-size: 0; width: 38px; padding: 0; }
  .tray-action.primary::before { content: '✦'; font-size: 16px; }
  .piece-size-control { display: none; }
  .tray-tabs { min-height: 38px; height: 38px; padding: 4px 108px 4px 7px; }
  .tray-tab { height: 29px; padding-inline: 10px; }
  .tray-navigation { top: 58px; right: 7px; }
  .tray-guide { display: none; }
  .game-side { top: 60px; right: 7px; width: 124px; }
  .game-side .progress-card,
  .game-side .reference-peek,
  .game-side .ghost-control,
  .game-side .game-card-heading { display: none; }
  .game-side .reference-card { padding: 5px; border-radius: 11px; }
  .game-side .reference-image-button img { height: 86px; min-height: 86px; }
  .reference-image-button span { font-size: 0; width: 27px; height: 27px; display: grid; place-items: center; padding: 0; }
  .reference-image-button span::after { content: '↗'; font-size: 12px; }
  .hand-hint { top: 58px; min-width: 0; width: calc(100% - 146px); left: 7px; transform: none; grid-template-columns: 28px 1fr 30px; }
  .hand-hint small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .game-workspace.tray-collapsed .piece-tray { right: 7px; bottom: 7px; width: 58px; height: 54px; }
  .game-workspace.tray-collapsed .tray-actions { justify-content: center; }
}

/* V4 specificity fixes for tray controls */
.tray-header > .tray-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tray-header > .tray-actions {
  width: auto;
  height: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}
.tray-header .tray-action {
  width: auto;
  height: 36px;
  min-width: auto;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}
.tray-header .tray-collapse {
  width: 38px;
  height: 36px;
  min-width: 38px;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  font-size: 18px;
  line-height: 1;
}
@media (max-width: 820px) {
  .tray-header > .tray-actions { gap: 5px; }
  .tray-header .tray-action.primary { width: 38px; min-width: 38px; padding: 0; }
}

@media (max-width: 820px) {
  .tray-header #spreadPiecesButton,
  .tray-header #dockGatherButton,
  .tray-header .piece-size-control { display: none; }
  .tray-header > .tray-actions { width: 42px; flex: 0 0 42px; }
  .tray-header .tray-collapse { display: block; width: 38px; min-width: 38px; }
  .tray-navigation {
    top: 10px;
    right: 54px;
    min-height: 34px;
    background: rgba(5,27,43,.96);
  }
  .tray-navigation button { width: 31px; height: 31px; }
  .tray-tabs { padding: 4px 7px; }
}

/* V5 — gerçek parça birleşimi: birleşen kümelerde iç gölgeler kaldırılır. */
.board-pieces-layer .puzzle-piece.clustered { filter: none; }
.board-pieces-layer .puzzle-piece.locked { filter: none; }
.puzzle-piece.cluster-dragging { pointer-events: none !important; filter: none !important; }
.puzzle-piece.join-pop { animation: joinClusterPop .24s ease; }
@keyframes joinClusterPop {
  0% { transform: scale(1); }
  45% { transform: scale(1.035); }
  100% { transform: scale(1); }
}


/* V7 — güvenilir tepsi aç/kapat + tek/çift sıra parça görünümü */
.tray-rows-toggle {
  width: 38px; height: 36px; min-width: 38px; min-height: 36px; padding: 0;
  display: grid; place-items: center; border: 1px solid rgba(244,182,79,.42);
  border-radius: 10px; background: rgba(244,182,79,.08); color: var(--gold-2);
  font: inherit; font-size: 18px; font-weight: 900; cursor: ns-resize;
  touch-action: none; user-select: none;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.tray-rows-toggle:hover,
.tray-rows-toggle.active { background: rgba(244,182,79,.16); border-color: rgba(244,182,79,.72); }
.tray-rows-toggle.dragging { transform: scale(.95); }
.tray-rows-toggle span { pointer-events: none; }

.piece-tray { transition: height .22s ease, opacity .18s ease, transform .22s ease; }
.tray-pieces-layer { overflow: hidden; }
.game-workspace.tray-two-rows .piece-tray {
  height: 328px;
  grid-template-rows: 56px 42px minmax(230px,1fr);
}
.game-workspace.tray-two-rows .tray-pieces-layer { min-height: 230px; }
.game-workspace.tray-two-rows .tray-rows-toggle { box-shadow: inset 0 0 0 1px rgba(255,255,255,.05); }

.game-workspace.tray-collapsed .piece-tray { display: none !important; }
.tray-reopen {
  position: absolute; z-index: 52000; right: 18px; bottom: 16px;
  min-width: 186px; height: 48px; padding: 0 14px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid rgba(244,182,79,.58); border-radius: 14px;
  background: linear-gradient(180deg, rgba(20,51,69,.98), rgba(5,27,43,.99));
  color: #f7fbfd; box-shadow: 0 16px 42px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06);
  font: inherit; font-size: 11px; font-weight: 900; cursor: pointer;
}
.tray-reopen:hover { border-color: var(--gold-2); color: var(--gold-2); transform: translateY(-1px); }
.tray-reopen[hidden] { display: none !important; }
.tray-reopen-icon { font-size: 18px; }
.tray-reopen b { color: var(--gold-2); font-size: 17px; }

@media (max-width: 1100px) { .tray-rows-toggle { width: 36px; min-width: 36px; } }
@media (max-width: 820px) {
  .tray-header > .tray-actions { width: 84px !important; flex: 0 0 84px !important; gap: 5px; }
  .tray-header .tray-collapse,
  .tray-header .tray-rows-toggle { display: grid !important; width: 38px; min-width: 38px; }
  .game-workspace.tray-two-rows .piece-tray {
    height: 300px;
    grid-template-rows: 54px 38px minmax(208px,1fr);
  }
  .game-workspace.tray-two-rows .tray-pieces-layer { min-height: 208px; }
  .game-workspace.tray-two-rows .play-tools { bottom: 315px; }
  .tray-reopen { right: 7px; bottom: 7px; min-width: 174px; height: 46px; }
}

/* =========================================================
   YapbozOyna V8 — gerçek üyelik, gerçek sayılar ve okunabilir oyun UI'ı
   ========================================================= */
.brand-word { font-family: var(--sans); font-weight: 900; letter-spacing: -.055em; color: #f5f8fa; }
.brand-word > span { color: var(--gold-2); }
.brand-symbol { position: relative; }
.brand-symbol .brand-play { fill: #071c2d; opacity: .9; }
.admin-link { text-decoration: none; }
.mobile-menu a { display: block; padding: 12px 14px; color: #fff; text-decoration: none; }
.data-mode-badge { align-self: flex-start; padding: 8px 11px; border: 1px solid rgba(244,182,79,.22); border-radius: 999px; color: #c6d5dd; font-size: 11px; font-weight: 800; background: rgba(244,182,79,.05); }
.data-mode-badge.connected { color: #9fe2b2; border-color: rgba(82,213,125,.3); background: rgba(82,213,125,.06); }
.stats-strip { grid-template-columns: repeat(5,1fr); }
.card-favorite { min-width: 52px; gap: 4px; }
.card-favorite small { font-size: 10px; font-weight: 800; }
.puzzle-card-meta { flex-wrap: wrap; row-gap: 6px; }
.leaderboard-list li > span:nth-child(3) { display: flex; flex-direction: column; min-width: 0; }
.leaderboard-list li > span:nth-child(3) small { color: var(--muted-2); font-size: 9px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking-empty { color: var(--muted); line-height: 1.5; text-align: center; }
.compact-empty { min-height: 120px; }

/* Authentication */
.account-card { width: min(520px, calc(100vw - 28px)); padding: 26px; text-align: left; }
.auth-logo { display: flex; align-items: center; gap: 12px; margin: 0 36px 22px 0; }
.auth-logo-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(244,182,79,.12); border: 1px solid rgba(244,182,79,.3); font-size: 23px; }
.auth-logo > div { display: flex; flex-direction: column; }
.auth-logo strong { font-size: 22px; letter-spacing: -.04em; }
.auth-logo strong span { color: var(--gold-2); }
.auth-logo small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.auth-tabs { padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.auth-tabs button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font: inherit; font-weight: 850; cursor: pointer; }
.auth-tabs button.active { background: rgba(244,182,79,.13); color: var(--gold-2); box-shadow: inset 0 0 0 1px rgba(244,182,79,.25); }
.auth-view[hidden] { display: none; }
.auth-heading { margin: 22px 0 10px; }
.auth-heading h2 { margin: 0 0 6px; font-size: 27px; }
.auth-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.auth-form { display: grid; gap: 13px; }
.auth-form label { display: grid; gap: 7px; margin: 0; color: #dce7ed; font-size: 12px; font-weight: 800; }
.auth-form label > small { color: var(--muted-2); font-weight: 600; }
.auth-form input { width: 100%; height: 50px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); color: #fff; padding: 0 14px; outline: 0; }
.auth-form input:focus { border-color: rgba(244,182,79,.6); box-shadow: 0 0 0 3px rgba(244,182,79,.08); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 72px; }
.password-field button { position: absolute; right: 7px; top: 7px; height: 36px; padding: 0 10px; border: 0; border-radius: 9px; background: rgba(255,255,255,.06); color: #cbd9df; cursor: pointer; font-size: 10px; font-weight: 800; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.terms-check { grid-template-columns: 20px 1fr !important; align-items: start; color: var(--muted) !important; font-weight: 600 !important; line-height: 1.45; }
.terms-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--gold); }
.auth-text-button, .auth-back { margin: 14px auto 0; display: block; border: 0; background: transparent; color: var(--gold-2); font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.auth-back { margin: 0 0 16px; }
.auth-feedback { min-height: 20px; margin: 14px 0 0; color: #ffba9d; font-size: 12px; text-align: center; line-height: 1.45; }

/* Profile */
.profile-card { width: min(780px, calc(100vw - 28px)); padding: 26px; text-align: left; }
.profile-head { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 15px; padding-right: 34px; }
.profile-avatar { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: linear-gradient(145deg,#f7c063,#d88931); color: #10212c; font-size: 24px; font-weight: 950; }
.profile-head h2 { margin: 4px 0 1px; font-size: 27px; }
.profile-head p { margin: 0; color: var(--muted); }
.cloud-status { padding: 8px 10px; border-radius: 999px; background: rgba(83,202,126,.08); border: 1px solid rgba(83,202,126,.24); color: #99dcae; font-size: 10px; font-weight: 850; }
.profile-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin: 20px 0; }
.profile-stats > div { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.profile-stats strong { display: block; font-size: 22px; color: var(--gold-2); }
.profile-stats small { color: var(--muted); }
.profile-tabs { display: flex; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); overflow-x: auto; }
.profile-tabs button { min-height: 38px; padding: 0 14px; white-space: nowrap; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 850; cursor: pointer; }
.profile-tabs button.active { color: #fff; background: rgba(255,255,255,.065); }
.profile-pane { min-height: 210px; max-height: 340px; overflow: auto; padding: 12px 2px 2px; }
.profile-pane[hidden] { display: none; }
.profile-list { display: grid; gap: 8px; }
.profile-result { width: 100%; min-height: 72px; display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); color: #fff; text-align: left; cursor: pointer; }
.profile-result:hover { border-color: rgba(244,182,79,.35); background: rgba(244,182,79,.04); }
.profile-result img { width: 76px; height: 54px; object-fit: cover; border-radius: 9px; }
.profile-result span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.profile-result strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-result small { color: var(--muted); }
.profile-result b { color: var(--gold-2); font-size: 12px; white-space: nowrap; }
.profile-empty, .profile-loading { min-height: 180px; display: grid; place-content: center; gap: 6px; text-align: center; color: var(--muted); }
.profile-empty strong { color: #dce7ed; }
.profile-actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.button.danger { color: #ffb0a9; border-color: rgba(255,106,96,.25); }

/* Ranking */
.ranking-card { width: min(900px, calc(100vw - 28px)); padding: 26px; text-align: left; }
.ranking-piece-tabs { display: flex; gap: 6px; margin: 18px 0 12px; overflow-x: auto; }
.ranking-piece-tabs button { min-width: 62px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.025); color: var(--muted); font: inherit; font-weight: 850; cursor: pointer; }
.ranking-piece-tabs button.active { color: #15242d; background: var(--gold); border-color: var(--gold); }
.ranking-table-wrap { max-height: 520px; overflow: auto; border: 1px solid var(--line); border-radius: 15px; }
.ranking-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.ranking-table th { position: sticky; top: 0; z-index: 1; padding: 12px 14px; background: #0a263b; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-align: left; }
.ranking-table td { padding: 11px 14px; border-top: 1px solid rgba(172,207,228,.09); color: #dce7ed; }
.ranking-table tr.is-you td { background: rgba(244,182,79,.08); }
.ranking-user { display: flex; align-items: center; gap: 9px; }
.ranking-user i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: rgba(244,182,79,.14); color: var(--gold-2); font-style: normal; font-size: 10px; font-weight: 900; }
.ranking-user > span { display: flex; flex-direction: column; }
.ranking-user small { color: var(--muted); font-size: 9px; }

/* Game side leaderboard */
.game-leaderboard-card { min-height: 132px; }
.card-link-button { min-width: 40px; }
.mini-ranking { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.mini-ranking li { min-height: 26px; display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 5px; padding: 3px 4px; border-radius: 7px; font-size: 9px; }
.mini-ranking li.is-you { background: rgba(244,182,79,.1); }
.mini-ranking li > b { color: var(--gold-2); }
.mini-ranking li > span { display: flex; justify-content: space-between; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-ranking li small { color: var(--muted); }
.mini-ranking li > strong { color: #dce7ed; font-size: 8px; }
.mini-ranking li.ranking-empty {
  display: block;
  min-height: 72px;
  padding: 14px 10px;
  color: var(--muted);
  text-align: center;
  line-height: 1.55;
  white-space: normal;
}
.completion-score { grid-template-columns: repeat(4,1fr); }
.completion-save-status { margin: -10px 0 18px; color: var(--gold-2); font-size: 12px; font-weight: 750; cursor: pointer; }

/* Oyun alanındaki tüm okunabilir metinler yaklaşık 2pt (2.67px) büyütüldü. */
.game-view .game-back { font-size: 14.67px; }
.game-view .game-action { font-size: 15.67px; }
.game-view .hud-stat strong { font-size: 16.67px; }
.game-view .hud-stat small { font-size: 11.67px; }
.game-view .hud-button { font-size: 12.67px; }
.game-view .tray-kicker,
.game-view .card-kicker { font-size: 10.67px; }
.game-view .tray-header strong { font-size: 16.67px; }
.game-view .tray-title small { font-size: 11.67px; }
.game-view .tray-action,
.game-view .tray-collapse,
.game-view .piece-size-control button { font-size: 12.67px; }
.game-view .piece-size-control span { font-size: 11.67px; }
.game-view .tray-tab { font-size: 12.67px; }
.game-view .tray-navigation { font-size: 12.67px; }
.game-view .play-tool strong { font-size: 11.67px; }
.game-view .play-tool small { font-size: 11.67px; }
.game-view .game-card-heading h3 { font-size: 13.67px; }
.game-view .game-card-heading span { font-size: 11.67px; }
.game-view .reference-peek { font-size: 11.67px; }
.game-view .progress-layout dt { font-size: 9.67px; }
.game-view .progress-layout dd { font-size: 12.67px; }
.game-view .mini-ranking li { font-size: 11.67px; }
.game-view .mini-ranking li > strong { font-size: 10.67px; }
.game-view .hand-hint strong { font-size: 14.67px; }
.game-view .hand-hint small { font-size: 11.67px; }

@media (max-width: 900px) {
  .stats-strip { grid-template-columns: repeat(2,1fr); }
  .stats-strip > div:last-child { grid-column: 1 / -1; }
  .profile-card, .ranking-card, .account-card { padding: 20px; }
  .two-fields { grid-template-columns: 1fr; }
  .profile-result { grid-template-columns: 64px 1fr; }
  .profile-result img { width: 64px; height: 50px; }
  .profile-result b { grid-column: 2; }
}
@media (max-width: 820px) {
  .game-side .game-leaderboard-card { display: none; }
  .game-view .play-tool strong { font-size: 10.67px; }
  .game-view .tray-tab { font-size: 11.67px; }
}
@media (max-width: 560px) {
  .profile-head { grid-template-columns: 52px 1fr; }
  .profile-avatar { width: 52px; height: 52px; border-radius: 16px; }
  .cloud-status { grid-column: 1 / -1; justify-self: start; }
  .profile-stats { grid-template-columns: 1fr; }
  .profile-actions { flex-direction: column; }
  .profile-actions .button { width: 100%; }
  .completion-score { grid-template-columns: repeat(2,1fr); }
}

/* =========================================================
   YapbozOyna V10 — modern controls, iguana identity, stable game layout
   ========================================================= */
:root {
  --serif: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
.brand-iguana { width: 42px; height: 32px; color: transparent; }
.brand-iguana img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 5px 10px rgba(217,145,34,.18)); }
.game-brand .brand-iguana { width: 38px; height: 29px; }
.auth-logo-mark { padding: 5px; }
.auth-logo-mark img { width: 100%; height: 100%; object-fit: contain; }

/* Native select yerine tüm tarayıcılarda aynı görünen açılır menü */
.yo-select { position: relative; width: 100%; min-width: 0; font-family: var(--sans); }
.yo-select-native {
  position: absolute !important; width: 1px !important; height: 1px !important;
  opacity: 0 !important; pointer-events: none !important; overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
}
.yo-select-button {
  width: 100%; min-height: 48px; padding: 0 46px 0 14px;
  display: flex; align-items: center; text-align: left;
  border: 1px solid rgba(172,207,228,.18); border-radius: 13px;
  background: linear-gradient(180deg, #0d304b, #09243a);
  color: #f4f8fa; font: 800 14px/1.2 var(--sans); cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.yo-select-button:hover { border-color: rgba(244,182,79,.46); }
.yo-select-button:focus-visible { outline: 3px solid rgba(244,182,79,.16); border-color: var(--gold); }
.yo-select-button i {
  position: absolute; right: 16px; width: 9px; height: 9px;
  border-right: 2px solid var(--gold-2); border-bottom: 2px solid var(--gold-2);
  transform: rotate(45deg) translateY(-2px); transition: transform .18s ease;
}
.yo-select.is-open .yo-select-button i { transform: rotate(225deg) translate(-2px,-2px); }
.yo-select-menu {
  position: absolute; z-index: 120000; left: 0; right: 0; top: calc(100% + 7px);
  max-height: min(360px, 52vh); padding: 7px; overflow: auto;
  border: 1px solid rgba(244,182,79,.3); border-radius: 15px;
  background: #071d2f; box-shadow: 0 24px 70px rgba(0,0,0,.55);
}
.yo-select-menu[hidden] { display: none !important; }
.yo-select-option {
  width: 100%; min-height: 43px; padding: 9px 12px; border: 0; border-radius: 10px;
  display: flex; align-items: center; text-align: left;
  background: transparent; color: #dce8ee; font: 750 13px/1.3 var(--sans); cursor: pointer;
}
.yo-select-option:hover, .yo-select-option.is-active { background: rgba(255,255,255,.065); color: #fff; }
.yo-select-option.is-selected { color: #10202a; background: linear-gradient(135deg,var(--gold-2),var(--gold)); }
.yo-select-option.is-selected::before { content: "✓"; margin-right: 8px; font-weight: 950; }
.yo-select.is-disabled { opacity: .55; }

.profile-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.member-role-badge { padding: 8px 10px; border-radius: 999px; background: rgba(244,182,79,.1); border: 1px solid rgba(244,182,79,.28); color: var(--gold-2); font-size: 10px; font-weight: 900; }
.member-role-badge.admin { background: rgba(111,213,165,.08); border-color: rgba(111,213,165,.28); color: #a5e5c3; }

/* Oyun alanı: büyütülmüş tipografiye alan aç, öğeleri üst üste bindirme */
.game-shell { --tray-height: 218px; }
.game-shell.tray-two-rows { --tray-height: 354px; }
.workspace-hud {
  min-height: 58px; left: 102px; right: 238px; padding: 7px 8px;
  gap: 6px; overflow: visible;
}
.hud-stat { min-height: 44px; min-width: 92px; padding-inline: 12px; }
.hud-button { min-height: 44px; padding-inline: 13px; }
.play-tools { top: 86px; width: 82px; padding: 7px; gap: 5px; }
.play-tool { width: 68px; min-width: 68px; min-height: 64px; }
.piece-tray {
  left: 102px; right: 18px; bottom: 16px; height: var(--tray-height);
  grid-template-rows: 64px 48px minmax(104px,1fr);
}
.game-workspace.tray-two-rows .piece-tray {
  height: var(--tray-height);
  grid-template-rows: 64px 48px minmax(240px,1fr);
}
.tray-header { min-height: 64px; padding: 9px 11px 9px 16px; }
.tray-title { min-width: 230px; }
.tray-actions { min-width: 0; }
.tray-tabs { min-height: 48px; height: 48px; padding: 6px 118px 6px 12px; }
.tray-pieces-layer { min-height: 104px; }
.game-workspace.tray-two-rows .tray-pieces-layer { min-height: 240px; }
.tray-navigation { top: 70px; }
.tray-row-switch {
  height: 38px; display: grid; grid-template-columns: repeat(2,58px); padding: 3px;
  border: 1px solid rgba(172,207,228,.16); border-radius: 11px; background: rgba(1,13,22,.34);
}
.tray-row-switch button {
  min-width: 0; min-height: 30px; padding: 0 7px; border: 0; border-radius: 8px;
  background: transparent; color: #8fa8b7; font: 850 10px/1 var(--sans); cursor: pointer;
}
.tray-row-switch button.active, .tray-row-switch button[aria-pressed="true"] {
  color: #10202a; background: linear-gradient(135deg,var(--gold-2),var(--gold));
  box-shadow: 0 5px 16px rgba(226,153,44,.2);
}
.game-side { top: 84px; bottom: calc(var(--tray-height) + 28px); max-height: none; overflow: auto; scrollbar-width: thin; }
.game-shell.tray-two-rows .game-side { bottom: 382px; }
.game-side .game-card { flex: 0 0 auto; }
.game-shell.tray-two-rows .game-side .game-leaderboard-card { display: none; }
.game-workspace.table-mode .board-stage { opacity: 1; }

/* Basılı tut önizlemesinin 5 saniyelik bilinçli hareket olduğunu göster */
.puzzle-piece.preview-hold-pending::after {
  content: "5 sn"; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%) scale(calc(1 / var(--piece-scale,1)));
  min-width: 38px; height: 27px; padding: 0 7px; display: grid; place-items: center;
  border-radius: 999px; background: rgba(3,19,31,.9); border: 1px solid rgba(244,182,79,.6);
  color: var(--gold-2); font: 900 10px/1 var(--sans); pointer-events: none;
}

@media (max-width: 1280px) {
  .workspace-hud { right: 194px; }
  .game-side { width: 174px; }
  .tray-action { padding-inline: 9px; }
  .tray-title { min-width: 190px; }
}
@media (max-width: 1100px) {
  .workspace-hud { right: 16px; }
  .game-side { display: none; }
  .piece-tray { right: 14px; }
}
@media (max-width: 820px) {
  .brand-iguana { width: 34px; height: 27px; }
  .game-shell { --tray-height: 204px; }
  .game-shell.tray-two-rows { --tray-height: 318px; }
  .piece-tray { left: 7px; right: 7px; bottom: 7px; height: var(--tray-height); grid-template-rows: 58px 42px minmax(102px,1fr); }
  .game-workspace.tray-two-rows .piece-tray { height: var(--tray-height); grid-template-rows: 58px 42px minmax(214px,1fr); }
  .tray-header { min-height: 58px; }
  .tray-title { min-width: 130px; }
  .tray-title small, .tray-action:not(.primary), .piece-size-control { display: none; }
  .tray-row-switch { grid-template-columns: repeat(2,48px); }
  .tray-row-switch button { font-size: 9px; }
  .tray-tabs { min-height: 42px; height: 42px; padding-right: 106px; }
  .tray-navigation { top: 63px; }
  .play-tools { bottom: calc(var(--tray-height) + 14px); }
  .game-workspace.tray-two-rows .play-tools { bottom: calc(var(--tray-height) + 14px); }
}


/* =========================================================
   YapbozOyna V11 — özgün logo, serbest masa, devam kartı, rozetler
   ========================================================= */
.brand { gap: 0; min-width: 0; }
.brand-full-logo { display: block; width: 184px; height: 58px; object-fit: contain; object-position: left center; }
.game-brand .brand-full-logo { width: 166px; height: 54px; }
.footer-brand .brand-full-logo { width: 205px; height: 82px; }
.auth-logo { flex-direction: column; align-items: flex-start; gap: 5px; }
.auth-full-logo { width: 235px; height: 94px; object-fit: contain; object-position: left center; }
.auth-logo > small { color: var(--muted); font-size: 11px; }
.admin-header .brand-full-logo { width: 190px; height: 64px; }

.resume-strip { position: relative; width: min(1420px, calc(100% - 40px)); min-height: 112px; margin: -15px auto 28px; padding: 12px 64px 12px 12px; display: grid; grid-template-columns: 132px 1fr auto; align-items: center; gap: 18px; border: 1px solid rgba(244,182,79,.3); border-radius: 20px; background: linear-gradient(110deg, rgba(14,48,70,.98), rgba(5,27,43,.98)); box-shadow: 0 18px 46px rgba(0,0,0,.24); }
.resume-strip[hidden] { display: none !important; }
.resume-strip img { width: 132px; height: 86px; object-fit: cover; border-radius: 13px; border: 1px solid rgba(255,255,255,.1); }
.resume-copy h2 { margin: 3px 0; font-size: 22px; }
.resume-copy p { margin: 0; color: var(--muted); }
.resume-copy p b { color: var(--gold-2); }
.resume-dismiss { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 9px; background: rgba(255,255,255,.04); color: #a9bdc9; font-size: 21px; cursor: pointer; }

.rank-badge { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 4px 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; font-size: 9px; font-weight: 900; line-height: 1; white-space: nowrap; vertical-align: middle; }
.rank-badge.compact { min-width: 21px; height: 21px; padding: 0 4px; justify-content: center; font-size: 12px; }
.rank-badge-legend { color: #fff1a8; border-color: rgba(255,211,70,.52); background: linear-gradient(135deg,rgba(255,189,31,.24),rgba(255,113,32,.12)); }
.rank-badge-gold { color: #ffe38b; border-color: rgba(246,193,59,.42); background: rgba(246,193,59,.12); }
.rank-badge-silver { color: #e7f2f8; border-color: rgba(198,218,231,.35); background: rgba(198,218,231,.1); }
.rank-badge-bronze { color: #ffc394; border-color: rgba(215,137,81,.4); background: rgba(215,137,81,.1); }
.rank-badge-starter { color: #a9c9da; border-color: rgba(135,187,215,.28); background: rgba(80,151,188,.08); }
.profile-badges { flex-wrap: wrap; justify-content: flex-end; }
.ranking-user strong { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.mini-ranking .rank-badge { transform: scale(.88); transform-origin: left center; }

.game-workspace.table-mode::before { content: 'SERBEST ÇALIŞMA MASASI'; position: absolute; z-index: 3; left: 102px; top: 78px; color: rgba(150,188,208,.32); font-size: 9px; font-weight: 900; letter-spacing: .18em; pointer-events: none; }
.game-workspace.table-drop-active { box-shadow: inset 0 0 0 3px rgba(244,182,79,.13); }
.game-workspace.table-drop-active::after { content: 'Buraya bırak'; position: absolute; z-index: 4; left: 50%; top: 78px; transform: translateX(-50%); padding: 5px 10px; border-radius: 999px; background: rgba(244,182,79,.14); color: var(--gold-2); font-size: 9px; font-weight: 900; pointer-events: none; }
.game-workspace.table-mode .puzzle-board { box-shadow: 0 18px 54px rgba(0,0,0,.36), 0 0 0 7px rgba(3,15,25,.38), 0 0 0 1px rgba(244,182,79,.5); }
.board-pieces-layer { overflow: visible !important; }
.board-stage { overflow: visible !important; }

@media (max-width: 820px) {
  .brand-full-logo { width: 142px; height: 50px; }
  .game-brand .brand-full-logo { width: 128px; height: 46px; }
  .resume-strip { width: calc(100% - 20px); margin: 8px auto 20px; padding: 10px 44px 10px 10px; grid-template-columns: 82px 1fr; gap: 10px; }
  .resume-strip img { width: 82px; height: 68px; }
  .resume-strip .button { grid-column: 1 / -1; width: 100%; }
  .resume-copy h2 { font-size: 17px; }
  .game-workspace.table-mode::before { left: 10px; top: 58px; }
}

/* ========================================================================== */
/* V12 — arkadaşlar, ortak oyun, çoklu seçim, rehber ve koleksiyon sayfası    */
/* ========================================================================== */
.header-social-button{position:relative;display:inline-flex;align-items:center;gap:8px;min-height:42px;padding:0 15px;border:1px solid rgba(148,188,215,.2);border-radius:14px;background:rgba(5,26,43,.64);color:var(--text);font-weight:800;cursor:pointer}.header-social-button:hover{border-color:rgba(247,187,74,.52);background:rgba(16,48,69,.85)}.header-social-button .online-count{display:grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#27c982;color:#02170f;font-size:12px;font-weight:900}.multiplayer-action{border-color:rgba(66,211,157,.35)!important}.multiplayer-action::before{content:"";width:7px;height:7px;border-radius:50%;background:#38d996;box-shadow:0 0 0 4px rgba(56,217,150,.12)}

.selection-box{position:absolute;z-index:99990;border:2px solid #ffd16c;border-radius:10px;background:rgba(255,199,85,.12);box-shadow:0 0 0 1px rgba(3,20,34,.75),0 0 24px rgba(255,189,64,.18);pointer-events:none}.selection-toolbar{position:absolute;z-index:99992;left:50%;top:88px;transform:translateX(-50%);display:flex;align-items:center;gap:7px;padding:8px;border:1px solid rgba(255,198,74,.42);border-radius:16px;background:rgba(4,24,40,.95);box-shadow:0 15px 45px rgba(0,0,0,.35);backdrop-filter:blur(14px)}.selection-toolbar[hidden]{display:none}.selection-toolbar strong{padding:0 8px;white-space:nowrap;font-size:13px;color:#fff}.selection-toolbar button{min-width:38px;height:38px;border:1px solid rgba(161,194,215,.18);border-radius:10px;background:#102d43;color:#f7fbff;font:800 13px/1 var(--font);cursor:pointer}.selection-toolbar button:hover{border-color:#f7bf51;color:#ffd270}.selection-toolbar #selectionToTray{padding:0 12px;min-width:auto}.selection-toolbar #clearSelection{padding:0 12px;min-width:auto;background:transparent}.game-workspace.selection-mode{cursor:crosshair}.game-workspace.selection-mode .board-stage,.game-workspace.selection-mode .puzzle-board{cursor:crosshair}.puzzle-piece.multi-selected{filter:drop-shadow(0 0 3px #ffd86d) drop-shadow(0 0 8px rgba(255,194,69,.85));outline:2px solid rgba(255,210,100,.92);outline-offset:-2px}.puzzle-piece.remote-claimed{filter:grayscale(.35) opacity(.64);pointer-events:none}.puzzle-piece.preview-hold-pending::after{content:"3 sn";position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:rgba(4,24,40,.88);color:#ffd269;font:900 11px/1 var(--font);box-shadow:0 0 0 3px rgba(255,201,82,.22)}.piece-tray.drop-active{border-color:#58dfaa!important;box-shadow:inset 0 0 0 2px rgba(73,222,168,.28),0 0 28px rgba(54,211,158,.16)}.piece-tray.drop-active::before{content:"Parçayı şeride geri bırak";position:absolute;z-index:30;left:50%;top:50%;transform:translate(-50%,-50%);padding:10px 16px;border-radius:999px;background:#37d59a;color:#062019;font-weight:900;box-shadow:0 10px 30px rgba(0,0,0,.3);pointer-events:none}

.anti-spam-box{display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:14px 15px;border:1px solid rgba(112,172,201,.22);border-radius:16px;background:rgba(8,34,53,.78)}.anti-spam-box>div:first-child{display:flex;flex-direction:column;gap:3px}.anti-spam-box strong{font-size:14px;color:#f3f8fb}.anti-spam-box small{font-size:12px;color:var(--muted)}.anti-spam-box label{display:flex;align-items:center;gap:8px;margin:0;color:#ffd36d;font-size:16px;font-weight:900}.anti-spam-box input[type=number]{width:78px;height:42px;margin:0;border-radius:11px;text-align:center;font-size:18px;font-weight:900}.honeypot-field{position:absolute!important;left:-10000px!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important}.anti-spam-box #turnstileContainer{grid-column:1/-1;justify-self:center}

.social-card{width:min(780px,calc(100vw - 30px));max-height:min(820px,90vh);overflow:auto}.social-tabs{display:flex;gap:7px;margin:20px 0 12px;padding:5px;border:1px solid rgba(139,183,209,.16);border-radius:15px;background:rgba(4,24,39,.68)}.social-tabs button{flex:1;min-height:42px;border:0;border-radius:11px;background:transparent;color:var(--muted);font:800 13px/1 var(--font);cursor:pointer}.social-tabs button.active{background:#173a52;color:#fff;box-shadow:inset 0 0 0 1px rgba(255,194,75,.28)}.social-tabs span{display:inline-grid;place-items:center;min-width:21px;height:21px;margin-left:5px;border-radius:99px;background:rgba(255,255,255,.09);font-size:11px}.social-search{display:flex;align-items:center;gap:9px;padding:0 14px;border:1px solid rgba(139,183,209,.18);border-radius:14px;background:#08283f}.social-search input{width:100%;height:48px;border:0!important;background:transparent!important;box-shadow:none!important}.social-list{display:grid;gap:9px;min-height:120px;margin-top:12px}.social-player{display:grid;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;gap:12px;padding:11px;border:1px solid rgba(139,183,209,.14);border-radius:15px;background:rgba(10,39,59,.76)}.social-avatar,.room-avatar{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;background:linear-gradient(145deg,#f3c25c,#9a6d31);color:#071c2b;font-weight:950;box-shadow:inset 0 0 0 2px rgba(255,255,255,.18)}.social-player-info{display:flex;min-width:0;flex-direction:column;gap:4px}.social-player-info strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#f8fbfd}.social-player-info small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted)}.online-dot{display:inline-block;width:8px;height:8px;margin-left:5px;border-radius:50%;background:#3adc9a;box-shadow:0 0 0 4px rgba(58,220,154,.1)}.social-player-actions{display:flex;gap:6px}.social-action{min-height:36px;padding:0 11px;border:1px solid rgba(139,183,209,.2);border-radius:10px;background:#102f46;color:#e9f3f8;font:800 12px/1 var(--font);cursor:pointer}.social-action.primary,.social-action.accept{border-color:#e8ae41;background:#f2be58;color:#071b28}.social-action.icon{width:36px;padding:0}.social-action:disabled{opacity:.55;cursor:default}.social-empty{display:flex;min-height:125px;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:22px;text-align:center;border:1px dashed rgba(139,183,209,.18);border-radius:15px;color:var(--muted)}.social-room-summary{display:flex;flex-direction:column;gap:4px;margin-top:14px;padding:12px 14px;border-radius:13px;background:rgba(242,184,74,.1);border:1px solid rgba(242,184,74,.28)}.social-room-summary small{color:var(--muted)}.invite-card{width:min(500px,calc(100vw - 28px));text-align:center}.invite-icon{display:grid;place-items:center;width:72px;height:72px;margin:0 auto 14px;border-radius:22px;background:rgba(242,184,74,.12);font-size:36px}.invite-meta{display:flex;justify-content:center;gap:8px;margin:18px 0}.invite-meta span{padding:8px 11px;border-radius:999px;background:#102f46;color:#dcebf3;font-size:13px;font-weight:800}

.multiplayer-card{background:radial-gradient(circle at 92% 0%,rgba(49,213,156,.12),transparent 38%),rgba(7,31,48,.84)}.room-live-dot{width:11px;height:11px;border-radius:50%;background:#4d6a7d}.room-live-dot.active{background:#3bdf9b;box-shadow:0 0 0 5px rgba(59,223,155,.1)}.room-participants{display:flex;align-items:center;margin:12px 0}.room-participants .room-avatar{width:40px;height:40px;margin-right:-8px;border:3px solid #08283e;font-size:12px}.room-empty-seat{display:grid;place-items:center;width:40px;height:40px;margin-left:2px;border:1px dashed rgba(164,194,211,.35);border-radius:50%;color:#9db6c5;font-size:20px}.multiplayer-card p{margin:0 0 13px;color:var(--muted);font-size:13px;line-height:1.5}.primary-room-button{border-color:rgba(56,218,157,.38)!important;background:rgba(55,202,149,.12)!important;color:#7ff1c5!important}

.tutorial-card{width:min(520px,calc(100vw - 28px));text-align:center}.tutorial-progress{width:max-content;margin:0 auto 14px;padding:6px 10px;border-radius:999px;background:#102f46;color:#a9c2d0;font-size:12px;font-weight:900}.tutorial-visual{display:grid;place-items:center;width:82px;height:82px;margin:0 auto 17px;border-radius:25px;background:linear-gradient(145deg,rgba(244,190,83,.2),rgba(28,76,103,.3));font-size:42px;border:1px solid rgba(247,195,86,.26)}.tutorial-card h2{font-size:30px}.tutorial-card>p{max-width:410px;margin:10px auto 20px;color:var(--muted);line-height:1.65}.tutorial-actions{display:flex;justify-content:center;gap:9px}.tutorial-dont-show{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:15px;color:var(--muted);font-size:12px}.tutorial-highlight{position:relative;z-index:99980!important;box-shadow:0 0 0 3px #ffd16b,0 0 0 9px rgba(255,202,91,.13),0 0 45px rgba(255,195,74,.28)!important}

/* Koleksiyonlar */
.collections-page-body{min-height:100vh;background:#061a2c;color:var(--text)}.collections-header{position:sticky;top:0}.collections-main{position:relative;z-index:2;width:min(1540px,calc(100% - 40px));margin:0 auto;padding:64px 0 80px}.collections-hero{display:grid;grid-template-columns:minmax(0,1fr) 280px;align-items:end;gap:40px;padding:38px 10px 48px}.collections-hero h1{max-width:900px;margin:16px 0;font-family:var(--display-font);font-size:clamp(46px,6vw,86px);line-height:.98;letter-spacing:-.045em}.collections-hero h1 em{color:#efba52;font-style:normal}.collections-hero p{max-width:680px;color:var(--muted);font-size:17px;line-height:1.65}.collections-live-stat{display:flex;flex-direction:column;align-items:flex-start;padding:22px;border:1px solid rgba(149,190,213,.18);border-radius:22px;background:rgba(9,36,55,.72)}.collections-live-stat strong{font-size:52px;color:#f3c462;line-height:1}.collections-live-stat span{margin-top:7px;font-weight:900}.collections-live-stat small{margin-top:6px;color:var(--muted);line-height:1.45}.collections-browser{display:grid;grid-template-columns:285px minmax(0,1fr);gap:20px;align-items:start}.collection-filter-panel,.collection-results-panel{border:1px solid rgba(149,190,213,.16);border-radius:24px;background:rgba(7,31,49,.82);box-shadow:0 22px 80px rgba(0,0,0,.18)}.collection-filter-panel{position:sticky;top:94px;padding:20px}.filter-panel-head{position:relative;margin-bottom:16px}.filter-panel-head h2{margin:4px 0 0}.filter-panel-head .text-action{position:absolute;right:0;top:0}.collection-search{margin-bottom:20px}.filter-group{display:grid;gap:9px;padding:16px 0;border-top:1px solid rgba(149,190,213,.12)}.filter-group>strong,.filter-group>label{color:#f2f7fa;font-size:13px;font-weight:900}.vertical-chips{display:grid;grid-template-columns:1fr 1fr;gap:6px}.vertical-chips .filter-chip{justify-content:center;margin:0;padding:9px 7px;font-size:12px}.collection-filter-panel select,.collection-results-head select{width:100%;min-height:44px;padding:0 40px 0 13px;border:1px solid rgba(149,190,213,.2);border-radius:12px;background:#0d2e45;color:#f5f9fb;font:800 13px/1 var(--font)}.compact-piece-selector{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}.compact-piece-selector button{height:40px;border:1px solid rgba(149,190,213,.18);border-radius:10px;background:#0d2e45;color:#d7e6ee;font-weight:900;cursor:pointer}.compact-piece-selector button.active{border-color:#f1b94d;background:#eeb74e;color:#071a28}.collection-results-panel{min-width:0;padding:20px}.collection-results-head{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px}.collection-results-head h2{margin:4px 0}.collection-results-head p{margin:3px 0 0;color:var(--muted)}.collection-results-head select{width:190px}.collection-showcase{display:grid;grid-template-columns:1.2fr .9fr .9fr;gap:12px;margin-bottom:22px}.collection-feature-card{position:relative;min-height:250px;overflow:hidden;border:1px solid rgba(149,190,213,.17);border-radius:20px;background:#0c293e;cursor:pointer}.collection-feature-card img{position:absolute;width:100%;height:100%;object-fit:cover}.collection-feature-card .featured-vignette{position:absolute;inset:0;background:linear-gradient(0deg,rgba(2,15,25,.94),rgba(2,15,25,.04) 70%)}.collection-feature-card>div:last-child{position:absolute;z-index:2;left:18px;right:18px;bottom:17px}.collection-feature-card h3{margin:8px 0 4px;font-family:var(--display-font);font-size:24px}.collection-feature-card p{margin:0 0 12px;color:#d7e6ee;font-size:12px}.collection-feature-card .rank{position:absolute;z-index:3;right:12px;top:12px;display:grid;place-items:center;width:35px;height:35px;border-radius:11px;background:#f0b84e;color:#071b2a;font-weight:950}.collection-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.compact-footer{width:min(1540px,calc(100% - 40px));margin:0 auto 24px}

@media(max-width:1180px){.collections-browser{grid-template-columns:240px minmax(0,1fr)}.collection-showcase{grid-template-columns:1fr 1fr}.collection-feature-card:first-child{grid-column:1/-1}.collection-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.selection-toolbar{top:76px}}
@media(max-width:820px){.selection-toolbar{left:10px;right:10px;top:72px;transform:none;overflow-x:auto;justify-content:flex-start}.selection-toolbar strong{position:sticky;left:0;background:rgba(4,24,40,.96)}.social-player{grid-template-columns:42px minmax(0,1fr)}.social-player-actions{grid-column:1/-1;justify-content:flex-end}.anti-spam-box{grid-template-columns:1fr}.anti-spam-box label{justify-self:start}.collections-main{width:min(100% - 24px,1540px);padding-top:28px}.collections-hero{grid-template-columns:1fr;padding:25px 0 32px}.collections-live-stat{width:100%}.collections-browser{grid-template-columns:1fr}.collection-filter-panel{position:static}.vertical-chips{grid-template-columns:repeat(3,1fr)}.collection-showcase{grid-template-columns:1fr}.collection-feature-card:first-child{grid-column:auto}.collection-grid{grid-template-columns:1fr 1fr}.collection-results-head{align-items:flex-start;flex-direction:column}.collection-results-head select{width:100%}.tutorial-actions{flex-direction:column-reverse}}
@media(max-width:560px){.collection-grid{grid-template-columns:1fr}.vertical-chips{grid-template-columns:1fr 1fr}.collections-hero h1{font-size:44px}.collections-live-stat strong{font-size:42px}.social-tabs{overflow-x:auto}.social-tabs button{min-width:120px}.selection-toolbar #selectionLeft,.selection-toolbar #selectionRight,.selection-toolbar #selectionUp,.selection-toolbar #selectionDown{min-width:42px}}
:root{--font:var(--sans);--display-font:var(--serif)}
.social-header-button{position:relative;display:inline-flex!important;align-items:center;gap:8px}.social-header-button>span{display:grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#27c982;color:#02170f;font-size:12px;font-weight:900}

/* V13 — Kullanıcının sağladığı koalalı yapbozoyna logosu */
.brand-full-logo{width:220px;height:72px;object-fit:contain;object-position:left center}
.game-brand .brand-full-logo{width:176px;height:60px}
.footer-brand .brand-full-logo{width:232px;height:92px}
.auth-full-logo{width:260px;height:102px;object-fit:contain;object-position:left center}
@media(max-width:820px){
  .brand-full-logo{width:166px;height:58px}
  .game-brand .brand-full-logo{width:138px;height:50px}
}


/* V14 — Çocuk Modu ve sıkı masa yerleşimi */
.kids-page-body{margin:0;min-height:100vh;background:#fff8e7;color:#18304a;font-family:var(--sans);background-image:radial-gradient(circle at 8% 18%,rgba(255,193,75,.2),transparent 28%),radial-gradient(circle at 88% 12%,rgba(90,198,210,.18),transparent 28%)}
.kids-header{height:82px;padding:0 clamp(18px,4vw,68px);display:flex;align-items:center;gap:34px;border-bottom:1px solid rgba(26,67,91,.1);background:rgba(255,251,239,.88);backdrop-filter:blur(16px);position:sticky;top:0;z-index:1000}.kids-brand{display:flex;align-items:center;gap:12px;text-decoration:none}.kids-brand img{width:190px;max-height:58px;object-fit:contain;padding:7px 10px;border-radius:14px;background:#17364d;box-shadow:0 8px 22px rgba(24,54,77,.13)}.kids-brand span{padding:7px 12px;border-radius:999px;background:#5ac6d1;color:#fff;font-size:12px;font-weight:950;letter-spacing:.08em;text-transform:uppercase;box-shadow:0 7px 18px rgba(46,174,189,.22)}.kids-header nav{display:flex;gap:8px;margin-left:auto}.kids-header nav a{padding:11px 14px;border-radius:12px;color:#536b7b;font-weight:850;text-decoration:none}.kids-header nav a:hover,.kids-header nav a.active{background:#fff;color:#18304a;box-shadow:0 8px 24px rgba(47,75,91,.08)}.kids-profile-button{border:0;border-radius:14px;padding:13px 18px;background:#173c59;color:#fff;font:900 13px/1 var(--sans);cursor:pointer}.kids-main{width:min(1440px,calc(100% - 36px));margin:0 auto;padding:36px 0 70px}.kids-hero{min-height:520px;padding:clamp(28px,5vw,70px);display:grid;grid-template-columns:minmax(0,1fr) minmax(380px,.9fr);align-items:center;gap:54px;border-radius:38px;background:linear-gradient(135deg,#fff1bd,#fffaf0 48%,#dff6f3);box-shadow:0 30px 80px rgba(72,89,92,.12);overflow:hidden;position:relative}.kids-eyebrow{display:inline-flex;padding:8px 12px;border-radius:999px;background:#fff;color:#d97924;font-size:11px;font-weight:950;letter-spacing:.13em}.kids-hero h1{font-family:var(--display);font-size:clamp(48px,6vw,84px);line-height:.94;margin:20px 0;color:#17364d}.kids-hero h1 em{font-style:normal;color:#e48c29}.kids-hero-copy>p{max-width:620px;font-size:18px;line-height:1.65;color:#5b7180}.kids-hero-actions{display:flex;gap:12px;margin-top:28px}.kids-hero-actions button,.kids-hero-actions a{min-height:52px;padding:0 22px;border-radius:16px;display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font:950 14px/1 var(--sans);cursor:pointer}.kids-hero-actions button{border:0;background:#ffb83e;color:#173047;box-shadow:0 13px 28px rgba(224,140,24,.25)}.kids-hero-actions a{border:2px solid rgba(25,64,86,.13);color:#244b61}.kids-safe-notes{display:flex;flex-wrap:wrap;gap:14px;margin-top:26px;color:#4b756d;font-size:12px;font-weight:850}.kids-hero-art{position:relative;min-height:400px;display:grid;place-items:center}.kids-hero-art img{width:min(100%,560px);aspect-ratio:1.15;object-fit:cover;border-radius:42% 58% 49% 51%/48% 43% 57% 52%;box-shadow:0 28px 70px rgba(28,75,91,.24);border:10px solid rgba(255,255,255,.78)}.kids-hero-art button{position:absolute;width:78px;height:78px;border:7px solid rgba(255,255,255,.75);border-radius:50%;background:#ffbb3e;color:#18354c;font-size:26px;cursor:pointer;box-shadow:0 18px 36px rgba(209,128,23,.28)}.kids-orbit{position:absolute;display:grid;place-items:center;border-radius:50%;font-size:24px;font-weight:900}.kids-orbit.one{width:62px;height:62px;background:#f27f68;color:#fff;left:2%;top:12%;transform:rotate(-12deg)}.kids-orbit.two{width:44px;height:44px;background:#56c9d1;color:#fff;right:3%;bottom:12%}.kids-category-section{padding:70px 0 30px}.kids-section-heading{display:flex;align-items:end;justify-content:space-between;gap:20px}.kids-section-heading span{color:#e18731;font-size:11px;font-weight:950;letter-spacing:.14em}.kids-section-heading h2{font-family:var(--display);font-size:clamp(35px,4vw,54px);margin:8px 0 0;color:#17364d}.kids-section-heading>strong{color:#627986}.kids-category-tabs{display:flex;gap:10px;overflow:auto;padding:24px 2px 14px}.kids-category-tabs button{min-width:max-content;padding:12px 16px;border:1px solid rgba(30,75,99,.11);border-radius:16px;background:#fff;color:#526b79;font:900 13px/1 var(--sans);cursor:pointer;box-shadow:0 9px 24px rgba(51,84,98,.06)}.kids-category-tabs button span{font-size:18px;margin-right:7px}.kids-category-tabs button.active{background:#173d59;color:#fff;transform:translateY(-2px)}.kids-toolbar{display:grid;grid-template-columns:minmax(240px,1fr) auto 180px;gap:14px;padding:18px;border-radius:22px;background:#fff;box-shadow:0 16px 44px rgba(52,78,91,.08)}.kids-toolbar>label{display:flex;align-items:center;gap:10px;padding:0 15px;border-radius:14px;background:#f4f8f5}.kids-toolbar input{width:100%;border:0;background:transparent;outline:0;font:750 14px var(--sans);color:#18364c}.kids-piece-picker{display:flex;gap:7px}.kids-piece-picker button{min-width:70px;border:0;border-radius:13px;background:#f2f6f4;color:#526b79;cursor:pointer}.kids-piece-picker button strong,.kids-piece-picker button small{display:block}.kids-piece-picker button.active{background:#ffbd45;color:#18354b}.kids-toolbar select{border:0;border-radius:14px;background:#f2f6f4;padding:0 15px;color:#18364c;font:850 13px var(--sans)}.kids-puzzle-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin-top:26px}.kids-puzzle-card{padding:12px 12px 17px;border-radius:24px;background:#fff;box-shadow:0 16px 44px rgba(41,77,94,.1);cursor:pointer;transition:.2s ease}.kids-puzzle-card:hover{transform:translateY(-6px);box-shadow:0 24px 54px rgba(41,77,94,.15)}.kids-puzzle-card>div{position:relative;aspect-ratio:1.25;overflow:hidden;border-radius:18px}.kids-puzzle-card img{width:100%;height:100%;object-fit:cover}.kids-puzzle-card>div>span{position:absolute;left:10px;top:10px;padding:7px 10px;border-radius:999px;background:rgba(255,255,255,.9);color:#245066;font-size:10px;font-weight:950}.kids-puzzle-card>div>button{position:absolute;right:11px;bottom:11px;width:48px;height:48px;border:0;border-radius:50%;background:#ffbc43;color:#17364d;font-size:18px;cursor:pointer;box-shadow:0 9px 22px rgba(61,52,22,.2)}.kids-puzzle-card h3{margin:15px 5px 7px;font-size:18px;color:#17364d}.kids-puzzle-card p{display:flex;justify-content:space-between;gap:8px;margin:0 5px;color:#738692;font-size:11px;font-weight:800}.kids-empty{padding:60px;text-align:center;border:2px dashed rgba(25,72,96,.15);border-radius:25px;margin-top:24px}.kids-parent-note{margin-top:50px;padding:34px 40px;border-radius:28px;background:#173c59;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:30px}.kids-parent-note div{display:grid;grid-template-columns:auto 1fr;gap:5px 15px}.kids-parent-note div>span{grid-row:1/3;font-size:32px;color:#ffbf48}.kids-parent-note h2{margin:0;font-family:var(--display);font-size:28px}.kids-parent-note p{margin:0;color:#b9d0dc}.kids-parent-note a{min-width:max-content;color:#ffce71;font-weight:900;text-decoration:none}.kids-footer{padding:28px clamp(18px,4vw,68px);display:flex;align-items:center;justify-content:space-between;background:#fff}.kids-footer .kids-brand img{width:160px}.kids-footer p{color:#71848e}.kids-game-mode .game-header{background:linear-gradient(90deg,#173d59,#20556c)}.kids-game-mode .game-header-left::after{content:'ÇOCUK';margin-left:8px;padding:5px 8px;border-radius:999px;background:#58c9d1;color:#fff;font-size:9px;font-weight:950;letter-spacing:.1em}.kids-game-mode .game-bottom-bar{background:#fff8e5;color:#18364c}.kids-game-mode .game-bottom-bar small{color:#607986}.kids-game-mode .game-workspace{background:radial-gradient(circle at 50% 40%,#285d72,#123d57 52%,#092d43)}
@media(max-width:980px){.kids-header nav{display:none}.kids-hero{grid-template-columns:1fr}.kids-hero-art{min-height:330px}.kids-puzzle-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.kids-toolbar{grid-template-columns:1fr}.kids-piece-picker{justify-content:flex-start}.kids-parent-note{align-items:flex-start;flex-direction:column}}
@media(max-width:600px){.kids-header{height:70px;padding:0 14px}.kids-brand img{width:138px}.kids-brand span{font-size:9px;padding:6px 8px}.kids-main{width:min(100% - 20px,1440px);padding-top:12px}.kids-hero{padding:26px 20px;border-radius:25px;min-height:0}.kids-hero h1{font-size:45px}.kids-hero-copy>p{font-size:15px}.kids-hero-art{min-height:260px}.kids-hero-art button{width:64px;height:64px}.kids-puzzle-grid{grid-template-columns:1fr}.kids-section-heading{align-items:flex-start;flex-direction:column}.kids-toolbar{padding:12px}.kids-parent-note{padding:27px 22px}.kids-footer{flex-direction:column;gap:12px}}

/* v1.2.0 — clearer membership and social request states */
.social-request-group{display:grid;gap:4px;margin-top:14px}.social-request-group+h3{margin-top:18px}.social-request-group h3{margin:0;color:#dbe8ef;font-size:12px;font-weight:900;letter-spacing:.04em;text-transform:uppercase}.social-request-group .social-list{margin-top:6px;min-height:88px}.social-header-button.has-requests{border-color:rgba(242,184,74,.55)!important;color:#ffd477!important}.social-header-button>span.has-requests,.social-header-button.has-requests>span{background:#f2be58;color:#071b28;box-shadow:0 0 0 4px rgba(242,190,88,.13)}
@media(max-width:640px){.social-player{grid-template-columns:40px minmax(0,1fr)}.social-player-actions{grid-column:1/-1;justify-content:flex-end}.social-action{flex:1}.social-action.icon{flex:0 0 36px}}


/* ========================================================================== */
/* v1.3.0 — guest privacy, refined logo and mobile play workspace              */
/* ========================================================================== */
.brand-full-logo{width:176px;height:56px}
.game-brand .brand-full-logo{width:142px;height:48px}
.footer-brand .brand-full-logo{width:196px;height:76px}
.experience-cards.guest-layout{grid-template-columns:repeat(2,minmax(0,1fr))}

@media(max-width:1020px){
  .experience-cards.guest-layout{grid-template-columns:1fr}
}

@media(max-width:820px){
  html,body.game-open{height:100%;overflow:hidden;overscroll-behavior:none}
  .site-header{padding-inline:12px}
  .brand-full-logo{width:126px;height:44px}

  .game-view{height:100dvh;min-height:100dvh;overflow:hidden}
  .game-header{
    position:relative;top:auto;height:calc(58px + env(safe-area-inset-top));min-height:calc(58px + env(safe-area-inset-top));
    padding:env(safe-area-inset-top) 9px 0;gap:7px;flex:0 0 auto
  }
  .game-header-left{flex:1;min-width:0;gap:7px;overflow:hidden}
  .game-brand{flex:0 0 auto;padding:0;border:0}
  .game-brand .brand-full-logo{width:102px;height:40px}
  .game-back{
    flex:0 1 auto;min-width:50px;max-width:84px;height:38px;padding:0 8px;overflow:hidden;
    border:1px solid rgba(172,207,228,.14);border-radius:11px;background:rgba(255,255,255,.035);
    white-space:nowrap;text-overflow:ellipsis;font-size:0
  }
  .game-back::after{content:'← Çık';font-size:12px;font-weight:850}
  .game-header-actions{flex:0 0 auto;gap:5px}
  .game-header-actions .game-action,#fullscreenButton{display:none!important}
  .profile-button{width:38px;height:38px;flex:0 0 38px}

  .game-shell{height:calc(100dvh - 58px - env(safe-area-inset-top));min-height:0;overflow:hidden;padding:0}
  .workspace-panel,.game-workspace{height:100%;min-height:0}
  .game-workspace{border-radius:0;background:radial-gradient(circle at 50% 31%,#173f5c 0%,#0a2a41 47%,#041522 100%)}

  .workspace-hud{
    top:8px;left:8px;right:8px;min-height:52px;height:52px;padding:4px;gap:4px;
    display:grid;grid-template-columns:minmax(72px,1fr) minmax(68px,.9fr) 38px 50px 38px;
    align-items:stretch;border-radius:14px
  }
  .workspace-hud .hud-stat:nth-of-type(3),.workspace-hud .hud-spacer,#panButton,#referenceBoardButton{display:none!important}
  .hud-stat{min-width:0;min-height:42px;padding:4px 9px;border-radius:10px}
  .hud-stat span{font-size:7px;letter-spacing:.08em}
  .hud-stat strong{font-size:14px;line-height:1.05}
  .hud-button,.hud-button.icon-only,.hud-button.zoom-readout{min-width:0;width:auto;min-height:42px;height:42px;padding:0;border-radius:10px}
  .hud-button.icon-only{font-size:19px}
  .hud-button.zoom-readout{font-size:10px}

  .game-shell{--tray-height:166px}
  .game-shell.tray-two-rows{--tray-height:252px}
  .piece-tray{
    left:8px;right:8px;bottom:calc(8px + env(safe-area-inset-bottom));height:var(--tray-height);
    grid-template-rows:46px 36px minmax(82px,1fr);border-radius:16px
  }
  .game-workspace.tray-two-rows .piece-tray{height:var(--tray-height);grid-template-rows:46px 36px minmax(168px,1fr)}
  .tray-header{min-height:46px;height:46px;padding:5px 6px 5px 11px;gap:6px}
  .tray-title{min-width:0;flex:1;overflow:hidden}
  .tray-kicker{font-size:8px}
  .tray-header strong{font-size:13px;white-space:nowrap}
  .tray-title small,.tray-header #spreadPiecesButton,.tray-header #dockGatherButton,.tray-header .piece-size-control{display:none!important}
  .tray-header>.tray-actions{width:auto;height:34px;flex:0 0 auto;gap:5px}
  .tray-header .tray-collapse{display:grid;place-items:center;width:34px;min-width:34px;height:34px;min-height:34px;transform:none!important}
  .tray-row-switch{width:78px;height:34px;grid-template-columns:repeat(2,1fr);padding:2px;writing-mode:horizontal-tb!important;transform:none!important}
  .tray-row-switch button{min-width:0;min-height:28px;height:28px;padding:0 4px;font-size:8px;line-height:1;white-space:nowrap;writing-mode:horizontal-tb!important;transform:none!important}
  .tray-tabs{min-height:36px;height:36px;padding:3px 98px 3px 6px;gap:4px}
  .tray-tab{height:30px;padding:0 9px;font-size:10px;border-radius:9px}
  .tray-navigation{top:49px;right:6px;min-height:30px;height:30px;gap:4px;padding:0 2px;border-radius:9px}
  .tray-navigation button{width:28px;height:28px;font-size:18px}
  .tray-navigation span{font-size:8px;white-space:nowrap}
  .tray-pieces-layer{min-height:82px;overflow:hidden}
  .game-workspace.tray-two-rows .tray-pieces-layer{min-height:168px}

  .play-tools{
    top:auto;left:8px;right:8px;bottom:calc(var(--tray-height) + 16px + env(safe-area-inset-bottom));
    width:auto;height:58px;max-width:none;padding:4px;gap:3px;display:flex;flex-direction:row;
    justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-snap-type:x proximity;border-radius:14px
  }
  .play-tools::-webkit-scrollbar{display:none}
  .play-tool,.play-tool:nth-child(4),.play-tool:nth-child(5){
    display:flex;flex:0 0 56px;width:56px;min-width:56px;min-height:48px;height:48px;padding:3px 2px;scroll-snap-align:start
  }
  .play-tool span{font-size:16px}
  .game-view .play-tool strong{font-size:8.5px;line-height:1.05;text-align:center}
  .play-tool small{top:2px;right:2px;width:17px;height:17px;font-size:8px}
  .game-workspace.tray-collapsed .play-tools{bottom:calc(8px + env(safe-area-inset-bottom))}

  .game-side{display:none!important}
  .hand-hint{top:66px;left:8px;width:calc(100% - 16px);min-width:0;transform:none;grid-template-columns:28px 1fr 30px}
  .selection-toolbar{top:66px;left:8px;right:8px;transform:none;max-width:none;overflow-x:auto;justify-content:flex-start}
  .selection-toolbar strong{position:sticky;left:0;background:rgba(4,24,40,.97)}
  .game-workspace.table-mode::before{left:10px;top:68px}
  .tray-reopen{right:8px;bottom:calc(8px + env(safe-area-inset-bottom));min-width:160px;height:44px}

  body.game-open .toast-region{top:calc(66px + env(safe-area-inset-top));right:10px;bottom:auto;left:10px}
  body.game-open .toast{min-width:0;max-width:none;width:100%;padding:10px 12px;font-size:12px;text-align:center}
}

@media(max-width:390px){
  .game-brand .brand-full-logo{width:94px;height:38px}
  .game-back{max-width:68px;padding-inline:6px}
  .workspace-hud{grid-template-columns:minmax(66px,1fr) minmax(62px,.85fr) 36px 46px 36px}
  .hud-stat{padding-inline:7px}
  .tray-row-switch{width:70px}
  .play-tool,.play-tool:nth-child(4),.play-tool:nth-child(5){flex-basis:52px;width:52px;min-width:52px}
}

/* v1.3.0 mobile specificity follow-up */
@media(max-width:820px){
  .hud-button.zoom-readout span{font-size:10px!important}
  .game-workspace.tray-two-rows .play-tools{bottom:calc(var(--tray-height) + 16px + env(safe-area-inset-bottom))}
  .kids-game-mode .game-header-left::after{display:none}
}

/* v1.4.0 — kesin misafir gizliliği, iki kişilik oda kuralları ve kontrollü masa dağılımı */
.social-header-button[hidden],
#mobileFriends[hidden],
#inviteGameButton[hidden],
#collabExperienceCard[hidden],
#multiplayerGameCard[hidden] { display: none !important; }
body:not(.member-signed-in) .social-header-button,
body:not(.member-signed-in) #mobileFriends,
body:not(.member-signed-in) #inviteGameButton,
body:not(.member-signed-in) #collabExperienceCard,
body:not(.member-signed-in) #multiplayerGameCard { display: none !important; }
.puzzle-piece.table-scattered { transform-origin: top left !important; }
.room-rules { display:grid; gap:7px; margin:14px 0 4px; padding:12px 14px; border:1px solid rgba(116,180,209,.18); border-radius:14px; background:rgba(5,25,40,.58); color:#b8ceda; font-size:11px; line-height:1.5; }
.room-rules strong { color:#f4c866; font-size:12px; }
.room-rules span { display:flex; gap:7px; align-items:flex-start; }
.room-rules span::before { content:'•'; color:#55dba7; font-weight:900; }
.primary-room-button:disabled,
.social-action:disabled { cursor:not-allowed; opacity:.58; }

/* Privacy-first analytics consent */
.yo-analytics-consent{position:fixed;z-index:99999;left:max(16px,env(safe-area-inset-left));right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));max-width:780px;margin:auto;padding:15px 16px;border:1px solid rgba(255,255,255,.15);border-radius:18px;background:rgba(5,24,39,.97);box-shadow:0 18px 60px rgba(0,0,0,.38);display:flex;align-items:center;justify-content:space-between;gap:18px;color:#eef6fb;backdrop-filter:blur(18px)}
.yo-analytics-consent[hidden]{display:none!important}.yo-analytics-consent>div:first-child{display:grid;gap:4px}.yo-analytics-consent strong{font-size:14px}.yo-analytics-consent span{font-size:12px;line-height:1.45;color:#c4d4df}.yo-analytics-consent a{font-size:12px;color:#ffc44d}.yo-analytics-actions{display:flex;gap:8px;flex:0 0 auto}.yo-analytics-actions button{border:1px solid rgba(255,255,255,.18);border-radius:12px;padding:9px 12px;background:transparent;color:#eef6fb;font:inherit;font-size:12px;font-weight:800;cursor:pointer}.yo-analytics-actions button.primary{background:#ffc44d;border-color:#ffc44d;color:#142331}
.newsletter form{height:auto!important;border:0!important;border-radius:0!important;overflow:visible!important;display:grid!important;gap:8px}.newsletter-row{display:flex;height:45px;border:1px solid var(--line);border-radius:12px;overflow:hidden}.newsletter-row input{flex:1;min-width:0;border:0;background:rgba(255,255,255,.035);color:#fff;padding:0 13px;outline:0}.newsletter-row button{width:48px;border:0;background:var(--gold);color:#13212b;cursor:pointer}.newsletter-consent{display:flex;align-items:flex-start;gap:7px;font-size:11px;line-height:1.4;color:var(--muted)}.newsletter-consent input{width:auto!important;flex:0 0 auto;margin-top:2px;accent-color:var(--gold)}.newsletter-consent a{display:inline!important;margin:0!important;color:var(--gold)!important;font-size:inherit!important}.newsletter-feedback{min-height:16px;font-size:11px;color:var(--muted)}
@media(max-width:640px){.yo-analytics-consent{align-items:stretch;flex-direction:column}.yo-analytics-actions{width:100%}.yo-analytics-actions button{flex:1}}

.footer-link-button{display:block;margin:7px 0;padding:0;border:0;background:transparent;color:var(--muted);font:inherit;font-size:13px;text-align:left;cursor:pointer}.footer-link-button:hover{color:#fff}

/* SEO discovery links: visible, crawlable internal links to clean puzzle landing pages. */
.yo-seo-discovery{width:min(1180px,calc(100% - 40px));margin:34px auto 50px;padding:28px;border:1px solid rgba(128,169,195,.18);border-radius:24px;background:rgba(7,34,53,.72)}
.yo-seo-discovery-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:18px}.yo-seo-discovery-head span{font-size:11px;font-weight:800;letter-spacing:.15em;color:#79a9c8}.yo-seo-discovery-head h2{margin:4px 0 0;font-size:clamp(24px,3vw,34px);color:#f5fbff}.yo-seo-link-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.yo-seo-link-card{display:flex;align-items:center;gap:12px;padding:10px;border:1px solid rgba(142,181,205,.16);border-radius:16px;background:rgba(255,255,255,.035);color:#eef7fc;text-decoration:none;min-width:0;transition:transform .18s ease,border-color .18s ease,background .18s ease}.yo-seo-link-card:hover{transform:translateY(-2px);border-color:rgba(255,196,77,.55);background:rgba(255,255,255,.065)}.yo-seo-link-card img{width:62px;height:48px;object-fit:cover;border-radius:11px;flex:0 0 auto}.yo-seo-link-card span{display:grid;min-width:0}.yo-seo-link-card strong{font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.yo-seo-link-card small{font-size:11px;color:#9fb7c7;margin-top:4px}.yo-seo-all-link{display:inline-flex;margin-top:18px;color:#ffd06b;text-decoration:none;font-weight:800}.kids-page-body .yo-seo-discovery{background:#fff7e7;border-color:#efdcae}.kids-page-body .yo-seo-discovery-head span{color:#b8772d}.kids-page-body .yo-seo-discovery-head h2,.kids-page-body .yo-seo-link-card{color:#243548}.kids-page-body .yo-seo-link-card{background:#fff;border-color:#ecdcb7}.kids-page-body .yo-seo-link-card small{color:#687889}.kids-page-body .yo-seo-all-link{color:#b16618}
@media(max-width:900px){.yo-seo-link-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.yo-seo-discovery{width:calc(100% - 24px);padding:20px;margin:24px auto 34px}.yo-seo-link-grid{grid-template-columns:1fr}.yo-seo-link-card img{width:70px;height:54px}}
/* v1.8 legal links */
.terms-check a{color:var(--gold);text-decoration:underline;text-underline-offset:2px}.terms-check a:hover{color:#ffe09a}

/* ========================================================================== */
/* v1.9.0 — responsive polish, mobile play performance, ranking & challenge   */
/* ========================================================================== */

/* Public typography: bounded sizes and safe wrapping across cards/dialogs. */
body{font-size:16px;line-height:1.5}
button,input,select,textarea{font:inherit}
.button,.nav-link,.text-action,.play-tool,.tray-action,.tray-tab,.hud-button,.social-action,.auth-tabs button,.profile-tabs button{line-height:1.18}
.button,.nav-link,.text-action,.panel-heading h2,.section-heading h2,.experience-card h2,.featured-content h2,.puzzle-card h3,.modal-heading h2,.auth-heading h2,.profile-head h2{overflow-wrap:anywhere}
.site-header,.header-actions,.desktop-nav,.panel-heading,.section-heading,.library-tools,.hero-buttons,.hero-benefits,.profile-head,.modal-card{min-width:0}
.site-header .button.compact,.site-header .nav-link{font-size:clamp(11px,.78vw,13px)}
.hero-copy h1{font-size:clamp(42px,5.8vw,82px);line-height:.96}
.hero-copy>p{font-size:clamp(15px,1.35vw,19px);line-height:1.6}
.experience-card h2{font-size:clamp(25px,2.3vw,38px);line-height:1.04}
.experience-card p{font-size:clamp(12px,1vw,15px);line-height:1.5}
.panel-heading h2,.section-heading h2{font-size:clamp(24px,2.5vw,36px);line-height:1.08}
.puzzle-card h3{font-size:clamp(14px,1.2vw,18px);line-height:1.18}
.modal-heading h2,.auth-heading h2{font-size:clamp(23px,3vw,34px);line-height:1.05}

/* v1.4 hid this marketing card for guests. The social controls remain hidden,
   but the homepage's Together card is intentionally visible to everyone. */
body:not(.member-signed-in) #collabExperienceCard{display:block!important}

.admin-online-badge{display:inline-flex;align-items:center;gap:5px;min-height:32px;padding:0 9px;border:1px solid rgba(83,221,164,.18);border-radius:999px;background:rgba(83,221,164,.07);color:#87e8bf;font-size:10px;font-weight:900;white-space:nowrap}
.admin-online-badge[hidden]{display:none!important}.admin-online-badge::first-letter{color:#52dba3}

/* Homepage blocks added in v1.9. */
.community-collections-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.7fr);gap:18px;margin:22px 0}.community-collections-grid>.most-played-panel{grid-column:1/-1}.community-note{margin:12px 0 0;color:var(--muted);font-size:12px;line-height:1.5}
.weekly-challenge-section{margin:24px 0}.weekly-challenge-card{position:relative;min-height:440px;overflow:hidden;border:1px solid rgba(244,182,79,.24);border-radius:30px;background:#071e30;box-shadow:0 25px 70px rgba(0,0,0,.25)}.weekly-challenge-card>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.weekly-challenge-overlay{position:absolute;inset:0;background:linear-gradient(90deg,rgba(3,16,26,.93) 0%,rgba(3,16,26,.72) 42%,rgba(3,16,26,.2) 78%,rgba(3,16,26,.05))}.weekly-challenge-copy{position:relative;z-index:2;width:min(650px,72%);min-height:440px;padding:clamp(30px,5vw,68px);display:flex;flex-direction:column;justify-content:center;align-items:flex-start}.weekly-challenge-copy h2{margin:17px 0 12px;font-family:var(--display);font-size:clamp(36px,5vw,65px);line-height:.96}.weekly-challenge-copy>p{margin:0;max-width:580px;color:#c8d8e3;font-size:clamp(14px,1.25vw,18px);line-height:1.6}.weekly-challenge-meta{display:flex;flex-wrap:wrap;gap:8px;margin:22px 0}.weekly-challenge-meta span{padding:7px 10px;border:1px solid rgba(255,255,255,.15);border-radius:999px;background:rgba(4,21,34,.58);font-size:11px;font-weight:850}.weekly-challenge-copy .button{margin-top:4px}

/* Image-first picker: collection filters + search, then piece-count chooser. */
.picker-card{width:min(1120px,calc(100vw - 28px));max-height:min(92dvh,900px);overflow:auto;padding:clamp(18px,3vw,30px)}
.picker-toolbar{display:flex;align-items:center;gap:10px;margin:14px 0 8px}.picker-toolbar .search-field{flex:1;min-width:0}.picker-filter-chips{display:flex;gap:7px;overflow-x:auto;padding:4px 1px 10px;scrollbar-width:none}.picker-filter-chips::-webkit-scrollbar{display:none}.picker-filter-chips button{flex:0 0 auto;min-height:36px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:rgba(255,255,255,.025);color:var(--muted);font-weight:850;cursor:pointer}.picker-filter-chips button.active{border-color:rgba(244,182,79,.55);background:rgba(244,182,79,.12);color:var(--gold-2)}
.selected-puzzle-preview{display:grid;grid-template-columns:180px minmax(0,1fr);gap:18px;align-items:center;margin:14px 0 18px;padding:13px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.025)}.selected-puzzle-preview img{width:180px;aspect-ratio:4/3;object-fit:cover;border-radius:13px}.selected-puzzle-preview h3{margin:0 0 5px;font-size:clamp(20px,2.2vw,28px)}.selected-puzzle-preview p{margin:0;color:var(--muted);font-size:12px}.picker-back{margin-bottom:10px}

/* Ranking / badges page. */
.ranking-page-body{margin:0;min-height:100vh;background:radial-gradient(circle at 15% 2%,rgba(26,73,101,.42),transparent 30%),#041522;color:var(--text);font-family:var(--sans)}
.ranking-header{position:sticky;top:0;z-index:1000;min-height:74px;padding:9px clamp(18px,4vw,64px);display:flex;align-items:center;gap:26px;border-bottom:1px solid var(--line);background:rgba(4,21,34,.9);backdrop-filter:blur(18px)}.ranking-header .brand-full-logo{width:150px;height:48px}.ranking-header nav{display:flex;align-items:center;gap:6px;margin-left:auto}.ranking-header nav a{padding:9px 11px;border-radius:10px;color:var(--muted);font-size:12px;font-weight:850;text-decoration:none}.ranking-header nav a.active,.ranking-header nav a:hover{background:rgba(255,255,255,.05);color:#fff}.ranking-main{width:min(1440px,calc(100% - 36px));margin:auto;padding:34px 0 70px}.ranking-hero{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(310px,.62fr);gap:22px;padding:clamp(28px,5vw,68px);border:1px solid rgba(244,182,79,.18);border-radius:30px;background:linear-gradient(135deg,rgba(15,50,73,.98),rgba(5,24,39,.96));overflow:hidden}.ranking-hero h1{margin:10px 0 14px;font-family:var(--display);font-size:clamp(45px,6vw,78px);line-height:.94}.ranking-hero h1 em{font-style:normal;color:var(--gold)}.ranking-hero>div>p{max-width:700px;margin:0;color:#b8cad6;font-size:clamp(15px,1.3vw,18px);line-height:1.62}.ranking-hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:25px}.ranking-rules{padding:20px;border:1px solid rgba(255,255,255,.1);border-radius:20px;background:rgba(0,10,18,.28)}.ranking-rules>span{font-size:10px;font-weight:900;letter-spacing:.14em;color:#7fa3b8}.ranking-rules ol{list-style:none;margin:14px 0 0;padding:0;display:grid;gap:11px}.ranking-rules li{display:grid;grid-template-columns:34px 1fr;gap:10px;align-items:start}.ranking-rules li>b{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:rgba(244,182,79,.14);color:var(--gold)}.ranking-rules p{margin:0}.ranking-rules strong,.ranking-rules small{display:block}.ranking-rules small{margin-top:3px;color:var(--muted);font-size:11px;line-height:1.4}
.ranking-board-panel,.badge-system-panel{margin-top:20px;padding:clamp(18px,2.5vw,28px);border:1px solid var(--line);border-radius:25px;background:rgba(7,31,49,.78)}.ranking-section-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:17px}.ranking-section-head h2{margin:4px 0 4px;font-size:clamp(27px,3vw,40px)}.ranking-section-head p{margin:0;color:var(--muted);font-size:12px}.ranking-table-wrap{max-height:none;overflow:auto;border:1px solid rgba(172,207,228,.1);border-radius:17px}.ranking-table-head,.ranking-row{display:grid;grid-template-columns:52px minmax(180px,1.05fr) 76px 125px 92px minmax(220px,1.25fr) minmax(170px,.95fr);align-items:center;gap:10px;min-width:1000px}.ranking-table-head{position:sticky;top:0;z-index:2;padding:10px 13px;background:#08243a;color:#7895a7;font-size:9px;font-weight:900;letter-spacing:.07em;text-transform:uppercase}.ranking-row{padding:12px 13px;border-top:1px solid rgba(172,207,228,.08);background:rgba(255,255,255,.012)}.ranking-row.podium{background:rgba(244,182,79,.035)}.ranking-position{font-size:18px}.ranking-player{display:flex;align-items:center;gap:9px;min-width:0}.ranking-avatar{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;border-radius:12px;background:linear-gradient(145deg,#efc05f,#997039);color:#061a27;font-weight:950}.ranking-player p,.ranking-week,.ranking-last{margin:0;min-width:0}.ranking-player strong,.ranking-player small,.ranking-week strong,.ranking-week small,.ranking-last strong,.ranking-last small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ranking-player strong{font-size:12px}.ranking-player small,.ranking-week small,.ranking-last small{margin-top:3px;color:var(--muted);font-size:9px}.ranking-level{display:inline-flex;width:max-content;padding:5px 7px;border-radius:999px;background:rgba(83,221,164,.1);color:#78dfb5;font-size:10px}.ranking-week strong,.ranking-last strong{font-size:11px}.ranking-badges{display:flex;flex-wrap:wrap;gap:4px}.ranking-badges span{display:inline-flex;max-width:100%;gap:4px;padding:4px 6px;border-radius:999px;background:rgba(244,182,79,.08);font-size:10px}.ranking-badges i{max-width:88px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#d8c9a7;font-style:normal;font-size:8px}.ranking-badges small{color:var(--muted);font-size:9px}.badge-catalog{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px}.badge-catalog-card{display:flex;align-items:flex-start;gap:11px;padding:14px;border:1px solid rgba(172,207,228,.1);border-radius:15px;background:rgba(255,255,255,.025)}.badge-catalog-card>span{font-size:24px}.badge-catalog-card h3{margin:1px 0 4px;font-size:13px}.badge-catalog-card p{margin:0;color:var(--muted);font-size:10px;line-height:1.45}.ranking-tip{display:flex;align-items:center;gap:14px;margin-top:20px;padding:18px 20px;border:1px solid rgba(244,182,79,.24);border-radius:20px;background:rgba(244,182,79,.06)}.ranking-tip>span{font-size:28px}.ranking-tip>div{flex:1}.ranking-tip strong{font-size:14px}.ranking-tip p{margin:4px 0 0;color:#a9becb;font-size:11px;line-height:1.45}.ranking-footer{display:flex;align-items:center;gap:18px;padding:24px clamp(18px,4vw,64px);border-top:1px solid var(--line);background:#03111d}.ranking-footer .brand-full-logo{width:128px;height:42px}.ranking-footer p{margin-right:auto;color:var(--muted);font-size:11px}.ranking-footer a{color:var(--muted);font-size:11px;text-decoration:none}

/* Kids image-first count chooser. */
.kids-piece-dialog{padding:0;border:0;background:transparent;color:#18304a}.kids-piece-dialog::backdrop{background:rgba(9,30,43,.68);backdrop-filter:blur(7px)}.kids-piece-modal-card{position:relative;width:min(760px,calc(100vw - 24px));display:grid;grid-template-columns:minmax(250px,.9fr) minmax(300px,1.1fr);gap:22px;padding:20px;border-radius:28px;background:#fffaf0;box-shadow:0 35px 100px rgba(14,46,61,.35)}.kids-piece-preview img{width:100%;height:100%;min-height:330px;object-fit:cover;border-radius:20px}.kids-piece-choice{display:flex;flex-direction:column;justify-content:center}.kids-piece-choice h2{margin:10px 0 6px;font-family:var(--display);font-size:clamp(30px,4vw,48px);line-height:.98;color:#17364d}.kids-piece-choice>p{margin:0;color:#617782}.kids-piece-options{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:20px 0 12px}.kids-piece-options button{min-width:0;padding:14px 8px;border:1px solid rgba(25,66,89,.1);border-radius:16px;background:#fff;color:#18364c;cursor:pointer;box-shadow:0 8px 22px rgba(41,77,94,.06)}.kids-piece-options button:hover{border-color:#efad37;transform:translateY(-2px)}.kids-piece-options strong,.kids-piece-options small{display:block}.kids-piece-options strong{font-size:25px}.kids-piece-options small{margin-top:4px;color:#6f8490;font-size:9px}.kids-piece-hint{color:#7c8d95;line-height:1.45}

.remote-player-cursor{position:absolute;z-index:99998;pointer-events:none;display:grid;grid-template-columns:26px max-content;grid-template-rows:auto auto;align-items:center;column-gap:6px;transform:translate(-10px,-10px);padding:5px 8px 5px 5px;border:1px solid rgba(85,219,167,.45);border-radius:999px;background:rgba(5,28,43,.92);box-shadow:0 10px 30px rgba(0,0,0,.35);transition:left .18s linear,top .18s linear}.remote-player-cursor[hidden]{display:none!important}.remote-cursor-avatar{grid-row:1/3;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#57dba9;color:#082117;font-size:9px;font-weight:950}.remote-player-cursor strong{font-size:9px;line-height:1.1}.remote-player-cursor small{color:#99b8c8;font-size:7px;line-height:1.1}
.puzzle-piece.remote-dragging{outline:2px solid rgba(87,219,169,.9);outline-offset:2px;filter:drop-shadow(0 0 7px rgba(87,219,169,.72))!important}

/* Legal content inserted into real WordPress Pages. */
.yo-legal-text{font-size:16px;line-height:1.72}.yo-legal-text h2{margin:30px 0 10px;font-size:clamp(21px,2.2vw,29px);line-height:1.15}.yo-legal-text h3{margin:22px 0 8px;font-size:18px}.yo-legal-text p,.yo-legal-text li{overflow-wrap:anywhere}.yo-legal-text ul,.yo-legal-text ol{padding-left:22px}

@media(max-width:1050px){
  .community-collections-grid{grid-template-columns:1fr}.community-collections-grid>.most-played-panel{grid-column:auto}.badge-catalog{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ranking-hero{grid-template-columns:1fr}.ranking-rules{max-width:720px}
}

@media(max-width:820px){
  /* Keep body stable, but let the game itself scroll vertically. This fixes
     Safari/Chrome mobile freezes caused by a fully locked viewport. */
  html,body.game-open{height:100%;overflow:hidden!important;overscroll-behavior:none}
  .game-view{height:100dvh!important;min-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-y:contain;touch-action:pan-y}
  .game-shell{height:auto!important;min-height:calc(100dvh - 58px - env(safe-area-inset-top))!important;overflow:visible!important}
  .workspace-panel{height:auto!important;min-height:0!important;overflow:visible!important}
  .game-workspace{height:calc(100dvh - 58px - env(safe-area-inset-top))!important;min-height:700px!important;overflow:hidden!important;touch-action:pan-y!important;contain:layout paint}
  .board-stage{touch-action:pan-y}.board-stage.pan-active,.board-stage.panning{touch-action:none!important}
  .puzzle-piece{touch-action:none!important;filter:none!important;will-change:auto!important;transition:none!important}.puzzle-piece.dragging,.puzzle-piece.held,.puzzle-piece.snap-ready{will-change:transform,left,top!important}.puzzle-piece:hover{filter:none!important;transform:none!important}
  .game-workspace,.workspace-hud,.piece-tray,.play-tools,.yo-analytics-consent{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
  .tray-pieces-layer{contain:layout paint;transform:translateZ(0)}
  .game-shell{--tray-height:158px}.game-shell.tray-two-rows{--tray-height:236px}
  .piece-tray{left:0!important;right:0!important;bottom:0!important;height:calc(var(--tray-height) + env(safe-area-inset-bottom))!important;border-left:0!important;border-right:0!important;border-bottom:0!important;border-radius:18px 18px 0 0!important;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -16px 38px rgba(0,0,0,.28)}
  .game-workspace.tray-two-rows .piece-tray{height:calc(var(--tray-height) + env(safe-area-inset-bottom))!important}
  .play-tools{left:6px!important;right:6px!important;bottom:calc(var(--tray-height) + env(safe-area-inset-bottom) + 7px)!important;height:54px!important;border-radius:13px!important}
  .game-workspace.tray-two-rows .play-tools{bottom:calc(var(--tray-height) + env(safe-area-inset-bottom) + 7px)!important}
  .game-workspace.tray-collapsed .play-tools{bottom:6px!important}
  .tray-reopen{right:6px!important;bottom:env(safe-area-inset-bottom)!important;border-radius:14px 14px 0 0!important}
  .workspace-hud{left:6px!important;right:6px!important;top:6px!important}
  .tray-tabs{padding-right:94px!important}.tray-tab{max-width:120px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tray-header strong{font-size:12px!important}.tray-navigation span{font-size:9px!important}
  .game-view .play-tool strong{font-size:9px!important;line-height:1.08!important}.play-tool{min-width:54px!important;width:54px!important;flex-basis:54px!important}
  body.game-open .toast-region{position:fixed;z-index:100000}
  .selection-toolbar{max-width:calc(100% - 12px)}

  .hero-section{grid-template-columns:1fr}.hero-copy h1{font-size:clamp(40px,11vw,64px)}
  .experience-cards{grid-template-columns:1fr!important}.experience-card{min-height:330px}
  .community-collections-grid{margin-top:16px}.weekly-challenge-card{min-height:400px}.weekly-challenge-copy{width:100%;min-height:400px;padding:28px 22px;background:linear-gradient(90deg,rgba(3,16,26,.91),rgba(3,16,26,.48))}.weekly-challenge-meta{margin:16px 0}.weekly-challenge-copy h2{font-size:clamp(35px,10vw,52px)}
  .picker-toolbar{flex-direction:column;align-items:stretch}.selected-puzzle-preview{grid-template-columns:100px 1fr}.selected-puzzle-preview img{width:100px}.picker-filter-chips button{font-size:11px}

  .ranking-header{min-height:64px;padding:8px 12px;gap:10px}.ranking-header .brand-full-logo{width:112px;height:40px}.ranking-header nav{display:none}.ranking-header>.button{margin-left:auto;font-size:10px}.ranking-main{width:calc(100% - 22px);padding:18px 0 46px}.ranking-hero{padding:26px 18px;border-radius:22px}.ranking-hero h1{font-size:clamp(39px,12vw,58px)}.ranking-board-panel,.badge-system-panel{padding:14px;border-radius:19px}.ranking-section-head{align-items:flex-start;flex-direction:column}.ranking-table-wrap{border-radius:13px}.ranking-tip{align-items:flex-start;flex-wrap:wrap}.ranking-tip .button{width:100%}.ranking-footer{flex-wrap:wrap}.ranking-footer p{width:100%;order:3}
  .kids-piece-modal-card{grid-template-columns:1fr;padding:14px;gap:13px;max-height:90dvh;overflow:auto}.kids-piece-preview img{min-height:190px;max-height:260px}.kids-piece-choice{padding:4px 5px 8px}.kids-piece-options button{padding:11px 5px}
}

@media(max-width:560px){
  body{font-size:15px}.site-header .brand-full-logo{width:116px;height:40px}.hero-buttons,.ranking-hero-actions{flex-direction:column;align-items:stretch}.hero-buttons .button,.ranking-hero-actions .button{width:100%}
  .weekly-challenge-meta{display:grid}.weekly-challenge-meta span{width:100%}.badge-catalog{grid-template-columns:1fr}
  .selected-puzzle-preview{grid-template-columns:1fr}.selected-puzzle-preview img{width:100%;max-height:180px}
  .kids-piece-options{grid-template-columns:1fr}.kids-piece-options button{display:flex;align-items:center;justify-content:space-between;padding:11px 14px}.kids-piece-options small{margin:0}.kids-piece-preview img{min-height:160px}
}

@media(pointer:coarse){
  .puzzle-card:hover,.kids-puzzle-card:hover,.experience-card:hover{transform:none!important}
  .button,.nav-link,.tray-tab,.play-tool,.hud-button,.social-action{min-height:42px}
}
/* v1.9 live co-op: the other player's currently held pieces stay visibly claimed. */
.puzzle-piece.remote-claimed{outline:2px solid rgba(87,219,169,.9);outline-offset:2px;filter:grayscale(.12) opacity(.78) drop-shadow(0 0 6px rgba(87,219,169,.62))!important}
@media (max-width:820px),(pointer:coarse){.puzzle-piece.remote-claimed{filter:opacity(.82)!important;outline-width:2px}}
/* v1.9.0 mobile playfield final pass: keep the tray anchored to the physical
   bottom edge even on short phones. The board metrics read this fixed tray
   rectangle, so the puzzle is fitted above it instead of hiding underneath. */
@media(max-width:820px){
  .piece-tray{position:fixed!important;z-index:24000!important}
  .play-tools{position:fixed!important;z-index:24010!important}
  .tray-reopen{position:fixed!important;z-index:24020!important}
  .game-workspace{padding-bottom:calc(222px + env(safe-area-inset-bottom))}
  .game-workspace.tray-two-rows{padding-bottom:calc(300px + env(safe-area-inset-bottom))}
  .game-workspace.tray-collapsed{padding-bottom:64px}
}

/* ========================================================================== */
/* v1.10.0 — layout stability + visible member presence + persistent invites  */
/* ========================================================================== */

/* Do not let compact UI labels split in the middle of a word. */
.nav-link,.button,.text-action,.panel-heading h2,.section-heading h2,.experience-card h2,
.hero-benefits strong,.social-tabs button,.social-action,.modal-heading h2,.modal-puzzle strong,
.modal-puzzle small,.collection-card strong,.leaderboard-panel h2 {
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none;
}
.nav-link{white-space:nowrap;flex:0 0 auto}
.desktop-nav{min-width:0;gap:clamp(2px,.55vw,9px)}
.site-header{gap:clamp(12px,1.6vw,28px)}
.site-header .nav-link{padding-inline:clamp(8px,.72vw,13px);font-size:clamp(11px,.78vw,13px)}
.header-actions{flex:0 0 auto;gap:clamp(6px,.65vw,10px)}
.mobile-menu a,.mobile-menu button{display:block;width:100%;border:0;border-radius:10px;padding:13px 14px;text-align:left;background:transparent;cursor:pointer}
.mobile-menu a:hover,.mobile-menu button:hover{background:rgba(255,255,255,.06)}

/* Mid-size laptops use the hamburger before the navigation can compress. */
@media (max-width:1380px){
  .desktop-nav{display:none!important}
  .mobile-menu-button{display:block!important}
  .header-actions .button.ghost:first-child span{display:none}
  .hero-benefits{grid-template-columns:1fr;max-width:620px;gap:9px}
  .hero-benefits>div{align-items:center;padding:8px 10px;border:1px solid rgba(188,220,241,.08);border-radius:12px;background:rgba(255,255,255,.02)}
  .hero-benefits>div>span{flex:0 0 28px;text-align:center}
}

/* Empty ranking state must occupy the entire panel rather than the first grid cell. */
.leaderboard-list li.ranking-empty,.mini-ranking li.ranking-empty{
  display:flex!important;
  width:100%;
  min-height:112px;
  padding:18px;
  align-items:center;
  justify-content:center;
  text-align:center;
  white-space:normal;
  overflow-wrap:normal!important;
  word-break:normal!important;
  line-height:1.55;
  border:1px dashed rgba(160,194,215,.14);
  border-radius:14px;
}
.community-collections-grid{grid-template-columns:minmax(0,1.55fr) minmax(360px,.72fr)}
.leaderboard-panel,.leaderboard-list{min-width:0}
.panel-heading{min-width:0}
.panel-heading>div{min-width:0}
.panel-heading .text-action{flex:0 0 auto}

/* Puzzle picker: search has a stable column; filters wrap naturally on desktop. */
.picker-card{width:min(1180px,calc(100vw - 32px));overflow-x:hidden}
.picker-toolbar{
  display:grid!important;
  grid-template-columns:minmax(260px,340px) minmax(0,1fr);
  align-items:start!important;
  gap:12px!important;
  margin:16px 0 14px!important;
}
.picker-toolbar .search-field{width:100%;min-width:0}
.picker-filter-chips{
  display:flex!important;
  flex-wrap:wrap!important;
  align-content:flex-start;
  gap:7px!important;
  overflow:visible!important;
  padding:0!important;
  margin:0!important;
}
.picker-filter-chips button{white-space:nowrap}
.modal-puzzle-grid{grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch}
.modal-puzzle{min-width:0}
.modal-puzzle div{min-width:0}
.modal-puzzle strong,.modal-puzzle small{white-space:nowrap;overflow:hidden!important;text-overflow:ellipsis}

/* Social list: all authenticated members can discover recently online members.
   Game invitations also remain visible in Requests until acted on. */
.social-card{width:min(840px,calc(100vw - 28px));overflow-x:hidden}
.social-request-group{min-width:0}
.invite-request-group{padding-top:14px;border-top:1px solid rgba(139,183,209,.12)}
.game-invite-row{border-color:rgba(242,184,74,.22);background:linear-gradient(135deg,rgba(17,51,72,.92),rgba(8,36,54,.86))}
.invite-avatar{background:linear-gradient(145deg,#f7ca6e,#ce8f31);font-size:18px}
.compact-social-empty{min-height:78px;padding:14px}
.social-player-actions{flex-wrap:wrap;justify-content:flex-end}
.social-player-info small{max-width:100%}

/* The Together card is a public feature teaser; private friend controls stay member-only. */
body:not(.member-signed-in) #collabExperienceCard{display:block!important}
body:not(.member-signed-in) .social-header-button,
body:not(.member-signed-in) #mobileFriends,
body:not(.member-signed-in) #inviteGameButton,
body:not(.member-signed-in) #multiplayerGameCard{display:none!important}

@media(max-width:1050px){
  .community-collections-grid{grid-template-columns:1fr!important}
  .picker-toolbar{grid-template-columns:1fr!important}
  .picker-filter-chips{flex-wrap:nowrap!important;overflow-x:auto!important;padding-bottom:8px!important;scrollbar-width:none}
  .picker-filter-chips::-webkit-scrollbar{display:none}
  .modal-puzzle-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}

@media(max-width:820px){
  /* Home/mobile layout: no horizontal drift and predictable card widths. */
  body:not(.game-open){overflow-x:hidden}
  .home-view{width:100%;max-width:100%;padding-inline:12px;overflow:clip}
  .site-header{height:66px;padding:0 11px;gap:8px}
  .site-header .brand{margin-right:auto}
  .site-header .brand-full-logo{width:118px;height:40px}
  .mobile-menu-button{width:40px;height:40px;flex:0 0 40px}
  .hero-section{width:100%;min-width:0;gap:22px;padding-top:26px}
  .hero-copy,.featured-puzzle,.experience-cards,.community-collections-grid,.weekly-challenge-section,.all-puzzles-section{min-width:0;width:100%}
  .hero-copy h1{font-size:clamp(40px,12vw,58px);line-height:.98}
  .hero-copy>p{font-size:15px;line-height:1.58}
  .hero-benefits{max-width:none}
  .hero-benefits>div{padding:9px}
  .featured-puzzle{min-height:390px}
  .featured-content{gap:10px}
  .featured-content>div{min-width:0}
  .featured-content h2{font-size:clamp(28px,8vw,36px)}
  .puzzle-meta{gap:8px 12px}
  .experience-card{min-height:300px}
  .experience-card>div:last-child{width:100%;max-width:520px;padding:20px}
  .experience-card h2{font-size:clamp(27px,8vw,37px)}
  .panel-heading{align-items:flex-start;flex-direction:column;gap:8px}
  .panel-heading.tight{flex-direction:row;align-items:flex-start}
  .collections-panel,.leaderboard-panel,.most-played-panel{min-width:0}
  .collection-strip{width:100%;max-width:100%;overscroll-behavior-x:contain}
  .community-note{font-size:11px}
  .weekly-challenge-copy{padding:24px 18px!important}
  .library-tools,.filter-chips{max-width:100%}

  /* Picker/modal never exceeds the visual viewport. */
  .modal{padding:8px!important;overflow-y:auto;-webkit-overflow-scrolling:touch}
  .picker-card{width:100%!important;max-width:100%!important;max-height:calc(100dvh - 16px)!important;border-radius:20px;padding:18px 14px!important}
  .modal-heading{padding-right:42px}
  .modal-heading h2{font-size:clamp(27px,8vw,36px)!important}
  .picker-toolbar{display:flex!important;flex-direction:column!important;gap:9px!important;margin:12px 0!important}
  .picker-filter-chips{width:100%;max-width:100%;flex-wrap:nowrap!important;overflow-x:auto!important;overscroll-behavior-x:contain;padding:1px 0 8px!important}
  .picker-filter-chips button{font-size:10.5px!important;min-height:34px!important;padding:0 11px!important}
  .modal-puzzle-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  .modal-puzzle{aspect-ratio:1.2;border-radius:12px}
  .modal-puzzle div{left:9px;right:8px;bottom:8px}
  .modal-puzzle strong{font-size:12px}
  .modal-puzzle small{font-size:9px}

  /* Social UI stacks without squeezing names/actions. */
  .social-card{width:100%!important;max-width:100%!important;padding:18px 14px!important;border-radius:20px;max-height:calc(100dvh - 16px)}
  .social-tabs{gap:4px;padding:4px}
  .social-tabs button{min-width:0;padding:0 5px;font-size:11px;white-space:nowrap}
  .social-tabs span{min-width:18px;height:18px;margin-left:3px;font-size:9px}
  .social-player{grid-template-columns:40px minmax(0,1fr);gap:9px;padding:10px}
  .social-avatar{width:40px;height:40px}
  .social-player-actions{grid-column:1/-1;width:100%;justify-content:stretch}
  .social-action{flex:1;min-width:0;min-height:40px;padding:0 8px;font-size:11px}
  .social-action.icon{flex:0 0 40px}
  .social-player-info strong,.social-player-info small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  /* Mobile game: use the game view as the sole vertical scroller and keep the
     controls/tray fixed to the viewport. Removing paint containment and forced
     GPU layers avoids Safari stutter on 300/500-piece boards. */
  html,body.game-open{height:100%;overflow:hidden!important;overscroll-behavior:auto!important}
  .game-view{height:100dvh!important;min-height:100dvh!important;overflow-x:hidden!important;overflow-y:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-y:auto!important;touch-action:pan-y!important}
  .game-shell{height:auto!important;min-height:calc(100dvh - 58px - env(safe-area-inset-top))!important;overflow:visible!important}
  .workspace-panel{height:auto!important;overflow:visible!important;padding-bottom:0!important}
  .game-workspace{height:auto!important;min-height:max(720px,calc(100dvh + 110px))!important;overflow:hidden!important;touch-action:pan-y!important;contain:none!important;padding-bottom:calc(224px + env(safe-area-inset-bottom))!important}
  .game-workspace.tray-two-rows{padding-bottom:calc(302px + env(safe-area-inset-bottom))!important}
  .game-workspace.tray-collapsed{padding-bottom:70px!important}
  .tray-pieces-layer{contain:none!important;transform:none!important}
  .board-stage{touch-action:pan-y!important}
  .board-stage.pan-active,.board-stage.panning{touch-action:none!important}
  .piece-tray{position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:24000!important;border-radius:16px 16px 0 0!important}
  .play-tools{position:fixed!important;left:5px!important;right:5px!important;z-index:24010!important}
  .workspace-hud{position:absolute!important;left:6px!important;right:6px!important;max-width:calc(100% - 12px)!important}
}

@media(max-width:480px){
  .modal-puzzle-grid{grid-template-columns:1fr 1fr}
  .modal-puzzle{min-height:132px}
  .social-tabs button{font-size:10px}
  .hero-buttons .button{font-size:13px}
}

@media(max-width:360px){
  .modal-puzzle-grid{grid-template-columns:1fr}
  .site-header .brand-full-logo{width:106px}
  .social-tabs{overflow-x:auto;justify-content:flex-start}
  .social-tabs button{flex:0 0 auto;min-width:92px}
}


/* =========================================================
   v1.11.0 — desktop alignment + route-safe visual layout
   ========================================================= */
@media (min-width:1051px){
  .community-collections-grid{
    grid-template-columns:minmax(0,2.05fr) minmax(390px,.95fr)!important;
    align-items:stretch;
    gap:20px;
  }
  .collections-panel,.leaderboard-panel{height:100%;min-height:0}
  .collections-panel .panel-heading{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:24px;
    margin-bottom:20px;
  }
  .collections-panel .panel-heading .text-action,
  .leaderboard-panel .panel-heading .text-action{
    display:inline-flex;
    align-items:center;
    justify-content:flex-end;
    width:max-content;
    min-width:max-content;
    white-space:nowrap;
    line-height:1.2;
  }
  /* There are five home collection cards. Fill the row instead of leaving a phantom sixth column. */
  .collections-panel .collection-strip{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:12px;
  }
  .leaderboard-panel .panel-heading.tight{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    gap:18px;
  }
  .leaderboard-panel .leaderboard-list{width:100%}

  .picker-card{width:min(1420px,calc(100vw - 60px));}
  .picker-toolbar{
    grid-template-columns:minmax(320px,405px) minmax(0,1fr)!important;
    align-items:center!important;
    gap:14px!important;
    margin:14px 0 18px!important;
  }
  .picker-toolbar .search-field{height:50px}
  .picker-filter-chips{
    min-height:50px;
    align-items:center;
    align-content:center;
    gap:8px!important;
  }
  .picker-filter-chips button{min-height:38px}

  .ranking-hero{
    grid-template-columns:minmax(0,1.45fr) minmax(360px,.62fr)!important;
    align-items:stretch;
    gap:34px;
    padding:clamp(38px,4vw,58px)!important;
  }
  .ranking-hero>div:first-child{align-self:center;min-width:0}
  .ranking-hero h1{
    max-width:940px;
    font-size:clamp(48px,5vw,72px)!important;
    line-height:.98!important;
    text-wrap:balance;
  }
  .ranking-hero h1 em{display:inline-block;white-space:nowrap}
  .ranking-rules{height:100%;min-height:300px;display:flex;flex-direction:column;justify-content:center}
  .ranking-hero-actions .button{white-space:nowrap}
}

@media (max-width:1050px){
  .collections-panel .collection-strip{display:flex!important;overflow-x:auto!important;scroll-snap-type:x proximity;padding-bottom:6px}
  .collections-panel .collection-card{flex:0 0 min(210px,68vw);scroll-snap-align:start}
}

@media (max-width:820px){
  .community-collections-grid{gap:12px!important}
  .collections-panel,.leaderboard-panel{padding:15px!important}
  .collections-panel .panel-heading,.leaderboard-panel .panel-heading.tight{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    align-items:start!important;
    gap:10px!important;
  }
  .collections-panel .panel-heading .text-action,.leaderboard-panel .panel-heading .text-action{
    width:max-content!important;min-width:max-content!important;white-space:nowrap!important;font-size:11px!important;
  }
  .collections-panel .collection-strip{margin-top:2px}
  .picker-card{padding:16px 12px!important}
  .picker-toolbar{align-items:stretch!important}
  .picker-toolbar .search-field{height:46px!important;flex:0 0 46px}
  .picker-filter-chips{min-height:38px;align-items:center!important}
  .ranking-hero h1 em{white-space:normal}
}

@media(max-width:480px){
  .collections-panel .panel-heading,.leaderboard-panel .panel-heading.tight{
    grid-template-columns:1fr!important;
  }
  .collections-panel .panel-heading .text-action,.leaderboard-panel .panel-heading .text-action{
    justify-self:start!important;
  }
}
