.gnw-app {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Clean Fullscreen Game Mode: ONLY essential card, turn, score, timer & exit */
.gnw-app.is-focus {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  padding: 20px 16px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.gnw-app.is-focus .gnw-controls,
.gnw-app.is-focus .gnw-side-stack,
.gnw-app.is-focus .gnw-packs-section,
.gnw-app.is-focus .gnw-panels,
.gnw-app.is-focus .gnw-print-sheet {
  display: none !important;
}
.gnw-app.is-focus .gnw-stage-grid {
  grid-template-columns: 1fr;
  width: 100%;
  max-width: 520px;
}
.gnw-app.is-focus .gnw-deck-topbar,
.gnw-app.is-focus .gnw-stack-wrap,
.gnw-app.is-focus .gnw-deck-actions,
.gnw-app.is-focus .gnw-deck-subbar {
  max-width: 500px;
}
.gnw-app.is-focus .gnw-stack-wrap {
  height: 390px;
}
.gnw-app.is-focus .gnw-word-text {
  font-size: 48px;
}
.gnw-app.is-focus .gnw-fs-scores {
  display: inline-flex;
}

.gnw-controls {
  background: var(--card);
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: var(--radius);
  padding: 16px 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.gnw-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.gnw-modes {
  display: inline-flex;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}
.gnw-mode-btn {
  min-height: 40px;
  padding: 0 16px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.gnw-mode-btn[aria-pressed="true"] {
  background: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}
.gnw-deck-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.gnw-link-btn {
  background: none;
  border: none;
  padding: 4px 8px;
  color: var(--primary);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}
.gnw-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gnw-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.gnw-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.gnw-field select, .gnw-field input, .gnw-field textarea {
  min-height: 44px;
  padding: 8px 12px;
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
}

/* Main Stage Grid */
.gnw-stage-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Stacked 3D Card Deck Arena */
.gnw-deck-arena {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 8px 0 4px;
}
.gnw-deck-topbar {
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.gnw-top-left, .gnw-top-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gnw-turn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 2px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.gnw-turn-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
}
.gnw-fs-scores {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  border: 2px solid var(--border);
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}
.gnw-live-clock {
  font-family: var(--font-head);
  font-size: 22px;
  line-height: 1;
  color: var(--text);
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 2px solid var(--border);
}
.gnw-live-clock.is-warning {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}
.gnw-fs-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  border: 2px solid var(--border);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.gnw-fs-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.gnw-stack-wrap {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 340px;
  perspective: 1100px;
  touch-action: pan-y;
}
.gnw-card-layer {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  pointer-events: none;
  will-change: transform, opacity;
  transition: transform 0.30s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.24s ease;
}
.gnw-card-layer.is-dragging,
.gnw-card-layer.is-instant {
  transition: none !important;
}
.gnw-layer-bottom {
  background: #f5d2e3;
  border: 2px solid #e6b8d0;
  transform: translate3d(0, 18px, 0) scale(0.92);
  z-index: 1;
}
.gnw-layer-bottom.is-layer-entering {
  transform: translate3d(0, 24px, 0) scale(0.88);
  opacity: 0;
}
.gnw-layer-middle {
  background: #fce4ef;
  border: 2px solid #edc6da;
  transform: translate3d(0, 9px, 0) scale(0.96);
  z-index: 2;
}
.gnw-layer-middle.is-layer-rising {
  transform: translate3d(0, 18px, 0) scale(0.92);
  opacity: 0.92;
}
.gnw-deck-arena[data-theme="draw"] .gnw-layer-bottom {
  background: #f5df9c;
  border-color: #e4c66d;
}
.gnw-deck-arena[data-theme="draw"] .gnw-layer-middle {
  background: #fdf0c2;
  border-color: #edd58b;
}

.gnw-active-card {
  position: absolute;
  inset: 0;
  z-index: 3;
  cursor: grab;
  user-select: none;
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.30s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease;
}
.gnw-active-card:active { cursor: grabbing; }
.gnw-active-card.is-dragging,
.gnw-active-card.is-instant { transition: none !important; }
.gnw-active-card.is-flipped { transform: rotateY(180deg); }
.gnw-active-card.is-promoting {
  transform: translate3d(0, 10px, 0) scale(0.955);
  opacity: 0.92;
}
.gnw-active-card.is-flipped.is-promoting {
  transform: translate3d(0, 10px, 0) scale(0.955) rotateY(180deg);
  opacity: 0.92;
}

.gnw-fly-card {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  user-select: none;
  transform-style: preserve-3d;
  will-change: transform, opacity;
  transition: transform 0.34s cubic-bezier(0.32, 0, 0.2, 1), opacity 0.26s ease-out;
}
.gnw-fly-card.is-flipped { transform: rotateY(180deg); }
.gnw-fly-card.is-fly-right {
  transform: translate3d(105%, -16px, 0) rotate(16deg);
  opacity: 0;
}
.gnw-fly-card.is-fly-left {
  transform: translate3d(-105%, 14px, 0) rotate(-16deg);
  opacity: 0;
}

.gnw-card-face {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 24px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
}
.gnw-card-front {
  background: var(--primary);
  color: #ffffff;
  border: 3px solid var(--primary-lip);
  border-bottom-width: 7px;
}
.gnw-active-card[data-theme="draw"] .gnw-card-front,
.gnw-fly-card[data-theme="draw"] .gnw-card-front {
  background: var(--accent);
  color: var(--text);
  border-color: var(--accent-lip);
}
.gnw-deck-arena[data-state="countdown"] .gnw-active-card .gnw-card-front,
.gnw-deck-arena[data-state="summary"] .gnw-active-card .gnw-card-front {
  background: var(--card);
  color: var(--text);
  border-color: var(--border);
}

.gnw-countdown-num {
  font-family: var(--font-head);
  font-size: 88px;
  line-height: 1;
  color: var(--primary);
  margin: 0;
  animation: gnwPop 0.35s cubic-bezier(.22,1,.36,1);
}
@keyframes gnwPop {
  0% { transform: scale(0.55); opacity: 0.2; }
  70% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.gnw-card-back {
  transform: rotateY(180deg);
  background: var(--text);
  color: #ffffff;
  border: 3px solid #241023;
  border-bottom-width: 7px;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
  background-image: radial-gradient(rgba(255, 197, 66, 0.22) 2px, transparent 2px);
  background-size: 20px 20px;
}
.gnw-back-badge {
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
}
.gnw-back-title {
  font-family: var(--font-head);
  font-size: 30px;
  line-height: 1.2;
  margin: 0;
}
.gnw-back-sub {
  margin: 0;
  font-size: 14px;
  color: #f0d7e6;
}

.gnw-stamp {
  position: absolute;
  top: 24px;
  padding: 6px 14px;
  border-radius: 10px;
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  z-index: 5;
  border: 3px solid currentColor;
  transition: opacity 0.12s ease, transform 0.16s cubic-bezier(0.22, 1, 0.36, 1);
}
.gnw-stamp-yes {
  left: 22px;
  color: #166534;
  background: #dcfce7;
  transform: rotate(-10deg);
}
.gnw-stamp-yes.is-stamped {
  transform: rotate(-10deg) scale(1.08);
}
.gnw-stamp-skip {
  right: 22px;
  color: #991b1b;
  background: #fee2e2;
  transform: rotate(10deg);
}
.gnw-stamp-skip.is-stamped {
  transform: rotate(10deg) scale(1.08);
}

.gnw-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.gnw-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.gnw-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
}
.gnw-active-card[data-theme="draw"] .gnw-badge,
.gnw-fly-card[data-theme="draw"] .gnw-badge,
.gnw-deck-arena[data-state="countdown"] .gnw-active-card .gnw-badge,
.gnw-deck-arena[data-state="summary"] .gnw-active-card .gnw-badge {
  background: rgba(59, 29, 58, 0.1);
}

.gnw-card-center {
  text-align: center;
  padding: 8px 4px;
}
.gnw-cue-label {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.88;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.gnw-word-text {
  font-family: var(--font-head);
  font-size: 42px;
  line-height: 1.12;
  margin: 0;
  word-break: break-word;
}
.gnw-word-hint {
  margin: 12px 0 0;
  font-size: 14px;
  font-weight: 600;
  opacity: 0.88;
}

.gnw-summary-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  max-height: 92px;
  overflow-y: auto;
}
.gnw-sum-chip {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
}
.gnw-sum-chip.is-skip {
  background: var(--bg);
  color: var(--muted);
  text-decoration: line-through;
}

.gnw-card-footer-hint {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.82;
}

.gnw-deck-actions {
  width: 100%;
  max-width: 440px;
  display: grid;
  grid-template-columns: 0.9fr 1.3fr 0.9fr;
  gap: 10px;
  margin-top: 12px;
}
.gnw-deck-subbar {
  width: 100%;
  max-width: 440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}
.gnw-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* Illustrated 2:3 Word Packs Showcase */
.gnw-packs-section {
  background: var(--card);
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.gnw-packs-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.gnw-packs-head h2 {
  font-family: var(--font-head);
  font-size: 24px;
  line-height: 1.2;
  margin: 0;
}
.gnw-packs-sub {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.gnw-packs-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.gnw-pack-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s cubic-bezier(.22,1,.36,1);
}
.gnw-pack-btn:hover {
  transform: translateY(-4px);
}
.gnw-pack-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid #ffffff;
  box-shadow: 0 6px 16px rgba(59, 29, 58, 0.14);
  background: var(--bg);
  position: relative;
}
.gnw-pack-btn[aria-pressed="true"] .gnw-pack-cover {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary), 0 8px 20px rgba(201, 24, 88, 0.25);
}
.gnw-pack-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.gnw-pack-btn:hover .gnw-pack-cover img {
  transform: scale(1.06);
}
.gnw-pack-label {
  font-family: var(--font-head);
  font-size: 15px;
  line-height: 1.2;
  color: var(--text);
}
.gnw-pack-btn[aria-pressed="true"] .gnw-pack-label {
  color: var(--primary);
}
.gnw-pack-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-top: -4px;
}

/* Right Column: Timer + Scoreboard */
.gnw-side-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.gnw-panel {
  background: var(--card);
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gnw-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.gnw-panel-title {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}
.gnw-timer-display {
  font-family: var(--font-head);
  font-size: 38px;
  line-height: 1.05;
  text-align: center;
  padding: 4px 0;
  color: var(--text);
}
.gnw-timer-display.is-warning { color: var(--primary); }
.gnw-timer-presets {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.gnw-chip {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.gnw-chip[aria-pressed="true"] {
  background: var(--text);
  color: #ffffff;
  border-color: var(--text);
}
.gnw-timer-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.gnw-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gnw-team {
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gnw-team.is-active {
  border-color: var(--primary);
  background: var(--card);
}
.gnw-team-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.gnw-team.is-active .gnw-team-name { color: var(--primary); }
.gnw-team-score {
  font-family: var(--font-head);
  font-size: 36px;
  line-height: 1;
  color: var(--text);
}
.gnw-team-ctrls {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.gnw-mini-btn {
  min-width: 36px;
  min-height: 36px;
  border-radius: 10px;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}
.gnw-mini-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Utilities Panels */
.gnw-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.gnw-util-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-bottom-width: 4px;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gnw-util-card h2 {
  font-family: var(--font-head);
  font-size: 22px;
  line-height: 1.2;
  margin: 0;
}
.gnw-util-card p { margin: 0; font-size: 14px; color: var(--muted); }
.gnw-inline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.gnw-status {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  min-height: 20px;
}

/* Printable Cut-out Sheet */
.gnw-print-sheet { display: none; }
.gnw-print-sheet.is-preview {
  display: block;
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  color: #111111;
}
.gnw-print-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.gnw-print-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
  font-size: 12px;
  color: #555555;
}
.gnw-print-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px dashed #999999;
  border-left: 1px dashed #999999;
}
.gnw-print-card {
  border-right: 1px dashed #999999;
  border-bottom: 1px dashed #999999;
  padding: 16px 12px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: center;
  break-inside: avoid;
}
.gnw-print-meta {
  font-size: 11px;
  color: #666666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.gnw-print-word {
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 700;
  color: #111111;
  margin: 8px 0;
}
.gnw-print-foot { font-size: 10px; color: #888888; }

@media (max-width: 900px) {
  .gnw-packs-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  .gnw-stage-grid, .gnw-panels { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .gnw-controls { padding: 16px; }
  .gnw-modes { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .gnw-mode-btn { padding: 0 8px; font-size: 13px; }
  .gnw-filter-grid { grid-template-columns: 1fr; }
  .gnw-stack-wrap { height: 310px; }
  .gnw-word-text { font-size: 34px; }
  .gnw-deck-actions { grid-template-columns: 1fr 1fr; }
  .gnw-deck-actions [data-primary-action] { grid-column: 1 / -1; order: -1; }
  .gnw-packs-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .gnw-print-grid { grid-template-columns: repeat(2, 1fr); }
}
@media print {
  .gnw-packs-section { display: none !important; }
  .gnw-print-sheet { display: block !important; border: none; padding: 0; }
  .gnw-print-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .gnw-print-card { min-height: 145px; }
}
@media (prefers-reduced-motion: reduce) {
  .gnw-card-layer,
  .gnw-active-card,
  .gnw-fly-card,
  .gnw-stamp {
    transition: none !important;
  }
}