:root {
  --paper: #faf5ec;
  --paper-warm: #f5ecdb;
  --paper-deep: #efe4ce;
  --ink: #1f1d1a;
  --ink-soft: #5b5247;
  --ink-subtle: #8d8270;
  --accent: #a4341c;
  --accent-soft: #c9694e;
  --sage: #6f7d63;
  --plum: #6b3e54;
  --border: #e8dfcf;
  --border-strong: #d4c8b3;
  --shadow-sm: 0 1px 2px rgba(31, 29, 26, 0.04), 0 2px 4px rgba(31, 29, 26, 0.04);
  --shadow-md: 0 4px 12px rgba(31, 29, 26, 0.06), 0 2px 4px rgba(31, 29, 26, 0.04);
  --shadow-lg: 0 12px 32px rgba(31, 29, 26, 0.10), 0 4px 8px rgba(31, 29, 26, 0.04);
  --display: 'Fraunces', Georgia, serif;
  --body: 'Newsreader', Georgia, serif;
}

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

html, body {
  font-family: var(--body);
  background-color: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(196, 168, 130, 0.10), transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(111, 125, 99, 0.06), transparent 55%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.12 0 0 0 0 0.10 0 0 0 0 0.08 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
input, textarea { outline: none; border: none; background: none; }
::selection { background: var(--accent); color: var(--paper); }

.app { max-width: 1100px; margin: 0 auto; padding: 48px 32px 80px; }
@media (max-width: 640px) { .app { padding: 24px 20px 60px; } }

/* ----- HEADER ----- */

.masthead {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  gap: 24px;
  flex-wrap: wrap;
}

.brand { display: flex; flex-direction: column; gap: 4px; }

.brand h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(36px, 6vw, 56px);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}

.brand h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}

.brand .tagline {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 15px;
  letter-spacing: 0.01em;
  margin-top: 2px;
}

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

/* ----- SYNC INDICATOR ----- */

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-subtle);
  font-style: italic;
  letter-spacing: 0.02em;
  background: transparent;
  border: 1px solid transparent;
  transition: all 200ms ease;
}

.sync-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-subtle);
  transition: background 200ms ease;
}

.sync-status.synced::before { background: var(--sage); }
.sync-status.syncing::before { background: var(--accent-soft); animation: pulse 1.2s ease-in-out infinite; }
.sync-status.error { color: var(--accent); border-color: var(--accent); }
.sync-status.error::before { background: var(--accent); }
.sync-status.offline { color: var(--ink-soft); }

@keyframes pulse { 50% { opacity: 0.4; } }

/* ----- BUTTONS ----- */

.btn {
  font-family: var(--body);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: all 180ms cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-ghost { color: var(--ink-soft); background: transparent; border: 1px solid var(--border-strong); }
.btn-ghost:hover { background: var(--paper-warm); color: var(--ink); border-color: var(--ink-soft); }

.btn-icon { padding: 8px 12px; font-size: 14px; }

/* ----- TOOLBAR ----- */

.toolbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }

.toolbar-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.status-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.tag-chips { display: flex; gap: 6px; flex-wrap: wrap; padding-left: 2px; }

.search-box { flex: 1; min-width: 200px; position: relative; }

.search-box input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  transition: all 180ms ease;
}

.search-box input:focus {
  border-color: var(--ink-soft);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.search-box::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238d8270' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}

.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  transition: all 150ms ease;
}

.chip:hover { color: var(--ink); border-color: var(--ink-soft); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ----- PROJECT GRID ----- */

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.project-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: 14px;
  padding: 24px;
  cursor: pointer;
  transition: all 220ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  text-align: left;
  width: 100%;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
}


.project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.project-card h3 {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-variation-settings: "opsz" 60;
  overflow-wrap: break-word;
  word-break: break-word;
}

.project-card .desc {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.project-card .meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-subtle);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--border-strong);
}

.project-card .tag-list { display: flex; gap: 4px; flex-wrap: wrap; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--paper-warm);
  border-radius: 4px;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* ----- STATUS PILLS ----- */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.status-pill.status-spark     { background: rgba(107, 62, 84, 0.10); color: var(--plum); }
.status-pill.status-painting  { background: rgba(164, 52, 28, 0.12); color: var(--accent); }
.status-pill.status-flowing   { background: rgba(61, 122, 120, 0.13); color: #3d7a78; }
.status-pill.status-drying    { background: rgba(141, 130, 112, 0.15); color: var(--ink-soft); }
.status-pill.status-varnished { background: rgba(111, 125, 99, 0.15); color: var(--sage); }
.status-pill.status-showing   { background: rgba(200, 150, 42, 0.18); color: #8a6218; }

/* ----- EMPTY STATE ----- */

.empty { text-align: center; padding: 80px 24px; color: var(--ink-soft); }

.empty .glyph {
  font-family: var(--display);
  font-style: italic;
  font-size: 80px;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 16px;
  font-variation-settings: "opsz" 144;
}

.empty h2 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: 400;
  margin-bottom: 8px;
  color: var(--ink);
  font-style: italic;
}

.empty p { font-size: 16px; max-width: 380px; margin: 0 auto 24px; }

/* ----- DETAIL VIEW ----- */

.detail-view { animation: fadeIn 240ms ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 15px;
  margin-bottom: 24px;
  font-style: italic;
  transition: color 150ms;
}

.back-link:hover { color: var(--accent); }

.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 12px; flex-wrap: wrap; }

.detail-title {
  font-family: var(--display);
  font-size: clamp(32px, 5vw, 44px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  background: transparent;
  border: none;
  width: 100%;
  padding: 4px 0;
  border-bottom: 1px dashed transparent;
  transition: border-color 150ms;
}

.detail-title:hover, .detail-title:focus { border-bottom-color: var(--border-strong); }

.detail-meta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
  font-size: 14px;
  color: var(--ink-subtle);
}

.detail-meta-row .dot { color: var(--border-strong); }

.detail-section { margin-bottom: 40px; }

.section-label {
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-subtle);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-variation-settings: "opsz" 60;
}

.description-area {
  width: 100%;
  min-height: 120px;
  padding: 20px 24px;
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 17px;
  line-height: 1.7;
  resize: vertical;
  transition: all 180ms ease;
}

.description-area:focus { background: var(--paper); border-color: var(--ink-soft); box-shadow: var(--shadow-sm); }
.description-area::placeholder { color: var(--ink-subtle); font-style: italic; }

/* ----- TAGS ----- */

.tag-editor { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.tag-editor .tag {
  padding: 4px 10px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-editor .tag button {
  color: var(--ink-subtle);
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: inline-flex;
}

.tag-editor .tag button:hover { color: var(--accent); }

.tag-input {
  padding: 4px 10px;
  background: transparent;
  border: 1px dashed var(--border-strong);
  border-radius: 4px;
  font-size: 13px;
  width: 110px;
  color: var(--ink);
}

.tag-input::placeholder { color: var(--ink-subtle); font-style: italic; }
.tag-input:focus { border-style: solid; border-color: var(--ink-soft); }

/* ----- NOTES ----- */

.note-composer {
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 24px;
  transition: all 180ms ease;
}

.note-composer:focus-within { background: var(--paper); border-color: var(--ink-soft); box-shadow: var(--shadow-sm); }

.note-composer textarea {
  width: 100%;
  min-height: 60px;
  resize: none;
  font-size: 16px;
  line-height: 1.6;
}

.note-composer textarea::placeholder { color: var(--ink-subtle); font-style: italic; }

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
}

.composer-hint { font-size: 12px; color: var(--ink-subtle); font-style: italic; }

.note-feed { display: flex; flex-direction: column; gap: 16px; }

.note-entry {
  position: relative;
  padding: 16px 20px 16px 28px;
  background: var(--paper);
  border-left: 2px solid var(--border-strong);
  border-radius: 0 8px 8px 0;
  transition: all 180ms ease;
}

.note-entry:hover { border-left-color: var(--accent); background: var(--paper-warm); }

.note-entry .timestamp {
  font-family: var(--display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-subtle);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.note-entry .timestamp button {
  font-size: 12px;
  color: var(--ink-subtle);
  opacity: 0;
  transition: opacity 150ms, color 150ms;
}

.note-entry:hover .timestamp button { opacity: 1; }
.note-entry .timestamp button:hover { color: var(--accent); }

.note-entry .body { white-space: pre-wrap; word-wrap: break-word; font-size: 16px; line-height: 1.65; }

.notes-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--ink-subtle);
  font-style: italic;
  font-size: 15px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
}

/* ----- DANGER ----- */

.danger-zone { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--border); }

.btn-danger {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border-strong);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
  transition: all 150ms ease;
}

.btn-danger:hover { background: var(--accent); color: var(--paper); border-color: var(--accent); }

/* ----- MENU ----- */

.menu-wrap { position: relative; }

.menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 50;
  display: none;
}

.menu.open { display: block; }

.menu button {
  display: block;
  width: 100%;
  padding: 9px 14px;
  text-align: left;
  border-radius: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  transition: all 120ms ease;
}

.menu button:hover { background: var(--paper-warm); color: var(--ink); }
.menu hr { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ----- TOAST ----- */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--ink);
  color: var(--paper);
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-style: italic;
  box-shadow: var(--shadow-lg);
  transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ----- GATE / SIGN-IN ----- */

.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.gate-card {
  max-width: 420px;
  width: 100%;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: fadeIn 280ms ease;
}

.gate-card .glyph {
  font-family: var(--display);
  font-style: italic;
  font-size: 56px;
  color: var(--accent);
  opacity: 0.7;
  line-height: 1;
  margin-bottom: 12px;
  font-variation-settings: "opsz" 144;
}

.gate-card h1 {
  font-family: var(--display);
  font-size: 32px;
  font-weight: 500;
  font-style: italic;
  margin-bottom: 8px;
  font-variation-settings: "opsz" 144, "SOFT" 50;
}

.gate-card h1 em { color: var(--accent); }

.gate-card .gate-subtitle {
  color: var(--ink-soft);
  font-size: 15px;
  font-style: italic;
  margin-bottom: 28px;
}

.gate-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 16px;
  margin-bottom: 14px;
  text-align: center;
  letter-spacing: 0.02em;
  transition: all 180ms ease;
}

.gate-input:focus { border-color: var(--ink-soft); background: var(--paper); box-shadow: var(--shadow-sm); }

.gate-card .btn-primary { width: 100%; justify-content: center; padding: 14px; }

.gate-error {
  color: var(--accent);
  font-size: 13px;
  margin-top: 8px;
  font-style: italic;
  min-height: 18px;
}

/* ----- LOADING ----- */

.loading {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--ink-subtle);
  font-style: italic;
  font-size: 15px;
}

.loading .glyph {
  font-family: var(--display);
  font-style: italic;
  font-size: 48px;
  color: var(--accent);
  opacity: 0.5;
  animation: pulse 1.6s ease-in-out infinite;
}

/* ----- GROUPS ----- */

.group-section { margin-bottom: 40px; }
.group-section:last-child { margin-bottom: 0; }

.group-header {
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-subtle);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-variation-settings: "opsz" 60;
  display: flex;
  align-items: center;
  gap: 12px;
}

.group-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.btn-group-menu {
  font-size: 13px;
  color: var(--ink-subtle);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.08em;
  transition: all 120ms ease;
}

.btn-group-menu:hover {
  background: var(--paper-warm);
  color: var(--ink-soft);
}

.btn-signout {
  font-size: 13px;
  color: var(--ink-subtle);
  font-style: italic;
  padding: 6px 10px;
  border-radius: 999px;
  letter-spacing: 0.01em;
  transition: all 150ms ease;
}

.btn-signout:hover { color: var(--accent); }

/* ----- DRAG AND DROP ----- */

.project-card.dragging {
  opacity: 0.35;
  cursor: grabbing;
}

.project-card.drag-over {
  box-shadow: 0 0 0 2px var(--ink-soft), var(--shadow-md);
  transform: translateY(-2px);
}

/* ----- GROUP INPUT ----- */

.group-input-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 360px;
  width: 100%;
}

.group-input {
  width: 100%;
  padding: 10px 36px 10px 14px;
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  color: var(--ink);
  transition: all 180ms ease;
}

.group-input:focus {
  background: var(--paper);
  border-color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}

.group-input::placeholder { color: var(--ink-subtle); font-style: italic; }

.group-input-chevron {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--ink-subtle);
  padding: 2px 4px;
  line-height: 1;
  transition: color 150ms ease;
}

.group-input-chevron:hover { color: var(--ink-soft); }

.group-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--paper);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 40;
  padding: 4px;
  display: none;
  max-height: 220px;
  overflow-y: auto;
}

.group-dropdown.open { display: block; }

.group-dropdown-item {
  display: block;
  width: 100%;
  padding: 9px 12px;
  text-align: left;
  border-radius: 6px;
  font-size: 14px;
  color: var(--ink-soft);
  transition: all 120ms ease;
}

.group-dropdown-item:hover { background: var(--paper-warm); color: var(--ink); }

/* ----- FREE FLOWING LABEL ----- */

.group-name-freeflowing {
  opacity: 0.55;
  font-style: italic;
  cursor: default;
  user-select: none;
}

/* ----- GROUP RENAME ----- */

.group-name-edit {
  font-family: var(--display);
  font-style: italic;
  font-size: 14px;
  color: var(--ink);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-variation-settings: "opsz" 60;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--ink-soft);
  padding: 0 4px 1px;
  min-width: 80px;
  max-width: 240px;
}

.group-name-edit:focus { outline: none; }

/* ----- COLOR PICKER ----- */

.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.color-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease;
  flex-shrink: 0;
}

.color-swatch:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.color-swatch.selected {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--ink);
  transform: scale(1.1);
}

.color-swatch-none {
  background: transparent;
  border: 2px dashed var(--border-strong);
  color: var(--ink-subtle);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-style: italic;
}

.color-swatch-none:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
  transform: scale(1.1);
  box-shadow: none;
}

.color-swatch-none.selected {
  border-style: solid;
  border-color: var(--ink-soft);
  box-shadow: none;
  transform: none;
}

/* ----- LINKS ----- */

.link-composer {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 10px;
  max-width: 520px;
}

.link-composer-inputs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.link-url-input,
.link-note-input {
  width: 100%;
  background: var(--paper-warm);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s;
}

.link-url-input:focus,
.link-note-input:focus {
  outline: none;
  border-color: var(--border-strong);
}

.link-note-input {
  font-size: 14px;
  color: var(--ink-soft);
}

.link-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 520px;
}

.link-entry {
  background: var(--paper-warm);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}

.link-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.link-url {
  flex: 1;
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  word-break: break-all;
  line-height: 1.4;
}

.link-url:hover {
  text-decoration: underline;
  color: var(--accent-soft);
}

.link-note {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-subtle);
  font-style: italic;
  line-height: 1.4;
}

.link-delete {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-subtle);
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.link-delete:hover {
  color: var(--accent);
}

/* ----- RESPONSIVE ----- */

@media (max-width: 640px) {
  .masthead { flex-direction: column; align-items: flex-start; }
  .masthead-actions { width: 100%; flex-wrap: wrap; }
}
