/* Plume & Chrono · style.css · paper-and-ink look, one calm column, tablet first */
  /* Layout: one calm column like a page of a notebook; header band, the sprint "page", footer colophon. */
  :root {
    --paper: #F4F1EA;   /* fondo pergamino */
    --card: #FAF8F5;    /* papel claro */
    --pencil: #DCD6C8;  /* trazo de lápiz */
    --ink: #2C2A29;     /* tinta cálida */
    --ink-soft: #6B655C;
    --quill: #1E40AF;   /* azul estilográfica */
    --quill-wash: #E4E8F4;
    --seal: #B45309;    /* lacre / tiempo crítico */
    --seal-wash: #F6E7D6;
    --ok: #2C2A29;
    --pending: #9A9387;
    --serif: 'Lora', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color-scheme: light;
  }
  html, body { background: var(--paper); color: var(--ink); }
  body { font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-tap-highlight-color: transparent; }
  * { box-sizing: border-box; }
  [hidden] { display: none !important; }
  /* Layout utilities used below, defined here too so the page keeps its layout even if the Tailwind CDN is slow or blocked */
  .flex { display: flex; } .flex-wrap { flex-wrap: wrap; } .items-center { align-items: center; } .items-end { align-items: flex-end; } .items-start { align-items: flex-start; }
  .justify-between { justify-content: space-between; }
  .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; } .gap-5 { gap: 1.25rem; } .gap-6 { gap: 1.5rem; }
  .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.25rem; } .mb-2 { margin-bottom: .5rem; }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
  button { font-family: var(--sans); color: inherit; cursor: pointer; touch-action: manipulation; }
  button:focus-visible, [tabindex]:focus-visible, textarea:focus-visible { outline: 2px solid var(--quill); outline-offset: 2px; }

  .wrap { max-width: 920px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

  /* Header */
  .masthead { border-bottom: 1px solid var(--pencil); background: var(--paper); }
  .brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.75rem; letter-spacing: .005em; line-height: 1; }
  .brand-name em { font-style: italic; font-weight: 500; color: var(--quill); }
  .brand-tag { font-size: .74rem; letter-spacing: .01em; line-height: 1.15; margin-top: 0; color: var(--ink-soft); white-space: nowrap; }   /* tagline: one line, quieter than the name */
  .pill-group { display: inline-flex; border: 1px solid var(--pencil); border-radius: 999px; background: var(--card); padding: 2px; }
  .pill-group button { border: 0; background: transparent; font-size: .8rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; min-height: 36px; color: var(--ink-soft); }
  .pill-group button[aria-pressed="true"] { background: var(--ink); color: var(--card); }
  .ghost-btn { border: 1px solid var(--pencil); background: var(--card); border-radius: 999px; padding: 6px 14px; min-height: 40px; font-size: .82rem; font-weight: 600; display: inline-flex; align-items: center; gap: 8px; }
  .ghost-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pending); }
  .ghost-btn[aria-pressed="true"] .dot { background: var(--quill); }

  .tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { border: 0; background: transparent; padding: 12px 14px 11px; font-size: .9rem; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid transparent; white-space: nowrap; min-height: 46px; display: inline-flex; align-items: center; gap: 8px; }
  .tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--quill); }
  .tab .soon { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--pencil); border-radius: 999px; padding: 1px 7px; font-weight: 600; color: var(--ink-soft); }
  .tab .num { font-family: var(--serif); font-style: italic; font-weight: 500; color: var(--quill); }

  /* Page card */
  .page { background: var(--card); border: 1px solid var(--pencil); border-radius: 14px; }
  .page.critical { border-color: var(--seal); box-shadow: 0 0 0 3px var(--seal-wash); }
  .eyebrow { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); }
  .h-serif { font-family: var(--serif); font-weight: 600; text-wrap: balance; }

  /* Coach row */
  .coach { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
  .bubble { position: relative; background: var(--paper); border: 1px solid var(--pencil); border-radius: 12px; padding: 10px 14px; font-size: .92rem; min-height: 46px; display: flex; align-items: center; min-width: 0; }
  .bubble::before { content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; background: var(--paper); border-left: 1px solid var(--pencil); border-bottom: 1px solid var(--pencil); transform: translateY(-50%) rotate(45deg); }
  .bubble.warn { border-color: var(--seal); color: var(--seal); }
  .bubble.warn::before { border-color: var(--seal); }
  .clock { font-family: var(--sans); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 2.3rem; letter-spacing: -.02em; line-height: 1; }
  .clock.critical { color: var(--seal); }
  .clock-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); font-weight: 600; text-align: right; }
  .timebar { height: 3px; background: var(--pencil); border-radius: 3px; overflow: hidden; }
  .timebar > i { display: block; height: 100%; width: 100%; background: var(--quill); transform-origin: left; transition: transform .2s linear; }
  .timebar.critical > i { background: var(--seal); }

  /* Stats */
  .stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); border: 1px solid var(--pencil); border-radius: 10px; overflow: hidden; }
  .stat { padding: 8px 12px; border-right: 1px solid var(--pencil); }
  .stat:last-child { border-right: 0; }
  .stat .k { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-soft); font-weight: 600; }
  .stat .v { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
  .stat .v small { font-size: .75rem; font-weight: 500; color: var(--ink-soft); }
  .chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .chip { font-size: .76rem; border: 1px solid var(--pencil); border-radius: 999px; padding: 3px 10px; background: var(--paper); font-variant-numeric: tabular-nums; }
  .chip b { font-weight: 700; }
  .chip.hot { border-color: var(--seal); color: var(--seal); background: var(--seal-wash); }

  /* Source text */
  .source { font-family: var(--serif); font-size: 1.22rem; line-height: 1.85; padding: 16px 18px; border: 1px solid var(--pencil); border-radius: 10px; background: var(--paper); max-height: 34vh; overflow-y: auto; overscroll-behavior: contain; word-wrap: break-word; }
  .source span { border-radius: 2px; }
  .source .p { color: var(--pending); }
  .source .o { color: var(--ok); }
  .source .x { color: var(--seal); background: var(--seal-wash); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
  .source .c { box-shadow: inset 2px 0 0 var(--quill); color: var(--ink); background: var(--quill-wash); }
  .source-title { font-family: var(--serif); font-style: italic; color: var(--ink-soft); }

  /* Accent bar */
  .accents { display: flex; flex-wrap: wrap; gap: 6px; }
  .key { min-width: 46px; height: 46px; padding: 0 6px; border: 1px solid var(--pencil); background: var(--card); border-radius: 9px; font-family: var(--serif); font-size: 1.25rem; display: inline-flex; align-items: center; justify-content: center; user-select: none; -webkit-user-select: none; box-shadow: 0 1px 0 var(--pencil); }
  .key:active { background: var(--quill-wash); border-color: var(--quill); transform: translateY(1px); box-shadow: none; }
  .key.shift { font-family: var(--sans); font-size: .78rem; font-weight: 700; padding: 0 12px; }
  .key.shift[aria-pressed="true"] { background: var(--ink); color: var(--card); border-color: var(--ink); }
  .key:disabled { opacity: .45; }

  /* Writing field */
  .field { width: 100%; font-family: var(--serif); font-size: 1.15rem; line-height: 1.6; color: var(--ink); background: #FFFDF9; border: 1px solid var(--pencil); border-radius: 10px; padding: 12px 14px; resize: none; min-height: 96px; outline: none; }
  .field:focus { border-color: var(--quill); box-shadow: 0 0 0 3px var(--quill-wash); }
  .field[readonly] { background: var(--paper); color: var(--ink-soft); }
  .field::placeholder { color: var(--pending); font-style: italic; }

  .btn { border: 1px solid var(--ink); background: var(--ink); color: var(--card); border-radius: 10px; padding: 10px 18px; min-height: 46px; font-weight: 600; font-size: .92rem; }
  .btn.alt { background: var(--card); color: var(--ink); border-color: var(--pencil); }
  .btn.quill { background: var(--quill); border-color: var(--quill); }

  /* Results */
  .result-score { font-family: var(--serif); font-size: 3.2rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; color: var(--quill); }
  .formula { font-family: var(--serif); font-style: italic; color: var(--ink-soft); font-size: .92rem; }
  .flag { border: 1px solid var(--seal); color: var(--seal); background: var(--seal-wash); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
  table.board { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
  table.board th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-soft); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--pencil); }
  table.board td { padding: 7px 8px; border-bottom: 1px dashed var(--pencil); }
  table.board tr.mine td { color: var(--quill); font-weight: 600; }
  table.board td.r { text-align: right; } table.board th.r { text-align: right; }

  /* Mime */
  .mime { display: block; color: var(--ink); }
  .mime .st { opacity: 0; transition: opacity .18s ease; }
  .mime[data-state="calm"] .st-calm,
  .mime[data-state="typing"] .st-typing,
  .mime[data-state="critical"] .st-critical,
  .mime[data-state="victory"] .st-victory { opacity: 1; }
  .mime[data-state="critical"] .ring { stroke: var(--seal); }

  /* Modal */
  .scrim { position: fixed; inset: 0; background: rgba(44,42,41,.35); z-index: 40; display: flex; align-items: flex-end; justify-content: center; padding: 16px; padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  @media (min-width: 640px) { .scrim { align-items: center; } }
  .sheet { background: var(--card); border: 1px solid var(--pencil); border-radius: 16px; width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; padding: 20px; }


  /* ===== Feedback (footer, collapsed by default) ===== */
  .fb { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--pencil); max-width: 560px; }
  .fb-meta { margin: 6px 0 0; font-size: .74rem; color: var(--ink-soft); }
  .fb-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
  .fb-open { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; text-decoration: none; }
  .fb-status { margin: 0; font-size: .82rem; color: var(--ink-soft); }
  .legal-links { margin: 12px 0 0; font-size: .8rem; }
  .legal-links a { color: var(--quill); text-underline-offset: 3px; display: inline-block; padding: 10px 2px; }
  /* Results: "How did it go?" nudge (from the 2nd result, at most every 5 days) */
  .fb-nudge { border: 1px dashed var(--pencil); border-radius: 12px; padding: 12px 14px; background: var(--card); max-width: 560px; }
  .fb-nudge p { margin: 0 0 8px; font-family: var(--serif); }
  .fb-nudge .btn { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }
  .fb-later { border: 0; background: transparent; min-height: 44px; padding: 8px 6px; font: inherit; font-size: .86rem; color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; }
  /* Results: "Shall we keep practising?" (continuity) before the closing line */
  .go-box { border: 1px solid var(--pencil); border-radius: 12px; padding: 12px 14px; background: var(--card); max-width: 560px; }
  .go-q { margin: 0 0 2px; font-family: var(--serif); font-size: 1.05rem; }
  .go-next { margin: 0 0 10px; font-size: .86rem; color: var(--ink-soft); }
  .go-bye { margin: 0; font-family: var(--serif); color: var(--ink-soft); }
  .fb-nudge .go-kit { margin: 6px 0 0; font-family: var(--sans); font-size: .82rem; }
  .kit-notify { font-size: .86rem; font-weight: 600; color: var(--quill); text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }

  .colophon { border-top: 1px solid var(--pencil); color: var(--ink-soft); font-size: .8rem; }
  .copy-btn { border: 1px solid var(--pencil); background: var(--card); border-radius: 8px; padding: 2px 10px; font-size: .76rem; min-height: 30px; }
  .select-all { user-select: all; -webkit-user-select: all; font-weight: 600; color: var(--ink); }

  @media (max-width: 560px) {
    .coach { grid-template-columns: auto 1fr; }
    .coach .clock-wrap { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; }
    .source { font-size: 1.1rem; }
    .clock { font-size: 2rem; }
  }

  /* ===== Iteration 2: modules II and III ===== */
  .wrap { max-width: 1040px; }
  #mod1, #mod2 { max-width: 880px; margin-left: auto; margin-right: auto; }
  .intro { margin: 6px 0 10px; color: var(--ink-soft); font-size: .92rem; max-width: 92ch; }
  .pre-note { color: var(--ink-soft); font-size: .9rem; }
  .stickybar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6; background: var(--card); margin: 0 -18px; padding: 12px 18px 12px; border-bottom: 1px solid var(--pencil); border-top: 1px solid var(--pencil); }
  /* Improvisation, touch keyboard open: one-line copy of the situation + connectors inside the sticky bar (tap = whole text). No animation. */
  .sb-prompt { display: none; width: 100%; margin-top: 8px; padding: 6px 10px; text-align: left; font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--pencil); border-radius: 8px; cursor: pointer; min-height: 44px; }
  #mod2.kb .sb-prompt:not([hidden]) { display: block; }
  .sb-prompt .sbp-text { display: block; font-family: var(--serif); font-size: .86rem; line-height: 1.4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sb-prompt.open .sbp-text { white-space: normal; max-height: 32vh; overflow-y: auto; }
  .sb-prompt .sbp-conns { display: block; margin-top: 2px; font-size: .74rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sb-prompt:focus-visible { outline: 2px solid var(--quill); outline-offset: 2px; }
  .prompt { font-family: var(--serif); font-size: 1.2rem; line-height: 1.75; padding: 14px 16px; border: 1px solid var(--pencil); border-radius: 10px; background: var(--paper); max-width: 70ch; }
  .chip.on { border-color: var(--quill); color: var(--quill); background: var(--quill-wash); font-weight: 600; }
  .chip.ok { border-color: var(--quill); color: var(--quill); }
  .chip.miss { border-color: var(--seal); color: var(--seal); background: var(--seal-wash); }
  .chip.conn { font-family: var(--serif); font-size: 1rem; padding: 6px 12px; }
  .chip.conn b { font-weight: 600; word-spacing: normal; }
  .chip.conn small { font-family: var(--sans); color: var(--ink-soft); font-size: .76rem; }
  .chip.conn.miss small { color: var(--seal); }
  .field + .eyebrow, #m2writeBox .field { width: 100%; }

  .split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .readtext { max-height: none; font-size: 1.15rem; line-height: 1.85; }
  .q { display: grid; gap: 8px; margin-bottom: 18px; }
  .q-text { font-family: var(--serif); font-weight: 600; font-size: 1.08rem; line-height: 1.5; }
  .opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 14px; text-align: left; border: 1px solid var(--pencil); border-radius: 10px; background: var(--card); font-family: var(--serif); font-size: 1.05rem; line-height: 1.4; }
  .opt .ltr { flex: none; width: 28px; height: 28px; border: 1px solid var(--pencil); border-radius: 50%; display: grid; place-items: center; font-family: var(--sans); font-weight: 700; font-size: .8rem; color: var(--ink-soft); }
  .opt .otxt { min-width: 0; }
  .opt[aria-checked="true"] { border-color: var(--quill); background: var(--quill-wash); }
  .opt[aria-checked="true"] .ltr { background: var(--quill); border-color: var(--quill); color: var(--card); }
  .opt:disabled { opacity: 1; cursor: default; }
  .opt.right { border-color: var(--quill); background: var(--quill-wash); }
  .opt.right .ltr { background: var(--quill); border-color: var(--quill); color: var(--card); }
  .opt.wrong { border-color: var(--seal); background: var(--seal-wash); }
  .opt.wrong .ltr { background: var(--seal); border-color: var(--seal); color: var(--card); }
  .why { font-size: .9rem; color: var(--ink-soft); font-family: var(--serif); font-style: italic; }
  /* compact sticky clock on phones and short tablet screens, so it never eats the writing area */
  @media (max-width: 720px), (max-height: 760px) {
    .stickybar { padding: 8px 18px; }
    .stickybar .coach { gap: 10px; }
    #m2Mime, #m3Mime { width: 46px !important; height: 46px !important; }
    .stickybar .bubble { min-height: 0; padding: 6px 10px; font-size: .82rem; line-height: 1.3; }
    .stickybar .clock { font-size: 1.7rem; }
    .stickybar .clock-label { font-size: .62rem; }
    .stickybar .timebar { margin-top: 8px; }
    #mod2 .stickybar .chips { display: none; }
    #mod3 .stickybar .chips { margin-top: 6px; }
  }
  @media (min-width: 900px) {
    .split { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 28px; }
    .readbox { position: sticky; top: var(--m3-sticky, 150px); }   /* --m3-sticky = real height of the Reading clock bar (set in app.js) */
    .readtext { max-height: calc(100vh - var(--m3-sticky, 150px) - 70px); overflow-y: auto; }
  }


  /* ===== Iteration 3: results screen, ranking, kit, ad slot ===== */
  .page.showing-results .work { display: none !important; }
  #resultsView { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--pencil); }
  .rv-sub { font-family: var(--serif); font-weight: 400; font-style: italic; color: var(--ink-soft); font-size: 1rem; }
  .rv-note { color: var(--ink-soft); font-size: .9rem; margin: 8px 0 0; max-width: 70ch; }
  .rv-note.demo { font-style: italic; }
  .rv-hero { margin-top: 10px; }
  .rv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .rv-switch { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: 4px; }
  .stats.auto { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .stats.auto .stat { border-bottom: 1px solid var(--pencil); margin-bottom: -1px; }
  .goalbar { height: 8px; border: 1px solid var(--pencil); border-radius: 8px; background: var(--paper); overflow: hidden; }
  .goalbar i { display: block; height: 100%; background: var(--quill); }
  .corr { border: 1px solid var(--pencil); border-radius: 10px; padding: 12px 14px; margin-top: 10px; background: var(--paper); }
  .corr.bad { border-color: var(--seal); }
  .corr-line { font-size: .92rem; margin-top: 4px; }
  .corr .why { margin-top: 6px; }
  .input { width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink); background: #FFFDF9; border: 1px solid var(--pencil); border-radius: 10px; padding: 10px 14px; min-height: 46px; outline: none; }
  .input:focus { border-color: var(--quill); box-shadow: 0 0 0 3px var(--quill-wash); }
  .lb-form { display: grid; gap: 6px; max-width: 460px; border: 1px solid var(--pencil); border-radius: 12px; padding: 14px; background: var(--paper); }
  .lb-qual { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; color: var(--quill); }
  .lb-label { font-size: .8rem; font-weight: 600; margin-top: 6px; }
  .hint { font-size: .8rem; color: var(--ink-soft); }
  .err { min-height: 1.2em; font-size: .85rem; color: var(--seal); font-weight: 600; }
  .lb-ok { border: 1px solid var(--quill); background: var(--quill-wash); color: var(--quill); border-radius: 10px; padding: 10px 14px; font-weight: 600; }
  table.board tr.rest td { color: var(--ink-soft); }
  table.board td .tag { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--pencil); border-radius: 999px; padding: 0 6px; color: var(--ink-soft); font-family: var(--sans); font-weight: 600; }
  table.board td .tag.you { border-color: var(--quill); color: var(--quill); }
  .kit { border: 1px solid var(--pencil); border-radius: 14px; padding: 16px 18px; background: var(--paper); }
  .kit-points { margin: 0; padding-left: 18px; font-size: .92rem; line-height: 1.7; }
  .kit-fine { font-size: .8rem; color: var(--ink-soft); }
  .kit-cta { display: inline-flex; align-items: center; text-decoration: none; }
  .kit-pending { opacity: .75; cursor: default; }
  .ad-wrap { max-width: 728px; margin-left: auto; margin-right: auto; padding-top: 12px; border-top: 1px dashed var(--pencil); }
  .ad-label { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); text-align: center; margin-bottom: 6px; }
  .ad-slot { min-height: 250px; display: grid; place-items: center; text-align: center; border: 1px dashed var(--pencil); border-radius: 10px; color: var(--ink-soft); font-size: .85rem; background: transparent; padding: 12px; }
  #boardBtn:disabled { opacity: .5; cursor: not-allowed; }
  .mt-6 { margin-top: 1.5rem; }

  @media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

  /* ===== Level selector (Iteration 4) ===== */
  .levelbar { display: flex; align-items: center; gap: 10px; padding: 8px 0 10px; flex-wrap: wrap; }
  .lvl-opts { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
  .lvl { border: 1px solid var(--pencil); background: var(--card); color: var(--ink-soft); border-radius: 999px; padding: 4px 12px; min-height: 36px; font-size: .84rem; font-weight: 600; }
  .lvl.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
  .lvl:disabled { opacity: .55; }
  .lvl-note { margin: 10px 0 0; padding: 8px 12px; border: 1px dashed var(--pencil); border-radius: 10px; background: var(--card); color: var(--ink-soft); font-size: .86rem; max-width: 68ch; }
  .lvl-note[hidden] { display: none !important; }
  .chip.lvl { min-height: 0; padding: 1px 9px; font-size: .72rem; font-weight: 600; color: var(--quill); border-color: var(--quill); background: transparent; text-transform: none; letter-spacing: 0; }
  table.board td .tag.lvl { margin-left: 2px; border-color: var(--quill); color: var(--quill); }
  @media (max-width: 560px) { .levelbar { gap: 4px; } .lvl { padding: 3px 10px; } }

  /* ===== Sprint: compact live strip (visible with the virtual keyboard open) ===== */
  .live-strip { display: none; position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; margin: 0 -18px; padding: 8px 18px;
    background: var(--card); border-top: 1px solid var(--pencil); border-bottom: 1px solid var(--pencil);
    grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }
  .live-strip.active { display: grid; }
  @media (pointer: coarse), (max-width: 820px) { .live-strip { display: grid; } }
  .ls-text { min-width: 0; font-family: var(--serif); font-size: 1.06rem; line-height: 1.5; max-height: 3em; overflow: hidden; overflow-wrap: anywhere; color: var(--ink); }
  .ls-text span { border-radius: 2px; }
  .ls-text .p { color: var(--ink-soft); }
  .ls-text .o { color: var(--ok); }
  .ls-text .x { color: var(--seal); background: var(--seal-wash); text-decoration: underline; text-underline-offset: 3px; }
  .ls-text .c { box-shadow: inset 2px 0 0 var(--quill); background: var(--quill-wash); color: var(--ink); }
  .ls-text .gap { color: var(--pending); }
  .ls-clock { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 1.1rem; color: var(--ink); }
  .ls-clock.critical { color: var(--seal); }
  /* an extra character typed before this one (insertion): thin red mark on its left */
  .source .i, .ls-text .i { box-shadow: inset 2px 0 0 var(--seal); }
  /* with the keyboard open on touch/narrow screens, the full text gets shorter so the field stays in view */
  #mod1.kb .source { max-height: 18vh; }

  /* ===== Improv results: the learner's draft, soft marks and remarks ===== */
  .draft { font-family: var(--serif); font-size: 1.05rem; line-height: 1.75; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere;
    background: #FFFDF9; border: 1px solid var(--pencil); border-radius: 10px; padding: 12px 14px; max-width: 100%; max-height: 52vh; overflow-y: auto; }
  .draft mark { color: inherit; border-radius: 3px; }
  .draft mark.mk-conn { background: var(--quill-wash); padding: 0 2px; }
  .draft mark.mk-conn.warn { box-shadow: inset 0 -2px 0 var(--seal); }
  .draft mark.mk-acc, .draft mark.mk-cap { background: transparent; text-decoration: underline dotted var(--seal); text-decoration-thickness: 2px; text-underline-offset: 4px; }
  .draft-legend { margin: 6px 0 0; font-size: .76rem; color: var(--ink-soft); }
  .draft-status { margin: 4px 0 0; min-height: 1em; font-size: .8rem; color: var(--ink-soft); }
  .btn.btn-sm { min-height: 40px; padding: 6px 14px; font-size: .84rem; }
  .btn.alt.done { border-color: var(--quill); color: var(--quill); }
  .obs { margin: 0; padding-left: 1.1em; max-width: 70ch; }
  .obs li { margin: 4px 0; font-size: .92rem; color: var(--ink); }
  .obs li.obs-ok { color: var(--ink-soft); }
  .react-note { margin: 14px 0 0; font-size: .78rem; color: var(--pending); max-width: 70ch; }

/* ===== Point 3: understandable score, honest ranking, Quebec typography ===== */
.formula-box { text-align: right; }
.formula-note { font-size: .78rem; color: var(--ink-soft); margin-top: 1px; }
@media (max-width: 560px) { .formula-box { text-align: left; } }
.practice-note { font-size: .82rem; color: var(--ink-soft); font-style: italic; margin: 6px 0 0; padding-left: 10px; border-left: 2px solid var(--pencil); max-width: 70ch; }
.chip.soft { border-color: var(--ink-soft); color: var(--ink); background: transparent; border-style: dashed; }
.qc-btn { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: .76rem; color: var(--ink-soft); }
.qc-btn .qc-dot { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-block; }
.qc-btn.on { border-color: var(--quill); color: var(--quill); background: var(--quill-wash); font-weight: 600; }
.qc-btn.on .qc-dot { background: currentColor; }
.qc-btn:disabled { opacity: .55; cursor: default; }
.lb-lvls { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-lvls .chip { cursor: pointer; font: inherit; font-size: .8rem; min-height: 32px; }
table.board tr.sample td { color: var(--ink-soft); font-style: italic; }
table.board td .tag.ex { border-style: dashed; font-style: normal; }

/* ===== Point 4: connector chips open a one-line model sentence ===== */
#m2conns .chip.conn { cursor: pointer; font: inherit; font-family: var(--serif); font-size: 1rem; color: inherit; -webkit-tap-highlight-color: transparent; }
#m2conns .chip.conn.open { border-color: var(--quill); box-shadow: 0 0 0 1px var(--quill) inset; }
/* Improvisation: connector mode (Surprise / Choose) and the two pickers. Paper look, native selects, 44 px touch targets. */
.conn-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.conn-mode .pill-group button { min-height: 44px; padding: 6px 14px; font-size: .86rem; }
.conn-pick { display: grid; gap: 10px; grid-template-columns: 1fr; max-width: 560px; }
@media (min-width: 601px) { .conn-pick { grid-template-columns: 1fr 1fr; } }
.conn-pick-row { display: flex; flex-direction: column; gap: 4px; }
.conn-select { min-height: 44px; padding: 8px 10px; font: inherit; font-family: var(--serif); color: var(--ink); background: var(--paper); border: 1px solid var(--pencil); border-radius: 8px; max-width: 100%; }
.conn-select:focus-visible { outline: 2px solid var(--quill); outline-offset: 2px; }
.conn-why { margin: 2px 0 0; font-size: .82rem; }
.conn-ex { margin: 8px 0 0; font-size: .9rem; color: var(--ink-soft); border-left: 2px solid var(--pencil); padding: 2px 0 2px 10px; max-width: 70ch; }
.conn-ex .k { font-size: .76rem; letter-spacing: .02em; }
.conn-ex .s { font-family: var(--serif); font-style: italic; color: var(--ink); }


/* ===== Compact header on phones (360 px and up), hidden empty ad slot, Plume Writing Kit ===== */
.lbl-short { display: none; }
.mast-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ad-wrap.ads-off, .ad-wrap[hidden] { display: none !important; }   /* #adSlot stays in the DOM for Results.ads() */
.kit-lead { margin: 0 0 8px; font-size: .9rem; color: var(--ink-soft); font-style: italic; }
.kit-status { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 600; color: var(--ink-soft); border: 1px dashed var(--pencil); border-radius: 999px; padding: 5px 12px; }
.kit-status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pending, var(--pencil)); }
@media (max-width: 600px) {
  .masthead > .wrap { padding-top: 8px !important; }
  .masthead .lbl-long { display: none; }
  .masthead .lbl-short { display: inline; }
  .masthead #brandMark { width: 38px !important; height: 38px !important; }
  .masthead .brand-name { font-size: 1.6rem; }   /* keeps the phone header at 230 px with the tagline line */
  .masthead .brand-tag { margin-top: 2px; }
  .mast-tools { flex-wrap: nowrap; gap: 6px; width: 100%; }
  .masthead .ghost-btn { padding: 4px 10px; min-height: 36px; font-size: .78rem; gap: 6px; white-space: nowrap; }
  .masthead .pill-group button { padding: 4px 10px; min-height: 32px; }
  .tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; overflow: visible; margin-top: 4px; }
  .tab { justify-content: center; text-align: center; padding: 9px 4px 8px; min-height: 42px; font-size: .84rem; gap: 0; white-space: normal; line-height: 1.2; }
  .tab .num { display: none; }
  .levelbar { flex-wrap: nowrap; gap: 6px; padding: 4px 0 8px; overflow-x: auto; scrollbar-width: none; }
  .levelbar::-webkit-scrollbar { display: none; }
  #lvlLabel { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* still names the group for screen readers */
  .lvl-opts { flex-wrap: nowrap; gap: 4px; }
  .levelbar .lvl { padding: 3px 8px; font-size: .78rem; white-space: nowrap; min-height: 34px; }
}

/* ===== Brand mark (isotipo) and characters per practice language ===== */
/* The mark is one ink (currentColor) on a 32 x 32 grid: 32 px in the colophon, favicon in <head>. No keyframes. */
.pc-mark { display: block; flex: none; color: var(--ink); }
.colo-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; color: var(--ink); font-size: .85rem; }
.colo-brand b { font-family: var(--serif); font-weight: 600; }
/* Characters: same skeleton for fr / en / es (data-char). Only the clock characters change data-state;
   the header one stays calm. The critical ring only changes colour: no shake, no scale. */

/* ===== Header row stays put when switching EN <-> ES =====
   Audio and Ranking always show their short label (the long one stays in the DOM as aria-label) and have a fixed width,
   so their size and position never depend on the interface language. The tabs keep their original layout. */
.mast-tools .lbl-long { display: none; }
.mast-tools .lbl-short { display: inline; }
.masthead #audioBtn, .masthead #boardBtn { justify-content: center; white-space: nowrap; flex: none; }
/* Audio: icon-only round button (speaker; a cross replaces the waves when sound is off). */
.masthead #audioBtn.icon-btn { width: 40px; height: 40px; min-height: 40px; padding: 0; border-radius: 50%; }
.snd-icon { display: block; }
#audioBtn .snd-off { display: none; }
#audioBtn[aria-pressed="false"] .snd-on { display: none; }
#audioBtn[aria-pressed="false"] .snd-off { display: inline; }
#audioBtn[aria-pressed="false"] { color: var(--ink-soft); }
@media (max-width: 600px) {
  .masthead #audioBtn.icon-btn { width: 36px; height: 36px; min-height: 36px; }
}

/* Header logo: the brand mark (isotipo), static, one ink. The characters live only next to the clocks. */
.brand-mark { flex: none; color: var(--ink); align-self: center; position: relative; top: -2px; }
/* Optical centring: the key body sits a little below the middle of the 32 x 32 grid (the crown is thin), so the mark
   is lifted 2 px to centre the key on the two brand lines ("Plume & Chrono" + "by Life and Gently"). */
.brand-mark .pc-mark { width: 100%; height: 100%; }

/* ===== Practice-language selector (FR · EN · ES): a slim row under the header, never inside it ===== */
/* Practice-language round buttons (FR · EN · ES), first item of the level bar, a thin divider before "Level". */
.plang { display: flex; align-items: center; flex: none; padding-right: 10px; margin-right: 2px; border-right: 1px solid var(--pencil); }
.plang[hidden] { display: none !important; }
.plang-btns { display: flex; align-items: center; gap: 4px; }
.plang-btn { width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--pencil); background: var(--card); color: var(--ink-soft); font: 600 .74rem/1 var(--sans, Inter, system-ui, sans-serif); letter-spacing: .02em; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.plang-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--card); }
.plang-btn[hidden] { display: none !important; }
.plang-btn:disabled { opacity: .55; }
/* Phones (600 px or less): the three round buttons would push B1, B2 and Advanced out of the line, so they take their own line above the levels. */
@media (max-width: 600px) {
  .levelbar { flex-wrap: wrap; overflow: visible; row-gap: 6px; }
  .plang { flex: 0 0 100%; border-right: 0; padding-right: 0; margin-right: 0; }
  .plang-btn { width: 32px; height: 32px; font-size: .7rem; }
  .lvl-opts { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .lvl-opts::-webkit-scrollbar { display: none; }
}

/* ===== Compact phone header, Change B of Stage 1 (?v=20261120l): about 140 px at 360 and 412 px =====
   Row 1: mark + name (no tagline) and the tools; row 2: the three tabs; row 3: "Practice" FR · EN · ES, then "Level" as a native list.
   From 601 px nothing changes: tagline, level chips, same 165 px header. */
.plang-lbl { margin-right: 6px; white-space: nowrap; }
.lvl-select { display: none; }
@media (max-width: 600px) {
  .masthead > .wrap { padding-top: 6px !important; }
  .masthead > .wrap > .flex { flex-wrap: nowrap; gap: 8px; }
  .masthead > .wrap > .flex > .flex { flex-wrap: nowrap; min-width: 0; }
  .masthead #brandMark { width: 30px !important; height: 30px !important; top: 0; }
  .masthead .brand-name { font-size: 1.1rem; white-space: nowrap; }
  .masthead .brand-tag { display: none; }
  .mast-tools { width: auto; gap: 4px; }
  .masthead .pill-group { padding: 1px; }
  .masthead .pill-group button { padding: 2px 7px; min-height: 28px; font-size: .7rem; }   /* interface EN | ES: smaller and quieter */
  .masthead .pill-group button[aria-pressed="true"] { background: var(--quill-wash); color: var(--ink); }
  .masthead #boardBtn { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 50%; }   /* icon only; aria-label carries "Weekly Leaderboard" */
  .masthead #boardBtn .lbl-short { display: none; }
  .masthead .gap-3 { gap: 8px; }
  .tabs { margin-top: 4px; }
  .levelbar { flex-wrap: nowrap; overflow: visible; gap: 5px; padding: 4px 0 6px; }
  .plang { flex: none; border-right: 1px solid var(--pencil); padding-right: 6px; margin-right: 0; }
  .plang-lbl { margin-right: 2px; font-size: .64rem; letter-spacing: .06em; }
  .plang-btns { gap: 2px; }
  .masthead .plang-btn { width: 30px; height: 30px; }
  .masthead > .wrap > .flex > .flex.gap-3 { gap: 6px; }
  .masthead .brand-name { margin-right: 4px; }
  .lvl-opts { display: none !important; }
  .lvl-select { display: block; min-height: 36px; min-width: 0; flex: 1 1 auto; max-width: 170px; padding: 4px 2px 4px 8px; font: 600 .78rem/1.2 var(--sans); color: var(--ink); background: var(--card); border: 1px solid var(--pencil); border-radius: 999px; }
  .lvl-select:focus-visible { outline: 2px solid var(--quill); outline-offset: 2px; }
  .lvl-select:disabled { opacity: .55; }
}
@media (max-width: 340px) { .masthead #brandMark { display: none; } .plang-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
/* 601 to 820 px: the level chips and the visible "Practice" label share one line, so the chips get tighter */
@media (min-width: 601px) and (max-width: 820px) {
  .levelbar { gap: 6px; }
  .plang { padding-right: 6px; }
  .plang-btn { width: 32px; height: 32px; font-size: .7rem; }
  .lvl-opts { gap: 4px; }
  .levelbar .lvl { padding: 3px 8px; font-size: .78rem; min-height: 34px; }
  .masthead .pill-group button { padding: 4px 6px; min-height: 32px; font-size: .72rem; }   /* EN | ES | FR interface buttons fit beside the tagline */
  .masthead > .wrap > .flex { gap: 8px; }
  .masthead #boardBtn { padding-left: 10px; padding-right: 10px; }
}

/* ===== Welcome guide (first visit; reopened from the footer "Guide" button) ===== */
/* Sized to fit the screen without scrolling inside the card: phones from 360 x 640, tablets in both orientations. */
.welcome-scrim { z-index: 45; background: rgba(28,26,25,.62); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); padding: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
.w-lock, .w-lock body { overflow: hidden; }
.sheet.welcome { max-width: 580px; max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px); padding: 14px 18px 16px; overscroll-behavior: contain; }
.w-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.w-beta { font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; color: var(--ink-soft); border: 1px solid var(--pencil); border-radius: 999px; padding: 3px 9px; background: var(--paper); line-height: 1.3; min-width: 0; }
.w-ui { flex: none; }
.w-ui button { min-height: 32px; padding: 3px 9px; font-size: .74rem; }
.w-brand { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--ink); }
.w-brand .pc-mark { width: 32px; height: 32px; flex: none; }
.w-title { margin: 0; font-weight: inherit; display: flex; flex-direction: column; }
.w-hello { font-family: var(--serif); font-style: italic; font-size: .9rem; color: var(--ink-soft); line-height: 1.2; }
.w-brand .brand-name { margin: 0; font-size: 1.5rem; line-height: 1.15; }
.w-intro { margin: 6px 0 0; color: var(--ink-soft); font-size: .88rem; line-height: 1.45; }
.w-step { margin-top: 12px; }
.w-h { margin: 0 0 6px; font-family: var(--serif); font-weight: 600; font-size: .95rem; color: var(--ink); }
.w-pls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.w-lvs { display: flex; flex-wrap: wrap; gap: 6px; }
.w-lvs .w-opt { flex: 1 1 auto; }
.w-opt { border: 1px solid var(--pencil); background: var(--paper); color: var(--ink); border-radius: 10px; min-height: 40px; font: inherit; font-size: .84rem; font-weight: 600; padding: 4px 10px; min-width: 0; }
.w-opt[aria-pressed="true"] { border-color: var(--quill); background: var(--quill-wash); color: var(--quill); }
.w-pl { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 4px 6px; }
.w-pl b { font-size: .88rem; letter-spacing: .04em; }
.w-pl span { font-size: .78rem; font-weight: 500; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-pl[aria-pressed="true"] span { color: var(--quill); }
.w-test { margin: 12px 0 0; padding: 8px 12px; border: 1px dashed var(--pencil); border-radius: 10px; font-family: var(--serif); font-size: .86rem; line-height: 1.45; color: var(--ink); }
.w-go { width: 100%; margin-top: 12px; }
.guide-link { border: 0; background: transparent; font: inherit; color: var(--quill); padding: 10px 2px; min-height: 44px; display: inline-flex; align-items: center; gap: 6px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.guide-q { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; font-size: .7rem; font-weight: 700; text-decoration: none; }
@media (max-width: 520px) {
  .sheet.welcome { padding: 12px 14px 14px; }
  .w-beta { font-size: .6rem; letter-spacing: .04em; padding: 2px 8px; }
  .w-ui button { padding: 3px 7px; }
  .w-brand .brand-name { font-size: 1.35rem; }
  .w-intro { font-size: .83rem; line-height: 1.4; }
  .w-pl { gap: 4px; }
  .w-pl span { font-size: .74rem; }
  .w-opt { min-height: 38px; padding: 3px 6px; }
  .w-test { font-size: .8rem; line-height: 1.4; padding: 7px 10px; }
}
@media (max-height: 700px) {
  .w-brand { margin-top: 8px; }
  .w-step, .w-test, .w-go { margin-top: 10px; }
  .w-go { min-height: 44px; }
}
@media (max-height: 600px) and (max-width: 520px) {
  .w-brand .pc-mark { display: none; }
  .w-intro { font-size: .78rem; }
  .w-test { font-size: .76rem; }
  .w-opt { min-height: 36px; }
  .w-step, .w-test, .w-go { margin-top: 8px; }
}
@keyframes w-veil { from { opacity: 0; } to { opacity: 1; } }
@keyframes w-rise { from { opacity: 0; transform: translateY(24px) scale(.98); } to { opacity: 1; transform: none; } }
.welcome-scrim:not([hidden]) { animation: w-veil .9s ease-in-out both; }
.welcome-scrim:not([hidden]) .sheet.welcome { animation: w-rise 1.1s cubic-bezier(.22,.61,.36,1) .2s both; }

/* Action first (v=20261120p): before a run, the Reading "0/3 answered" chip is hidden, so the start button sits higher. */
#mod3:has(#m3pre:not([hidden])) .stickybar .chips { display: none; }
/* Short screens (tablet in landscape, phone browsers with toolbars): the text to copy, the field and Start fit in the first screen. */
@media (max-height: 800px) and (min-width: 601px) {
  #mod1 .coach #mimeCoach { width: 52px !important; height: 52px !important; }
  #mod1 .coach .bubble { min-height: 40px; padding: 8px 12px; font-size: .88rem; }
  #mod1 .coach .clock { font-size: 2rem; }
  #mod1 .timebar { margin-top: 8px; }
  #mod1 .source { font-size: 1.1rem; line-height: 1.7; padding: 12px 16px; }
  #mod1 .field { min-height: 78px; }
}

/* Sprint results: "Keep in mind" (up to 5 words still wrong in the final copy, with the right form and a short reason) */
.fixes { border: 1px solid var(--pencil); border-radius: 12px; padding: 12px 14px; background: var(--paper); }
.fix-h { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 1.02rem; color: var(--ink); }
.fix-lead { margin: 2px 0 8px; font-size: .86rem; color: var(--ink-soft); }
.fix-list { list-style: none; margin: 0; padding: 0; }
.fix-list li { display: flex; flex-direction: column; gap: 1px; padding: 7px 0; border-top: 1px dashed var(--pencil); }
.fix-list li:first-child { border-top: 0; }
.fix-pair { font-family: var(--serif); font-size: 1.05rem; overflow-wrap: anywhere; min-width: 0; }
.fix-got { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--seal); text-decoration-thickness: 1px; }
.fix-want { color: var(--quill); font-weight: 600; }
.fix-why { font-size: .82rem; color: var(--ink-soft); }
/* Results come in with the same slow fade and small rise as the welcome card (no motion with reduced motion). */
/* Results as a window over the app (v=20261120u, Seba): same dark backdrop and slow entrance as the welcome card.
   Below the ranking sheet (z 40, it can open from the results) and the welcome card (z 45). The card scrolls inside. */
.rv-lock, .rv-lock body { overflow: hidden; }
#resultsView:not([hidden]) { position: fixed; inset: 0; z-index: 35; margin: 0; padding: 12px; border-top: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(28,26,25,.62); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); animation: w-veil .9s ease-in-out both; }
.rv-card { position: relative; background: var(--card); border: 1px solid var(--pencil); border-radius: 16px; width: 100%; max-width: 760px;
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; padding: 20px 22px 22px;
  animation: w-rise 1.1s cubic-bezier(.22,.61,.36,1) .2s both; outline: none; }
.rv-close { position: sticky; top: 0; float: right; margin: -6px -8px 0 8px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--pencil); background: var(--card);
  font-size: 1.4rem; line-height: 1; color: var(--ink-soft); display: inline-grid; place-items: center; z-index: 2; }
@media (max-width: 560px) { #resultsView:not([hidden]) { padding: 8px; } .rv-card { padding: 16px 14px 18px; border-radius: 14px; } }
.rv-card:focus, .rv-card:focus-visible { outline: none; }
/* Floating windows: a soft, wide shadow so the card seems to hover over the page. */
.sheet.welcome, .rv-card { box-shadow: 0 2px 6px rgba(20,18,17,.10), 0 18px 48px -8px rgba(20,18,17,.35), 0 40px 90px -20px rgba(20,18,17,.30); }
