:root {
  --ink: #eee9df;
  --paper: #090c12;
  --acid: #ba8b65;
  --coral: #842c4a;
  --navy: #101b2d;
  --line: rgba(238, 233, 223, .18);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--paper); }
body {
  min-height: 100vh; margin: 0; color: var(--ink); background:
  radial-gradient(circle at 85% 10%, rgba(132,44,74,.24), transparent 28%),
  radial-gradient(circle at 10% 85%, rgba(16,27,45,.8), transparent 36%),
  linear-gradient(rgba(238,233,223,.025) 1px, transparent 1px),
  linear-gradient(90deg, rgba(238,233,223,.025) 1px, transparent 1px),
  var(--paper);
  background-size: auto, 28px 28px, 28px 28px, auto;
  font-family: "Manrope", sans-serif;
}
main { width: min(100%, 760px); min-height: 100vh; margin: 0 auto; padding: 28px 24px 48px; display: flex; flex-direction: column; }
header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.brand { color: inherit; text-decoration: none; font-weight: 700; letter-spacing: -.03em; display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid var(--ink); border-radius: 50%; font: 500 11px "DM Mono"; }
.edition, .eyebrow, .quest-type, .quest-topline, .rule span, .fine, label, .character-count, .result-head, .result-type, .result-footer, .log-button, .log-date {
  font-family: "DM Mono", monospace; letter-spacing: .08em; text-transform: uppercase;
}
.edition { font-size: 10px; }
.log-button { border: 0; background: transparent; color: var(--ink); font-size: 10px; padding: 10px 0; cursor: pointer; }
.hero, .accepted-screen, .reflection-screen, .complete-screen { margin: auto 0; padding: 70px 0 50px; }
.eyebrow { font-size: 11px; margin: 0 0 26px; }
h1 { font-size: clamp(60px, 13vw, 104px); line-height: .83; letter-spacing: -.075em; margin: 0; font-weight: 600; }
h1 em { color: #b84c70; font-style: normal; }
.lede { font-size: clamp(18px, 3vw, 23px); line-height: 1.5; margin: 42px 0 34px; }
button { font: inherit; cursor: pointer; }
.primary { border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); min-height: 58px; padding: 0 24px; border-radius: 2px; font-weight: 700; display: inline-flex; align-items: center; justify-content: space-between; gap: 36px; box-shadow: 5px 5px 0 var(--coral); transition: transform .15s, box-shadow .15s; }
.primary:hover { transform: translate(2px,2px); box-shadow: 3px 3px 0 var(--coral); }
.secondary { min-height: 58px; padding: 0 24px; color: var(--ink); background: transparent; border: 1.5px solid rgba(238,233,223,.45); font-weight: 700; }
.primary:focus-visible, .text-button:focus-visible, textarea:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; }
.wide { width: 100%; }
.fine { font-size: 9px; margin-top: 22px; line-height: 1.6; opacity: .65; }
.center { text-align: center; }
.hidden { display: none !important; }
.quest-screen { margin: auto 0; padding: 38px 0; }
.quest-topline { display: flex; justify-content: space-between; align-items: center; font-size: 10px; margin-bottom: 12px; }
.text-button { border: 0; background: transparent; color: inherit; padding: 8px 0; font: 500 10px "DM Mono"; text-transform: uppercase; }
.quest-card { background: linear-gradient(145deg, #121f34, #0d1626); border: 1.5px solid rgba(238,233,223,.55); padding: clamp(28px, 7vw, 58px); min-height: 420px; display: flex; flex-direction: column; justify-content: center; margin-bottom: 18px; position: relative; overflow: hidden; box-shadow: inset 0 0 80px rgba(132,44,74,.08); }
.quest-card::after { content: "↗"; position: absolute; right: -20px; bottom: -58px; font-size: 170px; opacity: .07; }
.quest-type { font-size: 11px; margin: 0 0 22px; }
.quest-card h2, .accepted-screen h2, .reflection-screen h2 { font-size: clamp(38px, 8vw, 66px); line-height: .98; letter-spacing: -.055em; margin: 0; }
.quest-detail { font-size: 17px; line-height: 1.55; max-width: 520px; margin: 26px 0 38px; }
.rule { border-top: 1px solid var(--ink); padding-top: 16px; display: grid; grid-template-columns: 110px 1fr; gap: 18px; }
.rule span { font-size: 9px; padding-top: 4px; }
.rule p { margin: 0; line-height: 1.45; font-size: 14px; }
.accepted-screen, .reflection-screen, .complete-screen { text-align: center; }
.seal { margin: 0 auto 26px; width: 82px; height: 82px; border: 1.5px solid var(--ink); background: var(--coral); border-radius: 50%; display: grid; place-items: center; font-size: 35px; }
.accepted-copy { font-size: 18px; line-height: 1.6; margin: 28px auto 34px; }
.active-quest { width: min(100%, 560px); margin: 30px auto 0; padding: 22px; border: 1px solid var(--line); background: rgba(16,27,45,.65); text-align: left; }
.active-quest span { display: block; margin-bottom: 10px; color: #c28a9e; font: 500 9px "DM Mono"; letter-spacing: .08em; }
.active-quest strong { display: block; font-size: 20px; line-height: 1.25; }
.active-quest p { margin: 10px 0 0; color: rgba(238,233,223,.64); font-size: 13px; line-height: 1.5; }
.reflection-screen { text-align: left; }
.reflection-screen label { display: block; font-size: 10px; margin: 36px 0 10px; }
textarea { width: 100%; min-height: 170px; resize: vertical; border: 1.5px solid rgba(238,233,223,.55); border-radius: 0; background: var(--navy); padding: 20px; color: var(--ink); font: 18px/1.5 "Manrope"; }
textarea::placeholder { color: rgba(238,233,223,.42); }
.character-count { text-align: right; font-size: 9px; margin: 7px 0 18px; }
.result-card { background: linear-gradient(145deg, #72243f, #45172a); border: 1.5px solid var(--ink); padding: 26px; text-align: left; margin: 20px 0 28px; box-shadow: 8px 8px 0 #111c30; }
.result-head { display: flex; justify-content: space-between; font-size: 9px; border-bottom: 1px solid var(--ink); padding-bottom: 14px; }
.result-type { font-size: 10px; margin: 32px 0 12px; }
.result-card h2 { font-size: clamp(30px, 7vw, 52px); line-height: 1; letter-spacing: -.05em; margin: 0; }
blockquote { margin: 32px 0 40px; padding-left: 17px; border-left: 2px solid var(--ink); font-size: 17px; line-height: 1.5; }
.result-footer { font-size: 8px; border-top: 1px solid var(--ink); padding-top: 14px; }
.completion-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.log-screen { padding: 48px 0; }
.log-heading { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 28px; }
.log-heading h2 { font-size: clamp(50px, 10vw, 82px); line-height: .9; letter-spacing: -.065em; margin: 0; }
.log-heading .eyebrow { margin-bottom: 18px; }
.log-intro { color: rgba(238,233,223,.62); font-size: 14px; margin: 22px 0 34px; }
.log-list { display: grid; gap: 12px; }
.log-entry { border: 1px solid var(--line); background: rgba(16,27,45,.58); padding: 22px; }
.log-entry-head { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.log-entry-meta { display: flex; align-items: center; gap: 14px; }
.log-entry-type { font: 500 9px "DM Mono"; letter-spacing: .08em; color: #c28a9e; }
.log-date { font-size: 8px; opacity: .5; }
.remove-entry { border: 0; background: transparent; color: rgba(238,233,223,.48); padding: 2px 0 2px 8px; font: 500 9px "DM Mono"; letter-spacing: .06em; text-transform: uppercase; }
.remove-entry:hover { color: #d986a2; }
.remove-entry:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }
.log-entry h3 { font-size: 20px; line-height: 1.2; letter-spacing: -.03em; margin: 0 0 14px; }
.log-entry p { margin: 0; padding-left: 12px; border-left: 2px solid var(--coral); color: rgba(238,233,223,.74); font-size: 14px; line-height: 1.5; }
.empty-log { border: 1px dashed var(--line); padding: 38px 24px; text-align: center; color: rgba(238,233,223,.55); }
@media (max-width: 520px) {
  main { padding: 20px 18px 36px; }
  .hero { padding-top: 56px; }
  .rule { grid-template-columns: 1fr; gap: 5px; }
  .quest-card { min-height: 390px; }
  .completion-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
