.tour-launch-row{margin:12px 0 0}
#appTourOpen{min-height:44px;border-color:#b7a0ca;background:#fffaf5;color:#61387b}
.chip-audio{display:inline-flex;align-items:center;gap:5px;min-height:42px;padding:8px 11px;font:inherit;color:var(--ink);cursor:pointer;text-align:left;transition:background .15s,border-color .15s,transform .15s}
.chip-audio:hover{background:#f5eef9;border-color:#986db3;transform:translateY(-1px)}
.chip-audio:focus-visible{outline:3px solid #f2ae32;outline-offset:2px}
.chip-audio[aria-pressed=true]{background:#70418f;color:#fff;border-color:#70418f}
.chip-audio[aria-pressed=true] b{color:#fff}
.chip-speaker{font-size:14px;margin-left:2px}
.mission-audio-status:empty{display:none}
.mission-audio-status{margin:8px 0 0;color:#58677a;font-size:.875rem;line-height:1.45}
.ube-word-audio-tip{display:flex;align-items:center;gap:13px;padding:12px 15px;margin:16px 0 5px;border:1px solid #d7c4e4;border-radius:16px;background:linear-gradient(110deg,#f5ebfa,#fffaf0);color:#415369}
.ube-word-audio-tip>.ube-character{width:68px;max-height:105px;flex:0 0 68px}
.ube-word-audio-tip strong{color:#603779}
.ube-word-audio-tip p{font-size:.9375rem;line-height:1.5;margin:5px 0 8px}
.app-tour-intro[hidden],.app-tour-layer[hidden]{display:none!important}
.app-tour-intro{position:fixed;inset:0;z-index:12000;display:grid;place-items:center;padding:18px;background:#061c31b8}
.app-tour-intro-card{display:grid;grid-template-columns:minmax(130px,.55fr) minmax(0,1fr);gap:20px;align-items:center;width:min(680px,100%);padding:24px;border:1px solid #dac8e6;border-radius:24px;background:#fffdf8;box-shadow:0 24px 80px #001d3470}
.app-tour-intro-art{display:grid;place-items:center;min-height:190px;background:radial-gradient(ellipse,#efdef7,transparent 70%)}
.app-tour-intro-art img{width:150px;max-height:230px}
.app-tour-intro-copy>small,.app-tour-card-heading small{font-size:.75rem;font-weight:900;letter-spacing:.09em;color:#754b90}
.app-tour-intro-copy h2,.app-tour-card h2{margin:6px 0 10px;color:#173b53;line-height:1.15}
.app-tour-intro-copy h2{font-size:clamp(1.55rem,4vw,2rem)}
.app-tour-intro-copy>p,.app-tour-card>p{font-size:1rem;line-height:1.55;color:#4c6174}
.app-tour-intro-actions{display:flex;gap:9px;flex-wrap:wrap;margin:16px 0 8px}
.app-tour-voice{border:1px solid #bba4cc;background:#fff;color:#603779;border-radius:11px;padding:9px 12px;min-height:42px;font-weight:750;cursor:pointer}
.app-tour-voice:hover{background:#f5eef9}
.app-tour-audio-status{font-size:.8125rem;line-height:1.45;color:#5b6574;margin:6px 0 0;min-height:1.2em}
.app-tour-layer{position:fixed;inset:0;z-index:11000;pointer-events:none}
.app-tour-spotlight{position:fixed;z-index:11001;pointer-events:none;border:3px solid #f4b332;border-radius:16px;box-shadow:0 0 0 9999px #071b31a8;transition:left .14s ease,top .14s ease,width .14s ease,height .14s ease}
.app-tour-card{position:fixed;right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom));z-index:11002;pointer-events:auto;width:min(390px,calc(100vw - 28px));padding:17px;border:1px solid #d8c5e5;border-radius:20px;background:#fffdf8;color:#334d63;box-shadow:0 14px 45px #001d3455}
.app-tour-card-heading{display:flex;align-items:center;gap:12px}
.app-tour-card-heading img{width:70px;height:92px;object-fit:contain;flex:0 0 70px}
.app-tour-card h2{font-size:1.25rem;margin:4px 0}
.app-tour-card>p{margin:11px 0}
.app-tour-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:10px 0}
.app-tour-actions>span{flex:1}
.app-tour-actions button{min-height:42px;padding:9px 12px}
.app-tour-actions button:disabled{opacity:.45;cursor:default}
.app-tour-card .app-tour-audio-status{min-height:0}
@media(max-width:620px){
  .app-tour-intro{padding:12px}
  .app-tour-intro-card{grid-template-columns:1fr;gap:4px;padding:18px;max-height:calc(100dvh - 24px);overflow:auto}
  .app-tour-intro-art{min-height:110px}
  .app-tour-intro-art img{width:95px;max-height:140px}
  .app-tour-card{left:10px;right:10px;bottom:max(10px,env(safe-area-inset-bottom));width:auto;padding:14px}
  .app-tour-card-heading img{width:58px;height:75px;flex-basis:58px}
  .app-tour-card h2{font-size:1.125rem}
  .app-tour-card>p{font-size:.9375rem}
  .app-tour-actions{gap:5px}
  .app-tour-actions button{padding:8px 9px;font-size:.9rem}
  .ube-word-audio-tip{align-items:flex-start;padding:11px;gap:8px}
  .ube-word-audio-tip>.ube-character{width:52px;flex-basis:52px;max-height:82px}
}
@media(prefers-reduced-motion:reduce){.chip-audio{transition:none}.app-tour-spotlight{transition:none}}
.streak-pill{display:inline-flex;align-items:center;gap:5px;background:linear-gradient(135deg,#fff7d7,#ffe8bd);border-color:#e8ba66;color:#76451e;font-weight:750;white-space:nowrap}
.streak-pill>span:first-child{font-size:1.15em;filter:drop-shadow(0 1px 1px #e9a63c88)}
.streak-pill b{font-variant-numeric:tabular-nums;color:#9b4e16}
.streak-pill.streak-advanced{transform-origin:center;animation:streak-pop .85s cubic-bezier(.2,.9,.35,1.3) both}
@keyframes streak-pop{0%{transform:scale(.78);box-shadow:0 0 0 0 #f6bd4d00}38%{transform:scale(1.14);box-shadow:0 0 0 7px #f6bd4d55}72%{transform:scale(.97);box-shadow:0 0 0 11px #f6bd4d00}100%{transform:scale(1);box-shadow:var(--shadow)}}
@media(prefers-reduced-motion:reduce){.streak-pill.streak-advanced{animation:none}}
/* Keep the guide with progress, immediately visible on phones as well as desktop. */
#topstats{align-items:center;gap:9px;flex-wrap:wrap}
#appTourOpen{order:-1;flex:1 0 100%;display:flex;align-items:center;justify-content:center;gap:8px;padding:13px 18px;border:2px solid #916ba5;border-radius:16px;background:linear-gradient(120deg,#f5e7fc,#fff6df);font-size:1rem;font-weight:850;box-shadow:0 4px 12px #59377318}
#appTourOpen:before{content:'';display:block;width:34px;height:42px;background:url('/kabil/welcome.webp') center/contain no-repeat}
#homeView .hero-copy h1.bamboo-heading{width:min(100%,790px);margin:5px 0 3px;line-height:1}
.bamboo-heading img{display:block;width:100%;height:auto;min-height:80px;object-fit:contain;object-position:left}
.jeepney-title strong{font-size:1.18rem}
.app-tour-running{padding-bottom:360px}
.app-tour-card{max-height:48dvh;overflow:auto;overscroll-behavior:contain}
.app-tour-running #journeyWordPanel{max-height:40dvh!important;overflow:auto}
#factsView{max-width:900px;margin:auto}#factsCard{min-height:360px}#factsCard h3{font-size:clamp(1.7rem,4vw,2.8rem);line-height:1.2}#factsCard>p{line-height:1.7}#factsCard .sceneactions{display:flex;gap:10px;flex-wrap:wrap;margin-top:25px}#factsCard [disabled]{opacity:.4;cursor:default}
@media(min-width:821px){#homeView .hero-copy h1.bamboo-heading{width:calc(100% + 24px);max-width:790px}.topstats{max-width:410px}}
@media(max-width:620px){#appTourOpen{font-size:.96rem;padding:10px 12px}.bamboo-heading img{min-height:78px}.app-tour-card-heading img{width:42px;height:48px;flex-basis:42px}.app-tour-card{max-height:43dvh}.app-tour-card>p{margin:7px 0;font-size:.9rem}.app-tour-actions{margin:7px 0}.app-tour-voice{padding:7px 10px;min-height:38px}.app-tour-running{padding-bottom:48dvh}}
/* A little companion gripping the exclamation mark; space reserved for its tail. */
#homeView .hero-copy h1.bamboo-heading{position:relative;padding-bottom:4%}
.bamboo-heading img.bamboo-logo{width:88%}
.bamboo-heading img.bamboo-tarsier{position:absolute;left:80%;top:0;width:20%;height:auto;min-height:0;pointer-events:none}
#verbsView .tablewrap{overflow-x:auto;overscroll-behavior-x:contain;touch-action:pan-x pan-y}
#verbsView .tablewrap:focus-visible{outline:3px solid #ce9a36;outline-offset:3px}

/* Keep each demonstration in the space above Kabil, including large cards and word popups. */
.app-tour-running{padding-top:var(--tour-top-space,0px);padding-bottom:100dvh}
.app-tour-running .app-tour-target{max-height:calc(var(--tour-free-height,50dvh) - 12px)!important;min-height:0!important;overflow:auto;overscroll-behavior:contain;scroll-margin:0}
.app-tour-running #journeyWordPanel.app-tour-popup{position:fixed!important;top:var(--tour-center-y)!important;left:50%!important;transform:translate(-50%,-50%)!important;max-width:calc(100vw - 28px)!important;max-height:calc(var(--tour-free-height,50dvh) - 12px)!important;animation:none}

/* Give the dimensional wordmark breathing room beside its companion. */
.bamboo-heading img.bamboo-logo{width:86%}.bamboo-heading img.bamboo-tarsier{left:83%;top:1%;width:17%}
/* Anchor the companion's gripping hands to the exclamation mark. */
.bamboo-heading img.bamboo-tarsier{left:77.5%;top:0;width:20%}

/* Kabil demonstrates the familiar app menu on a phone. */
#appTourOpen{display:grid;grid-template-columns:minmax(120px,44%) minmax(0,1fr);gap:12px;text-align:left;padding:10px 14px}
#appTourOpen:before{content:none;display:none}
#appTourOpen .tour-launch-art{display:block;width:100%;height:124px;object-fit:contain;pointer-events:none}
#appTourOpen>span{min-width:0;line-height:1.4}
@media(max-width:620px){#appTourOpen{grid-template-columns:minmax(100px,43%) minmax(0,1fr);gap:10px;padding:10px 12px}#appTourOpen .tour-launch-art{height:112px}}
