*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/*
  Palette:
    #2e1e1f  → background (very dark warm brown)
    #3E5F44  → forest green (accents, borders)
    #516171  → slate blue-gray (secondary text)
    #B3D1ED  → soft blue (info overlay, descriptions)
    #E5E6FA  → lavender (cell color 5)
    #f4f1de  → warm cream (keys text, cell color 6)
    #e07a5f  → terracotta (cell color 2)
    #F8395A  → coral/hot pink (cell color 1)
    #e30b5c  → deep pink (cell color 4)
  Derived:
    #090d1a  → cell inactive (dark blue)
    #121a2e  → cell hover
    #0f1525  → cell playhead column (empty)
*/

html {
  width: 100%;
  height: 100%;
  background: #2e1e1f;
  overflow: hidden;
}

body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

#grid {
  width: 100%;
  height: 100%;
  display: grid;
  gap: 2px;
  touch-action: none;
}

.cell {
  background: #090d1a;
  cursor: pointer;
  transition: background 0.07s, box-shadow 0.07s;
}

.cell:hover { background: #121a2e; }
.cell.head  { background: #0f1525; }

/* ── Cheatsheet overlay ── */
#cheatsheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(46, 30, 31, 0.93);
  animation: fadein 0.5s ease;
  transition: opacity 0.45s ease;
  cursor: pointer;
}

@keyframes fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.cs-card {
  border: 1px solid #3E5F44;
  padding: 30px 36px;
  font-family: 'Courier New', monospace;
  max-width: 500px;
  width: calc(100% - 40px);
}

.cs-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 7px;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.cs-key  { color: #f4f1de; letter-spacing: 0.18em; flex-shrink: 0; }
.cs-dot  { color: #3E5F44; }
.cs-desc { color: #B3D1ED; }
.cs-dim  { color: #516171; }

.cs-divider {
  border-top: 1px solid rgba(62, 95, 68, 0.35);
  margin: 13px 0;
}

.cs-drums, .cs-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 18px;
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  color: #516171;
}

.cs-hint {
  margin-top: 22px;
  text-align: center;
  font-size: 0.6rem;
  letter-spacing: 0.45em;
  padding-left: 0.45em;
  animation: pulse 2.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { color: #3E5F44; }
  50%       { color: #f4f1de; }
}

/* ── Floating info overlay ── */
#info {
  position: fixed;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: 1.3rem;
  letter-spacing: 0.3em;
  padding: 7px 22px 7px 28px;
  color: rgba(179, 209, 237, 0.95);
  background: rgba(13, 6, 7, 0.80);
  border: 1px solid rgba(62, 95, 68, 0.40);
  border-radius: 2px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
  white-space: nowrap;
}

#info-hint {
  position: fixed;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Courier New', monospace;
  font-size: 0.58rem;
  letter-spacing: 0.4em;
  padding: 4px 12px 4px 16px;
  color: rgba(244, 241, 222, 0.90);
  background: rgba(13, 6, 7, 0.82);
  border: 1px solid rgba(62, 95, 68, 0.55);
  border-radius: 2px;
  pointer-events: none;
  white-space: nowrap;
}
