/* =====================================================================
   advice.css — post-its on the board, quick composer, expanded page
   Post-it paper always keeps dark text (#0e0e10).
   ===================================================================== */

.pi-dot {
  --c: var(--acid);
  display: inline-block; flex: none;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--c); border: 1.5px solid #0e0e10;
}

/* ---------------------------------------------------------------------
   1. Mini post-its stuck to idea cards
   --------------------------------------------------------------------- */
/* Fanned stack hanging off the card's bottom-right corner. The origin sits in the
   card's right padding (never over text); post-its fan out into the gutter. */
.pi-stack {
  position: absolute; left: calc(100% - 16px); top: calc(100% - 48px);
  width: 0; height: 0; z-index: 3;
}
.pi-mini {
  --pi: var(--pi-yellow);
  --rot: 0deg;
  --x: 0px; --y: 0px; --i: 0;
  position: absolute; left: var(--x); top: var(--y); z-index: var(--z, 1);
  width: 64px; height: 64px;
  padding: 7px 6px 5px 7px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2px;
  text-align: left;
  background:
    linear-gradient(to bottom, rgba(14, 14, 16, 0.08), transparent 20%),
    var(--pi);
  color: #0e0e10;
  border: 0; border-radius: 2px 2px 3px 10px / 2px 2px 3px 6px;
  box-shadow: var(--shadow-postit), inset 0 0 0 1px rgba(14, 14, 16, 0.1);
  transform: rotate(var(--rot));
  transform-origin: 30% 12%;
  transition: transform 0.28s var(--ease-spring), box-shadow 0.2s;
  cursor: pointer;
  font: inherit;
}
/* a dab of washi tape on the front post-it, so it reads "stuck on" */
.pi-mini.is-front::before {
  content: ""; position: absolute; left: 50%; top: -6px; width: 28px; height: 11px;
  transform: translateX(-50%) rotate(-4deg);
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.45) 0 4px, transparent 4px 8px), rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(14, 14, 16, 0.22);
  pointer-events: none;
}
/* hovering the stack fans it open a touch */
.pi-stack:hover .pi-mini { transform: translate(calc(var(--i) * 6px), calc(var(--i) * 3px)) rotate(calc(var(--rot) * 1.3)); }
.pi-stack .pi-mini:hover, .pi-stack .pi-stack .pi-mini:active { transform: translate(calc(var(--i) * 6px), calc(var(--i) * 3px - 3px)) rotate(0deg) scale(1.06); }

.pi-mini-text {
  font-family: var(--f-marker); font-size: 9.5px; line-height: 1.16;
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.pi-mini-foot { display: flex; align-items: center; justify-content: space-between; gap: 3px; min-height: 10px; }
.pi-mini .pi-dot { width: 8px; height: 8px; }
.pi-mini-page {
  font-family: var(--f-mono); font-size: 7px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase;
  background: #0e0e10; color: var(--pi); padding: 1px 3px; border-radius: 2px;
}
.pi-mini.is-long .pi-mini-text { padding-right: 6px; }
.pi-fold { /* folded corner = "opens into a page" */
  position: absolute; top: 0; right: 0; width: 13px; height: 13px;
  background: linear-gradient(225deg, var(--paper) 0 50%, color-mix(in srgb, var(--pi) 72%, #0e0e10) 50% 100%);
  border-bottom-left-radius: 3px;
  box-shadow: -1px 1px 2px rgba(0, 0, 0, 0.18);
  transition: width 0.2s var(--ease-spring), height 0.2s var(--ease-spring);
}
.pi-mini:hover .pi-fold { width: 18px; height: 18px; }

.pi-more {
  --rot: 6deg;
  position: absolute; left: 62px; top: 52px; z-index: 12;
  min-width: 28px; height: 28px; padding: 0 5px;
  display: grid; place-items: center;
  font-family: var(--f-mono); font-weight: 700; font-size: 11px; letter-spacing: -0.02em;
  background: var(--acid); color: #0e0e10;
  border: 2px solid #0e0e10; border-radius: 50%;
  box-shadow: 2px 2px 0 #0e0e10;
  transform: rotate(var(--rot));
  transition: transform 0.25s var(--ease-spring);
  cursor: pointer;
}
.pi-stack:hover .pi-more { transform: translate(14px, 8px) rotate(calc(var(--rot) * -1)) scale(1.08); }
.board[data-tool="postit"] .pi-more { cursor: inherit; }

/* ---------------------------------------------------------------------
   2. Quick composer (big post-it)
   --------------------------------------------------------------------- */
/* full-screen layer band (spec: 200-260): above the bottom nav (120), the idea sheet (150) and the tour (180) */
#advice-layer { position: relative; z-index: 220; }

.pc {
  --pi: var(--pi-yellow);
  --rot: -1deg;
  position: fixed; z-index: 110;
  width: min(268px, calc(100vw - 24px));
  padding: 22px 16px 12px;
  display: flex; flex-direction: column; gap: 8px;
  background:
    linear-gradient(to bottom, rgba(14, 14, 16, 0.07), transparent 14%),
    var(--pi);
  color: #0e0e10;
  border: 2px solid #0e0e10;
  border-radius: 3px 3px 4px 18px / 3px 3px 4px 10px;
  box-shadow: 6px 6px 0 #0e0e10, 0 26px 50px -16px rgba(0, 0, 0, 0.5);
  transform: rotate(var(--rot));
  transform-origin: 50% 0;
  animation: pc-in 0.38s var(--ease-spring) both;
  transition: background-color 0.2s;
}
@keyframes pc-in {
  0% { opacity: 0; transform: scale(0.3) rotate(-16deg); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: scale(1) rotate(var(--rot)); }
}
.pc.is-out { animation: pc-out 0.22s var(--ease-out) forwards; }
@keyframes pc-out { to { opacity: 0; transform: scale(0.85) rotate(4deg) translateY(10px); } }
.pc.is-stuck { animation: pc-stuck 0.42s var(--ease-out) forwards; }
@keyframes pc-stuck {
  0% { transform: scale(1) rotate(var(--rot)); }
  30% { transform: scale(1.08) rotate(-3deg); }
  100% { opacity: 0; transform: scale(0.25) rotate(10deg) translateY(30px); }
}
.pc.is-shake { animation: pc-shake 0.4s; }
@keyframes pc-shake {
  0%, 100% { transform: rotate(var(--rot)); }
  20% { transform: rotate(var(--rot)) translateX(-7px); }
  40% { transform: rotate(var(--rot)) translateX(6px); }
  60% { transform: rotate(var(--rot)) translateX(-4px); }
  80% { transform: rotate(var(--rot)) translateX(2px); }
}
.pc.is-wobble { animation: pc-wobble 0.45s var(--ease-spring); }
@keyframes pc-wobble {
  0% { transform: rotate(var(--rot)) scale(1); }
  40% { transform: rotate(calc(var(--rot) + 2.5deg)) scale(1.03); }
  100% { transform: rotate(var(--rot)) scale(1); }
}

.pc-tape {
  position: absolute; top: -13px; left: 50%; width: 92px; height: 24px;
  transform: translateX(-50%) rotate(2deg);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.4) 0 6px, transparent 6px 12px), rgba(255, 255, 255, 0.55);
  border: 1.5px solid rgba(14, 14, 16, 0.3);
}

.pc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pc-for {
  display: flex; align-items: center; gap: 5px; min-width: 0;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.04em;
}
.pc-for-dot { width: 8px; height: 8px; flex: none; background: var(--c); border: 1.5px solid #0e0e10; }
.pc-for-label { opacity: 0.6; flex: none; }
.pc-for-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc-x {
  flex: none; width: 24px; height: 24px; margin: -6px -4px 0 0;
  display: grid; place-items: center;
  border: 1.5px solid #0e0e10; border-radius: 50%; background: transparent; color: #0e0e10;
  font-size: 16px; line-height: 1;
  transition: transform 0.2s var(--ease-spring), background 0.15s;
}
.pc-x:hover { background: #0e0e10; color: var(--pi); transform: rotate(90deg); }

.pc-text {
  width: 100%; min-height: 112px; resize: none;
  padding: 2px 0; border: 0; outline: 0; background: transparent;
  font-family: var(--f-marker); font-size: 19px; line-height: 1.25; color: #0e0e10;
}
.pc-text::placeholder { color: rgba(14, 14, 16, 0.42); }
.pc-text::selection { background: #0e0e10; color: var(--pi); }

.pc-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--f-mono); font-size: 10px;
  padding-bottom: 6px; border-bottom: 1.5px dashed rgba(14, 14, 16, 0.35);
}
.pc-by { display: inline-flex; align-items: center; gap: 5px; opacity: 0.75; }
.pc-count { font-variant-numeric: tabular-nums; opacity: 0.6; }
.pc-count.is-hot { opacity: 1; color: #c4005a; font-weight: 600; }

.pc-label { font-family: var(--f-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.12em; opacity: 0.7; }
.pc-label small { font-weight: 400; letter-spacing: 0; }

.pc-swatches { display: flex; gap: 7px; }
.pc-sw {
  position: relative;
  width: 26px; height: 26px; padding: 0;
  background: var(--pi); border: 2px solid #0e0e10; border-radius: 50%;
  transition: transform 0.2s var(--ease-spring);
}
.pc-sw:hover { transform: translateY(-2px) scale(1.1); }
.pc-sw[aria-checked="true"] { transform: scale(1.12); box-shadow: 2px 2px 0 #0e0e10; }
.pc-sw[aria-checked="true"]::after {
  content: "✓"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #0e0e10;
}

.pc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.pc-tag {
  height: 22px; padding: 0 8px;
  font-family: var(--f-mono); font-size: 10px; font-weight: 500;
  color: #0e0e10; background: rgba(255, 255, 255, 0.4);
  border: 1.5px solid #0e0e10; border-radius: var(--r-pill);
  transition: transform 0.15s var(--ease-spring), background 0.15s;
}
.pc-tag:hover { transform: translateY(-1px) rotate(-2deg); }
.pc-tag[aria-pressed="true"] { background: #0e0e10; color: var(--pi); }
.pc-tag.is-nope { animation: pc-nope 0.35s; }
@keyframes pc-nope { 25% { transform: translateX(-3px); } 75% { transform: translateX(3px); } }

.pc-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.pc-stick, .pc-expand {
  height: 38px; border-radius: var(--r-sm);
  font-family: var(--f-mono); font-weight: 600; font-size: 13px; letter-spacing: 0.06em;
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s;
}
.pc-stick { background: #0e0e10; color: var(--acid); border: 2px solid #0e0e10; box-shadow: 3px 3px 0 rgba(14, 14, 16, 0.35); }
.pc-stick:hover { transform: translate(-1px, -1px) rotate(-1deg); box-shadow: 4px 4px 0 var(--hot); }
.pc-stick:active { transform: translate(2px, 2px); box-shadow: none; }
.pc-expand { height: 32px; font-size: 11px; background: transparent; color: #0e0e10; border: 2px dashed #0e0e10; }
.pc-expand:hover { border-style: solid; background: rgba(255, 255, 255, 0.45); }
.pc-hint { font-family: var(--f-mono); font-size: 9.5px; text-align: center; opacity: 0.78; }
.pc-hint kbd { font-size: 9px; padding: 0 4px; border-width: 1px; opacity: 1; }

/* ---------------------------------------------------------------------
   3. Expanded advice page
   --------------------------------------------------------------------- */
.ax {
  --pi: var(--pi-yellow);
  position: fixed; inset: 0; z-index: 120;
  padding: 18px;
  display: flex;
  background: var(--dim);
  backdrop-filter: blur(6px) saturate(1.1);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  animation: ax-fade 0.3s var(--ease-out) both;
}
@keyframes ax-fade { from { opacity: 0; } }
.ax.is-closing { animation: ax-fade-out 0.28s var(--ease-out) forwards; pointer-events: none; }
@keyframes ax-fade-out { to { opacity: 0; } }

.ax-sheet {
  position: relative;
  flex: 1; min-width: 0; max-width: 1480px; margin: 0 auto;
  display: flex; flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 8px 8px 0 var(--ink), var(--shadow-soft);
  overflow: hidden;
  transform-origin: 50% 50%;
}

/* "post-it unfolds into a page" */
.ax.is-opening .ax-sheet { animation: ax-unfold 0.5s var(--ease-spring) both; }
.ax.is-opening .ax-sheet::after {
  content: ""; position: absolute; inset: 0; z-index: 50; pointer-events: none;
  background: var(--pi);
  transform-origin: 50% 0;
  animation: ax-flap 0.46s var(--ease-out) both;
}
@keyframes ax-unfold {
  0% { transform: scale(0.14, 0.2) rotate(-9deg); border-radius: 4px; }
  45% { transform: scale(0.6, 0.45) rotate(-3deg); }
  100% { transform: none; }
}
@keyframes ax-flap {
  0%, 30% { opacity: 1; transform: rotateX(0deg); }
  100% { opacity: 0; transform: perspective(900px) rotateX(-70deg); }
}
.ax.is-closing .ax-sheet { animation: ax-fold 0.26s var(--ease-out) forwards; }
@keyframes ax-fold { to { transform: scale(0.3) rotate(6deg); opacity: 0; } }
.ax-sheet.is-flip .ax-note { animation: ax-flip 0.45s var(--ease-spring); }
@keyframes ax-flip { from { opacity: 0; transform: translateY(22px) rotate(calc(var(--rot) - 3deg)) scale(0.96); } }

/* ----- top bar ----- */
.ax-top {
  flex: none; height: 60px; padding: 0 14px 0 18px;
  display: flex; align-items: center; gap: 14px;
  border-bottom: 2px solid var(--line);
  background: var(--card);
}
.ax-logo { width: 18px; height: 18px; flex: none; background: var(--pi); border: 2px solid #0e0e10; transform: rotate(-6deg); box-shadow: 2px 2px 0 var(--ink); }
.ax-crumbs {
  min-width: 0; display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
}
.ax-crumb {
  padding: 4px 6px; border: 0; border-radius: 4px; background: none; color: var(--ink-3);
  font: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap;
}
button.ax-crumb:hover { color: var(--ink); background: var(--paper-2); }
.ax-crumb-idea { max-width: 32vw; overflow: hidden; text-overflow: ellipsis; }
.ax-crumb.is-here { color: #0e0e10; background: var(--acid); font-weight: 600; }
.ax-sep { color: var(--ink-3); }
.ax-top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.ax-status {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.08em; color: var(--ink-3); white-space: nowrap;
}
.ax-status.is-busy { color: var(--ink); }
.ax-hist { display: flex; gap: 4px; }
.ax-round {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 2px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink);
  font-size: 16px; line-height: 1;
  transition: transform 0.15s var(--ease-spring), background 0.15s;
}
.ax-round:hover { background: var(--paper-2); transform: rotate(-12deg); }
.ax-round:active { transform: scale(0.92); }
.ax-publish { height: 36px; }
.ax-own { height: 36px; }
.ax-close { /* same round × as every other overlay */
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border: 2px solid var(--line); border-radius: 50%; background: var(--card); color: var(--ink);
  font-size: 24px; line-height: 1;
  transition: transform 0.25s var(--ease-spring), background 0.2s;
}
.ax-close:hover { transform: rotate(90deg); background: var(--hot); color: #0e0e10; }
.ax-close:active { transform: rotate(90deg) scale(0.9); }

.ax-tabs { display: none; }

/* ----- 3 columns ----- */
.ax-grid {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(220px, 260px);
}
.ax-left, .ax-right, .ax-center { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ax-left, .ax-right { padding: 18px 16px 28px; background: var(--card); scrollbar-width: thin; }
.ax-left { border-right: 2px solid var(--line); }
.ax-right { border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 10px; }

.ax-rail-label {
  display: flex; align-items: center; gap: 8px;
  margin: 18px 0 10px;
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.14em; color: var(--ink-3);
}
.ax-rail-label::before { content: ""; width: 8px; height: 8px; background: var(--ink); flex: none; }
.ax-left > .ax-rail-label:first-child, .ax-right > .ax-rail-label:first-child { margin-top: 0; }
.ax-right .ax-rail-label { margin: 10px 0 0; }
.ax-count { margin-left: auto; padding: 1px 6px; background: var(--acid); color: #0e0e10; border: 1.5px solid #0e0e10; letter-spacing: 0.04em; }

/* idea summary card */
.ax-idea {
  --cat: var(--acid);
  position: relative;
  padding: 16px 14px 12px;
  background: var(--paper);
  border: 2px solid var(--line); border-radius: 4px;
  box-shadow: 4px 4px 0 var(--cat), 4px 4px 0 2px var(--line);
}
.ax-idea::before {
  content: ""; position: absolute; left: -2px; right: -2px; top: -2px; height: 6px;
  background: var(--cat); border: 2px solid var(--line); border-radius: 4px 4px 0 0;
}
.ax-idea-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ax-stage { font-family: var(--f-mono); font-size: 10px; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.06em; }
.ax-idea-title { margin: 10px 0 6px; font-family: var(--f-sans); font-weight: 700; font-size: 20px; line-height: 1.12; letter-spacing: -0.02em; }
.ax-idea-pitch { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.ax-needs { margin-top: 12px; }
.ax-needs-label { display: block; font-family: var(--f-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; color: var(--ax-hot-ink, var(--hot)); margin-bottom: 6px; }
.ax-needs-list { display: flex; flex-wrap: wrap; gap: 5px; }
.ax-ask {
  font-family: var(--f-mono); font-size: 10.5px; padding: 2px 7px;
  border: 1.5px dashed var(--line); border-radius: var(--r-pill);
}
.ax-idea-by { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-family: var(--f-mono); font-size: 11px; }
.ax-muted { color: var(--ink-3); font-family: var(--f-mono); font-size: 11px; }

/* other counsel list */
.ax-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ax-item {
  --pi: var(--pi-yellow);
  width: 100%; display: flex; gap: 10px; align-items: flex-start;
  padding: 8px; text-align: left;
  background: transparent; color: var(--ink);
  border: 2px solid transparent; border-radius: var(--r-md);
  transition: background 0.15s, border-color 0.15s, transform 0.2s var(--ease-spring);
}
.ax-item:hover { background: var(--paper-2); transform: translateX(3px); }
.ax-item.is-active { border-color: var(--line); background: var(--paper); box-shadow: var(--shadow-hard-sm); }
.ax-item-sq {
  flex: none; width: 30px; height: 30px; margin-top: 1px;
  background: var(--pi); border: 1.5px solid #0e0e10; border-radius: 2px 2px 2px 8px;
  box-shadow: var(--shadow-postit);
  transform: rotate(-4deg);
  transition: transform 0.2s var(--ease-spring);
}
.ax-item:hover .ax-item-sq, .ax-item.is-active .ax-item-sq { transform: rotate(3deg) scale(1.06); }
.ax-item-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ax-item-text {
  font-size: 13px; line-height: 1.3; font-weight: 500;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ax-item-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-family: var(--f-mono); font-size: 10px; color: var(--ink-3); }
.ax-item-page { padding: 0 4px; background: var(--ink); color: var(--paper); border-radius: 2px; font-weight: 600; }
.ax-item-react { margin-left: auto; }

.ax-add {
  width: 100%; margin-top: 10px; height: 40px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink); background: transparent;
  border: 2px dashed var(--line); border-radius: var(--r-md);
  transition: background 0.15s, transform 0.2s var(--ease-spring);
}
.ax-add:hover { background: var(--acid); color: #0e0e10; border-style: solid; transform: rotate(-1deg); }
.ax-add-sq { width: 14px; height: 14px; background: var(--pi-yellow); border: 1.5px solid #0e0e10; transform: rotate(-8deg); }

/* ----- center: the post-it, big ----- */
.ax-center {
  padding: 56px 28px 80px;
  overflow-x: clip;
  background-color: var(--paper);
  background-image: radial-gradient(var(--dot) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
.ax-doc { max-width: 640px; margin: 0 auto; }

.ax-note {
  --rot: -0.6deg;
  --rule: rgba(14, 14, 16, 0.13);
  position: relative;
  min-height: min(560px, 62vh);
  padding: 34px 44px 46px;
  display: flex; flex-direction: column;
  color: #0e0e10;
  /* paper: faint top shading (where it was peeled off the pad) + a soft sheen */
  background:
    linear-gradient(to bottom, rgba(14, 14, 16, 0.08), transparent 46px),
    radial-gradient(120% 70% at 85% 105%, rgba(14, 14, 16, 0.08), transparent 60%),
    var(--pi);
  border: 2px solid #0e0e10;
  border-radius: 2px 2px 3px 26px / 2px 2px 3px 14px;
  box-shadow:
    7px 7px 0 #0e0e10,
    0 2px 2px rgba(0, 0, 0, 0.12),
    0 34px 48px -24px rgba(14, 14, 16, 0.55);
  transform: rotate(var(--rot));
  transform-origin: 50% 0;
  transition: background-color 0.3s;
}
.ax-note.is-wobble { animation: ax-wobble 0.5s var(--ease-spring); }
@keyframes ax-wobble { 40% { transform: rotate(calc(var(--rot) + 2deg)) scale(1.015); } }

.ax-note-tape {
  position: absolute; top: -17px; left: 50%; width: 132px; height: 32px;
  transform: translateX(-50%) rotate(-3deg);
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.45) 0 6px, transparent 6px 12px), rgba(255, 255, 255, 0.6);
  border: 1.5px solid rgba(14, 14, 16, 0.3);
  box-shadow: 0 2px 4px rgba(14, 14, 16, 0.12);
}
/* lifted bottom-right corner */
.ax-note-curl {
  position: absolute; right: -2px; bottom: -2px; width: 46px; height: 46px; pointer-events: none;
  background: linear-gradient(315deg, var(--paper) 0 47%, rgba(14, 14, 16, 0.25) 49%, color-mix(in srgb, var(--pi) 68%, #0e0e10) 51%, color-mix(in srgb, var(--pi) 88%, #fff) 100%);
  border-top: 2px solid #0e0e10; border-left: 2px solid #0e0e10;
  border-top-left-radius: 4px 10px;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  filter: drop-shadow(-3px -2px 3px rgba(14, 14, 16, 0.18));
}

.ax-note-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 18px;
  font-family: var(--f-mono); font-size: 12px;
}
.ax-note-head .avatar { border-color: #0e0e10; }
.ax-note-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; overflow-wrap: anywhere; }
.ax-note-when { color: #2e2e34; }
.ax-note-when::before { content: "· "; }
.ax-you { padding: 0 5px; font-size: 9px; letter-spacing: 0.08em; background: #0e0e10; color: var(--pi); border: 1.5px solid #0e0e10; }
.ax-pubbed, .ax-draft {
  margin-left: auto;
  padding: 1px 7px; font-size: 9.5px; font-weight: 600; letter-spacing: 0.1em; border: 1.5px solid #0e0e10; border-radius: 3px;
}
.ax-pubbed { background: #0e0e10; color: var(--pi); }
.ax-draft { background: transparent; color: #0e0e10; border-style: dashed; }

.ax-note-title {
  margin: 0 0 6px;
  font-family: var(--f-mono); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  line-height: 1.35; outline: none; overflow-wrap: anywhere;
}
.ax-note-short {
  margin: 0; outline: none;
  font-family: var(--f-marker); font-weight: 400;
  font-size: clamp(30px, 3.4vw, 42px); line-height: 1.2;
  overflow-wrap: anywhere; white-space: pre-wrap;
}
.ax-note-short.is-m { font-size: clamp(26px, 2.8vw, 34px); }
.ax-note-short.is-l { font-size: clamp(22px, 2.3vw, 28px); line-height: 1.25; }
.ax-note-title:empty::before, .ax-note-short:empty::before, .ax-body:empty::before {
  content: attr(data-placeholder); color: rgba(14, 14, 16, 0.55); pointer-events: none;
}
.is-mine .ax-note-title:focus, .is-mine .ax-note-short:focus {
  text-decoration: underline wavy rgba(14, 14, 16, 0.4) 1.5px; text-underline-offset: 6px;
}
.is-mine .ax-note-title:hover:not(:focus), .is-mine .ax-note-short:hover:not(:focus) { background: rgba(255, 255, 255, 0.22); border-radius: 4px; }

.ax-note-meta { display: flex; align-items: center; gap: 10px; margin-top: 16px; min-height: 2px; }
.ax-doc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ax-doc-tag {
  font-family: var(--f-mono); font-size: 11px; font-weight: 600;
  padding: 2px 8px; background: rgba(255, 255, 255, 0.5); color: #0e0e10;
  border: 1.5px solid #0e0e10; border-radius: var(--r-pill);
}
.ax-note-count { margin-left: auto; font-family: var(--f-mono); font-size: 10.5px; font-variant-numeric: tabular-nums; color: #3a3a40; }
.ax-note-count.is-hot { color: #a8004a; font-weight: 700; }

/* the continuation: same paper, keeps going on ruled lines */
.ax-note-cont { flex: 1; display: flex; flex-direction: column; margin-top: 22px; }
.ax-note-tear {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  font-family: var(--f-marker); font-size: 15px; color: #2e2e34;
}
.ax-note-tear::before, .ax-note-tear::after { content: ""; flex: 1; border-top: 2px dashed rgba(14, 14, 16, 0.35); }
.ax-note-tear::before { flex: 0 0 18px; }

.ax-body {
  flex: 1; min-height: 6.4em; outline: none;
  font-family: var(--f-sans); font-size: 18px; line-height: 32px; color: #0e0e10; font-weight: 500;
  overflow-wrap: anywhere;
  caret-color: #0e0e10;
  background-image: repeating-linear-gradient(transparent 0 31px, var(--rule) 31px 32px);
  background-position: 0 1px;
}
.ax-body > :first-child { margin-top: 0; }
.ax-body p { margin: 0 0 32px; }
.ax-body p:last-child { margin-bottom: 0; }
.ax-body h2, .ax-body h3 {
  display: inline-block; margin: 0;
  font-family: var(--f-marker); font-weight: 400; font-size: 22px; letter-spacing: 0; line-height: 32px;
  padding: 0 4px; background: rgba(255, 255, 255, 0.5);
}
.ax-body ul, .ax-body ol { margin: 0 0 32px; padding-left: 26px; }
.ax-body ul { list-style: none; }
.ax-body ul li { position: relative; }
.ax-body ul li::before {
  content: ""; position: absolute; left: -20px; top: 12px;
  width: 8px; height: 8px; background: #0e0e10; transform: rotate(12deg);
}
.ax-body a { color: inherit; text-decoration: underline; text-decoration-color: #0e0e10; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.ax-body a:hover { background: #0e0e10; color: var(--pi); }
.ax-body blockquote { margin: 0 0 32px; padding-left: 14px; border-left: 4px solid rgba(14, 14, 16, 0.5); font-style: italic; }
.ax-body b, .ax-body strong { font-weight: 700; }
.ax-body ::selection, .ax-note-short::selection, .ax-note-title::selection { background: #0e0e10; color: var(--pi); }
.ax-note-end {
  margin: auto 0 0; padding-top: 28px; align-self: flex-end;
  font-family: var(--f-marker); font-size: 17px; color: #2e2e34; transform: rotate(-2deg);
}

.ax-reacts {
  display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin-top: 44px;
}
.ax-reacts-label { font-family: var(--f-mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; color: var(--ink-3); margin-right: 6px; }
.ax-react {
  height: 36px; padding: 0 12px;
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-mono); font-size: 13px; font-weight: 600;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--r-pill);
  box-shadow: var(--shadow-hard-sm);
  transition: transform 0.18s var(--ease-spring), box-shadow 0.15s, background 0.15s;
}
.ax-react:not(:disabled):hover { transform: translateY(-2px) rotate(-3deg); background: var(--pi); color: #0e0e10; }
.ax-react:not(:disabled):active { transform: translate(2px, 2px); box-shadow: none; }
.ax-react:disabled { cursor: default; box-shadow: none; opacity: 0.85; }
.ax-react-emo { font-size: 17px; line-height: 1; }
.ax-react.is-pop .ax-react-emo { animation: ax-pop 0.5s var(--ease-spring); }
@keyframes ax-pop { 0% { transform: scale(1); } 35% { transform: scale(1.8) rotate(-14deg); } 100% { transform: scale(1); } }

/* ----- right rail (Scribe-style) ----- */
.ax-lock {
  padding: 10px 12px; font-size: 12.5px; line-height: 1.4;
  background: var(--paper); border: 2px dashed var(--line); border-radius: var(--r-md);
}
.ax-swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ax-sw {
  --pi: var(--pi-yellow);
  position: relative; aspect-ratio: 1 / 1; padding: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0;
  background: var(--pi); color: #0e0e10;
  border: 2px solid #0e0e10; border-radius: var(--r-md);
  transition: transform 0.2s var(--ease-spring), box-shadow 0.15s;
}
.ax-sw-aa { font-family: var(--f-display); font-size: 26px; line-height: 1; }
.ax-sw-name { font-family: var(--f-mono); font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.85; }
.ax-sw-check {
  position: absolute; top: -7px; right: -7px;
  width: 20px; height: 20px; display: none; place-items: center;
  font-size: 11px; font-weight: 700;
  background: #0e0e10; color: var(--acid); border: 2px solid var(--card); border-radius: 50%;
}
.ax-sw:not(:disabled):hover { transform: translateY(-2px) rotate(-3deg); box-shadow: 3px 3px 0 var(--ink); }
.ax-sw[aria-checked="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.ax-sw[aria-checked="true"] .ax-sw-check { display: grid; animation: ax-pop 0.4s var(--ease-spring); }
.ax-sw:disabled { cursor: default; opacity: 0.55; }
.ax-sw:disabled[aria-checked="true"] { opacity: 1; }

.ax-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ax-tool {
  width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 600; line-height: 1;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--line); border-radius: 50%;
  transition: transform 0.18s var(--ease-spring), background 0.15s;
}
.ax-tool:not(:disabled):hover { transform: translateY(-2px); background: var(--paper-2); }
.ax-tool:not(:disabled):active { transform: scale(0.9); }
.ax-tool.is-on { background: var(--ink); color: var(--paper); }
.ax-tool:disabled { opacity: 0.35; cursor: not-allowed; }
.ax-tool.t-b { font-family: var(--f-sans); font-weight: 800; }
.ax-tool.t-i { font-family: var(--f-display); font-style: italic; font-size: 20px; font-weight: 400; }
.ax-tool.t-u { text-decoration: underline; text-underline-offset: 2px; }
.ax-tool.t-s { text-decoration: line-through; }
.ax-tool.t-ul { font-size: 13px; letter-spacing: -0.1em; }
.ax-tool.t-h { font-family: var(--f-display); font-size: 21px; font-weight: 400; }
.ax-tool.t-a { font-size: 14px; }

.ax-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ax-tagchip {
  height: 28px; padding: 0 11px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 500;
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--r-pill);
  transition: transform 0.15s var(--ease-spring), background 0.15s;
}
.ax-tagchip:not(:disabled):hover { transform: translateY(-1px) rotate(-2deg); background: var(--paper-2); }
.ax-tagchip[aria-pressed="true"] { background: var(--pi); color: #0e0e10; border-color: #0e0e10; box-shadow: 2px 2px 0 var(--ink); }
.ax-tagchip:disabled { cursor: default; }
.ax-tagchip:disabled[aria-pressed="false"] { opacity: 0.4; }

.ax-stats { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); }
.ax-tip {
  margin-top: auto; padding: 10px 12px;
  font-size: 12px; line-height: 1.4;
  background: var(--counsel-bg); color: var(--counsel-ink);
  border-radius: var(--r-md);
}

/* ----- selection popover ----- */
.ax-pop {
  position: fixed; z-index: 230; /* body-level, above #advice-layer */ left: 0; top: 0;
  min-width: 196px; padding: 6px;
  display: none; flex-direction: column; gap: 2px;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-hard);
}
.ax-pop.is-on { display: flex; animation: ax-pop-in 0.22s var(--ease-spring); }
@keyframes ax-pop-in { from { opacity: 0; transform: translateY(6px) scale(0.92); } }
.ax-pop-head { padding: 4px 8px 6px; font-family: var(--f-mono); font-size: 9.5px; font-weight: 600; letter-spacing: 0.14em; color: var(--ink-3); }
.ax-pop-item {
  display: flex; align-items: center; gap: 10px;
  height: 34px; padding: 0 8px; text-align: left;
  font-family: var(--f-sans); font-size: 13.5px; font-weight: 500;
  background: transparent; color: var(--ink); border: 0; border-radius: 8px;
}
.ax-pop-item:hover { background: var(--acid); color: #0e0e10; }
.ax-pop-ic { width: 22px; height: 22px; display: grid; place-items: center; font-size: 13px; border: 1.5px solid currentColor; border-radius: 6px; }

/* ----- responsive ----- */
@media (max-width: 1100px) {
  .ax-grid { grid-template-columns: 250px minmax(0, 1fr) 220px; }
  .ax-note { padding: 32px 34px 42px; }
}
/* (<= 899px: one column + bottom bar, see "v4" at the end of this file) */

@media (prefers-reduced-motion: reduce) {
  .pc, .ax, .ax-sheet, .ax.is-opening .ax-sheet, .ax.is-opening .ax-sheet::after, .pi-mini { animation: none !important; transition: none !important; }
}

/* ----- owner delete (right rail) ----- */
.ax-danger { margin-top: auto; padding-top: 8px; }
.ax-del { display: flex; flex-direction: column; gap: 8px; }
.ax-del .btn { height: 34px; font-size: 12px; justify-content: center; }
.ax-del-btn { width: 100%; }
.ax-del-btn:hover, .ax-del-yes { background: var(--red); color: #fff; border-color: #0e0e10; }
.ax-del-q { font-family: var(--f-marker); font-size: 17px; color: var(--ink); }
.ax-del-row { display: flex; gap: 8px; }
.ax-del-row .btn { flex: 1; padding: 0 8px; }

/* ----- composer + advice page polish (contrast, swatches, touch targets) ----- */
.ax { --ink-3: #5f5f67; --ax-hot-ink: #c40f5a; }
.ax-swatches { max-width: 340px; }
@media (pointer: coarse) {
  .pc { width: min(312px, calc(100vw - 24px)); }
  .pc-x { width: 40px; height: 40px; margin: -10px -8px 0 0; }
  .pc-swatches { gap: 4px; justify-content: space-between; }
  .pc-sw { width: 40px; height: 40px; }
  .pc-tag { height: 40px; padding: 0 12px; font-size: 11px; }
  .pc-expand { height: 40px; }
  .pc-stick { height: 44px; }
  .ax-close, .ax-round, .ax-hist .ax-round { width: 40px; height: 40px; }
  .ax-own, .ax-publish { height: 40px; }
  .ax-crumb-idea { padding: 10px 6px; }
  .ax-tab { height: 46px; }
  .ax-tagchip { height: 40px; padding: 0 14px; }
  .ax-react { height: 42px; }
  .ax-tool { width: 44px; height: 44px; }
}

/* consistent press: translate + shadow collapse */
.ax-item:active { transform: translate(2px, 2px); }
.ax-add:active, .pc-expand:active { transform: translate(2px, 2px); }
.ax-tagchip:not(:disabled):active { transform: translate(1px, 1px); box-shadow: none; }
.pc-x:active { transform: rotate(90deg) scale(0.9); }

/* ===== v3: two columns — every sticky on the left, the open one big in the middle ===== */
.ax-grid { grid-template-columns: minmax(270px, 340px) minmax(0, 1fr) !important; }
.ax-right { display: none !important; }
.ax-left { background: var(--paper); }
.ax-idea-mini {
  width: 100%; display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; margin-bottom: 6px; text-align: left;
  background: var(--card); border: 2px solid var(--line); border-left: 8px solid var(--cat); border-radius: var(--r-md);
  transition: transform 0.15s var(--ease-spring), box-shadow 0.15s;
}
.ax-idea-mini:hover { transform: translate(-1px, -1px); box-shadow: var(--shadow-hard-sm); }
.ax-idea-mini-k { font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; color: var(--ink-3); }
.ax-idea-mini-t { font-weight: 700; font-size: 16px; line-height: 1.2; }
.ax-list .ax-item { background: var(--card); border-color: color-mix(in srgb, var(--ink) 14%, transparent); }
.ax-item-text { font-family: var(--f-marker); font-size: 15px; font-weight: 400; }
.ax-item-sub { font-size: 12px; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ax-item.is-active { background: color-mix(in srgb, var(--pi) 45%, var(--card)); }
/* owner delete now lives in the top bar */
.ax-top .ax-danger { margin: 0; padding: 0; }
.ax-top .ax-del { flex-direction: row; align-items: center; gap: 6px; }
.ax-top .ax-del-q { font-size: 14px; white-space: nowrap; }
.ax-top .ax-del-btn { width: 36px; }
.ax-top .ax-del .btn { height: 34px; }
@media (max-width: 899px) {
  .ax-top .ax-del-q { display: none; }
}

/* ===== composer: title first, Enter drops you into the smaller details ===== */
.pc-title {
  width: 100%; border: 0; background: transparent; resize: none; outline: none; padding: 4px 0;
  font-family: var(--f-marker); font-size: 22px; line-height: 1.2; color: #0e0e10;
}
.pc-title::placeholder, .pc-sub::placeholder { color: rgba(14, 14, 16, 0.42); }
.pc-sub {
  width: 100%; min-height: 64px; border: 0; border-top: 1.5px dashed rgba(14, 14, 16, 0.35); background: transparent;
  resize: none; outline: none; padding: 8px 0 2px;
  font-family: var(--f-sans); font-size: 13.5px; line-height: 1.45; color: #0e0e10;
}
.pc-sub-k { font-family: var(--f-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.12em; color: rgba(14,14,16,.6); margin-top: 4px; }

/* ===== v3.2: owner edit + customize, under the big sticky ===== */
.ax-editable { margin-left: auto; padding: 2px 8px; font-family: var(--f-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; background: #0e0e10; color: var(--pi); border-radius: 4px; }
.ax-body-count { display: flex; justify-content: flex-end; margin-top: 6px; }
.ax-note-count.is-hot { color: var(--ax-hot-ink, #c40f5a); font-weight: 700; }
.ax-style {
  margin: 22px auto 0; max-width: 640px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 14px;
  padding: 14px 16px; background: var(--card); border: 2px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-hard-sm);
}
.ax-style-k { font-family: var(--f-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--ink-3); }
.ax-style-sw, .ax-style-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ax-sw2 { width: 30px; height: 30px; border-radius: 6px; background: var(--pi); border: 2px solid #0e0e10; transition: transform 0.15s var(--ease-spring); }
.ax-sw2:hover { transform: rotate(-8deg) scale(1.1); }
.ax-sw2[aria-checked="true"] { box-shadow: 0 0 0 3px var(--card), 0 0 0 5px #0e0e10; }
.ax-tag2 { font-family: var(--f-mono); font-size: 11.5px; font-weight: 600; padding: 5px 10px; background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--r-pill); }
.ax-tag2[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.pc-sub-k { display: flex; justify-content: space-between; align-items: center; }
.pc-sub-count { font-size: 9.5px; }

/* ===== v3.3: drafts on the big page ===== */
.ax-item-draft { font-family: var(--f-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; color: var(--ax-hot-ink, #c40f5a); }
.ax.is-draft .ax-note { outline: 3px dashed #0e0e10; outline-offset: 6px; }
.ax.is-draft .ax-status { color: var(--ax-hot-ink, #c40f5a); font-weight: 700; }
.ax-note.is-shake { animation: ax-shake 0.4s ease; }
@keyframes ax-shake { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
.pc-expand { width: 100%; margin-top: 8px; }

/* your reaction (one of each per person; 👍 / 👎 cancel out) */
.ax-react[aria-pressed="true"] { background: var(--ink); color: var(--paper); transform: rotate(-2deg); }
.ax-react[aria-pressed="true"] .ax-react-n { color: var(--acid); }

/* second way to finish — right under the color/tag toolbar */
.ax-finish {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1.5px dashed var(--line);
}
.ax-finish-btn { font-size: 15px; padding: 12px 22px; }
.ax-finish-hint { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); }
@media (max-width: 700px) { .ax-finish-btn { flex: 1; justify-content: center; } }

/* =====================================================================
   v4: responsive. <= 899px the big page is one column: the note first, the
   other stickies as a sideways strip under it, a compact top bar and a sticky
   bottom bar with the main action. <= 700px the quick composer is a bottom sheet.
   --vvh / --vvtop / --kb come from advice.js (visualViewport), so both sit above
   the on-screen keyboard.
   ===================================================================== */
.ax-bbar, .ax-jump, .ax-crumb-back { display: none; }
.ax-jump {
  height: 34px; padding: 0 10px; align-items: center; gap: 5px; flex: none;
  font-family: var(--f-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  background: var(--paper); color: var(--ink); border: 2px solid var(--line); border-radius: var(--r-pill);
}
.ax-jump b { padding: 0 5px; background: var(--acid); color: #0e0e10; border: 1.5px solid #0e0e10; border-radius: var(--r-pill); }

@media (max-width: 899px) {
  .ax { padding: 0; bottom: auto; top: var(--vvtop, 0px); height: 100vh; height: var(--vvh, 100dvh); }
  .ax-sheet { border-radius: 0; border: 0; box-shadow: none; }

  /* top bar: back-to-idea + jump + delete + close */
  .ax-top { height: auto; min-height: 54px; padding: env(safe-area-inset-top, 0px) 8px 0 8px; gap: 6px; }
  .ax-logo, .ax-status, .ax-crumb:not(.ax-crumb-idea), .ax-sep { display: none; }
  .ax-crumbs { flex: 1; }
  .ax-crumb-idea { max-width: none; min-width: 0; padding: 10px 6px; color: var(--ink); font-weight: 600; }
  .ax-crumb-back { display: inline; }
  .ax-top-right { gap: 6px; }
  .ax-top .ax-hist, .ax-top .ax-publish, .ax-top .ax-top-own { display: none; }
  .ax-jump { display: inline-flex; }
  .ax-top:has(.ax-del-q) .ax-jump { display: none; }

  /* one scroller: the note, then the strip of other stickies */
  .ax-grid { display: flex !important; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; }
  .ax-left, .ax-center { height: auto; min-height: 0; overflow: visible; border: 0; flex: none; }
  .ax-center { order: 1; padding: 34px 16px 30px; }
  .ax-left { order: 2; display: block; padding: 18px 0 24px; border-top: 2px solid var(--line); background: var(--card); scroll-margin-top: 0; }
  .ax-left > .ax-idea-mini { width: calc(100% - 32px); margin: 0 16px 6px; }
  .ax-left > .ax-rail-label { margin: 14px 16px 8px; }
  .ax-list {
    flex-direction: row; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding: 0 16px; padding: 4px 16px 10px; scrollbar-width: none;
  }
  .ax-list::-webkit-scrollbar { display: none; }
  .ax-list > li { flex: 0 0 min(250px, 74%); scroll-snap-align: start; display: flex; }
  .ax-list .ax-item { min-height: 92px; }
  .ax-item:hover { transform: none; }
  .ax-left > .ax-add { width: calc(100% - 32px); margin: 10px 16px 0; height: 46px; }
  .ax.is-readonly .ax-left > .ax-add { display: none; } /* same button as the bottom bar */
  .ax-reacts-label { flex: 1 1 100%; margin: 0 0 2px; text-align: center; }

  .ax-note { min-height: 0; padding: 28px 20px 40px; box-shadow: 5px 5px 0 #0e0e10, 0 26px 36px -22px rgba(14, 14, 16, 0.5); }
  .ax-note-tape { width: 104px; height: 26px; top: -14px; }
  .ax-note-short { font-size: 30px; }
  .ax-note-short.is-m { font-size: 25px; }
  .ax-note-short.is-l { font-size: 21px; }
  .ax-note-title { font-size: 16px; }
  .ax-body { font-size: 16.5px; line-height: 30px; background-image: repeating-linear-gradient(transparent 0 29px, var(--rule) 29px 30px); }
  .ax-body p, .ax-body ul, .ax-body ol, .ax-body blockquote { margin-bottom: 30px; }
  .ax-body h2, .ax-body h3 { line-height: 30px; font-size: 20px; }
  .ax-body ul li::before { top: 11px; }
  .ax-note-curl { width: 34px; height: 34px; }
  .ax-reacts { margin-top: 30px; }
  .ax-finish { display: none; } /* the bottom bar does this job */

  /* sticky bottom bar */
  .ax-bbar {
    display: flex; flex: none; align-items: center; gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--card); border-top: 2px solid var(--line);
  }
  .ax-bbar .ax-hist { flex: none; }
  .ax-bbar-btn { flex: 1; min-width: 0; height: 48px; justify-content: center; font-size: 14px; box-shadow: 3px 3px 0 var(--ink); }
}
/* keyboard up: no safe-area padding needed under the bar */
@media (max-width: 899px) and (hover: none) {
  .ax-bbar .ax-round { width: 44px; height: 44px; }
}

@media (max-width: 700px) {
  .ax-center { padding: 30px 14px 26px; }
  .ax-note { padding: 26px 16px 34px; }
  .ax-note-head { margin-bottom: 14px; font-size: 11.5px; }
  .ax-editable { margin-left: 0; }
  /* color + tags: labels above, rows full width (fits 6 x 40px swatches at 360px) */
  .ax-style { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px; }
  .ax-style-sw { gap: 8px; }
  .ax-style-tags { gap: 6px; }
  .ax-react { padding: 0 14px; }
}
@media (hover: none), (pointer: coarse) {
  .ax-sw2 { width: 40px; height: 40px; }
  .ax-tag2 { min-height: 40px; padding: 0 12px; }
  .ax-react { height: 44px; }
  .ax-jump { height: 44px; }
  .ax-top .ax-del-btn { width: 44px; }
  .ax-top .ax-del .btn { height: 44px; }
}

/* ---- quick composer as a bottom sheet (phones) ---- */
.pc-scrim { display: none; }
@media (max-width: 700px) {
  .pc-scrim {
    display: block; position: fixed; inset: 0; z-index: 109;
    background: var(--dim, rgba(14, 14, 16, 0.45));
    animation: ax-fade 0.25s var(--ease-out) both;
  }
  .pc-scrim.is-out { animation: ax-fade-out 0.22s var(--ease-out) forwards; }
  .pc.is-sheet {
    left: 0; right: 0; top: auto; bottom: var(--kb, 0px);
    width: 100%; max-height: calc(var(--vvh, 100dvh) - 16px); overflow-y: auto; overscroll-behavior: contain;
    padding: 26px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-width: 2px 0 0; border-radius: 18px 18px 0 0;
    box-shadow: 0 -4px 0 #0e0e10, 0 -20px 40px -16px rgba(0, 0, 0, 0.45);
    transform: none; transform-origin: 50% 100%;
    animation: pc-sheet-in 0.32s var(--ease-out) both;
  }
  .pc.is-sheet::before { /* grab handle */
    content: ""; position: absolute; top: 9px; left: 50%; width: 40px; height: 4px; transform: translateX(-50%);
    border-radius: 4px; background: rgba(14, 14, 16, 0.3);
  }
  .pc.is-sheet .pc-tape, .pc.is-sheet .pc-hint { display: none; }
  .pc.is-sheet .pc-title { font-size: 22px; }
  .pc.is-sheet .pc-sub { font-size: 16px; }
  .pc.is-sheet .pc-for { font-size: 11px; }
  .pc.is-sheet .pc-label, .pc.is-sheet .pc-sub-k { font-size: 11px; }
  .pc.is-sheet .pc-swatches { justify-content: space-between; }
  .pc.is-sheet .pc-actions { flex-direction: row; gap: 8px; }
  .pc.is-sheet .pc-stick { flex: 1.3; height: 48px; }
  .pc.is-sheet .pc-expand { flex: 1; height: 48px; margin-top: 0; width: auto; }
  .pc.is-sheet.is-out { animation: pc-sheet-out 0.22s var(--ease-out) forwards; }
  .pc.is-sheet.is-stuck { animation: pc-sheet-out 0.3s var(--ease-out) forwards; }
  .pc.is-sheet.is-shake { animation: pc-sheet-shake 0.4s; }
  .pc.is-sheet.is-wobble { animation: none; }
}
@keyframes pc-sheet-in { from { transform: translateY(100%); } }
@keyframes pc-sheet-out { to { transform: translateY(100%); } }
@keyframes pc-sheet-shake { 20% { translate: -7px 0; } 40% { translate: 6px 0; } 60% { translate: -4px 0; } 80% { translate: 2px 0; } }
@media (prefers-reduced-motion: reduce) {
  .pc-scrim, .pc.is-sheet { animation: none !important; }
}
