:root {
  --page-bg: 231 227 218;
  --cork: 190 148 100;
  --cork-deep: 168 126 80;
  --cork-speck: 120 84 46;
  --panel: 255 255 255;
  --ink: 46 34 24;
  --muted: 110 94 76;

  --yellow: 253 240 158;
  --pink: 250 205 220;
  --blue: 191 219 254;
  --green: 187 247 208;

  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.25rem;
  background: rgb(var(--page-bg));
  color: rgb(var(--ink));
  font-family: 'Inter', system-ui, sans-serif;
}

.page {
  width: 100%;
  max-width: 780px;
  text-align: center;
}

.page-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgb(var(--cork-speck));
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.page-lede {
  font-size: 0.88rem;
  color: rgb(var(--muted));
  margin-bottom: 1.75rem;
}

/* ---------- Board ---------- */
.board {
  display: flex;
  gap: 1.1rem;
  padding: 1.25rem;
  border-radius: 16px;
  background-color: rgb(var(--cork));
  background-image:
    radial-gradient(circle, rgb(var(--cork-speck) / 0.35) 1px, transparent 1.2px),
    radial-gradient(circle, rgb(var(--cork-deep) / 0.5) 1.4px, transparent 1.6px),
    radial-gradient(circle, rgb(var(--cork-speck) / 0.25) 1px, transparent 1.2px);
  background-size:
    37px 41px,
    53px 47px,
    29px 31px;
  background-position:
    0 0,
    15px 20px,
    8px 35px;
  box-shadow:
    inset 0 0 0 10px rgb(120 84 46 / 0.35),
    0 30px 60px -30px rgb(40 26 12 / 0.5);
  text-align: left;
}

.column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.column-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 0.15rem;
}

.column-head h2 {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgb(255 250 240);
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.25);
}

.column-count {
  font-size: 0.7rem;
  font-weight: 600;
  color: rgb(255 250 240 / 0.75);
  background: rgb(0 0 0 / 0.15);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
}

.column-body {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-height: 90px;
  padding: 4px;
  border-radius: 10px;
  transition: background-color 150ms ease;
}

.column-body.is-drop-target {
  background: rgb(0 0 0 / 0.08);
  outline: 2px dashed rgb(255 250 240 / 0.5);
  outline-offset: -2px;
}

/* ---------- Note ---------- */
.note {
  position: relative;
  padding: 1.5rem 0.85rem 0.85rem;
  border-radius: 3px;
  font-family: 'Kalam', cursive;
  font-size: 0.9rem;
  line-height: 1.35;
  color: rgb(var(--ink));
  box-shadow: 0 8px 14px -8px rgb(0 0 0 / 0.4);
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.note::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, transparent 50%, rgb(0 0 0 / 0.12) 50%);
  border-radius: 0 0 3px 0;
}

.note.color-yellow {
  background: rgb(var(--yellow));
}
.note.color-pink {
  background: rgb(var(--pink));
}
.note.color-blue {
  background: rgb(var(--blue));
}
.note.color-green {
  background: rgb(var(--green));
}

.note-pin {
  position: absolute;
  top: -7px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgb(240 90 90), rgb(160 30 30));
  box-shadow: 0 2px 3px rgb(0 0 0 / 0.4);
}

.note-text {
  display: block;
  word-break: break-word;
  white-space: pre-wrap;
}

.note-delete {
  position: absolute;
  top: 0.3rem;
  right: 0.4rem;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: rgb(var(--ink) / 0.4);
  cursor: pointer;
  opacity: 0;
  transition: opacity 150ms ease;
}

.note:hover .note-delete,
.note-delete:focus-visible {
  opacity: 1;
}

.note.is-dragging {
  position: fixed;
  z-index: 50;
  cursor: grabbing;
  transform: scale(1.05) rotate(0deg) !important;
  box-shadow: 0 24px 40px -16px rgb(0 0 0 / 0.5);
  transition: none;
}

.note.is-settling {
  transition:
    transform 220ms var(--ease-out-quad),
    top 220ms var(--ease-out-quad),
    left 220ms var(--ease-out-quad);
}

@media (prefers-reduced-motion: reduce) {
  .note.is-settling {
    transition: none;
  }
}

.note-placeholder {
  border-radius: 3px;
  border: 2px dashed rgb(255 250 240 / 0.55);
  background: rgb(0 0 0 / 0.08);
}

/* ---------- Add note ---------- */
.add-note-btn {
  padding: 0.55rem 0.7rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  color: rgb(255 250 240 / 0.85);
  background: rgb(0 0 0 / 0.12);
  border: 1.5px dashed rgb(255 250 240 / 0.4);
  border-radius: 8px;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    transform 150ms var(--ease-out-quad);
}

.add-note-btn:hover {
  background: rgb(0 0 0 / 0.2);
}

.add-note-btn:active {
  transform: scale(0.98);
}

.add-note-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.6rem;
  background: rgb(var(--panel));
  border-radius: 8px;
  box-shadow: 0 8px 14px -8px rgb(0 0 0 / 0.4);
}

.add-note-form textarea {
  resize: none;
  min-height: 56px;
  font-family: 'Kalam', cursive;
  font-size: 0.88rem;
  color: rgb(var(--ink));
  border: 1px solid rgb(var(--muted) / 0.3);
  border-radius: 6px;
  padding: 0.5rem;
  outline: none;
}

.add-note-form textarea:focus {
  border-color: rgb(var(--cork-speck));
}

.add-note-form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.add-note-form-actions button {
  padding: 0.35rem 0.7rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
}

.form-cancel {
  background: rgb(var(--muted) / 0.12);
  color: rgb(var(--muted));
}

.form-submit {
  background: rgb(var(--cork-speck));
  color: white;
}

@media (max-width: 680px) {
  .board {
    flex-direction: column;
  }
}
