/* BitNook adaptive workspace — desktop and tablet. Mobile <761px remains native-feeling. */
.bn-desktop-sidebar{display:none}
@media (min-width:761px) and (max-width:999px){
 html,body{height:100%;overflow:hidden}
 body{background:var(--bn-page,#111315)}
 .overall{display:block;max-width:none;height:100dvh;min-height:0;padding:0;overflow:hidden}
 .copy,.widget-side{display:none!important}
 .phone-outer{width:100%;height:100%;min-height:0;padding:0;border:0;border-radius:0;box-shadow:none}
 .phone-outer:before,.phone-outer:after,.phone:before{display:none!important}
 .phone{height:100%;min-height:0;border-radius:0}
 .phone .statusbar,.phone .homebar{display:none!important}
 .phone .app-header{top:0}
 .phone .scroll{padding:90px max(24px,calc((100vw - 730px)/2)) 105px}
}
@media (min-width:1000px){
 html,body{height:100%;min-height:0;overflow:hidden}
 body{background:var(--bn-page,#111315);color:var(--bn-text,#f0eee9)}
 .overall{
   width:100%;max-width:none;margin:0;padding:0;
   display:grid;grid-template-columns:244px minmax(0,1fr);
   gap:0;align-items:stretch;min-height:0;height:100dvh;
 }
 .copy,.widget-side{display:none!important}
 .bn-desktop-sidebar{
   display:flex;flex-direction:column;gap:20px;min-height:0;overflow:auto;
   padding:28px 15px 18px;background:
     linear-gradient(150deg,color-mix(in srgb,var(--bn-primary,#c4aa72) 7%,transparent),transparent 35%),
     var(--bn-panel,#181b1e);
   border-right:1px solid var(--bn-border,#30353a);
   scrollbar-width:thin;scrollbar-color:var(--bn-border,#30353a) transparent
 }
 .bn-desktop-brand{display:flex;align-items:center;gap:12px;padding:0 9px 20px;border-bottom:1px solid var(--bn-border,#30353a);text-decoration:none}
 .bn-desktop-brand img{width:44px;height:44px;object-fit:contain;border-radius:11px}
 .bn-desktop-brand strong{display:block;font-size:19px;letter-spacing:.1em;font-weight:720;color:var(--bn-text,#f0eee9);line-height:1.2}
 .bn-desktop-brand small{display:block;font-size:10px;letter-spacing:.14em;color:var(--bn-muted,#a6acae);margin-top:5px;text-transform:uppercase}
 .bn-desktop-nav{display:grid;gap:21px;align-content:start}
 .bn-desktop-nav-group{display:grid;gap:4px}
 .bn-desktop-nav-heading{font-size:10px;letter-spacing:.14em;color:var(--bn-muted,#a6acae);font-weight:720;margin:0 11px 5px;text-transform:uppercase}
 .bn-desktop-link{
   appearance:none;display:flex;align-items:center;gap:11px;width:100%;min-height:42px;
   padding:10px 12px;border:1px solid transparent;border-radius:12px;
   background:transparent;color:var(--bn-text,#deded9);text-align:left;
   font:570 13px/1.25 Inter,system-ui,sans-serif;letter-spacing:.005em;
   transition:background .14s,border-color .14s,color .14s;
 }
 .bn-desktop-link svg{width:17px;height:17px;flex-shrink:0;color:var(--bn-muted,#9eaaa8)}
 .bn-desktop-link:hover{background:color-mix(in srgb,var(--bn-primary,#c4aa72) 10%,var(--bn-panel,#181b1e));color:var(--bn-text,#f0eee9)}
 .bn-desktop-link.active{background:color-mix(in srgb,var(--bn-primary,#c4aa72) 16%,var(--bn-panel,#181b1e));border-color:color-mix(in srgb,var(--bn-primary,#c4aa72) 29%,transparent);color:var(--bn-primary,#c4aa72)}
 .bn-desktop-link.active svg{color:var(--bn-primary,#c4aa72)}
 .bn-desktop-sidebar-footer{margin-top:auto;border-top:1px solid var(--bn-border,#30353a);padding:15px 10px 0;font-size:11px;line-height:1.55;color:var(--bn-muted,#a6acae)}
 .bn-desktop-sidebar-footer span{display:block;margin-top:5px;font-size:10px;opacity:.8}
 .phone-outer{height:100%;min-height:0;width:100%;padding:0;border:0;border-radius:0;box-shadow:none;background:var(--bn-page,#111315)}
 .phone-outer:before,.phone-outer:after,.phone:before{display:none!important}
 .phone{height:100%;min-height:0;width:100%;border-radius:0;background:var(--bn-page,#111315);isolation:isolate}
 .phone .statusbar,.phone .homebar,.phone .bottom{display:none!important}
 .phone .app-header{
   top:0;left:0;right:0;height:72px!important;min-height:72px;
   padding:15px clamp(24px,3.5vw,58px);display:flex;align-items:center;
   transform:none!important;opacity:1!important;
   border-bottom:1px solid var(--bn-border,#30353a)!important
 }
 .phone .app-wordmark .name{font-size:17px;letter-spacing:.14em}
 .phone .header-actions{gap:20px}
 .phone .icon-btn{width:36px;height:36px}
 .phone .scroll{
   padding:108px clamp(24px,3.5vw,58px) 70px;
   position:absolute;inset:0;min-height:0;overflow-y:auto;overflow-x:hidden;
   overscroll-behavior-y:contain;scrollbar-width:thin;
 }
 .phone .scroll #view{width:100%;max-width:1420px;margin:0 auto;min-width:0}
 .phone #view[data-bn-desktop-route="home"]{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px;align-content:start}
 .phone #view[data-bn-desktop-route="home"] > *{min-width:0;margin:0}
 .phone #view[data-bn-desktop-route="home"] > .screen-head{grid-column:1/-1;margin-bottom:1px}
 .phone #view[data-bn-desktop-route="home"] > .hero{grid-column:span 5;min-height:176px}
 .phone #view[data-bn-desktop-route="home"] > .streak-strip{grid-column:span 7;align-self:stretch}
 .phone #view[data-bn-desktop-route="home"] > .progress-card{grid-column:span 5;min-height:200px}
 .phone #view[data-bn-desktop-route="home"] > .daily-card{grid-column:span 7;min-height:200px}
 .phone #view[data-bn-desktop-route="home"] > .home-focus-cards{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .phone #view[data-bn-desktop-route="home"] > .home-focus-cards > .card{min-width:0;margin:0}
 .phone #view[data-bn-desktop-route="home"] > .section-card{grid-column:span 6}
 .phone #view[data-bn-desktop-route="home"] > .widget-preview-card,
 .phone #view[data-bn-desktop-route="home"] > .continue,
 .phone #view[data-bn-desktop-route="home"] > .bp-card{grid-column:span 6}
 .screen-head .title{font-size:clamp(23px,2.1vw,30px)}
 .hero .hero-name{font-size:26px}
 .daily-card .daily-three{gap:12px}
 .daily-card .daily-three > *{min-width:0}
 .full-skill-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .skill-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
 .quick-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
 .bp-welcome{max-width:720px;margin:4vh auto 25px}
 .bp-welcome-explore{max-width:720px;margin:0 auto}
 .bp-welcome-bottom{max-width:720px;margin:24px auto}
 .phone .modal-bg{position:absolute}
 .phone .modal{max-width:min(660px,90vw);width:100%;margin:0 auto}
}
@media (min-width:1000px) and (max-width:1220px){
 .overall{grid-template-columns:212px minmax(0,1fr)}
 .bn-desktop-sidebar{padding-left:10px;padding-right:10px}
 .phone #view[data-bn-desktop-route="home"] > .hero{grid-column:span 6}
 .phone #view[data-bn-desktop-route="home"] > .streak-strip{grid-column:span 6}
 .phone #view[data-bn-desktop-route="home"] > .progress-card{grid-column:span 6}
 .phone #view[data-bn-desktop-route="home"] > .daily-card{grid-column:span 6}
}
@media (min-width:1000px) and (max-width:1100px){
 .phone #view[data-bn-desktop-route="home"] > .hero,
 .phone #view[data-bn-desktop-route="home"] > .streak-strip,
 .phone #view[data-bn-desktop-route="home"] > .progress-card,
 .phone #view[data-bn-desktop-route="home"] > .daily-card,
 .phone #view[data-bn-desktop-route="home"] > .section-card{grid-column:1/-1}
 .phone #view[data-bn-desktop-route="home"] > .home-focus-cards{grid-template-columns:1fr 1fr}
}
@media (prefers-reduced-motion:reduce){.bn-desktop-link{transition:none}}


/* Desktop bento dashboard: balanced heights and useful space, no filler columns. */
@media (min-width:1101px) {
 .phone #view[data-bn-desktop-route="home"]{grid-template-columns:repeat(12,minmax(0,1fr));gap:15px}
 .phone #view[data-bn-desktop-route="home"] > .hero{grid-column:span 5;grid-row:2;min-height:206px}
 .phone #view[data-bn-desktop-route="home"] > .progress-card{grid-column:span 7;grid-row:2;min-height:206px}
 .phone #view[data-bn-desktop-route="home"] > .daily-card{grid-column:span 8;grid-row:3;min-height:246px}
 .phone #view[data-bn-desktop-route="home"] > .streak-strip{
   grid-column:span 4;grid-row:3;display:flex;flex-direction:column;
   align-items:stretch;justify-content:space-between;gap:12px;
   min-height:246px;margin:0;padding:18px;
 }
 .phone #view[data-bn-desktop-route="home"] > .streak-strip .streak-actions{align-items:flex-start;gap:12px}
 .phone #view[data-bn-desktop-route="home"] > .streak-strip .streak-details{align-items:flex-start}
 .phone #view[data-bn-desktop-route="home"] > .streak-strip .checkin-btn{align-self:flex-start}
 .phone #view[data-bn-desktop-route="home"] > .home-focus-cards{grid-row:4;grid-column:1/-1}
 .phone #view[data-bn-desktop-route="home"] > .section-card{grid-column:1/-1;min-width:0}
 .phone #view[data-bn-desktop-route="home"] > .section-card .skill-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
 .phone #view[data-bn-desktop-route="home"] > .section-card .skill-tile{min-height:125px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}
 .phone #view[data-bn-desktop-route="home"] > .screen-head{padding:0 2px 4px}
 .phone #view[data-bn-desktop-route="home"] > .progress-card .card-body{height:100%;display:flex;flex-direction:column;justify-content:center;gap:12px}
}
@media (min-width:1000px) and (max-width:1100px){
 .phone #view[data-bn-desktop-route="home"] > .streak-strip{grid-column:1/-1}
 .phone #view[data-bn-desktop-route="home"] > .section-card{grid-column:1/-1}
}
@media (min-width:1000px){
 .phone #view[data-bn-desktop-route="citizens"] #bp-citizens-results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
 .phone #view[data-bn-desktop-route="citizens"] .bn-roster-card{min-width:0;height:100%;padding:15px;gap:11px}
 .phone #view[data-bn-desktop-route="citizens"] .bn-roster-overview{min-height:90px}
 .phone #view[data-bn-desktop-route="citizens"] .bn-roster-professions>span{font-size:11px;line-height:1.65}
 .phone #view[data-bn-desktop-route="citizens"] .bn-compare-float{bottom:22px}
 .phone #view[data-bn-desktop-route="compendium"],.phone #view[data-bn-desktop-route="preferences"]{max-width:1180px}
}
@media (min-width:1700px){
 .phone #view[data-bn-desktop-route="citizens"] #bp-citizens-results{grid-template-columns:repeat(3,minmax(0,1fr))}
}

/* Dedicated app pages are anchors, not JS-only buttons. */
a.bn-page-link{color:inherit;text-decoration:none;cursor:pointer}
a.bn-page-link.card{display:block;width:100%;box-sizing:border-box}
a.bn-page-link.bn-desktop-link{width:100%;box-sizing:border-box}
a.bn-page-link:focus-visible{outline:2px solid var(--bn-primary,#d7bd87);outline-offset:2px}

/* Tablet and embedded preview widths should never collapse dashboard cards into
   tiny intrinsic-width flex items. Keep desktop dashboard semantics accessible. */
@media (min-width:761px) and (max-width:999px){
 .phone #view{width:100%;min-width:0}
 .phone #view .home-focus-cards{
   display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
   width:100%;gap:12px;align-items:stretch;min-width:0;
 }
 .phone #view .home-focus-cards>.card{width:100%;min-width:0;max-width:none;margin:0;box-sizing:border-box}
 .phone #view .home-focus-cards .mini-card{display:flex;flex-direction:column;width:100%;height:100%;min-width:0;box-sizing:border-box}
 .phone #view .home-focus-cards .bn-inventory-summary{grid-column:1/-1}
}
@media (max-width:760px){
 .phone #view .home-focus-cards{width:100%;min-width:0}
 .phone #view .home-focus-cards>.card{min-width:0;box-sizing:border-box}
}
