/* Other Eyes - sand and reef: a card picture reel, a red stereo viewer, iridescent windows for the senses we lack. */
:root {
  --bg: #f5efe3; --panel: #fffaf1; --ink: #1b2433; --muted: #5a6474; --line: #e1d5bf; --soft: #f0e7d6;
  --accent: #c43d22; --accent-ink: #ffffff; --teal: #136f6b;
  --disc: #efe2c6; --disc-edge: #c2a978; --hole: #f5efe3; --win-you: #ffffff; --win-ink: #1b2433;
  --new1: #6c4fe8; --gone: #2b313b; --sharper: #e99a22; --duller: #a6b1bd;
  --body: #b3302a; --body-edge: #7f1f1a; --lens: #fffdf8; --lens-ink: #1b2433;
  --alien-bg: #ece6ff; --alien-ink: #3f2aa6; --shifted-bg: #dcf2ef; --shifted-ink: #0c5753; --familiar-bg: #fdf0d8; --familiar-ink: #7a4a05;
  --warn-bg: #fdecea; --warn-ink: #8f2416; --info-bg: #eef3f8; --info-ink: #2a4562; --note-bg: #fff4dc;
  --shadow: 0 1px 2px rgba(27,36,51,.06), 0 6px 18px rgba(27,36,51,.06);
}
:root[data-theme="dark"] {
  --bg: #0f1622; --panel: #172131; --ink: #ecf0f5; --muted: #a9b4c3; --line: #2b384b; --soft: #1d2a3d;
  --accent: #ff7a59; --accent-ink: #1a0e09; --teal: #5fd0c8;
  --disc: #2c3647; --disc-edge: #4b5a72; --hole: #0f1622; --win-you: #e9edf2; --win-ink: #111821;
  --new1: #9d86ff; --gone: #05080d; --sharper: #f2b14a; --duller: #6f7d8c;
  --body: #8c2621; --body-edge: #5a1612; --lens: #1e2a3b; --lens-ink: #ecf0f5;
  --alien-bg: #2e2560; --alien-ink: #d9d0ff; --shifted-bg: #113f3c; --shifted-ink: #b9f0ea; --familiar-bg: #4a3410; --familiar-ink: #ffe3b0;
  --warn-bg: #4a1d17; --warn-ink: #ffc9bf; --info-bg: #1c2c40; --info-ink: #c9dcf2; --note-bg: #3a3020;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif; overflow-x: hidden; }
a { color: var(--teal); }
.hidden { display: none !important; }
.small { font-size: .88rem; } .muted { color: var(--muted); } .mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: .6rem; padding: .55rem 1rem; background: var(--panel); border-bottom: 1px solid var(--line); }
.back { text-decoration: none; color: var(--muted); font-size: .9rem; white-space: nowrap; }
.brand { display: flex; align-items: center; gap: .45rem; flex: 1; min-width: 0; }
.brand strong { font-size: 1.05rem; letter-spacing: .01em; white-space: nowrap; }
.logo { width: 28px; height: 28px; flex: none; }
.lg-disc { fill: var(--disc); stroke: var(--disc-edge); stroke-width: 1.5; }
.lg-w.a { fill: var(--win-you); stroke: var(--disc-edge); } .lg-w.b { fill: var(--new1); } .lg-w.c { fill: var(--sharper); }
.lg-hole { fill: var(--bg); stroke: var(--disc-edge); }
.session { display: flex; gap: .4rem; align-items: center; flex-wrap: nowrap; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 999px; padding: .38rem .85rem; font: inherit; font-size: .88rem; cursor: pointer; text-decoration: none; white-space: nowrap; }
.pill:hover:not(:disabled) { border-color: var(--teal); }
.pill.solid { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pill.solid:hover:not(:disabled) { filter: brightness(1.06); border-color: var(--accent); color: var(--accent-ink); }
.pill.ghost { background: transparent; cursor: default; }
.pill.big { font-size: 1rem; padding: .6rem 1.2rem; }
.pill.tiny { font-size: .8rem; padding: .22rem .65rem; }
.pill:disabled { opacity: .5; cursor: not-allowed; }
main { max-width: 1060px; margin: 0 auto; padding: 1rem 1rem 2rem; }
.hero { padding: 1.4rem 0 .6rem; }
.kicker { margin: 0 0 .8rem; padding: .55rem .8rem; border-left: 4px solid var(--new1); background: var(--panel); border-radius: 0 10px 10px 0; font-size: .9rem; color: var(--muted); }
h1 { margin: 0 0 .5rem; font-family: Georgia, "Iowan Old Style", serif; font-size: clamp(2rem, 6vw, 3.1rem); line-height: 1.08; letter-spacing: -.01em; }
.h1b { display: block; font-size: .5em; font-family: inherit; color: var(--teal); margin-top: .35rem; line-height: 1.25; }
.lede { max-width: 46rem; margin: 0 0 .9rem; }
.samples { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.chip { border: 1px dashed var(--disc-edge); background: transparent; color: var(--ink); border-radius: 999px; padding: .3rem .8rem; font: inherit; font-size: .86rem; cursor: pointer; }
.chip.on { background: var(--disc); border-style: solid; font-weight: 600; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.2rem; margin: 1rem 0; box-shadow: var(--shadow); }
.ph { display: flex; align-items: center; gap: .55rem; margin: 0 0 .8rem; font-size: 1.2rem; font-family: Georgia, serif; }
.step-no { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--disc); border: 2px solid var(--disc-edge); font-family: inherit; font-size: .9rem; font-weight: 700; flex: none; }
.lbl { display: block; font-size: .85rem; font-weight: 600; margin: .3rem 0 .3rem; }
textarea, select, input { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .7rem; }
textarea { resize: vertical; min-height: 9rem; }
textarea:focus, select:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1rem; }
.note { background: var(--note-bg); border-radius: 8px; padding: .4rem .6rem; }
.sense-card { margin-top: .7rem; padding: .7rem .8rem; border-radius: 12px; background: var(--soft); border: 1px solid var(--line); }
.sc-head { margin-bottom: .2rem; }
.sc-facts { margin: .2rem 0 .4rem; padding-left: 1.1rem; font-size: .9rem; }
.sc-facts li { margin: .15rem 0; }
.sense-card p, .card-tile p { margin: .25rem 0; }

/* --- The reel ---------------------------------------------------------------------------------------------------- */
.verdict-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.badge { display: inline-block; padding: .25rem .7rem; border-radius: 999px; font-size: .85rem; font-weight: 700; background: var(--soft); color: var(--ink); border: 1px solid var(--line); white-space: nowrap; }
.badge.v-alien { background: var(--alien-bg); color: var(--alien-ink); border-color: transparent; }
.badge.v-shifted { background: var(--shifted-bg); color: var(--shifted-ink); border-color: transparent; }
.badge.v-familiar { background: var(--familiar-bg); color: var(--familiar-ink); border-color: transparent; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-bottom: .8rem; }
.tile { background: var(--soft); border-radius: 10px; padding: .45rem .6rem; border-top: 4px solid var(--duller); }
.tile b { display: block; font-size: 1.35rem; line-height: 1.1; }
.tile.t-new { border-top-color: var(--new1); } .tile.t-gone { border-top-color: var(--gone); } .tile.t-sharper { border-top-color: var(--sharper); }
:root[data-theme="dark"] .tile.t-gone { border-top-color: #8a93a1; }
.reel-wrap { display: grid; grid-template-columns: minmax(240px, 340px) 1fr; gap: 1.2rem; align-items: center; }
.reel-host { width: 100%; max-width: 340px; margin: 0 auto; }
.reel { width: 100%; height: auto; display: block; }
.disc { transform-box: view-box; transform-origin: 160px 160px; transition: transform .6s cubic-bezier(.3,.8,.3,1); }
.disc-face { fill: var(--disc); stroke: var(--disc-edge); stroke-width: 3; }
.disc-ring { fill: none; stroke: var(--disc-edge); stroke-width: 1.2; stroke-dasharray: 3 4; }
.disc-notch { fill: var(--disc-edge); opacity: .55; }
.disc-hole { fill: var(--hole); stroke: var(--disc-edge); stroke-width: 3; }
.aim { stroke: var(--accent); stroke-width: 3; stroke-linecap: round; }
.win { cursor: pointer; }
.win-r { stroke: var(--disc-edge); stroke-width: 1.5; }
.w-you .win-r { fill: var(--win-you); }
.w-new .win-r { fill: url(#oeIri); }
.w-gone .win-r { fill: var(--gone); }
.w-sharper .win-r { fill: var(--sharper); }
.w-duller .win-r { fill: var(--duller); }
.w-blank .win-r { fill: none; stroke-dasharray: 3 3; opacity: .7; }
.w-blank { cursor: default; }
.win-x { stroke: #ffffff; stroke-width: 1.4; opacity: .35; }
.win-t { font: 700 13px/1 "Avenir Next", system-ui, sans-serif; fill: var(--win-ink); pointer-events: none; }
.w-new .win-t, .w-gone .win-t { fill: #ffffff; }
.win.on .win-r { stroke: var(--accent); stroke-width: 3.5; }
.win:focus { outline: none; } .win:focus-visible .win-r { stroke: var(--teal); stroke-width: 4; }
.view-col { min-width: 0; }
.viewer { display: grid; grid-template-columns: 1fr 14px 1fr; align-items: stretch; background: var(--body); border: 3px solid var(--body-edge); border-radius: 36px 36px 28px 28px; padding: 14px; box-shadow: inset 0 -6px 0 rgba(0,0,0,.18), var(--shadow); }
.bridge { align-self: center; height: 40%; background: var(--body-edge); border-radius: 6px; }
.lens { background: var(--lens); color: var(--lens-ink); border-radius: 46% / 40%; min-height: 200px; padding: 1.1rem 1rem; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: .35rem; box-shadow: inset 0 0 0 5px rgba(0,0,0,.18), inset 0 6px 14px rgba(0,0,0,.12); overflow: hidden; }
.lens-k { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.lens-h { font-size: .95rem; line-height: 1.3; }
.lens-t { margin: 0; font-size: .9rem; line-height: 1.4; }
.lens-it.sh-new { box-shadow: inset 0 0 0 5px var(--new1), inset 0 6px 14px rgba(0,0,0,.12); }
.lens-it.sh-gone { box-shadow: inset 0 0 0 5px var(--gone), inset 0 6px 14px rgba(0,0,0,.12); }
.lens-it.sh-sharper { box-shadow: inset 0 0 0 5px var(--sharper), inset 0 6px 14px rgba(0,0,0,.12); }
.lens-it.sh-duller { box-shadow: inset 0 0 0 5px var(--duller), inset 0 6px 14px rgba(0,0,0,.12); }
:root[data-theme="dark"] .lens-it.sh-gone { box-shadow: inset 0 0 0 5px #8a93a1, inset 0 6px 14px rgba(0,0,0,.3); }
.lens-why { margin: .6rem .2rem 0; color: var(--muted); }
.lever { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: .7rem; }
.shift-tag { display: inline-block; font-size: .74rem; font-weight: 700; padding: .14rem .55rem; border-radius: 999px; background: var(--soft); color: var(--ink); border: 1px solid var(--line); }
.shift-tag.sh-new { background: var(--alien-bg); color: var(--alien-ink); border-color: transparent; }
.shift-tag.sh-gone { background: #2b313b; color: #ffffff; border-color: transparent; }
.shift-tag.sh-sharper { background: var(--familiar-bg); color: var(--familiar-ink); border-color: transparent; }
.shift-tag.sh-duller { background: var(--info-bg); color: var(--info-ink); border-color: transparent; }
:root[data-theme="dark"] .shift-tag.sh-gone { background: #e3e7ec; color: #11161d; }
.legend { list-style: none; padding: 0; margin: .9rem 0 .3rem; display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .85rem; }
.key { display: inline-block; width: 14px; height: 11px; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; border: 1px solid var(--disc-edge); }
.k-new { background: linear-gradient(135deg, #7b5cff, #18b6a8, #c6e44b); } .k-gone { background: var(--gone); } .k-sharper { background: var(--sharper); } .k-duller { background: var(--duller); }

/* --- Run, result, saved ------------------------------------------------------------------------------------------ */
.cardrow, .exports, .runrow { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .7rem; }
.gate { background: var(--note-bg); border-radius: 8px; padding: .55rem .75rem; }
.steps { list-style: none; padding: 0; margin: .3rem 0; }
.step { padding: .15rem 0; color: var(--muted); }
.step.active { color: var(--ink); font-weight: 600; }
.step.done { color: var(--teal); }
.step-ic { display: inline-block; width: 1.1rem; font-family: ui-monospace, Menlo, monospace; }
.raw { white-space: pre-wrap; overflow-wrap: anywhere; font: .8rem/1.45 ui-monospace, Menlo, monospace; background: var(--bg); padding: .7rem; border-radius: 8px; max-height: 360px; overflow: auto; }
.res-head { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; }
.res-head h2 { margin: 0; font-size: 1.4rem; font-family: Georgia, serif; overflow-wrap: anywhere; }
.result h3 { margin: 1.1rem 0 .4rem; font-size: 1rem; }
.big-idea { font-size: 1.12rem; font-family: Georgia, serif; margin: .7rem 0 .3rem; }
.picture { background: var(--soft); border-radius: 12px; padding: .2rem .9rem .6rem; border-left: 4px solid var(--new1); }
.picture p { margin: .2rem 0; }
.pairs { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.prow { border: 1px solid var(--line); border-left: 6px solid var(--duller); border-radius: 10px; padding: .55rem .75rem; background: var(--panel); }
.prow.sh-new { border-left-color: var(--new1); } .prow.sh-gone { border-left-color: var(--gone); } .prow.sh-sharper { border-left-color: var(--sharper); }
:root[data-theme="dark"] .prow.sh-gone { border-left-color: #8a93a1; }
.phead { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.pno { font-weight: 700; color: var(--muted); }
.pthing { font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.pboth { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem 1rem; }
.pboth p, .prow > p { margin: .3rem 0 0; }
.tryit, .unsure { background: var(--soft); border-radius: 12px; padding: .1rem .9rem .6rem; }
.tryit p, .unsure p { margin: .2rem 0; }
.none { color: var(--muted); font-style: italic; }
.recon { padding-left: 1.2rem; }
.recon li { padding: .15rem 0; }
.recon li.warn { color: var(--warn-ink); background: var(--warn-bg); border-radius: 6px; padding: .2rem .45rem; margin: .15rem 0; list-style-position: inside; }
.recon li.info { color: var(--info-ink); }
.saved { list-style: none; padding: 0; margin: .7rem 0 0; }
.hrow { display: flex; gap: .7rem; align-items: center; padding: .5rem 0; border-top: 1px solid var(--line); }
.hinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.hinfo b { overflow-wrap: anywhere; }
.hbtns { display: flex; gap: .3rem; }
.mini { width: 34px; height: 34px; flex: none; }
.mini-face { fill: var(--disc); stroke: var(--disc-edge); stroke-width: 1.5; }
.mini-w { fill: var(--duller); }
.mini.v-alien .mini-w { fill: var(--new1); } .mini.v-shifted .mini-w { fill: var(--teal); } .mini.v-familiar .mini-w { fill: var(--sharper); }
.mini-hole { fill: var(--panel); stroke: var(--disc-edge); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.card-tile { background: var(--soft); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem; display: flex; flex-direction: column; gap: .2rem; }
.card-tile .pill { align-self: flex-start; margin-top: .3rem; }
.foot { max-width: 1060px; margin: 0 auto; padding: 1rem 1rem 2.5rem; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .4rem; z-index: 50; max-width: min(92vw, 380px); }
.toast { background: var(--ink); color: var(--bg); padding: .55rem .8rem; border-radius: 8px; font-size: .875rem; box-shadow: var(--shadow); transition: opacity .5s; }
.toast.err { background: var(--accent); color: var(--accent-ink); }
.toast a { color: inherit; font-weight: 700; }
.toast.gone { opacity: 0; }

@media (max-width: 860px) {
  .reel-wrap { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .two, .pboth { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .panel { padding: .9rem .85rem; }
  .back-t { display: none; }
  .bar { padding: .5rem .75rem; gap: .4rem; }
  .brand strong { font-size: .98rem; }
  .session .pill { padding: .32rem .62rem; font-size: .82rem; }
  .viewer { padding: 10px; grid-template-columns: 1fr 8px 1fr; border-radius: 28px 28px 22px 22px; }
  .lens { min-height: 190px; padding: .9rem .6rem; border-radius: 44% / 34%; }
  .lens-t { font-size: .84rem; }
  .lever .pill { padding: .35rem .7rem; }
}
@media (prefers-reduced-motion: reduce) { .disc { transition: none; } }
@media (max-width: 640px) {
  .viewer { grid-template-columns: 1fr; gap: 10px; border-radius: 30px; }
  .bridge { display: none; }
  .lens { min-height: 0; border-radius: 48% / 42%; padding: 1.3rem 2.2rem; }
  .pboth { grid-template-columns: 1fr; }
}
.pboth > :only-child { grid-column: 1 / -1; }
