.account-header{display:flex;align-items:center;gap:24px;padding:18px 28px}.account-header nav{display:flex;gap:18px;margin-left:auto}.account-header .brand{display:flex;align-items:center;gap:10px;font-weight:700}.account-header .brand img{width:36px;height:36px}.account-header .brand small{display:block;font-size:10px;letter-spacing:.2em;color:var(--muted)}
.env-badge{padding:2px 10px;border-radius:99px;background:var(--warm);font-size:12px;font-weight:600}
.account-layout{max-width:640px;margin:32px auto;padding:0 16px}.account-card{padding:28px;display:grid;gap:16px}.account-card h1{font-size:22px}
.account-status{color:var(--muted)}.account-identity{display:flex;align-items:center;gap:14px}.account-identity img{width:56px;height:56px;border-radius:50%;object-fit:cover}.account-identity small{display:block;color:var(--muted);font-size:12px}
.account-facts{display:grid;grid-template-columns:max-content 1fr;gap:6px 16px;margin:0}.account-facts dt{color:var(--muted)}.account-facts dd{margin:0}
.account-actions{display:flex;flex-wrap:wrap;gap:10px}.account-note{color:var(--muted);font-size:13px}.btn.danger{color:var(--danger)}
.account-message{max-width:560px;margin:64px auto;padding:28px;display:grid;gap:14px}
.shelf-layout{max-width:1100px;margin:24px auto;padding:0 16px;display:grid;gap:20px}.shelf-head h1{font-size:22px}.shelf-head p{color:var(--muted)}.shelf-empty{padding:24px}
.shelf-group h2{font-size:16px;margin:0 0 10px}.shelf-group small{color:var(--muted);font-weight:400;margin-left:8px}
.shelf-cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
.shelf-card{display:grid;gap:6px;padding:10px;border-radius:var(--radius);background:var(--panel);box-shadow:var(--shadow)}.shelf-card img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:10px;background:var(--panel-soft)}.shelf-card .cover-empty{width:100%;aspect-ratio:3/4;border-radius:10px;background:var(--panel-soft)}
.shelf-card strong{font-size:13px;line-height:1.4}.shelf-badges{display:flex;gap:4px;flex-wrap:wrap}.shelf-badges span{font-size:10px;font-weight:700;letter-spacing:.05em;padding:1px 6px;border-radius:6px;background:var(--accent-light);color:var(--accent-dark)}.shelf-card small{color:var(--muted);font-size:11px}
.web-tabs a.active{font-weight:700;text-decoration:underline}.web-who{color:var(--muted);font-size:13px}
.web-filters,.web-month{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
button.shelf-card{text-align:left;border:0;cursor:pointer;font:inherit;color:inherit}.shelf-badges span.done{background:var(--warm)}
.web-search{display:flex;flex-wrap:wrap;gap:8px}.web-search input{flex:1 1 240px;min-width:0}
.web-results{display:grid;gap:10px}.web-result{display:grid;grid-template-columns:56px 1fr auto;gap:12px;align-items:center;padding:10px;border-radius:var(--radius);background:var(--panel)}
.web-result img,.web-result .cover-empty{width:56px;aspect-ratio:3/4;object-fit:cover;border-radius:8px;background:var(--panel-soft)}.web-result small{display:block;color:var(--muted);font-size:12px}
.web-calendar{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px}.web-day{padding:12px;border-radius:var(--radius);background:var(--panel)}.web-day h3{font-size:14px;margin:0 0 6px}.web-day p{margin:2px 0;font-size:13px}
.web-dialog{max-width:480px;width:calc(100vw - 32px);padding:24px;border:0}.web-dialog form{display:grid;gap:12px}.web-dialog label{display:grid;gap:4px}.web-check{display:flex!important;gap:8px;align-items:center}
@media (max-width:640px){.account-header{flex-wrap:wrap;padding:12px 16px}.account-header nav{margin-left:0;flex-wrap:wrap;gap:12px}.web-result{grid-template-columns:48px 1fr}.web-result .btn{grid-column:1/-1}}
.steam-panel{display:grid;gap:10px;margin-bottom:14px}.steam-panel [hidden]{display:none!important}
.account-pending,.account-merge{margin:14px 0;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--panel-soft,#f4f5fc)}
.merge-sides{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin:8px 0}
.merge-side{display:flex;flex-direction:column;padding:10px 12px;border:1px solid var(--line);border-radius:12px;background:var(--panel,#fff)}
.account-email{display:grid;gap:10px;margin:14px 0;padding:14px 16px;border:1px solid var(--line);border-radius:14px}.account-email h2{font-size:16px;margin:0}.account-email [hidden]{display:none!important}
.account-notice{margin:0;padding:10px 12px;border-radius:12px;background:var(--panel-soft,#efeee6);color:var(--ink)}
.account-flow [hidden]{display:none!important}.account-lang{font-size:13px;color:var(--muted)}.account-lang a{padding:4px 2px}.account-flow .account-password{display:grid;gap:8px}.login-forgot{margin:8px 0 0;font-size:13px}
/* Phase 5 R05: live sync status and conflict choices on the web shelf */
.sync-banner{display:flex;flex-wrap:wrap;gap:10px;align-items:center;padding:10px 14px;border-radius:var(--radius);background:var(--panel);box-shadow:var(--shadow);font-size:13px}.sync-banner[hidden]{display:none}
.sync-conflict{max-width:640px}.sync-conflict form{display:grid;gap:12px}.sync-table{width:100%;border-collapse:collapse;font-size:13px}.sync-table th,.sync-table td{padding:6px 8px;text-align:left;vertical-align:top;border-bottom:1px solid var(--line)}.sync-table td label{min-height:32px}.sync-table td span{white-space:pre-wrap;word-break:break-word}
.sync-table input[type=radio]{width:16px;height:16px;min-height:16px;padding:0;flex:none;accent-color:var(--accent)}.sync-table td label{align-items:flex-start}

/* W02/W03: the account page (/account, the website's settings). Scoped to body.account-page so the shelf and the
   recovery pages, which share this stylesheet, keep their own look; dark mode follows the system colour scheme. */
.account-page .account-header nav a[aria-current="page"]{font-weight:700}
/* The hidden attribute must win over .btn{display:inline-flex}; account.js shows and hides actions with it. */
.account-page [hidden]{display:none!important}
/* A wide child (the save-status table) must scroll inside its own box, not widen the card at narrow widths. */
.account-card{grid-template-columns:minmax(0,1fr)}
#signed-in{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;min-width:0}
.account-section{display:grid;gap:10px}
.account-section h2{font-size:16px;margin:10px 0 0}
.account-section .account-note{margin:0}
#signed-out .provider-buttons{margin-top:16px}
.provider-buttons .btn.primary{min-height:46px;font-size:13px}
/* Narrow widths: brand and language switch share the first row, the navigation gets its own. */
.account-page .account-header .lang-switch{margin-left:auto}
.account-page .account-header nav+.lang-switch{margin-left:0}
@media (max-width:640px){.account-page .account-header nav{order:3;flex-basis:100%}.account-page .account-header nav+.lang-switch{margin-left:auto}}
/* W03: companion-app entries (assets/products/product-entry.js). Public product metadata only. */
.account-companions{padding-top:6px;border-top:1px solid var(--line)}
.product-entry-slot:empty{display:none}
.product-entry{display:grid;gap:8px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--panel-soft)}
.product-entry-head{display:flex;align-items:center;gap:12px;min-width:0}
.product-entry-icon{width:40px;height:40px;border-radius:11px;flex:none}
.product-entry-name{margin:0;font-size:16px;font-weight:600;line-height:1.3;min-width:0}
.product-entry-badge{display:inline-block;padding:2px 9px;border-radius:999px;font-size:11px;font-weight:600;line-height:1.6;white-space:nowrap;background:var(--line);color:var(--ink)}
.product-entry-head .product-entry-badge{margin-left:auto}
.product-entry-badge[data-status="available"]{background:var(--accent-light);color:var(--accent-dark)}
.product-entry-badge[data-status="prerelease"]{background:var(--warm);color:var(--ink)}
.product-entry-subtitle,.product-entry-hint,.product-entry-message{margin:0;font-size:12px;color:var(--muted)}
.product-entry-summary,.product-entry-note{margin:0;font-size:13px;line-height:1.75}
.product-entry-note{color:var(--muted)}
.product-entry-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px 16px}
.product-entry-actions .text-link{font-size:12px;color:var(--accent-dark)}
.product-entry-actions .text-link:hover{text-decoration:underline}
.product-entry-inert{cursor:not-allowed;color:var(--muted);background:var(--panel)}
.product-entry-inert .product-entry-badge{font-size:10px;padding:0 7px}
.product-entry-inert:hover{transform:none}
.product-entry-more summary{cursor:pointer;font-size:12px;color:var(--accent-dark);width:max-content;max-width:100%}
.product-entry-more ul{margin:8px 0 0;padding-left:20px;font-size:12px;line-height:1.8;color:var(--muted)}
.product-entry-error{display:grid;gap:8px;justify-items:start}
.product-entry-error .error-note{margin:0}
.account-page :focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media (max-width:420px){.product-entry-head{flex-wrap:wrap}.product-entry-head .product-entry-badge{margin-left:52px}}
@media (prefers-color-scheme:dark){
  body.account-page[data-theme=paper]{--bg:#1b2421;--panel:#242f29;--panel-soft:#2b3830;--ink:#e4ebdf;--muted:#9aab9c;--line:#3a483c;--accent:#b0c69d;--accent-dark:#d2e4c4;--accent-light:#344830;--warm:#554936;--danger:#eca59b;--shadow:0 12px 36px #0002;color-scheme:dark}
  body.account-page[data-theme=paper] .btn.primary{color:var(--bg)}
  body.account-page[data-theme=paper] .lang-links{background:rgba(0,0,0,.2);border-color:rgba(220,235,215,.35)}
  body.account-page[data-theme=paper] .lang-links a[aria-current="true"]{background:var(--accent-dark);color:var(--bg)}
}
