/* One Spanish a Day joke manager: black mode, white text, the sheet's legend colors */
:root {
  --bg: #000; --card: #0f0f10; --card2: #17171a; --line: #2a2a2e; --text: #fff; --dim: #9a9aa2; --faint: #5c5c64;
  --c1: #ff6f91;  /* I don't like it (pink) */
  --c2: #ff9a1f;  /* Not great (orange) */
  --c3: #ffe03a;  /* Work in progress (yellow) */
  --cw: #2fe6ff;  /* Awaiting approval (cyan) */
  --c4: #b8ffb0;  /* Ready, open to improvement (pale green) */
  --c5: #22e05a;  /* Ready to go! (green) */
  --none: #3a3a40;
  --r: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

/* ---------- top bar + legend ---------- */
.top { position: sticky; top: 0; z-index: 10; background: rgba(0,0,0,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); padding: calc(env(safe-area-inset-top, 0px) + 10px) 16px 10px; }
.bar { display: flex; align-items: center; gap: 10px; max-width: 980px; margin: 0 auto; }
.brand { font-weight: 800; letter-spacing: -.02em; font-size: 18px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { color: var(--dim); font-weight: 600; font-size: 13px; margin-left: 6px; }
.who { color: var(--dim); font-size: 13px; }
.iconbtn { background: var(--card2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.legend { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 980px; margin: 10px auto 0; padding-bottom: 2px; }
.legend::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); font-size: 12.5px; color: var(--dim); white-space: nowrap; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; }
.chip.on { color: #000; font-weight: 700; border-color: transparent; }
.chip .n { opacity: .7; font-variant-numeric: tabular-nums; }

/* ---------- layout ---------- */
main { max-width: 980px; margin: 0 auto; padding: 14px 16px calc(90px + var(--safe-b)); }
.tabs { display: flex; gap: 6px; margin: 4px 0 14px; }
.tab { padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--dim); font-weight: 600; font-size: 14px; }
.tab.on { background: #fff; color: #000; border-color: #fff; }
.grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 700px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .grid { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- joke cards ---------- */
.card { position: relative; display: block; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 14px 12px 18px; overflow: hidden; }
.card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--stat, var(--none)); }
.card:active { transform: scale(.99); }
.card .w { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.card .wes { color: var(--dim); font-weight: 600; margin-left: 6px; font-size: 16px; }
.card .line { color: #d9d9de; font-size: 14px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .line.empty { color: var(--faint); font-style: italic; }
.segs { display: flex; gap: 4px; margin-top: 10px; }
.seg { flex: 1; height: 6px; border-radius: 3px; background: var(--none); }
.meta { display: flex; gap: 12px; margin-top: 8px; color: var(--dim); font-size: 12.5px; align-items: center; }
.meta .st { font-weight: 700; color: var(--stat, var(--dim)); }

/* ---------- joke page ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); text-decoration: none; font-weight: 600; margin-bottom: 10px; }
.hero { border-radius: var(--r); padding: 16px 16px 14px; background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--stat, var(--none)); }
.hero .words { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.hero input { background: transparent; border: none; border-bottom: 1px dashed transparent; padding: 2px 0; outline: none; min-width: 0; }
.hero input:focus { border-bottom-color: var(--dim); }
.hero .en { font-size: 30px; font-weight: 850; letter-spacing: -.02em; width: 100%; }
.hero .esin { font-size: 20px; font-weight: 650; color: var(--dim); width: 100%; }
.hero .status { margin-top: 8px; font-weight: 700; color: var(--stat, var(--dim)); font-size: 14px; }

.field { margin-top: 18px; }
.fhead { display: flex; align-items: center; gap: 8px; margin: 0 2px 8px; }
.fhead h3 { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); flex: 1; }
.fhead .st { font-size: 12px; font-weight: 700; color: var(--stat, var(--faint)); }

.opt { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 10px 14px; margin-bottom: 8px; }
.opt.chosen.multi { border-color: #fff; box-shadow: 0 0 0 1px #fff inset; }
.opt::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--stat, var(--none)); }
.orow { display: flex; gap: 10px; align-items: flex-start; }
.radio { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--faint); background: transparent; margin-top: 1px; position: relative; }
.opt.chosen .radio { border-color: #fff; }
.opt.chosen .radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #fff; }
.otext { flex: 1; white-space: pre-wrap; word-break: break-word; font-size: 16px; }
.omenu { flex: none; background: none; border: none; color: var(--faint); font-size: 20px; line-height: 1; padding: 0 2px; }
.ostat { display: flex; align-items: center; gap: 8px; margin: 8px 0 2px 34px; font-size: 12.5px; color: var(--dim); }
.ostat b { color: var(--stat, var(--dim)); }
.rates { margin: 8px 0 0 34px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.rrow { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rname { width: 74px; font-size: 13px; color: var(--dim); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rrow.mine .rname { color: #fff; }
.dots { display: flex; gap: 6px; }
.star { background: none; border: none; padding: 0 1px; font-size: 27px; line-height: 1; color: #2c2c31; }
.star.on { color: var(--c); text-shadow: 0 0 12px color-mix(in srgb, var(--c) 45%, transparent); }
.rrow:not(.mine) .star { font-size: 17px; pointer-events: none; }
.rrow.mine .star:active { transform: scale(1.2); }
.notes-toggle { background: none; border: none; color: var(--dim); font-size: 12.5px; font-weight: 600; padding: 0; }
.thread { margin: 10px 0 2px 34px; border-left: 2px solid var(--line); padding-left: 10px; }
.thread .cm { background: var(--card2); }
.hist { font-size: 12.5px; color: var(--dim); margin-bottom: 8px; }
.hist s { color: var(--faint); }
.sendrow { display: flex; gap: 8px; align-items: flex-end; }
.sendrow textarea { min-height: 42px; }
.rlabel { flex: 1; min-width: 0; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.addopt { display: flex; gap: 8px; }
textarea, .inp { width: 100%; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; outline: none; resize: vertical; }
textarea:focus, .inp:focus { border-color: #777; }
.btn { background: #fff; color: #000; border: none; border-radius: 12px; padding: 10px 16px; font-weight: 750; white-space: nowrap; }
.btn.ghost { background: var(--card2); color: #fff; border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .4; }
.linkbtn { background: none; border: 1px dashed var(--line); color: var(--dim); border-radius: 12px; padding: 10px; width: 100%; font-weight: 600; text-align: left; }
.edit { margin-top: 8px; display: grid; gap: 8px; }
.edit .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.warn { color: var(--c3); font-size: 12.5px; }

.comments { margin-top: 26px; }
.ctabs { display: flex; gap: 6px; margin-bottom: 10px; }
.cm { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.cm .by { font-size: 12.5px; color: var(--dim); display: flex; gap: 8px; align-items: center; }
.cm .by b { color: #fff; }
.cm .tx { white-space: pre-wrap; word-break: break-word; margin-top: 4px; }
.cm .del { margin-left: auto; background: none; border: none; color: var(--faint); font-size: 12.5px; }
.empty-note { color: var(--faint); font-style: italic; padding: 6px 2px 12px; }

.fab { position: fixed; right: 18px; bottom: calc(18px + var(--safe-b)); z-index: 20; background: #fff; color: #000; border: none; border-radius: 999px;
  padding: 14px 20px; font-weight: 800; box-shadow: 0 6px 24px rgba(255,255,255,.18); }

/* ---------- login / sheets ---------- */
.center { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.panel { width: 100%; max-width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 26px 22px; }
.panel h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.02em; }
.panel p { color: var(--dim); margin: 0 0 18px; }
.panel label { display: block; font-size: 13px; color: var(--dim); margin: 12px 0 6px; font-weight: 600; }
.panel .btn { width: 100%; margin-top: 18px; padding: 13px; font-size: 16px; }
.msg { margin-top: 12px; color: var(--c1); font-size: 14px; min-height: 1em; }
.stripe { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-bottom: 18px; }
.stripe i { flex: 1; }

.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.7); display: grid; place-items: end center; }
@media (min-width: 700px) { .overlay { place-items: center; } }
.sheet { width: 100%; max-width: 520px; background: var(--card); border: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + var(--safe-b)); }
@media (min-width: 700px) { .sheet { border-radius: 20px; } }
.sheet h2 { margin: 0 0 12px; font-size: 20px; }
.sheet .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.menu { display: grid; gap: 6px; }
.menu button { text-align: left; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-weight: 600; }
.menu button.danger { color: var(--c1); }

.toast { position: fixed; left: 50%; bottom: calc(84px + var(--safe-b)); transform: translateX(-50%); background: #fff; color: #000; padding: 10px 16px;
  border-radius: 999px; font-weight: 700; z-index: 60; font-size: 14px; box-shadow: 0 6px 24px rgba(0,0,0,.5); }
.sync { font-size: 12px; color: var(--faint); }
@media (max-width: 430px) { .rlabel { display: none; } }

/* Spanish translation attached under each English sentence (only David edits it) */
.es { margin: 8px 0 0 34px; padding: 8px 10px 8px 40px; border-radius: 10px; background: #0b1a24; border: 1px solid #16384a; position: relative; }
.es.can { cursor: pointer; }
.es .flag { position: absolute; left: 9px; top: 9px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; color: #000; background: var(--cw); border-radius: 5px; padding: 1px 5px; }
.estext { color: #cfefff; font-style: italic; white-space: pre-wrap; word-break: break-word; }
.estext.empty { color: var(--faint); }
.esby { font-size: 11.5px; color: #5d8aa0; margin-top: 3px; }
.es.edit { padding: 8px; display: grid; gap: 8px; }
.es.edit .row { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.card .es-line { color: #8fd8f0; font-style: italic; font-size: 13.5px; margin-top: 3px; -webkit-line-clamp: 1; }

/* suggested jokes + "wants your attention" */
.chip.torate { background: #fff; color: #000; font-weight: 800; border-color: #fff; }
.chip.torate.on { background: var(--cw); border-color: var(--cw); }
.card.wants { border-color: #fff; box-shadow: 0 0 0 1px #fff inset, 0 0 22px rgba(255,255,255,.12); }
.badge { position: absolute; right: 10px; top: 10px; background: #fff; color: #000; font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 999px; }
.badge.inline { position: static; }
.tag { margin-left: 8px; font-size: 11px; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; vertical-align: 3px; }
.sugs { margin-top: 16px; padding: 12px; border-radius: var(--r); border: 1px dashed var(--line); }
.sugs.wants { border: 1px solid #fff; background: #0c0c0e; }
.sugrule { font-size: 12.5px; color: var(--dim); margin: -2px 2px 10px; }
.sug { padding-left: 16px; }
.sug .es { margin-left: 0; }
.sugtext { font-size: 16px; white-space: pre-wrap; word-break: break-word; }
.sugtwist { margin-top: 8px; color: #e6e6ea; font-size: 14.5px; white-space: pre-wrap; }
.sugtwist b { color: var(--c3); }
.sug.dead { opacity: .45; }
.sugdone { color: var(--c5); font-weight: 700; font-size: 13.5px; margin: 4px 2px 8px; }

/* "＋ Add another option" stands out (David: it was invisible) */
.linkbtn.addbtn { border: 1.5px dashed color-mix(in srgb, var(--cw) 55%, transparent); background: color-mix(in srgb, var(--cw) 8%, transparent);
  color: var(--cw); font-weight: 700; text-align: center; padding: 12px; }
.linkbtn.addbtn:active { background: color-mix(in srgb, var(--cw) 18%, transparent); }

/* episode numbers + stages */
.epno { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 2px; }
.stagebar { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.seg3 { display: inline-flex; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.sbtn { background: none; border: none; color: var(--dim); font-weight: 700; font-size: 14px; padding: 7px 12px; border-radius: 9px; }
.sbtn.on.idea { background: #fff; color: #000; }
.sbtn.on.scheduled { background: #ffcf4a; color: #000; }
.sbtn.on.aired { background: #8b7bff; color: #000; }
.epedit { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: #ffcf4a; }
.epedit input { width: 72px; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; color: #fff; font-weight: 800; }
.lockbar { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #17143a; border: 1px solid #3b3380; color: #cfc8ff; font-size: 14px; }
main.locked .addbtn, main.locked .omenu, main.locked .opt .radio:not(.x) { pointer-events: none; }
main.locked .addbtn, main.locked .omenu { display: none; }
main.locked .otext, main.locked .es.can, main.locked .star { pointer-events: none; }
main.locked .rrow.mine .rlabel { visibility: hidden; }
.ghead { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); margin: 18px 2px 10px; display: flex; gap: 8px; align-items: center; }
.ghead .n { color: var(--faint); }
.ghead.scheduled { color: #ffcf4a; }
.ghead.aired { color: #a99dff; }
.num { font-weight: 900; margin-right: 8px; font-size: 15px; padding: 2px 7px; border-radius: 7px; vertical-align: 3px; }
.num.scheduled { background: #ffcf4a; color: #000; }
.num.aired { background: #8b7bff; color: #000; }
.card.aired { opacity: .72; }

.chip.pitched { border-color: #ffcf4a; color: #ffcf4a; font-weight: 700; }
.chip.pitched.on { background: #ffcf4a; color: #000; }
.badge.soft { background: #2a2410; color: #ffcf4a; border: 1px solid #5c4d1a; }

/* jokes with their own twists */
.twists { margin: 10px 0 2px 34px; padding: 8px 0 0 10px; border-left: 2px solid #3a3420; }
.twhead { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--c3); margin: 0 0 6px 2px; }
.opt.twist { background: #121210; padding: 10px 10px 8px 12px; }
.opt.twist .otext { font-size: 15px; }
.opt.twist .radio { width: 20px; height: 20px; }
.opt.twist .rates, .opt.twist .ostat, .opt.twist .thread { margin-left: 30px; }
.opt.twist .star { font-size: 23px; }
.linkbtn.addbtn.small { padding: 8px; font-size: 14px; }
.opt.needs { border-color: #fff; box-shadow: 0 0 0 1px #fff inset, 0 0 18px rgba(255,255,255,.12); }
.needtag { display: inline-block; background: #fff; color: #000; font-weight: 800; font-size: 11.5px; border-radius: 999px; padding: 2px 8px; margin: 0 0 8px; }
.opt.dead { opacity: .5; }
.thrownbtn { margin: 2px 2px 10px; color: var(--c1); }
.ghead.torate { color: #fff; }
.ghead.ready { color: var(--c5); }
.ghead.hot { color: var(--c4); }
.ghead.empty { color: var(--faint); }

.stagelbl { font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-right: 8px; }

/* v7 (David): no radio column; a "Currently selected" / "Option" tag on top, selected ones tinted and first, bigger bolder text */
.opt .radio { display: none; }
.ptags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.pick { font-size: 12px; font-weight: 800; border-radius: 999px; padding: 4px 10px; border: 1px solid var(--line); background: var(--card2); color: var(--dim); }
button.pick { cursor: pointer; }
button.pick:active { background: #fff; color: #000; }
.pick.on { background: #fff; color: #000; border-color: #fff; }
.pick.dead { color: var(--c1); border-color: #5a2432; }
.needtag { margin: 0; }
.opt.chosen { background: #15161d; border-color: #4a4f6a; }
.opt.chosen.multi { border-color: #fff; box-shadow: 0 0 0 1px #fff inset; }
.opt.twist.chosen { background: #1a1910; border-color: #5c5426; }
.otext { font-size: 18px; font-weight: 650; line-height: 1.4; color: #fff; }
.opt.twist .otext { font-size: 16.5px; font-weight: 600; }
.estext { font-size: 16px; }
.es, .rates, .ostat, .thread, .twists, .opt > div[style*="margin:8px 0 0 34px"] { margin-left: 0 !important; }
.opt.twist .rates, .opt.twist .ostat, .opt.twist .thread { margin-left: 0 !important; }
.twists { padding-left: 10px; }
.ptags .needtag { margin-left: auto; }   /* bell sits far right on the same row as Selected/Option (David) */
.ptags { flex-wrap: nowrap; }
.ptags .pick, .ptags .needtag { white-space: nowrap; }
.opt.twist .ptags .pick, .opt.twist .ptags .needtag { font-size: 11px; padding: 3px 8px; }
@media (max-width: 380px) { .ptags .needtag { font-size: 10.5px; padding: 2px 6px; } }

.pick.rank { font-size: 13px; font-weight: 900; padding: 3px 10px; }
.pick.rank.on { background: #fff; color: #000; }
.pick .rk { font-weight: 700; font-size: 11.5px; }
.pick.unranked { font-size: 12px; font-weight: 800; color: var(--faint); border-style: dashed; }

/* suggested vs ranked + feedback for Atlas */
.subhead { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); margin: 6px 2px 8px; }
.subhead.sug { color: #ffcf4a; }
.pick.unranked { color: #ffcf4a; border-color: #5c4d1a; }
.fbtoggle { margin-top: 6px; color: #a99dff; }
.fb { margin-top: 10px; padding: 10px; border-radius: 12px; background: #15122e; border: 1px solid #3b3380; }
.fbhead { font-size: 12.5px; font-weight: 800; color: #cfc8ff; margin-bottom: 8px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.fbhead span { font-weight: 500; color: #8f86d6; font-size: 12px; }
.fb .cm { background: #1d1940; border-color: #3b3380; }
.fb textarea { background: #0f0d22; border-color: #3b3380; }

/* Ask Atlas */
.ask { margin-top: 12px; }
.askbtn { width: 100%; padding: 11px; border-radius: 12px; border: 1.5px solid #6b5cff; background: #1b1640; color: #d6d0ff; font-weight: 800; font-size: 15px; }
.askbtn:active { background: #2a2366; }
.askbox textarea { background: #0f0d22; border-color: #3b3380; }
.askbox .row { align-items: center; }
.cnt { width: auto; padding: 8px 10px; margin-right: auto; }
.reqline { margin-top: 8px; font-size: 13px; color: #b9b2f0; background: #15122e; border: 1px solid #3b3380; border-radius: 10px; padding: 8px 10px; word-break: break-word; }
.reqline b { color: #fff; }
.reqline.done { color: #9fe6b0; background: #0f1f14; border-color: #22573a; }
.reqline .del { background: none; border: none; color: var(--faint); margin-left: 6px; }

/* ---------- v13 "no lines" (David 2026-11-27: "I really hate the lines. They're distracting.") ----------
   Blocks are told apart by fill, not outlines: page black, cards one step up, things inside a card one more step.
   Color still means status (left bars, dots, stars); white means "your turn" only on the small badges. */
:root { --card: #121215; --card2: #1c1c21; --card3: #26262c; }
.top { border-bottom: 0; background: rgba(0,0,0,.88); }
.iconbtn, .chip, .tab, .card, .card.wants, .hero, .opt, .opt.chosen, .opt.chosen.multi, .opt.twist.chosen, .opt.needs,
textarea, .inp, .btn.ghost, .linkbtn, .cm, .panel, .sheet, .menu button, .es, .tag, .sugs, .sugs.wants, .seg3,
.epedit input, .lockbar, .pick, .pick.dead, .pick.unranked, .fb, .fb .cm, .fb textarea, .askbox textarea,
.reqline, .reqline.done, .badge.soft, .chip.pitched, .chip.torate, .chip.torate.on { border: 0; }
.card.wants, .opt.needs, .opt.chosen.multi { box-shadow: none; }
.thread { border-left: 0; padding-left: 0; }
.twists { border-left: 0; background: rgba(255,255,255,.025); border-radius: 12px; padding: 10px; margin-top: 12px; }

/* fills */
.chip { background: var(--card2); }
.tab { background: var(--card2); }
.opt.twist { background: var(--card2); }
.opt.chosen { background: #16171f; }
.opt.twist.chosen { background: #1d1c14; }
.cm { background: var(--card2); }
textarea, .inp, .epedit input { background: var(--card2); }
.opt textarea, .opt .inp, .cm textarea { background: var(--card3); }
textarea:focus, .inp:focus, .epedit input:focus { background: var(--card3); box-shadow: 0 0 0 2px rgba(255,255,255,.14); }
.opt textarea:focus, .opt .inp:focus { background: #2e2e35; }
.linkbtn { background: var(--card2); }
.btn.ghost, .menu button, .seg3 { background: var(--card2); }
.pick { background: var(--card3); }
.pick.dead { background: #2a141a; }
.pick.unranked { background: #2a2410; }
.tag { background: var(--card2); }
.sugs { background: rgba(255,255,255,.02); }
.es { background: #0c1c27; }
.fb { background: #17132f; }
.fb .cm { background: #201b45; }
.fb textarea, .askbox textarea { background: #0f0d22; }
.askbtn { border: 0; background: #2a2266; color: #e2ddff; }
.lockbar { background: #1b1740; }
.reqline { background: #17132f; }
.reqline.done { background: #10241a; }
.linkbtn.addbtn { border: 0; background: color-mix(in srgb, var(--cw) 12%, transparent); }
.card::before, .opt::before { background: var(--bar, var(--stat, transparent)); }

/* ---------- v14 (David 2026-11-27): readable gray text, joke + payoff together, obvious Notes/Feedback buttons ---------- */
:root { --dim: #c2c2cb; --faint: #8e8e99; }
.sugrule, .sync, .ostat, .meta, .rlabel, .esby, .cm .by { color: var(--dim); }
.star { color: #3a3a42; }
/* the joke's #1 payoff sits right under the joke */
.peek { margin: 8px 0 2px; padding: 9px 12px; border-radius: 10px; background: #1f1c10; display: flex; gap: 10px; align-items: baseline; }
.peeklbl { flex: none; font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: #ffcf4a; }
.peektx { color: #fff3c4; font-weight: 650; font-size: 15.5px; line-height: 1.35; }
.peek.none .peektx { color: var(--faint); font-weight: 600; font-style: italic; }
/* Notes + Feedback for Atlas: closed by default, look like buttons */
.xrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.xbtn { display: inline-flex; align-items: center; gap: 7px; background: var(--card3); color: #fff; border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.xbtn:hover { background: #303038; }
.xbtn.on { background: #fff; color: #000; }
.xbtn.ai { background: #2a2266; color: #e2ddff; }
.xbtn.ai.on { background: #d6d0ff; color: #140f3a; }
.xbtn .chev { font-size: 12px; opacity: .8; }
.xbtn .xn { background: rgba(255,255,255,.16); border-radius: 999px; padding: 0 7px; font-size: 12.5px; }
.xbtn.on .xn { background: rgba(0,0,0,.12); }
.thread { margin: 10px 0 2px; }
.fb { margin-top: 10px; }
/* edit history: readable, underlined, never struck out */
.hist { background: var(--card2); border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; }
.hist .hby { font-size: 12.5px; color: var(--dim); margin-bottom: 3px; }
.hist .hold { color: #fff; text-decoration: underline; text-decoration-color: rgba(255,255,255,.35); text-underline-offset: 3px; }

/* ---------- v15 (David 2026-11-27): "contrast up in this bitch". Gray page, near-black boxes. ---------- */
:root { --bg: #2c2d34; --card: #0e0e11; --card2: #1b1b20; --card3: #26262c; }
.top { background: rgba(10,10,12,.94); }
.opt.chosen { background: #0f1018; }
.opt.twist.chosen { background: #1f1d12; }
.sugs { background: transparent; }
.back, .fhead h3, .sugrule, .subhead:not(.sug) { color: #e4e4ea; }
.seg { background: #2a2a31; }

/* ---------- v19 (David 2026-11-27): B's colored text + D's tight rows + A's star strip. Yellow boxes (v16/v17) dropped. ----------
   Colors carry meaning: joke = white, payoff = blue, Spanish = soft yellow (small, at the bottom). */
:root { --pay: #8fd0ff; --esy: #e6d38c; }
.ptags { justify-content: flex-end; }
.ptags .needtag { margin-left: 0; }
/* tight row */
.jrow { position: relative; background: var(--card); border-radius: 14px; padding: 10px 12px 10px 14px; margin-bottom: 8px; }
.jrow::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: var(--bar, transparent); }
.jrow.dead { opacity: .55; }
.jtop { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.jrk { font-size: 12px; font-weight: 900; padding: 2px 8px; border-radius: 7px; background: var(--card3); color: var(--dim); }
.jrk.one { background: #fff; color: #000; }
.jtop .needtag { margin-left: auto; }
.xmore, .xclose { margin-left: auto; background: var(--card3); color: #fff; border: 0; border-radius: 999px; padding: 5px 12px; font-weight: 800; font-size: 13px; }
.jtop .needtag + .xmore { margin-left: 0; }
.xclose { margin-left: 0; background: #fff; color: #000; }
.jl { color: #fff; font-size: 16.5px; font-weight: 650; line-height: 1.38; }
.jp { color: var(--pay); font-size: 15px; font-weight: 600; line-height: 1.38; margin-top: 5px; }
.jp.none { color: var(--faint); font-style: italic; font-weight: 500; }
.jes { color: var(--esy); font-size: 13px; font-style: italic; line-height: 1.35; margin-top: 6px; opacity: .9; }
.jrate { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 9px; padding-top: 8px; background: none; }
.jr { display: inline-flex; align-items: center; gap: 6px; }
.jrl { font-size: 12px; font-weight: 800; color: #fff; }
.jrl.pay { color: var(--pay); }
.dots.mini .star { font-size: 21px; padding: 0 1px; }
/* expanded joke: script grid, Spanish last */
.script { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 8px 10px; align-items: start; }
.slbl { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); padding-top: 5px; }
.slbl.pay { color: var(--pay); }
.slbl.es { color: var(--esy); }
.script .peek { background: none; padding: 0; margin: 0; display: block; }
.script .peek .peektx { color: var(--pay); font-size: 16px; font-weight: 600; }
.script .peek.none .peektx { color: var(--faint); font-style: italic; font-weight: 500; }
.script .es { background: none; padding: 0; margin: 0; }
.script .es .flag { display: none; }
.script .estext { color: var(--esy); font-size: 14.5px; }
.script .esby { color: var(--faint); font-size: 11px; }
.script .es.edit textarea { margin-top: 0; }
/* payoff cards: dark, blue text */
.opt.twist { background: var(--card2); }
.opt.twist.chosen { background: #161a22; }
.opt.twist .otext { color: var(--pay); }
.twhead { color: var(--pay); }

/* ---------- v20 (David 2026-11-27): brighter blue, bigger text, big centered Expand, payoff edits in place, History / Feedback / Notes ---------- */
:root { --pay: #a9dcff; }
.jl { font-size: 17.5px; }
.jp { font-size: 16px; }
.jes { font-size: 13.5px; }
@media (min-width: 700px) { .jl { font-size: 19px; } .jp { font-size: 17.5px; } .jes { font-size: 14.5px; } .jrl { font-size: 13px; } }
.jtop { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 8px; }
.jtl { justify-self: start; }
/* the big arrow toggles */
.bigtog { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 7px 16px 7px 12px; background: var(--card3); color: #fff; font-weight: 800; font-size: 14.5px; }
.bigtog .arr { font-size: 17px; line-height: 1; }
.bigtog:hover { background: #31313a; }
.bigtog.on { background: #fff; color: #000; }
.bigtog.mid { justify-self: center; padding: 8px 22px 8px 18px; font-size: 15px; }
.bigtog.mid .arr { font-size: 20px; }
.bigtog.pay { margin-top: 8px; background: #16314a; color: var(--pay); font-size: 13.5px; padding: 6px 14px 6px 10px; }
.bigtog.pay.on { background: var(--pay); color: #06223a; }
.bigtog.ai { background: #2a2266; color: #e2ddff; }
.bigtog.ai.on { background: #d6d0ff; color: #140f3a; }
.bigtog .xn { background: rgba(255,255,255,.16); border-radius: 999px; padding: 0 7px; font-size: 12.5px; }
.bigtog.on .xn { background: rgba(0,0,0,.12); }
/* expanded joke */
.jrow.open { padding-bottom: 14px; }
.script .otext.jl { color: #fff; }
.script .otext.jp { color: var(--pay); font-size: 16px; font-weight: 650; }
@media (min-width: 700px) { .script .otext.jl { font-size: 19px; } .script .otext.jp { font-size: 17.5px; } }
.otext { cursor: text; }
.otext .pencil { color: var(--faint); font-size: 13px; font-weight: 500; opacity: 0; }
.otext:hover .pencil { opacity: 1; }
.jrow.open .twists { margin: 12px 0 4px; }
.theirs { color: var(--dim); font-size: 12.5px; margin-top: 4px; white-space: pre-wrap; }
.notesbox { margin-top: 12px; background: var(--card2); border-radius: 12px; padding: 10px; }
.nlbl { font-size: 12.5px; font-weight: 800; color: var(--dim); margin-bottom: 8px; }
.notesbox .cm { background: var(--card3); }
.notesbox textarea { background: var(--card3); }
.xrow { margin-top: 12px; }

/* ---------- v21 (David 2026-11-27): foldable list sections, Fable review marker ---------- */
.ghead.fold { cursor: pointer; user-select: none; padding: 6px 4px; border-radius: 10px; }
.ghead.fold:hover { background: rgba(255,255,255,.04); }
.ghead .garr { font-size: 13px; width: 16px; color: #fff; }
.ghead.shut { opacity: .85; }
.jtl { display: inline-flex; gap: 6px; align-items: center; }
.fable { font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 7px; background: #3a1f5c; color: #e9d5ff; }
.edit .paybox { margin-top: 8px; color: var(--pay); }
.edit .paybox::placeholder { color: color-mix(in srgb, var(--pay) 55%, transparent); }
/* v24 (David 2026-11-28): tiny gap between a new joke and its payoff box, bigger gap between jokes */
.edit .paybox { margin-top: -5px; }
.jrow { margin-bottom: 16px; }
.field > .edit { margin-top: 0; }
.script .pmenu { grid-column: 1 / -1; }
.script .pmenu .twists { margin: 2px 0 4px; }
/* v26: the payoff menu arrow sits under the word Payoff */
.slblcol { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.arrbtn { width: 38px; height: 34px; border: 0; border-radius: 10px; background: #16314a; color: var(--pay); font-size: 18px; line-height: 1; display: grid; place-items: center; padding: 0; }
.arrbtn:hover { background: #1d3f5e; }
.arrbtn.on { background: var(--pay); color: #06223a; }
/* v27 (David 2026-11-28): Expand/Collapse and the payoff arrow a bit shorter and wider */
.bigtog.mid { padding: 4px 26px 4px 22px; font-size: 14px; }
.bigtog.mid .arr { font-size: 15px; }
.arrbtn { width: 46px; height: 24px; font-size: 13px; border-radius: 8px; }
/* v28: "Payoff ▼" is one button in the label column */
.script { grid-template-columns: 82px minmax(0, 1fr); }
.paybtn { justify-self: start; align-self: start; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 8px; padding: 4px 8px; margin-top: 1px;
  background: #16314a; color: var(--pay); font-size: 11.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.paybtn .parr { font-size: 11px; }
.paybtn:hover { background: #1d3f5e; }
.paybtn.on { background: var(--pay); color: #06223a; }
/* v29: ‹ › hints on the swipeable filter row */
.legwrap { position: relative; max-width: 980px; margin: 10px auto 0; }
.legwrap .legend { margin: 0; }
.legarr { position: absolute; top: 0; bottom: 2px; width: 46px; border: 0; padding: 0 4px; display: none; align-items: center; z-index: 2; color: #fff; font-size: 26px; font-weight: 900; line-height: 1; }
.legarr.r { right: 0; justify-content: flex-end; background: linear-gradient(to right, rgba(10,10,12,0), rgba(10,10,12,.96) 55%); }
.legarr.l { left: 0; justify-content: flex-start; background: linear-gradient(to left, rgba(10,10,12,0), rgba(10,10,12,.96) 55%); }
.legwrap.canr .legarr.r, .legwrap.canl .legarr.l { display: flex; }

/* ---------- v30 (David 2026-11-28): search in the top bar, OSAD on small screens, more contrast on chips / Log out / Status ---------- */
.brand { flex: none; cursor: pointer; }
.brand .short { display: none; }
@media (max-width: 640px) { .brand .full { display: none; } .brand .short { display: inline; } .who { display: none; } }
.search { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; max-width: 460px; margin-left: auto; }
.search input { width: 100%; background: #26262d; border: 0; border-radius: 999px; padding: 8px 32px 8px 32px; color: #fff; font-size: 15px; outline: none; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: #a5a5b0; }
.search input:focus { background: #303038; box-shadow: 0 0 0 2px rgba(255,255,255,.18); }
.search input::-webkit-search-cancel-button { display: none; }
.search .sicon { position: absolute; left: 11px; color: #c9c9d3; font-size: 17px; pointer-events: none; }
.search .sclear { position: absolute; right: 6px; background: #44444e; color: #fff; border: 0; border-radius: 999px; width: 22px; height: 22px; font-size: 11px; padding: 0; }
.iconbtn { background: #3d3d47; color: #fff; font-weight: 700; flex: none; }
.iconbtn:hover { background: #4a4a55; }
.who { color: #e0e0e8; flex: none; }
/* filter chips: each tinted with its own color so you can tell them apart */
.chip { background: color-mix(in srgb, var(--cc, #ffffff) 20%, #1e1e24); color: #f2f2f6; }
.chip .dot { width: 11px; height: 11px; }
.chip .n { opacity: .85; }
.chip.torate { background: #fff; color: #000; }
/* Status: each option looks like a button */
.seg3 { background: #1b1b20; gap: 4px; }
.sbtn { background: #2e2e36; color: #f2f2f6; }
.sbtn:hover { background: #3a3a43; }
/* v31: Suggested / Ranked groups inside an episode fold like the list sections */
.subhead.fold { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 6px; padding: 6px 4px; border-radius: 10px; margin: 10px 0 8px; }
.subhead.fold:hover { background: rgba(255,255,255,.05); }
.subhead .garr { font-size: 12px; width: 14px; color: #fff; }
.subhead.rk { color: #b8ffb0; }
