/* Creative Grid — Texas. Copyright (c) 2026 Phazur Labs. All rights reserved. */

:root {
  color-scheme: dark;
  --night: #0E0E0F;
  --glass: rgba(21, 21, 22, .82);
  --raise: rgba(255, 255, 255, .045);
  --raise-2: rgba(255, 255, 255, .08);
  --ink: #F4EFE9;
  --ink-2: #A8A2AE;
  --hair: rgba(255, 255, 255, .09);
  --hair-2: rgba(255, 255, 255, .2);
  --glow: #6FE3A5;                    /* the one interaction accent */
  --glow-ink: #07170E;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);          /* the one house easing */
  --panel-w: 348px;
  --drawer-w: 400px;
  --gap: 16px;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;            /* app shell: the document never scrolls, panes do */
  background: var(--night);
  color: var(--ink);
  font: 400 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
html { overscroll-behavior: none; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
.stage, .panel .masthead, .filters, .jumps, .dock { -webkit-user-select: none; user-select: none; }
.handle { display: none; }
strong, b { font-weight: 500; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 2px; }
::selection { background: var(--glow); color: var(--glow-ink); }

.app { position: relative; height: 100dvh; overflow: hidden; }

/* ── Stage: the map fills the window; everything else floats on it ───── */
.stage {
  position: absolute; inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 55% 42%, #1B1B1D 0%, #101011 58%, #080808 100%);
}
/* film grain + vignette over the map, under the interface */
.stage::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(0, 0, 0, .5) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .07;
  mix-blend-mode: screen;
}

#map { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#map.is-dragging { cursor: grabbing; }
#map.is-pointing { cursor: pointer; }
#map:focus-visible { outline-offset: -4px; }

/* ── Shared glass surface ────────────────────────────────────────────── */
.panel, .drawer {
  background: var(--glass);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  backdrop-filter: blur(26px) saturate(150%);
  border: 1px solid var(--hair);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* ── Directory panel ─────────────────────────────────────────────────── */
.panel {
  position: absolute;
  z-index: 2;
  top: var(--gap); left: var(--gap); bottom: var(--gap);
  width: var(--panel-w);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  animation: enter .9s var(--ease) both;
}

.masthead { padding: 26px 24px 18px; }
.brand {
  margin: 0;
  font: 400 40px/.95 var(--serif);
  letter-spacing: -0.02em;
}
.brand em { color: var(--glow); }
.tally {
  margin: 12px 0 0;
  color: var(--ink-2);
  font: 400 11px/1 var(--mono);
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  margin: 0 16px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--raise);
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.search:focus-within { border-color: var(--glow); background: rgba(111, 227, 165, .06); }
.search svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--ink-2); stroke-width: 1.6; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; }
.search input::placeholder { color: var(--ink-2); }
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(.6); }

/* The legend is the filter */
.filters {
  display: grid;
  gap: 1px;
  padding: 14px 10px 12px;
  border-bottom: 1px solid var(--hair);
}
.chip {
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: none;
  text-align: left;
  font-size: 13.5px;
  transition: background .25s var(--ease), color .25s var(--ease), opacity .25s var(--ease);
}
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); transition: transform .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease); }
.chip b { font: 400 11px/1 var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.chip:hover { background: var(--raise); }
.chip:hover i { transform: scale(1.25); }
.chip[aria-pressed="false"] { color: var(--ink-2); opacity: .55; }
.chip[aria-pressed="false"] i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--c); transform: scale(.85); }

.list {
  flex: 1;
  min-height: 0;
  margin: 0;
  padding: 8px 10px 12px;
  list-style: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--hair-2) transparent;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 28px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 28px), transparent);
}

.row {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  column-gap: 14px;
  align-items: center;
  padding: 8px 10px;
  border: 1.5px solid transparent;
  border-radius: 18px;
  background: none;
  text-align: left;
  transition: background .25s var(--ease), border-color .3s var(--ease), box-shadow .4s var(--ease), transform .25s var(--ease);
}
/* round monogram token, shared by rows and the map card */
.row i, .av {
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--c);
  color: #131313;
  font: 500 12.5px/1 var(--sans);
  font-style: normal;
  letter-spacing: .01em;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.row i { grid-row: span 2; }
.row strong { grid-column: 2; align-self: end; display: block; font: 500 14.5px/1.3 var(--sans); letter-spacing: -0.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row span { grid-column: 2; align-self: start; display: block; color: var(--ink-2); font-size: 12.5px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row:hover, .row.is-hover { background: var(--raise); }
.row:hover i { transform: scale(1.06); box-shadow: 0 0 18px color-mix(in srgb, var(--c) 55%, transparent); }
.row:active { transform: scale(.99); }
.row[aria-current="true"] {
  border-color: var(--glow);
  background: rgba(111, 227, 165, .05);
  box-shadow: 0 0 0 1px rgba(111, 227, 165, .18), 0 0 26px rgba(111, 227, 165, .22), inset 0 0 22px rgba(111, 227, 165, .06);
}

.sortbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 24px 4px; color: var(--ink-2); font-size: 12.5px; }
.sortbar select { height: 32px; padding: 0 10px 0 12px; border: 1px solid var(--hair); border-radius: 999px; background: var(--raise); font-size: 12.5px; color: var(--ink); transition: border-color .3s var(--ease); }
.sortbar select:hover { border-color: var(--hair-2); }

.empty { padding: 28px 14px; color: var(--ink-2); }
.empty button { margin-top: 12px; display: block; padding: 9px 14px; border: 1px solid var(--hair); border-radius: 10px; background: var(--raise); }

.note {
  margin: 0;
  padding: 12px 24px 16px;
  border-top: 1px solid var(--hair);
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.45;
}

/* ── Floating map controls ───────────────────────────────────────────── */
.jumps {
  position: absolute;
  top: 22px; right: var(--gap);
  left: calc(var(--panel-w) + var(--gap) * 2);
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  pointer-events: none;
  animation: enter .9s .15s var(--ease) both;
}
.jumps::-webkit-scrollbar { display: none; }
.jumps button, .controls button {
  pointer-events: auto;
  flex: none;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: rgba(24, 24, 25, .7);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  font-size: 13px;
  white-space: nowrap;
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease), transform .2s var(--ease);
}
.jumps button:hover, .controls button:hover { border-color: var(--hair-2); background: rgba(42, 42, 44, .85); transform: translateY(-1px); }
.jumps button:active, .controls button:active { transform: scale(.96); }
.jumps button[aria-pressed="true"] { border-color: var(--glow); background: var(--glow); color: var(--glow-ink); font-weight: 500; }
.controls button.wide[aria-pressed="true"] { border-color: rgba(111, 227, 165, .6); color: var(--glow); }

.dock {
  position: absolute;
  left: calc(var(--panel-w) + var(--gap) * 2);
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  pointer-events: none;
  animation: enter .9s .25s var(--ease) both;
}
.controls { display: flex; gap: 6px; }
.controls button { width: 40px; min-height: 40px; padding: 0; font-size: 19px; line-height: 1; border-radius: 13px; }
.controls button.wide { width: auto; padding: 0 15px; font-size: 13px; }

.hud {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--ink-2);
  font: 400 11px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: pre;
}
.scale { display: inline-flex; align-items: center; gap: 8px; }
.scale i { display: block; height: 5px; border: 1px solid var(--ink-2); border-top: 0; transition: width .3s var(--ease); }
.scale b { font-weight: 400; }

.hint {
  position: absolute;
  right: 24px; bottom: 34px;
  margin: 0;
  color: var(--ink-2);
  font-size: 12.5px;
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .8s var(--ease);
  animation: enter .9s 1.6s var(--ease) both;
}
.hint.is-gone { opacity: 0 !important; }

/* ── Map card: rides beside the selected marker ──────────────────────── */
.card {
  position: absolute;
  z-index: 2;
  top: 0; left: 0;
  width: 344px;
  padding: 20px;
  border: 1px solid var(--hair);
  border-radius: 24px;
  background: rgba(23, 23, 24, .95);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
  opacity: 0;
  transition: opacity .35s var(--ease);
  will-change: transform;
}
.card[hidden] { display: none; }
.card header { display: flex; align-items: center; gap: 14px; margin: 0 40px 16px 0; }
.card .av { flex: none; width: 54px; height: 54px; font-size: 16px; }
.card h2 { margin: 0; font: 500 19px/1.2 var(--sans); letter-spacing: -0.012em; text-wrap: balance; }
.card h2:focus { outline: none; }
.card header p { margin: 4px 0 0; color: var(--ink-2); font-size: 13px; }
.card header p span { margin: 0 3px; }
.card header em { font-style: normal; color: var(--glow); }
.stats { display: flex; gap: 20px; margin: 0 0 16px; padding: 12px 14px; list-style: none; border: 1px solid var(--hair-2); border-radius: 13px; font-size: 13px; }
.stats li { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.stats svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin: 0 0 6px; font: 500 16px/1.3 var(--sans); letter-spacing: -0.01em; }
.blurb { margin: 0 0 18px; color: #CFCAC6; font-size: 13px; line-height: 1.5; }
.outline {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--hair-2);
  border-radius: 15px;
  background: none;
  font-size: 14.5px;
  transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease), transform .2s var(--ease);
}
.outline:hover { border-color: var(--glow); background: rgba(111, 227, 165, .07); color: var(--glow); }
.outline:active { transform: scale(.985); }

/* ── Detail drawer ───────────────────────────────────────────────────── */
.drawer {
  position: absolute;
  z-index: 3;
  top: var(--gap); right: var(--gap); bottom: var(--gap);
  width: var(--drawer-w);
  max-width: calc(100% - var(--gap) * 2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateX(calc(100% + 32px));
  transition: transform .6s var(--ease), opacity .4s var(--ease);
}
.drawer.is-open { transform: none; opacity: 1; }

.close {
  position: absolute;
  top: 16px; right: 16px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--hair);
  border-radius: 50%;
  background: rgba(24, 24, 25, .8);
  z-index: 1;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}
.close svg { width: 13px; height: 13px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; }
.close:hover { border-color: var(--hair-2); transform: rotate(90deg); }

.drawer-body {
  flex: 1; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 34px 28px 28px;
  scrollbar-width: thin; scrollbar-color: var(--hair-2) transparent;
}
/* content settles in, one block after another */
.drawer-body > *, .drawer-body > form > * { animation: rise .7s var(--ease) both; }
.drawer-body > :nth-child(2), .drawer-body > form > :nth-child(2) { animation-delay: .05s; }
.drawer-body > :nth-child(3), .drawer-body > form > :nth-child(3) { animation-delay: .1s; }
.drawer-body > :nth-child(4), .drawer-body > form > :nth-child(4) { animation-delay: .15s; }
.drawer-body > :nth-child(5), .drawer-body > form > :nth-child(5) { animation-delay: .2s; }
.drawer-body > :nth-child(n+6), .drawer-body > form > :nth-child(n+6) { animation-delay: .25s; }
.drawer-body > form { animation: none; }

.drawer h2 {
  margin: 0 44px 14px 0;
  font: 400 42px/1 var(--serif);
  letter-spacing: -0.022em;
  text-wrap: balance;
}
.drawer h2:focus { outline: none; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 22px; color: var(--ink-2); font-size: 13px; }
.meta .tag { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.meta .tag i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.meta .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--hair-2); }
.desc { margin: 0 0 24px; font-size: 16px; line-height: 1.5; letter-spacing: -0.005em; color: #E2DCD8; }

.actions { display: flex; gap: 8px; margin: 0 0 28px; }
.actions a, .actions button {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  border-radius: 13px;
  background: var(--raise);
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .2s var(--ease);
}
.actions a:hover, .actions button:hover { border-color: var(--hair-2); background: var(--raise-2); transform: translateY(-1px); }
.actions a:active, .actions button:active { transform: scale(.98); }

.primary, .actions button.primary {
  display: inline-flex; align-items: center; justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid var(--glow);
  border-radius: 13px;
  background: var(--glow);
  color: var(--glow-ink);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 30px rgba(111, 227, 165, .18);
  transition: background .3s var(--ease), box-shadow .3s var(--ease), transform .2s var(--ease);
}
.primary:hover, .actions button.primary:hover { background: #93F0BF; border-color: #93F0BF; box-shadow: 0 10px 36px rgba(111, 227, 165, .3); transform: translateY(-1px); }
.primary:active { transform: scale(.985); }

.drawer h3 { margin: 0 0 8px; font: 500 13px/1.3 var(--sans); color: var(--ink-2); }
.near { margin: 0 -10px; padding: 0; list-style: none; }

/* Experiences: what creatives report, never a score to rank by */
.exp { margin: 0 0 26px; padding: 20px; border: 1px solid var(--hair); border-radius: 18px; background: rgba(0, 0, 0, .28); }
.exp h3 { margin-bottom: 14px; color: var(--ink); font-size: 14px; }
.meter, .bar { display: block; height: 4px; border-radius: 2px; background: var(--raise-2); overflow: hidden; }
.meter i, .bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, #3FC98A, var(--glow)); transform-origin: left; animation: grow .9s .2s var(--ease) both; }
.fine { margin: 12px 0 18px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.fine strong { color: var(--ink); }
.mine-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 0 0 14px; font-size: 14px; }
.mine-head span { color: var(--ink-2); font: 400 11px/1.3 var(--mono); text-align: right; }
.bars { margin: 0 0 16px; display: grid; gap: 11px; }
.bars div { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 10px; }
.bars dt { font-size: 13px; color: var(--ink-2); }
.bars dd { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) 12px; align-items: center; gap: 12px; }
.bars b { font: 400 11px/1 var(--mono); text-align: right; }
.again { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }
.again strong { color: var(--ink); }
.quote { margin: 0 0 12px; padding-left: 14px; border-left: 1px solid var(--glow); font: 400 19px/1.3 var(--serif); font-style: italic; overflow-wrap: anywhere; }
.mine .fine { margin: 0 0 14px; }
.mine .actions { margin: 0; }

/* Capabilities + credited work */
.caps { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 24px; padding: 0; list-style: none; }
.caps li { padding: 5px 12px; border: 1px solid var(--hair); border-radius: 999px; font-size: 12.5px; }
.work { margin: 0 0 26px; }
.work h3 { margin-bottom: 2px; }
.works { margin: 0 0 14px; padding: 0; list-style: none; }
.works li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hair); }
.works strong { display: block; font: 400 22px/1.15 var(--serif); letter-spacing: -0.01em; }
.works a { color: inherit; text-decoration: underline; text-decoration-thickness: 1px; text-decoration-color: var(--hair-2); text-underline-offset: 4px; transition: text-decoration-color .3s var(--ease); }
.works a:hover { text-decoration-color: var(--glow); }
.works span { display: block; margin-top: 4px; color: var(--ink-2); font-size: 12.5px; }
.link { flex: none; padding: 6px 8px; border: 0; border-radius: 6px; background: none; color: var(--ink-2); font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
.ghost { width: 100%; min-height: 44px; margin-top: 4px; border: 1px dashed var(--hair-2); border-radius: 13px; background: none; font-size: 14px; transition: border-color .3s var(--ease), background .3s var(--ease); }
.ghost:hover { border-color: var(--glow); background: rgba(111, 227, 165, .05); }
.work .fine { margin: 12px 0 0; }

/* Report + credit forms */
.drawer form fieldset { margin: 0 0 22px; padding: 0; border: 0; min-width: 0; }
.drawer form legend { padding: 0; margin: 0 0 10px; font: 500 14px/1.35 var(--sans); }
.drawer form legend small { display: block; margin-top: 3px; font-weight: 400; font-size: 13px; color: var(--ink-2); }
.field span small { margin-left: 6px; font-weight: 400; font-size: 12.5px; color: var(--ink-2); }
.opts { display: flex; flex-wrap: wrap; gap: 6px; }
.opts.scale { display: grid; grid-template-columns: repeat(5, 1fr); }
.opt { position: relative; display: block; }
.opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.opt span {
  display: flex; align-items: center; justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--raise);
  font-size: 13.5px;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), transform .2s var(--ease);
}
.opts.scale .opt span { font: 400 13px/1 var(--mono); }
.opt:hover span { border-color: var(--hair-2); transform: translateY(-1px); }
.opt input:checked + span { background: var(--glow); border-color: var(--glow); color: var(--glow-ink); font-weight: 500; }
.opt input:focus-visible + span { outline: 2px solid var(--glow); outline-offset: 2px; }
.ends { display: flex; justify-content: space-between; margin: 7px 0 0; color: var(--ink-2); font-size: 12px; }
.field { display: block; margin: 0 0 22px; }
.field > span { display: block; margin: 0 0 10px; font: 500 14px/1.35 var(--sans); }
.field > small { display: block; margin-top: 7px; color: var(--ink-2); font-size: 12.5px; }
.field select, .field textarea, .field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--raise);
  resize: vertical;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.field select, .field input { height: 44px; padding: 0 14px; }
.field input::placeholder { color: var(--ink-2); }
.field select:focus-visible, .field textarea:focus-visible, .field input:focus-visible { outline: none; border-color: var(--glow); background: rgba(111, 227, 165, .06); }
.error { margin: 0 0 16px; padding: 11px 14px; border: 1px solid rgba(238, 123, 116, .6); border-radius: 12px; background: rgba(238, 123, 116, .08); color: #FFC9C4; font-size: 13.5px; line-height: 1.4; }
.drawer form .actions { margin-bottom: 4px; }

@keyframes enter { from { opacity: 0; transform: translateY(10px); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes grow { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}

/* ── Small screens: map on top, directory sheet below, drawer rises over it ── */
@media (max-width: 860px) {
  .stage { bottom: var(--sheet, 42dvh); }
  .panel {
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto; height: calc(var(--sheet, 42dvh) + 22px);
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
  }
  .app { --sheet: 42dvh; }
  .app.sheet-min { --sheet: 132px; }
  .app.sheet-min .filters, .app.sheet-min .list, .app.sheet-min .note { display: none; }
  .handle {
    display: grid; place-items: center;
    flex: none;
    width: 100%; height: 40px;
    margin-bottom: -22px;
    border: 0; background: none;
  }
  .handle i { width: 40px; height: 4px; border-radius: 2px; background: var(--hair-2); transition: background .3s var(--ease), width .3s var(--ease); }
  .handle:active i { background: var(--ink-2); width: 52px; }
  .masthead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 20px 12px; }
  /* 16px inputs stop iOS zooming the page on focus */
  .search input, .field select, .field textarea, .field input { font-size: 16px; }
  .chip { min-height: 40px !important; }
  .jumps button { min-height: 40px; }
  .close { width: 40px; height: 40px; }
  .link { padding: 12px 10px; }
  .list { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  .note { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .drawer-body { padding: 30px 22px calc(28px + env(safe-area-inset-bottom)); }
  .search { flex: none; }
  .brand { font-size: 28px; white-space: nowrap; }
  .tally { margin: 0; }
  .filters { display: flex; gap: 6px; overflow-x: auto; padding: 12px 16px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .chip { display: inline-flex; flex: none; gap: 8px; min-height: 34px; padding: 0 12px; border: 1px solid var(--hair); border-radius: 999px; white-space: nowrap; }
  .jumps { top: 12px; left: 12px; right: 0; padding-right: 12px; }
  .dock { left: 12px; bottom: 34px; }
  .hud, .hint, .card, .sortbar { display: none !important; }
  .stage::after { display: none; }
  .drawer {
    position: fixed;
    top: auto; left: 0; right: 0; bottom: 0;
    width: auto; max-width: none;
    height: 62dvh;
    background: rgba(20, 20, 21, .985);       /* solid: it sits over the directory list */
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    transform: translateY(105%);
    z-index: 5;
  }
  .drawer h2 { font-size: 34px; }
}
