/* Habla Aquí — shared Mediterranean tokens; no network fonts or dependencies. */
:root {
  color-scheme:light;
  --cream:#f7f2e8; --paper:#fffcf6; --ink:#203547; --muted:#58646b; --line:#d9ddd7;
  --blue:#12668a; --blue-light:#e5f0f5; --navy:#153e56;
  --terracotta:#ad482b; --terracotta-light:#f9e9de; --yellow:#efc356; --yellow-ink:#785315; --yellow-light:#fbf0d2;
  --green:#4d6b38; --mint:#eaf0e2; --teal:#08716f; --teal-light:#e0f2ed; --coral:#ac453b; --coral-light:#fbe9e2;
  --shadow:0 6px 22px #20354708; --radius:20px; --small-radius:12px; --touch:48px;
  --situation:var(--blue); --tab-colour:var(--blue); --tab-wash:var(--blue-light);
}
* { box-sizing:border-box; }
button { min-width:44px; }
[hidden] { display:none!important; }
body { margin:0; background:var(--cream); color:var(--ink); font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; line-height:1.55; -webkit-tap-highlight-color:transparent; }
button,textarea,input,select { font:inherit; }
button { min-height:var(--touch); border:1px solid var(--line); border-radius:var(--small-radius); padding:11px 16px; background:var(--paper); color:var(--ink); font-weight:650; cursor:pointer; transition:background .15s,border-color .15s,transform .15s; }
button:hover { background:var(--blue-light); border-color:#8eafbb; }
button:active { transform:translateY(1px); }
button:disabled { cursor:default; color:#677279; background:#e8e9e4; border-color:#cbd1cd; transform:none; }
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible { outline:3px solid var(--blue); outline-offset:4px; }
svg { display:block; width:24px; height:24px; flex-shrink:0; }
.shell { width:min(calc(100% - 32px),760px); margin:auto; }
.masthead { display:flex; justify-content:space-between; align-items:center; padding:18px 0 14px; gap:16px; }
.brand { display:flex; align-items:center; gap:11px; color:var(--navy); text-decoration:none; line-height:1.05; letter-spacing:1.4px; font-weight:700; font-size:12px; }
.brand strong { display:block; font-size:21px; font-weight:850; letter-spacing:.4px; margin-top:4px; }
.brand-mark { width:49px; height:49px; display:block; border-radius:15px; box-shadow:0 3px 0 #d9e4e5; }
.brand-mark img { display:block; width:100%; height:100%; border-radius:15px; }
.avatar { border-radius:50%; width:46px; height:46px; min-height:46px; padding:0; background:var(--yellow-light); border:1px solid #dac58a; color:var(--yellow-ink); font-size:17px; }
.profile-panel,.memory-panel,.book-card,.flag-panel { background:var(--paper); border:1px solid var(--line); padding:20px; border-radius:var(--radius); margin:16px 0; box-shadow:var(--shadow); }
.profile-panel p { margin:8px 0; color:var(--muted); font-size:14px; }
.app-tools { display:flex; gap:6px; margin:4px 0; }
.app-tools button { min-height:44px; min-width:44px; white-space:nowrap; padding:7px 10px; border-radius:10px; font-size:12px; background:transparent; }
.app-tools #install-app { background:var(--blue-light); border-color:#b3cbd5; color:var(--navy); }
.app-status { min-height:17px; font-size:12px; color:var(--muted); margin:8px 0 16px; }
.prototype-banner { display:flex; align-items:center; gap:8px; padding:10px 0; font-size:12px; color:var(--muted); border-block:1px solid var(--line); }
.status-dot { width:7px; height:7px; border-radius:50%; background:var(--terracotta); flex-shrink:0; }
.eyebrow { display:block; font-size:11px; line-height:1.5; letter-spacing:1.1px; font-weight:750; text-transform:uppercase; color:var(--muted); }
h1,h2,h3,p { overflow-wrap:break-word; }
h1 { font-size:clamp(32px,6.5vw,43px); font-weight:780; line-height:1.14; letter-spacing:-1.4px; margin:10px 0 12px; }
.intro { margin:26px 0 22px; }
.intro p { margin:0; font-size:16px; color:var(--muted); }
.library-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:18px 0 12px; }
.library-heading strong { font-size:15px; }
.library-heading button { font-size:12px; padding:8px 10px; background:transparent; flex-shrink:0; }
.situation-picker { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:12px 0 16px; }
.situation-card { --tab-colour:var(--blue); --tab-wash:var(--blue-light); display:flex; flex-direction:column; align-items:flex-start; text-align:left; gap:6px; padding:13px 10px 10px; min-width:0; border:1px solid var(--line); border-radius:16px; border-top:3px solid var(--tab-colour); background:var(--paper); position:relative; }
.situation-card:hover { background:var(--tab-wash); border-color:var(--tab-colour); }
.situation-card[aria-current] { background:var(--tab-wash); border-color:var(--tab-colour); box-shadow:inset 0 0 0 1px var(--tab-colour); }
.situation-icon { display:grid; place-items:center; width:37px; height:37px; border-radius:11px; color:var(--tab-colour); background:var(--tab-wash); }
.situation-title { display:block; font-size:13px; line-height:1.3; font-weight:750; }
.situation-meta { margin-top:auto; font-size:11px; font-weight:550; line-height:1.45; color:var(--muted); }
.situation-description { font-size:12px; line-height:1.45; font-weight:450; color:var(--muted); }
.situation-status { font-size:11px; font-weight:500; color:var(--muted); }
.tab-people,[data-situation="neighbours"],[data-situation="family"] { --tab-colour:var(--terracotta); --tab-wash:var(--terracotta-light); }
.tab-home { --tab-colour:var(--green); --tab-wash:var(--mint); }
.tab-travel { --tab-colour:var(--blue); --tab-wash:var(--blue-light); }
.tab-leisure { --tab-colour:var(--teal); --tab-wash:var(--teal-light); }
.tab-life { --tab-colour:var(--yellow-ink); --tab-wash:var(--yellow-light); }
[data-situation="cafe"],[data-situation="restaurant"] { --tab-colour:var(--terracotta); --tab-wash:var(--terracotta-light); }
[data-situation="shops"],[data-situation="markets"] { --tab-colour:var(--yellow-ink); --tab-wash:var(--yellow-light); }
.situation-card[data-situation="shops"],.situation-card[data-situation="markets"] { border-top-color:var(--yellow); }
[data-situation="directions"],[data-situation="transport"],[data-situation="bus"],[data-situation="road"] { --tab-colour:var(--green); --tab-wash:var(--mint); }
[data-situation="hotel"] { --tab-colour:var(--coral); --tab-wash:var(--coral-light); }
.situation-card.is-finished .situation-status { color:var(--green); font-weight:700; }
.library-panel { padding:0; margin:0 0 24px; }
.library-hero { position:relative; isolation:isolate; padding:22px 20px 18px; overflow:hidden; border-radius:24px 24px 8px 8px; background:var(--navy); color:var(--paper); }
.library-hero .eyebrow { color:#d6e7ea; }
.library-hero h2 { font-size:clamp(28px,6vw,38px); line-height:1.13; letter-spacing:-1px; margin:9px 0; font-weight:750; max-width:90%; position:relative; z-index:1; }
.library-hero p { font-size:13px; margin:0 0 14px; color:#e0ebea; position:relative; z-index:1; }
.journey-sun { color:var(--yellow); position:absolute; right:-17px; bottom:12px; font-size:139px; line-height:1; z-index:0; opacity:.9; transform:rotate(15deg); }
.library-stats { display:flex; gap:7px 14px; flex-wrap:wrap; position:relative; z-index:1; color:var(--paper); font-size:11px; font-weight:650; }
.library-stats span { background:var(--navy); border:1px solid #5a7c87; padding:4px 7px; border-radius:6px; }
.resume-card { display:flex; align-items:center; gap:12px; text-align:left; width:100%; margin:15px 0 20px; padding:13px; background:var(--paper); box-shadow:var(--shadow); border-radius:16px; }
.resume-card>span:nth-child(2) { flex:1; min-width:0; }
.resume-card strong,.resume-card small,.resume-card>span:nth-child(2)>span { display:block; }
.resume-card small { color:var(--muted); font-size:11px; font-weight:550; }
.resume-card strong { font-size:15px; line-height:1.4; margin:2px 0; }
.resume-card>span:nth-child(2)>span { color:var(--blue); font-size:12px; }
.resume-icon { width:43px; height:43px; border-radius:12px; background:var(--blue-light); color:var(--blue); display:grid; place-items:center; flex-shrink:0; }
.library-panel label { margin:0 0 8px; font-size:17px; font-weight:750; color:var(--ink); }
.library-panel input { width:100%; min-height:50px; border:1px solid #b6c4c7; padding:12px 15px; border-radius:13px; background:var(--paper); color:var(--ink); font-size:16px; }
.library-groups { display:flex; gap:8px; overflow-x:auto; overscroll-behavior-inline:contain; padding:4px 3px 8px; margin:12px -3px; }
.library-groups button { flex-shrink:0; min-height:44px; font-size:12px; padding:7px 12px; border-radius:24px; background:transparent; }
.library-groups button[aria-pressed="true"] { background:var(--navy); border-color:var(--navy); color:var(--paper); }
.library-count { font-size:12px; color:var(--muted); margin:12px 0 8px; }
.library-tiles { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:0; }
.library-tiles .situation-card { min-height:186px; padding:17px 14px 13px; gap:8px; box-shadow:var(--shadow); border-radius:18px; }
.library-tiles .situation-icon { width:47px; height:47px; border-radius:14px; }
.library-tiles .situation-icon svg { width:27px; height:27px; }
.library-tiles .situation-title { font-size:17px; }
.library-tiles .situation-meta { margin-top:6px; }
.library-empty { padding:24px; border:1px dashed #aabdc4; border-radius:var(--radius); color:var(--muted); }
.library-open>.intro,.library-open>.lesson-card,.library-open>.lesson-route,.library-open>.book-toggle,.library-open>.book-card,.library-open>.review-footer,.library-open>.simulation-toggle,.library-open>.simulation-panel { display:none; }
.library-open>.library-heading>strong { font-size:12px; font-weight:550; color:var(--muted); }
.library-open .resume-card { margin:12px 0 16px; padding:11px 13px; }
.library-open .resume-card>span:nth-child(2)>span { display:none; }
.shell:has(.library-open) .prototype-banner { display:none; }
.situation-picker:not(.library-tiles) { display:flex; overflow-x:auto; overscroll-behavior-inline:contain; padding:4px 2px 8px; margin:8px -2px; }
.situation-picker:not(.library-tiles) .situation-card { flex-shrink:0; flex-direction:row; align-items:center; gap:8px; border-top-width:1px; padding:8px 11px; min-height:46px; border-radius:13px; }
.situation-picker:not(.library-tiles) .situation-icon { width:25px; height:25px; border-radius:7px; }
.situation-picker:not(.library-tiles) .situation-icon svg { width:19px; height:19px; }
.situation-picker:not(.library-tiles) .situation-meta { display:none; }
.lesson-route { border-block:1px solid var(--line); margin:16px 0; padding:3px 0; }
.lesson-route summary { cursor:pointer; min-height:48px; padding:11px 3px; font-size:14px; }
.lesson-route summary>span:first-child { font-weight:700; }
.route-label { color:var(--muted); font-size:12px; margin-left:7px; }
.lesson-ladder { display:grid; gap:8px; margin:8px 0 14px; }
.lesson-ladder button { display:flex; align-items:center; gap:12px; text-align:left; font-size:14px; padding:12px; }
.lesson-ladder button[aria-current] { border-color:var(--blue); background:var(--blue-light); }
.lesson-ladder small { display:block; font-size:12px; color:var(--muted); margin-top:3px; font-weight:450; }
.lesson-number { display:grid; place-items:center; width:31px; height:31px; border-radius:10px; background:var(--blue-light); color:var(--blue); flex-shrink:0; }
.lesson-card { border:1px solid var(--line); border-radius:24px; padding:23px; background:var(--paper); box-shadow:var(--shadow); }
.lesson-top { display:flex; gap:12px; align-items:center; }
.lesson-symbol { display:grid; place-items:center; width:44px; height:44px; border-radius:13px; color:var(--blue); background:var(--blue-light); flex-shrink:0; }
.lesson-top strong { font-size:15px; display:block; line-height:1.4; }
.lesson-top div>span { color:var(--muted); font-size:12px; }
.pace { margin-left:auto; white-space:nowrap; font-size:11px; padding:4px 8px; border-radius:20px; color:var(--green); background:var(--mint); }
.progress-track,.situation-progress { display:block; appearance:none; border:0; height:6px; border-radius:6px; overflow:hidden; width:100%; background:#e0e7e3; }
.progress-track { margin:21px 0; }
progress::-webkit-progress-bar { background:#e0e7e3; border-radius:6px; }
.progress-track::-webkit-progress-value { background:var(--blue); border-radius:6px; }
.progress-track::-moz-progress-bar { background:var(--blue); }
.situation-progress::-webkit-progress-value { background:var(--tab-colour); border-radius:6px; }
.situation-progress::-moz-progress-bar { background:var(--tab-colour); }
.steps { list-style:none; display:flex; justify-content:space-between; gap:8px; padding:0; margin:0 0 25px; font-size:12px; color:var(--muted); }
.steps li { display:flex; align-items:center; gap:6px; }
.steps li>span { display:grid; place-items:center; width:25px; height:25px; border:1px solid #bac9c8; border-radius:50%; font-size:11px; }
.steps li[aria-current] { color:var(--blue); font-weight:750; }
.steps li[aria-current]>span { background:var(--blue); border-color:var(--blue); color:var(--paper); }
.steps li.done>span { background:var(--mint); color:var(--green); border-color:#bacbaa; }
.sentence-bridge,.next-connection { border-left:3px solid #ccd7c0; padding:0 0 0 13px; margin-bottom:21px; }
.sentence-bridge p { font-size:14px; color:var(--muted); margin:7px 0; }
.previous-phrase { display:block; font-size:14px; color:var(--green); margin-top:8px; }
.phrase { padding:8px 0 5px; }
.phrase h2 { font-size:clamp(26px,6.1vw,35px); line-height:1.6; letter-spacing:-.6px; font-weight:730; margin:12px 0 22px; }
.phrase h2>span { border-radius:5px; padding:1px 3px; box-decoration-break:clone; -webkit-box-decoration-break:clone; }
.word-starter { color:#165b7b; background:#e7f0f4; }
.word-detail { color:#46612f; background:#eef1e8; }
.word-polite { color:#785315; background:#fcf0d4; }
.audio-controls { display:grid; gap:8px; margin:5px 0; }
.audio-controls .listen-main { display:flex; gap:12px; align-items:center; text-align:left; width:100%; background:var(--blue); border-color:var(--blue); color:var(--paper); border-radius:17px; min-height:80px; padding:14px; box-shadow:0 4px 0 #0c506e; }
.audio-controls .listen-main:hover { background:#0e597a; }
.audio-controls .listen-main:disabled { background:#e2e8e7; border-color:#bdcccb; color:#52636c; box-shadow:none; }
.listen-symbol { display:grid; place-items:center; border-radius:50%; background:#ffffff22; width:42px; height:42px; flex-shrink:0; font-size:18px; }
.listen-main>span:nth-child(2) { font-size:16px; line-height:1.3; }
.listen-main small { display:block; margin-top:5px; font-size:12px; font-weight:450; }
.sound-bars { display:flex; align-items:center; gap:3px; height:25px; margin-left:auto; }
.sound-bars i { width:3px; height:10px; background:currentColor; border-radius:3px; }
.sound-bars i:nth-child(2) { height:23px; }
.sound-bars i:nth-child(3) { height:16px; }
.sound-bars i:nth-child(4) { height:8px; }
.is-playing .sound-bars i { animation:sound-wave .75s ease-in-out infinite alternate; }
.is-playing .sound-bars i:nth-child(even) { animation-delay:-.35s; }
.audio-secondary { display:flex; gap:8px; }
.audio-secondary button { min-height:44px; font-size:13px; padding:8px 13px; background:transparent; }
.pace-picker { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:12px 0 0; font-size:12px; }
select { min-height:44px; padding:7px 10px; border:1px solid var(--line); border-radius:10px; background:var(--paper); color:var(--ink); }
.microcopy { color:var(--muted); font-size:12px; line-height:1.65; margin:12px 0 18px; }
.reveal-controls { display:flex; flex-wrap:wrap; gap:9px; margin:18px 0 12px; }
.reveal-controls button,.hint-button { min-height:44px; font-size:13px; padding:9px 13px; background:var(--yellow-light); color:var(--yellow-ink); border-color:#d9c794; }
.reveal-controls button[aria-expanded="true"] { border-color:var(--yellow-ink); box-shadow:inset 0 0 0 1px var(--yellow-ink); }
.meaning { background:var(--yellow-light); border:1px solid #e6d9b5; border-radius:12px; padding:14px 16px; font-size:16px; margin:13px 0; color:#59431c; }
.why { font-size:14px; color:var(--muted); border-left:3px solid #d9bd7c; padding-left:13px; }
.primary { display:flex; align-items:center; justify-content:center; gap:12px; width:100%; margin-top:20px; background:var(--blue); border-color:var(--blue); color:var(--paper); min-height:54px; border-radius:14px; font-size:15px; }
.primary:hover { background:#0e597a; border-color:#0e597a; color:var(--paper); }
.primary span { margin-left:auto; }
label { display:block; font-size:13px; font-weight:650; color:var(--muted); margin:20px 0 8px; }
textarea { display:block; width:100%; min-height:98px; resize:vertical; padding:14px; border:1px solid #aebfc3; border-radius:13px; color:var(--ink); background:#fffef9; font-size:17px; line-height:1.55; }
textarea::placeholder,input::placeholder { color:#65727a; opacity:1; }
textarea:disabled { background:#e8e9e4; }
.text-button { min-height:44px; padding:8px 4px; border:0; background:transparent; color:var(--muted); font-size:13px; font-weight:550; text-decoration:underline; text-underline-offset:4px; }
.text-button:hover { background:transparent; color:var(--blue); }
.skip { display:block; margin:9px auto 0; }
.scenario { padding:18px; border-radius:16px; background:var(--blue-light); margin-bottom:20px; }
.scenario h2 { font-size:20px; font-weight:700; line-height:1.4; margin:8px 0; }
.scenario p { font-size:14px; margin:0; color:#3c5968; }
.hint-button { margin-bottom:5px; }
.feedback { padding:15px 16px; border:1px solid #c2d4b1; border-left:4px solid var(--green); border-radius:13px; background:var(--mint); color:#38522d; margin:0 0 20px; font-size:14px; line-height:1.6; }
.feedback-label { display:block; margin-bottom:3px; font-size:15px; }
.feedback.neutral { background:var(--terracotta-light); border-color:#dab59f; border-left-color:var(--terracotta); color:#7b3f29; }
.feedback.success { animation:feedback-arrive .2s ease-out; }
.input-options { display:flex; gap:8px; margin:20px 0 0; }
.input-options button { flex:1; min-height:46px; font-size:14px; padding:8px; background:transparent; }
.input-options button[aria-pressed="true"] { background:var(--blue-light); border-color:var(--blue); box-shadow:inset 0 0 0 1px var(--blue); color:var(--navy); }
.word-reply { border:1px solid #aebfc3; border-radius:13px; padding:15px; min-height:90px; font-size:21px; background:#fffef9; line-height:1.6; overflow-wrap:anywhere; }
.empty-reply { color:var(--muted); font-size:15px; }
.colour-key { display:flex; flex-wrap:wrap; gap:7px; margin:16px 0 12px; font-size:12px; }
.colour-key span { padding:4px 8px; border-radius:6px; }
.word-bank { display:flex; flex-wrap:wrap; gap:8px; padding:4px 0; }
.word-bank:focus { outline:none; }
.word-tile { min-height:49px; padding:10px 13px; border-radius:11px; font-size:18px; font-weight:600; box-shadow:0 2px 0 #ccd5d2; }
.word-tile:disabled { color:#667477; background:#edf0eb; border:1px dashed #a8b8b7; box-shadow:none; }
.word-tools { display:flex; gap:12px; margin:11px 0; }
.word-tools button { min-height:44px; padding:6px 10px; background:transparent; font-size:13px; }
.partner-turn { margin-bottom:22px; }
.partner-turn h2 { font-size:clamp(26px,6vw,34px); font-weight:750; line-height:1.35; letter-spacing:-.5px; margin:12px 0 22px; }
.scene-options { display:grid; gap:10px; margin-top:20px; }
.scene-options button { text-align:left; font-size:16px; }
.button-row { display:flex; gap:9px; flex-wrap:wrap; margin:13px 0 0; }
.button-row button { flex:1; }
.simulation-toggle { display:block; width:100%; text-align:left; margin-top:20px; padding:10px 0; border:0; background:transparent; color:var(--muted); font-size:12px; }
.simulation-panel,.uncertainty { padding:18px; background:var(--yellow-light); border:1px dashed #bca770; border-radius:16px; margin:8px 0 20px; }
.simulation-panel p,.uncertainty p { font-size:14px; color:#625331; margin:0 0 12px; }
.uncertainty h3 { font-size:22px; margin:10px 0; }
.uncertainty label { margin-top:12px; }
.uncertainty button { font-size:13px; }
.book-toggle { width:100%; display:flex; justify-content:space-between; align-items:center; gap:10px; background:var(--yellow-light); border:1px solid #dfc88e; padding:11px 13px; font-size:13px; color:#624923; text-align:left; border-radius:13px; }
.book-toggle>span:last-child { font-size:11px; font-weight:500; text-align:right; }
.book-card h2,.memory-panel h2 { font-size:27px; font-weight:750; line-height:1.2; margin:9px 0 15px; letter-spacing:-.7px; }
.book-card>p,.memory-panel p { font-size:14px; color:var(--muted); }
.stamp-button { width:100%; border:2px dashed var(--green); color:var(--green); background:var(--mint); margin:10px 0; }
.stamp-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; padding:15px 3px 2px; }
.book-stamp { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:12px 5px; min-height:116px; border:2px dashed currentColor; border-radius:12px; color:var(--tab-colour); background:var(--tab-wash); transform:rotate(-3deg); font-size:12px; animation:stamp-arrive .3s ease-out; }
.book-stamp:nth-child(even) { transform:rotate(3deg); }
.book-stamp>span:first-child { font-size:24px; }
.book-stamp small { font-size:10px; margin-top:5px; text-transform:uppercase; letter-spacing:.5px; }
.complete-card { text-align:center; }
.round-icon { display:grid; place-items:center; width:62px; height:62px; margin:3px auto 18px; border-radius:20px; border:1px solid #c2d4b1; background:var(--mint); color:var(--green); font-size:31px; }
.complete-card>h2 { font-size:25px; font-weight:750; line-height:1.3; }
.complete-card>p { font-size:14px; color:var(--muted); }
.summary-phrases { text-align:left; border-block:1px solid var(--line); margin:22px 0; padding:4px 0; }
.summary-phrases p { font-size:19px; font-weight:650; }
.summary-phrases span { display:block; font-size:14px; font-weight:450; color:var(--muted); margin-top:5px; }
.next-connection { text-align:left; }
.memory-panel { scroll-margin-top:15px; }
.memory-facts { display:flex; gap:20px; padding:12px 0; border-block:1px solid var(--line); font-size:13px; }
.memory-facts strong { display:block; font-size:28px; color:var(--navy); }
.file-button { display:flex; position:relative; align-items:center; min-height:48px; padding:9px 13px; margin:0; border:1px solid var(--line); border-radius:12px; cursor:pointer; color:var(--ink); }
.file-button input { position:absolute; inset:0; opacity:0; width:100%; height:100%; cursor:pointer; }
.file-button:focus-within { outline:3px solid var(--blue); outline-offset:4px; }
.memory-reset { border-top:1px solid var(--line); margin-top:15px; padding-top:18px; }
.memory-reset button,.memory-confirm button { margin:4px 6px 4px 0; }
.memory-message { color:var(--green)!important; overflow-wrap:anywhere; }
.review-footer { text-align:center; margin:23px 0 18px; }
.review-footer>p { font-size:12px; color:var(--muted); margin:0; }
.review-footer>.text-button { padding:7px 15px; }
.flag-count { display:block; font-size:11px; color:var(--muted); }
.flag-panel { text-align:left; margin:10px 0; }
.flag-panel p { font-size:14px; color:var(--muted); }
.flag-options { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.flag-options button { font-size:13px; }
.storage-note { font-size:14px; color:#7b4b28; }
.storage-note:not(:empty) { border:1px solid #d0b08e; border-radius:13px; padding:14px; margin:13px 0; }
footer { display:flex; justify-content:space-between; align-items:center; gap:14px; border-top:1px solid var(--line); padding:16px 0 28px; font-size:12px; color:var(--muted); }
footer .text-button { font-size:12px; }
#lesson-heading:focus,#library-heading:focus { outline:none; }
@keyframes feedback-arrive { from { opacity:.6; transform:translateY(3px); } to { opacity:1; transform:translateY(0); } }
@keyframes stamp-arrive { from { opacity:.6; scale:1.04; } to { opacity:1; scale:1; } }
@keyframes sound-wave { to { transform:scaleY(.45); } }
@media (min-width:680px) { .shell { width:min(calc(100% - 64px),760px); } .lesson-card { padding:32px 38px; } .library-tiles { grid-template-columns:repeat(3,minmax(0,1fr)); } .library-hero { padding:30px; } .library-hero h2 { max-width:80%; } .library-hero p { max-width:none; } .journey-sun { right:30px; bottom:5px; font-size:190px; } .situation-picker:not(.library-tiles) { grid-template-columns:repeat(6,minmax(0,1fr)); } }
@media (max-width:380px) { .shell { width:calc(100% - 28px); } .masthead { padding-top:20px; } .app-tools { gap:4px; } .app-tools button { font-size:11px; padding:7px 4px; } .lesson-card { padding:18px; } .pace { display:none; } .steps { font-size:11px; gap:5px; } .steps li { gap:4px; } .situation-picker { gap:6px; } .situation-card { padding:11px 8px 9px; } .situation-title { font-size:12px; } .library-heading strong { font-size:13px; } .library-heading button { font-size:11px; } .route-label { display:block; margin-left:17px; margin-top:3px; } .library-tiles { gap:10px; } .library-tiles .situation-card { padding:14px 11px 12px; min-height:186px; } .library-tiles .situation-title { font-size:15px; } .library-hero { padding:22px 18px 18px; } .journey-sun { right:-30px; font-size:120px; } .library-stats { gap:6px; font-size:10px; } .listen-main>span:nth-child(2) { font-size:14px; } .listen-symbol { width:35px; height:35px; } .listen-main { gap:9px; } .sound-bars { gap:2px; } .word-tile { padding:10px 12px; font-size:17px; } .stamp-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } footer { align-items:flex-start; } }
@media (prefers-reduced-motion:reduce) { *,*::before,*::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } button:active { transform:none; } }

/* Habla Aquí: public learner-facing home and device actions. */
.brand { letter-spacing:-.6px; line-height:1.15; }
.brand .brand-name { font-size:25px; font-weight:800; }
.brand small { display:block; font-size:11px; letter-spacing:.1px; font-weight:550; color:var(--muted); margin-top:4px; }
.help-toggle { min-width:48px; min-height:44px; padding:8px 10px; font-size:13px; background:transparent; }
.app-tools { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.app-tools button { min-height:44px; }
.sharing-tools { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:4px 0 17px; }
.sharing-tools button { min-height:48px; padding:9px 12px; font-size:13px; line-height:1.35; background:transparent; color:var(--blue); border-color:#b5c8ce; }
.sharing-tools:has(#install-app[hidden]) { grid-template-columns:1fr; }
.app-status { font-size:13px; }
.app-status:empty { display:none; }
.library-open>.library-heading { display:none; }
.library-hero h1 { font-size:clamp(31px,6.5vw,43px); line-height:1.12; letter-spacing:-1.2px; margin:12px 0; position:relative; z-index:1; font-weight:750; }
.library-hero p { max-width:85%; font-size:15px; line-height:1.5; }
.home-start { background:var(--yellow); border-color:var(--yellow); color:var(--navy); position:relative; z-index:1; margin:21px 0 17px; box-shadow:0 3px 0 #0b293d; }
.home-start:hover { color:var(--navy); background:#f4d17b; border-color:#f4d17b; }
.library-hero .journey-sun { opacity:.35; bottom:35px; }
.library-heading button { min-height:44px; }
.install-dialog { color:var(--ink); background:var(--paper); border:1px solid var(--line); border-radius:22px; padding:22px; width:min(calc(100% - 32px),420px); box-shadow:0 18px 60px #153e562e; }
.install-dialog::backdrop { background:#153e5666; }
.install-dialog-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.install-dialog h2 { font-size:23px; line-height:1.25; margin:0; }
.install-dialog-heading button { min-width:44px; min-height:44px; padding:8px; }
.install-steps { list-style:none; padding:0; display:grid; gap:12px; margin:22px 0; }
.install-steps li { padding:13px; border-radius:12px; background:var(--blue-light); font-size:16px; }
.install-steps li>span { margin-right:8px; color:var(--blue); }
.install-dialog input { width:100%; min-height:48px; padding:10px; }
.clipboard-fallback { position:fixed; left:-10000px; top:0; }
#lesson-heading:focus-visible,#library-heading:focus-visible { outline:3px solid var(--blue); outline-offset:5px; border-radius:4px; }
.library-hero #library-heading:focus-visible { outline-color:var(--yellow); }
@media (max-width:380px) { .brand .brand-name { font-size:23px; } .sharing-tools button { font-size:12px; padding:9px 7px; } .library-hero p { max-width:100%; } }

.share-links { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin:-9px 0 17px; padding:10px; border-radius:18px; background:#fffaf0; border:1px solid #e6dcc6; }
.share-links[hidden] { display:none; }
.share-links a, .share-links button { display:flex; align-items:center; justify-content:center; min-height:46px; padding:8px; border:0; border-radius:14px; font-size:13px; font-weight:700; color:#fff; text-decoration:none; cursor:pointer; transition:transform .15s, filter .15s; }
.share-links a:hover, .share-links button:hover { transform:translateY(-1px); filter:brightness(1.08); }
.share-links [data-share="whatsapp"] { background:#1f9d55; }
.share-links [data-share="facebook"] { background:#1877f2; }
.share-links [data-share="threads"] { background:#1c1c1c; }
.share-links [data-share="email"] { background:#c4553a; }
.share-links #share-more { background:#f0c24f; color:#153e56; }
#share-app { background:#153e56; color:#fff; border-color:#153e56; }
#share-app[aria-expanded="true"] { background:#0f2d3f; }
#install-app { background:#f0c24f; color:#153e56; border-color:#e0ad2e; }
#open-home { background:#e7f0e3; border-color:#b9cfae; color:#2f5a2a; }
#update-app { background:#e3eef3; border-color:#b0c9d4; color:#153e56; }
#memory-toggle { background:#fbf0d4; border-color:#e8d08c; color:#7a5a12; }
#reset-top { background:#f8e3dc; border-color:#e3b4a5; color:#9a3d26; }
.open-browser { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; padding:12px 14px; margin:0 0 14px; border-radius:14px; background:#fff4d6; color:#153e56; font-size:14px; }
.open-browser[hidden] { display:none; }
.open-chrome { padding:9px 14px; border-radius:12px; background:#153e56; color:#fff; font-weight:700; text-decoration:none; }
@media (max-width:520px) { .share-links { grid-template-columns:repeat(2,minmax(0,1fr)); } .share-links #share-more { grid-column:1 / -1; } }
