/* Daily Challenge v3. Presentation only, no scoring or game-engine changes. */
#modal-daily-challenge {
  padding: 18px;
  background: rgb(48 43 59 / 48%);
  backdrop-filter: blur(8px);
  color: var(--nyon-ink);
  font-family: var(--nyon-font-ui);
}
#modal-daily-challenge .challenge-card {
  width: min(480px, 100%);
  max-height: calc(100dvh - 36px);
  padding: 26px 22px 24px !important;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 28px;
  background: var(--nyon-cream);
  box-shadow: var(--nyon-shadow-modal);
  color: var(--nyon-ink);
  text-align: left;
  overscroll-behavior: contain;
}
#modal-daily-challenge .modal-title {
  margin: 0 0 20px;
  padding: 4px 48px 0 0;
  color: var(--nyon-ink);
  font: 900 clamp(23px, 6vw, 29px)/1.15 var(--nyon-font-ui);
  letter-spacing: -.7px;
  text-align: left;
}
#modal-daily-challenge .modal-x {
  top: 17px; right: 17px;
  width: 44px; height: 44px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 14px;
  background: white;
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}
#modal-daily-challenge .challenge-body { gap: 12px; counter-reset: daily-slot; }
#modal-daily-challenge .challenge-body p { font-size: 15px; line-height: 1.5; }
#modal-daily-challenge .challenge-body h3 { margin: 6px 0 0; font-size: 22px; font-weight: 900; }
#modal-daily-challenge .challenge-intro,
#modal-daily-challenge .challenge-small { color: var(--nyon-muted); }
#modal-daily-challenge .challenge-body .challenge-small { font-size: 13px; }
#modal-daily-challenge .challenge-body .challenge-total {
  padding: 18px;
  border: 1px solid rgb(48 43 59 / 10%);
  border-radius: 20px;
  background: var(--nyon-sage);
  color: var(--nyon-ink);
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 1000;
  line-height: 1.2;
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
#modal-daily-challenge .challenge-slot {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 5px 10px;
  padding: 14px;
  border: 1px solid rgb(48 43 59 / 13%);
  border-radius: 19px;
  background: white;
  text-align: left;
}
#modal-daily-challenge .challenge-slot::before {
  counter-increment: daily-slot;
  content: counter(daily-slot, decimal-leading-zero);
  grid-row: 1 / 3;
  display: grid; place-items: center;
  align-self: start;
  width: 34px; height: 34px;
  background: var(--nyon-rose-wash);
  border-radius: 11px;
  font-size: 12px; font-weight: 900;
}
#modal-daily-challenge .challenge-slot strong { grid-column: 2; font-size: 18px; line-height: 1.25; }
#modal-daily-challenge .challenge-slot span { grid-column: 2; color: var(--nyon-muted); font-size: 12px; line-height: 1.45; }
#modal-daily-challenge .challenge-slot .btn { grid-column: 1 / -1; margin-top: 5px; }
#modal-daily-challenge .btn {
  min-height: 48px; width: 100%; padding: 11px 14px;
  border: 1.5px solid rgb(48 43 59 / 18%);
  border-radius: 15px;
  font: 900 16px/1.3 var(--nyon-font-ui);
  color: var(--nyon-ink);
  background: white;
  box-shadow: 0 3px 0 rgb(48 43 59 / 13%);
  -webkit-appearance: none;
}
#modal-daily-challenge .btn-primary { background: var(--nyon-pink); box-shadow: 0 3px 0 #cf648b; }
#modal-daily-challenge .challenge-slot .btn { background: var(--nyon-cream); }
#modal-daily-challenge button:focus-visible { outline: 3px solid var(--nyon-ink); outline-offset: 3px; }
#modal-daily-challenge .challenge-notice:empty { display: none; }
#modal-daily-challenge .challenge-notice { margin: 12px 0 0; font-size: 13px; }
@media (max-width: 360px) {
  #modal-daily-challenge { padding: 12px; }
  #modal-daily-challenge .challenge-card { padding: 22px 16px !important; max-height: calc(100dvh - 24px); }
}

/* Nyon3 v3 app integration — approved non-gameplay surfaces only.
   Keep this layer narrowly scoped. Gameplay, levels, auth, progress, XP,
   purchases, and the global game registry deliberately remain untouched. */

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#screen-notifications,
#screen-notification-detail,
#screen-leader,
#screen-badges,
#screen-store {
  isolation: isolate;
  max-width: 720px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
}

#screen-notifications::before,
#screen-notification-detail::before,
#screen-leader::before,
#screen-badges::before,
#screen-store::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url('../assets/brand/nyon-v3/patterns/puzzle-constellation.svg') center 32px / 390px 307px repeat;
  opacity: .31;
  pointer-events: none;
}

#screen-notifications::after,
#screen-notification-detail::after,
#screen-leader::after,
#screen-badges::after,
#screen-store::after {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(90deg, rgb(255 248 236 / 78%), rgb(255 248 236 / 28%) 48%, rgb(255 248 236 / 78%));
  pointer-events: none;
}

#screen-notifications > *,
#screen-notification-detail > *,
#screen-leader > *,
#screen-badges > *,
#screen-store > * {
  position: relative;
  z-index: 1;
}

#screen-notifications .app-bar,
#screen-notification-detail .app-bar,
#screen-leader .app-bar,
#screen-badges .app-bar,
#screen-store .app-bar {
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 1px solid rgb(48 43 59 / 10%);
  background: rgb(255 248 236 / 86%);
  backdrop-filter: blur(14px);
}

#screen-notifications .app-bar-title,
#screen-notification-detail .app-bar-title,
#screen-leader .app-bar-title,
#screen-badges .app-bar-title,
#screen-store .app-bar-title {
  color: var(--nyon-ink);
  font-size: 16px;
  font-weight: 900;
}

#screen-notifications .icon-btn,
#screen-notification-detail .icon-btn,
#screen-leader .icon-btn,
#screen-badges .icon-btn,
#screen-store .icon-btn {
  width: 46px;
  height: 46px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 15px;
  background: rgb(255 255 255 / 90%);
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

.v3-section-mark {
  width: 68px;
  height: 30px;
  object-fit: contain;
  display: block;
}

.v3-app-bar-spacer {
  width: 46px;
  height: 46px;
  flex: none;
}

#notification-read-all {
  min-height: 44px;
  padding: 0 4px;
  color: var(--nyon-ink);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

#notification-read-all:disabled {
  color: var(--nyon-muted);
  opacity: .45;
}

.v3-notification-scroll {
  padding: 27px clamp(14px, 4vw, 28px) calc(35px + var(--safe-b));
}

.v3-page-heading {
  margin: 0 0 24px;
}

.v3-eyebrow {
  margin: 0 0 7px;
  color: #706879;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .15em;
}

.v3-page-heading h1 {
  margin: 0;
  color: var(--nyon-ink);
  font-size: clamp(36px, 9vw, 52px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .98;
}

.v3-page-heading > p:last-child {
  max-width: 490px;
  margin: 10px 0 0;
  color: var(--nyon-muted);
  font-size: 14px;
  line-height: 1.5;
}

.v3-page-heading-compact {
  margin-bottom: 17px;
}

.v3-page-heading-compact h1 {
  font-size: clamp(34px, 8vw, 46px);
}

.v3-notification-tools {
  min-height: 58px;
  margin: 0 0 13px;
  padding: 8px 9px 8px 14px;
  border: 1.5px solid rgb(48 43 59 / 12%);
  border-radius: 18px;
  background: rgb(255 255 255 / 76%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.v3-notification-tools p {
  margin: 0;
  color: var(--nyon-muted);
  font-size: 11px;
}

.v3-refresh-button {
  min-height: 42px;
  flex: none;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  background: var(--nyon-ink);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 3px 0 rgb(48 43 59 / 18%);
}

.v3-notification-status {
  min-height: 0;
  margin: 0 2px 10px;
  color: var(--nyon-success);
  font-weight: 800;
}

.v3-notification-status:empty {
  display: none;
}

#screen-notifications .notification-list {
  gap: 10px;
}

#screen-notifications .notification-item {
  min-height: 112px;
  padding: 16px 16px 15px 82px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 22px;
  background: rgb(255 255 255 / 94%);
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
  cursor: pointer;
}

#screen-notifications .notification-item::after {
  content: '✦';
  position: absolute;
  left: 15px;
  top: 16px;
  width: 52px;
  height: 52px;
  border-radius: 17px;
  background: var(--nyon-butter);
  color: var(--nyon-ink);
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
}

#screen-notifications .notification-item.unread {
  border-color: var(--nyon-ink);
  background: #fff;
  box-shadow: 0 0 0 1px var(--nyon-ink), var(--nyon-shadow-card);
}

#screen-notifications .notification-item.unread::before {
  left: auto;
  right: 14px;
  top: 14px;
  bottom: auto;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--nyon-pink);
  box-shadow: 0 0 0 3px rgb(239 127 168 / 12%);
}

#screen-notifications .notification-meta {
  padding-right: 12px;
  margin-bottom: 4px;
}

#screen-notifications .notification-read-label {
  color: var(--nyon-success);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

#screen-notifications .notification-date {
  color: var(--nyon-muted);
  font-size: 9px;
  font-weight: 800;
}

#screen-notifications .notification-title {
  color: var(--nyon-ink);
  font-size: 15px;
  line-height: 1.22;
}

#screen-notifications .notification-copy {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: var(--nyon-muted);
  font-size: 11px;
  line-height: 1.45;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#screen-notifications .notification-cta {
  margin-top: 8px;
  padding: 0;
  background: transparent;
  color: var(--nyon-success);
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}

#screen-notifications .notification-empty {
  min-height: 300px;
  padding: 34px 24px;
  border: 1.5px dashed rgb(48 43 59 / 20%);
  border-radius: 26px;
  background: rgb(255 255 255 / 72%);
}

#screen-notifications .notification-empty > span {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: var(--nyon-butter);
  color: var(--nyon-ink);
  display: grid;
  place-items: center;
  font-size: 28px;
}

#screen-notifications .notification-empty b {
  color: var(--nyon-ink);
  font-size: 18px;
}

#notification-load-more {
  min-height: 48px;
  border: 1.5px solid rgb(48 43 59 / 20%);
  background: #fff;
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

#screen-notification-detail .notification-detail-card {
  min-height: 440px;
  margin: 0;
  padding: clamp(24px, 6vw, 42px);
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 28px;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--nyon-shadow-card);
}

.v3-notification-mark {
  width: 62px;
  height: 62px;
  margin-bottom: 27px;
  border-radius: 20px;
  background: var(--nyon-butter);
  color: var(--nyon-ink);
  display: grid;
  place-items: center;
  font-size: 27px;
  font-weight: 900;
}

#screen-notification-detail .notification-detail-card h2 {
  margin: 0 0 18px;
  color: var(--nyon-ink);
  font-size: clamp(28px, 7vw, 38px);
  font-weight: 900;
  letter-spacing: -.035em;
  line-height: 1.08;
}

#screen-notification-detail .notification-detail-body {
  color: var(--nyon-muted);
  font-size: 15px;
  line-height: 1.75;
}

#screen-notification-detail :is(#notification-detail-cta, #notification-detail-retry) {
  min-height: 48px;
  border-radius: 15px;
  font-weight: 900;
}

#screen-notification-detail #notification-detail-cta {
  background: var(--nyon-pink);
  color: var(--nyon-ink);
  box-shadow: 0 4px 0 #cf648b;
}

/* Leaderboard keeps its existing server-first data while restoring the
   approved v3 hierarchy: personal position first, then period and board. */
.v3-leader-scroll,
.v3-badges-scroll {
  padding: 24px clamp(14px, 4vw, 28px) calc(30px + var(--safe-b));
}

.v3-leader-scroll {
  display: block !important;
  overflow-y: auto !important;
}

#screen-leader .lead-tabs,
#screen-badges .badge-tabs {
  min-height: 54px;
  gap: 5px;
  margin: 0 0 12px;
  padding: 5px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 18px;
  background: rgb(255 255 255 / 76%);
  box-shadow: var(--nyon-shadow-card);
}

#screen-leader .lead-tabs {
  margin: 19px 0 14px;
  background: rgb(240 216 135 / 24%);
}

#screen-leader .lead-tab,
#screen-badges .badge-tab {
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 13px;
  color: var(--nyon-muted);
  font-size: 11px;
  font-weight: 900;
}

#screen-leader .lead-tab.on,
#screen-badges .badge-tab.on {
  background: var(--nyon-ink);
  color: #fff;
  box-shadow: 0 3px 0 rgb(48 43 59 / 18%);
}

#screen-leader .lead-head {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#screen-leader .lead-rank-hero {
  min-height: 144px;
  padding: 17px 20px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 28px;
  background: linear-gradient(115deg, var(--nyon-sage), #dfeae4);
  display: grid;
  grid-template-columns: 96px minmax(250px, 1fr) minmax(190px, 240px);
  align-items: center;
  gap: 20px;
  box-shadow: var(--nyon-shadow-card);
}

#screen-leader .lead-rank-avatar {
  width: 96px;
  height: 96px;
  overflow: hidden;
  border: 3px solid var(--nyon-ink);
  border-radius: 28px;
  background: var(--nyon-cream);
  display: grid;
  place-items: center;
  font-size: 42px;
}

#screen-leader .lead-rank-avatar img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  object-position: center;
  transform: none;
}

#screen-leader .lead-rank-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

#screen-leader .lead-rank-copy small,
#screen-leader .lead-rank-progress span {
  color: #56645e;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
}

#screen-leader .lead-rank-copy strong {
  color: var(--nyon-ink);
  font-size: 40px;
  line-height: 1;
}

#screen-leader .lead-rank-copy > span {
  overflow: hidden;
  color: var(--nyon-ink);
  font-size: 13px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#screen-leader .lead-rank-copy .lg-xprank {
  margin-top: 3px;
  color: var(--nyon-success);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

#screen-leader .lead-rank-progress {
  width: min(100%, 230px);
  justify-self: end;
}

#screen-leader .lead-rank-progress b,
#screen-leader .lead-rank-progress span {
  display: block;
  text-align: right;
}

#screen-leader .lead-rank-progress b {
  color: var(--nyon-ink);
  font-size: 16px;
}

#screen-leader .lead-rank-progress i {
  height: 8px;
  overflow: hidden;
  margin-top: 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 70%);
  display: block;
}

#screen-leader .lead-rank-progress u {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--nyon-pink);
  display: block;
  text-decoration: none;
  transition: width var(--nyon-duration-base) var(--nyon-ease);
}

#screen-leader .lead-league-meta {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#screen-leader .lead-league-meta > span {
  min-width: 0;
  color: var(--nyon-muted);
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
}

#screen-leader .lead-league-meta > span > i {
  width: 11px;
  height: 11px;
  flex: none;
  border: 2px solid var(--nyon-ink);
  border-radius: 50%;
  background: var(--nyon-sage);
}

#screen-leader .lead-league-meta b {
  color: var(--nyon-muted);
  white-space: nowrap;
}

#screen-leader .lead-league-meta small {
  overflow: hidden;
  color: var(--nyon-muted);
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#screen-leader .lead-explain {
  flex: none;
  align-self: auto;
  min-height: 36px;
  margin: 0;
  padding: 2px 0 5px;
  color: var(--nyon-success);
  font-size: 10px;
  text-align: right;
}

#screen-leader .store-note {
  margin: 0 0 8px;
  color: var(--nyon-warning);
  font-size: 10px;
  text-align: center;
}

#screen-leader .lead-list {
  display: flex;
  flex: none;
  height: auto;
  overflow: visible;
  gap: 9px;
  padding: 0 3px 12px;
}

#screen-leader .lead-row {
  min-height: 68px;
  gap: 11px;
  padding: 10px 13px;
  border: 1.5px solid rgb(48 43 59 / 12%);
  border-radius: 20px;
  background: rgb(255 255 255 / 94%);
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

#screen-leader .lead-row.me {
  border-color: var(--nyon-ink);
  background: var(--nyon-rose-wash);
  box-shadow: 0 0 0 1px var(--nyon-ink), var(--nyon-shadow-card);
}

#screen-leader .lead-row.rank-1 {
  border-color: rgb(114 82 15 / 26%);
  background: linear-gradient(135deg, #fff9d9, var(--nyon-butter));
  box-shadow: var(--nyon-shadow-card);
}

#screen-leader .lead-row.rank-2 {
  border-color: #aeb8bf;
  background: linear-gradient(115deg, #fff, #dbe1e4);
  box-shadow: var(--nyon-shadow-card);
}

#screen-leader .lead-row.rank-3 {
  border-color: #bd805b;
  background: linear-gradient(115deg, #fff3e9, #e9b38f);
  box-shadow: var(--nyon-shadow-card);
}

#screen-leader .lead-rank {
  width: 32px;
  color: var(--nyon-muted);
  font-size: 13px;
  font-weight: 900;
}

#screen-leader :is(.lead-row.rank-1, .lead-row.rank-2, .lead-row.rank-3) .lead-rank {
  font-size: 20px;
}

#screen-leader .lead-face,
#screen-leader .lead-face .otong-frame {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

#screen-leader .lead-face img {
  width: 38px;
  height: 38px;
}

#screen-leader .lead-name {
  color: var(--nyon-ink);
  font-size: 13px;
  font-weight: 900;
}

#screen-leader .lead-sub {
  color: var(--nyon-muted);
  font-size: 9px;
}

#screen-leader .lead-stars {
  color: var(--nyon-success);
  font-size: 11px;
  white-space: nowrap;
}

#screen-leader .lead-you {
  border-radius: 999px;
  background: var(--nyon-pink);
  color: var(--nyon-ink);
}

#screen-leader .lead-ig {
  color: var(--nyon-success);
  font-size: 9px;
}

#screen-leader .lead-empty {
  padding: 30px 18px;
  border: 1.5px dashed rgb(48 43 59 / 18%);
  border-radius: 22px;
  background: rgb(255 255 255 / 74%);
  color: var(--nyon-muted);
}

#screen-leader .lead-mine {
  margin-top: 4px;
}

/* Badge artwork stays exactly as awarded by the existing system. The new
   cards frame it consistently without changing any badge requirement. */
#screen-badges .badge-summary {
  gap: 9px;
  margin: 0 0 11px;
}

#screen-badges .badge-summary > div {
  min-height: 86px;
  padding: 15px 12px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 20px;
  background: rgb(255 255 255 / 90%);
  box-shadow: var(--nyon-shadow-card);
}

#screen-badges .badge-summary > div:first-child {
  background: linear-gradient(145deg, #fffdf2, var(--nyon-butter));
}

#screen-badges .badge-summary > div:last-child {
  background: linear-gradient(145deg, #f7fbf9, var(--nyon-sage));
}

#screen-badges .badge-summary b {
  color: var(--nyon-ink);
  font-size: 22px;
}

#screen-badges .badge-summary span {
  color: var(--nyon-muted);
  font-size: 9px;
}

#screen-badges .bdg-note {
  margin: 0 0 13px;
  padding: 12px 14px;
  border: 1.5px solid rgb(48 43 59 / 11%);
  border-radius: 17px;
  background: rgb(255 255 255 / 72%);
  color: var(--nyon-muted);
  font-size: 10px;
  text-align: center;
}

#screen-badges .bdg-note span { display: block; }

#screen-badges .badge-grid {
  gap: 11px;
  padding-bottom: 18px;
}

#screen-badges .badge-card {
  min-height: 205px;
  gap: 6px;
  padding: 14px 10px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 22px;
  background: rgb(255 255 255 / 94%);
  color: var(--nyon-ink);
  justify-content: center;
  box-shadow: var(--nyon-shadow-card);
}

#screen-badges .bdg-art-wrap {
  width: 92px;
  height: 92px;
}

#screen-badges .badge-card .bdg-name {
  font-size: 12px;
  font-weight: 900;
}

#screen-badges .badge-card .bdg-desc {
  color: var(--nyon-muted);
  font-size: 9px;
}

#screen-badges .badge-card.locked {
  border-style: dashed;
  background: rgb(255 255 255 / 68%);
  opacity: .54;
  box-shadow: none;
}

#screen-badges .bdg-locked {
  margin-top: 2px;
  color: var(--nyon-muted);
}

/* Puzzle Store follows the approved card-and-wallet direction. Purchase and
   wallet operations still run through the existing monotonic Wallet API. */
.v3-store-scroll {
  padding: 24px clamp(14px, 4vw, 28px) calc(32px + var(--safe-b));
}

#screen-store .wallet {
  min-height: 132px;
  margin: 0 0 18px;
  padding: 19px 21px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 27px;
  background: var(--nyon-ink);
  color: #fff;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  box-shadow: var(--nyon-shadow-modal);
}

.v3-wallet-symbol {
  width: 58px;
  height: 58px;
  border-radius: 19px;
  background: var(--nyon-butter);
  color: var(--nyon-ink);
  display: grid;
  place-items: center;
  font-size: 28px;
}

#screen-store .wallet-main {
  min-width: 0;
}

#screen-store .wallet-main > span,
#screen-store .wallet-side span {
  color: rgb(255 255 255 / 64%);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#screen-store .wallet-main strong {
  overflow: hidden;
  display: block;
  font-size: 27px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#screen-store .wallet-main b {
  display: inline;
  font-size: inherit;
}

#screen-store .wallet-side {
  flex-direction: row;
  gap: 22px;
  text-align: right;
}

#screen-store .wallet-side > div,
#screen-store .wallet-side span {
  display: flex;
  flex-direction: column;
}

#screen-store .wallet-side b {
  font-size: 15px;
}

#screen-store .wallet-side span {
  margin: 2px 0 0;
  letter-spacing: 0;
  text-transform: none;
}

#screen-store .store-tabs {
  min-height: 54px;
  margin: 0 0 13px;
  padding: 5px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 18px;
  background: rgb(240 216 135 / 24%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  box-shadow: var(--nyon-shadow-card);
}

#screen-store .store-tab {
  min-height: 42px;
  padding: 8px 10px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--nyon-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

#screen-store .store-tab.on {
  background: var(--nyon-ink);
  color: #fff;
  box-shadow: 0 3px 0 rgb(48 43 59 / 18%);
}

#screen-store .store-note {
  margin: 0 2px 16px;
  color: var(--nyon-muted);
  font-size: 11px;
  line-height: 1.5;
}

#screen-store .store-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#screen-store .store-row {
  min-width: 0;
  min-height: 0;
  padding: 9px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 20px;
  background: rgb(255 255 255 / 94%);
  color: var(--nyon-ink);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--nyon-shadow-card);
}

#screen-store .store-row.owned {
  background: rgb(255 255 255 / 72%);
  opacity: .68;
}

#screen-store .sr-cover,
#screen-store .sr-icon {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  flex: none;
  border-radius: 14px;
  object-fit: cover;
}

#screen-store .sr-body {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 3px 3px 0;
  flex: 1;
}

#screen-store .sr-kicker {
  overflow: hidden;
  color: var(--nyon-success);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .11em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

#screen-store .sr-name {
  margin-top: 3px;
  color: var(--nyon-ink);
  font-size: clamp(15px, 2.8vw, 17px);
  font-weight: 900;
  line-height: 1.1;
}

#screen-store :is(.sr-buy, .sr-have) {
  width: 100%;
  min-height: 40px;
  align-self: stretch;
  padding: 0 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 900;
}

#screen-store .sr-buy {
  border: 0;
  background: var(--nyon-pink);
  color: var(--nyon-ink);
  box-shadow: 0 3px 0 #cf648b;
}

#screen-store .sr-buy.cant,
#screen-store .sr-have {
  background: var(--nyon-disabled-bg);
  color: var(--nyon-muted);
  box-shadow: none;
}

#screen-store .store-empty {
  grid-column: 1 / -1;
  min-height: 220px;
  padding: 30px;
  border: 1.5px dashed rgb(48 43 59 / 18%);
  border-radius: 24px;
  background: rgb(255 255 255 / 72%);
  color: var(--nyon-muted);
  display: grid;
  place-items: center;
  text-align: center;
}

/* Preview-only direction for the next surface: profile selection. The class
   is attached only by previews/app-v3-surfaces, so account/session behavior
   and the existing destructive profile actions are not changed here. */
.v3-profile-preview {
  isolation: isolate;
  max-width: 720px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
}

.v3-profile-preview::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url('../assets/brand/nyon-v3/patterns/puzzle-constellation.svg') center 32px / 390px 307px repeat;
  opacity: .31;
  pointer-events: none;
}

.v3-profile-preview::after {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(90deg, rgb(255 248 236 / 78%), rgb(255 248 236 / 28%) 48%, rgb(255 248 236 / 78%));
  pointer-events: none;
}

.v3-profile-preview > * {
  position: relative;
  z-index: 1;
}

.v3-profile-preview .app-bar {
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 1px solid rgb(48 43 59 / 10%);
  background: rgb(255 248 236 / 86%);
  backdrop-filter: blur(14px);
}

.v3-profile-preview .icon-btn {
  width: 46px;
  height: 46px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 15px;
  background: rgb(255 255 255 / 90%);
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
  font-size: 23px;
}

.v3-profile-scroll {
  padding: 27px clamp(14px, 4vw, 28px) calc(35px + var(--safe-b));
}

.v3-active-profile {
  width: 100%;
  min-height: 132px;
  padding: 16px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 27px;
  background: linear-gradient(135deg, rgb(184 205 193 / 92%), rgb(220 234 225 / 94%));
  color: var(--nyon-ink);
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 15px;
  text-align: left;
  box-shadow: var(--nyon-shadow-card);
}

.v3-profile-face {
  width: 88px;
  height: 88px;
  overflow: hidden;
  border: 3px solid var(--nyon-ink);
  border-radius: 27px;
  background: var(--nyon-cream);
  display: grid;
  place-items: center;
}

.v3-profile-face img {
  width: 96px;
  transform: translateY(7px);
}

.v3-profile-copy :is(small, strong, em) {
  display: block;
}

.v3-profile-copy small {
  color: var(--nyon-muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
}

.v3-profile-copy strong {
  margin: 2px 0 3px;
  font-size: 26px;
  line-height: 1;
}

.v3-profile-copy em {
  color: var(--nyon-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.v3-profile-check {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--nyon-ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
}

.v3-profile-section-head {
  margin: 24px 2px 11px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.v3-profile-section-head b {
  font-size: 14px;
}

.v3-profile-section-head span {
  color: var(--nyon-muted);
  font-size: 10px;
}

.v3-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.v3-profile-card {
  min-width: 0;
  min-height: 184px;
  padding: 13px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 22px;
  background: rgb(255 255 255 / 94%);
  color: var(--nyon-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--nyon-shadow-card);
}

.v3-profile-card > span {
  width: 94px;
  height: 94px;
  margin-bottom: 9px;
  overflow: hidden;
  border-radius: 28px;
  background: var(--nyon-rose-wash);
  display: grid;
  place-items: center;
}

.v3-profile-card > span img {
  width: 105px;
  transform: translateY(7px);
}

.v3-profile-card b {
  font-size: 15px;
}

.v3-profile-card small {
  margin-top: 3px;
  color: var(--nyon-muted);
  font-size: 9px;
}

.v3-profile-card.v3-profile-add {
  border-style: dashed;
  background: rgb(255 255 255 / 58%);
}

.v3-profile-card.v3-profile-add > span {
  background: var(--nyon-butter);
  font-size: 35px;
}

.v3-profile-actions {
  overflow: hidden;
  margin-top: 22px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 21px;
  background: rgb(255 255 255 / 90%);
  box-shadow: var(--nyon-shadow-card);
}

.v3-profile-actions button {
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid rgb(48 43 59 / 10%);
  background: transparent;
  color: var(--nyon-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-align: left;
}

.v3-profile-actions button:last-child {
  border-bottom: 0;
}

.v3-profile-actions .v3-profile-signout {
  color: var(--nyon-danger);
  justify-content: center;
}

.v3-profile-footnote {
  margin: 13px 12px 0;
  color: var(--nyon-muted);
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

/* Create/Edit Character is a preview-only continuation of the approved
   profile direction. It deliberately does not hook into account.js. */
.v3-character-preview {
  isolation: isolate;
  max-width: 720px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
}

.v3-character-preview::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url('../assets/brand/nyon-v3/patterns/puzzle-constellation.svg') center 32px / 390px 307px repeat;
  opacity: .31;
  pointer-events: none;
}

.v3-character-preview::after {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(90deg, rgb(255 248 236 / 78%), rgb(255 248 236 / 28%) 48%, rgb(255 248 236 / 78%));
  pointer-events: none;
}

.v3-character-preview > * {
  position: relative;
  z-index: 1;
}

.v3-character-preview .app-bar {
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 1px solid rgb(48 43 59 / 10%);
  background: rgb(255 248 236 / 86%);
  backdrop-filter: blur(14px);
}

.v3-character-preview .icon-btn {
  width: 46px;
  height: 46px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 15px;
  background: rgb(255 255 255 / 90%);
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

.v3-character-scroll {
  padding: 24px clamp(14px, 4vw, 28px) calc(35px + var(--safe-b));
}

.v3-character-hero {
  min-height: 214px;
  margin-bottom: 14px;
  padding: 15px 21px 0 13px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 28px;
  background: linear-gradient(135deg, rgb(184 205 193 / 92%), rgb(220 234 225 / 94%));
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  box-shadow: var(--nyon-shadow-card);
}

.v3-character-stage {
  align-self: end;
  height: 198px;
  overflow: hidden;
  display: grid;
  place-items: end center;
}

.v3-character-stage img {
  width: min(100%, 190px);
  max-height: 194px;
  object-fit: contain;
  object-position: bottom;
}

.v3-character-hero > div:last-child :is(small, strong, span) {
  display: block;
}

.v3-character-hero > div:last-child small {
  color: var(--nyon-muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .13em;
}

.v3-character-hero > div:last-child strong {
  overflow: hidden;
  margin: 3px 0 5px;
  font-size: clamp(24px, 5vw, 32px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-character-hero > div:last-child span {
  color: var(--nyon-muted);
  font-size: 10px;
  font-weight: 800;
}

.v3-character-panel {
  margin-top: 14px;
  padding: 18px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 24px;
  background: rgb(255 255 255 / 92%);
  box-shadow: var(--nyon-shadow-card);
}

.v3-character-panel > header {
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 11px;
}

.v3-character-panel > header > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  background: var(--nyon-butter);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 900;
}

.v3-character-panel > header :is(b, small) {
  display: block;
}

.v3-character-panel > header b {
  font-size: 15px;
}

.v3-character-panel > header small {
  margin-top: 2px;
  color: var(--nyon-muted);
  font-size: 9px;
}

.v3-field-label {
  display: block;
  margin: 16px 0 9px;
  color: var(--nyon-muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.v3-pose-rail {
  overflow-x: auto;
  margin: 0 -18px;
  padding: 2px 18px 7px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82px;
  gap: 8px;
  scrollbar-width: none;
}

.v3-pose-rail::-webkit-scrollbar {
  display: none;
}

.v3-pose-rail button {
  min-height: 103px;
  padding: 6px 5px 7px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 16px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  font: inherit;
  box-shadow: 0 3px 0 rgb(48 43 59 / 10%);
}

.v3-pose-rail button.on {
  border-color: var(--nyon-ink);
  background: var(--nyon-rose-wash);
  box-shadow: 0 0 0 2px rgb(239 127 168 / 24%);
}

.v3-pose-rail img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}

.v3-pose-rail span {
  margin-top: 3px;
  font-size: 9px;
  font-weight: 900;
}

.v3-color-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.v3-color-grid button {
  min-width: 0;
  aspect-ratio: 1;
  padding: 4px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 14px;
  background: var(--nyon-cream);
  display: grid;
  place-items: center;
}

.v3-color-grid button.on {
  border-color: var(--nyon-ink);
  box-shadow: 0 0 0 2px rgb(239 127 168 / 28%);
}

.v3-color-grid button span {
  width: 100%;
  height: 100%;
  background: url('../assets/otong/think.webp') center / contain no-repeat;
  display: block;
}

.v3-form-field {
  display: block;
  margin-top: 14px;
}

.v3-form-field:first-of-type {
  margin-top: 0;
}

.v3-form-field > span:first-child {
  margin: 0 3px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--nyon-ink);
  font-size: 11px;
  font-weight: 900;
}

.v3-form-field > span:first-child em {
  color: var(--nyon-muted);
  font-size: 8px;
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.v3-form-field :is(input, select) {
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 14px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 15px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  outline: 0;
}

.v3-form-field :is(input, select):focus {
  border-color: var(--nyon-pink);
  box-shadow: 0 0 0 3px rgb(239 127 168 / 18%);
}

.v3-handle-field {
  height: 50px;
  padding-left: 14px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 15px;
  background: var(--nyon-cream);
  display: flex;
  align-items: center;
}

.v3-handle-field i {
  color: var(--nyon-muted);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.v3-handle-field input {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.v3-character-toggle {
  margin-top: 13px;
  padding: 12px 13px;
  border-radius: 15px;
  background: var(--nyon-rose-wash);
  display: flex;
  align-items: center;
  gap: 10px;
}

.v3-character-toggle input {
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--nyon-pink);
}

.v3-character-toggle :is(b, small) {
  display: block;
}

.v3-character-toggle b {
  font-size: 11px;
}

.v3-character-toggle small {
  margin-top: 2px;
  color: var(--nyon-muted);
  font-size: 9px;
}

.v3-showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.v3-showcase-grid button {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  padding: 8px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 17px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
  display: grid;
  place-items: center;
  font: inherit;
}

.v3-showcase-grid button.on {
  border-color: var(--nyon-ink);
  box-shadow: 0 0 0 2px rgb(240 216 135 / 55%);
}

.v3-showcase-grid img {
  width: 76%;
  height: 76%;
  object-fit: contain;
}

.v3-showcase-grid span {
  overflow: hidden;
  max-width: 100%;
  font-size: 8px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-showcase-grid i {
  position: absolute;
  top: -6px;
  right: -5px;
  width: 23px;
  height: 23px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--nyon-success);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.v3-character-save {
  padding: 22px 0 2px;
}

.v3-character-save button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: var(--nyon-pink);
  color: var(--nyon-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 4px 0 #cf648b;
}

.v3-character-save p {
  margin: 11px 0 0;
  color: var(--nyon-muted);
  font-size: 9px;
  text-align: center;
}

/* Audio placement and modal preview. The underlying screen is intentionally a
   quiet gameplay shell: it demonstrates discoverability without redesigning
   any puzzle mechanics. */
.v3-audio-preview-bg {
  isolation: isolate;
  max-width: 720px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
}

.v3-audio-preview-bg::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url('../assets/brand/nyon-v3/patterns/puzzle-constellation.svg') center / 390px 307px repeat;
  opacity: .31;
  pointer-events: none;
}

.v3-audio-preview-bg > * {
  position: relative;
  z-index: 1;
}

.v3-audio-preview-bg .app-bar {
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 1px solid rgb(48 43 59 / 10%);
  background: rgb(255 248 236 / 88%);
  backdrop-filter: blur(14px);
}

.v3-audio-preview-bg .app-bar-title {
  overflow: hidden;
  color: var(--nyon-ink);
  text-align: left;
}

.v3-audio-preview-bg .app-bar-title span,
.v3-audio-preview-bg .app-bar-title :is(small, b) {
  display: block;
}

.v3-audio-preview-bg .app-bar-title small {
  color: var(--nyon-muted);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .12em;
}

.v3-audio-preview-bg .app-bar-title b {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v3-audio-preview-bg .icon-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 15px;
  background: rgb(255 255 255 / 92%);
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

.v3-audio-preview-bg .v3-audio-trigger {
  background: var(--nyon-butter);
}

.v3-game-audio-actions {
  display: flex;
  gap: 7px;
}

.v3-audio-game-shell {
  height: calc(100% - 68px);
  padding: 14px;
  display: flex;
  flex-direction: column;
}

.v3-audio-game-toolbar {
  min-height: 58px;
  padding: 9px 12px;
  border-radius: 18px;
  background: var(--nyon-ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 900;
}

.v3-audio-game-toolbar b {
  display: block;
  font-size: 12px;
}

.v3-audio-focus-mat {
  min-height: 0;
  margin-top: 11px;
  padding: 28px;
  border: 1.5px solid rgb(48 43 59 / 12%);
  border-radius: 24px;
  background: rgb(255 255 255 / 92%);
  flex: 1;
  display: grid;
  place-items: center;
  box-shadow: var(--nyon-shadow-card);
}

.v3-audio-word-grid {
  width: min(100%, 430px);
  aspect-ratio: 1;
  padding: 12px;
  border: 3px solid var(--nyon-ink);
  border-radius: 22px;
  background: var(--nyon-cream);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.v3-audio-word-grid span {
  display: grid;
  place-items: center;
  font-size: clamp(11px, 3.5vw, 19px);
  font-weight: 900;
}

.v3-audio-demo-modal {
  padding: clamp(14px, 3vw, 24px);
  background: rgb(48 43 59 / 48%);
  backdrop-filter: blur(9px);
}

.v3-audio-demo-modal .v3-audio-card {
  width: min(100%, 450px);
  max-height: 92vh;
  max-height: 92dvh;
  padding: 27px 23px 22px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 30px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
  text-align: left;
  box-shadow: var(--nyon-shadow-modal);
}

.v3-audio-demo-modal .modal-x {
  top: 15px;
  right: 15px;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  background: #fff;
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

.v3-audio-demo-modal .v3-eyebrow {
  padding-right: 48px;
}

.v3-audio-demo-modal .modal-title {
  margin: 0 0 18px;
  padding-right: 48px;
  font-size: 31px;
  line-height: 1;
}

.v3-audio-demo-modal .audio-mute-row {
  min-height: 68px;
  margin: 0 0 19px;
  padding: 10px 15px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 19px;
  background: var(--nyon-sage);
  color: var(--nyon-ink);
  justify-content: flex-start;
  box-shadow: var(--nyon-shadow-card);
}

.v3-audio-demo-modal #audio-mute-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 14px;
  background: var(--nyon-cream);
  display: grid;
  place-items: center;
}

.v3-audio-demo-modal #audio-mute-label {
  font-size: 13px;
  font-weight: 900;
}

.v3-audio-demo-modal .audio-mute-row.is-off {
  background: var(--nyon-disabled-bg);
}

.v3-audio-demo-modal .audio-volume-head {
  margin: 0 2px 7px;
  color: var(--nyon-muted);
  font-size: 11px;
  font-weight: 900;
}

.v3-audio-demo-modal .audio-volume-head output {
  color: var(--nyon-ink);
}

.v3-audio-demo-modal .audio-volume {
  height: 28px;
  margin: 0 0 17px;
  accent-color: var(--nyon-pink);
}

.v3-audio-demo-modal .audio-track-section {
  margin: 4px 0 14px;
}

.v3-audio-demo-modal .audio-track-section h4,
.v3-audio-demo-modal .audio-repeat-group legend {
  margin-bottom: 9px;
  color: var(--nyon-ink);
  font-size: 11px;
}

.v3-audio-demo-modal #audio-game-tracks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.v3-audio-demo-modal .mus-btn {
  min-height: 48px;
  padding: 8px 10px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 14px;
  background: #fff;
  color: var(--nyon-ink);
  font-size: 10px;
  box-shadow: var(--nyon-shadow-card);
}

.v3-audio-demo-modal .mus-btn.on {
  border-color: var(--nyon-ink);
  background: var(--nyon-butter);
}

.v3-audio-demo-modal .mus-btn small {
  color: var(--nyon-success);
  font-size: 8px;
}

.v3-audio-demo-modal .audio-repeat-row {
  gap: 8px;
}

.v3-audio-demo-modal .audio-playback-status {
  min-height: 0;
  margin-top: 2px;
  padding: 9px 11px;
  border-radius: 12px;
  background: var(--nyon-rose-wash);
  color: var(--nyon-muted);
  font-size: 10px;
}

#modal-league-info,
#modal-player-card {
  padding: clamp(14px, 3vw, 28px);
  background: rgb(48 43 59 / 48%);
  backdrop-filter: blur(9px);
}

#modal-league-info .league-info-card,
#modal-player-card .player-card-modal {
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 28px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-modal);
}

#modal-league-info .modal-x,
#modal-player-card .modal-x {
  z-index: 5;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 14px;
  background: #fff;
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

#modal-league-info .league-info-card {
  max-width: 580px;
  padding: clamp(22px, 5vw, 36px);
}

#modal-league-info .league-info-card h3 {
  margin: 6px 0 16px;
  color: var(--nyon-ink);
  font-size: clamp(26px, 6vw, 34px);
  font-weight: 900;
  letter-spacing: -.03em;
}

#modal-league-info .league-info-card h4 {
  color: var(--nyon-ink);
  font-size: 15px;
}

#modal-league-info .league-info-card :is(p, li) {
  color: var(--nyon-muted);
  font-size: 13px;
}

#modal-league-info .league-info-preview {
  padding: 15px;
  border: 1.5px solid rgb(114 82 15 / 15%);
  border-radius: 17px;
  background: #fff6cf;
  color: var(--nyon-ink);
}

#modal-league-info .league-info-total {
  border: 1.5px solid rgb(47 102 87 / 15%);
  border-radius: 17px;
  background: var(--nyon-sage);
  color: var(--nyon-ink);
}

#modal-league-info .league-info-footnote {
  padding-top: 14px;
  border-top: 1px solid rgb(48 43 59 / 12%);
}

#modal-player-card .player-card-modal {
  max-width: 420px;
  padding: 25px 22px 22px;
}

#modal-player-card .player-card-face {
  border-color: var(--nyon-ink);
  background: var(--nyon-sage);
  box-shadow: 0 4px 0 rgb(48 43 59 / 18%);
}

#modal-player-card .player-card-top h3 {
  color: var(--nyon-ink);
  font-weight: 900;
}

#modal-player-card :is(.player-card-top p, .player-card-meta, .player-card-badges > p) {
  color: var(--nyon-muted);
}

#modal-player-card .player-card-badges {
  border-top-color: rgb(48 43 59 / 12%);
}

/* About remains wired as the existing modal, but the card itself becomes a
   scrollable full-page brand surface. Legal, feedback, support, version, and
   changelog IDs are unchanged so all established behavior is preserved. */
#modal-about {
  padding: clamp(14px, 3vw, 28px);
  background: rgb(48 43 59 / 48%);
  backdrop-filter: blur(9px);
}

.about-card-v3 {
  isolation: isolate;
  width: min(100%, 980px);
  max-width: 980px;
  max-height: 92vh;
  max-height: 92dvh;
  overflow-y: auto;
  display: block;
  padding: clamp(18px, 3vw, 30px);
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 34px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
  text-align: left;
  box-shadow: var(--nyon-shadow-modal);
}

.about-card-v3::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url('../assets/brand/nyon-v3/patterns/puzzle-constellation.svg') center 10px / 560px 440px repeat;
  opacity: .2;
  pointer-events: none;
}

.about-card-v3 > * {
  position: relative;
  z-index: 1;
}

.about-card-v3 > .modal-x {
  position: sticky;
  z-index: 5;
  top: 0;
  width: 48px;
  height: 48px;
  margin: 0 0 -48px auto;
  border: 1.5px solid rgb(48 43 59 / 18%);
  border-radius: 15px;
  background: rgb(255 255 255 / 92%);
  color: var(--nyon-ink);
  font-size: 20px;
  box-shadow: var(--nyon-shadow-card);
}

.about-v3-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, .88fr);
  align-items: center;
  gap: clamp(24px, 5vw, 52px);
}

.about-v3-copy {
  padding: 18px 0 18px 4px;
}

.about-v3-wordmark {
  width: 158px;
  height: auto;
  margin: 0 0 29px;
}

.about-v3-copy h3 {
  max-width: 560px;
  margin: 0;
  color: var(--nyon-ink);
  font-size: clamp(34px, 5vw, 55px);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .99;
}

.about-v3-copy > p:not(.v3-eyebrow) {
  max-width: 590px;
  margin: 16px 0 0;
  color: var(--nyon-muted);
  font-size: 14px;
  line-height: 1.7;
}

.about-v3-numbers {
  display: flex;
  gap: 8px;
  margin-top: 23px;
}

.about-v3-numbers span {
  min-width: 96px;
  padding: 12px 14px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 16px;
  background: rgb(255 255 255 / 84%);
}

.about-v3-numbers b,
.about-v3-numbers small {
  display: block;
}

.about-v3-numbers b {
  font-size: 20px;
  line-height: 1.1;
}

.about-v3-numbers small {
  margin-top: 2px;
  color: var(--nyon-muted);
  font-size: 9px;
  font-weight: 800;
}

.about-v3-founder {
  position: relative;
  min-height: 440px;
  overflow: hidden;
  padding: 20px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 29px;
  background: linear-gradient(160deg, var(--nyon-sage), #e3ece7 67%, var(--nyon-cream));
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  box-shadow: var(--nyon-shadow-card);
}

.about-v3-founder-logo {
  position: absolute;
  z-index: 2;
  top: 17px;
  right: 17px;
  width: 67px;
  height: 47px;
  padding: 12px;
  border-radius: 14px;
  background: rgb(255 255 255 / 74%);
}

.about-v3-prof {
  width: min(100%, 330px);
  max-height: 345px;
  margin: -6px auto -20px;
  object-fit: contain;
}

.about-v3-founder-copy {
  z-index: 2;
  width: 100%;
  padding: 15px;
  border-radius: 18px;
  background: rgb(255 248 236 / 90%);
  display: flex;
  flex-direction: column;
  text-align: center;
  backdrop-filter: blur(7px);
}

.about-v3-founder-copy small {
  color: var(--nyon-success);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .14em;
}

.about-v3-founder-copy b {
  color: var(--nyon-ink);
  font-size: 24px;
}

.about-v3-founder-copy > span {
  color: var(--nyon-muted);
  font-size: 10px;
  font-weight: 800;
}

.about-v3-details {
  display: grid;
  grid-template-columns: minmax(250px, .72fr) minmax(0, 1.28fr);
  gap: 20px;
  margin-top: 25px;
  padding-top: 24px;
  border-top: 1px solid rgb(48 43 59 / 14%);
}

.about-v3-connect,
.about-v3-changelog {
  padding: 18px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 22px;
  background: rgb(255 255 255 / 84%);
}

.about-v3-connect {
  text-align: center;
}

.about-v3-connect > .v3-eyebrow {
  text-align: center;
}

.about-card-v3 .about-links {
  margin: 0 0 13px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

.about-card-v3 .about-links a {
  min-height: 44px;
  min-width: 116px;
  padding: 0 13px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 999px;
  background: var(--nyon-cream);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--nyon-ink);
  font-size: 11px;
  box-shadow: none;
}

.about-card-v3 .about-legal-row {
  margin: 0 0 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.about-card-v3 .about-legal-link {
  min-height: 34px;
  color: var(--nyon-muted);
  font-size: 9px;
}

.about-card-v3 #btn-feedback,
.about-card-v3 .about-support-link {
  min-height: 48px;
  margin-top: 8px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  text-align: center;
}

.about-card-v3 #btn-feedback {
  background: var(--nyon-pink);
  color: var(--nyon-ink);
  box-shadow: 0 4px 0 #cf648b;
}

.about-card-v3 .about-support-link {
  background: var(--nyon-ink);
  color: #fff;
  box-shadow: 0 4px 0 rgb(48 43 59 / 22%);
}

.about-card-v3 .about-sub {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  color: var(--nyon-ink);
  font-size: 14px;
  font-weight: 900;
}

.about-v3-changelog > .v3-eyebrow {
  margin-bottom: 4px;
}

.about-card-v3 .about-log {
  min-height: 210px;
  max-height: 340px;
  padding-right: 7px;
  color: var(--nyon-ink);
}

.about-card-v3 .log-entry {
  margin-bottom: 17px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgb(48 43 59 / 10%);
}

.about-card-v3 .log-v {
  background: var(--nyon-ink);
}

.about-card-v3 .log-title {
  font-weight: 900;
}

.about-card-v3 .log-items li {
  color: var(--nyon-muted);
}

/* How to Play preview. Rules stay puzzle-specific while the shell, spacing and
   action hierarchy remain consistent across the game catalog. */
.v3-howto-preview-bg .v3-howto-trigger { background: var(--nyon-butter); }

.v3-howto-demo-modal {
  padding: clamp(14px, 3vw, 24px);
  background: rgb(48 43 59 / 48%);
  backdrop-filter: blur(9px);
}

.v3-howto-card {
  width: min(100%, 650px);
  max-height: 92vh;
  max-height: 92dvh;
  padding: 24px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 30px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
  text-align: left;
  box-shadow: var(--nyon-shadow-modal);
}

.v3-howto-card .modal-x {
  top: 15px;
  right: 15px;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  background: #fff;
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

.v3-howto-heading {
  min-height: 82px;
  padding-right: 56px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.v3-howto-cover {
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  overflow: hidden;
  border: 2px solid var(--nyon-ink);
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 4px 0 rgb(48 43 59 / 13%);
}

.v3-howto-cover img { width: 100%; height: 100%; object-fit: cover; }
.v3-howto-heading > span:last-child { min-width: 0; }

.v3-howto-heading small {
  color: var(--nyon-pink-deep);
  display: block;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
}

.v3-howto-heading h2 {
  margin: 2px 0 1px;
  font-size: clamp(29px, 6vw, 39px);
  line-height: 1;
  letter-spacing: -.035em;
}

.v3-howto-heading em {
  color: var(--nyon-muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.v3-howto-body {
  margin-top: 19px;
  display: grid;
  grid-template-columns: minmax(205px, .9fr) minmax(230px, 1.1fr);
  gap: 18px;
}

.v3-howto-example {
  position: relative;
  min-height: 252px;
  overflow: hidden;
  padding: 17px 17px 15px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 23px;
  background: var(--nyon-sage);
  box-shadow: var(--nyon-shadow-card);
}

.v3-howto-mini-grid {
  position: relative;
  z-index: 1;
  width: min(100%, 210px);
  aspect-ratio: 1;
  padding: 8px;
  border: 2px solid var(--nyon-ink);
  border-radius: 17px;
  background: var(--nyon-cream);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.v3-howto-mini-grid span {
  display: grid;
  place-items: center;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
}

.v3-howto-mini-grid .word-v { background: rgb(239 127 168 / 47%); }
.v3-howto-mini-grid .search-h { background: rgb(179 207 195 / 78%); }
.v3-howto-mini-grid .cross { background: var(--nyon-butter); outline: 2px solid var(--nyon-ink); }

.v3-howto-found {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  display: flex;
  gap: 6px;
}

.v3-howto-found span {
  padding: 5px 8px;
  border: 1px solid rgb(48 43 59 / 13%);
  border-radius: 999px;
  background: rgb(255 255 255 / 84%);
  font-size: 8px;
  font-weight: 900;
}

.v3-howto-otong {
  position: absolute;
  z-index: 3;
  right: -11px;
  bottom: -9px;
  width: 83px;
  transform: rotate(-5deg);
  pointer-events: none;
}

.v3-howto-steps {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  list-style: none;
}

.v3-howto-steps li {
  min-height: 72px;
  padding: 11px 12px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 18px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 11px;
  box-shadow: var(--nyon-shadow-card);
}

.v3-howto-steps li > span {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  background: var(--nyon-pink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgb(48 43 59 / 22%);
}

.v3-howto-steps p,
.v3-howto-star-note p { margin: 0; }

.v3-howto-steps b,
.v3-howto-steps small,
.v3-howto-star-note b,
.v3-howto-star-note small { display: block; }
.v3-howto-steps b { font-size: 12px; }

.v3-howto-steps small {
  margin-top: 2px;
  color: var(--nyon-muted);
  font-size: 9px;
  font-weight: 750;
  line-height: 1.35;
}

.v3-howto-star-note {
  min-height: 55px;
  margin-top: 13px;
  padding: 9px 13px;
  border-radius: 17px;
  background: var(--nyon-butter);
  display: flex;
  align-items: center;
  gap: 10px;
}

.v3-howto-star-note > span { font-size: 24px; }
.v3-howto-star-note b { font-size: 11px; }

.v3-howto-star-note small {
  color: var(--nyon-muted);
  font-size: 9px;
  font-weight: 750;
}

.v3-howto-demo-status {
  min-height: 15px;
  margin: 5px 2px 0;
  color: var(--nyon-success);
  font-size: 9px;
  font-weight: 900;
  text-align: center;
}

.v3-howto-actions {
  margin-top: 13px;
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 9px;
}

.v3-howto-actions button {
  min-height: 50px;
  border: 1.5px solid var(--nyon-ink);
  border-radius: 16px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.v3-howto-watch { background: #fff; color: var(--nyon-ink); }
.v3-howto-start { background: var(--nyon-pink); color: var(--nyon-ink); box-shadow: 0 4px 0 #cf648b; }

.v3-howto-demo-modal.is-demo-playing .v3-howto-mini-grid .word-v,
.v3-howto-demo-modal.is-demo-playing .v3-howto-mini-grid .search-h {
  animation: v3HowtoPulse .85s ease both;
}

.v3-howto-demo-modal.is-demo-playing .v3-howto-mini-grid .search-h { animation-delay: .55s; }

@keyframes v3HowtoPulse {
  0% { transform: scale(.75); background: transparent; }
  70% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Level Complete preview. The real reward controller remains authoritative;
   this layer only gives its existing stars, XP, LP and unlock states a home. */
.v3-win-demo-modal {
  padding: clamp(14px, 3vw, 24px);
  background: rgb(48 43 59 / 50%);
  backdrop-filter: blur(9px);
}

.v3-win-card {
  width: min(100%, 465px);
  max-height: 92vh;
  max-height: 92dvh;
  padding: 17px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 31px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
  text-align: left;
  box-shadow: var(--nyon-shadow-modal);
}

.v3-win-card .modal-x {
  top: 15px;
  right: 15px;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  background: rgb(255 255 255 / 90%);
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

.v3-win-celebration {
  position: relative;
  min-height: 203px;
  overflow: hidden;
  padding: 28px 20px 17px 151px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 24px;
  background: linear-gradient(145deg, var(--nyon-rose-wash), var(--nyon-butter));
}

.v3-win-celebration::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/brand/nyon-v3/patterns/puzzle-constellation.svg') center / 330px 260px repeat;
  opacity: .14;
}

.v3-win-otong {
  position: absolute;
  z-index: 2;
  left: 5px;
  bottom: -14px;
  width: 151px;
  height: 168px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.v3-win-otong img {
  width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 7px 0 rgb(48 43 59 / 9%));
}

.v3-win-copy,
.v3-win-stars {
  position: relative;
  z-index: 3;
}

.v3-win-copy small {
  color: var(--nyon-pink-deep);
  display: block;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .14em;
}

.v3-win-copy h2 {
  margin: 4px 0 2px;
  font-size: 34px;
  line-height: .95;
  letter-spacing: -.045em;
}

.v3-win-copy p {
  margin: 5px 0 0;
  color: var(--nyon-muted);
  font-size: 10px;
  font-weight: 850;
}

.v3-win-stars {
  margin-top: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
}

.v3-win-stars span {
  color: #eba824;
  font-size: 28px;
  line-height: 1;
  text-shadow: 0 2px 0 rgb(48 43 59 / 18%);
}

.v3-win-stars small {
  width: 100%;
  margin-top: 4px;
  color: var(--nyon-muted);
  font-size: 7px;
  font-weight: 900;
  letter-spacing: .1em;
}

.v3-win-confetti {
  position: absolute;
  z-index: 1;
  width: 11px;
  height: 18px;
  border-radius: 3px;
  transform: rotate(17deg);
  animation: v3WinFloat 2.1s ease-in-out infinite alternate;
}

.v3-win-confetti-1 { top: 19px; left: 24px; background: var(--nyon-pink); }
.v3-win-confetti-2 { top: 28px; left: 125px; background: var(--nyon-success); animation-delay: -.7s; }
.v3-win-confetti-3 { right: 76px; bottom: 22px; background: var(--nyon-pink); animation-delay: -1.1s; }
.v3-win-confetti-4 { right: 21px; top: 74px; background: #eba824; animation-delay: -.35s; }

@keyframes v3WinFloat {
  from { transform: translateY(-3px) rotate(13deg); }
  to { transform: translateY(7px) rotate(31deg); }
}

.v3-win-rewards {
  margin-top: 11px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.v3-win-rewards > div {
  min-height: 70px;
  padding: 10px 12px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 18px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--nyon-shadow-card);
}

.v3-win-rewards > div > span {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 12px;
  background: var(--nyon-rose-wash);
  display: grid;
  place-items: center;
  font-size: 17px;
}

.v3-win-rewards > div:last-child > span { background: var(--nyon-butter); }
.v3-win-rewards p { margin: 0; }
.v3-win-rewards b { display: block; font-size: 15px; }
.v3-win-rewards small { color: var(--nyon-muted); display: block; font-size: 8px; font-weight: 800; }

.v3-win-progress {
  margin-top: 10px;
  padding: 12px 14px 11px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 18px;
  background: var(--nyon-sage);
}

.v3-win-progress header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.v3-win-progress header span small,
.v3-win-progress header span b { display: block; }
.v3-win-progress header span small { color: var(--nyon-success); font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.v3-win-progress header span b { font-size: 13px; }
.v3-win-progress header strong { font-size: 9px; }

.v3-win-progress > i {
  height: 9px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 80%);
  display: block;
}

.v3-win-progress > i u {
  height: 100%;
  border-radius: inherit;
  background: var(--nyon-pink);
  display: block;
  text-decoration: none;
}

.v3-win-progress > p {
  margin: 6px 0 0;
  color: var(--nyon-muted);
  font-size: 8px;
  font-weight: 800;
  text-align: right;
}

.v3-win-unlock {
  min-height: 57px;
  margin-top: 10px;
  padding: 9px 13px;
  border: 1.5px dashed rgb(48 43 59 / 34%);
  border-radius: 17px;
  background: var(--nyon-butter);
  display: flex;
  align-items: center;
  gap: 10px;
}

.v3-win-unlock > span { font-size: 23px; }
.v3-win-unlock p { margin: 0; }
.v3-win-unlock b { display: block; font-size: 11px; }
.v3-win-unlock small { color: var(--nyon-muted); display: block; font-size: 8px; font-weight: 800; }

.v3-win-actions { margin-top: 12px; }

.v3-win-actions button {
  min-height: 48px;
  border: 1.5px solid var(--nyon-ink);
  border-radius: 16px;
  color: var(--nyon-ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.v3-win-next {
  width: 100%;
  padding-inline: 18px;
  background: var(--nyon-pink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 0 #cf648b;
}

.v3-win-next span { font-size: 18px; }

.v3-win-actions > div {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.v3-win-actions > div button { min-height: 43px; background: #fff; }

.v3-win-rewards > div:only-child { grid-column: 1 / -1; }

.v3-win-no-reward {
  min-height: 64px;
  margin-top: 11px;
  padding: 11px 13px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 18px;
  background: var(--nyon-sage);
  display: flex;
  align-items: center;
  gap: 10px;
}

.v3-win-no-reward > span {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  background: #fff;
  display: grid;
  place-items: center;
  color: var(--nyon-success);
  font-size: 16px;
  font-weight: 900;
}

.v3-win-no-reward p { margin: 0; }
.v3-win-no-reward b { display: block; font-size: 11px; }
.v3-win-no-reward small { color: var(--nyon-muted); display: block; font-size: 8px; font-weight: 800; }

/* Time's Up preview uses calm colours and factual language: failing a timer is
   a retry state, not a punishment or a reason to imply lost progress. */
.v3-lose-demo-modal {
  padding: clamp(14px, 3vw, 24px);
  background: rgb(48 43 59 / 50%);
  backdrop-filter: blur(9px);
}

.v3-lose-card {
  width: min(100%, 425px);
  max-height: 92vh;
  max-height: 92dvh;
  padding: 18px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 31px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
  text-align: center;
  box-shadow: var(--nyon-shadow-modal);
}

.v3-lose-card .modal-x {
  top: 15px;
  right: 15px;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  background: #fff;
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

.v3-lose-hero {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 24px;
  background: linear-gradient(150deg, var(--nyon-sage), #e5ece6 58%, var(--nyon-rose-wash));
}

.v3-lose-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../assets/brand/nyon-v3/patterns/puzzle-constellation.svg') center / 330px 260px repeat;
  opacity: .13;
}

.v3-lose-hero > img {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: -13px;
  width: 176px;
  max-height: 187px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(0 7px 0 rgb(48 43 59 / 8%));
}

.v3-lose-clock {
  position: absolute;
  z-index: 3;
  top: 23px;
  left: calc(50% + 50px);
  width: 52px;
  height: 52px;
  border: 3px solid var(--nyon-ink);
  border-radius: 50%;
  background: var(--nyon-butter);
  box-shadow: 0 4px 0 rgb(48 43 59 / 14%);
  transform: rotate(8deg);
}

.v3-lose-clock::before,
.v3-lose-clock::after {
  content: '';
  position: absolute;
  top: -7px;
  width: 15px;
  height: 11px;
  border: 3px solid var(--nyon-ink);
  border-bottom: 0;
  border-radius: 9px 9px 0 0;
}

.v3-lose-clock::before { left: 1px; transform: rotate(-35deg); }
.v3-lose-clock::after { right: 1px; transform: rotate(35deg); }

.v3-lose-clock i,
.v3-lose-clock b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  border-radius: 3px;
  background: var(--nyon-ink);
  transform-origin: 50% 0;
}

.v3-lose-clock i { height: 15px; transform: translate(-50%, 0) rotate(154deg); }
.v3-lose-clock b { height: 12px; transform: translate(-50%, 0) rotate(240deg); }

.v3-lose-card > .v3-eyebrow {
  margin: 19px 0 5px;
  color: var(--nyon-pink-deep);
  text-align: center;
}

.v3-lose-card > h2 {
  margin: 0;
  font-size: 33px;
  line-height: 1;
  letter-spacing: -.04em;
}

.v3-lose-copy {
  margin: 7px auto 16px;
  color: var(--nyon-muted);
  font-size: 11px;
  font-weight: 800;
}

.v3-lose-notes {
  display: grid;
  gap: 8px;
  text-align: left;
}

.v3-lose-notes > div {
  min-height: 62px;
  padding: 9px 11px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 17px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--nyon-shadow-card);
}

.v3-lose-notes > div > span {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 12px;
  background: var(--nyon-rose-wash);
  display: grid;
  place-items: center;
  font-size: 17px;
  font-weight: 900;
}

.v3-lose-notes > div:last-child > span { background: var(--nyon-sage); color: var(--nyon-success); }
.v3-lose-notes p { margin: 0; }
.v3-lose-notes b { display: block; font-size: 11px; }
.v3-lose-notes small { color: var(--nyon-muted); display: block; font-size: 8px; font-weight: 800; }

.v3-lose-actions { margin-top: 13px; display: grid; gap: 8px; }

.v3-lose-actions button {
  min-height: 49px;
  border: 1.5px solid var(--nyon-ink);
  border-radius: 16px;
  color: var(--nyon-ink);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}

.v3-lose-retry {
  padding-inline: 18px;
  background: var(--nyon-pink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 0 #cf648b;
}

.v3-lose-retry span { font-size: 18px; }
.v3-lose-levels { background: #fff; }

.v3-lose-preview-bg .v3-lose-time { color: var(--nyon-butter); }

/* XP explanation preview. It separates permanent XP, spendable Stars and
   period-based League Points without changing any reward calculation. */
.v3-xp-app-bar {
  justify-content: space-between;
}

.v3-xp-trigger {
  min-height: 48px;
  padding: 5px 10px 5px 6px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 16px;
  background: #fff;
  color: var(--nyon-ink);
  display: flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  text-align: left;
  box-shadow: var(--nyon-shadow-card);
  cursor: pointer;
}

.v3-xp-trigger > span {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  overflow: hidden;
  border: 1.5px solid var(--nyon-ink);
  border-radius: 12px;
  background: var(--nyon-rose-wash);
}

.v3-xp-trigger img { width: 42px; height: 42px; object-fit: contain; transform: translate(-3px, 2px); }
.v3-xp-trigger p { margin: 0; min-width: 75px; }
.v3-xp-trigger small,
.v3-xp-trigger b { display: block; }
.v3-xp-trigger small { color: var(--nyon-success); font-size: 6px; font-weight: 900; letter-spacing: .09em; }
.v3-xp-trigger b { font-size: 11px; }
.v3-xp-trigger i { color: var(--nyon-muted); font-size: 18px; font-style: normal; }

.v3-xp-shell {
  position: relative;
  z-index: 1;
  height: calc(100% - 68px);
  padding: 42px clamp(18px, 5vw, 42px);
}

.v3-xp-shell h1 {
  max-width: 560px;
  margin: 8px 0 25px;
  font-size: clamp(40px, 8vw, 70px);
  line-height: .97;
  letter-spacing: -.05em;
}

.v3-xp-fake-cards {
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.v3-xp-fake-cards span {
  aspect-ratio: 1.55;
  border: 1.5px solid rgb(48 43 59 / 12%);
  border-radius: 25px;
  background: linear-gradient(145deg, rgb(255 255 255 / 92%), rgb(251 230 237 / 88%));
  box-shadow: var(--nyon-shadow-card);
}

.v3-xp-demo-modal {
  padding: clamp(14px, 3vw, 24px);
  background: rgb(48 43 59 / 50%);
  backdrop-filter: blur(9px);
}

.v3-xp-card {
  width: min(100%, 520px);
  max-width: 520px;
  max-height: 92vh;
  max-height: 92dvh;
  padding: 20px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 31px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
  text-align: left;
  box-shadow: var(--nyon-shadow-modal);
}

.v3-xp-card .modal-x {
  top: 15px;
  right: 15px;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  background: #fff;
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

.v3-xp-heading {
  min-height: 116px;
  padding: 14px 57px 14px 14px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 23px;
  background: linear-gradient(145deg, var(--nyon-rose-wash), var(--nyon-butter));
  display: grid;
  grid-template-columns: 93px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
}

.v3-xp-otong {
  width: 91px;
  height: 91px;
  overflow: hidden;
  border: 2px solid var(--nyon-ink);
  border-radius: 25px;
  background: rgb(255 255 255 / 72%);
  display: grid;
  place-items: center;
}

.v3-xp-otong img { width: 104px; height: 104px; object-fit: contain; }
.v3-xp-heading > span:last-child { min-width: 0; }
.v3-xp-heading > span:last-child > small { color: var(--nyon-pink-deep); display: block; font-size: 7px; font-weight: 900; letter-spacing: .12em; }

.v3-xp-heading h2 {
  margin: 3px 0 2px;
  font-size: 30px;
  line-height: .98;
  letter-spacing: -.04em;
}

.v3-xp-heading p {
  margin: 5px 0 0;
  color: var(--nyon-muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.35;
}

.v3-xp-level {
  margin-top: 10px;
  padding: 12px 14px 11px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 18px;
  background: var(--nyon-sage);
}

.v3-xp-level header { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.v3-xp-level header span small,
.v3-xp-level header span b { display: block; }
.v3-xp-level header span small { color: var(--nyon-success); font-size: 7px; font-weight: 900; letter-spacing: .1em; }
.v3-xp-level header span b { font-size: 13px; }
.v3-xp-level header strong { font-size: 9px; }
.v3-xp-level > i { height: 9px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: rgb(255 255 255 / 82%); display: block; }
.v3-xp-level > i u { height: 100%; border-radius: inherit; background: var(--nyon-pink); display: block; text-decoration: none; }
.v3-xp-level > p { margin: 6px 0 0; color: var(--nyon-muted); font-size: 8px; font-weight: 800; text-align: right; }

.v3-xp-earn { margin-top: 13px; }
.v3-xp-earn h3 { margin: 0 0 8px; font-size: 13px; }

.v3-xp-earn > div {
  min-height: 52px;
  padding: 7px 10px;
  border-top: 1px solid rgb(48 43 59 / 10%);
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
}

.v3-xp-earn > div > span {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--nyon-rose-wash);
  display: grid;
  place-items: center;
  font-size: 16px;
}

.v3-xp-earn > div:nth-of-type(2) > span { background: var(--nyon-butter); }
.v3-xp-earn > div:nth-of-type(3) > span { background: var(--nyon-sage); }
.v3-xp-earn p { margin: 0; }
.v3-xp-earn b { display: block; font-size: 10px; }
.v3-xp-earn small { color: var(--nyon-muted); display: block; font-size: 8px; font-weight: 800; }
.v3-xp-earn strong { color: var(--nyon-pink-deep); font-size: 10px; }

.v3-xp-difference {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.v3-xp-difference > div {
  min-height: 70px;
  padding: 9px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 15px;
  background: #fff;
}

.v3-xp-difference b,
.v3-xp-difference span,
.v3-xp-difference small { display: block; }
.v3-xp-difference b { color: var(--nyon-pink-deep); font-size: 10px; }
.v3-xp-difference > div:nth-child(2) b { color: var(--nyon-warning); }
.v3-xp-difference > div:nth-child(3) b { color: var(--nyon-success); }
.v3-xp-difference span { margin-top: 3px; font-size: 9px; font-weight: 900; }
.v3-xp-difference small { margin-top: 2px; color: var(--nyon-muted); font-size: 7px; font-weight: 800; }

.v3-xp-note {
  margin: 10px 4px 11px;
  color: var(--nyon-muted);
  font-size: 8px;
  font-weight: 800;
  line-height: 1.4;
  text-align: center;
}

.v3-xp-done {
  width: 100%;
  min-height: 50px;
  border: 1.5px solid var(--nyon-ink);
  border-radius: 16px;
  background: var(--nyon-pink);
  color: var(--nyon-ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 4px 0 #cf648b;
  cursor: pointer;
}

/* Gameplay master shells. Every board and input model still comes from its
   existing game engine; this layer only owns the surrounding chrome, spacing
   and branded surfaces. */
.v3-play-mark { display: none; }

.v3-gameplay-shell {
  isolation: isolate;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
}

.v3-gameplay-shell::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url('../assets/brand/nyon-v3/patterns/puzzle-constellation.svg') center / 390px 307px repeat;
  opacity: .26;
  pointer-events: none;
}

.v3-gameplay-shell > * {
  position: relative;
  z-index: 1;
}

.v3-gameplay-shell .app-bar {
  position: relative;
  min-height: 68px;
  padding: 10px 14px;
  gap: 7px;
  border-bottom: 1px solid rgb(48 43 59 / 10%);
  border-radius: 0 0 20px 20px;
  background: linear-gradient(180deg, rgb(255 255 255 / 96%), rgb(255 248 236 / 94%));
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 90%),
    0 4px 0 rgb(48 43 59 / 7%),
    0 10px 24px rgb(48 43 59 / 7%);
}

.v3-gameplay-shell .app-bar-title {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  display: flex;
  flex: none;
  justify-content: center;
  transform: translate(-50%, -50%);
}

.v3-gameplay-shell #play-title { display: none; }
.v3-gameplay-shell .v3-play-mark { width: 100px; height: auto; display: block; }

.v3-gameplay-shell .icon-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 15px;
  background: linear-gradient(180deg, #fff, #f9f6f1);
  color: var(--nyon-ink);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 95%),
    inset 0 -1px 0 rgb(48 43 59 / 5%),
    0 4px 0 rgb(48 43 59 / 14%),
    0 9px 16px rgb(48 43 59 / 7%);
}

.v3-gameplay-shell .icon-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 2px rgb(48 43 59 / 10%), 0 2px 0 rgb(48 43 59 / 14%);
}

.v3-gameplay-shell #btn-howto-play { margin-left: auto; }
.v3-gameplay-shell .audio-open-btn {
  background: linear-gradient(180deg, #fff0ba, var(--nyon-butter));
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 58%),
    inset 0 -1px 0 rgb(142 110 32 / 12%),
    0 4px 0 #c9aa54,
    0 9px 16px rgb(48 43 59 / 7%);
}

.v3-gameplay-shell .play-toolbar {
  width: min(100%, 448px);
  margin: 0 auto;
  padding: 8px 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  flex: none;
}

.v3-gameplay-shell .tool-btn {
  min-width: 0;
  min-height: 44px;
  padding: 6px 8px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 14px;
  background: linear-gradient(180deg, rgb(255 255 255 / 98%), rgb(249 246 241 / 96%));
  justify-content: center;
  color: var(--nyon-ink);
  font-size: 10.5px;
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 95%),
    inset 0 -1px 0 rgb(48 43 59 / 5%),
    0 4px 0 rgb(48 43 59 / 13%),
    0 8px 15px rgb(48 43 59 / 6%);
}

.v3-gameplay-shell .tool-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 2px rgb(48 43 59 / 9%), 0 2px 0 rgb(48 43 59 / 13%);
}

.v3-gameplay-shell .tool-btn.active {
  border-color: var(--nyon-ink);
  background: var(--nyon-ink);
  color: #fff;
}

.v3-gameplay-shell .tool-badge {
  top: -5px;
  right: -4px;
  background: var(--nyon-pink);
  color: var(--nyon-ink);
}

.v3-gameplay-shell .tool-btn.clue-buy .tool-badge {
  background: var(--nyon-orange, #e56a3f);
  color: #fff;
}

.v3-gameplay-shell .draft-resume-notice { grid-column: 1 / -1; }
.v3-daily-gameplay .challenge-play-status { grid-column: 1 / -1; width: 100%; }

.v3-gameplay-shell .play-stage {
  justify-content: flex-start;
  padding: 8px 14px calc(18px + var(--safe-b));
  background-image: none !important;
}

.v3-gameplay-status-strip {
  width: min(calc(100% - 28px), 420px);
  min-height: 44px;
  margin: 10px auto 0;
  padding: 6px 10px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 15px;
  background: linear-gradient(180deg, rgb(255 255 255 / 97%), rgb(250 247 242 / 94%));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 90%),
    0 4px 0 rgb(48 43 59 / 10%),
    0 10px 20px rgb(48 43 59 / 5%);
}

.v3-gameplay-level small,
.v3-gameplay-level b { display: block; }

.v3-gameplay-level small {
  color: var(--nyon-muted);
  font-size: 6.5px;
  font-weight: 900;
  letter-spacing: .1em;
}

.v3-gameplay-level b {
  margin-top: 3px;
  color: var(--nyon-ink);
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.v3-gameplay-shell .ws-theme {
  min-width: 0;
  margin: 0;
  padding: 2px 9px;
  border: 0;
  border-right: 1px solid rgb(48 43 59 / 11%);
  border-left: 1px solid rgb(48 43 59 / 11%);
  border-radius: 0;
  background: transparent;
  color: var(--nyon-muted);
  font-size: 10px;
  line-height: 1.25;
  text-align: center;
}

.v3-gameplay-shell .ws-theme b {
  color: var(--nyon-success);
  font-size: 11.5px;
}

.v3-gameplay-shell .play-hud {
  margin: 0;
  color: var(--nyon-muted);
  font-size: 10px;
  white-space: nowrap;
}

.v3-gameplay-shell .play-hud b { font-size: 12px; }

.v3-gameplay-shell .ws-board-layout {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.v3-gameplay-shell .ws-word-panel {
  min-width: 0;
  overflow: visible;
}

.v3-gameplay-shell .ws-landscape-hint { display: none; }

.v3-gameplay-shell .ws-word-panel .ws-words {
  margin: 0;
  padding: 2px 2px 4px;
  flex-wrap: wrap;
  justify-content: center;
  overflow: visible;
}

.v3-gameplay-shell .ws-word {
  flex: none;
  padding: 6px 10px;
  border: 1px solid rgb(48 43 59 / 9%);
  background: rgb(255 255 255 / 90%);
  font-size: 12px;
  box-shadow: 0 2px 0 rgb(48 43 59 / 17%);
}

/* Shikaku has two real game actions, so it gets two honest equal columns
   instead of a decorative third button. The canvas remains the original
   engine canvas and is only scaled inside a clearer board surface. */
.v3-gameplay-shell[data-game="shikaku"] .play-toolbar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v3-gameplay-shell[data-game="shikaku"] .v3-gameplay-status-strip {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.v3-shikaku-rule {
  min-width: 0;
  padding-inline: 9px;
  border-right: 1px solid rgb(48 43 59 / 11%);
  border-left: 1px solid rgb(48 43 59 / 11%);
  color: var(--nyon-muted);
  font-size: 9px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.v3-shikaku-rule b {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-right: 3px;
  border: 1.5px solid var(--nyon-success);
  border-radius: 5px;
  place-items: center;
  background: rgb(184 205 193 / 38%);
  color: var(--nyon-success);
  font-size: 10px;
}

.v3-gameplay-shell[data-game="shikaku"] .play-hud {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.v3-gameplay-shell[data-game="shikaku"] .play-hud span {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 3px;
  width: 100%;
  line-height: 1.08;
  text-align: right;
  white-space: nowrap;
}

.v3-gameplay-shell[data-game="shikaku"] .play-hud b {
  color: var(--nyon-success);
}

.v3-gameplay-shell[data-game="shikaku"] .play-stage {
  gap: 7px;
}

.v3-shikaku-board-note {
  width: min(100%, 380px);
  margin: 0 auto;
  color: var(--nyon-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  text-align: center;
}

.v3-gameplay-shell[data-game="shikaku"] .maze-wrap {
  width: min(100%, 392px);
  margin: 0 auto;
  padding: 12px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 22px;
  background: rgb(255 255 255 / 88%);
  box-shadow: var(--nyon-shadow-card);
}

.v3-gameplay-shell[data-game="shikaku"] #sq-canvas {
  display: block;
  width: min(100%, 360px) !important;
  height: auto !important;
  margin: 0 auto;
  border-radius: 13px;
  box-shadow: 0 3px 0 rgb(48 43 59 / 16%);
}

.v3-shikaku-howto-rule {
  margin: 16px 0 13px;
  padding: 12px;
  border: 1.5px solid rgb(48 43 59 / 12%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgb(184 205 193 / 38%);
}

.v3-shikaku-howto-rule > span {
  width: 38px;
  height: 38px;
  border: 2px solid var(--nyon-success);
  border-radius: 9px;
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  background: #fff;
  color: var(--nyon-ink);
  font-weight: 950;
}

.v3-shikaku-howto-rule p { margin: 0; }
.v3-shikaku-howto-rule b,
.v3-shikaku-howto-rule small { display: block; }
.v3-shikaku-howto-rule b { font-size: 12px; }
.v3-shikaku-howto-rule small { margin-top: 2px; color: var(--nyon-muted); font-size: 9px; }

/* Count the Cubes is answer-first rather than tool-first. Its one real Hint
   action sits beside the answer, leaving the cube illustration as the visual
   focus and keeping the calculator within a short thumb reach. */
.v3-gameplay-shell[data-game="spatial"] .v3-gameplay-status-strip {
  grid-template-columns: auto minmax(0, 1fr);
}

.v3-gameplay-shell[data-game="spatial"] .sp-hud {
  min-width: 0;
  margin: 0;
  padding-inline: 9px;
  border-left: 1px solid rgb(48 43 59 / 11%);
  color: var(--nyon-ink);
  font-size: 10.5px;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

.v3-gameplay-shell[data-game="spatial"] .sp-hud span { line-height: inherit; }

.v3-gameplay-shell[data-game="spatial"] .play-stage {
  gap: 8px;
  padding-top: 7px;
}

.v3-gameplay-shell[data-game="spatial"] .maze-wrap {
  width: min(100%, 420px);
  margin: 0 auto;
  padding: 8px 10px;
  border: 1.5px solid rgb(48 43 59 / 12%);
  border-radius: 22px;
  display: flex;
  justify-content: center;
  background: rgb(255 255 255 / 82%);
  box-shadow: var(--nyon-shadow-card);
}

.v3-gameplay-shell[data-game="spatial"] #sp-canvas {
  display: block;
  max-width: 100%;
  height: auto !important;
  margin: 0 auto;
}

.v3-spatial-answer-row {
  width: min(100%, 300px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: end;
  gap: 9px;
}

.v3-spatial-answer-label {
  min-width: 0;
}

.v3-spatial-answer-label small {
  display: block;
  margin: 0 0 4px 4px;
  color: var(--nyon-muted);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: .12em;
}

.v3-gameplay-shell[data-game="spatial"] .sp-answer {
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 7px 14px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: rgb(255 255 255 / 92%);
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

.v3-spatial-answer-row .tool-btn {
  width: 112px;
  min-height: 52px;
  margin: 0;
}

.v3-gameplay-shell[data-game="spatial"] .calc-pad {
  width: min(100%, 300px);
  gap: 7px;
  margin: 0 auto;
}

.v3-gameplay-shell[data-game="spatial"] .calc-pad .sk-key {
  height: 43px;
  border: 1.5px solid rgb(48 43 59 / 10%);
  border-radius: 13px;
  background: rgb(255 255 255 / 92%);
  color: var(--nyon-ink);
  box-shadow: 0 3px 0 rgb(48 43 59 / 15%);
}

.v3-gameplay-shell[data-game="spatial"] .calc-pad .sp-ok {
  border-color: var(--nyon-success);
  background: var(--nyon-success);
  color: #fff;
}

/* Every remaining live puzzle keeps its original board and controls. This
   shared frame only normalises the surrounding rhythm so two real actions do
   not leave a fake third column, and a game with no tools leaves no spacer. */
.v3-generic-gameplay .play-toolbar {
  grid-template-columns: repeat(var(--v3-tool-count, 1), minmax(0, 1fr));
}

.v3-generic-gameplay .play-toolbar[hidden] { display: none; }

.v3-generic-gameplay .v3-gameplay-status-strip {
  grid-template-columns: auto minmax(0, 1fr);
}

.v3-generic-gameplay .play-hud {
  min-width: 0;
  margin: 0;
  padding-left: 9px;
  border-left: 1px solid rgb(48 43 59 / 11%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  overflow: hidden;
  color: var(--nyon-muted);
  line-height: 1.15;
  text-align: right;
  white-space: normal;
}

.v3-generic-gameplay .play-hud span {
  min-width: 0;
  white-space: nowrap;
}

.v3-generic-gameplay .play-hud b { color: var(--nyon-success); }

.v3-generic-gameplay .play-stage {
  gap: 8px;
  padding-top: 8px;
}

.v3-generic-gameplay[data-game="maze"] .maze-wrap,
.v3-generic-gameplay[data-game="pipes"] .maze-wrap,
.v3-generic-gameplay[data-game="flow"] .maze-wrap {
  width: min(100%, 404px);
  margin: 0 auto;
  padding: 10px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 22px;
  background: rgb(255 255 255 / 88%);
  box-shadow: var(--nyon-shadow-card);
}

/* The maze grid itself is geometrically square. The soft outer card belongs
   to the app shell; the playable board no longer pretends its corners curve. */
.v3-generic-gameplay[data-game="maze"] #maze-canvas {
  max-width: 100%;
  height: auto !important;
  margin: 0 auto;
  border-radius: 0;
  box-shadow: none;
}

.v3-generic-gameplay[data-game="maze"] .dpad {
  margin-top: 4px;
  gap: 7px;
}

.v3-generic-gameplay[data-game="maze"] .dpad button {
  min-width: 54px;
  min-height: 54px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  background: rgb(255 255 255 / 94%);
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}

.v3-generic-gameplay[data-game="maze"] .dpad button:active {
  border-color: var(--nyon-ink);
  background: var(--nyon-pink);
}

.v3-generic-gameplay[data-game="memory"] .me-grid {
  margin-top: 4px;
}

.v3-generic-gameplay[data-game="memory"] .play-stage {
  justify-content: center;
  padding-top: 12px;
  padding-bottom: calc(28px + var(--safe-b));
}

.v3-generic-gameplay[data-game="memory"] .me-card {
  border: 1.5px solid var(--nyon-ink);
  border-radius: 14px;
  background: var(--nyon-pink);
  box-shadow: 0 4px 0 rgb(48 43 59 / 22%);
}

.v3-generic-gameplay[data-game="memory"] .me-card::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1px solid rgb(255 248 236 / 46%);
  border-radius: 9px;
  pointer-events: none;
}

.v3-generic-gameplay[data-game="memory"] .me-back img {
  width: 66%;
  max-height: 44%;
  object-fit: contain;
}

.v3-generic-gameplay[data-game="memory"] .me-card.up {
  border-color: rgb(48 43 59 / 18%);
  background: #fff;
}

.v3-generic-gameplay[data-game="memory"] .me-card.done {
  border-color: var(--nyon-success);
  background: var(--nyon-sage);
  box-shadow: none;
}

.v3-generic-gameplay[data-game="pipes"] #pipes-canvas {
  max-width: 100%;
  height: auto !important;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: none;
}

.v3-generic-gameplay[data-game="flow"] #flow-canvas {
  max-width: 100%;
  height: auto !important;
  margin: 0 auto;
  border-radius: 14px;
  box-shadow: none;
}

.v3-generic-gameplay[data-game="sudoku"] .sk-grid {
  border: 3px solid var(--nyon-ink);
  padding: 6px;
  gap: 0;
  border-radius: 0;
  background: var(--nyon-surface);
  box-shadow: 0 4px 0 rgb(48 43 59 / 14%);
  overflow: hidden;
}

.v3-generic-gameplay[data-game="sudoku"] .sk-cell {
  border-radius: 0;
  border: 0;
  box-shadow: inset -1px -1px 0 #e5dac8;
  background: #fff;
  color: var(--nyon-success);
}

.v3-generic-gameplay[data-game="sudoku"] .sk-cell.bl { border-left: 2px solid var(--nyon-ink); }
.v3-generic-gameplay[data-game="sudoku"] .sk-cell.bt { border-top: 2px solid var(--nyon-ink); }
.v3-generic-gameplay[data-game="sudoku"] .sk-cell.br { border-right: 2px solid var(--nyon-ink); }
.v3-generic-gameplay[data-game="sudoku"] .sk-cell.bb { border-bottom: 2px solid var(--nyon-ink); }

.v3-generic-gameplay[data-game="sudoku"] .sk-cell.fixed {
  /* Quiet sage distinguishes the original clues from the player's entries. */
  background: #e9f0ec;
  color: var(--nyon-ink);
}

.v3-generic-gameplay[data-game="sudoku"] .sk-cell.sel {
  z-index: 1;
  outline: 3px solid var(--nyon-pink);
  outline-offset: -3px;
  background: var(--nyon-butter);
}

.v3-generic-gameplay[data-game="sudoku"] .sk-key {
  width: auto;
  height: auto;
  min-height: 46px;
  padding: 12px 0;
  border: none;
  border-radius: 10px;
  background: rgb(255 255 255 / 94%);
  color: var(--nyon-ink);
  box-shadow: 0 3px 0 rgb(48 43 59 / 18%);
}

.v3-generic-gameplay[data-game="sudoku"] .sk-pad {
  display: grid;
  gap: 6px;
  max-width: 100%;
  margin: 14px auto 0;
}

.v3-generic-gameplay[data-game="sudoku"] .sk-erase { background: var(--nyon-cream); }

/* Keep conflict digits readable even on fixed/selected cells and clue art. */
.v3-generic-gameplay[data-game="sudoku"] .sk-cell.bad .sk-v,
.v3-generic-gameplay:is([data-game="kropki"], [data-game="thermo"], [data-game="arrow"]) .sv-cell.bad .sv-v,
.v3-generic-gameplay[data-game="killer"] .ks-cell.bad .ks-v {
  color: var(--nyon-danger);
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.v3-generic-gameplay[data-game="blockslide"] .bs-board {
  border: 2px solid var(--nyon-ink);
  border-radius: 20px;
  background:
    repeating-linear-gradient(90deg, rgb(48 43 59 / 8%) 0 1px, transparent 1px var(--bs-cell, 56px)),
    repeating-linear-gradient(0deg, rgb(48 43 59 / 8%) 0 1px, transparent 1px var(--bs-cell, 56px)),
    var(--nyon-rose-wash);
  background-position: 6px 6px;
  box-shadow: inset 0 2px 10px rgb(48 43 59 / 8%), var(--nyon-shadow-card);
}

.v3-generic-gameplay[data-game="blockslide"] .bs-block {
  border: 1.5px solid var(--nyon-ink);
  background: linear-gradient(#d7e4dc, var(--nyon-sage));
  box-shadow: 0 3px 0 rgb(48 43 59 / 22%), inset 0 2px 0 rgb(255 255 255 / 58%);
}

.v3-generic-gameplay[data-game="blockslide"] .bs-block.hero {
  background: linear-gradient(#f4a5c1, var(--nyon-pink));
  box-shadow: 0 3px 0 #c75f88, inset 0 2px 0 rgb(255 255 255 / 50%);
}

.v3-generic-gameplay[data-game="blockslide"] .bs-exit {
  color: var(--nyon-pink);
  text-shadow: 0 2px 0 #fff;
}

.v3-generic-gameplay[data-game="nonogram"] #ng-canvas,
.v3-generic-gameplay[data-game="akari"] #ak-canvas {
  max-width: 100%;
  height: auto !important;
  margin: 0 auto;
  border: 1.5px solid rgb(48 43 59 / 20%);
  border-radius: 0;
  background: var(--nyon-cream);
  box-shadow: 0 5px 0 rgb(48 43 59 / 14%);
}

.v3-generic-gameplay[data-game="emoji"] .rb-clue {
  width: min(100%, 420px);
  min-height: 124px;
  margin: 0 0 14px;
  padding: 20px 14px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 20px;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--nyon-shadow-card);
}

.v3-generic-gameplay[data-game="emoji"] .rb-letter {
  border: 1px solid rgb(48 43 59 / 13%);
  background: var(--nyon-butter);
  box-shadow: none;
}

.v3-generic-gameplay[data-game="emoji"] .rb-q { color: var(--nyon-pink); }

.v3-generic-gameplay[data-game="emoji"] .em-opts { gap: 10px; }

.v3-generic-gameplay[data-game="emoji"] .play-stage,
.v3-generic-gameplay[data-game="anagram"] .play-stage,
.v3-generic-gameplay[data-game="pattern"] .play-stage {
  align-items: center;
}

.v3-generic-gameplay[data-game="emoji"] .em-opts,
.v3-generic-gameplay[data-game="emoji"] .em-answer-wrap {
  width: min(100%, 420px);
  margin-inline: auto;
}

.v3-generic-gameplay[data-game="emoji"] .em-opt {
  min-height: 56px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 16px;
  background: rgb(255 255 255 / 95%);
  box-shadow: 0 4px 0 rgb(48 43 59 / 18%);
}

.v3-generic-gameplay[data-game="emoji"] .em-opt:nth-child(1),
.v3-generic-gameplay[data-game="emoji"] .em-opt:nth-child(4) {
  background: rgb(184 205 193 / 34%);
}

.v3-generic-gameplay[data-game="emoji"] .em-scaffold {
  padding: 12px;
  border-radius: 14px;
  background: rgb(184 205 193 / 24%);
}

.v3-generic-gameplay[data-game="anagram"] .an-clue {
  width: fit-content;
  margin: 2px auto 18px;
  padding: 8px 14px;
  border: 1px solid rgb(48 43 59 / 10%);
  border-radius: 999px;
  background: #e9f0ec;
}

.v3-generic-gameplay[data-game="anagram"] .an-clue b { color: var(--nyon-success); }

.v3-generic-gameplay[data-game="anagram"] .an-slots,
.v3-generic-gameplay[data-game="anagram"] .an-tiles {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.v3-generic-gameplay[data-game="anagram"] .an-slots {
  min-height: 45px;
  margin: 0 auto 10px;
}

.v3-generic-gameplay[data-game="anagram"] .an-slot {
  width: 1.55em;
  height: 1.7em;
  padding: 0;
  border: 0;
  border-bottom: 0;
  border-radius: 0;
  background: transparent;
  color: var(--nyon-muted);
  font: inherit;
  font-size: inherit;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
}

.v3-generic-gameplay[data-game="anagram"] .an-slot.filled {
  color: var(--nyon-ink);
}

.v3-generic-gameplay[data-game="anagram"] .an-slots.ok .an-slot {
  color: var(--nyon-success);
}

.v3-generic-gameplay[data-game="anagram"] .an-tiles { margin: 0 auto 18px; }

.v3-generic-gameplay[data-game="anagram"] .an-tile {
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 14px;
  box-shadow: 0 4px 0 rgb(48 43 59 / 18%);
}

.v3-generic-gameplay[data-game="anagram"] .an-tile.used {
  opacity: .2;
  transform: scale(.9);
}

.v3-generic-gameplay[data-game="anagram"] .an-check { min-width: 140px; }

.v3-generic-gameplay[data-game="pattern"] .pt-row {
  width: min(100%, 420px);
  margin: 0 0 18px;
  padding: 16px 10px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 18px;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--nyon-shadow-card);
}

.v3-generic-gameplay[data-game="pattern"] .pt-chip {
  border: 1px solid rgb(48 43 59 / 12%);
  border-radius: 13px;
  box-shadow: 0 3px 0 rgb(48 43 59 / 16%);
}

.v3-generic-gameplay[data-game="pattern"] .pt-chip.blank {
  border-color: var(--nyon-pink);
  background: var(--nyon-butter);
  color: var(--nyon-ink);
}

.v3-generic-gameplay[data-game="kropki"] .sv-tip {
  max-width: min(100%, 400px);
  padding: 9px 12px;
  border-radius: 13px;
  background: #e9f0ec;
  color: var(--nyon-muted);
  line-height: 1.5;
}

.v3-generic-gameplay[data-game="kropki"] .sv-panel {
  border-radius: 0;
  box-shadow: 0 5px 0 rgb(48 43 59 / 15%);
}

.v3-generic-gameplay[data-game="kropki"] .sv-cell.given { background: #eef3f0; }

.v3-generic-gameplay[data-game="detective"] .play-stage,
.v3-generic-gameplay[data-game="recall"] .play-stage,
.v3-generic-gameplay[data-game="simon"] .play-stage,
.v3-generic-gameplay[data-game="thermo"] .play-stage,
.v3-generic-gameplay[data-game="arrow"] .play-stage,
.v3-generic-gameplay[data-game="bimaru"] .play-stage {
  align-items: center;
}

.v3-generic-gameplay[data-game="detective"] .dt-clues {
  width: min(100%, 420px);
  margin: 0 auto 16px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 17px;
  background: linear-gradient(180deg, #fff, #fbfaf7);
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgb(48 43 59 / 12%);
}

.v3-generic-gameplay[data-game="detective"] .dt-houses {
  max-width: 420px;
  margin-bottom: 16px;
}

.v3-generic-gameplay[data-game="detective"] .dt-house {
  min-height: clamp(86px, 21vw, 108px);
  border: 2px dashed rgb(47 102 87 / 30%);
  border-radius: 17px;
  background: linear-gradient(180deg, rgb(255 255 255 / 76%), rgb(233 240 236 / 78%));
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 78%), 0 4px 0 rgb(48 43 59 / 9%);
}

.v3-generic-gameplay[data-game="detective"] .dt-house.filled {
  border-color: var(--nyon-success);
  background: linear-gradient(180deg, #f5faf7, #dfeae4);
  box-shadow: inset 0 2px 0 #fff, 0 5px 0 rgb(47 102 87 / 24%);
}

.v3-generic-gameplay[data-game="detective"] .dt-chip {
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 13px;
  background: linear-gradient(180deg, #fff, #f8f5f0);
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgb(48 43 59 / 17%);
}

.v3-generic-gameplay[data-game="recall"] .rc-status,
.v3-generic-gameplay[data-game="simon"] .si-status {
  width: min(100%, 320px);
  margin: 0 auto 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #e9f0ec;
  color: var(--nyon-ink);
}

.v3-generic-gameplay[data-game="recall"] .rc-grid { gap: 10px; }

.v3-generic-gameplay[data-game="recall"] .rc-cell {
  border: 1.5px solid rgb(48 43 59 / 12%);
  border-radius: 17px;
  background: linear-gradient(145deg, #fff, #f5f1eb);
  box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 rgb(48 43 59 / 5%), 0 5px 0 rgb(48 43 59 / 16%);
}

.v3-generic-gameplay[data-game="recall"] .rc-cell.got {
  background: linear-gradient(145deg, #f4faf6, var(--nyon-sage));
}

.v3-generic-gameplay[data-game="simon"] .si-hud {
  width: min(100%, 300px);
  margin-inline: auto;
}

.v3-generic-gameplay[data-game="simon"] .si-pads { gap: 14px; }

.v3-generic-gameplay[data-game="simon"] .si-pad {
  border: 2px solid rgb(48 43 59 / 20%);
  border-radius: 23px;
  opacity: .72;
  box-shadow:
    inset 3px 3px 0 rgb(255 255 255 / 34%),
    inset -3px -3px 0 rgb(48 43 59 / 10%),
    0 7px 0 rgb(48 43 59 / 20%),
    0 13px 22px rgb(48 43 59 / 8%);
}

.v3-generic-gameplay[data-game="simon"] .si-pad.lit {
  opacity: 1;
  transform: translateY(-2px) scale(1.035);
  filter: saturate(1.12) brightness(1.06);
  box-shadow: inset 3px 3px 0 rgb(255 255 255 / 48%), 0 9px 0 rgb(48 43 59 / 18%), 0 0 24px rgb(240 216 135 / 55%);
}

.v3-generic-gameplay[data-game="thermo"] .sv-tip,
.v3-generic-gameplay[data-game="arrow"] .sv-tip {
  width: min(100%, 400px);
  padding: 9px 12px;
  border-radius: 13px;
  background: #e9f0ec;
  color: var(--nyon-muted);
  line-height: 1.5;
}

.v3-generic-gameplay[data-game="thermo"] .sv-panel,
.v3-generic-gameplay[data-game="arrow"] .sv-panel {
  border-radius: 0;
  box-shadow: 0 5px 0 rgb(48 43 59 / 15%), 0 12px 22px rgb(48 43 59 / 6%);
}

.v3-generic-gameplay[data-game="thermo"] .sv-cell.given,
.v3-generic-gameplay[data-game="arrow"] .sv-cell.given { background: transparent; }

.v3-generic-gameplay[data-game="thermo"] .sv-cell.given .sv-v,
.v3-generic-gameplay[data-game="arrow"] .sv-cell.given .sv-v {
  width: 1.55em;
  height: 1.55em;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgb(184 205 193 / 32%);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 72%);
}

.v3-generic-gameplay[data-game="thermo"] .sv-thermo {
  stroke: rgb(47 102 87 / 28%);
  filter: drop-shadow(0 1px 0 rgb(255 255 255 / 70%));
}

.v3-generic-gameplay[data-game="thermo"] .sv-bulb { fill: rgb(239 127 168 / 42%); }

.v3-generic-gameplay[data-game="arrow"] .sv-arrowline,
.v3-generic-gameplay[data-game="arrow"] .sv-circle { stroke: rgb(47 102 87 / 48%); }

.v3-generic-gameplay[data-game="arrow"] .sv-arrowhead { fill: var(--nyon-pink); }

.v3-generic-gameplay[data-game="bimaru"] .bm-fleet {
  width: fit-content;
  max-width: min(100%, 400px);
  margin: 0 auto 4px;
  padding: 9px 12px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 15px;
  justify-content: center;
  gap: 7px;
  background: linear-gradient(180deg, #fff, #eef3f0);
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgb(48 43 59 / 12%);
}

.v3-generic-gameplay[data-game="bimaru"] .bm-fleet-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.v3-generic-gameplay[data-game="bimaru"] .bm-fleet-group b {
  color: var(--nyon-ink);
  font-size: 12px;
  font-weight: 950;
}

.v3-generic-gameplay[data-game="bimaru"] .bm-fleet-sep {
  color: rgb(48 43 59 / 24%);
  font-weight: 900;
}

.v3-generic-gameplay[data-game="bimaru"] .bm-ship i {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--nyon-success);
  border-radius: 4px;
  background: linear-gradient(180deg, #dce9e2, var(--nyon-sage));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 65%), 0 2px 0 rgb(47 102 87 / 25%);
}

.v3-generic-gameplay[data-game="bimaru"] .bm-grid {
  max-width: min(100%, 400px);
  padding: 9px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 18px;
  background: #e9f0ec;
  box-shadow: inset 0 2px 0 #fff, 0 6px 0 rgb(48 43 59 / 14%), 0 14px 24px rgb(48 43 59 / 6%);
}

.v3-generic-gameplay[data-game="bimaru"] .bm-cell {
  border-color: rgb(47 102 87 / 18%);
  border-radius: 7px;
  background: linear-gradient(145deg, #fff, #f7f4ef);
  box-shadow: inset 1px 1px 0 #fff, 0 2px 0 rgb(48 43 59 / 8%);
}

.v3-generic-gameplay[data-game="bimaru"] .bm-cell.ship {
  border-color: var(--nyon-success);
  background: linear-gradient(145deg, #dce9e2, var(--nyon-sage));
  box-shadow: inset 2px 2px 0 rgb(255 255 255 / 45%), 0 2px 0 rgb(47 102 87 / 24%);
}

.v3-generic-gameplay[data-game="bimaru"] .bm-cell.water {
  border-color: rgb(47 102 87 / 16%);
  background: rgb(255 248 236 / 64%);
}
.v3-generic-gameplay[data-game="bimaru"] .bm-cell.ship.art-covered {
  border-color: rgb(47 102 87 / 10%);
  background: #e9f0ec;
  box-shadow: none;
}

.v3-generic-gameplay[data-game="bimaru"] .bm-tip {
  width: min(100%, 400px);
  margin: 1px auto 0;
  padding: 9px 12px;
  border-radius: 13px;
  display: grid;
  gap: 3px;
  background: #e9f0ec;
  color: var(--nyon-muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
}

/* Batch 7: the next six catalogue games share the same calm visual grammar,
   but their boards keep the geometry required by each puzzle. Depth belongs
   to containers and movable pieces, never to clue lines or grid topology. */
.v3-generic-gameplay[data-game="watersort"] .play-stage,
.v3-generic-gameplay[data-game="slither"] .play-stage,
.v3-generic-gameplay[data-game="rotate"] .play-stage,
.v3-generic-gameplay[data-game="zebra"] .play-stage,
.v3-generic-gameplay[data-game="mirror"] .play-stage,
.v3-generic-gameplay[data-game="cubenet"] .play-stage {
  align-items: center;
}

.v3-generic-gameplay[data-game="watersort"] .ws-tubes {
  width: min(100%, 320px);
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  flex: none;
  align-self: center;
  margin-inline: auto;
  padding: 18px 12px 15px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 22px;
  background: linear-gradient(180deg, rgb(255 255 255 / 88%), rgb(233 240 236 / 72%));
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 80%), 0 6px 0 rgb(48 43 59 / 13%), 0 14px 24px rgb(48 43 59 / 6%);
}

.v3-generic-gameplay[data-game="watersort"] .ws-tube {
  padding: 6px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 12px 12px 19px 19px;
  background: linear-gradient(135deg, rgb(255 255 255 / 98%), rgb(255 248 236 / 86%));
  box-shadow: inset 2px 2px 0 #fff, inset -2px -2px 0 rgb(48 43 59 / 5%), 0 4px 0 rgb(48 43 59 / 17%);
}

.v3-generic-gameplay[data-game="watersort"] .ws-tube.sel {
  outline: 3px solid var(--nyon-pink);
  outline-offset: 2px;
}

.v3-generic-gameplay[data-game="watersort"] .ws-slot {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: rgb(184 205 193 / 18%);
}

.v3-generic-gameplay[data-game="watersort"] .ws-slot.full {
  box-shadow: inset 0 3px 0 rgb(255 255 255 / 34%), inset 0 -3px 0 rgb(48 43 59 / 10%);
}

.v3-generic-gameplay[data-game="slither"] .sl-tip {
  width: min(100%, 400px);
  margin: 0 auto 10px;
  padding: 9px 12px;
  border-radius: 13px;
  background: #e9f0ec;
  color: var(--nyon-muted);
  line-height: 1.45;
}

.v3-generic-gameplay[data-game="slither"] .sl-wrap {
  width: min(100%, 400px);
  margin: 0 auto 14px;
}

.v3-generic-gameplay[data-game="slither"] .sl-grid {
  max-width: 400px;
  padding: 11px;
  border: 2px solid var(--nyon-ink);
  border-radius: 0;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 5px 0 rgb(48 43 59 / 15%), 0 12px 22px rgb(48 43 59 / 6%);
}

.v3-generic-gameplay[data-game="slither"] .sl-dot {
  background: var(--nyon-ink);
  opacity: .72;
}

.v3-generic-gameplay[data-game="slither"] .sl-edge::after { background: rgb(48 43 59 / 16%); }
.v3-generic-gameplay[data-game="slither"] .sl-edge.on::after { background: var(--nyon-success); }
.v3-generic-gameplay[data-game="slither"] .sl-edge.hinted::after { background: var(--nyon-pink); }

.v3-generic-gameplay[data-game="rotate"] .rt-target-wrap {
  width: min(100%, 180px);
  margin: 0 auto 15px;
  padding: 14px 12px 11px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 19px;
  background: linear-gradient(180deg, #fff, #f8f5ef);
  box-shadow: inset 0 2px 0 #fff, 0 5px 0 rgb(48 43 59 / 14%);
}

.v3-generic-gameplay[data-game="rotate"] .rt-deg {
  color: var(--nyon-success);
  font-size: 14px;
}

.v3-generic-gameplay[data-game="rotate"] .rt-hint-note {
  width: min(100%, 320px);
  margin: -3px auto 12px;
  padding: 8px 11px;
  border-radius: 12px;
  background: #e9f0ec;
  color: var(--nyon-success);
  font-size: 10px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}

.v3-generic-gameplay[data-game="rotate"] .rt-hint-note[hidden] { display: none; }

.v3-generic-gameplay[data-game="rotate"] .rt-opt.ruled-out {
  visibility: hidden;
  pointer-events: none;
}

.v3-generic-gameplay[data-game="rotate"] .rt-opts {
  width: min(100%, 320px);
  margin-inline: auto;
  gap: 12px;
}

.v3-generic-gameplay[data-game="rotate"] .rt-opt {
  min-height: 128px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #f6f2ec);
  box-shadow: inset 2px 2px 0 #fff, 0 5px 0 rgb(48 43 59 / 16%);
}

.v3-generic-gameplay[data-game="rotate"] .rt-cell {
  border-color: rgb(48 43 59 / 14%);
  border-radius: 2px;
  background: rgb(184 205 193 / 13%);
}

.v3-generic-gameplay[data-game="rotate"] .rt-cell.filled {
  border-color: var(--nyon-success);
  background: linear-gradient(145deg, #92b8a5, #6f9f88);
  box-shadow: inset 1px 1px 0 rgb(255 255 255 / 50%);
}

.v3-generic-gameplay[data-game="zebra"] .dt-clues {
  width: min(100%, 420px);
  margin: 0 auto 14px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 17px;
  background: linear-gradient(180deg, #fff, #fbfaf7);
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgb(48 43 59 / 12%);
}

.v3-generic-gameplay[data-game="zebra"] .zb-grid {
  width: min(100%, 360px);
  margin: 0 auto 14px;
  gap: 8px;
}

.v3-generic-gameplay[data-game="zebra"] .zb-who { font-size: 28px; }

.v3-generic-gameplay[data-game="zebra"] .zb-cell {
  min-height: 76px;
  aspect-ratio: auto;
  border: 2px dashed rgb(47 102 87 / 27%);
  border-radius: 13px;
  background: linear-gradient(145deg, rgb(255 255 255 / 76%), rgb(233 240 236 / 72%));
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 72%), 0 3px 0 rgb(48 43 59 / 8%);
}

.v3-generic-gameplay[data-game="zebra"] .zb-cell.filled {
  border-color: var(--nyon-success);
  background: linear-gradient(145deg, #f5faf7, #dfeae4);
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgb(47 102 87 / 19%);
}

.v3-generic-gameplay[data-game="zebra"] .zb-trays {
  width: min(100%, 360px);
  margin: 0 auto 15px;
  padding: 10px;
  border-radius: 16px;
  background: rgb(239 127 168 / 10%);
}

.v3-generic-gameplay[data-game="zebra"] .dt-chip {
  border: 1.5px solid rgb(48 43 59 / 13%);
  background: linear-gradient(180deg, #fff, #f8f5f0);
  box-shadow: inset 0 2px 0 #fff, 0 3px 0 rgb(48 43 59 / 15%);
}

.v3-generic-gameplay[data-game="mirror"] .mr-axis {
  width: fit-content;
  margin: 0 auto 11px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #e9f0ec;
  color: var(--nyon-success);
}

.v3-generic-gameplay[data-game="mirror"] .mr-grid {
  position: relative;
  width: min(100%, 340px);
  margin: 0 auto 16px;
  padding: 8px;
  border: 2px solid var(--nyon-ink);
  border-radius: 0;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 5px 0 rgb(48 43 59 / 15%), 0 12px 22px rgb(48 43 59 / 6%);
}

.v3-generic-gameplay[data-game="mirror"] .mr-cell {
  border-color: rgb(48 43 59 / 14%);
  border-radius: 2px;
  background: rgb(184 205 193 / 13%);
}

.v3-generic-gameplay[data-game="mirror"] .mr-cell.given.filled {
  border-color: var(--nyon-success);
  background: var(--nyon-sage);
}

.v3-generic-gameplay[data-game="mirror"] .mr-cell.blank { background: rgb(255 255 255 / 94%); }
.v3-generic-gameplay[data-game="mirror"] .mr-cell.blank.filled {
  border-color: var(--nyon-pink);
  background: var(--nyon-pink);
}

.v3-generic-gameplay[data-game="mirror"] .mr-grid::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border: 1px solid var(--nyon-success);
  border-radius: 3px;
  background: linear-gradient(90deg, #91b3a3, #fff, #91b3a3);
  box-shadow: 0 1px 3px rgb(48 43 59 / 20%);
}
.v3-generic-gameplay[data-game="mirror"] .mr-grid.mr-axis-v::after {
  width: 6px; left: calc(50% - 3px); top: 4px; bottom: 4px;
}
.v3-generic-gameplay[data-game="mirror"] .mr-grid.mr-axis-h::after {
  height: 6px; top: calc(50% - 3px); left: 4px; right: 4px;
  background: linear-gradient(180deg, #91b3a3, #fff, #91b3a3);
}

.v3-generic-gameplay[data-game="cubenet"] .cn-question-card {
  width: min(100%, 420px);
  margin: 0 auto 13px;
  padding: 9px 14px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 18px;
  background: linear-gradient(180deg, rgb(246 198 216 / 25%), rgb(255 255 255 / 91%));
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgb(48 43 59 / 12%);
}

.v3-generic-gameplay[data-game="cubenet"] .cn-kicker { color: var(--nyon-pink); }

.v3-generic-gameplay[data-game="cubenet"] .cn-question-card h3 {
  margin: 2px 0 6px;
  font-size: clamp(15px, 3.6vw, 18px);
  line-height: 1.35;
}

.v3-generic-gameplay[data-game="cubenet"] .cn-question-face {
  width: 50px;
  height: 50px;
  min-width: 50px;
  min-height: 50px;
  margin-top: 5px;
}

.v3-generic-gameplay[data-game="cubenet"] .cn-net-wrap {
  width: min(100%, 420px);
  margin: 0 auto 14px;
  padding: 17px 12px 13px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 20px;
  background: linear-gradient(180deg, #fff, #f7f3ed);
  box-shadow: inset 0 2px 0 #fff, 0 5px 0 rgb(48 43 59 / 14%);
}

.v3-generic-gameplay[data-game="cubenet"] .cn-net {
  grid-template-columns: repeat(4, clamp(46px, 12vw, 54px));
  grid-template-rows: repeat(3, clamp(46px, 12vw, 54px));
}

.v3-generic-gameplay[data-game="cubenet"] .cn-sq,
.v3-generic-gameplay[data-game="cubenet"] .cn-face {
  border-radius: 10px;
  box-shadow: inset 2px 2px 0 rgb(255 255 255 / 38%), inset -2px -2px 0 rgb(48 43 59 / 10%), 0 4px 0 rgb(48 43 59 / 16%);
}

.v3-generic-gameplay[data-game="cubenet"] .cn-opts {
  width: min(100%, 420px);
  margin-inline: auto;
  gap: 10px;
}

.v3-generic-gameplay[data-game="cubenet"] .cn-opt {
  min-height: 78px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 17px;
  background: linear-gradient(145deg, #fff, #f7f3ed);
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgb(48 43 59 / 16%);
}

.v3-generic-gameplay[data-game="cubenet"] .cn-opt > .cn-option-face {
  width: 58px;
  height: 58px;
  margin-bottom: 0;
}

/* Batch 8: six more real engines, one shared surface language. Logic grids
   remain square; only their containing cards and movable pieces gain depth. */
.v3-generic-gameplay[data-game="hashi"] .play-stage,
.v3-generic-gameplay[data-game="skyscrapers"] .play-stage,
.v3-generic-gameplay[data-game="suguru"] .play-stage,
.v3-generic-gameplay[data-game="binairo"] .play-stage,
.v3-generic-gameplay[data-game="tents"] .play-stage,
.v3-generic-gameplay[data-game="dominosa"] .play-stage {
  align-items: center;
}

.v3-generic-gameplay[data-game="hashi"] .hs-wrap {
  gap: 13px;
  padding-inline: 12px;
}

.v3-generic-gameplay[data-game="hashi"] .hs-tip,
.v3-generic-gameplay[data-game="skyscrapers"] .sv-tip,
.v3-generic-gameplay[data-game="suguru"] .sg-tip,
.v3-generic-gameplay[data-game="binairo"] .bn-tip,
.v3-generic-gameplay[data-game="tents"] .tn-tip,
.v3-generic-gameplay[data-game="dominosa"] .dm-tip {
  width: min(100%, 400px);
  margin: 0 auto;
  padding: 9px 12px;
  border-radius: 13px;
  background: #e9f0ec;
  color: var(--nyon-muted);
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.42;
  text-align: center;
}

.v3-generic-gameplay[data-game="hashi"] .hs-board {
  max-width: min(100%, 390px);
}

.v3-generic-gameplay[data-game="hashi"] .hs-board::before {
  inset: -11px;
  border: 2px solid var(--nyon-ink);
  border-radius: 18px;
  background:
    radial-gradient(circle at 24% 28%, rgb(47 102 87 / 7%) 0 3px, transparent 4px),
    radial-gradient(circle at 72% 64%, rgb(239 127 168 / 6%) 0 3px, transparent 4px),
    linear-gradient(180deg, #fff, #edf3ef);
  background-size: 44px 44px, 54px 54px, auto;
  box-shadow: inset 0 2px 0 #fff, 0 6px 0 rgb(48 43 59 / 15%), 0 14px 24px rgb(48 43 59 / 6%);
}

.v3-generic-gameplay[data-game="hashi"] .hs-lines line {
  stroke: var(--nyon-success);
  stroke-linecap: square;
}

.v3-generic-gameplay[data-game="hashi"] .hs-node {
  border: 2px solid var(--nyon-ink);
  background: linear-gradient(145deg, #fff, #f4efe8);
  color: var(--nyon-ink);
  box-shadow: inset 2px 2px 0 #fff, 0 4px 0 rgb(48 43 59 / 18%);
}

.v3-generic-gameplay[data-game="hashi"] .hs-node.full {
  background: linear-gradient(145deg, #dbe9e1, var(--nyon-sage));
  color: var(--nyon-success);
}

.v3-generic-gameplay[data-game="hashi"] .hs-node.sel {
  border-color: var(--nyon-ink);
  background: linear-gradient(145deg, #f5a8c3, var(--nyon-pink));
  color: var(--nyon-ink);
}

.v3-generic-gameplay[data-game="skyscrapers"] .sv-panel.has-ring {
  width: min(100%, 400px);
  border: 2px solid var(--nyon-ink);
  border-radius: 18px;
  background: #edf3ef;
  box-shadow: inset 0 2px 0 #fff, 0 6px 0 rgb(48 43 59 / 15%);
}

.v3-generic-gameplay[data-game="skyscrapers"] .sv-panel.has-ring .sv-grid {
  border: 2px solid var(--nyon-ink);
  border-radius: 0;
  background: #fff;
}

.v3-generic-gameplay[data-game="skyscrapers"] .sv-ring {
  color: var(--nyon-success);
  font-size: 12px;
}

.v3-generic-gameplay[data-game="skyscrapers"] .sv-cell {
  border-radius: 0;
  background: rgb(255 255 255 / 94%);
}

.v3-generic-gameplay[data-game="skyscrapers"] .sv-cell.given { background: #e9f0ec; }

.v3-generic-gameplay[data-game="skyscrapers"] .sv-cell.sel {
  z-index: 2;
  background: linear-gradient(145deg, #ffe9f1, #f7c6d8);
  color: var(--nyon-ink);
  box-shadow:
    inset 0 0 0 3px var(--nyon-pink),
    inset 2px 2px 0 rgb(255 255 255 / 70%);
}

.v3-generic-gameplay[data-game="suguru"] .sg-wrap,
.v3-generic-gameplay[data-game="binairo"] .bn-wrap,
.v3-generic-gameplay[data-game="tents"] .tn-wrap,
.v3-generic-gameplay[data-game="dominosa"] .dm-wrap {
  gap: 10px;
  padding-inline: 10px;
}

.v3-generic-gameplay[data-game="suguru"] .sg-panel,
.v3-generic-gameplay[data-game="binairo"] .bn-panel,
.v3-generic-gameplay[data-game="tents"] .tn-panel,
.v3-generic-gameplay[data-game="dominosa"] .dm-panel {
  border: 2px solid var(--nyon-ink);
  border-radius: 0;
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 5px 0 rgb(48 43 59 / 15%), 0 12px 22px rgb(48 43 59 / 6%);
}

.v3-generic-gameplay[data-game="suguru"] .sg-cell {
  border-radius: 0;
  border-color: rgb(48 43 59 / 14%);
  background: #fff;
  color: var(--nyon-success);
}

.v3-generic-gameplay[data-game="suguru"] .sg-cell.wt { border-top-color: var(--nyon-ink); }
.v3-generic-gameplay[data-game="suguru"] .sg-cell.wl { border-left-color: var(--nyon-ink); }
.v3-generic-gameplay[data-game="suguru"] .sg-cell.wb { border-bottom-color: var(--nyon-ink); }
.v3-generic-gameplay[data-game="suguru"] .sg-cell.wr { border-right-color: var(--nyon-ink); }

.v3-generic-gameplay[data-game="suguru"] .sg-cell.given {
  background: #e9f0ec;
  color: var(--nyon-ink);
}

.v3-generic-gameplay[data-game="suguru"] .sg-cell.sel {
  background: var(--nyon-butter);
  box-shadow: inset 0 0 0 2px var(--nyon-pink);
}

.v3-generic-gameplay[data-game="suguru"] .sg-key {
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 13px;
  background: linear-gradient(180deg, #fff, #f7f3ed);
  color: var(--nyon-ink);
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgb(48 43 59 / 17%);
}

.v3-generic-gameplay[data-game="binairo"] .bn-cell {
  border-color: rgb(48 43 59 / 13%);
  border-radius: 2px;
  background: #fff;
}

.v3-generic-gameplay[data-game="binairo"] .bn-cell > i {
  box-shadow: none;
}

.v3-generic-gameplay[data-game="binairo"] .bn-cell.a > i {
  background: var(--nyon-butter);
}

.v3-generic-gameplay[data-game="binairo"] .bn-cell.b > i {
  background: var(--nyon-sage);
}

.v3-generic-gameplay[data-game="binairo"] .bn-cell.a > i,
.v3-generic-gameplay[data-game="binairo"] .bn-cell.b > i {
  box-shadow: inset 2px 2px 0 rgb(255 255 255 / 34%), inset -2px -2px 0 rgb(48 43 59 / 10%), 0 2px 0 rgb(48 43 59 / 12%);
}

.v3-generic-gameplay[data-game="binairo"] .bn-cell.sel {
  outline-color: var(--nyon-pink);
}

.v3-generic-gameplay[data-game="binairo"] .bn-cell.given {
  background: #e9f0ec;
}

.v3-generic-gameplay[data-game="binairo"] .bn-cell.given > i {
  box-shadow: inset 0 0 0 2px var(--nyon-ink), inset 2px 2px 0 rgb(255 255 255 / 32%), 0 2px 0 rgb(48 43 59 / 12%);
}

.v3-generic-gameplay[data-game="binairo"] .bn-cell.bad {
  position: relative;
  z-index: 1;
  border-color: #c94c6d;
  background: #fff1f5;
  box-shadow: inset 0 0 0 2px rgb(201 76 109 / 34%), 0 0 0 2px rgb(201 76 109 / 16%);
}

.v3-generic-gameplay[data-game="binairo"] .bn-cell.bad > i {
  /* Keep the symbol's own colour readable; the cell and alert carry the error. */
  box-shadow: inset 2px 2px 0 rgb(255 255 255 / 34%), inset -2px -2px 0 rgb(48 43 59 / 10%), 0 2px 0 rgb(48 43 59 / 12%);
}

.v3-generic-gameplay[data-game="binairo"] .bn-cell.rule-duplicate {
  border-style: dashed;
}

.v3-generic-gameplay[data-game="tents"] .tn-panel {
  background: #edf3ef;
}

.v3-generic-gameplay[data-game="tents"] .tn-tree,
.v3-generic-gameplay[data-game="tents"] .tn-plot {
  border-radius: 2px;
}

.v3-generic-gameplay[data-game="tents"] .tn-tree {
  position: relative;
  background: rgb(184 205 193 / 38%);
}

.v3-generic-gameplay[data-game="tents"] .tn-tree-mark {
  width: 88%;
  height: 88%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgb(48 43 59 / 15%));
}

.v3-generic-gameplay[data-game="tents"] .tn-plot {
  border-color: rgb(48 43 59 / 14%);
  background: #fff;
}

.v3-generic-gameplay[data-game="tents"] .tn-tent-mark {
  width: 94%;
  height: 94%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 rgb(48 43 59 / 15%));
}

.v3-generic-gameplay[data-game="tents"] .tn-plot.grass {
  background: rgb(255 248 236 / 72%);
}

.v3-generic-gameplay[data-game="dominosa"] .dm-cell {
  border-color: rgb(48 43 59 / 14%);
  border-radius: 4px;
  background: #fff;
  color: var(--nyon-ink);
}

.v3-generic-gameplay[data-game="dominosa"] .dm-cell.sel {
  border-color: var(--nyon-pink);
  background: var(--nyon-butter);
  box-shadow: inset 0 0 0 2px rgb(239 127 168 / 35%);
}

.v3-generic-gameplay[data-game="dominosa"] .dm-cell.joined {
  border-color: var(--nyon-success);
  background: #e2ece6;
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 48%);
}

.v3-generic-gameplay[data-game="dominosa"] .dm-cell.joined.jr { border-right-color: transparent; }
.v3-generic-gameplay[data-game="dominosa"] .dm-cell.joined.jl { border-left-color: transparent; }
.v3-generic-gameplay[data-game="dominosa"] .dm-cell.joined.jd { border-bottom-color: transparent; }
.v3-generic-gameplay[data-game="dominosa"] .dm-cell.joined.ju { border-top-color: transparent; }

/* Final catalogue batch. These four puzzles keep their original engines and
   geometry; the v3 layer only strengthens hierarchy, centring and touch depth. */
.v3-generic-gameplay[data-game="futoshiki"] .play-stage,
.v3-generic-gameplay[data-game="killer"] .play-stage {
  align-items: center;
}

.v3-generic-gameplay[data-game="futoshiki"] .fu-panel {
  width: min(100%, 390px);
  margin-inline: auto;
  padding: 14px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 20px;
  background: linear-gradient(180deg, rgb(255 255 255 / 94%), #edf3ef);
  box-shadow: inset 0 2px 0 #fff, 0 5px 0 rgb(48 43 59 / 13%), 0 12px 22px rgb(48 43 59 / 6%);
}

.v3-generic-gameplay[data-game="futoshiki"] .fu-cell {
  border-color: rgb(48 43 59 / 68%);
  border-radius: 10px;
  background: #fff;
  color: var(--nyon-success);
  box-shadow: inset 0 2px 0 #fff, 0 3px 0 rgb(48 43 59 / 16%);
}

.v3-generic-gameplay[data-game="futoshiki"] .fu-cell.fixed {
  background: var(--nyon-sage);
  color: var(--nyon-ink);
}

.v3-generic-gameplay[data-game="futoshiki"] .fu-cell.sel {
  z-index: 2;
  outline-color: var(--nyon-pink);
  background: var(--nyon-butter);
}

.v3-generic-gameplay[data-game="futoshiki"] .fu-sign {
  color: var(--nyon-ink);
  text-shadow: 0 1px 0 #fff;
}

.v3-generic-gameplay[data-game="futoshiki"] .sk-key,
.v3-generic-gameplay[data-game="killer"] .ks-key {
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 13px;
  background: linear-gradient(180deg, #fff, #f7f3ed);
  color: var(--nyon-ink);
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgb(48 43 59 / 17%);
}

.v3-generic-gameplay[data-game="killer"] .ks-wrap {
  width: min(100%, 420px);
  height: auto;
  margin-inline: auto;
}

.v3-generic-gameplay[data-game="killer"] .ks-grid {
  border: 3px solid var(--nyon-ink);
  border-radius: 0;
  background: #fff;
  box-shadow: 0 5px 0 rgb(48 43 59 / 16%), 0 12px 22px rgb(48 43 59 / 6%);
  overflow: hidden;
}

.v3-generic-gameplay[data-game="killer"] .ks-cell {
  border-radius: 0;
  color: var(--nyon-success);
  box-shadow: inset -1px -1px 0 rgb(48 43 59 / 16%);
}

.v3-generic-gameplay[data-game="killer"] .ks-cell.ks-cage-tone-0 { background: rgb(255 255 255 / 96%); }
.v3-generic-gameplay[data-game="killer"] .ks-cell.ks-cage-tone-1 { background: rgb(239 127 168 / 10%); }
.v3-generic-gameplay[data-game="killer"] .ks-cell.ks-cage-tone-2 { background: rgb(184 205 193 / 25%); }
.v3-generic-gameplay[data-game="killer"] .ks-cell.ks-cage-tone-3 { background: rgb(255 225 141 / 19%); }

.v3-generic-gameplay[data-game="killer"] .ks-cell.given { color: var(--nyon-ink); }
.v3-generic-gameplay[data-game="killer"] .ks-cell.sel {
  background: var(--nyon-butter);
  box-shadow: inset 0 0 0 3px var(--nyon-pink);
}

.v3-generic-gameplay[data-game="killer"] .ks-cage-line { stroke: var(--nyon-pink); }

.v3-generic-gameplay[data-game="killer"] .ks-sum {
  z-index: 3;
  top: 3px;
  left: 3px;
  padding: 2px 3px;
  border-radius: 5px;
  background: rgb(255 248 236 / 92%);
  color: var(--nyon-ink);
  box-shadow: 0 1px 0 rgb(48 43 59 / 12%);
}

.v3-generic-gameplay[data-game="hardsearch"] .v3-gameplay-status-strip {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.v3-generic-gameplay[data-game="hardsearch"] .play-toolbar {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.v3-generic-gameplay[data-game="hardsearch"] .play-stage {
  align-items: center;
}

.v3-generic-gameplay[data-game="hardsearch"] .hs-board-layout {
  width: min(100%, 532px);
  margin-inline: auto;
}

.v3-generic-gameplay[data-game="hardsearch"] .hs-word-panel {
  width: 100%;
}

.v3-generic-gameplay[data-game="hardsearch"] .hs-board-main {
  width: 100%;
  padding: 10px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 20px;
  background: rgb(255 255 255 / 92%);
  box-shadow: inset 0 2px 0 #fff, 0 5px 0 rgb(48 43 59 / 13%), 0 12px 22px rgb(48 43 59 / 6%);
}

.v3-generic-gameplay[data-game="hardsearch"] .hs-note {
  margin: 0 2px 10px;
  text-align: center;
}

.v3-generic-gameplay[data-game="hardsearch"] .hs-cell {
  border-color: rgb(48 43 59 / 18%);
  background: #fff;
  color: var(--nyon-ink);
}

.v3-generic-gameplay[data-game="hardsearch"] .hs-cell.sel {
  background: var(--nyon-pink);
  color: var(--nyon-ink);
}

.v3-generic-gameplay[data-game="target24"] .play-stage,
.v3-generic-gameplay[data-game="watersort"] .play-stage {
  justify-content: center;
  padding-top: 12px;
  padding-bottom: calc(28px + var(--safe-b));
}

.v3-generic-gameplay[data-game="target24"] .t24-wrap {
  width: min(100%, 380px);
  margin-inline: auto;
  padding: 18px 16px 15px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 22px;
  background: linear-gradient(180deg, rgb(255 255 255 / 94%), rgb(233 240 236 / 78%));
  box-shadow: inset 0 2px 0 #fff, 0 6px 0 rgb(48 43 59 / 13%), 0 14px 24px rgb(48 43 59 / 6%);
}

.v3-generic-gameplay[data-game="target24"] .t24-goal {
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 999px;
  background: var(--nyon-butter);
  color: var(--nyon-muted);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 65%), 0 3px 0 rgb(48 43 59 / 12%);
}

.v3-generic-gameplay[data-game="target24"] .t24-goal b { color: var(--nyon-pink); }

.v3-generic-gameplay[data-game="target24"] .t24-number,
.v3-generic-gameplay[data-game="target24"] .t24-op {
  border: 1.5px solid rgb(48 43 59 / 15%);
  background: linear-gradient(180deg, #fff, #f7f3ed);
  color: var(--nyon-ink);
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgb(48 43 59 / 17%);
}

.v3-generic-gameplay[data-game="target24"] .t24-number.selected {
  border-color: var(--nyon-pink);
  background: var(--nyon-butter);
}

.v3-generic-gameplay[data-game="target24"] .t24-op.selected {
  border-color: var(--nyon-success);
  background: var(--nyon-success);
  color: #fff;
}

.v3-generic-gameplay[data-game="target24"] .t24-expression {
  margin-bottom: 0;
  background: rgb(239 127 168 / 10%);
  color: var(--nyon-muted);
}

.v3-generic-howto-steps {
  margin: 16px 0 8px;
  display: block;
  overflow: hidden;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 20px;
  background: #fff;
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 rgb(48 43 59 / 13%);
}

.v3-howto-steps.v3-generic-howto-steps li {
  min-height: 0;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid rgb(48 43 59 / 10%);
  border-radius: 0;
  background: transparent;
  align-items: center;
  flex-direction: row;
  box-shadow: none;
}

.v3-howto-steps.v3-generic-howto-steps li:last-child { border-bottom: 0; }

.v3-howto-steps.v3-generic-howto-steps li > span {
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  border-radius: 10px;
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 32%), 0 2px 0 rgb(48 43 59 / 13%);
}

.v3-howto-steps.v3-generic-howto-steps p { min-width: 0; }

.v3-howto-steps.v3-generic-howto-steps small {
  margin-top: 0;
  color: var(--nyon-ink);
  font-size: 12.5px;
  font-weight: 750;
  line-height: 1.42;
}

.v3-howto-steps.v3-generic-howto-steps small b {
  display: inline;
  color: var(--nyon-ink);
  font-size: inherit;
  font-weight: 950;
}

@media (max-width: 440px) {
  .v3-generic-howto-steps { border-radius: 17px; }
}

/* A compact QA index lets the full catalogue be reviewed in order without
   turning the real puzzle-select page into a development dashboard. */
html.v3-review-page,
body.v3-review-page {
  height: auto;
  min-height: 100%;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
}

.v3-gameplay-review {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(28px + var(--safe-b));
  background: var(--nyon-cream) url('../assets/brand/nyon-v3/patterns/puzzle-constellation.svg') center / 390px 307px repeat;
  background-blend-mode: soft-light;
  color: var(--nyon-ink);
}

.v3-review-bar {
  position: sticky;
  z-index: 5;
  top: 0;
  min-height: 68px;
  padding: 10px 16px;
  border-bottom: 1px solid rgb(48 43 59 / 10%);
  background: rgb(255 248 236 / 92%);
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 12px;
}

.v3-review-bar > a {
  width: 46px;
  height: 46px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--nyon-ink);
  font-size: 22px;
  font-weight: 900;
  text-decoration: none;
  box-shadow: var(--nyon-shadow-card);
}

.v3-review-bar img { width: 76px; justify-self: center; }
.v3-review-bar span { color: var(--nyon-muted); font-size: 8px; font-weight: 950; letter-spacing: .13em; }

.v3-review-intro,
.v3-review-grid {
  width: min(calc(100% - 28px), 760px);
  margin-inline: auto;
}

.v3-review-intro { padding: 28px 2px 20px; }
.v3-review-intro h1 { margin: 4px 0 8px; font-size: clamp(32px, 8vw, 52px); line-height: .98; }
.v3-review-intro > p:not(.v3-eyebrow) { max-width: 580px; margin: 0; color: var(--nyon-muted); font-size: 13px; line-height: 1.55; }
.v3-review-intro > div { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 7px; }
.v3-review-intro > div > * { padding: 7px 11px; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 900; }
.v3-review-intro > div b { background: var(--nyon-sage); color: var(--nyon-success); }
.v3-review-intro > div span { background: var(--nyon-butter); }

.v3-review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.v3-review-card {
  min-width: 0;
  padding: 9px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 20px;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: rgb(255 255 255 / 90%);
  color: var(--nyon-ink);
  text-decoration: none;
  box-shadow: var(--nyon-shadow-card);
}

.v3-review-card.is-approved { border-color: rgb(63 125 116 / 38%); background: rgb(232 241 235 / 94%); }
.v3-review-card > img { width: 68px; aspect-ratio: 1; border-radius: 14px; object-fit: cover; }
.v3-review-card > span { min-width: 0; }
.v3-review-card small,
.v3-review-card b,
.v3-review-card em { display: block; }
.v3-review-card small { overflow: hidden; color: var(--nyon-muted); font-size: 7px; font-weight: 900; letter-spacing: .08em; text-overflow: ellipsis; white-space: nowrap; }
.v3-review-card b { margin-top: 3px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.v3-review-card em { width: fit-content; margin-top: 5px; padding: 3px 6px; border-radius: 999px; background: var(--nyon-butter); font-size: 6.5px; font-style: normal; font-weight: 950; letter-spacing: .08em; }
.v3-review-card.is-approved em { background: var(--nyon-sage); color: var(--nyon-success); }
.v3-review-card > strong { font-size: 17px; }

@media (max-width: 600px) {
  .v3-review-grid { grid-template-columns: 1fr; }
  .v3-review-bar span { display: none; }
  .v3-review-bar { grid-template-columns: 46px 1fr 46px; }
}

.v3-spatial-howto-rule {
  margin: 16px 0 13px;
  padding: 12px;
  border: 1.5px solid rgb(48 43 59 / 12%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgb(184 205 193 / 38%);
}

.v3-spatial-howto-rule > span {
  width: 40px;
  height: 40px;
  display: grid;
  flex: 0 0 40px;
  place-items: center;
  font-size: 24px;
}

.v3-spatial-howto-rule p { margin: 0; }
.v3-spatial-howto-rule b,
.v3-spatial-howto-rule small { display: block; }
.v3-spatial-howto-rule b { font-size: 12px; }
.v3-spatial-howto-rule small { margin-top: 2px; color: var(--nyon-muted); font-size: 9px; }

@media (orientation: landscape) and (min-width: 700px) {
  .v3-gameplay-shell .ws-board-layout {
    display: grid;
    grid-template-columns: minmax(300px, 420px) minmax(220px, 1fr);
  }

  .v3-gameplay-shell .ws-board-main { grid-column: 1; grid-row: 1; }
  .v3-gameplay-shell .ws-word-panel { grid-column: 2; grid-row: 1; }
  .v3-gameplay-shell .ws-word-panel .ws-words {
    padding: 0;
    flex-wrap: wrap;
    overflow: visible;
  }
}

/* Level Select preview. Storage IDs and the actual play() route stay outside
   this visual layer; the grid only demonstrates density and state hierarchy. */
.v3-levels-preview {
  isolation: isolate;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
}

.v3-levels-preview::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url('../assets/brand/nyon-v3/patterns/puzzle-constellation.svg') center / 390px 307px repeat;
  opacity: .31;
  pointer-events: none;
}

.v3-levels-preview > * { position: relative; z-index: 1; }

.v3-levels-preview .app-bar {
  position: relative;
  min-height: 68px;
  padding: 10px 14px;
  border-bottom: 1px solid rgb(48 43 59 / 10%);
  border-radius: 0 0 20px 20px;
  background: linear-gradient(180deg, rgb(255 255 255 / 96%), rgb(255 248 236 / 94%));
  backdrop-filter: blur(14px);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 90%),
    0 4px 0 rgb(48 43 59 / 7%),
    0 10px 24px rgb(48 43 59 / 7%);
}

.v3-levels-preview .app-bar-title {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  display: flex;
  justify-content: center;
  transform: translate(-50%, -50%);
}

.v3-levels-preview .v3-section-mark { width: 100px; height: auto; }

.v3-levels-preview .icon-btn {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 15px;
  background: linear-gradient(180deg, #fff, #f9f6f1);
  color: var(--nyon-ink);
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 95%),
    inset 0 -1px 0 rgb(48 43 59 / 5%),
    0 4px 0 rgb(48 43 59 / 14%),
    0 9px 16px rgb(48 43 59 / 7%);
}

.v3-levels-preview .icon-btn:active {
  transform: translateY(2px);
  box-shadow: inset 0 1px 2px rgb(48 43 59 / 10%), 0 2px 0 rgb(48 43 59 / 14%);
}

.v3-level-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 7px;
}
.v3-levels-preview .v3-level-audio {
  background: linear-gradient(180deg, #fff0ba, var(--nyon-butter));
  box-shadow:
    inset 0 2px 0 rgb(255 255 255 / 58%),
    inset 0 -1px 0 rgb(142 110 32 / 12%),
    0 4px 0 #c9aa54,
    0 9px 16px rgb(48 43 59 / 7%);
}
.v3-levels-scroll { padding: 0; }

.v3-levels-main {
  width: min(100% - 32px, 920px);
  margin: 0 auto;
  padding: 27px 0 58px;
}

.v3-level-hero {
  position: relative;
  min-height: 198px;
  padding: 18px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 29px;
  background: linear-gradient(135deg, var(--nyon-sage), #e5ede8 68%, var(--nyon-cream));
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  box-shadow: var(--nyon-shadow-card);
}

.v3-level-hero > img {
  width: 160px;
  aspect-ratio: 1;
  border: 2px solid var(--nyon-ink);
  border-radius: 24px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgb(48 43 59 / 13%);
}

.v3-level-hero-copy { min-width: 0; }

.v3-level-hero-copy h1 {
  margin: 4px 0 7px;
  font-size: clamp(38px, 7vw, 55px);
  line-height: .95;
  letter-spacing: -.045em;
}

.v3-level-hero-copy > p:not(.v3-eyebrow) {
  max-width: 420px;
  margin: 0;
  color: #4b5c54;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.v3-level-overall {
  max-width: 370px;
  margin-top: 20px;
}

.v3-level-overall > span {
  display: block;
  font-size: 10px;
  font-weight: 850;
}

.v3-level-overall > span b { font-size: 14px; }

.v3-level-overall > i {
  height: 9px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(255 255 255 / 72%);
  display: block;
}

.v3-level-overall > i u {
  height: 100%;
  border-radius: inherit;
  background: var(--nyon-pink);
  display: block;
  text-decoration: none;
}

.v3-level-tabs {
  position: sticky;
  z-index: 4;
  top: 0;
  margin: 20px 0 22px;
  padding: 5px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 18px;
  background: rgb(255 248 236 / 92%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  backdrop-filter: blur(12px);
  box-shadow: var(--nyon-shadow-card);
}

.v3-level-tabs button {
  min-height: 47px;
  padding: 5px 9px;
  border: 1.5px solid rgb(48 43 59 / 12%);
  border-radius: 13px;
  background: linear-gradient(180deg, #fff, #f5f1eb);
  color: var(--nyon-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 2px 0 #fff, 0 3px 0 rgb(48 43 59 / 13%);
}

.v3-level-tabs button.on {
  border-color: var(--nyon-ink);
  background: linear-gradient(180deg, #454051, var(--nyon-ink));
  color: #fff;
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 12%), 0 4px 0 #1f1b28, 0 8px 13px rgb(48 43 59 / 13%);
}

.v3-level-tabs button.locked {
  background: var(--nyon-disabled-bg);
  color: var(--nyon-muted);
  opacity: .72;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 55%), 0 2px 0 rgb(48 43 59 / 7%);
}

.v3-level-tabs button.locked span { font-size: 9px; }

.v3-level-panel {
  padding: 22px;
  border: 1.5px solid rgb(48 43 59 / 14%);
  border-radius: 27px;
  background: rgb(255 255 255 / 82%);
  box-shadow: var(--nyon-shadow-card);
  backdrop-filter: blur(7px);
}

.v3-level-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.v3-level-section-head h2 {
  margin: 4px 0 0;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1;
  letter-spacing: -.035em;
}

.v3-level-section-head > span {
  flex-shrink: 0;
  margin-left: auto;
  white-space: nowrap;
  min-height: 34px;
  padding: 7px 11px;
  border: 1.5px solid rgb(48 43 59 / 10%);
  border-radius: 999px;
  background: linear-gradient(180deg, #dcebe4, var(--nyon-sage));
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: var(--nyon-muted);
  font-size: 10px;
  font-weight: 850;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 76%),
    0 3px 0 rgb(65 111 101 / 16%);
}

.v3-level-section-head > span b { color: var(--nyon-ink); font-size: 14px; }

.v3-level-tier-desc {
  margin: 12px 0 0;
  color: var(--nyon-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.5;
}

.v3-level-tier-desc:empty { display: none; }

.v3-level-tier-desc.is-lock-note {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 8px 11px;
  border: 1px solid rgb(239 127 168 / 28%);
  border-radius: 12px;
  background: var(--nyon-rose-wash);
}

/* The per-puzzle intro copy is intentionally parked while Prof Bena rewrites
   it title by title. Keep the DOM hook and source copy so restoring an approved
   sentence later does not require touching level or progress data. */
#v3-level-description { display: none; }

.v3-level-status {
  min-height: 33px;
  margin: 11px 0 10px;
  padding: 8px 11px;
  border-radius: 12px;
  background: var(--nyon-rose-wash);
  color: var(--nyon-muted);
  font-size: 9px;
  font-weight: 800;
}

.v3-level-status:empty { display: none; }

.v3-level-grid {
  margin-top: 17px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 11px;
}

.v3-level-status:not(:empty) + .v3-level-grid { margin-top: 10px; }

.v3-level-grid button {
  aspect-ratio: 1;
  min-width: 0;
  padding: 8px;
  border: 1.5px solid rgb(48 43 59 / 17%);
  border-radius: 19px;
  background: linear-gradient(180deg, #fff, #f5f1eb);
  color: var(--nyon-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  box-shadow: inset 0 2px 0 #fff, 0 5px 0 rgb(48 43 59 / 14%), 0 10px 16px rgb(48 43 59 / 6%);
  cursor: pointer;
}

.v3-level-grid button:not(:disabled):active {
  transform: translateY(3px);
  box-shadow: inset 0 1px 2px rgb(48 43 59 / 10%), 0 2px 0 rgb(48 43 59 / 14%);
}

.v3-level-grid button b { font-size: 22px; line-height: 1; }
.v3-level-grid button span { min-height: 14px; margin-top: 5px; color: var(--nyon-muted); font-size: 8px; font-weight: 900; letter-spacing: .07em; }
.v3-level-grid button.done {
  background: linear-gradient(145deg, #dce9e2, var(--nyon-sage));
  box-shadow: inset 2px 2px 0 rgb(255 255 255 / 43%), 0 5px 0 #91aa9c, 0 10px 16px rgb(48 43 59 / 6%);
}
.v3-level-grid button.done span {
  color: #ffdb45;
  text-shadow: 0 1px 0 #96721f, 0 0 1px #96721f;
  letter-spacing: 1px;
}
.v3-level-grid button.current {
  border: 3px solid var(--nyon-ink);
  background: linear-gradient(145deg, #f5a6c2, var(--nyon-pink));
  box-shadow: inset 2px 2px 0 rgb(255 255 255 / 32%), 0 6px 0 #b9587c, 0 12px 18px rgb(48 43 59 / 9%);
}
.v3-level-grid button.current span { color: var(--nyon-ink); }
.v3-level-grid button.locked {
  border-color: rgb(48 43 59 / 8%);
  background: var(--nyon-disabled-bg);
  color: var(--nyon-muted);
  opacity: .58;
  box-shadow: none;
  cursor: default;
}

.v3-level-grid button.locked b { font-size: 18px; }
.v3-level-grid button:disabled { pointer-events: none; }

.v3-level-legend {
  margin-top: 15px;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--nyon-muted);
  font-size: 8px;
  font-weight: 800;
}

.v3-level-legend span { display: inline-flex; align-items: center; gap: 5px; }
.v3-level-legend i { width: 10px; height: 10px; border: 1px solid rgb(48 43 59 / 18%); border-radius: 3px; background: #fff; }
.v3-level-legend i.done { background: var(--nyon-sage); }
.v3-level-legend i.next { border-color: var(--nyon-ink); background: var(--nyon-pink); }
.v3-level-legend i.locked { background: var(--nyon-disabled-bg); opacity: .6; }

@media (max-width: 700px) {
  .v3-levels-main {
    width: min(100% - 26px, 920px);
    padding-top: 18px;
  }

  .v3-level-hero {
    min-height: 142px;
    padding: 14px;
    grid-template-columns: 106px minmax(0, 1fr);
    gap: 14px;
  }

  .v3-level-hero > img {
    width: 106px;
    border-radius: 19px;
  }

  .v3-level-hero-copy h1 { font-size: 35px; }
  .v3-level-overall { margin-top: 13px; }

  .v3-level-tabs { margin-top: 14px; }
  .v3-level-panel { padding: 18px; }
  .v3-level-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }

  .v3-xp-demo-modal {
    align-items: flex-end;
    padding: 0;
  }

  .v3-xp-card {
    max-height: 94vh;
    max-height: 94dvh;
    padding: 14px 14px calc(18px + var(--safe-b));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 30px 30px 0 0;
  }

  .v3-lose-demo-modal {
    align-items: flex-end;
    padding: 0;
  }

  .v3-lose-card {
    max-height: 94vh;
    max-height: 94dvh;
    padding: 14px 14px calc(18px + var(--safe-b));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 30px 30px 0 0;
  }

  .v3-win-demo-modal {
    align-items: flex-end;
    padding: 0;
  }

  .v3-win-card {
    max-height: 94vh;
    max-height: 94dvh;
    padding: 14px 14px calc(18px + var(--safe-b));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 30px 30px 0 0;
  }

  .v3-howto-demo-modal {
    align-items: flex-end;
    padding: 0;
  }

  .v3-howto-card {
    max-height: 94vh;
    max-height: 94dvh;
    padding: 20px 16px calc(18px + var(--safe-b));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 30px 30px 0 0;
  }

  .v3-howto-body { grid-template-columns: 1fr; }

  .v3-howto-example {
    min-height: 201px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 93px;
    align-items: center;
    column-gap: 10px;
  }

  .v3-howto-mini-grid {
    width: 174px;
    grid-row: 1 / span 2;
  }

  .v3-howto-found {
    margin: 0;
    flex-direction: column;
    align-self: end;
  }

  .v3-howto-found span { width: max-content; }

  .v3-howto-otong {
    right: -6px;
    bottom: -13px;
    width: 91px;
  }

  /* Phone sheets need readable instructions, not three newspaper columns.
     The generic modal is text-led; one compact row per step matches the
     approved preview markup and remains legible on 421-500px Android widths. */
  .v3-generic-howto-steps { grid-template-columns: 1fr; }

  .v3-howto-steps.v3-generic-howto-steps li {
    min-height: 0;
    padding: 11px 12px;
    align-items: center;
    flex-direction: row;
  }

  .v3-howto-steps.v3-generic-howto-steps li > span {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .v3-howto-steps.v3-generic-howto-steps small {
    font-size: 12px;
    line-height: 1.42;
  }

  .v3-howto-steps:not(.v3-generic-howto-steps) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .v3-howto-steps li {
    min-height: 128px;
    padding: 10px;
    align-items: flex-start;
    flex-direction: column;
  }

  .v3-howto-steps li > span {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  #modal-about {
    align-items: flex-end;
    padding: 0;
  }

  .v3-audio-demo-modal {
    align-items: flex-end;
    padding: 0;
  }

  .v3-audio-demo-modal .v3-audio-card {
    max-height: 94vh;
    max-height: 94dvh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 30px 30px 0 0;
  }

  .about-card-v3 {
    max-height: 94vh;
    max-height: 94dvh;
    padding: 18px 14px calc(24px + var(--safe-b));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 30px 30px 0 0;
  }

  .about-card-v3::before {
    background-size: 390px 307px;
    opacity: .16;
  }

  .about-v3-hero,
  .about-v3-details {
    grid-template-columns: 1fr;
  }

  .about-v3-copy {
    padding: 14px 0 4px;
  }

  .about-v3-wordmark {
    width: 132px;
    margin-bottom: 25px;
  }

  .about-v3-copy h3 {
    padding-right: 18px;
    font-size: clamp(34px, 10.5vw, 45px);
  }

  .about-v3-copy > p:not(.v3-eyebrow) {
    font-size: 13px;
  }

  .about-v3-numbers {
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .about-v3-numbers span {
    min-width: 99px;
    flex: 0 0 99px;
  }

  .about-v3-founder {
    min-height: 420px;
    padding: 16px;
  }

  .about-v3-prof {
    max-height: 326px;
  }

  .about-v3-details {
    margin-top: 18px;
    padding-top: 18px;
  }

  .about-card-v3 .about-log {
    max-height: 44vh;
    max-height: 44dvh;
  }

  #screen-store .wallet {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 17px;
  }

  #screen-store .v3-wallet-symbol {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  #screen-store .wallet-main strong {
    font-size: 25px;
  }

  #screen-store .wallet-side {
    grid-column: 1 / -1;
    justify-content: space-between;
    padding-top: 13px;
    border-top: 1px solid rgb(255 255 255 / 15%);
    text-align: left;
  }

}

@media (max-width: 420px) {
  .v3-levels-preview .app-bar,
  .v3-gameplay-shell .app-bar { padding-inline: 11px; }
  .v3-levels-preview .v3-section-mark,
  .v3-gameplay-shell .v3-play-mark { width: 92px; }
  .v3-levels-main { width: calc(100% - 24px); }

  .v3-level-hero {
    min-height: 128px;
    padding: 12px;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    border-radius: 23px;
  }

  .v3-level-hero > img { width: 88px; border-radius: 16px; }
  .v3-level-hero-copy h1 { margin-top: 2px; font-size: 29px; }
  .v3-level-hero-copy > p:not(.v3-eyebrow) { font-size: 8.5px; line-height: 1.35; }
  .v3-level-overall { margin-top: 9px; }
  .v3-level-overall > span { font-size: 8px; }
  .v3-level-overall > span b { font-size: 11px; }
  .v3-level-overall > i { height: 7px; margin-top: 5px; }
  .v3-level-tabs {
    margin-bottom: 18px;
    padding: 4px;
    gap: 3px;
    border-radius: 15px;
  }

  .v3-level-tabs button { min-height: 44px; padding-inline: 3px; border-radius: 11px; font-size: 9px; }
  .v3-level-tabs button.locked span { display: block; font-size: 7px; }
  .v3-level-panel { padding: 15px 12px 14px; border-radius: 21px; }
  .v3-level-section-head { align-items: flex-end; flex-direction: row; gap: 8px; }
  .v3-level-section-head > div { min-width: 0; }
  .v3-level-section-head h2 { font-size: clamp(19px, 5.5vw, 25px); }
  .v3-level-section-head > span {
    padding: 6px 9px;
    font-size: 8px;
  }
  .v3-level-section-head > span b { font-size: 11px; }
  .v3-level-tier-desc { margin-top: 10px; font-size: 9px; }
  .v3-level-status { min-height: 31px; margin-top: 8px; font-size: 8px; }
  .v3-level-grid { margin-top: 15px; gap: 8px; }
  .v3-level-grid button { padding: 5px; border-radius: 15px; }
  .v3-level-grid button b { font-size: 18px; }
  .v3-level-grid button span { margin-top: 3px; font-size: 6.5px; }
  .v3-level-legend { justify-content: flex-start; gap: 9px; }

  .v3-xp-app-bar { padding-inline: 12px; }
  .v3-xp-trigger { padding-right: 8px; }
  .v3-xp-trigger p { min-width: 68px; }
  .v3-xp-shell { padding: 35px 15px; }
  .v3-xp-shell h1 { font-size: 41px; }
  .v3-xp-card { padding-inline: 12px; }

  .v3-xp-heading {
    min-height: 103px;
    padding: 11px 48px 11px 11px;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
  }

  .v3-xp-otong { width: 74px; height: 74px; border-radius: 21px; }
  .v3-xp-otong img { width: 87px; height: 87px; }
  .v3-xp-heading h2 { font-size: 26px; }
  .v3-xp-heading p { font-size: 8px; }
  .v3-xp-earn { margin-top: 11px; }
  .v3-xp-earn > div { min-height: 49px; padding-block: 6px; }
  .v3-xp-difference > div { min-height: 67px; padding: 8px 7px; }
  .v3-xp-difference span { font-size: 8px; }
  .v3-xp-difference small { font-size: 6.5px; }

  .v3-lose-card { padding-inline: 12px; }
  .v3-lose-hero { min-height: 183px; }
  .v3-lose-hero > img { width: 153px; max-height: 163px; }
  .v3-lose-clock { left: calc(50% + 39px); width: 48px; height: 48px; }
  .v3-lose-card > .v3-eyebrow { margin-top: 15px; }
  .v3-lose-card > h2 { font-size: 29px; }
  .v3-lose-copy { margin-bottom: 13px; font-size: 10px; }
  .v3-lose-notes { grid-template-columns: 1fr 1fr; }
  .v3-lose-notes > div { min-height: 105px; padding: 9px; align-items: flex-start; flex-direction: column; }
  .v3-lose-actions button { min-height: 48px; }

  .v3-win-card { padding-inline: 12px; }

  .v3-win-celebration {
    min-height: 181px;
    padding: 25px 13px 14px 112px;
    border-radius: 22px;
  }

  .v3-win-otong {
    left: -4px;
    bottom: -12px;
    width: 120px;
    height: 142px;
  }

  .v3-win-copy h2 { font-size: 29px; }
  .v3-win-stars { margin-top: 14px; }
  .v3-win-stars span { font-size: 25px; }
  .v3-win-rewards > div { padding-inline: 9px; gap: 7px; }
  .v3-win-rewards > div > span { width: 33px; height: 33px; flex-basis: 33px; }
  .v3-win-rewards b { font-size: 13px; }
  .v3-win-actions button { min-height: 48px; }
  .v3-win-actions > div button { min-height: 44px; }

  .v3-howto-card { padding-inline: 13px; }

  .v3-howto-heading {
    min-height: 68px;
    padding-right: 48px;
    gap: 10px;
  }

  .v3-howto-cover {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 17px;
  }

  .v3-howto-heading h2 { font-size: 29px; }
  .v3-howto-heading em { font-size: 9px; }
  .v3-howto-body { margin-top: 14px; gap: 12px; }

  .v3-howto-example {
    min-height: 174px;
    padding: 12px;
    grid-template-columns: 145px 80px;
    column-gap: 8px;
  }

  .v3-howto-mini-grid {
    width: 145px;
    padding: 6px;
    border-radius: 14px;
  }

  .v3-howto-mini-grid span { font-size: 10px; }
  .v3-howto-otong { width: 76px; }
  .v3-howto-found span { padding: 4px 6px; font-size: 7px; }

  .v3-howto-steps li {
    min-height: 118px;
    padding: 8px;
    border-radius: 15px;
  }

  .v3-howto-steps b { font-size: 10px; line-height: 1.15; }
  .v3-howto-steps small { font-size: 7.5px; line-height: 1.3; }
  .v3-howto-star-note { margin-top: 10px; }

  .v3-notification-scroll,
  .v3-leader-scroll,
  .v3-badges-scroll,
  .v3-store-scroll {
    padding-inline: 13px;
  }

  .v3-page-heading h1 {
    font-size: 39px;
  }

  .v3-notification-tools p {
    max-width: 150px;
  }

  #screen-notifications .notification-item {
    min-height: 108px;
    padding: 14px 13px 13px 72px;
    border-radius: 20px;
  }

  #screen-notifications .notification-item::after {
    left: 12px;
    top: 14px;
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  #screen-notifications .notification-date {
    font-size: 8px;
  }

  #screen-notifications .notification-title {
    font-size: 14px;
  }

  #screen-leader .lead-rank-hero {
    min-height: 176px;
    padding: 14px;
    border-radius: 25px;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
  }

  #screen-leader .lead-rank-avatar {
    width: 68px;
    height: 68px;
    border-radius: 21px;
  }

  #screen-leader .lead-rank-avatar img {
    width: 78px;
    height: 78px;
  }

  #screen-leader .lead-rank-copy strong {
    font-size: 32px;
  }

  #screen-leader .lead-rank-progress {
    width: 100%;
    padding: 0 4px;
    grid-column: 1 / -1;
  }

  #screen-leader .lead-rank-progress b,
  #screen-leader .lead-rank-progress span {
    display: inline;
    text-align: left;
  }

  #screen-leader .lead-rank-progress span {
    margin-left: 4px;
  }

  #screen-leader .lead-league-meta {
    align-items: flex-start;
  }

  #screen-leader .lead-league-meta > span {
    padding-top: 10px;
    align-items: center;
  }
}

@media (max-width: 350px) {
  .v3-levels-preview .app-bar,
  .v3-gameplay-shell .app-bar { padding-inline: 10px; gap: 6px; }
  .v3-levels-preview .icon-btn,
  .v3-gameplay-shell .icon-btn { width: 44px; height: 44px; flex-basis: 44px; }
  .v3-gameplay-shell .v3-play-mark { width: 92px; }
  .v3-gameplay-status-strip { padding-inline: 8px; gap: 7px; }
  .v3-gameplay-shell .ws-theme { padding-inline: 7px; }

  .v3-character-hero {
    padding-right: 14px;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 10px;
  }

  .v3-character-stage img {
    width: min(100%, 156px);
  }

  .v3-character-hero > div:last-child strong {
    font-size: 23px;
  }

  .v3-color-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-card-v3,
  .v3-howto-demo-modal *,
  .v3-win-demo-modal *,
  .v3-lose-demo-modal *,
  .v3-xp-demo-modal *,
  .v3-gameplay-shell *,
  .v3-levels-preview *,
  #screen-notifications *,
  #screen-notification-detail * {
    animation: none !important;
    transition: none !important;
  }
}

/* -------------------------------------------------------------------------
   Production v3 composition
   These selectors are intentionally scoped to the real screen classes. The
   approved preview now frames live account, progress and game data without
   changing any engine or storage identifier.
   ------------------------------------------------------------------------- */
.v3-home {
  isolation: isolate;
  max-width: 1040px;
  background: var(--nyon-cream);
  color: var(--nyon-ink);
}

.v3-home::before {
  content: '';
  position: absolute;
  z-index: 0;
  inset: 0;
  background: url('../assets/brand/nyon-v3/patterns/puzzle-constellation.svg') center 26px / 390px 307px repeat;
  opacity: .31;
  pointer-events: none;
}

.v3-home > * { position: relative; z-index: 1; }
.v3-home .app-bar {
  position: relative;
  min-height: 76px;
  padding: 12px clamp(16px, 4vw, 42px);
  border-bottom: 1px solid rgb(48 43 59 / 10%);
  background: rgb(255 248 236 / 88%);
  backdrop-filter: blur(14px);
}
.v3-home .app-bar-title {
  position: absolute;
  left: 50%;
  top: 50%;
  width: auto;
  transform: translate(-50%, -50%);
}
.v3-home-logo { display: block; width: 100px; height: auto; }
.v3-home .app-bar-actions { margin-left: auto; gap: 9px; }
.v3-home .icon-btn {
  width: 48px;
  height: 48px;
  border: 1.5px solid rgb(48 43 59 / 17%);
  border-radius: 16px;
  background: rgb(255 255 255 / 91%);
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}
.v3-home .prof-btn { width: 60px; height: 60px; flex: 0 0 60px; overflow: hidden; padding: 0; border: 2px solid var(--nyon-ink); border-radius: 50%; background: var(--nyon-sage); }
#screen-home #btn-profile img { width: 69px; height: 69px; margin: 0; object-fit: contain; transform: translateY(4px); }
.v3-home-scroll { padding: 0 clamp(16px, 4vw, 42px) calc(45px + var(--safe-b)); }
.v3-home .hero { padding: 28px 0 0; }
#v3-home-greeting { margin-bottom: 9px; font-size: clamp(12px, 2vw, 15px); letter-spacing: .1em; }
.v3-home .hero-title { max-width: 720px; margin: 0; font-size: clamp(36px, 7vw, 62px); line-height: .98; letter-spacing: -.045em; }
.v3-home .hero-sub { margin: 11px 0 18px; color: var(--nyon-muted); font-size: clamp(14px, 2vw, 17px); }
.v3-home .hero-stats { display: none; }
.v3-home .level-bar {
  width: min(100%, 610px);
  min-height: 76px;
  margin: 0;
  padding: 9px 15px 9px 9px;
  border: 1.5px solid rgb(48 43 59 / 16%);
  border-radius: 22px;
  background: #fff;
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}
.v3-home .lv-face { width: 58px; height: 58px; border-width: 2px; border-radius: 17px; background: var(--nyon-sage); }
.v3-home .lv-top b { font-size: 16px; }
.v3-home .lv-track { height: 8px; margin: 8px 0 4px; border: 0; background: #eeeae6; }
.v3-home .lv-track i { border-radius: inherit; background: var(--nyon-pink); }
.v3-home .lv-sub { font-size: 10px; }
.v3-home .daily-card {
  width: min(100%, 610px);
  min-height: 76px;
  margin: 10px 0 25px;
  padding: 13px 16px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 22px;
  background: var(--nyon-butter) !important;
  background-image: none !important;
  color: var(--nyon-ink);
  box-shadow: var(--nyon-shadow-card);
}
.v3-home .daily-card::before { display: none; }
.v3-home .daily-card.is-complete {
  position: relative;
  padding-right: 62px;
  cursor: default;
  opacity: 1;
  filter: none;
  background: color-mix(in srgb, var(--nyon-mint) 76%, white) !important;
}
.v3-home .daily-card.is-complete .dc-side { color: var(--nyon-success); }
.daily-card[hidden] { display: none !important; }
.daily-card .dc-dismiss {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid rgb(48 43 59 / 16%); border-radius: 13px;
  background: #fff; color: var(--nyon-ink);
  font: 800 18px var(--nyon-font-ui); cursor: pointer;
}
.daily-card .dc-dismiss:focus-visible { outline: 3px solid var(--nyon-ink); outline-offset: 2px; }
.v3-home .dc-kicker { color: var(--nyon-success); }
.v3-home .dc-cta { border: 0; background: rgb(255 255 255 / 64%); }
.v3-home-library { margin-top: 6px; }
.v3-home-library-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.v3-home-library-head h3 { margin: 0; font-size: clamp(27px, 4vw, 35px); line-height: 1; letter-spacing: -.025em; }
.v3-home-library-head > div > p:last-child { margin: 7px 0 0; color: var(--nyon-muted); font-size: 13px; }
#v3-quick-play {
  min-height: 48px;
  padding: 0 17px;
  border: 0;
  border-radius: 16px;
  background: var(--nyon-ink);
  color: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 4px 0 rgb(48 43 59 / 18%);
}
#v3-quick-play span { margin-right: 4px; font-size: 18px; }
.v3-home-filters {
  overflow-x: auto;
  margin: 20px 0 18px;
  padding: 2px 4px 7px;
  display: flex;
  gap: 8px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}
.v3-home-filters::-webkit-scrollbar { display: none; }
.v3-home-filter {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 16px;
  border: 1.5px solid rgb(48 43 59 / 18%);
  border-radius: 999px;
  background: #fff;
  color: var(--nyon-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  scroll-snap-align: start;
}
.v3-home-filter[aria-selected="true"] { border-color: var(--nyon-ink); background: var(--nyon-ink); color: #fff; }
.v3-home #game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.v3-home .v3-home-game-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 0;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 21px;
  background-position: center;
  background-size: cover;
  box-shadow: var(--nyon-shadow-card);
}
.v3-home .v3-home-game-card.has-cover::before { display: none; background: none; }
.v3-home .v3-home-game-card::after { display: none; }
.v3-home .v3-home-game-card .gc-name,
.v3-home .v3-home-game-card .gc-meta { display: none; }
.v3-home-card-progress {
  position: absolute;
  z-index: 2;
  right: 11px;
  bottom: 11px;
  padding: 7px 10px;
  border: 1.5px solid rgb(48 43 59 / 18%);
  border-radius: 999px;
  background: rgb(255 248 236 / 96%);
  color: var(--nyon-ink);
  font-size: 10px;
  font-weight: 900;
  box-shadow: 0 3px 0 rgb(48 43 59 / 16%), 0 7px 16px rgb(48 43 59 / 14%);
}
.v3-home .gc-lock { top: 11px; right: 11px; left: auto; width: 35px; height: 35px; border: 0; border-radius: 12px; background: rgb(255 255 255 / 91%); color: var(--nyon-ink); display: grid; place-items: center; }
.v3-home-game-card.v3-quick-pick { outline: 5px solid var(--nyon-pink); outline-offset: 3px; transform: scale(.97); }
.v3-home-community {
  width: 100%;
  min-height: 112px;
  overflow: hidden;
  padding: 15px 17px;
  border: 1.5px solid rgb(48 43 59 / 15%);
  border-radius: 22px;
  background: var(--nyon-sage);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  box-shadow: var(--nyon-shadow-card);
}
.v3-home-community-slot { margin-top: 26px; }
.v3-home-community > img { align-self: center; width: 72px; height: 82px; margin: -18px auto 0; object-fit: contain; }
.v3-home-community small { color: var(--nyon-success); font-size: 9px; font-weight: 900; letter-spacing: .11em; }
.v3-home-community h3 { margin: 2px 0 0; font-size: clamp(17px, 4vw, 23px); line-height: 1.05; }
.v3-home-community p { margin: 5px 0 0; color: #4d5f57; font-size: 12px; }
.v3-home-community a { min-height: 44px; padding: 0 15px; border-radius: 14px; background: var(--nyon-ink); color: #fff; display: inline-flex; align-items: center; font-size: 12px; font-weight: 900; text-decoration: none; }
.v3-home-footer { margin-top: 52px; padding: 27px 0 10px; border-top: 1px solid rgb(48 43 59 / 20%); }
.v3-home-footer > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.v3-home-footer img { width: 152px; max-width: 42%; }
.v3-home-footer nav { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.v3-home-footer a { min-height: 44px; padding: 0 14px; border: 1.5px solid rgb(48 43 59 / 18%); border-radius: 999px; background: rgb(255 255 255 / 65%); color: var(--nyon-ink); display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 900; text-decoration: none; }
.v3-home-footer .footer-note { margin-top: 18px; padding-top: 14px; border-top: 1px solid rgb(48 43 59 / 10%); text-align: left; }

.v3-home-menu-modal { padding: 18px; align-items: flex-end; background: rgb(48 43 59 / 46%); backdrop-filter: blur(8px); }
.v3-home-menu-card { width: min(100%, 460px); max-height: 88dvh; padding: 24px 20px calc(22px + var(--safe-b)); border: 1.5px solid rgb(48 43 59 / 16%); border-radius: 30px 30px 0 0; background: var(--nyon-cream); color: var(--nyon-ink); text-align: left; }
.v3-home-menu-card .modal-x { top: 16px; right: 16px; width: 44px; height: 44px; border: 1.5px solid rgb(48 43 59 / 15%); background: #fff; color: var(--nyon-ink); box-shadow: var(--nyon-shadow-card); }
.v3-home-menu-identity { display: flex; align-items: center; gap: 15px; padding-right: 50px; }
.v3-home-menu-identity > span { width: 74px; height: 74px; flex: 0 0 74px; overflow: hidden; border-radius: 23px; background: var(--nyon-sage); display: grid; place-items: center; }
.v3-home-menu-identity img { width: 84px; height: 84px; object-fit: contain; transform: translateY(6px); }
.v3-home-menu-identity small { color: var(--nyon-muted); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.v3-home-menu-identity h2 { margin: 2px 0; font-size: 25px; }
#v3-home-menu-profiles { min-height: 28px; padding: 0; border: 0; background: transparent; color: var(--nyon-pink-deep); font: inherit; font-size: 12px; font-weight: 900; }
.v3-home-menu-stats { margin: 20px 0 15px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.v3-home-menu-stats span { padding: 12px 7px; border-radius: 16px; background: var(--nyon-rose-wash); text-align: center; }
.v3-home-menu-stats b, .v3-home-menu-stats small { display: block; }
.v3-home-menu-stats b { font-size: 18px; }
.v3-home-menu-stats small { color: var(--nyon-muted); font-size: 10px; }
.v3-home-menu-links { display: grid; gap: 7px; }
.v3-home-menu-links button { width: 100%; min-height: 52px; padding: 7px 13px; border: 1.5px solid rgb(48 43 59 / 12%); border-radius: 16px; background: #fff; color: var(--nyon-ink); display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; font: inherit; text-align: left; }
.v3-home-menu-links b { font-size: 14px; }
.v3-home-menu-links i { font-size: 22px; font-style: normal; }
.v3-home-admin { width: 100%; margin-top: 10px; }

/* One character per row keeps identity and account-changing actions readable.
   The whole left side selects the character; the labelled controls on the
   right stay visually separate so Reset/Hapus are much harder to mis-tap. */
.v3-profile-preview .kid-list { margin: 0; display: grid; grid-template-columns: 1fr; gap: 12px; }
.v3-profile-preview .kid-card.v3-profile-card {
  position: relative;
  width: 100%;
  min-height: 138px;
  padding: 13px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  text-align: left;
}
.v3-profile-preview .kid-card.v3-active-profile { background: var(--nyon-sage); border-color: rgb(48 43 59 / 20%); }
.v3-profile-preview .v3-profile-pick {
  min-width: 0;
  min-height: 108px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--nyon-ink);
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 14px;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.v3-profile-preview .v3-profile-pick .kid-face {
  width: 92px;
  height: 92px;
  margin: 0;
  overflow: hidden;
  border: 2.5px solid var(--nyon-ink);
  border-radius: 27px;
  background: var(--nyon-cream);
}
.v3-profile-preview .v3-profile-pick .kid-face img { width: 103px; height: 103px; transform: translateY(7px); }
.v3-profile-preview .v3-profile-copy { min-width: 0; }
.v3-profile-preview .v3-profile-copy small { display: block; color: var(--nyon-muted); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.v3-profile-preview .kid-name { overflow-wrap: anywhere; font-size: 24px; font-weight: 900; line-height: 1.05; }
.v3-profile-preview .v3-profile-copy em { display: block; margin-top: 5px; color: var(--nyon-muted); font-size: 11px; font-style: normal; font-weight: 800; }
.v3-profile-preview .v3-profile-check { width: 28px; height: 28px; border-radius: 999px; background: var(--nyon-ink); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 900; }
.v3-profile-preview .v3-profile-card-actions { width: 96px; display: grid; gap: 7px; }
.v3-profile-preview .v3-profile-action {
  position: static;
  width: 96px;
  height: 35px;
  padding: 0 10px;
  border: 1.5px solid rgb(48 43 59 / 13%);
  border-radius: 11px;
  background: rgb(255 255 255 / 82%);
  color: var(--nyon-ink);
  opacity: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  font: inherit;
  cursor: pointer;
}
.v3-profile-preview .v3-profile-action > span { width: 17px; flex: 0 0 17px; font-size: 16px; line-height: 1; text-align: center; }
.v3-profile-preview .v3-profile-action > b { font-size: 10px; font-weight: 900; }
.v3-profile-preview .v3-profile-action.kid-del { border-color: rgb(155 57 73 / 20%); background: #fff1f2; color: var(--nyon-danger); }
.v3-profile-preview .v3-profile-action:disabled, .v3-profile-preview .v3-profile-pick:disabled { cursor: wait; opacity: .45; }
.v3-profile-preview #btn-addkid {
  width: 100%;
  min-height: 70px;
  margin: 12px 0 0;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  justify-content: start;
  column-gap: 12px;
  text-align: left;
}
.v3-profile-preview #btn-addkid > span { grid-row: 1 / span 2; width: 44px; height: 44px; margin: 0; border-radius: 14px; font-size: 27px; }
.v3-profile-preview #btn-addkid b, .v3-profile-preview #btn-addkid small { justify-self: start; }

.v3-character-preview .nk-poses { margin-bottom: 0; }
.v3-character-preview .nk-pose { min-height: 103px; border: 1.5px solid rgb(48 43 59 / 13%); box-shadow: 0 3px 0 rgb(48 43 59 / 10%); }
.v3-character-preview .nk-pose img { width: 72px; height: 72px; }
.v3-character-preview .nk-avatars { margin-bottom: 0; }
.v3-character-preview .nk-av { border: 1.5px solid rgb(48 43 59 / 13%); box-shadow: none; }
.v3-character-preview .nk-av.on, .v3-character-preview .nk-pose.on { border-color: var(--nyon-ink); background: var(--nyon-rose-wash); transform: none; box-shadow: 0 0 0 2px rgb(239 127 168 / 25%); }
.v3-character-preview #nk-badges-section { margin: 14px 0 0; border: 1.5px solid rgb(48 43 59 / 13%); background: rgb(255 255 255 / 92%); }
.v3-character-preview .v3-character-save button { width: 100%; min-height: 52px; border: 1.5px solid var(--nyon-ink); border-radius: 16px; background: var(--nyon-pink); color: var(--nyon-ink); font: inherit; font-weight: 900; box-shadow: 0 4px 0 #cf648b; }

/* Existing live reward fragments are normalised into the approved cards. */
.v3-win-rewards > div { min-width: 0; }
.v3-win-rewards > div p { min-width: 0; }
.v3-win-rewards .wx-badge-art { width: 31px; height: 31px; object-fit: contain; }
.v3-win-rewards .wx-up, .v3-win-rewards .wx-badge { grid-column: 1 / -1; }
.v3-win-rewards .wx-mission { margin-top: 0; color: var(--nyon-ink); font-size: inherit; }
.v3-win-rewards .wx-daily { color: var(--nyon-ink); }
.v3-win-card .win-unlock { margin-bottom: 0; }

@media (min-width: 640px) {
  .v3-home #game-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .v3-home-menu-modal { align-items: center; }
  .v3-home-menu-card { border-radius: 30px; }
}

@media (min-width: 880px) {
  .v3-home #game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  #screen-leader .lead-rank-hero {
    min-height: 166px;
    padding: 14px;
    grid-template-columns: 82px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 8px 13px;
  }
  #screen-leader .lead-rank-avatar {
    width: 82px;
    height: 82px;
    grid-row: 1 / span 2;
    border-radius: 24px;
  }
  #screen-leader .lead-rank-avatar img { width: 88%; height: 88%; }
  #screen-leader .lead-rank-copy strong { font-size: 34px; }
  #screen-leader .lead-rank-copy > span { overflow: visible; text-overflow: clip; }
  #screen-leader .lead-rank-progress {
    width: 100%;
    padding: 0;
    grid-column: 2;
    justify-self: stretch;
  }
  #screen-leader .lead-rank-progress b,
  #screen-leader .lead-rank-progress span { display: inline; text-align: left; }
  #screen-leader .lead-rank-progress span { margin-left: 4px; }
}

@media (max-width: 420px) {
  .v3-home .app-bar { padding-inline: 13px; }
  .v3-home-scroll { padding-inline: 13px; }
  .v3-home .v3-home-logo { width: 92px; }
  .v3-home .prof-btn { width: 56px; height: 56px; flex-basis: 56px; }
  #screen-home #btn-profile img { width: 64px; height: 64px; }
  .v3-home #game-grid { gap: 10px; }
  .v3-home .v3-home-game-card { border-radius: 18px; }
  .v3-home-community { min-height: 126px; grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding: 13px; }
  .v3-home-community > img { width: 58px; height: 78px; margin-top: -14px; }
  .v3-home-community p { display: none; }
  .v3-home-community a { grid-column: 2; justify-self: start; min-height: 40px; margin-top: -2px; }
  .v3-home-footer > div:first-child { align-items: flex-start; flex-direction: column; }
  .v3-home-footer img { width: 142px; max-width: none; }
  .v3-home-footer nav { justify-content: flex-start; }
  .v3-profile-preview .kid-card.v3-profile-card { min-height: 0; grid-template-columns: 1fr; gap: 9px; }
  .v3-profile-preview .v3-profile-pick { min-height: 84px; grid-template-columns: 76px minmax(0, 1fr) 27px; gap: 11px; }
  .v3-profile-preview .v3-profile-pick .kid-face { width: 76px; height: 76px; border-radius: 23px; }
  .v3-profile-preview .v3-profile-pick .kid-face img { width: 86px; height: 86px; }
  .v3-profile-preview .kid-name { font-size: 21px; }
  .v3-profile-preview .v3-profile-card-actions { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .v3-profile-preview .v3-profile-action { width: 100%; height: 40px; justify-content: center; }
}

/* Sudoku Original Daily beta. Isolated from regular level cards and rewards. */
#sudoku-daily-entry[hidden], .sudoku-daily-modal[hidden] { display: none !important; }
#sudoku-daily-entry { margin: 14px 0 0; }
.sd-entry-card {
  width: 100%; min-height: 126px; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border: 1.5px solid rgb(48 43 59 / 18%); border-radius: 24px;
  background: linear-gradient(125deg, #f8d4e2 0 68%, #bfd2c7 68% 100%);
  box-shadow: 0 6px 0 rgb(48 43 59 / 12%); color: var(--nyon-ink); text-align: left;
  font-family: var(--nyon-font-ui); cursor: pointer;
}
.sd-entry-card span { display: grid; gap: 4px; }
.sd-entry-card small, .sd-hero > small, .sd-game header small, .sd-result > small,
.sd-rules-page > small, .sd-leader-section header small {
  color: #9f3f69; font-size: 11px; font-weight: 1000; letter-spacing: .16em;
}
.sd-entry-card b { font-size: clamp(19px, 4vw, 25px); line-height: 1.05; }
.sd-entry-card em { color: var(--nyon-muted); font-size: 12px; font-style: normal; font-weight: 800; }
.sd-entry-card > strong {
  flex: 0 0 auto; max-width: 120px; padding: 11px 13px; border: 1px solid rgb(48 43 59 / 16%);
  border-radius: 14px; background: #fff; box-shadow: 0 3px 0 rgb(48 43 59 / 12%);
  font-size: 13px; text-align: center;
}
.sd-entry-card.is-loading { min-height: 90px; background: var(--nyon-sage); cursor: default; }

body.sudoku-daily-open { overflow: hidden; }
.sudoku-daily-modal {
  position: fixed; inset: 0; z-index: 10050; padding: 0;
  display: grid; place-items: center; background: rgb(48 43 59 / 52%);
  backdrop-filter: blur(8px); font-family: var(--nyon-font-ui); color: var(--nyon-ink);
}
.sudoku-daily-shell {
  width: min(620px, 100%); height: min(900px, 100dvh); overflow: hidden;
  display: grid; grid-template-rows: 68px minmax(0, 1fr);
  border: 1px solid rgb(48 43 59 / 16%); border-radius: 28px;
  background: var(--nyon-cream); box-shadow: 0 12px 0 rgb(48 43 59 / 28%);
}
.sudoku-daily-shell > header {
  position: relative; z-index: 2; padding: 10px 14px;
  display: grid; grid-template-columns: 48px 1fr 72px; align-items: center;
  border-bottom: 1px solid rgb(48 43 59 / 10%); background: rgb(255 248 236 / 94%);
}
.sudoku-daily-shell > header img { width: 104px; justify-self: center; }
.sd-close, .sd-rules, #sd-refresh {
  min-height: 42px; border: 1px solid rgb(48 43 59 / 16%); border-radius: 13px;
  background: #fff; color: var(--nyon-ink); box-shadow: 0 3px 0 rgb(48 43 59 / 11%);
  font: 900 14px var(--nyon-font-ui); cursor: pointer;
}
.sd-close { width: 44px; font-size: 21px; }
.sd-rules { width: 68px; }
.sudoku-daily-content { overflow-y: auto; overscroll-behavior: contain; padding: 22px; }
.sd-loading { min-height: 60vh; display: grid; place-items: center; font-weight: 900; }
.sd-hero { padding: 24px; border: 1px solid rgb(48 43 59 / 14%); border-radius: 26px; background: #fff; }
.sd-hero h1, .sd-result h1, .sd-rules-page h1 {
  margin: 7px 0 13px; font-size: clamp(31px, 8vw, 46px); line-height: .98; letter-spacing: -1.5px;
}
.sd-hero h1 span { color: #c94f7b; }
.sd-hero p, .sd-result p, .sd-rules-page li { color: var(--nyon-muted); font-size: 14px; line-height: 1.55; }
.sd-difficulty, .sd-mode {
  display: inline-flex; margin: 2px 0 8px; padding: 7px 10px; border-radius: 999px;
  background: var(--nyon-sage); font-size: 11px; font-weight: 1000; letter-spacing: .08em;
}
.sd-primary {
  width: 100%; min-height: 54px; padding: 12px 16px; border: 1.5px solid rgb(48 43 59 / 22%);
  border-radius: 17px; background: var(--nyon-pink); color: var(--nyon-ink);
  box-shadow: 0 4px 0 #bd567d; font: 1000 17px var(--nyon-font-ui); cursor: pointer;
}
.sd-primary:disabled { opacity: .58; cursor: wait; }
.sd-leader-section { margin-top: 18px; }
.sd-leader-section > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sd-leader-section h2 { margin: 2px 0 10px; font-size: 24px; }
#sd-refresh { width: 44px; }
.sd-ranking { display: grid; gap: 8px; }
.sd-rank-row {
  min-height: 62px; padding: 10px 13px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 9px;
  border: 1px solid rgb(48 43 59 / 12%); border-radius: 17px; background: #fff;
}
.sd-rank-row.is-mine { border-color: #c94f7b; background: #fae4ec; }
.sd-rank-row > b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: var(--nyon-sage); }
.sd-rank-row span { display: grid; }
.sd-rank-row span strong { font-size: 14px; }
.sd-rank-row span small { color: var(--nyon-muted); font-size: 11px; }
.sd-rank-row time { font-size: 17px; font-weight: 1000; font-variant-numeric: tabular-nums; }
.sd-empty-rank, .sd-rule-note {
  padding: 16px; border-radius: 18px; background: var(--nyon-sage); color: var(--nyon-ink); font-size: 13px; font-weight: 800;
}

.sd-game > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.sd-game h1 { margin: 3px 0 14px; font-size: clamp(23px, 6vw, 32px); line-height: 1.05; }
.sd-game header > div:last-child { display: grid; justify-items: end; }
.sd-game header time { font-size: 19px; font-weight: 1000; font-variant-numeric: tabular-nums; }
.sd-board {
  width: min(100%, 440px); aspect-ratio: 1; margin: 2px auto 14px;
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); grid-template-rows: repeat(9, minmax(0, 1fr));
  border: 2.5px solid var(--nyon-ink); background: var(--nyon-ink);
}
.sd-cell {
  min-width: 0; padding: 0; display: grid; place-items: center; overflow: hidden;
  border: 0; border-top: 1px solid rgb(48 43 59 / 22%); border-left: 1px solid rgb(48 43 59 / 22%);
  background: #fff; color: var(--nyon-ink); font: 900 clamp(15px, 4vw, 22px) var(--nyon-font-ui); cursor: pointer;
}
.sd-cell.box-top { border-top-width: 2.5px; border-top-color: var(--nyon-ink); }
.sd-cell.box-left { border-left-width: 2.5px; border-left-color: var(--nyon-ink); }
.sd-cell.is-fixed { background: #eee8dd; cursor: default; }
.sd-cell.is-selected { background: #f5bfd3; box-shadow: inset 0 0 0 2px #c94f7b; }
.sd-notes { width: 100%; height: 100%; padding: 2px; display: grid; grid-template-columns: repeat(3, 1fr); }
.sd-notes i { display: grid; place-items: center; color: #7e7187; font: 700 clamp(6px, 1.7vw, 9px) var(--nyon-font-ui); font-style: normal; }
.sd-keypad { width: min(100%, 440px); margin: 0 auto; display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.sd-keypad button, .sd-tools button {
  min-height: 42px; padding: 4px; border: 1px solid rgb(48 43 59 / 17%); border-radius: 11px;
  background: #fff; color: var(--nyon-ink); box-shadow: 0 2px 0 rgb(48 43 59 / 12%); font: 900 16px var(--nyon-font-ui);
}
.sd-tools { width: min(100%, 440px); margin: 10px auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.sd-tools button { min-height: 48px; font-size: 11px; }
.sd-tools button.is-active { background: var(--nyon-sage); }
#sd-sync { min-height: 22px; margin: 8px 0; color: var(--nyon-muted); font-size: 12px; text-align: center; }
#sd-sync.is-error, .sd-hero p.is-error { color: #a02d42; font-weight: 900; }
.sd-note { margin: 12px 0 0; color: var(--nyon-muted); font-size: 11px; line-height: 1.45; text-align: center; }

.sd-result { text-align: center; }
.sd-result > img { display: block; width: min(210px, 52vw); height: 190px; object-fit: contain; margin: 0 auto; }
.sd-result-time { display: block; font-size: 46px; font-variant-numeric: tabular-nums; }
.sd-result .sd-mode { margin: 4px auto 14px; }
.sd-result-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.sd-result-stats > div { padding: 16px; display: grid; border: 1px solid rgb(48 43 59 / 12%); border-radius: 18px; background: #fff; }
.sd-result-stats b { font-size: 25px; }
.sd-result-stats small { color: var(--nyon-muted); font-size: 11px; }
.sd-rules-page ul { padding-left: 21px; }
.sd-rules-page li { margin-bottom: 10px; }
.sd-rules-page .sd-primary { margin-top: 16px; }
.sd-error { padding: 28px; text-align: center; }

@media (max-width: 640px) {
  .sudoku-daily-modal { place-items: stretch; }
  .sudoku-daily-shell { width: 100%; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .sudoku-daily-content { padding: 16px 14px calc(22px + env(safe-area-inset-bottom)); }
  .sd-entry-card { min-height: 118px; padding: 15px; border-radius: 21px; }
  .sd-entry-card > strong { max-width: 98px; padding-inline: 9px; font-size: 11px; }
  .sd-hero { padding: 20px 17px; }
  .sd-tools button { font-size: 10px; }
}
