/* Quarterspeak studio bar and footer: one shell on every page of quarterspeak.com that belongs to the studio
   (/, /beatmates/, /lovelight/…) and on top of Learn Vietnamese's own pages (/learn-vietnamese-saigon/, /privacy,
   /terms, /support, /delete-account), whose app world sits below it.
   Markup: website/build_studio.py nav()/footer(), written to public/studio/shell/*.html for the other renderers.
   Every class is prefixed sb- so it can't collide with an app's own stylesheet. */
@font-face{font-family:"Bricolage";src:url(/studio/fonts/bricolage-grotesque-latin.woff2) format("woff2");font-weight:400 800;font-display:swap;unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Bricolage Fallback";src:local("Arial");size-adjust:104%;ascent-override:92%;descent-override:24%}
:root{--sb-paper:#f3eee3;--sb-paper2:#ebe4d5;--sb-ink:#16131c;--sb-mute:#5d5868;--sb-line:#16131c;--sb-sans:"Bricolage","Bricolage Fallback",system-ui,-apple-system,sans-serif;--sb-max:1240px;--sb-gut:16px}
@media (min-width:700px){:root{--sb-gut:28px}}
.sb-nav,.sb-foot{font-family:var(--sb-sans);-webkit-font-smoothing:antialiased;line-height:1.5}
.sb-nav *,.sb-foot *{box-sizing:border-box}
.sb-wrap{width:min(var(--sb-max),100% - 2*var(--sb-gut));margin-inline:auto}
.sb-skip{position:absolute;left:12px;top:-80px;z-index:100;background:var(--sb-ink);color:var(--sb-paper);padding:12px 16px;border-radius:12px;font:700 16px var(--sb-sans);text-decoration:none}
.sb-skip:focus{top:12px}

/* bar */
.sb-nav{position:sticky;top:0;z-index:60;background:rgb(243 238 227 / .92);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);border-bottom:2px solid var(--sb-line);color:var(--sb-ink)}
.sb-nav.sb-static{position:relative}
.sb-nav .sb-wrap{height:64px;display:flex;align-items:center;justify-content:space-between;gap:12px}
.sb-left{display:flex;align-items:center;min-width:0}
.sb-brand{display:flex;align-items:center;gap:10px;font-weight:800;font-size:19px;letter-spacing:-.02em;text-decoration:none;min-height:44px;min-width:0;color:inherit}
.sb-coin{flex:none;width:34px;height:34px;display:block}
.sb-crumb{text-decoration:none;font-weight:600;font-size:15px;color:var(--sb-mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-height:44px;display:flex;align-items:center}
.sb-crumb::before{content:"/";margin:0 8px;color:#a19ba9}
.sb-apps{position:relative;flex:none}
.sb-apps summary{list-style:none;cursor:pointer;min-height:44px;padding:0 16px;display:flex;align-items:center;gap:8px;font-weight:800;font-size:15px;border:2.5px solid currentColor;border-radius:999px;user-select:none}
.sb-apps summary::-webkit-details-marker{display:none}
.sb-apps summary::after{content:"";width:7px;height:7px;border:solid currentColor;border-width:0 2.5px 2.5px 0;transform:translateY(-2px) rotate(45deg);transition:transform .2s}
.sb-apps[open] summary::after{transform:translateY(2px) rotate(-135deg)}
.sb-menu{position:absolute;right:0;top:54px;width:min(360px,calc(100vw - 32px));background:var(--sb-paper);color:var(--sb-ink);border:2.5px solid var(--sb-ink);border-radius:20px;padding:8px;box-shadow:6px 6px 0 var(--sb-ink)}
.sb-menu a{display:flex;gap:12px;align-items:center;padding:10px;border-radius:13px;min-height:64px;text-decoration:none;color:inherit}
.sb-menu a:hover,.sb-menu a:focus-visible{background:var(--sb-paper2)}
.sb-menu img{flex:none;width:48px;height:48px;border-radius:12px;border:2px solid var(--sb-ink)}
.sb-menu b{display:block;font-size:16px;line-height:1.2}
.sb-menu small{display:block;color:var(--sb-mute);font-size:13.5px;line-height:1.3}
.sb-menu .sb-all{min-height:44px;justify-content:center;font-weight:700;font-size:14.5px;border-top:2px dashed #cfc7b6;border-radius:0 0 13px 13px;margin-top:4px}
.sb-nav :focus-visible,.sb-foot :focus-visible{outline:3px solid #2f6bff;outline-offset:3px;border-radius:6px}

/* footer */
.sb-foot{display:block;border-top:2px solid var(--sb-line);padding:36px 0 44px;font-size:15px;color:var(--sb-ink);background:var(--sb-paper)}
.sb-cols{display:grid;gap:26px;grid-template-columns:1fr 1fr}
.sb-cols>div:first-child{grid-column:1/-1}
.sb-foot h3{font-size:13px;letter-spacing:.12em;text-transform:uppercase;margin:0 0 8px;color:var(--sb-mute);font-weight:800;line-height:1.2}
.sb-foot p{margin:8px 0 0;max-width:30ch}
.sb-foot a{display:flex;align-items:center;min-height:44px;padding:4px 0;line-height:1.3;text-decoration:none;color:inherit}
.sb-foot a:hover{text-decoration:underline}
.sb-legal{margin-top:26px!important;max-width:none!important;color:var(--sb-mute);font-size:13.5px;line-height:1.5}
.sb-legal b{color:var(--sb-ink)}
@media (min-width:980px){.sb-cols{grid-template-columns:1.3fr 1fr 1fr 1fr}.sb-cols>div:first-child{grid-column:auto}}
@media (max-width:479px){
  .sb-crumb{display:none}
  .sb-apps summary{padding:0 13px;font-size:14px}
}

/* Learn Vietnamese homepages: the studio bar scrolls away and the app's own floating nav, which is fixed there,
   sticks instead, so it sits below the bar at first. The negative margin keeps it floating over the masthead. */
.sb-nav.sb-static~.site-nav{position:sticky;top:var(--android-store-banner-height,0px);margin-bottom:-74px}
.sb-nav.sb-static .sb-wrap{width:calc(100% - 2*var(--gutter,16px))}  /* line up with the app's own gutter */
.sb-nav.sb-static~footer.qs-footer{padding-bottom:28px}
.sb-foot.sb-lv{padding-bottom:120px}  /* room for the app's download dock */
.sb-foot.sb-lv .sb-wrap{width:calc(100% - 2*var(--gutter,16px))}
@media (max-width:479px){.sb-nav.sb-static~.site-nav .nav-end .cta{display:none}}

/* hosts with their own link colours (the Learn Vietnamese pages) */
.sb-nav a,.sb-foot a{color:inherit}
.sb-nav a.sb-crumb{color:var(--sb-mute)}
.sb-menu img,.sb-coin{max-width:none}

/* dark app pages: the bar and footer go dark too */
.dark .sb-nav{background:rgb(12 9 17 / .86);border-color:#ffffff26;color:#fff}
.dark .sb-nav a.sb-crumb{color:#ffffffb3}.dark .sb-crumb::before{color:#ffffff55}
.dark .sb-apps summary{border-color:#ffffff66}
.dark .sb-foot{border-color:#ffffff26;color:#fff;background:transparent}
.dark .sb-foot h3,.dark .sb-legal{color:#ffffffa6}.dark .sb-legal b{color:#fff}
@media (prefers-reduced-motion:reduce){.sb-apps summary::after{transition:none}}
@media print{.sb-nav{display:none}}
/* the Q coin turns once on hover (pointer devices only, never under reduced motion) */
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .sb-brand .sb-coin{transition:transform .6s cubic-bezier(.3,1.3,.5,1)}
  .sb-brand:hover .sb-coin{transform:rotateY(360deg)}
}
