@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=Syne+Mono&display=swap');

/* ───────────── DESIGN TOKENS ───────────── */
:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --surface-2: #1c1c2a;
  --border: rgba(255,255,255,0.07);
  --text: #f0f0f8;
  --text-muted: #6b6b88;
  --accent: #7c6fff;
  --radius: 16px;
  --cell-gap: 8px;
  --transition-speed: 160ms;

  /* Color palette per n */
  --c0: #ff4d6d;
  --c1: #ffd166;
  --c2: #06d6a0;
  --c3: #4cc9f0;
  --c4: #f77f00;
  --c5: #b5179e;
  --c6: #a8ff78;
  --c7: #ff9a3c;
}

/* ───────────── RESET ───────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  overflow: hidden;
  overscroll-behavior: none;
}

/* ───────────── BACKGROUND GRID ───────────── */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,111,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,111,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ───────────── APP SHELL ───────────── */
#app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 500px;
  margin: auto;
}

/* ───────────── HEADER ───────────── */
.header { text-align: center; margin-bottom: 0; }
.logo { font-size: 2.2rem; font-weight: 800; letter-spacing: -1px; line-height: 1; transition: transform 0.2s; }
.logo:hover { transform: scale(1.02); }
.logo-chroma { color: var(--text); }
.logo-slide {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  margin-left: 2px;
}
.tagline {
  font-family: 'Syne Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-top: 4px;
  text-transform: uppercase;
}
.tagline-goal {
  display: inline-block;
  transition: color 0.3s ease;
}
.tagline-goal.warn {
  color: #ffd166;
  animation: taglineBeat 0.6s ease infinite;
}
@keyframes taglineBeat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ───────────── CONTROLS BAR ───────────── */
.controls-bar {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  gap: 10px;
}

.controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.size-selector { display: flex; align-items: center; gap: 8px; }
.label {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.size-btns { display: flex; gap: 4px; }
.size-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 8px;
  padding: 4px 8px;
  font-family: 'Syne Mono', monospace;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.2s;
}
.size-btn:hover { border-color: var(--accent); color: var(--accent); }
.size-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
}
.size-btn.disabled {
  text-decoration: line-through;
  opacity: 0.4;
  pointer-events: none;
}
.size-btn.active.disabled {
  text-decoration: none;
  opacity: 1;
}

.stats { display: flex; gap: 16px; }
.stat { display: flex; flex-direction: column; align-items: flex-end; min-width: 40px; }
.stat-value {
  font-family: 'Syne Mono', monospace;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1px;
}

.main-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--accent);
  border-radius: 8px;
  padding: 6px 12px;
  min-width: 105px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  white-space: nowrap;
  position: relative;
}
.btn-new:hover:not(.active) {
  background: rgba(124, 111, 255, 0.08);
}
.btn-new.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(124,111,255,0.25);
}
.btn-new.active:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124,111,255,0.35);
}
.btn-new.active:active { transform: translateY(0); }

.btn-share-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 4px 16px rgba(124,111,255,0.25);
  width: 100%;
  max-width: 200px;
  padding: 12px 24px;
  font-size: 0.9rem;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.btn-share-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(124,111,255,0.35);
}
.btn-share-primary:active { transform: translateY(0); }

/* ── Daily button ── */
.btn-daily {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  min-width: 120px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
  white-space: nowrap;
}
.btn-daily:hover:not(.active) {
  border-color: #ffd166;
  color: #ffd166;
}
.btn-daily.daily-done:hover:not(.active) {
  border-color: var(--c2);
  color: var(--c2);
}
.btn-daily.active {
  background: rgba(255,209,102,0.12);
  border-color: #ffd166;
  color: #ffd166;
  cursor: default;
}
.btn-daily::after {
  font-size: 0.65rem;
  font-weight: 800;
  opacity: 0;
  transition: opacity 0.2s, color 0.2s;
  pointer-events: none;
}
.btn-daily.daily-done::after {
  content: '✓';
  margin-left: 5px;
  opacity: 1;
  color: var(--c2);
}
.btn-daily.active.daily-done {
  background: rgba(6, 214, 160, 0.12);
  border-color: var(--c2);
  color: var(--c2);
}

.right-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.btn-refresh, .btn-volume, .btn-settings {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.2s;
  touch-action: manipulation;
}

.btn-refresh:hover:not(.disabled), .btn-volume:hover, .btn-settings:hover { 
  border-color: var(--accent);
  color: var(--accent);
}


.btn-refresh.disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}

.btn-volume.active {
  color: var(--accent);
  border-color: var(--accent);
}

/* ── Daily active board ring ── */
.board-wrapper.daily-active .board {
  box-shadow: 0 0 0 2px rgba(255,209,102,0.4), 0 0 32px rgba(255,209,102,0.08);
}
.board-wrapper.daily-active.daily-done .board {
  box-shadow: 0 0 0 2px rgba(6, 214, 160, 0.4), 0 0 32px rgba(6, 214, 160, 0.08);
}

/* ── Daily banner ── */
.daily-banner {
  width: 100%;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.3s ease;
  opacity: 0;
}
.daily-banner.visible {
  max-height: 100px;
  opacity: 1;
}
.banner-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(6, 214, 160, 0.08);
  border: 1px solid rgba(6, 214, 160, 0.2);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 2px;
}
.banner-icon {
  font-size: 1.3rem;
  color: var(--c2);
  animation: spin 4s linear infinite;
  flex-shrink: 0;
}
.banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.banner-text strong {
  font-size: 0.85rem;
  color: var(--text);
}
.banner-text span {
  font-family: 'Syne Mono', monospace;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.banner-share {
  flex-shrink: 0;
}
.banner-sub {
  font-family: 'Syne Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  letter-spacing: 0.05em;
  padding: 0 4px 4px;
}

/* ───────────── BOARD WRAPPER ───────────── */
.board-wrapper {
  position: relative;
  width: 100%;
  max-width: 420px;
}

/* ───────────── BOARD ───────────── */
.board {
  display: grid;
  gap: var(--cell-gap);
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  width: 100%;
  aspect-ratio: 1;
  transition: filter 0.4s ease;
  touch-action: none;
}

.board.blurred {
  filter: blur(12px);
  pointer-events: none;
}

/* ───────────── CELL ───────────── */
.cell {
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition:
    transform var(--transition-speed) cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow var(--transition-speed) ease;
  will-change: transform;
}

.cell:not(.empty) {
  cursor: pointer;
}

.cell:not(.empty):hover {
  transform: scale(1.06);
  filter: brightness(1.12);
}

.cell::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
  border-radius: inherit;
  pointer-events: none;
}

.cell.empty {
  background: var(--surface-2);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.4);
}
.cell.empty::after { display: none; }

/* color classes */
.cell.color-0 { background: var(--c0); box-shadow: 0 4px 16px rgba(255,77,109,0.35); }
.cell.color-1 { background: var(--c1); box-shadow: 0 4px 16px rgba(255,209,102,0.35); }
.cell.color-2 { background: var(--c2); box-shadow: 0 4px 16px rgba(6,214,160,0.35); }
.cell.color-3 { background: var(--c3); box-shadow: 0 4px 16px rgba(76,201,240,0.35); }
.cell.color-4 { background: var(--c4); box-shadow: 0 4px 16px rgba(247,127,0,0.35); }
.cell.color-5 { background: var(--c5); box-shadow: 0 4px 16px rgba(181,23,158,0.35); }
.cell.color-6 { background: var(--c6); box-shadow: 0 4px 16px rgba(168,255,120,0.35); }
.cell.color-7 { background: var(--c7); box-shadow: 0 4px 16px rgba(255,154,60,0.35); }

/* Row completion glow */
.cell.row-complete {
  box-shadow: 0 0 0 2px rgba(255,255,255,0.6), 0 4px 20px rgba(255,255,255,0.3);
  animation: completePulse 0.5s ease forwards;
}
.show-shapes .cell.row-complete {
  box-shadow: none !important;
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.8)) drop-shadow(0 4px 12px rgba(0,0,0,0.3));
}

@keyframes completePulse {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.06); }
  70%  { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* Slide animation classes */
.cell.slide-right  { animation: slideRight var(--transition-speed) cubic-bezier(0.34,1.56,0.64,1); }
.cell.slide-left   { animation: slideLeft  var(--transition-speed) cubic-bezier(0.34,1.56,0.64,1); }
.cell.slide-down   { animation: slideDown  var(--transition-speed) cubic-bezier(0.34,1.56,0.64,1); }
.cell.slide-up     { animation: slideUp    var(--transition-speed) cubic-bezier(0.34,1.56,0.64,1); }

@keyframes slideRight {
  from { transform: translateX(-110%); }
  to   { transform: translateX(0); }
}
@keyframes slideLeft {
  from { transform: translateX(110%); }
  to   { transform: translateX(0); }
}
@keyframes slideDown {
  from { transform: translateY(-110%); }
  to   { transform: translateY(0); }
}
@keyframes slideUp {
  from { transform: translateY(110%); }
  to   { transform: translateY(0); }
}

/* Ripple on tap */
.cell.ripple::before {
...
}
@keyframes rippleAnim {
  to { transform: translate(-50%,-50%) scale(1); opacity: 0; }
}

/* Shake animation for invalid moves */
.shake-x {
  animation: shakeX 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
.shake-y {
  animation: shakeY 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

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

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

/* ───────────── SETTINGS OVERLAY ───────────── */
.settings-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10,10,15,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}
.settings-overlay.visible {
  opacity: 1;
  pointer-events: all;
}
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 90%;
  max-width: 360px;
  padding: 24px;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}
.settings-overlay.visible .settings-card { transform: translateY(0); }

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.settings-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.btn-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.settings-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.setting-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.setting-label {
  font-size: 0.9rem;
  font-weight: 700;
}
.setting-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  transition: .3s;
  border-radius: 24px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .3s;
  border-radius: 50%;
}
input:checked + .slider { background-color: rgba(124,111,255,0.2); border-color: var(--accent); }
input:checked + .slider:before { transform: translateX(20px); background-color: var(--accent); }

/* ───────────── ACCESSIBILITY SHAPES ───────────── */
.show-shapes .cell:not(.empty) {
  background: transparent !important;
  border-radius: 0;
  box-shadow: none !important;
  overflow: visible;
  filter: drop-shadow(0 4px 5px rgba(0,0,0,0.4));
}
.show-shapes .cell:not(.empty)::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  transition: clip-path 0.3s ease, background-color 0.3s ease;
}

/* 
   Shape mappings:
   0: Square with rounded corners
   1: Circle
   2: Regular Hexagon
   3: Equilateral Triangle (centered)
   4: Diamond (45deg square) with rounded corners
   5: Regular Pentagon
   6: Regular Octagon
   7: Star / Heptagon
*/

/* 0: Square (rounded via inset with radius) */
.show-shapes .cell.color-0::before { background-color: var(--c0); clip-path: inset(4% round 12%); }
.show-shapes .cell.color-0::after  { clip-path: inset(4% round 12%); }

/* 1: Circle */
.show-shapes .cell.color-1::before { background-color: var(--c1); clip-path: circle(46%); }
.show-shapes .cell.color-1::after  { clip-path: circle(46%); }

/* 2: Hexagon with smoothly rounded corners (24-point polygon) */
.show-shapes .cell.color-2::before { 
  background-color: var(--c2); 
  clip-path: polygon(
    40% 7%, 45% 5%, 55% 5%, 60% 7%, 
    86% 22%, 91% 26%, 95% 32%, 95% 38%, 
    95% 62%, 95% 68%, 91% 74%, 86% 78%, 
    60% 93%, 55% 95%, 45% 95%, 40% 93%, 
    14% 78%, 9% 74%, 5% 68%, 5% 62%, 
    5% 38%, 5% 32%, 9% 26%, 14% 22%
  ); 
}
.show-shapes .cell.color-2::after { 
  clip-path: polygon(
    40% 7%, 45% 5%, 55% 5%, 60% 7%, 
    86% 22%, 91% 26%, 95% 32%, 95% 38%, 
    95% 62%, 95% 68%, 91% 74%, 86% 78%, 
    60% 93%, 55% 95%, 45% 95%, 40% 93%, 
    14% 78%, 9% 74%, 5% 68%, 5% 62%, 
    5% 38%, 5% 32%, 9% 26%, 14% 22%
  ); 
}

/* 3: Triangle (Larger and "rounded" via polygon) */
.show-shapes .cell.color-3::before { 
  background-color: var(--c3); 
  clip-path: polygon(50% 2%, 55% 5%, 94% 84%, 94% 90%, 90% 94%, 10% 94%, 6% 90%, 6% 84%, 45% 5%); 
}
.show-shapes .cell.color-3::after { 
  clip-path: polygon(50% 2%, 55% 5%, 94% 84%, 94% 90%, 90% 94%, 10% 94%, 6% 90%, 6% 84%, 45% 5%); 
}

/* 4: Regular Pentagon with rounded corners */
.show-shapes .cell.color-4::before { 
  background-color: var(--c4); 
  clip-path: polygon(42% 5%, 50% 2%, 58% 5%, 95% 36%, 97% 43%, 82% 90%, 77% 96%, 23% 96%, 18% 90%, 3% 43%, 5% 36%); 
}
.show-shapes .cell.color-4::after { 
  clip-path: polygon(42% 5%, 50% 2%, 58% 5%, 95% 36%, 97% 43%, 82% 90%, 77% 96%, 23% 96%, 18% 90%, 3% 43%, 5% 36%); 
}

/* 5: Regular Octagon with rounded corners */
.show-shapes .cell.color-5::before { 
  background-color: var(--c5); 
  clip-path: polygon(32% 5%, 68% 5%, 95% 32%, 95% 68%, 68% 95%, 32% 95%, 5% 68%, 5% 32%); 
}
.show-shapes .cell.color-5::after { 
  clip-path: polygon(32% 5%, 68% 5%, 95% 32%, 95% 68%, 68% 95%, 32% 95%, 5% 68%, 5% 32%); 
}

/* 6: Star / Heptagon */
.show-shapes .cell.color-6::before { 
  background-color: var(--c6); 
  clip-path: polygon(50% 5%, 80% 15%, 95% 45%, 85% 85%, 50% 95%, 15% 85%, 5% 45%, 20% 15%); 
}
.show-shapes .cell.color-6::after { 
  clip-path: polygon(50% 5%, 80% 15%, 95% 45%, 85% 85%, 50% 95%, 15% 85%, 5% 45%, 20% 15%); 
}

/* 7: Squircle / Pillow shape */
.show-shapes .cell.color-7::before { 
  background-color: var(--c7); 
  clip-path: polygon(50% 0%, 90% 10%, 100% 50%, 90% 90%, 50% 100%, 10% 90%, 0% 50%, 10% 10%); 
}
.show-shapes .cell.color-7::after { 
  clip-path: polygon(50% 0%, 90% 10%, 100% 50%, 90% 90%, 50% 100%, 10% 90%, 0% 50%, 10% 10%); 
}

/* ───────────── WIN OVERLAY ───────────── */
.win-overlay {
  position: absolute;
  inset: 0;
  border-radius: calc(var(--radius) + 6px);
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  z-index: 10;
}
.win-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.win-card {
  text-align: center;
  transform: scale(0.8);
  transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1);
  padding: 20px;
}
.win-overlay.visible .win-card { transform: scale(1); }

.win-icon {
  font-size: 3rem;
  color: var(--accent);
  animation: spin 4s linear infinite;
  display: block;
  margin-bottom: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.win-card h2 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -1px;
}
.win-overlay.warning .win-icon {
  color: #ffd166;
  animation: pulse 2s infinite;
}
.win-overlay.warning h2 {
  color: #ffd166;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}

.btn-proceed {
  background: var(--surface-2) !important;
  border-color: #ffd166 !important;
  color: #ffd166 !important;
}
.btn-proceed:hover {
  background: rgba(255,209,102,0.1) !important;
  transform: translateY(-2px);
}
.next-daily-info {
  font-family: 'Syne Mono', monospace !important;
  font-size: 0.72rem !important;
  color: var(--text-muted) !important;
  margin-top: 4px !important;
  margin-bottom: 24px !important;
}

.win-card #win-stats {
  font-family: 'Syne', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 8px 0 4px;
}

.win-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-direction: column;
  align-items: center;
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-2);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 20px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-secondary:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(124,111,255,0.2);
}
.btn-secondary:active { transform: translateY(0); }

.btn-share {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  padding: 9px 18px;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, color 0.15s;
}
.btn-share:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.btn-share:active { transform: translateY(0); }
.btn-share.copied {
  border-color: #06d6a0;
  color: #06d6a0;
}

/* ───────────── HINT BAR ───────────── */
.hint-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
  font-family: 'Syne Mono', monospace;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-align: center;
  margin-top: 4px;
}
.hint-row { 
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0.75;
  flex-wrap: wrap;
  justify-content: center;
}
.hint-sep { color: rgba(255,255,255,0.2); margin: 0 2px; }

/* ───────────── RESPONSIVE ───────────── */
@media (max-width: 600px) {
  body { padding: 8px; align-items: center; }
  #app { gap: 16px; }
  .logo { font-size: 1.8rem; }

  .controls-bar {
    padding: 8px 10px;
    gap: 8px;
  }
  .controls-row {
    flex-direction: row;
    justify-content: space-between;
  }
  .main-actions {
    gap: 4px;
  }
  .btn-daily, .btn-new {
    padding: 6px 8px;
    font-size: 0.65rem;
  }
  .hint-bar { margin-top: 2px; }
}

@media (min-width: 601px) {
  .controls-bar {
    flex-wrap: nowrap;
  }
}
