/* ═══════════════════════════════════════════════════════════════
   AURASYNC  —  PREMIUM CINEMATIC MICRO-WORKSPACE
   Built by Araf Studio
   Design: iOS Liquid Glass · Dark Obsidian · Adaptive Chromatic
   ═══════════════════════════════════════════════════════════════ */

/* --- Design Tokens: Adaptive Root -------------------------------- */
:root {
  /* Time-morphable palette (controlled by JS) */
  --bg-from:    #060608;
  --bg-mid:     #09090f;
  --bg-to:      #0b0c14;
  --accent-h:   195;
  --accent-s:   80%;
  --accent-l:   62%;

  /* Derived accent values */
  --accent:          hsl(var(--accent-h), var(--accent-s), var(--accent-l));
  --accent-dim:      hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.50);
  --accent-glow:     hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.14);
  --accent-ring:     hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.32);
  --accent-subtle:   hsla(var(--accent-h), var(--accent-s), var(--accent-l), 0.06);

  /* Text hierarchy */
  --text-primary:   rgba(255, 255, 255, 0.93);
  --text-secondary: rgba(255, 255, 255, 0.54);
  --text-muted:     rgba(255, 255, 255, 0.26);
  --text-ghost:     rgba(255, 255, 255, 0.12);

  /* iOS Liquid Glass surface system */
  --glass-fill:     rgba(255, 255, 255, 0.034);
  --glass-fill-hover: rgba(255, 255, 255, 0.055);
  --glass-border:   rgba(255, 255, 255, 0.085);
  --glass-border-hi: rgba(255, 255, 255, 0.16);
  --glass-inset-top: rgba(255, 255, 255, 0.10);
  --glass-inset-bot: rgba(0, 0, 0, 0.18);
  --glass-blur:     blur(28px) saturate(180%);
  --glass-blur-xl:  blur(52px) saturate(200%);
  --glass-shadow:   0 8px 32px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.25);
  --glass-shadow-lg: 0 24px 64px rgba(0,0,0,0.55), 0 4px 16px rgba(0,0,0,0.3);

  /* Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-ui:      'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --header-h: 58px;
  --gap:      18px;
  --pad:      22px;

  /* Radius */
  --r-sm:  8px;
  --r-md:  14px;
  --r-lg:  20px;
  --r-xl:  26px;

  /* Easing */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Keyframe Animations ----------------------------------------- */
@keyframes bgDrift {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 80% 60%; }
  100% { background-position: 20% 100%; }
}

@keyframes glowOrbit {
  0%   { transform: translate(-5%, -10%) scale(1); }
  30%  { transform: translate(55%, 15%) scale(1.15); }
  65%  { transform: translate(30%, 65%) scale(0.9); }
  100% { transform: translate(-5%, -10%) scale(1); }
}

@keyframes glowOrbit2 {
  0%   { transform: translate(70%, 60%) scale(1); }
  40%  { transform: translate(10%, 30%) scale(1.2); }
  75%  { transform: translate(80%, 10%) scale(0.85); }
  100% { transform: translate(70%, 60%) scale(1); }
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.7); opacity: 0.5; }
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.25; }
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cmdIn {
  from { opacity: 0; transform: scale(0.94) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes overlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes waveBar {
  0%, 100% { height: 3px; }
  50%       { height: 14px; }
}

@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

/* --- Reset ------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  height: 100vh;
  overflow: hidden;
  background: var(--bg-from);
  color: var(--text-primary);
  font-family: var(--font-ui);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

input[type="range"] {
  cursor: pointer;
}

/* --- Background Canvas ------------------------------------------- */
.bg-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bg-base {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    155deg,
    var(--bg-from) 0%,
    var(--bg-mid)  52%,
    var(--bg-to)   100%
  );
  background-size: 200% 200%;
  transition: background 5s linear;
  animation: bgDrift 28s ease-in-out infinite alternate;
}

.bg-glow-1,
.bg-glow-2 {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.bg-glow-1 {
  width: 65vmax;
  height: 65vmax;
  left: -15%;
  top: -20%;
  background: radial-gradient(
    circle,
    var(--accent-glow) 0%,
    transparent 68%
  );
  filter: blur(50px);
  animation: glowOrbit 32s ease-in-out infinite;
  transition: background 5s linear;
}

.bg-glow-2 {
  width: 50vmax;
  height: 50vmax;
  right: -10%;
  bottom: -10%;
  background: radial-gradient(
    circle,
    hsla(var(--accent-h), var(--accent-s), calc(var(--accent-l) - 10%), 0.08) 0%,
    transparent 68%
  );
  filter: blur(60px);
  animation: glowOrbit2 40s ease-in-out infinite;
  transition: background 5s linear;
}

/* Subtle noise texture */
.bg-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.028;
}

/* --- App Shell --------------------------------------------------- */
#root {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* --- Header ------------------------------------------------------ */
.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--pad);
  flex-shrink: 0;
  position: relative;
  z-index: 20;
}

.app-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--pad);
  right: var(--pad);
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--glass-border) 20%,
    var(--glass-border) 80%,
    transparent
  );
}

.app-logo {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-primary);
  user-select: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

.app-logo .logo-accent {
  color: var(--accent);
  transition: color 5s linear;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-clock {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  min-width: 64px;
  text-align: right;
}

.theme-chip {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 3px 10px 3px 8px;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-ring);
  border-radius: 100px;
  transition: color 5s linear, background 5s linear, border-color 5s linear;
  display: flex;
  align-items: center;
  gap: 6px;
}

.theme-chip-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  transition: background 5s linear;
}

.kbd-trigger {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  padding: 5px 11px;
  background: var(--glass-fill);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: all 0.22s var(--ease-smooth);
  letter-spacing: 0.04em;
}

.kbd-trigger:hover {
  color: var(--text-secondary);
  background: var(--glass-fill-hover);
  border-color: var(--glass-border-hi);
}

.kbd-trigger .k-badge {
  font-size: 10px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px;
  padding: 1px 5px;
  font-variant-numeric: tabular-nums;
}

/* --- Main Layout ------------------------------------------------- */
.app-main {
  display: grid;
  grid-template-columns: 55fr 45fr;
  gap: var(--gap);
  flex: 1;
  padding: var(--gap) var(--pad) var(--pad);
  overflow: hidden;
  min-height: 0;
}

/* --- Glass Panel Base (iOS Liquid Glass) ------------------------- */
.glass {
  background: var(--glass-fill);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  box-shadow:
    inset 0 1px 0 var(--glass-inset-top),
    inset 0 -1px 0 var(--glass-inset-bot),
    var(--glass-shadow);
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s var(--ease-smooth),
              box-shadow  0.3s var(--ease-smooth);
}

/* iOS liquid glass — top edge refraction line */
.glass::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.14) 30%,
    rgba(255,255,255,0.14) 70%,
    transparent
  );
  pointer-events: none;
  z-index: 1;
}

/* iOS liquid glass — inner glow rim */
.glass::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.045);
  pointer-events: none;
  z-index: 1;
}

/* --- Left: Notepad ----------------------------------------------- */
.notepad-section {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.notepad-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px var(--pad) 13px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255,255,255,0.042);
}

.section-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-style: italic;
}

.save-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  user-select: none;
}

.save-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background 0.4s ease;
}

.save-dot.unsaved {
  background: #f59e0b;
  animation: dotBlink 1.4s ease-in-out infinite;
}

.save-dot.saved {
  background: #10b981;
  animation: dotPulse 1.6s ease-out 1;
}

.notepad-textarea {
  flex: 1;
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  padding: 22px var(--pad) 16px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.72;
  color: var(--text-primary);
  caret-color: var(--accent);
  min-height: 0;
  overflow-y: auto;
}

.notepad-textarea::placeholder {
  color: var(--text-ghost);
  font-style: italic;
}

.notepad-textarea::-webkit-scrollbar { width: 3px; }
.notepad-textarea::-webkit-scrollbar-track { background: transparent; }
.notepad-textarea::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
}

.notepad-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px var(--pad);
  flex-shrink: 0;
  border-top: 1px solid rgba(255,255,255,0.042);
}

.word-stats {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-val {
  color: var(--text-secondary);
  font-weight: 500;
}

.clear-note-btn {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-ghost);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.22s var(--ease-smooth);
}

.clear-note-btn:hover {
  color: #ef4444;
  background: rgba(239,68,68,0.07);
  border-color: rgba(239,68,68,0.2);
}

/* --- Right Column ------------------------------------------------ */
.right-col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  overflow: hidden;
  min-height: 0;
}

/* --- Pomodoro ---------------------------------------------------- */
.pomodoro-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.pomo-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px var(--pad) 12px;
  border-bottom: 1px solid rgba(255,255,255,0.042);
  flex-shrink: 0;
}

.mode-pills {
  display: flex;
  gap: 5px;
}

.mode-pill {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 100px;
  border: 1px solid transparent;
  background: transparent;
  transition: all 0.2s var(--ease-smooth);
}

.mode-pill:hover:not(.active) {
  color: var(--text-secondary);
  background: rgba(255,255,255,0.04);
}

.mode-pill.active {
  color: var(--accent);
  background: var(--accent-subtle);
  border-color: var(--accent-ring);
}

.canvas-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 0;
  padding: 14px;
}

.pomo-canvas {
  display: block;
}

.timer-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}

.timer-digits {
  font-family: var(--font-ui);
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.timer-label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}

.pomo-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px var(--pad) 18px;
  flex-shrink: 0;
}

.ctrl {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 20px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  transition: all 0.22s var(--ease-smooth);
}

.ctrl:hover {
  color: var(--text-secondary);
  background: var(--glass-fill);
  border-color: var(--glass-border);
}

.ctrl.primary {
  color: var(--accent);
  background: var(--accent-subtle);
  border-color: var(--accent-ring);
  min-width: 100px;
}

.ctrl.primary:hover {
  background: var(--accent-glow);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* --- Sound Dock -------------------------------------------------- */
.sound-section {
  flex-shrink: 0;
}

.sound-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--pad);
  cursor: pointer;
  border-radius: var(--r-lg);
  transition: background 0.18s var(--ease-smooth);
  user-select: none;
}

.sound-header:hover {
  background: var(--glass-fill-hover);
}

.sound-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wave-bars {
  display: flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
}

.wave-bar {
  width: 2px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  transition: background 5s linear;
}

.wave-bars.playing .wave-bar:nth-child(1) { animation: waveBar 0.75s ease-in-out infinite 0.00s; }
.wave-bars.playing .wave-bar:nth-child(2) { animation: waveBar 0.75s ease-in-out infinite 0.12s; }
.wave-bars.playing .wave-bar:nth-child(3) { animation: waveBar 0.75s ease-in-out infinite 0.24s; }
.wave-bars.playing .wave-bar:nth-child(4) { animation: waveBar 0.75s ease-in-out infinite 0.36s; }

.sound-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.chevron {
  color: var(--text-muted);
  transition: transform 0.35s var(--ease-out-expo);
  flex-shrink: 0;
}

.chevron.open {
  transform: rotate(180deg);
}

.sound-body {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.5s var(--ease-out-expo),
    opacity    0.3s var(--ease-smooth);
}

.sound-body.open {
  max-height: 280px;
  opacity: 1;
}

.sound-channels {
  padding: 4px var(--pad) 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-top: 1px solid rgba(255,255,255,0.042);
}

.sound-channel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.channel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ch-name {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

/* iOS-style toggle */
.ios-toggle {
  width: 30px;
  height: 18px;
  border-radius: 9px;
  background: rgba(255,255,255,0.10);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.3s var(--ease-smooth);
  border: 1px solid rgba(255,255,255,0.08);
}

.ios-toggle.on {
  background: var(--accent-dim);
  border-color: var(--accent-ring);
}

.ios-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  transition:
    transform 0.28s var(--ease-spring),
    background 0.28s var(--ease-smooth);
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.ios-toggle.on .ios-thumb {
  transform: translateX(12px);
  background: #fff;
}

/* Premium slider */
.ch-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  outline: none;
  border: none;
}

.ch-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow), 0 0 0 2px rgba(255,255,255,0.08);
  cursor: pointer;
  transition: transform 0.15s var(--ease-spring),
              box-shadow 0.15s var(--ease-smooth);
}

.ch-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
  box-shadow: 0 0 16px var(--accent-dim), 0 0 0 2px rgba(255,255,255,0.12);
}

.ch-slider::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  border: none;
  cursor: pointer;
}

.mute-all {
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-sm);
  transition: all 0.22s var(--ease-smooth);
}

.mute-all:hover {
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border-color: var(--glass-border-hi);
}

.mute-all.muted {
  color: #ef4444;
  border-color: rgba(239,68,68,0.28);
  background: rgba(239,68,68,0.05);
}

/* --- Command Palette -------------------------------------------- */
.cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(2, 2, 6, 0.72);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayIn 0.22s var(--ease-smooth);
}

.cmd-card {
  width: 530px;
  max-width: calc(100vw - 32px);
  background: rgba(10, 10, 16, 0.96);
  backdrop-filter: var(--glass-blur-xl);
  -webkit-backdrop-filter: var(--glass-blur-xl);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-xl);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    var(--glass-shadow-lg),
    0 0 80px var(--accent-glow);
  overflow: hidden;
  animation: cmdIn 0.28s var(--ease-out-expo);
}

.cmd-head {
  padding: 24px 26px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.cmd-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.01em;
  margin-bottom: 3px;
}

.cmd-sub {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.cmd-list {
  padding: 10px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cmd-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 8px;
  border-radius: var(--r-sm);
  transition: background 0.15s var(--ease-smooth);
}

.cmd-row:hover {
  background: rgba(255,255,255,0.04);
}

.cmd-desc {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

.cmd-keys {
  display: flex;
  align-items: center;
  gap: 5px;
}

.kbd {
  font-family: var(--font-ui);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 5px;
  padding: 3px 8px;
  letter-spacing: 0.04em;
  user-select: none;
}

.cmd-sep {
  font-size: 10px;
  color: var(--text-ghost);
}

.cmd-foot {
  padding: 12px 26px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cmd-foot-hint {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
}

.cmd-brand {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 11px;
  color: var(--text-ghost);
  letter-spacing: 0.04em;
}

/* --- Branding Watermark ------------------------------------------ */
.brand-watermark {
  position: fixed;
  bottom: 18px;
  right: 22px;
  z-index: 500;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 4px 10px;
  border-radius: 4px;
  opacity: 0.45;
  cursor: default;
  user-select: none;
  display: block;
  text-decoration: none;
  transition:
    opacity   0.6s ease,
    color     0.6s ease;
  position: relative;
}

.brand-watermark::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 10px;
  right: 10px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent),
    transparent
  );
  opacity: 0;
  transform: scaleX(0.3);
  transition:
    opacity   0.6s ease,
    transform 0.6s ease;
}

.brand-watermark:hover {
  opacity: 1;
  color: var(--text-secondary);
}

.brand-watermark:hover::after {
  opacity: 0.55;
  transform: scaleX(1);
}

/* --- Scrollbar global ------------------------------------------- */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.07);
  border-radius: 10px;
}

/* --- Responsive ------------------------------------------------- */
@media (max-width: 860px) {
  body { overflow: auto; }

  #root { height: auto; overflow: auto; }

  .app-shell { height: auto; }

  .app-main {
    grid-template-columns: 1fr;
    overflow: visible;
    height: auto;
  }

  .right-col {
    overflow: visible;
    min-height: auto;
  }

  .notepad-section {
    min-height: 50vh;
  }

  .pomodoro-section {
    min-height: 400px;
  }
}

@media (max-width: 520px) {
  :root {
    --pad: 16px;
    --gap: 14px;
  }

  .app-logo { font-size: 14px; }
  .theme-chip { display: none; }
  .live-clock { font-size: 11px; }
  .timer-digits { font-size: 30px; }
}
