@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Nunito:wght@400;600;700;800&family=Playfair+Display:ital,wght@0,400;0,500;1,400&display=swap");

:root {
  --ember: #ff5924;
  --ember-soft: #fff1ec;
  --cobalt: #1573dd;
  --canvas: #f9fafc;
  --white: #ffffff;
  --mist: #e2e2e2;
  --blush: #fff1f1;
  --blue-card: #e5eaf2;
  --parchment: #f3f0e7;
  --sage: #dde9d3;
  --ink: #111318;
  --deep-slate: #3a475a;
  --storm: #4a5465;
  --steel: #717286;
  --slate: #748297;
  --ash: #afb5c1;
  --chalk: #a6a8aa;
  --danger: #c94a32;
  --display: "Playfair Display", "Louize", Georgia, serif;
  --ui: "Nunito", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --shadow-warm: rgba(255, 167, 129, 0.36) 0 48px 58px -48px,
    rgba(255, 128, 36, 0.18) 0 -22px 42px -36px;
  --shadow-soft: rgba(120, 132, 150, 0.18) 0 18px 50px -32px;
  --shadow-card: rgba(140, 142, 151, 0.32) 0 4px 7px -4px;

  --sidebar-w: 64px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--body);
}

body {
  margin: 0;
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--canvas);
}

body.app-body {
  background:
    radial-gradient(ellipse 1100px 600px at 92% -10%, rgba(255, 89, 36, 0.18), rgba(255, 241, 241, 0.5) 28%, transparent 56%),
    linear-gradient(180deg, #fdfdff 0%, var(--canvas) 60%, #eef3f9 100%);
}

a { color: var(--cobalt); text-decoration: none; }
button, input, textarea, select { font: inherit; }

input, textarea, select {
  width: 100%;
  color: var(--deep-slate);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(175, 181, 193, 0.2);
  border-radius: 16px;
  padding: 14px 16px;
  outline: none;
}

textarea { resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--ash); }
input:focus, textarea:focus, select:focus {
  border-color: rgba(255, 89, 36, 0.42);
  box-shadow: var(--shadow-soft);
}

/* Sidebar */
.app-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0 22px;
  border-right: 1px solid var(--mist);
  background: var(--white);
  z-index: 5;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.sidebar-brand .brand-mark { width: 11px; height: 11px; border-radius: 999px; background: var(--ember); }
.sidebar-brand-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--deep-slate);
}

.sidebar-icons {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}
.sidebar-icons a {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--steel);
}
.sidebar-icons a:hover { color: var(--ember); background: var(--ember-soft); }
.sidebar-icons svg { width: 20px; height: 20px; }

.main {
  width: min(100%, 1440px);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 28px 28px 80px calc(var(--sidebar-w) + 28px);
}

/* Hero search */
.mind-shell {
  display: grid;
  gap: 24px;
  min-width: 0;
  max-width: 100%;
}
.mind-hero { display: grid; gap: 14px; padding-top: 4px; }

.mind-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}
.mind-search input {
  width: 100%;
  min-width: 0;
  padding: 8px 56px 14px 0;
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--mist);
  border-radius: 0;
  background: transparent;
  color: var(--deep-slate);
  font-family: var(--display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(40px, 7.5vw, 84px);
  line-height: 1;
  letter-spacing: -0.04em;
}
.mind-search input::placeholder { color: var(--slate); opacity: 0.85; }
.mind-search input:focus { box-shadow: none; border-bottom-color: rgba(255, 89, 36, 0.45); }
.mind-search-icon {
  position: absolute;
  right: 4px;
  bottom: 18px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--slate);
  cursor: pointer;
}
.mind-search-icon svg { width: 26px; height: 26px; }

.mind-tips {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
  color: var(--steel);
  font-family: var(--ui);
  font-size: 13px;
}
.mind-tips p { margin: 0; color: var(--steel); }
.mind-tips kbd {
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid var(--mist);
  background: var(--white);
  color: var(--deep-slate);
  letter-spacing: 0.08em;
}
.tip-bullet { width: 6px; height: 6px; border-radius: 999px; background: var(--ember); flex: 0 0 auto; }
.tip-toggle {
  margin-left: auto;
  color: var(--slate);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 11px;
}

/* Filter chips */
.filter-suggestions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  padding: 4px 0 0;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 14px;
  border: 1px solid rgba(116, 130, 151, 0.28);
  border-radius: 100px;
  color: var(--slate);
  background: rgba(255, 255, 255, 0.76);
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.filter-chip span { color: var(--ember); }
.filter-chip.active { color: var(--ember); border-color: var(--ember); background: var(--white); }

/* Masonry wall */
.mind-wall {
  column-count: 5;
  column-gap: 16px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: 6px;
}
@media (max-width: 1280px) { .mind-wall { column-count: 4; } }
@media (max-width: 980px)  { .mind-wall { column-count: 3; } }
@media (max-width: 720px)  { .mind-wall { column-count: 2; } }
@media (max-width: 460px)  { .mind-wall { column-count: 1; } }

.wall-card {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  break-inside: avoid;
  page-break-inside: avoid;
  -webkit-column-break-inside: avoid;
  margin: 0 0 16px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  color: var(--deep-slate);
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wall-card a { color: inherit; display: block; }
.wall-card strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.12;
  font-size: 22px;
  color: var(--ink);
  margin: 4px 0 6px;
}
.wall-card p {
  margin: 0;
  color: var(--storm);
  font-size: 14px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.wall-eyebrow {
  display: inline-block;
  color: var(--ember);
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.wall-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
  color: var(--steel);
  font-family: var(--ui);
  font-size: 12px;
  min-width: 0;
}
.wall-meta a, .wall-meta span {
  color: var(--steel);
  max-width: 100%;
  overflow-wrap: anywhere;
}
.wall-meta .ghost-link { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 11px; }
.ghost-link { background: transparent; border: 0; padding: 0; cursor: pointer; color: var(--slate); }
.ghost-link.danger { color: var(--danger); }

/* Color rotation across the wall (mymind tinted surfaces) */
.mind-wall > .wall-card:nth-child(7n+1) { background: var(--white); }
.mind-wall > .wall-card:nth-child(7n+2) { background: var(--blue-card); }
.mind-wall > .wall-card:nth-child(7n+3) { background: var(--parchment); }
.mind-wall > .wall-card:nth-child(7n+4) { background: var(--white); }
.mind-wall > .wall-card:nth-child(7n+5) { background: var(--sage); }
.mind-wall > .wall-card:nth-child(7n+6) { background: var(--blush); }
.mind-wall > .wall-card:nth-child(7n)   { background: var(--white); }

/* Compose sheet — desktop: inline panel above the wall; mobile: fullscreen sheet */
.compose-sheet {
  background: var(--white);
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 6px;
}
.compose-bar { display: none; }
.compose-fab { display: none; }

.capture-card { display: grid; gap: 10px; }
.capture-card .label {
  color: var(--ember);
  font-family: var(--ui);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.capture-card textarea {
  min-height: 110px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background:
    repeating-linear-gradient(180deg, transparent 0 26px, rgba(175, 181, 193, 0.22) 27px 28px),
    transparent;
  color: var(--ink);
  font-family: "Courier New", monospace;
  font-size: 15px;
  line-height: 28px;
  box-shadow: none;
}
.form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.muted, .empty, .small { color: var(--steel); }

/* Pill buttons */
.pill-button, .ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 100px;
  background: transparent;
  cursor: pointer;
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill-button { padding: 8px 18px; }
.pill-button.primary, .pill-button.secondary {
  color: var(--ember);
  border: 1px solid var(--ember);
}
.ghost-button {
  color: var(--slate);
  border: 1px solid rgba(116, 130, 151, 0.42);
  padding: 8px 14px;
}
.danger { color: var(--danger); border-color: rgba(201, 74, 50, 0.36); }

/* Inbox card body should look quoted/handwritten */
.wall-inbox p {
  font-family: "Courier New", monospace;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Generic page bits used by other views (today/list/forms/login) */
h1, h2 {
  margin: 5px 0 0;
  color: var(--deep-slate);
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.04em;
}
h1 { font-size: clamp(36px, 7vw, 64px); line-height: 0.96; }
h2 { font-size: clamp(26px, 5vw, 40px); line-height: 0.98; }
p  { color: var(--storm); line-height: 1.58; }

.label {
  color: var(--ember);
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.2;
  text-transform: uppercase;
}

.page-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
  margin-bottom: 18px;
}

.section { display: grid; gap: 14px; margin-bottom: 28px; }
.section-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}
.list { display: grid; gap: 14px; }

/* Existing node-card partial styling (used by today/nodes-list) */
.node-card, .task-card, .inbox-row {
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-card);
  padding: 16px;
}
.node-card-main { display: grid; gap: 8px; color: var(--ink); }
.node-card strong, .task-card strong, .inbox-row p {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: -0.025em;
  font-size: 22px;
  line-height: 1.12;
  color: var(--ink);
}
.node-type {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 89, 36, 0.42);
  border-radius: 999px;
  color: var(--ember);
  font-family: var(--ui);
  font-size: 12px;
  font-weight: 800;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
  color: var(--steel);
  font-family: var(--ui);
  font-size: 12px;
}
.meta-row span, .meta-row a { color: var(--steel); }

.masonry-list {
  column-count: 3;
  column-gap: 16px;
}
@media (max-width: 980px) { .masonry-list { column-count: 2; } }
@media (max-width: 560px) { .masonry-list { column-count: 1; } }
.masonry-list > .node-card { break-inside: avoid; -webkit-column-break-inside: avoid; margin: 0 0 16px; }
.masonry-list > .node-card-task { background: var(--ember-soft); }
.masonry-list > :nth-child(5n+2) { background: var(--blue-card); }
.masonry-list > :nth-child(5n+3) { background: var(--parchment); }
.masonry-list > :nth-child(5n+4) { background: var(--sage); }

.task-rail {
  display: grid;
  grid-auto-columns: minmax(240px, 320px);
  grid-auto-flow: column;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.task-rail::-webkit-scrollbar { display: none; }

/* Auth */
.auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 20px;
}
.login-panel {
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow-warm);
}
.login-brand, .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-size: 32px;
  letter-spacing: -0.045em;
}
.brand-mark { width: 11px; height: 11px; border-radius: 999px; background: var(--ember); }

/* Detail / forms */
.detail-panel, .raw-panel, .node-builder, .link-preview, .empty-card {
  border-radius: 16px;
  background: var(--white);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}
.stack, .process-grid, .form-grid, .link-picker, .autocomplete { display: grid; gap: 14px; }
.detail-panel + .relation-manager {
  margin-top: 24px;
}

.relation-manager {
  gap: 18px;
}

.relation-manager .section-title {
  margin: 0;
}

.relation-manager .link-picker {
  gap: 10px;
}

.relation-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.relation-tools .pill-button {
  min-height: 48px;
  margin-bottom: 0;
}

.relation-manager .autocomplete:empty {
  display: none;
}

.relation-list {
  gap: 10px;
}

.relation-list .empty {
  margin: 0;
  padding: 4px 0 0;
}

.linked-create-note {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--parchment);
}

.linked-create-note p {
  margin: 0;
}

.linked-create-note strong {
  color: var(--ink);
}

@media (max-width: 620px) {
  .relation-tools {
    grid-template-columns: 1fr;
  }

  .relation-tools .pill-button {
    width: 100%;
  }
}
fieldset { margin: 0; }
legend { color: var(--steel); padding: 0 8px; }

.autocomplete button, .selected-links span {
  color: var(--slate);
  background: var(--white);
  border: 1px solid rgba(116, 130, 151, 0.32);
  border-radius: 100px;
  padding: 8px 14px;
}
.selected-links { display: flex; flex-wrap: wrap; gap: 10px; }

.relation-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  background: var(--white);
}

.body-text { color: var(--storm); white-space: pre-wrap; line-height: 1.6; }
.resource-link { display: inline-block; margin-bottom: 16px; overflow-wrap: anywhere; }

.capture-preview:empty { display: none; }
.link-preview { display: grid; gap: 14px; overflow: hidden; }
.preview-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.preview-head a { color: var(--cobalt); font-family: var(--ui); font-size: 13px; font-weight: 800; }

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: #000;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.generic-preview {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--ink);
}
.generic-preview strong, .generic-preview span span { display: block; }
.generic-preview strong { margin-bottom: 4px; font-family: var(--ui); font-size: 16px; font-weight: 800; }
.generic-preview span span { color: var(--steel); font-size: 13px; overflow-wrap: anywhere; }

.twitter-tweet, .instagram-media { max-width: 100% !important; min-width: 0 !important; margin: 0 !important; }

.alert {
  color: var(--danger);
  border: 1px solid rgba(201, 74, 50, 0.28);
  border-radius: 14px;
  padding: 12px;
  margin: 16px 0;
}

/* Mobile chrome: top bar + bottom tab bar (hidden on desktop) */
.app-topbar, .app-tabbar { display: none; }

@media (max-width: 720px) {
  body.app-body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 100% 38%, rgba(255, 89, 36, 0.34), rgba(255, 168, 106, 0.18) 22%, transparent 46%),
      radial-gradient(circle at 0% 78%, rgba(255, 128, 36, 0.22), transparent 44%),
      linear-gradient(180deg, #fff 0%, var(--canvas) 60%, #f6ebe5 100%);
  }

  .app-sidebar { display: none; }

  .app-topbar {
    position: sticky;
    top: 0;
    z-index: 6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px calc(10px + env(safe-area-inset-top, 0px));
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid rgba(226, 226, 226, 0.7);
  }

  .topbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink);
    font-family: var(--display);
    font-size: 22px;
    letter-spacing: -0.03em;
  }
  .topbar-brand .brand-mark { width: 9px; height: 9px; border-radius: 999px; background: var(--ember); }

  .topbar-actions { display: flex; align-items: center; gap: 8px; }
  .topbar-icon {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 999px;
    color: var(--deep-slate);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(226, 226, 226, 0.7);
  }
  .topbar-icon svg { width: 18px; height: 18px; }
  .topbar-fab {
    width: 38px; height: 38px;
    display: grid; place-items: center;
    border-radius: 999px;
    color: var(--white);
    background: var(--ember);
    box-shadow: 0 8px 18px -10px rgba(255, 89, 36, 0.7);
  }
  .topbar-fab svg { width: 18px; height: 18px; }

  .app-tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border-top: 1px solid rgba(226, 226, 226, 0.7);
  }
  .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 6px 4px;
    color: var(--steel);
    font-family: var(--ui);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }
  .tab-item svg { width: 22px; height: 22px; }
  .tab-item.active, .tab-item:hover { color: var(--ember); }

  /* Layout: drop sidebar offset, compact gutters */
  :root { --sidebar-w: 0px; }
  .main {
    padding: 14px 14px 24px;
    width: 100%;
  }

  /* Hero search — smaller, centered, no big underline */
  .mind-shell { gap: 16px; }
  .mind-hero { gap: 10px; }
  .mind-search input {
    font-size: clamp(28px, 8.5vw, 40px);
    padding: 4px 44px 10px 0;
    text-align: left;
  }
  .mind-search-icon { bottom: 12px; right: 0; width: 30px; height: 30px; }
  .mind-search-icon svg { width: 20px; height: 20px; }
  .mind-tips { font-size: 11px; gap: 8px; }
  .mind-tips kbd { font-size: 10px; padding: 1px 6px; }
  .tip-toggle { display: none; }

  .filter-suggestions {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 4px 14px 6px;
  }
  .filter-suggestions::-webkit-scrollbar { display: none; }
  .filter-chip { flex: 0 0 auto; }

  /* Tighter wall on mobile — 2 columns, smaller cards */
  .mind-wall {
    column-count: 2;
    column-gap: 10px;
  }
  .wall-card {
    margin: 0 0 10px;
    padding: 12px 12px 12px;
    border-radius: 12px;
  }
  .wall-card strong { font-size: 17px; line-height: 1.15; margin: 2px 0 4px; }
  .wall-card p { font-size: 12.5px; line-height: 1.45; }
  .wall-eyebrow { font-size: 9.5px; letter-spacing: 0.16em; }
  .wall-meta { gap: 6px; margin-top: 8px; font-size: 11px; }

  /* Mobile: hide inline compose, show as fullscreen sheet when open */
  .compose-sheet {
    position: fixed;
    inset: 0;
    z-index: 30;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: var(--white);
    box-shadow: none;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 280ms cubic-bezier(0.19, 1, 0.22, 1);
    visibility: hidden;
  }
  body.compose-open { overflow: hidden; }
  body.compose-open .compose-sheet {
    transform: translateY(0);
    visibility: visible;
  }

  .compose-bar {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 60px;
    align-items: center;
    gap: 8px;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
    border-bottom: 1px solid rgba(226, 226, 226, 0.7);
  }
  .compose-close {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    background: transparent;
    border: 0;
    color: var(--deep-slate);
    cursor: pointer;
  }
  .compose-close svg { width: 22px; height: 22px; }
  .compose-title {
    text-align: center;
    color: var(--steel);
    font-family: var(--ui);
    font-size: 14px;
    font-weight: 600;
  }
  .compose-save {
    background: transparent;
    border: 0;
    color: var(--ember);
    font-family: var(--ui);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    cursor: pointer;
    padding: 10px 6px;
    text-align: right;
  }

  .compose-sheet .capture-card {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 18px 18px 24px;
    background: var(--white);
    gap: 12px;
  }
  .compose-sheet .capture-card .label {
    color: var(--ash);
    font-size: 11px;
  }
  .compose-sheet .capture-card textarea {
    min-height: 50vh;
    background: transparent;
    color: var(--ink);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.6;
  }
  .compose-sheet .form-footer { display: none; }

  /* Sticky bottom-right FAB (above tab bar) */
  .compose-fab {
    display: grid;
    place-items: center;
    position: fixed;
    right: 18px;
    bottom: calc(70px + env(safe-area-inset-bottom));
    z-index: 8;
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: 0;
    color: var(--white);
    background: var(--ember);
    box-shadow: 0 18px 36px -12px rgba(255, 89, 36, 0.55), 0 6px 14px -8px rgba(255, 89, 36, 0.5);
    cursor: pointer;
  }
  .compose-fab svg { width: 22px; height: 22px; }
  body.compose-open .compose-fab { display: none; }
}

@media (max-width: 380px) {
  .mind-wall { column-count: 1; }
  .topbar-brand span:not(.brand-mark) { display: none; }
}
