/* Screenshot-requested presentation refinements, scoped to existing UI owners.
   No learning glyph font, reward rule, audio content, or menu order is changed. */

/* Shared footer: two rows on desktop, a separate usage row on phones. */
body :is(.intro-footer,[data-ui="siteFooterStyle"]) {
  display:flex!important; flex-direction:column!important; align-items:center!important;
  justify-content:center!important; gap:8px!important; text-align:center!important;
  padding-block:22px 28px!important; height:auto!important; line-height:1.6!important;
}
body :is(.intro-footer,[data-ui="siteFooterStyle"]) .footer-tagline {
  display:block; margin:0; font-size:14px; line-height:1.6;
}
body :is(.intro-footer,[data-ui="siteFooterStyle"]) .footer-credits {
  display:flex!important; flex-flow:row wrap; align-items:baseline; justify-content:center;
  gap:0; margin:0!important; max-width:100%; font-size:13px!important; line-height:1.7!important;
}
.footer-author { white-space:nowrap; }
.footer-penname { color:#5b7166; }
.intro-footer .footer-penname { color:#bccdbd; }
.footer-usage { display:inline; white-space:nowrap; }
.footer-separator { white-space:pre; }

/* One understated, warm start button throughout the introduction. */
body .intro-header .header-start,
body .story a:is(.primary,.start),
body .story .reopen-pack {
  display:inline-flex; align-items:center; justify-content:center;
  min-height:44px; height:auto; padding:10px 20px;
  border:1px solid #b9c6b2; border-radius:15px;
  background:linear-gradient(180deg,#fffdf6,#f0f2e7); color:#375344;
  box-shadow:inset 0 1px 0 #fff,0 3px 0 #dce3d4,0 6px 12px #254c420a;
  font:500 16px/1.35 IntroUI,'Malgun Gothic',sans-serif;
  letter-spacing:-.02em; text-decoration:none; white-space:nowrap; transform:none;
  transition:background .15s ease,box-shadow .15s ease;
}
body .story .reopen-pack[hidden] { display:none; }
body .intro-header .header-start::after,
body .intro-header .header-start-arrow { display:none; content:none; }
body .story .reopen-pack:hover,
body .intro-header .header-start:hover { background:#e9efe1; }
body .story .reopen-pack:active,
body .intro-header .header-start:active { box-shadow:inset 0 1px 0 #fff,0 1px 0 #dce3d4; }
body .story .reopen-pack:focus-visible,
body .intro-header .header-start:focus-visible { outline:3px solid #347d63; outline-offset:3px; }

/* This action remains the existing #materials link. */
body .ttb-related-materials .ttb-related-all {
  display:flex; align-items:center; justify-content:center; align-self:center;
  min-height:44px; width:max-content; max-width:100%; margin:20px auto 8px;
  padding:11px 24px; border:1px solid #c1cfb2; border-radius:18px;
  background:linear-gradient(155deg,#f6f8eb,#e3ebd4); color:#315548;
  box-shadow:inset 1px 1px 0 #fffef7,0 4px 0 #c5d1b8,0 8px 14px #254c420c;
  font-family:inherit; font-size:14px; font-weight:600; line-height:1.45;
  text-align:center; text-decoration:none; white-space:nowrap;
}
body .ttb-related-materials .ttb-related-all:hover { background:#e9f0dc; }
body .ttb-related-materials .ttb-related-all:focus-visible { outline:3px solid #347d63; outline-offset:4px; }
body .ttb-related-materials .ttb-related-all:active { box-shadow:inset 1px 1px 0 #fffef7,0 1px 0 #c5d1b8; }
.ttb-material-price { display:block; margin-top:5px; font-size:13px; font-weight:600; color:#3d6455; }

/* Card detail close: keep its position and 44px target; shrink the visible circle/X. */
body .ddori-collectible-card[role="button"] { cursor:pointer; }
body .ddori-collectible-card[role="button"]:focus-visible { outline:3px solid #bacfb4; outline-offset:4px; }
body .ddori-collectible-dialog .ddori-collectible-close {
  position:relative; top:-6px; isolation:isolate; display:block;
  width:44px; height:44px; min-width:44px; min-height:44px;
  padding:0; margin:0 0 -4px auto; border:0; border-radius:50%;
  background:radial-gradient(circle at center,#eff0ee 0 16px,transparent 16.5px); color:transparent; font-size:0; box-shadow:none;
  touch-action:manipulation;
}
body .ddori-collectible-dialog .ddori-collectible-close::before,
body .ddori-collectible-dialog .ddori-collectible-close::after {
  content:""; position:absolute; z-index:1; inset:auto;
  /* November 13 (owner reference): a longer X that keeps the fine line. Colours unchanged. */
  left:calc(50% - 9px); top:calc(50% - .75px);
  width:18px; height:1.5px; border:0; border-radius:1px; box-shadow:none;
  background:#48504d; transform:rotate(45deg); pointer-events:none;
}
body .ddori-collectible-dialog .ddori-collectible-close::after { transform:rotate(-45deg); }
body .ddori-collectible-dialog .ddori-collectible-close:hover { background:radial-gradient(circle at center,#e3e6e1 0 16px,transparent 16.5px); }
body .ddori-collectible-dialog .ddori-collectible-close:focus-visible { outline:3px solid #bacfb4; outline-offset:3px; }
/* Keep the grip itself (pointer capture/touch-action). Hide only its decoration. */
body .ttori-pack-grip { color:transparent!important; font-size:0!important; }
body .ttori-pack-grip > span { visibility:hidden; }
body .ttori-pack-grip-arrow { display:none!important; }

/* The logo artwork has a lower optical center than the adjacent Korean text. */
body .literacy-closing .closing-logo { vertical-align:middle; top:0; margin:0 3px 0 0; }
body .literacy-closing .closing-line > span { position:relative; top:5px; }
.storybook-two-lines > span { white-space:nowrap; }
.eyebrow-with-footsteps { display:flex; align-items:center; gap:8px; }
.eyebrow-footsteps { flex:none; display:inline-flex; align-items:center; justify-content:center; width:20px; height:20px; font:20px/1 sans-serif; }

@media (min-width:801px) {
  body .welcome .reading-tori {
    width:92%; height:auto; max-height:310px; align-self:center; justify-self:center;
    transform:translate(-8px,-48px);
  }
  body .welcome .copy.title-slot { transform:translate(24px,-42px); }
  body .literacy-book .scene-inner {
    width:min(1180px,100%); grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:clamp(26px,3.5vw,48px); padding-inline:clamp(12px,2vw,28px);
  }
  body .literacy-book .literacy-scene-copy {
    padding-left:clamp(10px,1.5vw,22px); font-size:clamp(24px,2.35vw,32px); max-width:100%;
  }
  body .learn .scene-inner { width:min(1180px,100%); }
  body .learn .page-content {
    grid-template-columns:minmax(0,1fr) minmax(0,1.36fr);
    gap:clamp(28px,3.7vw,52px); padding-inline:clamp(12px,2vw,28px);
  }
  body .learn .copy { padding-left:12px; }
  body .sticker .eyebrow { font-size:clamp(20px,1.65vw,23px); letter-spacing:0; }
  body .gift .eyebrow { font-size:clamp(20px,1.65vw,24px); letter-spacing:0; }
  body .gift .copy h2 { font-size:clamp(36px,3.6vw,52px); line-height:1.33; }
  body .gift .page-content { gap:6%; padding-inline:clamp(30px,4vw,60px); }
  body[data-ttobak-screen="stage-1"] .tt-learning-app [data-ui="s1BoardFooterStyle"] {
    margin-top:12px!important; padding-top:14px!important;
  }
}
/* Dynamic date content is owned by adventure-logic.mjs; style only. */
body .adventure-intro .adventure-range { font-size:17px!important; line-height:1.5; }

@media (max-width:800px) {
  body .intro-header { min-height:74px; padding:10px 16px; gap:12px; background:#f6f1e6; }
  body .story .reopen-pack,
  body .intro-header .header-start { min-height:44px; padding:9px 14px; font-size:14px; border-radius:14px; }
  body .welcome.story-scene {
    min-height:calc(100vh - 74px); min-height:calc(100svh - 74px);
    padding:clamp(22px,4svh,40px) 18px; display:grid; place-items:center;
  }
  body .welcome .scene-inner {
    width:100%; max-width:560px; display:flex; flex-direction:column;
    align-items:center; justify-content:center; gap:18px; background:none;
    min-height:0; max-height:none;
  }
  body .welcome .mobile-book { display:none; }
  body .welcome .page-content { display:contents; }
  body .welcome .reading-tori {
    order:1; width:min(68vw,290px,39svh); height:auto; max-height:none;
    align-self:center; margin:0; transform:none;
  }
  body .welcome .copy.title-slot { order:2; width:100%; margin:0; padding:0; transform:none; }
  body .welcome .title-spacer { display:none; }
  body .welcome .copy h1.paper-title { margin:0; transform:none; }
  body .welcome .paper-title img { width:min(90%,320px); max-width:100%; height:auto; margin:0 auto; }
  body .literacy-intro { padding-top:58px; }
  body .literacy-closing .closing-line > span { top:4px; }
  body .literacy-book .literacy-scene-copy { font-size:clamp(20px,5.8vw,24px); }
}
@media (max-width:619px) {
  body .ttobak-home .home-actions {
    display:grid!important; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px!important;
    width:min(360px,calc(100% - 32px)); inset-inline:0!important;
    margin-inline:auto!important; gap:8px!important; align-items:center!important;
    flex-wrap:nowrap!important; box-sizing:border-box;
  }
  body .ttobak-home .home-actions :is(.start-button,.continue-button,.ttobak-music-toggle) {
    grid-column:auto!important; justify-self:stretch!important;
    width:100%!important; min-width:0!important; min-height:48px!important;
    height:48px!important; padding:10px 8px!important; font-size:16px!important;
    line-height:1.4!important; white-space:nowrap!important;
  }
  body .ttobak-home .home-actions .ttobak-music-toggle { width:44px!important; min-width:44px!important; padding:0!important; }
  body .mobile-menu-header,
  body .tt-learning-app :is([data-ui="headerStyle"],.learning-header).mobile-menu-header {
    grid-template-columns:minmax(0,1fr) 44px 68px!important;
    column-gap:8px!important; align-items:center!important;
  }
  body .mobile-menu-current { display:none!important; }
  body .mobile-menu-toggle, body .mobile-menu-header > .ttobak-music-toggle {
    min-height:44px!important; height:44px!important; padding:0!important;
    border:1px solid #c7d2c0!important; border-radius:14px!important;
    background:linear-gradient(180deg,#fffef8,#eef2e7)!important; color:#365b49!important;
    box-shadow:inset 0 1px 0 #fff,0 2px 0 #e0e7d8!important;
  }
  body .mobile-menu-toggle { grid-column:3!important; grid-row:1!important; width:68px!important; font-size:14px!important; }
  body .mobile-menu-header > .ttobak-music-toggle { grid-column:2!important; grid-row:1!important; width:44px!important; min-width:44px!important; }
  body .mobile-menu-header > :is(.learning-home-link,[data-ui="learningBrandStyle"]) { grid-column:1!important; grid-row:1!important; min-width:0!important; }
  /* Only hide the redundant summary outside the menu, never reorder menu links. */
  body .mobile-menu-header > .learning-entry-button { display:none!important; }
  body[data-ttobak-screen="stage-1"] .tt-learning-app [data-ui="s1PlaqueLabelStyle"] { position:relative; top:-4px; }
  body[data-ttobak-screen="stage-1"] .tt-learning-app [data-ui="s1GuideStyle"] {
    display:flex!important; align-items:center!important; justify-content:center!important;
    width:100%!important; max-width:100%!important; margin-inline:auto!important; gap:8px!important;
  }
  body[data-ttobak-screen="stage-1"] .tt-learning-app [data-ui="s1GuideBubbleStyle"] {
    flex:0 1 190px!important; width:190px!important; max-width:calc(100% - 62px)!important;
    min-width:0!important; min-height:0!important; height:auto!important;
    margin:0!important; padding:8px 10px!important; border-radius:16px!important;
    text-align:center!important; white-space:normal!important; overflow:visible!important;
  }
  body[data-ttobak-screen="stage-1"] .tt-learning-app [data-ui="s1GuideTitleStyle"] { font-size:14px!important; line-height:1.45!important; }
  body[data-ttobak-screen="stage-1"] .tt-learning-app [data-ui="s1GuideTextStyle"] { font-size:12px!important; line-height:1.5!important; }
  body :is(.intro-footer,[data-ui="siteFooterStyle"]) .footer-credits {
    flex-direction:column; align-items:center; justify-content:center; gap:4px;
    font-size:clamp(12px,3.2vw,14px)!important;
  }
  body :is(.intro-footer,[data-ui="siteFooterStyle"]) .footer-usage { display:block; }
  body :is(.intro-footer,[data-ui="siteFooterStyle"]) .footer-separator { display:none; }
  body .ddori-collectible-dialog .ddori-collectible-close { top:-8px; }
}
@media (forced-colors:active) {
  body .ddori-collectible-dialog .ddori-collectible-close { background:ButtonFace; border:1px solid ButtonText; }
  body .ddori-collectible-dialog .ddori-collectible-close::before,
  body .ddori-collectible-dialog .ddori-collectible-close::after { background:ButtonText; }
}
@media (prefers-reduced-motion:reduce) { body .intro-header .header-start { transition:none; } }

/* Reading glyphs and composition groups share the same compact column geometry. */
body[data-ttobak-screen="stage-8"] .tt-learning-app [data-ui="wordBigCardStyle"] {
  --word-syllable-count:3; --word-column-width:76px; --word-column-gap:8px;
  --word-layout-width:calc(var(--word-syllable-count) * var(--word-column-width) + (var(--word-syllable-count) - 1) * var(--word-column-gap));
}
body[data-ttobak-screen="stage-8"] .tt-learning-app [data-syllable-count="1"] { --word-syllable-count:1; }
body[data-ttobak-screen="stage-8"] .tt-learning-app [data-syllable-count="2"] { --word-syllable-count:2; }
body[data-ttobak-screen="stage-8"] .tt-learning-app [data-syllable-count="4"] { --word-syllable-count:4; }
body[data-ttobak-screen="stage-8"] .tt-learning-app :is(.word-reading-syllables,.word-composition) {
  width:min(100%,var(--word-layout-width))!important; max-width:100%; min-width:0; margin-inline:auto;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-composition {
  container-type:inline-size; overflow:visible;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app :is(.word-reading-syllables,[data-ui="wordSyllableRowStyle"]) {
  display:grid!important; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr);
  align-items:start!important; justify-content:center!important;
  min-width:0; gap:var(--word-column-gap)!important; margin-inline:auto;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app [data-ui="wordSyllableRowStyle"] { width:100%; }
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-reading-accessible {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; border:0;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-reading-syllable {
  display:block; min-width:0; text-align:center; letter-spacing:0; white-space:nowrap;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-composition-syllable {
  display:flex; flex-direction:column; align-items:center; justify-content:flex-start;
  min-width:0; width:100%; max-width:none; padding:3px 0; gap:7px; box-sizing:border-box;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-composition-parts {
  display:grid; grid-template-columns:1.1em .55em 1.1em .55em 1.1em; justify-content:center;
  align-items:center; justify-items:center; width:100%; max-width:7em; min-width:0;
  font-size:15px; font-size:clamp(12px,calc((100cqw - (var(--word-syllable-count) - 1) * var(--word-column-gap)) / var(--word-syllable-count) / 4.6),17px); line-height:1.65;
  white-space:nowrap; overflow-wrap:normal; word-break:normal; letter-spacing:0; overflow:visible;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-composition-slot {
  display:block; min-width:0; width:100%; min-height:1.65em; text-align:center; overflow:visible;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-composition-sign {
  font-family:'Ttobak UI',sans-serif; font-size:.75em; line-height:1.65;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-composition-sign[data-empty="true"] {
  visibility:hidden;
}
/* Keep the outer three-jamo width; center only the visible two-jamo sequence. */
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-composition-parts[data-no-final="true"] {
  grid-template-columns:1.1em .55em 1.1em;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-composition-parts[data-no-final="true"] > :nth-child(4),
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-composition-parts[data-no-final="true"] > :last-child {
  display:none;
}
/* A closed explanation leaves the badge near the card's top, inside its border. */
body[data-ttobak-screen="stage-8"] .tt-learning-app [data-ui="wordBigCardStyle"]:has(.word-composition:not([open])) {
  position:relative; padding-top:56px!important;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app [data-ui="wordBigCardStyle"]:has(.word-composition:not([open])) [data-ui="wordBadgeRowStyle"] {
  position:absolute; top:12px; inset-inline:15px; width:auto!important; min-width:0;
}
/* Slimmer introduction replay action, retaining the start button's finish. */
body .story .reopen-pack { position:relative; min-height:40px; height:40px; padding:6px 16px; }
body .story .reopen-pack::after { content:""; position:absolute; inset:-2px 0; }

/* Give stage-nine sentence choices room between rows without shrinking touch targets. */
body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="sentenceListStyle"] {
  row-gap:12px!important;
}
body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="sentenceListStyle"] button[data-ui="sen.style"] {
  box-sizing:border-box; min-height:44px!important;
  padding-top:6px!important; padding-bottom:6px!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.45),0 2px 0 rgba(64,91,78,.22)!important;
  transform:none!important;
}
/* Distinguish sentence actions while retaining their labels and focus outline. */
body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="stageControlRowStyle"] > button:nth-child(1) {
  background:#e4f1ec!important; color:#285b50!important; border-color:#bcd4c9!important;
}
body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="stageControlRowStyle"] > button:nth-child(2) {
  background:#286f68!important; color:#fffdf5!important; border-color:#225e58!important;
}
body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="stageControlRowStyle"] > button:nth-child(3) {
  background:#bddfd2!important; color:#214f45!important; border-color:#91bbac!important;
}
body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="stageControlRowStyle"] > button:disabled {
  opacity:.6; cursor:default!important;
}
@media (min-width:620px) {
  body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="activityScrollStyle"] {
    display:grid!important;
    grid-template-columns:minmax(0,1fr);
    gap:16px;
  }
  body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="sentenceStageStyle"] {
    display:contents!important;
  }
  body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="sentenceStageStyle"] > div:not([data-ui="stageControlRowStyle"]) {
    grid-column:1 / -1; justify-self:center; min-width:0;
  }
  body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="stageControlRowStyle"] {
    grid-column:1; grid-row:4; align-self:center; width:100%; min-width:0;
    display:grid!important; grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    column-gap:12px!important;
  }
  body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="stageControlRowStyle"] > button:first-child {
    justify-self:end;
  }
  body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="stageControlRowStyle"] > button:last-child {
    justify-self:start;
  }
  body[data-ttobak-screen="stage-9"] .tt-learning-app .learning-reading-complete-bar {
    grid-column:1; grid-row:4; align-self:center; justify-self:end; width:max-content; margin:0;
  }
}
@media (forced-colors:active) {
  body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="stageControlRowStyle"] > button:nth-child(n) {
    background:ButtonFace!important; color:ButtonText!important; border-color:ButtonText!important;
  }
  body[data-ttobak-screen="stage-9"] .tt-learning-app [data-ui="stageControlRowStyle"] > button:disabled {
    color:GrayText!important; border-color:GrayText!important;
  }
}

/* The note uses the card width; syllable rows retain their compact geometry. */
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-composition {
  width:100%!important;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app [data-ui="wordSyllableRowStyle"] {
  width:min(100%,var(--word-layout-width)); container-type:inline-size;
}
body[data-ttobak-screen="stage-8"] .tt-learning-app .word-composition-note {
  width:100%; margin-inline:0; white-space:nowrap;
  font-size:11px; font-size:clamp(11px,5.2cqw,12px); letter-spacing:-.015em;
}

/* Introduction review: use the third illustration's existing desktop body scale. */
@media (min-width:801px) {
  body .story { --intro-description-size:28px; }
  body .literacy-scene-copy,
  body .literacy-book .literacy-scene-copy,
  body .learn .copy p:not(.eyebrow),
  body .sticker .copy p:not(.eyebrow) {
    font-size:var(--intro-description-size); line-height:1.85;
  }
  body .literacy-closing .closing-line {
    font-family:IntroUI,'Malgun Gothic',sans-serif; font-weight:500;
    font-size:34px; letter-spacing:-.025em;
  }
}
@media (min-width:801px) and (max-width:1100px) {
  body .story { --intro-description-size:25px; }
  body .literacy-closing .closing-line { font-size:31px; }
}
/* Keep the approved three lines together even on a 320px phone. */
body .gift .copy { container-type:inline-size; }
body .gift .copy h2 {
  font-size:clamp(20px,7.5cqw,42px); line-height:1.4;
}
body .gift .copy h2 > span { display:block; white-space:nowrap; }

/* Match the stage-five listen button to the learning board above it. */
body[data-ttobak-screen="stage-5"] .tt-learning-app [data-ui="s5ControlRowStyle"] {
  grid-template-columns:minmax(0,1fr) 168px!important;
  column-gap:20px!important;
}
body[data-ttobak-screen="stage-5"] .tt-learning-app [data-ui="s5ListenBtnStyle"] {
  grid-column:1!important; grid-row:1!important;
  display:flex!important; align-items:center!important; justify-content:center!important;
  width:100%!important; min-width:0!important; text-align:center!important;
}
@media (min-width:620px) {
  /* Share the existing control row without moving either button in the DOM. */
  body[data-ttobak-screen="stage-5"] .tt-learning-app [data-ui="activityScrollStyle"] {
    display:grid!important;
    grid-template-columns:minmax(0,1fr) 168px;
    gap:16px 20px;
  }
  body[data-ttobak-screen="stage-5"] .tt-learning-app [data-ui="s5StageStyle"] {
    display:contents!important;
  }
  body[data-ttobak-screen="stage-5"] .tt-learning-app [data-ui="s5StageStyle"] > div {
    grid-column:1 / -1;
  }
  body[data-ttobak-screen="stage-5"] .tt-learning-app [data-ui="s5ControlRowStyle"] {
    grid-row:3;
  }
  body[data-ttobak-screen="stage-5"] .tt-learning-app .learning-reading-complete-bar {
    grid-column:2; grid-row:3; align-self:center; margin:0;
  }
}
@media (max-width:619px) {
  body[data-ttobak-screen="stage-5"] .tt-learning-app [data-ui="s5ControlRowStyle"] {
    grid-template-columns:minmax(0,1fr)!important;
  }
}

/* A still pearl finish for the card replay; keep its existing 44px touch area. */
body .story #reopen-pack {
  border-color:#c7c5da;
  background:
    linear-gradient(125deg,transparent 18%,#ffffff91 33%,#ffffff1a 46%,#ffffff75 59%,transparent 75%),
    linear-gradient(110deg,#f5e5f1 0%,#dfebfa 24%,#ddf0e7 46%,#fbefce 68%,#ece0f6 88%,#e4f1ef 100%);
  color:#294b42;
  box-shadow:inset 0 1px 0 #ffffffd9,inset 0 -1px 0 #ffffff73,0 3px 0 #b8c2bf,0 6px 12px #0b271b1a;
  animation:none; transition:none;
}
body .story #reopen-pack:hover {
  border-color:#b2b2ce;
  box-shadow:inset 0 1px 0 #fff,inset 0 -1px 0 #ffffff91,0 3px 0 #acbcb7,0 6px 14px #0b271b24;
}
body .story #reopen-pack:active {
  box-shadow:inset 0 1px 3px #62716e24,0 1px 0 #b8c2bf;
}
body .story #reopen-pack:focus-visible { outline-color:#fff3d0; }
@media (forced-colors:active) {
  body .story #reopen-pack {
    background:ButtonFace; color:ButtonText; border-color:ButtonText; box-shadow:none;
  }
  body .story #reopen-pack:focus-visible { outline-color:Highlight; }
}

/* Direct entries preserve the introduction film and original Start flow. */
body .ttobak-home .home-library-link { display:inline-flex; align-items:center; justify-content:center; flex:none; width:58px; height:58px; padding:0; border:0; border-radius:999px; color:var(--ink); background:color-mix(in srgb,var(--sky),transparent 16%); text-decoration:none; touch-action:manipulation; }
body .ttobak-home .home-library-link svg { width:24px; height:24px; }
body .ttobak-home .home-library-link:hover { filter:brightness(1.08); }
body .intro-header .intro-entry-links { display:flex; align-items:center; gap:16px; margin-left:auto; }
@media(max-width:800px) {
 body .intro-header .intro-entry-links { gap:6px; }
 body .intro-header .intro-entry-links .header-start { padding:8px; font-size:14px; white-space:nowrap; }
}
@media(max-width:350px) {
 body .intro-header { gap:4px; }
 body .intro-header .intro-entry-links { gap:4px; }
 body .intro-header .intro-entry-links .header-start { padding:6px 5px; font-size:13px; }
}
@media(max-width:600px) and (max-aspect-ratio:6/5) {
 body .ttobak-home .home-actions { grid-template-columns:minmax(0,1fr) minmax(0,1fr) 44px 44px!important; width:min(412px,calc(100% - 32px)); }
 body .ttobak-home .home-actions .home-library-link { width:44px; height:48px; }
}
@media(max-width:360px) and (max-aspect-ratio:6/5) {
 body .ttobak-home .home-actions { grid-template-columns:minmax(0,1fr) 44px 44px!important; }
 body .ttobak-home .home-actions .start-button { grid-column:1 / -1!important; }
}
@media(max-height:620px) and (min-aspect-ratio:6/5) {
 body .ttobak-home .home-actions .home-library-link { width:48px; height:48px; }
}

/* Existing learning and book artwork, equal icon-only entry targets. */
body .intro-header .intro-entry-links .intro-entry-icon { width:44px; height:44px; min-width:44px; min-height:44px; flex:0 0 44px; padding:0; }
body .intro-header .intro-entry-icon :is(img,svg) { display:block; flex:none; width:28px; height:28px; object-fit:contain; }
body .intro-header .intro-entry-icon svg { width:24px; height:24px; }
