:root {
  --bg: #0b0f14;
  --bg-alt: #121824;
  --panel: rgba(18, 24, 36, 0.86);
  --text: #f4f6f9;
  --muted: #b2bac4;
  --accent: #6fe8ff;
  --line: rgba(255, 255, 255, 0.08);
  --shadow: 0 24px 60px rgba(5, 8, 12, 0.45);
  --font-head: "Syne", sans-serif;
  --font-body: "Outfit", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at 10% 20%, rgba(79, 157, 255, 0.12), transparent 55%),
    radial-gradient(circle at 90% 10%, rgba(255, 131, 178, 0.1), transparent 50%),
    linear-gradient(180deg, #0b0f14 0%, #0c1017 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, rgba(111, 232, 255, 0.03) 0, rgba(111, 232, 255, 0.03) 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(90deg, rgba(111, 232, 255, 0.03) 0, rgba(111, 232, 255, 0.03) 1px, transparent 1px, transparent 24px);
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 5vw 1rem;
  backdrop-filter: blur(16px);
  background: rgba(8, 12, 18, 0.85);
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2vw, 1.8rem);
  letter-spacing: 0.04em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-pill {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(111, 232, 255, 0.3);
  background: linear-gradient(120deg, rgba(111, 232, 255, 0.2), rgba(255, 131, 178, 0.12));
}

.ghost {
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  padding: 0.45rem 0.9rem;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ghost:hover {
  border-color: rgba(111, 232, 255, 0.5);
  color: var(--accent);
}

.layout {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(200px, 260px);
  gap: 2rem;
  padding: 2rem 5vw 3rem;
}

.palette,
.side-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.palette h2,
.side-panel h2 {
  font-family: var(--font-head);
  margin-top: 0;
}

.palette p {
  color: var(--muted);
  font-size: 0.95rem;
}

.palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.note-swatch {
  border: none;
  padding: 0.9rem 0.7rem;
  border-radius: 14px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: grab;
  background: var(--swatch, #fff);
  color: #101417;
  box-shadow: 0 8px 20px rgba(15, 18, 25, 0.35);
  transition: transform 0.2s ease;
}

.note-swatch:active {
  cursor: grabbing;
  transform: scale(0.98);
}

.note-swatch[data-color="#FFE37A"] { --swatch: #ffe37a; }
.note-swatch[data-color="#FFB07C"] { --swatch: #ffb07c; }
.note-swatch[data-color="#FF8AAE"] { --swatch: #ff8aae; }
.note-swatch[data-color="#9DE5C1"] { --swatch: #9de5c1; }
.note-swatch[data-color="#A8C7FF"] { --swatch: #a8c7ff; }
.note-swatch[data-color="#D7B2FF"] { --swatch: #d7b2ff; }

.legend {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.board-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tab-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.tab {
  border: 1px solid var(--line);
  background: rgba(18, 24, 36, 0.75);
  color: var(--text);
  padding: 0.5rem 1.2rem;
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.tab.active {
  border-color: rgba(111, 232, 255, 0.7);
  background: rgba(111, 232, 255, 0.12);
}

.board {
  position: relative;
  min-height: 70vh;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(10, 14, 22, 0.9), rgba(14, 18, 28, 0.9)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 48px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.05) 0, rgba(255, 255, 255, 0.05) 1px, transparent 1px, transparent 48px);
  border: 1px solid rgba(111, 232, 255, 0.15);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.note {
  width: 180px;
  min-height: 160px;
  padding: 0.5rem;
  border-radius: 16px;
  box-shadow: 0 16px 30px rgba(8, 10, 18, 0.35);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transform: rotate(0deg);
  animation: popIn 0.3s ease;
  position: absolute;
}

.note-handle {
  height: 18px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.5);
  cursor: grab;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.6);
}

.note-delete {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: none;
  background: rgba(17, 20, 24, 0.2);
  color: rgba(0, 0, 0, 0.65);
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.note-delete-icon {
  position: relative;
  top: -2px;
  left: -1px;
  display: block;
}

.note-delete:hover {
  background: rgba(17, 20, 24, 0.3);
}

.note textarea {
  flex: 1;
  border: none;
  background: transparent;
  resize: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: #1f232a;
  outline: none;
}

.note textarea::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.side-panel ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.6;
}

.mini-card {
  margin-top: 2rem;
  background: rgba(111, 232, 255, 0.1);
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(111, 232, 255, 0.2);
}

.mini-card h3 {
  margin-top: 0;
  font-family: var(--font-head);
}

@keyframes popIn {
  from {
    transform: translateY(10px) scale(0.95) rotate(var(--tilt));
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1) rotate(var(--tilt));
    opacity: 1;
  }
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: minmax(200px, 1fr);
  }

  .board {
    min-height: 60vh;
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    gap: 0.6rem;
  }

  .layout {
    padding: 1.5rem 6vw 2rem;
  }
}
