/* lhweb.css - ladyhacker.com
   Look: warm paper, plum ink, one magenta marker. The signature move is the marker
   swipe that strikes through whatever in a post gives you away.
   Fonts: Shrikhand (display), Atkinson Hyperlegible (reading), IBM Plex Mono (tags).
   ASCII only. */
@font-face { font-family: 'LH Display'; src: url(lhweb-shrikhand.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'LH Read'; src: url(lhweb-atkinson-400.woff2) format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'LH Read'; src: url(lhweb-atkinson-700.woff2) format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'LH Mono'; src: url(lhweb-plexmono-500.woff2) format('woff2'); font-display: swap; }

:root {
  color-scheme: light;
  --paper: #f7f1ea;
  --card: #fffaf4;
  --ink: #241a2c;
  --plum: #4b2253;
  --mag: #c8195f;
  --blush: #f6dbe5;
  --mint: #157a5b;
  --amber: #a85f00;
  --line: #e4d6ca;
  --soft: #6d5f72;
  --marker: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 40' preserveAspectRatio='none'%3E%3Cpath fill='%23c8195f' d='M3 9 C40 4 90 7 140 5 C165 4 185 6 197 8 C199 16 196 26 198 33 C160 37 110 34 60 36 C35 37 15 35 2 33 C4 25 1 17 3 9 Z'/%3E%3C/svg%3E");
  --r: 18px;
}
html { background: #f7f1ea; }
* { box-sizing: border-box; }
body { margin: 0; font: 400 18px/1.5 'LH Read', system-ui, sans-serif; color: var(--ink); background: var(--paper); -webkit-text-size-adjust: 100%; }
a { color: var(--plum); }
button { font: inherit; color: inherit; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 18px 40px; }
.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }

/* header */
.bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 6px; }
.mark { display: block; width: 168px; color: var(--plum); line-height: 0; }
.mark svg { width: 100%; height: auto; }
.gear { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; color: var(--plum); }
.gear svg { width: 26px; height: 26px; }
.gear:active { transform: rotate(40deg); }

/* type */
h1, h2, .disp { font-family: 'LH Display', Georgia, serif; font-weight: 400; color: var(--plum); line-height: 1.05; margin: 0; }
h1 { font-size: clamp(40px, 11vw, 64px); letter-spacing: -0.01em; }
h2 { font-size: clamp(30px, 7vw, 40px); }
.lede { font-size: 20px; margin: 12px 0 18px; max-width: 30em; }
.tag { font-family: 'LH Mono', ui-monospace, monospace; font-size: 14px; color: var(--soft); }
.fine { font-size: 15px; color: var(--soft); }

/* the marker (signature) */
.hit { padding: 1px 4px; margin: 0 -2px; border-radius: 4px; background-image: var(--marker); background-repeat: no-repeat; background-position: left center; background-size: 0% 92%; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-size .55s cubic-bezier(.6,.1,.3,1), color .3s .2s; }
.hit > span { color: inherit; }
.hit.on { background-size: 100% 92%; color: #fff; }
.hit.missed { outline: 2px dashed var(--amber); outline-offset: 2px; }
.note { display: block; margin-bottom: 8px !important; font-family: 'LH Display', Georgia, serif; color: var(--mag); font-size: 17px; line-height: 1.15; transform: rotate(-2deg); margin: 2px 0 0; opacity: 0; transition: opacity .4s .3s; }
.note.on { opacity: 1; }

/* hero */
.hero { padding: 12px 0 8px; }
.post { background: var(--card); border: 2px solid var(--line); border-radius: var(--r); padding: 16px 16px 12px; margin: 6px 0 18px; box-shadow: 0 10px 0 -4px var(--blush); }
.post-who { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.av { width: 38px; height: 38px; border-radius: 50%; background: var(--blush); color: var(--mag); display: grid; place-items: center; font-family: 'LH Display', Georgia, serif; font-size: 18px; }
.post-who b { font-size: 16px; }
.post-text { font-size: 20px; line-height: 1.6; margin: 0; }
.photo { display: block; font-size: 16px; color: var(--soft); background: #f1e7dd; border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; }
.photo::before { content: 'Photo: '; font-family: 'LH Mono', ui-monospace, monospace; font-size: 13px; color: var(--plum); }
.notes { margin-top: 8px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--plum); color: #fff; font-weight: 700; font-size: 19px; text-decoration: none; cursor: pointer; }
.btn.mag { background: var(--mag); }
.btn.ghost { background: transparent; color: var(--plum); border: 2px solid var(--plum); }
.btn.small { min-height: 46px; font-size: 16px; padding: 0 18px; }
.btn:active { transform: translateY(2px); }
.btn:focus-visible, .tile:focus-visible, .chip:focus-visible, .opt:focus-visible { outline: 3px solid var(--mag); outline-offset: 3px; }
.duo { display: grid; grid-template-columns: 1fr; gap: 12px; }
.duo .btn { width: 100%; }
@media (min-width: 560px) { .duo { grid-template-columns: 1fr 1fr; } }
.under { display: block; font-size: 15px; color: var(--soft); text-align: center; margin-top: 4px; }

/* sections */
section.block { padding: 34px 0 6px; border-top: 2px dashed var(--line); margin-top: 26px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.tile { display: flex; flex-direction: column; justify-content: space-between; min-height: 170px; padding: 16px; border-radius: var(--r); border: 2px solid var(--line); background: var(--card); text-align: left; cursor: pointer; }
.tile .disp { font-size: 27px; }
.tile p { margin: 6px 0 0; font-size: 16px; color: var(--soft); }
.tile .best { font-family: 'LH Mono', ui-monospace, monospace; font-size: 13px; color: var(--mag); }
.tile.leak .disp span { background: var(--marker) center / 100% 80% no-repeat; color: #fff; padding: 0 6px; }
.list { list-style: none; padding: 0; margin: 14px 0 0; counter-reset: n; }
.list li { counter-increment: n; position: relative; padding: 12px 0 12px 52px; border-bottom: 1px solid var(--line); }
.list li::before { content: counter(n); position: absolute; left: 0; top: 10px; width: 38px; height: 38px; border-radius: 50%; background: var(--blush); color: var(--mag); font-family: 'LH Display', Georgia, serif; font-size: 20px; display: grid; place-items: center; }
.list b { display: block; }
.list span { color: var(--soft); font-size: 16px; }
.list.dots li::before { content: ''; width: 14px; height: 14px; top: 20px; left: 12px; background: var(--mag); }
.why { font-size: 18px; max-width: 32em; }
footer { margin-top: 40px; padding-top: 18px; border-top: 2px dashed var(--line); display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
footer .mark { width: 110px; }
.linkish { background: none; border: 0; padding: 8px 0; color: var(--plum); text-decoration: underline; cursor: pointer; font-size: 16px; min-height: 44px; }

/* game panel */
.game { position: fixed; inset: 0; background: var(--paper); z-index: 20; overflow-y: auto; display: none; }
.game.on { display: block; }
.game .wrap { min-height: 100%; display: flex; flex-direction: column; padding-bottom: 24px; }
.g-top { display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.g-top .back { min-height: 52px; min-width: 52px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); cursor: pointer; font-size: 24px; color: var(--plum); }
.g-top .disp { flex: 1; font-size: 28px; }
.g-meta { font-family: 'LH Mono', ui-monospace, monospace; font-size: 14px; color: var(--soft); margin: 0 0 8px; }
.g-body { flex: 1; }
.g-foot { position: sticky; bottom: 0; padding: 12px 0 calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--paper) 30%); display: grid; gap: 10px; }
.g-foot .btn { width: 100%; }
.chip { display: inline-block; padding: 4px 2px; margin: 2px 0; border-radius: 6px; cursor: pointer; border: 0; background-color: transparent; font: inherit; line-height: 1.5; color: inherit; text-align: left; }
.chip.hit { padding: 4px 5px; }
.chip.nope { animation: nope .35s; }
@keyframes nope { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.whys { list-style: none; padding: 0; margin: 14px 0 0; }
.whys li { padding: 10px 12px; border-left: 5px solid var(--mag); background: var(--card); border-radius: 0 12px 12px 0; margin-bottom: 8px; font-size: 17px; }
.whys li.missed { border-left-color: var(--amber); }
.whys b { display: block; font-size: 15px; color: var(--plum); }
.q { font-size: 22px; line-height: 1.35; margin: 4px 0 16px; font-weight: 700; }
.opt { display: block; width: 100%; text-align: left; min-height: 60px; padding: 14px 18px; margin-bottom: 10px; border-radius: 16px; border: 2px solid var(--line); background: var(--card); cursor: pointer; font-size: 18px; }
.opt.right { border-color: var(--mint); background: #e4f3ec; }
.opt.yours { border-color: var(--amber); background: #fbefdc; }
.opt[disabled] { cursor: default; color: var(--ink); }
.explain { padding: 12px 14px; border-radius: 14px; background: var(--blush); font-size: 17px; }
.end { text-align: center; padding-top: 30px; }
.end .big { font-family: 'LH Display', Georgia, serif; font-size: 80px; color: var(--mag); line-height: 1; }
.dots-row { display: flex; gap: 6px; margin-bottom: 10px; }
.dots-row i { flex: 1; height: 6px; border-radius: 3px; background: var(--line); }
.dots-row i.done { background: var(--mag); }

/* sheets and dialogs */
.sheet-bg, .dlg-bg { position: fixed; inset: 0; background: rgba(36,26,44,.45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--paper); width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; border-radius: 22px 22px 0 0; padding: 14px 18px calc(22px + env(safe-area-inset-bottom)); }
.sheet-top { display: flex; align-items: center; justify-content: space-between; }
.sheet-top b { font-family: 'LH Display', Georgia, serif; font-weight: 400; font-size: 26px; color: var(--plum); }
.x { width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); font-size: 26px; cursor: pointer; }
.tabs { display: flex; gap: 6px; margin: 10px 0 14px; }
.tabs button { flex: 1; min-height: 46px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); cursor: pointer; font-weight: 700; font-size: 16px; }
.tabs button.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.pane h3 { margin: 16px 0 4px; font-size: 18px; color: var(--plum); }
.pane p, .pane li { font-size: 17px; }
.pane ol { padding-left: 22px; }
.sw { display: flex; align-items: center; justify-content: space-between; min-height: 62px; border-bottom: 1px solid var(--line); font-size: 19px; font-weight: 700; cursor: pointer; }
.sw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw i { width: 58px; height: 34px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; }
.sw i::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.sw input:checked + i { background: var(--mag); }
.sw input:checked + i::after { transform: translateX(24px); }
.sw input:focus-visible + i { outline: 3px solid var(--plum); outline-offset: 2px; }
.srcs { padding-left: 18px; }
.srcs li { margin-bottom: 10px; }
.srcs small { display: block; color: var(--soft); font-size: 14px; }
.dlg-bg { align-items: center; padding: 18px; }
.dlg { background: var(--paper); border-radius: 20px; padding: 20px; max-width: 420px; width: 100%; }
.dlg-body { font-size: 18px; }
.dlg-acts { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 16px; opacity: 0; pointer-events: none; transition: all .3s; z-index: 60; max-width: 90vw; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
