/* Shared Contextual Module design. Keep this stylesheet after service styles. */
/* Reference-fidelity overrides are at the end; behavior rules remain shared. */
:root,:root body.context-module {
  --bg:#f4f6fa;--surface:#fff;--surface-alt:#edf1fb;--text:#202636;--muted:#5e687a;
  --line:#dee4ef;--input-line:#a9b5c9;--primary:#315ce5;--on-primary:#fff;--accent:#315ce5;
  --danger:#b52e42;--danger-bg:#fff0f2;--focus:#174adc;--shadow:0 5px 22px #233c6c0a;
  --sidebar:#fff;--sidebar-text:#202636;--sidebar-muted:#5e687a;--active:#e8eefe;
  --inv-tag:var(--surface-alt);--games-highlight:var(--surface-alt);--games-art:#dce5ff;
}
:root[data-theme="dark"],:root[data-theme="dark"] body.context-module {
  --bg:#161a23;--surface:#202632;--surface-alt:#2a3345;--text:#edf1fa;--muted:#b3bfd3;
  --line:#394356;--input-line:#73839d;--primary:#9ab4ff;--on-primary:#162751;--accent:#9ab4ff;
  --danger:#ffb0be;--danger-bg:#422632;--focus:#aec7ff;--shadow:0 7px 24px #0002;
  --sidebar:#1d222d;--sidebar-text:#edf1fa;--sidebar-muted:#b3bfd3;--active:#303e60;
  --inv-tag:var(--surface-alt);--games-highlight:var(--surface-alt);--games-art:#344565;
}
body.context-module{font:14px/1.55 Inter,'Segoe UI',system-ui,sans-serif;background:var(--bg);color:var(--text)}
.context-module h1,.context-module h2,.context-module h3{font-family:inherit;font-weight:650;letter-spacing:-.035em}
.context-module h1,.context-module .context-heading h1{font-size:clamp(25px,2.6vw,36px);line-height:1.15}
.context-module h2{font-size:23px}.context-module h3{font-size:16px}.context-module [hidden]{display:none!important}
.context-module .heading-dot,.context-module .games-heading-star,.context-module .tabletop-dot{display:none}
.context-sidebar{position:fixed;inset:12px auto 12px 12px;width:98px;z-index:30;border:1px solid var(--line);border-radius:19px;background:var(--surface);box-shadow:var(--shadow);display:flex;flex-direction:column;padding:18px 7px 9px;overflow-y:auto}
.context-logo{text-align:center;font-size:27px;line-height:1;font-weight:750;letter-spacing:-2px;padding:5px 0 23px}.context-logo span{color:var(--primary)}
.context-service-nav{display:grid;gap:5px}
.context-module .context-nav-link{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;min-height:60px;min-width:0;width:100%;padding:8px 2px;border-radius:12px;border:0;background:transparent;color:var(--muted);font-size:11px;text-align:center;line-height:1.2;font-weight:500}
.context-nav-link .icon{width:22px;height:22px}.context-module .context-nav-link:hover{background:var(--surface-alt);color:var(--text)}
.context-module .context-nav-link[aria-current="page"]{background:var(--active);color:var(--primary);font-weight:650}
.context-sidebar-account{margin-top:auto;padding-top:23px}.context-module .avatar,.context-module .member-avatar{background:var(--surface-alt);color:var(--primary)}
.context-sidebar-account .avatar{width:29px;height:29px;font-size:12px}.context-mobile-nav{display:none}
.context-module .main-content{margin-left:122px;padding:17px clamp(16px,2.6vw,40px) 0;max-width:none;min-width:0}
.context-module .utility-bar{margin:0 0 18px;min-height:38px;justify-content:flex-end;gap:20px}
.context-account-link{color:var(--muted);max-width:160px;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;font-size:12px}
.context-module #theme-preference{width:126px;min-height:38px;padding:5px 9px;border:1px solid var(--line);border-radius:10px;font-size:12px;background:var(--surface)}
.context-module .theme-selector{gap:7px;font-size:12px}.context-module .theme-selector label{display:flex;gap:5px;align-items:center}.context-module .theme-selector .icon{width:17px;height:17px}
.context-module .context-heading,.context-module .page-heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin:0 0 20px}
.context-module .context-heading .button{margin-top:0}.context-module .eyebrow{font-size:11px;letter-spacing:.08em;margin-bottom:7px}
.context-module .page-description{font-size:14px;margin-top:8px;max-width:650px}
.context-count{display:inline-block;vertical-align:middle;font-size:14px;letter-spacing:0;padding:4px 10px;border-radius:8px;background:var(--surface-alt);color:var(--muted);font-weight:500}
.context-readonly{font-size:13px;color:var(--muted)}
.context-module .button{min-height:44px;border-radius:11px;padding:10px 15px;font-size:13px;gap:7px;transform:none}
.context-module .button:hover{transform:none;box-shadow:0 3px 9px #15265318}.context-module .button .icon{width:18px;height:18px}
.context-module .button-primary,.context-module .button-search{background:var(--primary);color:var(--on-primary)}
.context-module .button-secondary{background:var(--surface);color:var(--text);border-color:var(--line)}
.context-module input,.context-module select,.context-module textarea{border-radius:9px;min-height:44px}
.context-module .context-toolbar{background:var(--surface);border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow);padding:15px;margin-bottom:21px;min-width:0}
.context-module .context-filters{margin-top:12px;min-width:0}
.context-module .games-search input[type="search"],.context-module .tabletop-search input[type="search"]{padding-left:40px}
.context-module .games-tabs{flex-wrap:wrap}.context-module .games-tabs>a{min-height:44px;font-size:12px}
.context-module .context-filters>summary{min-height:44px;padding:9px 12px;max-width:100%;border-radius:9px;background:var(--surface-alt);color:var(--text);font-size:13px;cursor:pointer}
.context-module .context-filters[open]>summary{margin-bottom:12px}.context-filter-summary{display:flex;align-items:center;flex-wrap:wrap;gap:10px}
.context-module .section-heading{margin:24px 0 17px}.context-module .section-heading h2{font-size:20px}.context-module .result-count{font-size:13px}
.context-module .book-grid,.context-module .inv-item-grid,.context-module .games-card-grid,.context-module .tabletop-game-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:18px}
.context-module .context-card{background:var(--surface);border:1px solid var(--line);border-radius:15px;box-shadow:var(--shadow);overflow:hidden;min-width:0;padding:0}
.context-module .context-card:hover{transform:none;box-shadow:0 8px 26px #233c6c14}
.context-module .book-cover-link,.context-module .games-cover-link,.context-module .tabletop-cover-link{padding:16px;border-radius:0;background:var(--surface-alt);transform:none}
.context-module .book-cover{height:207px;aspect-ratio:2/3;max-width:145px;box-shadow:none}.context-module .book-card-info{padding:14px}
.context-module .book-card h3{font-size:16px;margin:6px 0}.context-module .book-author,.context-module .book-location{font-size:13px}
.context-module .category-label,.context-module .tabletop-category{font-size:11px;text-transform:none;letter-spacing:0}
.context-card-secondary,.context-card-location{font-size:12px;color:var(--muted);overflow-wrap:anywhere;margin-top:6px}
.context-module .context-card-actions{display:flex;flex-wrap:wrap;gap:6px 14px;padding:8px 0 10px;opacity:1;visibility:visible}
.context-module .context-card-actions a{display:inline-flex;min-height:40px;align-items:center;gap:6px;color:var(--primary);font-size:13px}
.context-module .context-cover-placeholder,.context-module .games-cover-art,.context-module .tabletop-box{background:linear-gradient(140deg,#d8e8ff,#cdc9f0);color:#34477e;box-shadow:none}
:root[data-theme="dark"] .context-module .context-cover-placeholder,:root[data-theme="dark"] .context-module .games-cover-art,:root[data-theme="dark"] .context-module .tabletop-box{background:linear-gradient(140deg,#344c76,#4c416d);color:#dde8ff}
.context-module .context-cover-placeholder{align-items:center;justify-content:center;padding:15px;border-radius:8px}.context-module .context-cover-placeholder .cover-title{font:600 17px/1.3 'Segoe UI',sans-serif;margin-top:12px;text-align:center}.context-module .context-cover-placeholder .cover-bottomline{font-size:11px;letter-spacing:0}
.context-module .context-cover-initial{display:grid;place-items:center;font:650 56px/1 'Segoe UI',sans-serif;min-height:70px;opacity:1;margin:10px 0}
.context-module .tabletop-box-title{font:600 17px/1.3 'Segoe UI',sans-serif;margin:5px 0}.context-module .tabletop-box-bottom{font-size:11px;letter-spacing:0}
.context-module .context-item-placeholder{display:flex;flex-direction:column;gap:10px;align-items:center;justify-content:center;color:var(--muted);font-size:12px}.context-item-placeholder .icon{width:42px;height:42px}
.context-module .tabletop-publisher,.context-module .tabletop-game-meta,.context-module .tabletop-age,.context-module .inv-item-place,.context-module .games-card-platform{font-size:13px}
.context-module .tabletop-card-bottom,.context-module .tabletop-status,.context-module .inv-status,.context-module .games-status{font-size:12px}
.context-module .empty-state,.context-module .inv-empty,.context-module .tabletop-empty,.context-module .games-empty-search{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:40px 24px;box-shadow:var(--shadow);margin:18px 0}
.context-module .empty-state h2{font-size:26px}.context-module .empty-state p:not(.eyebrow){font-size:14px}
.context-module .page-footer{margin-top:30px;padding:20px 0;font-size:11px}.context-module .page-footer>span:first-child{font:600 13px/1.5 'Segoe UI',sans-serif}
.context-module .portal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.context-module .service-card{min-height:210px;padding:24px;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);background:var(--surface)}
.context-module .service-card::after,.context-module .service-card::before{display:none}.context-module .service-card h2{font-size:25px}
.context-module .service-icon{border-radius:13px;background:var(--surface-alt);color:var(--primary)}.context-module .service-card p{font-size:14px}.context-module .service-card-bottom{font-size:13px}
.context-module .public-header{padding:22px clamp(16px,5vw,80px)}.context-module .public-main{max-width:1250px;margin:auto;padding:30px clamp(16px,5vw,70px)}
.context-module .public-header .brand{color:var(--text);font-family:inherit;font-size:24px;font-weight:650}
.context-module .login-layout{gap:55px}.context-module .login-story h1{font-size:clamp(32px,4vw,48px)}
.context-module .login-panel,.context-module .surface-panel,.context-module .editor-form{border-radius:16px;border-color:var(--line);background:var(--surface);box-shadow:var(--shadow)}
.context-module .form-layout,.context-module .inv-form-layout,.context-module .games-form-layout,.context-module .tabletop-form-layout,.context-module .tabletop-play-form-layout{grid-template-columns:minmax(0,1fr);max-width:960px}
.context-module .form-section-heading h2{font-size:21px}.context-module .form-field>label{font-size:14px}.context-module .field-help,.context-module .optional-label{font-size:12px}
.context-module .metadata-label,.context-module .metadata-grid dt{font-size:12px;letter-spacing:0}.context-module .book-detail{gap:30px}
.context-module .storage-panel{background:var(--surface-alt);border-color:var(--line)}.context-module .detail-bottom,.context-module .permission-note,.context-module .access-badge{font-size:12px}
.context-module .context-panel{position:fixed;margin:0;inset:12px 12px 12px auto;width:min(42vw,650px);max-width:calc(100% - 24px);max-height:calc(100dvh - 24px);height:calc(100dvh - 24px);padding:0;color:var(--text);background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:0 14px 60px #15253e30;z-index:70;overflow:auto;overscroll-behavior:contain}
.context-panel-header{position:sticky;top:0;z-index:3;display:flex;align-items:center;gap:12px;padding:12px 17px;border-bottom:1px solid var(--line);background:var(--surface)}
.context-module .context-panel-header h2{font-size:16px;margin-right:auto;letter-spacing:0}.context-open-page{font-size:12px;color:var(--primary);min-height:40px;display:flex;align-items:center}
.context-panel-content{padding:22px}.context-panel-content .page-footer{display:none}
.context-module .context-panel .context-detail,.context-module .context-panel .book-detail,.context-module .context-panel .games-detail,.context-module .context-panel .tabletop-detail,.context-module .context-panel .inv-detail{display:block}
.context-panel .detail-cover,.context-panel .games-detail-visual-column,.context-panel .tabletop-detail-visual,.context-panel .inv-detail-visual{max-width:240px;margin:0 auto 22px}
.context-module .context-panel .page-toolbar{flex-wrap:wrap;gap:12px;margin-bottom:20px}.context-module .context-panel .context-heading{flex-wrap:wrap}.context-module .context-panel h1{font-size:27px}
.context-panel .editor-form{padding:18px;box-shadow:none}.context-module .context-panel .form-grid{grid-template-columns:1fr}.context-panel .form-grid .field-full{grid-column:auto}
.context-module .context-panel.is-form{inset:50% auto auto 50%;transform:translate(-50%,-50%);width:min(760px,calc(100% - 32px));height:auto}
.context-module .context-panel.is-form::backdrop{background:#0e182d65;backdrop-filter:blur(3px)}
.context-module.has-context-detail .main-content{margin-right:min(43vw,670px)}
.context-module.has-context-detail .search-panel{flex-wrap:wrap}
.context-module.has-context-detail .search-input-wrap{flex-basis:100%;min-width:0}
.context-module.has-context-detail .filter-field{flex:1 1 140px;min-width:0}
.context-module.has-context-detail .games-filters,.context-module.has-context-detail .inv-filter-main,.context-module.has-context-detail .tabletop-search-row{flex-wrap:wrap}
.context-module.has-context-detail .games-search,.context-module.has-context-detail .inv-search,.context-module.has-context-detail .tabletop-search{flex-basis:100%;min-width:0}
.context-module.has-context-detail .inv-filter-grid,.context-module.has-context-detail .tabletop-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.context-panel-loading{padding:38px 12px;color:var(--muted);text-align:center}.context-panel-error{background:var(--danger-bg);color:var(--danger);border-radius:12px;padding:20px;font-size:14px}.context-panel-error p{margin-bottom:12px}
.context-network-status{position:fixed;bottom:18px;left:140px;z-index:90;padding:12px 18px;max-width:calc(100% - 170px);background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);font-size:13px}
@media(max-width:1100px){.context-module .context-panel{width:46vw}.context-module.has-context-detail .main-content{margin-right:47vw}.context-module.has-context-detail .context-heading{flex-wrap:wrap}.context-module.has-context-detail .context-toolbar{flex-wrap:wrap}.context-module.has-context-detail .book-grid,.context-module.has-context-detail .games-card-grid,.context-module.has-context-detail .tabletop-game-grid,.context-module.has-context-detail .inv-item-grid{grid-template-columns:1fr}}
@media(max-width:760px){
 .context-sidebar{display:none}.context-module .main-content,.context-module.has-context-detail .main-content{margin:0;padding:16px 16px 88px}
 .context-module .utility-bar{margin-bottom:18px;gap:10px}.context-account-link{margin-right:auto;max-width:95px}.context-module .theme-selector label>span{display:none}.context-module #theme-preference{width:115px}
 .context-mobile-nav{display:flex;align-items:stretch;justify-content:space-around;gap:2px;position:fixed;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));z-index:60;border-radius:17px;border:1px solid var(--line);padding:5px 3px;background:var(--surface);box-shadow:0 -4px 22px #13264012}
 .context-mobile-nav>.context-nav-link,.context-more{flex:1;min-width:0;max-width:90px}.context-module .context-mobile-nav .context-nav-link{min-height:54px;padding:6px 1px;font-size:10px;gap:4px;border-radius:11px}
 .context-mobile-nav .icon{width:20px;height:20px}.context-more>summary{list-style:none;cursor:pointer;min-height:54px;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;color:var(--muted);font-size:11px;border-radius:11px}.context-more>summary::-webkit-details-marker{display:none}.context-more[open]>summary{background:var(--active);color:var(--primary)}
 .context-more-menu{position:absolute;bottom:calc(100% + 9px);right:0;width:min(300px,calc(100vw - 20px));padding:12px;border:1px solid var(--line);background:var(--surface);border-radius:14px;box-shadow:0 10px 40px #152b4930}
 .context-more-menu strong{display:block;padding:8px 10px;overflow-wrap:anywhere}.context-more-menu a,.context-more-menu button{display:flex;align-items:center;min-height:44px;width:100%;padding:9px 10px;font:inherit;border:0;background:transparent;color:var(--text);text-align:left;border-radius:8px}.context-more-menu a:hover,.context-more-menu button:hover{background:var(--surface-alt)}
 .context-module .context-heading,.context-module .page-heading{align-items:flex-start;flex-wrap:wrap;gap:14px}.context-module .context-heading h1{font-size:28px}.context-module .page-description{font-size:13px}
 .context-module .book-grid,.context-module .games-card-grid,.context-module .tabletop-game-grid,.context-module .inv-item-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.context-module .book-cover{height:178px}.context-module .book-cover-link{padding:12px}
 .context-module .portal-grid{grid-template-columns:1fr}.context-module .context-toolbar{padding:12px;flex-wrap:wrap}.context-module input,.context-module select,.context-module textarea{font-size:16px}
 .context-module .form-grid,.context-module .access-layout,.context-module .account-settings-grid{grid-template-columns:1fr}
 .context-module .context-panel{inset:8px;width:calc(100% - 16px);max-width:none;height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);border-radius:16px;z-index:80}
 .context-module .context-panel.is-form{inset:8px;transform:none;width:calc(100% - 16px);height:calc(100dvh - 16px)}.context-module.has-context-detail{overflow:hidden}
 .context-panel-content{padding:18px}.context-panel-header{padding:10px 12px;gap:8px}.context-module .context-panel .editor-form{padding:14px}
 .context-module .public-header{padding:18px 16px;gap:12px}.context-module .public-header .brand-caption{display:none}.context-module .public-header .brand{font-size:20px}
 .context-module .login-layout{display:block}.context-module .login-story{margin-bottom:24px}.context-module .login-story h1{font-size:30px}.context-module .login-panel{padding:24px 20px}.context-network-status{left:12px;bottom:84px;max-width:calc(100% - 24px)}
}
@media(max-width:420px){.context-module .book-grid,.context-module .games-card-grid,.context-module .tabletop-game-grid,.context-module .inv-item-grid{grid-template-columns:1fr}.context-module .book-cover{height:215px}.context-module .book-detail{display:block}.context-module .form-actions{flex-wrap:wrap}.context-module .form-actions .button{flex:1}.context-module .metadata-grid{grid-template-columns:1fr}.context-module .storage-panel{flex-wrap:wrap}.context-module .context-mobile-nav .context-nav-link{font-size:10px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.context-module *,.context-module *::before,.context-module *::after{transition:none!important;animation:none!important}}
@media(max-width:420px){
 .context-module .games-filter,.context-module .filter-field{flex:1 1 100%}
 .context-module .games-find{width:100%}
 .context-module .inv-filter-grid,.context-module .tabletop-filter-grid{grid-template-columns:1fr}
}

/* Approved reference: dense monochrome catalogue, dark labelled navigation,
   cover-first tiles. Colour belongs to actual covers, not the application chrome. */
:root,:root body.context-module{
 --bg:#f5f5f3;--surface:#fff;--surface-alt:#f0f0ed;--text:#242424;--muted:#686866;
 --line:#deded9;--input-line:#bdbdb7;--primary:#292929;--on-primary:#fff;--accent:#41413e;
 --focus:#545450;--shadow:0 2px 7px #00000009;--active:#e9e9e5;
 --sidebar:#252525;--sidebar-text:#f7f7f4;--sidebar-muted:#b9b9b3;
 --inv-tag:var(--surface-alt);--games-highlight:var(--surface-alt);--games-art:#d6d5d0;
}
:root[data-theme="dark"],:root[data-theme="dark"] body.context-module{
 --bg:#202020;--surface:#292929;--surface-alt:#343432;--text:#f0f0ec;--muted:#b3b3ab;
 --line:#454541;--input-line:#71716b;--primary:#ededE8;--on-primary:#222;--accent:#d4d4cb;
 --focus:#e4e4d9;--active:#3b3b36;--shadow:0 2px 7px #0002;
 --sidebar:#191919;--sidebar-text:#f7f7f4;--sidebar-muted:#b9b9b3;
}
.context-module{--rail-width:168px}
html:has(body.context-module){min-width:0}
body.context-module{font-family:'Segoe UI',Arial,sans-serif;font-size:13px;line-height:1.4}
.context-sidebar{inset:0 auto 0 0;width:var(--rail-width);padding:23px 10px 12px;border:0;border-radius:0;background:var(--sidebar);box-shadow:none}
.context-logo{display:flex;gap:9px;align-items:center;padding:0 7px 26px;font-size:15px;letter-spacing:-.4px;color:var(--sidebar-text)}
.context-logo span{color:inherit}.context-logo .icon{width:17px;height:17px;color:#b9b9b3}
.context-service-nav{gap:4px}.context-module .context-sidebar .context-nav-link{flex-direction:row;justify-content:flex-start;min-height:40px;gap:10px;padding:10px 11px;font-size:12px;line-height:1.2;border-radius:4px;color:var(--sidebar-muted);text-align:left}
.context-sidebar .context-nav-link .icon{width:17px;height:17px;flex-shrink:0}
.context-module .context-sidebar .context-nav-link:hover{background:#343434;color:#fff}
.context-module .context-sidebar .context-nav-link[aria-current="page"]{background:#414141;color:#fff;box-shadow:inset 2px 0 #d7d7cf}
.context-sidebar :focus-visible{outline:2px solid #fff;outline-offset:2px}.context-sidebar-account{padding-top:20px}
.context-sidebar-account .avatar{width:20px;height:20px;background:#44443f;color:#eee;font-size:10px}
.context-module .main-content{margin-left:var(--rail-width);padding:14px 24px 0}
.context-module .utility-bar{min-height:25px;margin:0 0 10px;gap:12px}.context-account-link{font-size:11px}
.context-module #theme-preference{min-height:28px;width:111px;padding:3px 6px;border-radius:4px;font-size:11px}
.context-module .theme-selector{font-size:11px}.context-module .theme-selector .icon{width:14px;height:14px}
.context-module h1,.context-module .context-heading h1{font-size:25px;line-height:1.15;letter-spacing:-.6px}
.context-module h2{font-size:18px}.context-module .context-heading,.context-module .page-heading{margin:0 0 12px;gap:12px;align-items:center}
.context-module .context-heading:has(+.catalogue) .page-description,.context-module .context-heading:has(+.inv-catalogue) .page-description,.context-module .context-heading:has(+.games-collection) .page-description,.context-module .context-heading:has(+.tabletop-catalogue) .page-description{display:none}
.context-count{font-size:inherit;padding:0;background:none;border-radius:0;color:inherit;vertical-align:baseline;font-weight:inherit}
.context-count::before{content:'('}.context-count::after{content:')'}
.context-module .button{min-height:34px;padding:7px 12px;border-radius:5px;font-size:12px;line-height:1.3;gap:6px;box-shadow:none}
.context-module .button:hover{box-shadow:none;filter:brightness(.94)}.context-module .button .icon{width:15px;height:15px}
.context-module input:not([type=checkbox]):not([type=hidden]),.context-module select,.context-module textarea{min-height:36px;border-radius:5px;padding:7px 10px;font-size:13px}
.context-module .context-toolbar{padding:0;margin:0 0 14px;border:0;border-radius:0;background:transparent;box-shadow:none;gap:8px}
.context-module .search-input-wrap input,.context-module .inv-search input{background:var(--surface)!important;border:1px solid var(--line)!important}
.context-module .search-input-wrap,.context-module .games-search{flex:1 1 180px;min-width:100px}
.context-module .filter-field{flex:0 1 150px;min-width:0}
.context-module .search-input-wrap .icon,.context-module .games-search>.icon{top:10px;width:16px;height:16px}
.context-module .games-search input[type=search],.context-module .tabletop-search input[type=search]{padding-left:36px}
.context-module .tabletop-search-row>.button{min-height:36px!important}
.context-module .inv-filter-main,.context-module .tabletop-search-row{gap:8px}
.context-module .context-filters{margin-top:7px}.context-module .context-filters>summary{min-height:32px;padding:7px 9px;font-size:12px;max-width:fit-content;background:var(--surface);border:1px solid var(--line);border-radius:5px}
.context-module .games-tabs{gap:5px;border:0;margin:0 0 10px;padding:0}.context-module .games-tabs>a{min-height:32px;padding:7px 10px;font-size:12px;border:1px solid var(--line);border-radius:5px;background:var(--surface);gap:6px}
.context-module .games-tabs>a.is-active{background:var(--primary);color:var(--on-primary);border-color:var(--primary)}
.context-module .games-tabs>a.is-active>span{background:var(--surface);color:var(--text)}
.context-module .section-heading{margin:12px 0 9px}.context-module .section-heading h2{font-size:14px;font-weight:500;color:var(--muted)}
.context-module .inv-section-heading,.context-module .games-section-heading,.context-module .tabletop-section-heading{margin:0 0 10px;gap:8px;min-height:25px}
.context-module .inv-section-heading h2,.context-module .games-section-heading h2,.context-module .tabletop-catalogue>.tabletop-section-heading h2{font-size:14px;font-weight:500;color:var(--muted)}
.context-module .book-grid,.context-module .inv-item-grid,.context-module .games-card-grid,.context-module .tabletop-game-grid{grid-template-columns:repeat(auto-fill,minmax(155px,1fr));gap:10px;align-items:start}
.context-module .context-card{border:1px solid var(--line);border-radius:6px;box-shadow:0 1px 3px #00000008;background:var(--surface)}
.context-module .context-card:hover{box-shadow:0 3px 10px #00000012;border-color:var(--input-line)}
.context-module .book-cover-link{padding:0;background:var(--surface-alt);display:block;overflow:hidden}
.context-module .book-cover{height:auto;width:100%;max-width:none;aspect-ratio:3/4;border-radius:0;box-shadow:none}
.context-module .book-cover img{width:100%;height:100%;object-fit:cover;border-radius:0}
.context-module .context-cover-placeholder{padding:0;border-radius:0;display:flex;justify-content:center;align-items:center;position:relative}
.context-module .context-cover-placeholder,.context-module .games-cover-art,.context-module .tabletop-box{background:linear-gradient(130deg,#bbb7be,#aaa1ad 50%,#aa8991);color:#fff}
.context-module .cover-comics{background:linear-gradient(130deg,#878187,#665e69 55%,#927780)}
.context-module .cover-children{background:linear-gradient(130deg,#bcb9a5,#8a9b9b 50%,#87908b)}
:root[data-theme="dark"] .context-module .context-cover-placeholder,:root[data-theme="dark"] .context-module .games-cover-art,:root[data-theme="dark"] .context-module .tabletop-box{background:linear-gradient(130deg,#646367,#55515a 50%,#785e68);color:#eee}
.context-module .context-cover-initial{font:500 76px/1 'Segoe UI',sans-serif;margin:0;min-height:0;opacity:.8}
.context-module .context-cover-placeholder .cover-bottomline{position:absolute;bottom:12px;font-size:10px;letter-spacing:0;opacity:.8}
.context-module .book-card-info,.context-module .games-card-copy,.context-module .inv-item-copy,.context-module .tabletop-card-copy{padding:9px 9px 0}
.context-module .context-card h3,.context-module .book-card h3{font-size:13px;font-weight:650;line-height:1.3;margin:4px 0;letter-spacing:-.15px}
.context-module .book-author,.context-module .book-location,.context-module .inv-item-place,.context-module .games-card-platform,.context-module .tabletop-publisher{font-size:11px;line-height:1.35;margin:4px 0;min-height:0}
.context-module .category-label,.context-module .tabletop-category,.context-module .inv-category-label{font-size:10px;color:var(--muted);text-transform:none;letter-spacing:0}
.context-module .context-card-secondary{display:none}.context-module .context-card-location{font-size:11px;margin:4px 0}
.context-module .book-location .icon,.context-module .inv-item-place>.icon{width:12px;height:13px;flex-shrink:0}
.context-module .context-card-actions{gap:3px 9px;padding:4px 0 6px;margin-top:3px;border-top:1px solid var(--line);opacity:1;visibility:visible}
.context-module .context-card-actions a{min-height:28px;font-size:11px;gap:4px;color:var(--text)}.context-module .context-card-actions .icon{width:13px;height:13px}
.context-module .quantity-badge,.context-module .inv-quantity{top:6px;right:6px;font-size:10px;padding:2px 6px;border-radius:4px;min-height:0}
.context-module .inv-item-visual{aspect-ratio:1;min-height:0;background:var(--surface-alt);color:var(--muted);border-radius:0}
.context-module .context-item-placeholder{font-size:10px;gap:12px}.context-item-placeholder .icon{width:35px;height:35px}
.context-module .inv-condition{font-size:9px;padding:2px 4px}.context-module .inv-card-topline{gap:4px;flex-wrap:wrap}
.context-module .inv-item-bottom{padding:4px 0;margin-top:4px;border:0}.context-module .inv-status{font-size:10px}
.context-module .games-card-cover{aspect-ratio:3/4;padding:0;border-radius:0;background:var(--surface-alt)}
.context-module .games-card-cover>img{height:100%;width:100%;object-fit:cover}
.context-module .games-cover-glyph{font-size:76px;top:50%;left:0;right:0;text-align:center;transform:translateY(-50%);font-weight:500;letter-spacing:0;color:#fff}
.context-module .games-cover-corner{width:19px;height:19px;top:8px;left:8px;border:0}.context-module .games-cover-corner .icon{width:16px;height:16px}
.context-module .games-cover-bottom{font:10px/1.3 'Segoe UI',sans-serif;letter-spacing:0;left:9px;bottom:9px;text-transform:none}
.context-module .games-card-meta{margin-bottom:5px;flex-wrap:wrap;gap:4px}.context-module .games-status{font-size:10px;padding:2px 5px;border-radius:3px;background:var(--surface-alt);color:var(--muted)}
.context-module .games-card-notes{display:none}.context-module .games-card-bottom{border:0;padding:0;margin:5px 0;font-size:10px}.context-module .games-rating{font-size:10px}
.context-module .tabletop-cover-link{padding:0;aspect-ratio:1;background:var(--surface-alt);border-radius:0;overflow:hidden}
.context-module .tabletop-box{width:100%;height:100%;padding:0;border-radius:0;transform:none!important;display:flex;align-items:center;justify-content:center;box-shadow:none}
.context-module .tabletop-box::after,.context-module .tabletop-box-top,.context-module .tabletop-box-title,.context-module .tabletop-box-bottom{display:none}
.context-module .tabletop-cover-image{width:100%;height:100%;object-fit:cover}
.context-module .tabletop-cover-link>.tabletop-status{top:6px;right:6px;padding:3px 5px;border-radius:3px;font-size:10px;background:var(--surface);color:var(--text)}
.context-module .tabletop-game-meta{font-size:10px;gap:7px;margin:7px 0;flex-wrap:wrap}.context-module .tabletop-game-meta .icon{width:12px;height:12px}.context-module .tabletop-game-meta .tabletop-age{font-size:10px;margin:0}
.context-module .tabletop-card-bottom{font-size:10px;padding:5px 0;border:0}.context-module .tabletop-card-bottom .icon{width:12px;height:12px}
.context-module .context-panel{width:min(38vw,490px);border-radius:8px;inset:10px 10px 10px auto;max-height:calc(100dvh - 20px);height:calc(100dvh - 20px);box-shadow:0 6px 25px #0002}
.context-module.has-context-detail .main-content{margin-right:min(39vw,510px)}
.context-panel-content{padding:16px}.context-panel-header{padding:8px 12px}.context-module .context-panel-header h2{font-size:14px}
.context-module .context-panel .detail-cover-column,.context-module .context-panel .games-detail-visual-column,.context-module .context-panel .tabletop-detail-visual,.context-module .context-panel .inv-detail-visual{width:140px;max-width:140px;margin:0 auto 18px}
.context-module .context-panel .detail-cover{padding:0;border:0;border-radius:4px;aspect-ratio:3/4;overflow:hidden;margin:0 0 5px}
.context-module .context-panel .detail-cover-caption{display:none}
.context-module .context-panel h1{font-size:23px}.context-module .context-panel .detail-author{font-size:14px;margin:6px 0 13px}
.context-module .context-panel .page-toolbar{padding:0;margin-bottom:15px;gap:8px;border:0;box-shadow:none;background:none}
.context-module .context-panel .storage-panel{padding:12px;border-radius:5px;margin:15px 0}.context-module .context-panel .metadata-grid{gap:13px;font-size:13px}
.context-module .context-panel.is-form{width:min(660px,calc(100% - 32px));inset:50% auto auto 50%;height:auto;border-radius:8px}
.context-module .surface-panel,.context-module .editor-form,.context-module .login-panel,.context-module .service-card{border-radius:7px;box-shadow:none}
.context-module .portal-grid{gap:12px}.context-module .service-card{min-height:180px;padding:20px}.context-module .service-card h2{font-size:21px}
.context-module .empty-state,.context-module .inv-empty,.context-module .tabletop-empty,.context-module .games-empty-search{padding:40px 22px;border-radius:6px;box-shadow:none;margin:10px 0}
.context-module .page-footer{margin-top:18px;padding:14px 0;font-size:10px;color:var(--muted)}
@media(min-width:761px) and (max-width:1100px){
 .context-module{--rail-width:150px}.context-module .main-content{padding-inline:18px}
 .context-module.has-context-detail .book-grid,.context-module.has-context-detail .games-card-grid,.context-module.has-context-detail .tabletop-game-grid,.context-module.has-context-detail .inv-item-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}
}
@media(max-width:760px){
 .context-module .main-content,.context-module.has-context-detail .main-content{margin:0;padding:12px 12px 82px}
 .context-module .utility-bar{margin-bottom:13px}.context-module .context-heading,.context-module .page-heading{gap:10px;margin-bottom:12px}
 .context-module h1,.context-module .context-heading h1{font-size:23px}.context-module .button{min-height:40px}
 .context-module .context-toolbar{padding:0;margin-bottom:12px}.context-module input:not([type=checkbox]):not([type=hidden]),.context-module select,.context-module textarea{min-height:42px;font-size:16px}
 .context-module .search-input-wrap,.context-module .games-search{flex-basis:100%}.context-module .filter-field,.context-module .games-filter{flex:1 1 120px}
 .context-module .search-input-wrap .icon,.context-module .games-search>.icon{top:13px}
 .context-module .context-filters>summary{min-height:40px}.context-module .games-tabs>a{min-height:40px;padding:8px;font-size:11px}
 .context-module .book-grid,.context-module .games-card-grid,.context-module .tabletop-game-grid,.context-module .inv-item-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .context-module .context-card-actions a{min-height:36px;font-size:11px}.context-module .context-card-actions{gap:0 8px}
 .context-module .book-cover{height:auto}.context-module .context-cover-initial,.context-module .games-cover-glyph{font-size:64px}
 .context-module .context-mobile-nav{left:0;right:0;bottom:0;border-radius:0;padding:5px 4px max(5px,env(safe-area-inset-bottom));box-shadow:0 -2px 8px #0000000a;border:0;border-top:1px solid var(--line)}
 .context-module .context-mobile-nav .context-nav-link{font-size:10px;min-height:54px;border-radius:4px;color:var(--muted)}
 .context-module .context-mobile-nav .context-nav-link[aria-current=page]{background:var(--surface-alt);color:var(--text)}
 .context-more>summary{border-radius:4px}.context-more[open]>summary{background:var(--surface-alt);color:var(--text)}.context-more-menu{border-radius:6px}
 .context-module .context-panel,.context-module .context-panel.is-form{inset:6px;transform:none;width:calc(100% - 12px);height:calc(100dvh - 12px);max-height:calc(100dvh - 12px);border-radius:7px}
 .context-module .context-panel-content{padding:13px}.context-module .context-panel .button{min-height:40px}
 .context-module .portal-grid{grid-template-columns:1fr}.context-module .service-card{padding:18px}
}
@media(max-width:420px){
 .context-module .book-grid,.context-module .games-card-grid,.context-module .tabletop-game-grid,.context-module .inv-item-grid{grid-template-columns:1fr}
 .context-module .context-card{display:grid;grid-template-columns:86px minmax(0,1fr);align-items:stretch}
 .context-module .book-cover-link,.context-module .games-card-cover,.context-module .tabletop-cover-link,.context-module .inv-item-visual{height:100%;min-height:128px;aspect-ratio:auto;border-radius:0}
 .context-module .book-cover{height:100%;aspect-ratio:auto}.context-module .context-card h3{font-size:14px}
 .context-module .context-cover-initial,.context-module .games-cover-glyph{font-size:48px}
 .context-module .context-cover-placeholder .cover-bottomline,.context-module .games-cover-bottom,.context-module .context-item-placeholder>span{display:none}
 .context-module .book-card-info,.context-module .games-card-copy,.context-module .inv-item-copy,.context-module .tabletop-card-copy{padding:8px 9px 0}
 .context-module .context-card-actions a{min-height:40px}.context-module .context-card-actions{padding-bottom:2px;margin-top:4px}
 .context-module .tabletop-cover-link>.tabletop-status{font-size:9px;left:3px;right:3px;text-align:center}
 .context-module .filter-field,.context-module .games-filter{flex:1 1 100%}.context-module .games-find{width:100%}
}
.context-module .search-panel,.context-module .games-filters{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:start}
.context-module .search-panel .search-input-wrap,.context-module .games-filters .games-search{min-width:0}
.context-catalogue-filters{position:relative;min-width:0}
.context-catalogue-filters>summary{list-style:none;cursor:pointer;border:1px solid var(--line);border-radius:5px;min-height:36px;padding:8px 12px;background:var(--surface);font-size:12px;white-space:nowrap}
.context-catalogue-filters>summary::-webkit-details-marker{display:none}
.context-catalogue-filters[open]{grid-column:1/-1}
.context-catalogue-filters[open]>summary{width:fit-content;margin-bottom:8px;background:var(--surface-alt)}
.context-filter-fields{display:flex;gap:10px;align-items:end;flex-wrap:wrap;border:1px solid var(--line);padding:12px;background:var(--surface);border-radius:5px}
.context-filter-fields label{display:block;font-size:11px;margin-bottom:4px;color:var(--muted)}
.context-module .context-filter-fields .games-filter,.context-module .context-filter-fields .filter-field{flex:1 1 160px}
.context-module .context-filter-fields select{height:auto;width:100%}
@media(max-width:760px){
 .context-module .context-heading,.context-module .page-heading{align-items:flex-start;text-align:left}
 .context-module .inv-heading{flex-direction:row}.context-module .inv-heading-actions{padding:0}
 .context-module .search-panel,.context-module .games-filters{grid-template-columns:minmax(0,1fr) auto}
 .context-module .search-panel .button-search,.context-module .games-filters .games-find{width:auto}
 .context-catalogue-filters{grid-column:1/-1}.context-catalogue-filters>summary{width:fit-content;min-height:40px;padding:10px 12px}
}

/* Each application owns its identity and sections; switching apps is secondary. */
.context-module{--rail-width:220px}
.context-module .context-sidebar{color:#f0f0e9;color-scheme:dark;padding:24px 12px 12px;scrollbar-width:thin;scrollbar-color:#666 #252525}
.context-sidebar .context-app-brand{padding:0 5px 22px}
.context-sidebar .brand{font:500 23px/1.15 Georgia,serif;letter-spacing:-.04em;gap:9px;color:#f0f0e9;white-space:normal}
.context-sidebar .brand-mark{width:28px;height:34px;flex-shrink:0;color:#d5d1bd}
.context-sidebar .brand-mark .icon{width:27px;height:27px}
.context-sidebar .brand-caption{font:8px/1.5 'Segoe UI',sans-serif;letter-spacing:.09em;margin-top:6px;color:#bdbdb5;max-width:150px}
.context-section-menu{min-width:0}
.context-section-menu>summary{display:none}
.context-sidebar .primary-nav{display:block;margin:0;padding:0;overflow:visible}
.context-sidebar .nav-caption{display:block;color:#a9a9a1;font-size:9px;letter-spacing:.11em;margin:12px 10px 9px}
.context-sidebar .nav-item{display:flex;min-height:39px;margin:3px 0;padding:8px 10px;gap:10px;border-radius:4px;color:#c6c6bf;font-size:12px;line-height:1.35;white-space:normal}
.context-sidebar .nav-item .icon{width:17px;height:17px}
.context-sidebar .nav-item:hover{background:#343434;color:#fff}
.context-sidebar .nav-item.is-active{background:#41413d;color:#fff;box-shadow:inset 2px 0 #d5d1bd}
.context-sidebar .nav-divider{display:block;background:#ffffff20;margin:15px 10px 11px}
.context-sidebar .sidebar-note{display:block;margin:23px 5px 22px;padding:15px 12px;border:1px solid #ffffff14;border-radius:5px;background:#ffffff05;color:#bdbdb5}
.context-sidebar .sidebar-note p{font:italic 19px/1.4 Georgia,serif;color:#ece8d9;letter-spacing:-.02em}
.context-sidebar .sidebar-note>span{font:10px/1.6 'Segoe UI',sans-serif;margin-top:9px;color:#bdbdb5}
.context-sidebar .sidebar-note .icon{width:23px;height:23px;margin:0 0 9px;color:#d5d1bd}
.context-sidebar .sidebar-note .games-note-symbol{font-size:24px;line-height:1;margin:0 0 10px;color:#d5d1bd}
.context-sidebar .sidebar-note .inv-note-mark{margin:0}
.context-sidebar .tabletop-sidebar-pips{margin:0 0 13px;gap:5px}
.context-sidebar .tabletop-sidebar-pips i{background:#d5d1bd;width:6px;height:6px}
.context-sidebar .context-account-caption{font-size:10px;line-height:1.4;color:#a9a9a1;margin:0 10px 6px}
.context-sidebar .context-sidebar-account{padding-top:20px}
@media(min-width:761px) and (max-width:1100px){.context-module{--rail-width:205px}}
@media(max-width:760px){
 .context-module .context-sidebar{display:block;position:relative;inset:auto;width:100%;padding:14px 14px 8px;overflow:visible;z-index:20}
 .context-sidebar .context-app-brand{padding:0 0 10px}.context-sidebar .brand{font-size:23px}
 .context-sidebar .brand-caption{max-width:none;font-size:8px}
 .context-section-menu>summary{display:flex;align-items:center;min-height:44px;list-style:none;font-size:12px;color:#d0d0c8;cursor:pointer;border-top:1px solid #ffffff20}
 .context-section-menu>summary::-webkit-details-marker{display:none}
 .context-section-menu>summary::after{content:'+';margin-left:auto;font-size:19px}
 .context-section-menu[open]>summary::after{content:'−'}
 .context-sidebar .nav-item{min-height:44px;font-size:13px}
 .context-sidebar .sidebar-note{margin:16px 0 10px}
 .context-sidebar .context-sidebar-account{display:none}
}
