@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&display=swap');

:root { color-scheme: light; --bg:#f5f1e8; --paper:#fffdf7; --ink:#352b42; --muted:#746c7d; --line:#ded8cd; --coral:#ef9d89; --lavender:#c9b9df; --soft-coral:#f8e4dc; --soft-lavender:#eae3f3; }
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--ink); font:15px/1.5 'DM Sans',sans-serif; }
button,a { -webkit-tap-highlight-color:transparent; }
button { font:inherit; color:inherit; cursor:pointer; border:0; background:none; touch-action:manipulation; }
button:disabled { opacity:.35; cursor:default; }
button:focus-visible,a:focus-visible { outline:3px solid #74529d; outline-offset:4px; }
button:active:not(:disabled) { translate:0 1px; }
[hidden] { display:none !important; }
.symbols { position:absolute; width:0; height:0; overflow:hidden; }
svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.masthead { max-width:1140px; margin:0 auto; padding:26px 38px; display:flex; justify-content:space-between; align-items:center; }
.wordmark { font:700 29px/.95 'Fraunces',Georgia,serif; text-decoration:none; color:var(--ink); display:flex; align-items:center; gap:3px; letter-spacing:-1.5px; }
.wordmark-flip { display:inline-block; transform:rotate(180deg); }
.brand-dot { color:#b9634e; font-size:36px; margin-left:2px; }
.text-button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:44px; padding:6px; font-size:13px; }
.help-mark { width:22px; height:22px; border:1px solid #afa6b3; border-radius:50%; line-height:20px; font-size:12px; }
main { width:min(100% - 32px, 460px); margin:0 auto; }
.intro { text-align:center; margin:14px 0 28px; }
.eyebrow { font-size:10px; font-weight:700; letter-spacing:2.1px; color:var(--muted); }
h1,h2 { font-family:'Fraunces',Georgia,serif; font-weight:500; letter-spacing:-1.6px; }
h1 { font-size:44px; line-height:1.07; margin:13px 0 10px; }
.intro p { margin:0; color:var(--muted); font-size:14px; }
.round-row { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:38px; }
#round-label { font-size:10px; letter-spacing:1.2px; color:var(--muted); }
.round-row .text-button { font-size:12px; }
#progress { display:flex; gap:0; }
#progress button { width:22px; min-height:36px; padding:7px; }
#progress button::before { content:''; display:block; width:7px; height:7px; border-radius:50%; background:#d5ced7; }
#progress button[aria-current=true]::before { background:var(--ink); }
#progress button.completed::before { background:#7b9874; }
.targets { display:grid; grid-template-columns:1fr 22px 1fr; align-items:center; margin:5px 0 17px; gap:4px; }
.target { display:flex; position:relative; align-items:center; text-align:left; gap:11px; border:1px solid transparent; border-radius:16px; padding:12px; min-height:82px; opacity:.65; }
.target.active { opacity:1; background:var(--soft-coral); border-color:#e4b7a9; }
.target.lavender.active { background:var(--soft-lavender); border-color:#c7b6db; }
.target-copy { display:grid; gap:1px; }
.target small { font-size:8px; letter-spacing:1.1px; font-weight:700; color:var(--muted); }
.target strong { font-family:'Fraunces',Georgia,serif; font-size:25px; font-weight:500; letter-spacing:-.6px; }
.between { color:#9d92a1; text-align:center; font:italic 24px Georgia,serif; }
.buddy { position:relative; flex-shrink:0; display:flex; justify-content:center; gap:9px; align-items:center; width:43px; height:43px; background:var(--coral); border-radius:48% 48% 40% 40%; transform:rotate(-7deg); }
.lavender-buddy { background:var(--lavender); border-radius:40% 45% 48% 48%; transform:rotate(9deg); }
.buddy i { width:3px; height:6px; border-radius:50%; background:var(--ink); margin-top:-4px; }
.buddy b { position:absolute; top:25px; left:17px; width:9px; height:5px; border:1.5px solid var(--ink); border-top:0; border-radius:0 0 8px 8px; }
.target-check { display:none; position:absolute; right:7px; top:6px; font-size:12px; }
.target.solved .target-check { display:block; }
.paper-wrap { padding:4px; }
.paper { position:relative; aspect-ratio:1; background:var(--paper); border:1px solid #d5cfc4; border-radius:7px; box-shadow:0 4px 0 #e8e2d8,0 5px 0 #d6cfc4,0 12px 28px -20px #59465866; transform:rotate(0deg); transition:transform 480ms cubic-bezier(.4,0,.2,1); }
.paper::before { content:''; position:absolute; inset:0; pointer-events:none; background-image:radial-gradient(#9e92a026 .7px,transparent .7px); background-size:20px 20px; border-radius:7px; }
#drawing { width:100%; height:100%; display:block; position:relative; z-index:1; cursor:crosshair; touch-action:none; border-radius:7px; }
#drawing.erasing { cursor:cell; }
.paper-wrap.turning #drawing { pointer-events:none; }
.paper-prompt { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; color:#a69bab; pointer-events:none; font-size:14px; }
.little-spark { font:42px Georgia,serif; color:#c2b0d6; }
.paper-prompt svg { width:78px; height:49px; margin-left:58px; stroke:#b7aabe; stroke-width:1.3; }
.paper-corner { position:absolute; right:12px; bottom:8px; font-size:18px; color:#cec3d4; pointer-events:none; }
.view-row { display:flex; justify-content:space-between; align-items:center; margin-top:12px; gap:8px; }
#view-label { font-size:12px; color:var(--muted); }
.flip-button { display:flex; align-items:center; justify-content:center; gap:8px; min-height:44px; border-radius:24px; padding:7px 16px; background:var(--soft-lavender); font-size:13px; font-weight:600; }
.tools { display:flex; align-items:center; gap:3px; margin:13px 0 17px; }
.tool { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; min-width:52px; height:56px; border-radius:12px; font-size:10px; }
.tool svg { width:20px; height:20px; }
.tool.selected { background:#e7e0d7; }
.tool-divider { width:1px; height:29px; background:var(--line); margin:0 6px; }
.hint-button { margin-left:auto; color:var(--muted); min-height:44px; font-size:12px; padding:6px; text-decoration:underline; text-underline-offset:4px; text-decoration-color:#b9adb9; }
.hint-text { border-left:2px solid var(--lavender); padding-left:12px; font-size:13px; margin:0 0 16px; color:var(--muted); }
.primary { display:flex; align-items:center; justify-content:center; gap:14px; width:100%; min-height:54px; border-radius:14px; background:var(--ink); color:var(--paper); font-size:15px; font-weight:500; padding:12px 20px; }
.primary:disabled { opacity:1; background:#e5ded5; color:#a198a3; }
.message { font-size:13px; text-align:center; margin:9px 0 0; color:#89513c; }
.message:empty { display:none; }
.mode-note { text-align:center; font-size:11px; color:var(--muted); margin:12px 0 0; }
footer { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:10px; color:#89808d; font-size:11px; padding:25px 16px max(23px,env(safe-area-inset-bottom)); }
.footer-flip { font-size:23px; }
dialog { color:var(--ink); border:1px solid #d8cfc0; border-radius:23px; padding:0; width:min(680px,calc(100% - 24px)); max-height:calc(100dvh - 24px); background:var(--bg); box-shadow:0 18px 90px #352b4233; }
dialog::backdrop { background:#352b4266; backdrop-filter:blur(5px); }
.reveal-content,.help-content { padding:36px 26px 22px; position:relative; text-align:center; }
.close-button { position:absolute; top:7px; right:10px; width:44px; height:44px; font-size:28px; color:var(--muted); }
h2 { font-size:36px; line-height:1.15; margin:11px 0; }
.reveal-sub { font-size:13px; color:var(--muted); margin:0 0 22px; }
.reveal-pair { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
figure { margin:0; padding:8px 8px 13px; border-radius:10px; background:var(--soft-coral); transform:rotate(-2deg); }
figure.lavender { background:var(--soft-lavender); transform:rotate(2deg); }
figure canvas { width:100%; height:auto; display:block; background:var(--paper); border-radius:5px; }
figcaption { display:grid; gap:2px; margin-top:9px; }
figcaption strong { font:500 25px 'Fraunces',Georgia,serif; }
figcaption span { font-size:12px; color:var(--muted); min-height:18px; }
.review-note { font-size:12px; color:var(--muted); margin:23px 0 12px; }
.self-votes { display:flex; gap:10px; margin:0 0 17px; }
.self-votes button { flex:1; min-height:46px; font-size:13px; border:1px solid #bcb1c4; border-radius:12px; }
.self-votes button[aria-pressed=true] { background:var(--ink); color:var(--paper); border-color:var(--ink); }
.reveal-actions { display:flex; justify-content:center; gap:28px; margin-top:10px; }
.reveal-actions svg { width:17px; height:17px; }
#help { max-width:430px; }
.help-flip { display:block; font-size:48px; line-height:1; color:#8a6da5; }
.help-content h2 { font-size:29px; }
.help-content ol { text-align:left; padding-left:23px; font-size:14px; }
.help-content li { margin:14px 0; padding-left:5px; }
#help-mode,.keyboard-note { font-size:12px; color:var(--muted); }
.keyboard-note { margin:18px 0; }
.project-links { display:flex; justify-content:center; flex-wrap:wrap; gap:8px 18px; margin-top:12px; }
.project-links a { display:inline-flex; align-items:center; min-height:44px; color:var(--muted); font-size:12px; text-underline-offset:3px; }
.build-label { margin:0; color:var(--muted); font-size:10px; }
@media(hover:hover) {
  .text-button:hover,.hint-button:hover { color:#8a4f70; }
  .tool:hover:not(:disabled) { background:#e7e0d7; }
  .flip-button:hover { background:#dcd0eb; }
  .primary:hover:not(:disabled) { background:#51405e; }
  .target:hover { opacity:1; }
}
@media(min-width:900px) {
  .masthead { padding-top:12px; padding-bottom:12px; }
  main { width:min(100% - 80px,850px); display:grid; grid-template-columns:1fr clamp(300px,calc(100dvh - 420px),420px); gap:60px; padding-bottom:24px; }
  .intro { text-align:left; align-self:center; margin:0 0 100px; }
  h1 { font-size:48px; }
  .intro p { line-height:1.8; }
  .target { min-height:66px; padding:8px; gap:8px; }
  .targets { margin:1px 0 10px; }
  .target strong { font-size:23px; }
  .buddy { width:35px; height:35px; }
  .buddy b { left:13px; top:21px; }
  .tools { margin:8px 0 12px; }
  .tool { min-width:45px; height:50px; }
  .primary { min-height:50px; }
}
@media(max-width:520px) {
  .masthead { padding:16px 21px 10px; }
  .wordmark { font-size:25px; }
  .masthead .text-button { font-size:12px; }
  main { width:calc(100% - 34px); max-width:410px; }
  .intro { margin:7px 0 14px; }
  .intro .eyebrow { font-size:8px; letter-spacing:1.5px; }
  h1 { font-size:34px; margin:9px 0 8px; }
  .intro p { font-size:12px; }
  .target { padding:9px; gap:8px; min-height:66px; }
  .target strong { font-size:23px; }
  .target small { font-size:7px; letter-spacing:.8px; }
  .buddy { width:35px; height:35px; gap:8px; }
  .buddy b { left:13px; top:21px; }
  .targets { margin:1px 0 10px; }
  .tools { margin:8px 0 12px; }
  .tool { min-width:45px; height:50px; }
  .hint-button { font-size:11px; }
  .tool-divider { margin:0 3px; }
  .primary { min-height:50px; }
  footer { padding-top:18px; gap:7px; font-size:10px; }
  .reveal-content { padding:36px 16px 17px; }
  h2 { font-size:29px; }
  .reveal-pair { gap:10px; }
  figure { padding:6px 6px 10px; }
  figcaption strong { font-size:23px; }
}
@media(max-width:360px) { .buddy { display:none; } .target { justify-content:center; } .tool { min-width:41px; } }
@media(max-height:740px) and (min-width:521px) and (max-width:899px) { .intro h1 { font-size:32px; } .intro { margin:0 0 8px; } main { max-width:350px; } .masthead { padding-top:12px; padding-bottom:8px; } }
@media(prefers-reduced-motion:reduce) { .paper { transition:none; } }
