/* ==========================================================================
   ToolNPlay Sudoku - Dark Mode & Brand Design System
   Exact match to https://toolnplay.com
   ========================================================================== */

:root {
  --bg-canvas: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;

  --cerulean: #0284c7;
  --cerulean-light: #0ea5e9;
  --cerulean-glow: rgba(14, 165, 233, 0.35);

  --neon-rose: #f43f5e;
  --neon-rose-glow: rgba(244, 63, 94, 0.35);

  --amber: #f59e0b;
  --emerald: #10b981;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  --peer-bg: rgba(14, 165, 233, 0.08);
  --same-digit-bg: rgba(245, 158, 11, 0.16);
  --selected-bg: rgba(14, 165, 233, 0.24);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html.dark, body.dark {
  --bg-canvas: #0a0a0c;         /* Jetblack canvas */
  --bg-surface: #121216;        /* Jetblack surface */
  --bg-card: #15151c;           /* Jetblack card */
  --bg-hover: #1b1b24;          /* Jetblack hover */
  --border-subtle: #23232f;     /* Jetblack border */
  --border-strong: #323242;

  --cerulean: #0ea5e9;
  --cerulean-light: #38bdf8;
  --cerulean-glow: rgba(14, 165, 233, 0.4);

  --neon-rose: #ff007f;
  --neon-rose-glow: rgba(255, 0, 127, 0.4);

  --amber: #fbbf24;
  --emerald: #10b981;

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --peer-bg: #161c26;
  --same-digit-bg: rgba(255, 0, 127, 0.18);
  --selected-bg: rgba(14, 165, 233, 0.32);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ToolNPlay Top Network Promo Banner */
.tnp-top-banner {
  background: linear-gradient(90deg, #0284c7 0%, #4f46e5 50%, #ff007f 100%);
  color: #ffffff;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.tnp-top-banner a {
  color: #fff;
  text-decoration: underline;
  margin-left: 0.35rem;
}

/* Site Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--cerulean), var(--neon-rose));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 1.15rem;
  box-shadow: 0 0 12px var(--cerulean-glow);
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-title span {
  color: var(--cerulean);
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  font-weight: 600;
}

/* Desktop Navigation */
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--cerulean);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all 0.15s ease;
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--cerulean);
  border-color: var(--cerulean);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 1.35rem;
  cursor: pointer;
}

.mobile-menu-drawer {
  display: none;
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.25rem;
  flex-direction: column;
  gap: 0.6rem;
}

.mobile-menu-drawer.show {
  display: flex;
}

.mobile-menu-drawer a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.4rem 0;
}

/* Main Container */
.main-content {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Difficulty Selector */
.diff-ribbon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--bg-card);
  padding: 0.35rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.diff-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.diff-tab-btn.active {
  background: var(--cerulean);
  color: #ffffff;
  box-shadow: 0 2px 10px var(--cerulean-glow);
}

/* Status Bar */
.game-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  padding: 0.25rem 0.5rem;
}

.status-badge {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
}

.status-badge span {
  color: var(--text-primary);
}

.text-danger {
  color: var(--neon-rose) !important;
  font-weight: 800;
}

.timer-pill {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.3);
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-full);
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--cerulean);
  letter-spacing: 0.05em;
}

/* Board & Keypad Layout */
.game-layout-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  width: 100%;
}

@media (min-width: 900px) {
  .game-layout-grid {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 2rem;
  }
}

/* ==========================================================================
   Tactile 2D Sudoku Board (Crisp, High Contrast, 100% Readable)
   ========================================================================== */

.sudoku-grid-wrapper {
  width: 100%;
  max-width: 500px;
  background-color: var(--bg-card);
  border: 3px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  padding: 4px;
}

.sudoku-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--border-subtle);
  gap: 1px;
}

.sudoku-cell {
  background-color: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  user-select: none;
  outline: none;
  transition: background-color 0.12s ease;
}

/* 3x3 Box Boundaries: Distinct, Thick Separation */
.sudoku-cell.box-left {
  border-left: 2px solid var(--cerulean);
}
.sudoku-cell.box-top {
  border-top: 2px solid var(--cerulean);
}
.sudoku-cell.box-right {
  border-right: 2px solid var(--cerulean);
}
.sudoku-cell.box-bottom {
  border-bottom: 2px solid var(--cerulean);
}

/* Cell States */
.sudoku-cell.is-fixed .cell-val {
  color: var(--text-primary);
  font-weight: 800;
}

.sudoku-cell .cell-val {
  font-size: clamp(1.2rem, 4vw, 2.1rem);
  font-weight: 700;
  color: var(--cerulean);
  line-height: 1;
  transition: transform 0.1s ease;
}

.sudoku-cell.is-peer {
  background-color: var(--peer-bg);
}

.sudoku-cell.is-same-digit {
  background-color: var(--same-digit-bg);
}

.sudoku-cell.is-same-digit .cell-val {
  color: var(--neon-rose);
  font-weight: 900;
}

.sudoku-cell.is-selected {
  background-color: var(--selected-bg) !important;
  box-shadow: inset 0 0 0 2px var(--cerulean), 0 0 10px var(--cerulean-glow);
  z-index: 2;
}

.sudoku-cell.is-error {
  background-color: rgba(255, 0, 127, 0.25) !important;
  box-shadow: inset 0 0 0 2px var(--neon-rose);
  z-index: 2;
}

.sudoku-cell.is-error .cell-val {
  color: var(--neon-rose) !important;
}

/* Pencil Notes 3x3 Grid inside Cell */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  width: 100%;
  height: 100%;
  padding: 2px;
  pointer-events: none;
}

.note-digit {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(0.55rem, 1.8vw, 0.85rem);
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
}

.note-digit.note-highlight {
  color: var(--amber);
  font-weight: 900;
  transform: scale(1.15);
}

/* Shake Animation on Error */
.cell-shake {
  animation: cellShake 0.35s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes cellShake {
  10%, 90% { transform: translate3d(-2px, 0, 0); }
  20%, 80% { transform: translate3d(3px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* Win Wave Bounce */
.cell-win-bounce {
  animation: cellWin 0.45s ease;
}

@keyframes cellWin {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); background-color: var(--cerulean-glow); }
  100% { transform: scale(1); }
}

/* ==========================================================================
   Controls Panel (Tools & Numpad)
   ========================================================================== */

.controls-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Action Tools */
.action-tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.action-tool-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.75rem 0.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}

.action-tool-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  transition: stroke 0.15s ease;
}

.action-tool-btn span.label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.action-tool-btn:hover {
  background: var(--bg-hover);
  border-color: var(--cerulean);
}

.action-tool-btn:hover svg,
.action-tool-btn:hover span.label {
  stroke: var(--cerulean);
  color: var(--cerulean);
}

.action-tool-btn.active {
  background: rgba(14, 165, 233, 0.15);
  border-color: var(--cerulean);
  box-shadow: 0 0 10px var(--cerulean-glow);
}

.action-tool-btn.active svg {
  stroke: var(--cerulean);
}
.action-tool-btn.active span.label {
  color: var(--cerulean);
}

.action-tool-btn .badge-pill {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--cerulean);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
}

.action-tool-btn .badge-ad {
  background: linear-gradient(135deg, var(--neon-rose), var(--amber));
}

/* Numpad Keypad */
.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.numpad-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.8rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
}

.numpad-btn .num {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
}

.numpad-btn .count {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--cerulean);
}

.numpad-btn:hover {
  background: var(--bg-hover);
  border-color: var(--cerulean);
  transform: translateY(-1px);
}

.numpad-btn:active {
  transform: scale(0.96);
}

.numpad-btn.completed {
  opacity: 0.3;
  pointer-events: none;
}

/* ==========================================================================
   AdSense Banner Containers
   ========================================================================== */

.adsense-wrapper {
  margin: 1.5rem auto;
  max-width: 728px;
  width: 100%;
  min-height: 90px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.5rem;
}

.ad-disclaimer {
  font-size: 0.65rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   Rewarded Ad Modal
   ========================================================================== */

.ad-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.ad-modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  max-width: 440px;
  width: 100%;
  padding: 1.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.ad-modal-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--amber);
  letter-spacing: 0.08em;
}

.ad-preview-screen {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 1.75rem 1rem;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.ad-logo-brand {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text-primary);
}

.ad-logo-sub {
  font-size: 0.75rem;
  color: var(--cerulean);
}

.ad-reward-msg {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.ad-timer-pill {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
}

.ad-progress-bar-container {
  width: 100%;
  height: 6px;
  background: var(--border-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.ad-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--cerulean), var(--neon-rose));
  transition: width 0.1s linear;
}

.ad-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.ad-btn-secondary, .ad-btn-primary {
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.ad-btn-secondary {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

.ad-btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ad-btn-primary {
  background: linear-gradient(135deg, var(--cerulean), var(--neon-rose));
  color: #fff;
  box-shadow: 0 4px 15px var(--neon-rose-glow);
}

/* Modals */
.game-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  max-width: 420px;
  width: 100%;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-icon-header {
  font-size: 3.5rem;
  line-height: 1;
}

.win-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  background: var(--bg-surface);
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.stat-item-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-item-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--cerulean);
}

.btn-cta {
  background: var(--cerulean);
  color: #fff;
  border: none;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--cerulean-glow);
  transition: all 0.15s ease;
}

.btn-cta:hover {
  background: #0284c7;
  transform: translateY(-1px);
}

#confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1600;
}

/* ==========================================================================
   Content Pages (How to Play, About, Contact, Privacy, Terms)
   ========================================================================== */

.page-container {
  max-width: 860px;
  margin: 1.5rem auto;
  padding: 0 1.25rem;
  width: 100%;
}

.page-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.page-hero h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.page-hero h1 span {
  color: var(--cerulean);
}

.page-hero p {
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.content-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.content-section h2 {
  font-size: 1.35rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.content-section p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.content-section ul, .content-section ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

.content-section li {
  margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-input, .form-textarea {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--cerulean);
  box-shadow: 0 0 0 2px var(--cerulean-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 140px;
}

/* Site Footer */
.site-footer {
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  padding: 2.5rem 1.25rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-col h3 {
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
  font-weight: 700;
}

.footer-col p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--cerulean);
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Responsive Media Queries */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .main-content {
    padding: 0.5rem;
  }

  .controls-card {
    padding: 0.85rem;
  }

  .numpad-btn {
    padding: 0.65rem 0;
  }
}

@media (max-width: 420px) {
  .action-tools-grid {
    gap: 0.35rem;
  }

  .action-tool-btn {
    padding: 0.55rem 0.15rem;
  }

  .action-tool-btn svg {
    width: 18px;
    height: 18px;
  }

  .action-tool-btn span.label {
    font-size: 0.68rem;
  }

  .numpad-btn .num {
    font-size: 1.35rem;
  }
}
