/* ideas-module.css — Executive Command → Ideas (2026-10-19).
   Token-driven (var(--rr-*)): the brand's neon pink / cyan / yellow sticky notes
   with deep-violet ink, on a deep-violet board. Everything is scoped .ideas-*. */

/* The nav item stays hidden until ideas-module.js confirms the board's tables
   exist and the viewer is in exec_idea_members (html.rr-ideas-on). Once on,
   applyNavAccess()'s inline display rules as for every other item. */
html:not(.rr-ideas-on) .nav-item[data-view="ideas"] { display: none !important; }
html.ideas-locked, html.ideas-locked body { overflow: hidden; }

.ideas-page { max-width: 1320px; }
.ideas-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-items: start; }
@media (min-width: 1180px) {
  .ideas-layout { grid-template-columns: 322px minmax(0, 1fr); gap: 26px; }
  .ideas-pad-col { position: sticky; top: 92px; }
}
.ideas-layout.is-solo { grid-template-columns: minmax(0, 1fr); }

/* ── shared bits ─────────────────────────────────────────────────────── */
.ideas-label {
  flex: 1; font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700;
  letter-spacing: .18em; text-transform: uppercase; color: rgba(32,2,48,.72);
}
.ideas-swatches { display: flex; gap: 9px; }
.ideas-swatch {
  width: 22px; height: 22px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--rr-violet); transition: box-shadow .15s;
}
.ideas-swatch[data-ideas-swatch="pink"] { background: var(--rr-pink); }
.ideas-swatch[data-ideas-swatch="cyan"] { background: var(--rr-cyan); }
.ideas-swatch[data-ideas-swatch="yellow"] { background: var(--rr-yellow); }
.ideas-swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--ideas-note), 0 0 0 4px var(--rr-violet); }
.ideas-swatch:focus-visible { outline: 2px solid var(--rr-violet); outline-offset: 3px; }

.ideas-pad, .ideas-note, .ideas-sheet { --ideas-note: var(--rr-pink); }
.ideas-pad[data-color="cyan"], .ideas-note[data-color="cyan"], .ideas-sheet[data-color="cyan"] { --ideas-note: var(--rr-cyan); }
.ideas-pad[data-color="yellow"], .ideas-note[data-color="yellow"], .ideas-sheet[data-color="yellow"] { --ideas-note: var(--rr-yellow); }
/* the adhesive strip at the top of every note */
.ideas-pad::before, .ideas-note::before, .ideas-sheet::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 18px; pointer-events: none; border-radius: inherit;
  background: linear-gradient(rgba(32,2,48,.11), rgba(32,2,48,0));
}

.ideas-subject {
  display: block; width: 100%; border: 0; border-bottom: 1.5px dashed rgba(32,2,48,.35); border-radius: 0;
  background: transparent; color: var(--rr-violet); font-family: inherit; font-weight: 700; font-size: 20px; line-height: 1.25;
  padding: 6px 0 10px; outline: none;
}
.ideas-subject:focus { border-bottom-color: var(--rr-violet); }
.ideas-context {
  display: block; width: 100%; resize: none; border: 0; outline: none; margin-top: 12px; padding: 0; min-height: 130px;
  font-family: inherit; font-size: 15px; line-height: 26px; color: var(--rr-violet); background-color: transparent;
  background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 25px, rgba(32,2,48,.13) 25px, rgba(32,2,48,.13) 26px);
  background-attachment: local;
}
.ideas-subject::placeholder, .ideas-context::placeholder { color: rgba(32,2,48,.52); opacity: 1; }
.ideas-subject[readonly], .ideas-context[readonly] { cursor: default; }

.ideas-stick {
  display: inline-flex; align-items: center; gap: 10px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--rr-violet); color: #fff; padding: 10px 18px; font-family: inherit; font-weight: 700; font-size: 15px;
  box-shadow: 0 10px 20px -10px rgba(32,2,48,.9); transition: transform .12s var(--rr-ease, ease);
}
.ideas-stick:hover { transform: translateY(-1px); }
.ideas-stick:active { transform: translateY(1px); }
.ideas-stick:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ideas-stick kbd {
  font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 500; color: var(--ideas-note);
  border: 1px solid color-mix(in srgb, var(--ideas-note) 55%, transparent); border-radius: 5px; padding: 1px 6px;
}

.ideas-mini {
  border: 0; border-radius: 999px; cursor: pointer; background: var(--rr-pink); color: var(--rr-violet);
  padding: 8px 16px; font-family: inherit; font-weight: 700; font-size: 13px;
}
.ideas-mini:focus-visible { outline: 2px solid var(--rr-cyan); outline-offset: 2px; }

/* ── the pad ─────────────────────────────────────────────────────────── */
.ideas-pad {
  position: relative; background: var(--ideas-note); color: var(--rr-violet);
  border-radius: 6px; padding: 28px 18px 16px;
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 24px 40px -20px rgba(0,0,0,.7), 0 0 46px -10px color-mix(in srgb, var(--ideas-note) 60%, transparent);
  transition: background-color .25s ease, box-shadow .25s ease;
}
.ideas-pad:focus-within {
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset, 0 24px 40px -20px rgba(0,0,0,.7), 0 0 0 2px rgba(255,255,255,.85), 0 0 60px -6px color-mix(in srgb, var(--ideas-note) 80%, transparent);
}
.ideas-pad.is-peel { animation: ideas-peel .4s cubic-bezier(.3,.7,.4,1); }
.ideas-pad.is-nudge { animation: ideas-nudge .32s ease; }
@keyframes ideas-peel { 0% { transform: none; } 35% { transform: translateY(-8px) rotate(-1.6deg); } 100% { transform: none; } }
@keyframes ideas-nudge { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.ideas-pad-head, .ideas-sheet-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.ideas-pad-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.ideas-cat-select {
  -webkit-appearance: none; appearance: none; max-width: 100%; cursor: pointer;
  background: rgba(32,2,48,.12) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23200230' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--rr-violet); border: 1.5px solid rgba(32,2,48,.35); border-radius: 999px;
  font-family: inherit; font-weight: 600; font-size: 13px; padding: 8px 32px 8px 14px;
}
.ideas-cat-select:focus-visible { outline: 2px solid var(--rr-violet); outline-offset: 2px; }
.ideas-cat-select option { background: var(--rr-violet-2); color: #fff; }
.ideas-tips { margin: 12px 2px 0; font-family: 'JetBrains Mono', monospace; font-size: 11px; line-height: 1.6; color: var(--rr-text-muted); }

/* ── the board ───────────────────────────────────────────────────────── */
.ideas-board {
  min-width: 0; border-radius: var(--rr-radius, 16px); padding: 16px 18px 22px;
  border: 1px solid var(--rr-border);
  background-color: var(--rr-violet);
  background-image:
    radial-gradient(700px 380px at 0% 0%, rgba(242,57,247,.15), transparent 60%),
    radial-gradient(640px 440px at 100% 100%, rgba(88,249,244,.09), transparent 60%),
    radial-gradient(circle, rgba(155,248,244,.10) 1px, transparent 1.4px);
  background-size: auto, auto, 22px 22px;
  box-shadow: var(--rr-shadow-soft, 0 4px 16px rgba(0,0,0,.25));
}
.ideas-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.ideas-count { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--rr-light-cyan); font-variant-numeric: tabular-nums; }
.ideas-tosort { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--rr-yellow); text-decoration: underline; text-underline-offset: 3px; }
.ideas-tosort-plain { color: var(--rr-yellow); }
.ideas-live { display: inline-flex; align-items: center; gap: 7px; color: var(--rr-text-muted); }
.ideas-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .6; }
.ideas-live[data-state="live"]::before { background: var(--rr-cyan); opacity: 1; box-shadow: 0 0 8px var(--rr-cyan); }
.ideas-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1 1 auto; justify-content: flex-end; }
.ideas-search { position: relative; display: block; flex: 1 1 150px; max-width: 240px; }
.ideas-search svg { position: absolute; left: 12px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--rr-light-cyan); pointer-events: none; }
.ideas-search input {
  width: 100%; background: rgba(43,13,66,.85); border: 1px solid var(--rr-border-cyan); border-radius: 999px;
  padding: 9px 14px 9px 34px; color: #fff; font-family: inherit; font-size: 14px;
}
.ideas-search input::placeholder { color: rgba(255,255,255,.5); }
.ideas-search input:focus-visible { outline: 2px solid var(--rr-cyan); outline-offset: 1px; }
.ideas-toggle { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(43,13,66,.9); border: 1px solid var(--rr-border-cyan); }
.ideas-toggle button {
  display: inline-flex; align-items: center; gap: 7px; border: 0; background: transparent; cursor: pointer;
  color: var(--rr-text-muted); border-radius: 999px; padding: 8px 14px; font-family: inherit; font-weight: 600; font-size: 13.5px;
  transition: background-color .15s, color .15s;
}
.ideas-toggle button:hover { color: #fff; }
.ideas-toggle button[aria-pressed="true"] { background: var(--rr-cyan); color: var(--rr-violet); box-shadow: 0 0 18px -4px rgba(88,249,244,.75); }
.ideas-toggle button:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.ideas-toggle svg { width: 14px; height: 14px; flex: none; }

/* ── notes ───────────────────────────────────────────────────────────── */
.ideas-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 18px 14px; }
@media (min-width: 560px) { .ideas-wall { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 24px 20px; } }
.ideas-note {
  position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0; max-width: 100%;
  aspect-ratio: 1 / 1; overflow: hidden; cursor: pointer;
  background: var(--ideas-note); color: var(--rr-violet); border-radius: 5px; padding: 22px 14px 12px;
  transform: rotate(var(--ideas-rot, 0deg));
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 16px 26px -16px rgba(0,0,0,.75), 0 0 28px -9px color-mix(in srgb, var(--ideas-note) 60%, transparent);
  transition: transform .18s var(--rr-ease, ease), box-shadow .18s ease, opacity .2s ease;
}
.ideas-note:hover, .ideas-note:focus-visible {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 24px 34px -18px rgba(0,0,0,.8), 0 0 40px -6px color-mix(in srgb, var(--ideas-note) 75%, transparent);
}
.ideas-note:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.ideas-note.is-pending { opacity: .82; }
.ideas-note.is-pop { animation: ideas-pop .5s cubic-bezier(.2,.9,.3,1.25) both; }
@keyframes ideas-pop {
  0% { transform: translateY(-16px) scale(.55) rotate(calc(var(--ideas-rot, 0deg) - 9deg)); opacity: 0; }
  60% { transform: translateY(0) scale(1.04) rotate(var(--ideas-rot, 0deg)); opacity: 1; }
  100% { transform: rotate(var(--ideas-rot, 0deg)); }
}
.ideas-note-cat {
  flex: none; font-family: 'JetBrains Mono', monospace; font-size: 10.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(32,2,48,.72); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ideas-note-cat.is-unsorted { opacity: .5; }
.ideas-note-subject {
  flex: none; margin: 0; font-family: inherit; font-weight: 700; font-size: 16.5px; line-height: 1.22; color: var(--rr-violet);
  overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
}
.ideas-note-context {
  margin: 0; flex: 1 1 auto; min-height: 0; overflow: hidden; font-size: 13.5px; line-height: 1.42;
  color: rgba(32,2,48,.86); white-space: pre-line; overflow-wrap: anywhere;
}
.ideas-note-context.is-clipped { -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent); mask-image: linear-gradient(to bottom, #000 62%, transparent); }
.ideas-note-meta {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; flex: none; min-width: 0;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: rgba(32,2,48,.72);
}
.ideas-note-meta > span:first-child { white-space: nowrap; }
.ideas-note-who {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700;
  padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(32,2,48,.35);
}
@media (max-width: 559px) {
  .ideas-note:not(.is-compact) { padding: 20px 12px 11px; }
  .ideas-note:not(.is-compact) .ideas-note-subject { font-size: 15.5px; }
  .ideas-pad .ideas-context { min-height: 104px; }
  .ideas-board { padding: 14px 12px 18px; }
}

/* ── Organized lanes ─────────────────────────────────────────────────── */
.ideas-lanes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; align-items: start; }
.ideas-lane {
  min-width: 0; border-radius: 14px; padding: 14px 14px 16px;
  background: rgba(43,13,66,.72); border: 1px solid var(--rr-border-cyan);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: border-color .15s, box-shadow .15s;
}
.ideas-lane.is-inbox { grid-column: 1 / -1; border-style: dashed; border-color: rgba(255,241,64,.5); background: rgba(43,13,66,.55); }
.ideas-lane.is-add { border-style: dashed; }
.ideas-lane.is-over { border-color: var(--rr-cyan); border-style: solid; box-shadow: 0 0 0 1px var(--rr-cyan), 0 0 30px -6px rgba(88,249,244,.65); }
.ideas-lane-head { display: flex; align-items: center; gap: 10px; }
.ideas-lane-title {
  margin: 0; flex: 1; min-width: 0; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 700;
  letter-spacing: .16em; text-transform: uppercase; color: #fff; overflow-wrap: anywhere;
}
.ideas-lane.is-inbox .ideas-lane-title { color: var(--rr-yellow); }
.ideas-lane-count { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--rr-light-cyan); font-variant-numeric: tabular-nums; }
.ideas-lane-x {
  flex: none; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--rr-border-cyan); background: transparent; color: var(--rr-text-muted);
  font-family: inherit; font-size: 13px; line-height: 1;
}
.ideas-lane-x:hover { color: #fff; border-color: var(--rr-light-cyan); }
.ideas-lane-x.is-armed { color: var(--rr-violet); background: var(--rr-yellow); border-color: var(--rr-yellow); font-weight: 700; font-size: 12px; }
.ideas-lane-x:focus-visible { outline: 2px solid var(--rr-cyan); outline-offset: 2px; }
.ideas-lane-hint { margin: 3px 0 12px; font-size: 12.5px; color: var(--rr-text-muted); }
.ideas-lane-notes { display: flex; flex-direction: column; gap: 10px; }
.ideas-lane.is-inbox .ideas-lane-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; align-items: start; }
.ideas-lane-empty { border: 1.5px dashed var(--rr-border-cyan); border-radius: 10px; padding: 18px 12px; text-align: center; font-size: 12.5px; color: var(--rr-text-muted); }
.ideas-lane.is-inbox .ideas-lane-empty { grid-column: 1 / -1; }
.ideas-note.is-compact { aspect-ratio: auto; transform: none; padding: 16px 13px 10px; gap: 5px; }
.ideas-note.is-compact:hover, .ideas-note.is-compact:focus-visible { transform: translateY(-2px); }
.ideas-note.is-compact .ideas-note-subject { font-size: 15px; -webkit-line-clamp: 2; }
.ideas-note.is-compact .ideas-note-context { flex: none; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; }
.ideas-note.is-compact .ideas-note-context:empty { display: none; }
.ideas-note.is-compact.is-pop { animation-name: ideas-pop-flat; }
@keyframes ideas-pop-flat { 0% { transform: scale(.8); opacity: 0; } 100% { transform: none; opacity: 1; } }
.ideas-note[draggable="true"] { cursor: grab; }
.ideas-note.is-dragging { opacity: .4; }
.ideas-add-form { display: flex; gap: 8px; }
.ideas-add-form input {
  flex: 1; min-width: 0; background: rgba(32,2,48,.7); border: 1px solid var(--rr-border-cyan); border-radius: 999px;
  padding: 8px 14px; color: #fff; font-family: inherit; font-size: 14px;
}
.ideas-add-form input::placeholder { color: rgba(255,255,255,.45); }
.ideas-add-form input:focus-visible { outline: 2px solid var(--rr-cyan); outline-offset: 1px; }

/* ── empty, loading, and setup states ────────────────────────────────── */
.ideas-empty { display: flex; flex-direction: column; gap: 20px; }
.ideas-empty-head h2 { margin: 0; font-size: 19px; font-weight: 700; color: #fff; text-wrap: balance; }
.ideas-empty-head p { margin: 5px 0 0; color: var(--rr-text-muted); font-size: 14px; max-width: 52ch; }
.ideas-ghosts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; max-width: 720px; }
.ideas-ghost {
  aspect-ratio: 1 / 1; max-width: 100%; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 18px 15px;
  border: 2px dashed color-mix(in srgb, var(--ideas-c) 70%, transparent); border-radius: 5px;
  background: color-mix(in srgb, var(--ideas-c) 8%, transparent); transform: rotate(var(--ideas-rot, 0deg));
}
.ideas-ghost-step { font-family: 'JetBrains Mono', monospace; font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--ideas-c); }
.ideas-ghost-title { font-size: 18px; font-weight: 700; color: #fff; }
.ideas-ghost p { margin: 0; font-size: 13.5px; color: var(--rr-text-muted); }
@media (max-width: 640px) {
  .ideas-ghosts { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .ideas-ghost { aspect-ratio: auto; padding: 14px 16px; }
}
.ideas-nomatch { margin: 6px 0; color: var(--rr-text-muted); font-size: 14px; }
.ideas-skel {
  aspect-ratio: 1 / 1; max-width: 100%; border-radius: 5px;
  background: color-mix(in srgb, var(--ideas-c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ideas-c) 30%, transparent);
  animation: ideas-breathe 1.4s ease-in-out infinite alternate;
}
@keyframes ideas-breathe { from { opacity: .55; } to { opacity: 1; } }
.ideas-state { max-width: 560px; padding: 22px 6px; }
.ideas-state-title { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 6px; }
.ideas-state p { margin: 0 0 14px; color: var(--rr-text-muted); font-size: 14px; line-height: 1.55; }
.ideas-state code { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--rr-light-cyan); overflow-wrap: anywhere; }

/* ── the note sheet (portaled to <body>) ─────────────────────────────── */
.ideas-backdrop {
  position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: rgba(10,1,24,.68); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  animation: ideas-fade .18s ease;
}
.ideas-backdrop[hidden] { display: none; }
@keyframes ideas-fade { from { opacity: 0; } to { opacity: 1; } }
.ideas-sheet {
  position: relative; width: min(560px, 100%); max-height: 100%; overflow: auto; outline: none;
  background: var(--ideas-note); color: var(--rr-violet); border-radius: 8px; padding: 28px 22px 18px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.85), 0 0 70px -12px color-mix(in srgb, var(--ideas-note) 65%, transparent);
  animation: ideas-lift .22s cubic-bezier(.2,.8,.3,1);
  font-family: 'Space Grotesk', -apple-system, system-ui, sans-serif;
}
@keyframes ideas-lift { from { transform: translateY(14px) scale(.97); opacity: .4; } to { transform: none; opacity: 1; } }
.ideas-sheet .ideas-subject { font-size: 22px; }
.ideas-sheet .ideas-context { min-height: 150px; }
.ideas-icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center; flex: none; padding: 0; cursor: pointer;
  border-radius: 50%; border: 1.5px solid rgba(32,2,48,.35); background: transparent; color: var(--rr-violet);
}
.ideas-icon-btn svg { width: 14px; height: 14px; }
.ideas-icon-btn:focus-visible { outline: 2px solid var(--rr-violet); outline-offset: 2px; }
.ideas-sheet-cats { margin-top: 18px; }
.ideas-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.ideas-chip {
  border: 1.5px solid rgba(32,2,48,.4); background: transparent; color: var(--rr-violet); cursor: pointer;
  border-radius: 999px; padding: 6px 13px; font-family: inherit; font-size: 13px; font-weight: 600;
}
.ideas-chip:hover { border-color: var(--rr-violet); }
.ideas-chip[aria-pressed="true"] { background: var(--rr-violet); border-color: var(--rr-violet); color: var(--ideas-note); }
.ideas-chip:focus-visible { outline: 2px solid var(--rr-violet); outline-offset: 2px; }
.ideas-sheet-meta { margin: 16px 0 0; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: rgba(32,2,48,.72); }
.ideas-sheet-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.ideas-sheet-foot .ideas-stick { margin-left: auto; }
.ideas-text-btn {
  background: none; border: 0; padding: 8px 2px; cursor: pointer; color: var(--rr-violet);
  font-family: inherit; font-weight: 600; font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px;
}
.ideas-text-btn:focus-visible { outline: 2px solid var(--rr-violet); outline-offset: 2px; }
@media (max-width: 600px) {
  .ideas-backdrop { align-items: flex-end; padding: 0; }
  .ideas-sheet {
    width: 100%; max-height: 92%; border-radius: 16px 16px 0 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px));
  }
}

/* ── undo bar (portaled to <body>) ───────────────────────────────────────
   Sits above the app's toast stack (#rr-toast-host, bottom 24px) so a toast
   like "Filed under…" never covers the Undo button. */
.ideas-undo {
  position: fixed; z-index: 9998; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 14px;
  padding: 10px 10px 10px 18px; border-radius: 999px; color: #fff; font-size: 14px; font-weight: 500;
  background: rgba(43,13,66,.97); border: 1px solid rgba(242,57,247,.6);
  box-shadow: 0 0 26px -6px rgba(242,57,247,.65), 0 18px 30px -12px rgba(0,0,0,.75);
  font-family: 'Space Grotesk', -apple-system, system-ui, sans-serif;
}
.ideas-undo[hidden] { display: none; }
.ideas-undo.is-in { animation: ideas-rise .25s cubic-bezier(.2,.8,.3,1); }
@keyframes ideas-rise { from { transform: translate(-50%, 12px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
.ideas-undo button { border: 0; border-radius: 999px; cursor: pointer; background: var(--rr-pink); color: var(--rr-violet); padding: 6px 13px; font-family: inherit; font-weight: 700; font-size: 13px; }
.ideas-undo button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

@media (hover: none), (pointer: coarse) {
  .ideas-stick kbd, .ideas-tips { display: none; }
  .ideas-context, .ideas-search input, .ideas-add-form input, .ideas-cat-select { font-size: 16px; }
}
@media (max-width: 480px) { .ideas-toggle svg { display: none; } .ideas-toggle button { padding: 8px 12px; } }
@media (prefers-reduced-motion: reduce) {
  .ideas-pad, .ideas-note, .ideas-sheet, .ideas-backdrop, .ideas-undo, .ideas-skel { animation: none !important; transition: none !important; }
}
