/* The page-level styles from the design's "Yomidori Home v7.html" <style> block. */
.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:clamp(32px,5vw,72px);align-items:center}
.two .copy .standfirst{margin-top:16px}
.points{display:flex;flex-direction:column;gap:0;margin-top:30px;max-width:460px}
.points>div{padding:16px 0;border-top:1.5px solid var(--border)}
.points>div:last-child{border-bottom:1.5px solid var(--border)}
.points b{display:block;font-family:var(--f-head);font-weight:500;font-size:17px;color:var(--ink)}
.points small{display:block;margin-top:4px;font-size:14px;line-height:1.5;color:var(--muted)}
.rd-text .w{border-bottom:1px dotted rgba(37,57,86,.25)}
.rd-text .w.hi{border-bottom-color:transparent;border-radius:4px;padding:2px 1px}

.phone.static{pointer-events:none}.phone.live-reader{pointer-events:auto}
.live-reader .w{cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .14s}
.live-reader .w:hover{background:rgba(37,57,86,.07)}
.live-reader .w.hi{background:rgba(255,183,77,.28)}
.live-reader .w.sv{background:rgba(255,213,79,.22)}
.live-reader .w.sv.hi{background:rgba(255,183,77,.28)}
.live-reader .rd-text p{transition:background .16s;border-radius:4px}
.live-reader .rd-text p.held{background:rgba(0,0,0,.06)}
.sb[hidden],.wb[hidden],.phone .sb[hidden]{display:none}
.phone .sb{display:flex;flex-direction:column;align-items:flex-start;gap:6px;width:100%;padding:16px 20px;border:0;background:none;text-align:left;cursor:pointer;font:inherit;animation:wb-swap .22s ease-out}
.sb-label{font-family:var(--f-ui);font-size:10px;font-weight:700;letter-spacing:1.2px;color:var(--muted);opacity:.6}
.sb-text{font-family:var(--f-ui);font-size:14px;line-height:1.4;color:var(--ink)}
.sb-text.jp{font-family:var(--f-jp);font-size:15px;line-height:2.1}
.sb-text ruby rt{font-size:.5em;color:var(--muted)}
.sb-hint{font-family:var(--f-ui);font-size:11px;color:var(--muted);opacity:.6;margin-top:2px}
.wb-pos{font-size:11px;color:var(--muted);margin-top:5px;letter-spacing:.04em;text-transform:lowercase;padding-bottom:4px}
.wb-dict{font-family:var(--f-jp);color:var(--navy)}
.phone .bm{border:0;background:none;font:inherit;cursor:pointer;display:flex;align-items:center;gap:6px;padding:8px 12px 8px 10px;border-radius:10px;margin-right:2px}
.phone .bm span{font-size:12px}
.bm:not(.saved){background:var(--card-tint);border:1px solid var(--border)}
.bm.pop{animation:bm-pop .34s cubic-bezier(.2,.7,.2,1)}
@keyframes bm-pop{0%{transform:scale(1)}40%{transform:scale(1.16)}to{transform:scale(1)}}
.wb-swap{animation:wb-swap .22s ease-out}
@keyframes wb-swap{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.sv-toast{position:absolute;left:50%;bottom:76px;transform:translate(-50%,8px);background:var(--navy);color:#fff;font-size:11px;font-weight:600;padding:7px 13px;border-radius:999px;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;white-space:nowrap;z-index:5}
.sv-toast.on{opacity:1;transform:translate(-50%,0)}
.hero-vid .vid{margin-bottom:0}
.read{margin-top:24px}
@media (max-width:900px){.hero-vid .vid{margin-bottom:0}}
.kanji-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:clamp(20px,3vw,40px);align-items:start;margin-top:clamp(36px,5vw,56px)}
.kanji-two>div{display:flex;flex-direction:column;align-items:center;gap:14px}
.cap{font-family:var(--f-head);font-size:14px;color:var(--muted)}
.cap b{font-weight:500;color:var(--ink)}
.drill .kw-prompt{font-family:var(--f-head);font-size:24px;color:var(--matcha);text-align:center;margin-top:10px}
.drill .pad{position:relative;margin:14px 0 0;width:210px;height:210px;background:var(--card);border:1px solid var(--border);border-radius:16px;align-self:center}
.drill .pad::before,.drill .pad::after{content:"";position:absolute;background:var(--hair)}.drill .pad::before{left:50%;top:6%;bottom:6%;width:1px}.drill .pad::after{top:50%;left:6%;right:6%;height:1px}
.drill .pad svg{position:absolute;inset:8%;width:84%;height:84%;overflow:visible}
.drill .pad .ghost path{stroke:transparent}.drill .pad .ink path{stroke:var(--ink)}.drill .pad .ink path.next{stroke:var(--matcha)}
.drill .msg{text-align:center;font-size:12px;color:var(--muted);margin-top:10px;font-family:ui-monospace,Menlo,monospace}
.drill .acts{display:flex;gap:8px;padding:0 18px;margin-top:12px}
.drill .acts span{flex:1;text-align:center;padding:10px;border-radius:12px;border:1.2px solid var(--border);font-size:12.5px;font-weight:700;color:var(--muted)}
.drill .hintln{text-align:center;font-size:12px;font-weight:600;color:var(--navy);margin-top:12px}
.words-sec .cards{display:flex;flex-direction:column;gap:18px;max-width:420px;margin:0 auto}
.wcard-p.big-card{margin:0;padding:26px 22px}
.wcard-p .big{font-size:38px}
.goal-card{background:var(--card-raised);border:1px solid var(--border);border-radius:20px;padding:16px 16px 14px;position:relative;font-family:var(--f-ui);color:var(--ink);font-size:13px}
.goal-card .week{margin:0 0 14px;padding:0 6px}
.goal-card .week small{font-size:10.5px}
.goal-card .goal-head{display:flex;align-items:center;gap:14px}
.goal-card .ring{transform:none;margin:0}
.goal-card .eb{font-size:10.5px;font-weight:700;letter-spacing:1.5px;color:var(--navy)}
.goal-card .ttl{font-family:var(--f-head);font-size:21px;color:var(--ink);margin-top:3px}
.goal-card .quiet{display:block;margin-top:14px;padding:13px;border-radius:14px;border:1.5px solid var(--navy);color:var(--navy);text-align:center;font-weight:700;font-size:15px}
@media (max-width:900px){.two,.kanji-two{grid-template-columns:minmax(0,1fr)}.two .visual{order:1}}

/* The design's static page ends here. Below: what the real page adds around it. */
/* The page's markup is one server-rendered block; its wrapper must not box anything. */
.page-root{display:contents}
/* The waitlist form (WaitlistForm) mounts into this slot in the CTA. */
.wl-slot{width:100%;max-width:480px}

/* Licenses page (the design's "Licenses.html"). */
.lic{max-width:680px;margin:0 auto;padding:clamp(48px,7vw,96px) 28px}
.lic h1{font-family:var(--f-head);font-weight:500;font-size:clamp(30px,4vw,40px);color:var(--ink);margin:0 0 10px}
.lic .lede{font-size:17px;color:var(--muted);margin:0 0 40px}
.lic dl{margin:0;display:grid;grid-template-columns:minmax(0,1fr);gap:22px}
.lic dt{font-family:var(--f-head);font-weight:500;font-size:19px;color:var(--ink)}
.lic dd{margin:6px 0 0;font-size:15.5px;line-height:1.6;color:var(--text)}
.lic a{color:var(--navy)}.lic a:hover{color:var(--flag-red)}
.lic .back{display:inline-block;margin-top:40px;font-size:14.5px}

/* Photo reader: the page image takes whatever height is left over, so anything
   below it that changes height re-crops the photo under the OCR boxes. Hold both
   slots steady: the hint sits in the (empty) text slot instead of adding its own
   row, the text slot keeps one line's height, and the gloss row keeps room for
   a wrapped reading (ケーキセット / サンドイッチ wrap theirs). */
.live-reader.photo .page{position:relative}
.live-reader.photo .page-hint{position:absolute;left:0;right:0;top:100%}
.live-reader.photo .rd-text{min-height:calc(15px * 1.9 + 10px)}
.live-reader.photo .wb-row{min-height:calc(20px * 1.35 + 8px + 13px * 1.35)}

/* Beta sign-up: the optional "how did you hear" field takes its own row under email + button. */

/* ---- One section, one screen (phones) ----
   Two problems, one cause. The panel used to be exactly as tall as the stage
   it was showing, and the stages are not the same height - the import sheet is
   167px taller than the reader - so changing step changed the document height,
   the browser re-clamped the scroll, and the step card under your thumb jumped
   157px down the screen. Here every stage is laid out in the same grid cell,
   including the hidden ones, so the panel is always as tall as its TALLEST
   stage: switching step cannot change any height, and no stage is clipped to
   fit another. The section is then at least one screenful, so scroll snapping
   (below) lands you on a whole section rather than between two. */
@media (max-width:560px){
  .sec.block{
    min-height:calc(100svh - var(--hdr-h));
    display:flex;
    align-items:stretch;
    padding-block:clamp(18px,3.5vw,44px);
  }
  .sec.block>.wrap{
    width:100%;
    display:flex;
    flex-direction:column;
    justify-content:center;
    min-height:0;
  }
  /* align-items:center carries over from the desktop grid; in a column it
     shrink-wraps every child, which collapses the panel to its border */
  .two{display:flex;flex-direction:column;align-items:stretch;gap:0}
  .two .visual{margin-top:12px}
  /* fit-panel.js may scale the panel to claw back an overrun; keep it centred */
  .phone{height:auto;margin-inline:auto}
  .phone .scr{flex:none;display:grid}
  .phone .view{grid-area:1/1;position:relative;inset:auto}
  .phone .view[hidden]{display:block;visibility:hidden}
  /* The page image sizes itself from its own aspect ratio, so the reader came
     out 123px taller for a photo than for text. That is a height change INSIDE
     one view, which the grid stack above cannot absorb - tapping "Take a photo"
     moved the whole page. Out of flow the image contributes no height at all:
     the reader body is whatever the panel leaves, the same for every source,
     and the photo crops into it (it is already object-fit:cover). */
  /* The import sheet fills the whole panel on a phone, so the dimmed library
     behind it is covered - except at the two top corners, where the sheet's
     24px radius sits inside the panel's 20px one and leaves a crescent for the
     backdrop to show through. It read as a smudge of shadow over the top edge.
     Nothing is behind the sheet to dim here, so the backdrop goes. */
  .v-imp .backdrop{display:none}
  .live-reader .page-in{position:relative}
  .live-reader .page-img{
    position:absolute;top:0;bottom:0;left:50%;transform:translateX(-50%);
    height:100%;width:auto;max-width:100%;
  }
}
/* review demo: the "thinking" pause before the word card's tap */
.rv-think{position:absolute;z-index:7;pointer-events:none;font-size:22px;line-height:1;padding:7px 9px;border-radius:16px 16px 16px 4px;background:var(--card);border:1px solid var(--border);box-shadow:0 6px 16px rgba(37,57,86,.14);opacity:0;transform:translate(-50%,-50%) scale(.7);transition:opacity .3s ease,transform .35s cubic-bezier(.2,.7,.2,1)}
.rv-think.on{opacity:1;transform:translate(-50%,-50%) scale(1);animation:tip-bob 1.2s ease-in-out .35s infinite}

/* ---- Step rail: on a phone the numbered steps swipe sideways ----
   Stacked, a section's 3-4 steps are ~380px tall, so they push the phone they
   describe off the bottom of the screen - you read the steps, then scroll to a
   demo whose captions you can no longer see. Across, one step is centred and
   its neighbours peek in from both edges: the rail reads as swipeable, and the
   phone stays in view. A swipe selects the step exactly as a tap does
   (steps-rail.js), so the demo follows the card you land on. Phones only -
   the same breakpoint at which the phone loses its bezel. */
@media (max-width:560px){
  .mt-steps{
    --rail-pad:20px;   /* .wrap's own inline padding, cancelled so the cards
                          can peek all the way to the block's edge */
    --rail-inset:8px;  /* .block's inset from the viewport */
    --rail-card:74vw;
    display:flex;
    gap:10px;
    max-width:none;
    margin:16px 0 0;
    margin-inline:calc(-1 * var(--rail-pad));
    /* Every card centres, which needs half a gap of padding at each end so the
       first and last can reach the middle too. But nothing ever peeks into the
       gap before the first card, so step 1 sat 26px inside the headline and the
       panel below it and read as misaligned. Give that end the page's own
       margin instead: card 1 rests in line with everything else (its centred
       position falls off the left edge, so the browser clamps it there), while
       every card after it still centres with neighbours peeking both sides. */
    padding-inline:calc((100vw - 2*var(--rail-inset) - var(--rail-card))/2);
    padding-inline-start:var(--rail-pad);
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scroll-snap-type:x mandatory;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .mt-steps::-webkit-scrollbar{display:none}
  .mt-steps li,.mt-steps li:last-child{
    flex:0 0 var(--rail-card);
    scroll-snap-align:center;
    padding:13px 15px 14px;
    border:1.5px solid var(--border);
    border-radius:16px;
    background:var(--card-raised);
    opacity:.52;
    transform:scale(.95);
    transition:opacity .35s ease,transform .35s ease,border-color .35s ease;
  }
  .mt-steps li.done{opacity:.62}
  .mt-steps li.on{opacity:1;transform:none;border-color:var(--navy)}
  .mt-steps b{font-size:16px}
  .mt-steps small{font-size:13px;margin-top:2px}
}

/* ---- Starting from nothing: the three cards swipe sideways (phones) ----
   Stacked, the cards made the section ~1.7 screens tall, so you scrolled down
   through them one at a time - and the scroll that brought the last card to
   the middle of the screen went on to settle you onto Pricing. Across, the
   section is one screen like the ones above it, and you move between the
   cards the way you move between steps: a swipe, with the next card peeking
   in from the edge. Cards rest in line with the headline rather than centred,
   so the first one does not sit indented under it. */
@media (max-width:560px){
  .wgrid3{
    --rail-pad:20px; /* .wrap's own inline padding, cancelled so the cards
                        run to the block's edge */
    display:flex;
    gap:12px;
    margin-inline:calc(-1 * var(--rail-pad));
    padding-inline:var(--rail-pad);
    scroll-padding-inline:var(--rail-pad);
    /* the cards cast a deep shadow; a scroller clips whatever overflows it */
    padding-block:4px 40px;
    margin-bottom:-36px;
    overflow-x:auto;
    overscroll-behavior-x:contain;
    scroll-snap-type:x mandatory;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  .wgrid3::-webkit-scrollbar{display:none}
  /* sized off the rail, so the next card always peeks ~32px in at the edge */
  .wgrid3 .world{flex:0 0 calc(100% - 24px);scroll-snap-align:start}
  /* the reveal observer fires when a card scrolls into view, and the cards
     off to the side never do until you swipe to them - so the next card
     showed no peek, and each one faded up only after you arrived. On the
     rail they arrive with the first (each keeps its own stagger). */
  .wgrid3:has(.world.in) .world{opacity:1;transform:none}
  /* a lift on hover is a desktop affordance; on a swipe it just jitters */
  .wgrid3 .world:hover{transform:none}
}

/* ---- Settle on whole sections ----
   Reverses the design's "no snap" note in site-v7.css (2026-09-21): free
   scrolling let you come to rest half-way between two sections, with the step
   captions on one screen and the phone they describe on the next.
   The settle itself is snap-soft.js, not `scroll-snap-type` - CSS snapping
   lands with a jolt and gives no way to choose its curve. No snap-type here,
   so the browser's own snap can't fight the script's. Phones only (2026-09-23):
   on a desktop it only ever took the scroll away from you. */
:root{--hdr-h:72px}
/* the header is sticky, so an anchored section starts below it */
html{scroll-padding-top:var(--hdr-h)}
@media (max-width:560px){
  :root{--hdr-h:64px}
  /* a step rail is a horizontal scroller inside a vertical snap container;
     without this a swipe sideways can arm the page's own snap */
  .mt-steps{scroll-snap-type:x mandatory}
}

/* ---- Kanji practice: right, and done ----
   Drawing it correctly ends the card. A tick on the pad says so; it used to
   open a reveal card carrying the whole story, which is the answer to a
   question you had just answered correctly. The story stays one tap away on
   "Show hint" for when you cannot recall it. */
.rk-tick{
  position:absolute;right:-9px;bottom:-9px;width:36px;height:36px;padding:6px;
  border-radius:50%;background:var(--matcha);box-shadow:0 2px 10px rgba(31,29,32,.14);
  opacity:0;transform:scale(.6);
  transition:opacity .22s ease,transform .34s cubic-bezier(.2,.7,.2,1);
}
.rk-tick path{stroke:#fff}
.rk-canvas.ok{border-color:var(--matcha)}
.rk-canvas.ok .rk-tick{opacity:1;transform:none}

/* The reader's chapter progress bar reads as a stray blue border once the
   phone loses its bezel - the top of the panel has no such line. The chapter
   position is already on the title bar ("第3話 · 62%"). */
@media (max-width:560px){
  .live-reader .ch-prog{display:none}
  /* With that bar and the home indicator both gone, the gloss is the last
     thing in the panel, and its 6px of bottom padding sat on the very edge. */
  .live-reader .wb{padding-bottom:15px}
}
.phone .rk-hint[hidden]{display:none}

/* Revealing the word adds its English line under the sentence, which grew the
   card by 44px and moved the step rail above it. Hold the line's space from
   the start - it is already there in the markup - and fade it in instead. */
.rc-en{display:block;visibility:hidden;opacity:0;transition:opacity .22s ease}
.rv-word.revealed .rc-en{visibility:visible;opacity:1}
