/* Shared finishing rules for website pages and the Android website view.
   Keep workspace-specific geometry, icons and native printer controls independent. */
body {font-family:"Segoe UI",Arial,sans-serif}
body .btn {display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;box-sizing:border-box;border-radius:10px;font-size:14px;font-weight:650;line-height:1.4;text-align:center;text-decoration:none}
body :is(button,input,select,textarea) {font-family:inherit}
body :is(button,.btn):disabled {cursor:not-allowed}
body :is(.page-hero,.messages-heading,.notifications-heading) {gap:20px}
body .page-hero {padding:24px 0;margin-bottom:24px}
body :is(.page-hero,.messages-heading,.notifications-heading) h1 {font-size:clamp(34px,3.8vw,52px);line-height:1.12;letter-spacing:-.035em}
body :is(.page-hero,.messages-heading,.notifications-heading) p {line-height:1.55}
body .page-hero-actions .studio-guide-link {display:inline-flex;justify-content:center;align-items:center;min-height:44px;text-align:center}
body :is(.studio-card,.forum-panel,.market-panel,.files) {border-radius:14px}
body :is(.studio-card,.forum-panel,.market-panel,.files) :is(h2,h3) {overflow-wrap:anywhere}
body .studio-card {background:var(--paper);border-color:var(--line)}
body .studio-card :is(.card-title,.project-title) {flex-wrap:wrap;gap:10px}
body .studio-card .new-project-title {margin-bottom:16px}
body .studio-card .new-project-title h2 {font-size:22px}
body .studio-card .studio-guide-link {margin-left:auto}
body .studio-instructions {margin-bottom:16px;padding:14px 18px}
body .studio-instructions>summary,body .studio-queue-help>summary {cursor:pointer;color:var(--green);font-size:14px;font-weight:650;line-height:1.5;padding:8px 0;min-height:44px;box-sizing:border-box}
body .studio-instructions[open]>summary {margin-bottom:12px}
body .studio-queue-help {margin:0 0 12px}
body .studio-queue-help .queue-priority-note {margin:0 0 12px}
body .settings-wrap form label {margin-bottom:0}
body .settings-wrap form label :is(input,textarea,select) {margin-top:0}
body .settings-wrap form [role=status]:empty {display:none}
body .model-tile .creator small {display:block;margin-top:4px}
body .model-tile .creator {line-height:1.5;overflow-wrap:anywhere}
body #admin-stats .stats-heading {color:var(--green)}
body #admin-stats .stat {min-width:0}
body #admin-stats .stat strong {overflow-wrap:anywhere}
/* The filter controls stay in the original form: URL state and paging keep working. */
body .search.browse-search .catalog-filters {display:contents}
body .catalog-filters>summary {display:none}
body .catalog-filter-grid {display:contents}
body .catalog-filter-field {display:grid;gap:6px;min-width:0;margin:0;font-size:12px;color:var(--muted);font-weight:600}
body .catalog-filter-field select {margin:0;min-width:0;max-width:100%;width:100%}
body .search.browse-search:has(.catalog-filters) {grid-template-columns:minmax(240px,1.6fr) repeat(5,minmax(0,1fr));align-items:end}
body .search.browse-search:has(.catalog-filters) .search-query {align-self:end}
body .catalog-filter-count {color:var(--muted);font-size:12px;font-weight:400}
body .catalog-filter-count:empty {display:none}
/* Newer browsers wrap details children in ::details-content. Flatten that
   wrapper too so each desktop filter participates in the form's grid. */
@media(min-width:851px) {body .catalog-filters::details-content {display:contents}}
@media(min-width:851px) and (max-width:1100px) {body .search.browse-search:has(.catalog-filters) {grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:850px) {
 body :is(.messages-heading,.notifications-heading) {gap:14px;margin-bottom:20px}
 body .studio-shell {margin-top:16px}
 body .settings-wrap {margin-top:16px}
 body .page-hero,body #studio-page-hero {padding:16px 0 20px;margin-bottom:20px}
 body .page-hero h1 {margin:10px 0 12px}
 body .page-hero .page-hero-description {font-size:15px;line-height:1.55}
 body .page-hero-actions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:16px}
 body .page-hero-actions .studio-guide-link {grid-column:1/-1;width:100%;min-width:0}
 body .page-hero-actions :is(.engine-state,.queue-state) {flex:1 1 145px;width:auto;min-width:0;box-sizing:border-box;padding:9px 10px}
 body .page-hero-actions .engine-state {grid-template-columns:22px minmax(0,1fr);column-gap:6px}
 body .page-hero-actions .queue-state {gap:8px}
 body .page-hero-actions :is(strong,small) {font-size:12px;overflow-wrap:anywhere;white-space:normal}
 body .page-hero-actions .queue-value {min-width:28px;height:30px}
 body .studio-sidebar .studio-card,body .studio-workspace {padding:16px}
 body .studio-empty {min-height:240px}
 body .studio-workspace {min-height:320px}
 body .studio-instructions {padding:6px 14px}
 body .studio-instructions[open] {padding-bottom:14px}
 body .studio-card :is(.mode-tabs,.viewer-toolbar) button {min-height:44px}
 body .studio-card label :is(input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select) {min-height:48px}
 body .settings-wrap .files {padding:18px;margin:16px 0}
 body .settings-wrap form {gap:12px}
 body .search.browse-search:has(.catalog-filters) {grid-template-columns:minmax(0,1fr);gap:10px;padding:14px}
 body .search.browse-search:has(.catalog-filters) .search-query {grid-column:1/-1}
 body .search.browse-search .catalog-filters {display:block;grid-column:1/-1;min-width:0}
 body .catalog-filters>summary {display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 2px;cursor:pointer;list-style:none;color:var(--ink);font-size:14px;font-weight:650}
 body .catalog-filters>summary::-webkit-details-marker {display:none}
 body .catalog-filters>summary::after {content:"⌄";margin-left:auto;color:var(--green);font-size:18px}
 body .catalog-filters[open]>summary::after {content:"⌃"}
 body .catalog-filter-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 10px;padding:8px 0 2px}
 body .catalog-filter-field:first-child {grid-column:1/-1}
 body .catalog-filter-field select {font-size:16px;min-height:48px;padding-left:10px;padding-right:6px}
 body .catalog-filters:not([open])>.catalog-filter-grid {display:none}
 body :is(.page-hero,.messages-heading,.notifications-heading) h1,body #studio-page-hero h1 {font-size:clamp(30px,7.8vw,38px)}
}
@media(max-width:360px) {
 body .catalog-filter-grid {grid-template-columns:minmax(0,1fr)}
 body .page-hero-actions {grid-template-columns:minmax(0,1fr)}
}
@media(prefers-reduced-motion:reduce) {body *,body *::before,body *::after {scroll-behavior:auto!important}}

@media(min-width:360px) and (max-width:850px) {body #admin-stats {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}body #admin-stats .stat {padding:14px}body #admin-stats .stat strong {font-size:26px}body #admin-stats .stats-heading {grid-column:1/-1}}
