/* ShoreBuild v112 — coordinated public polish. Loaded last on public pages. */
:root{
  --sb-bg:#c9efff;
  --sb-surface:#ffffff;
  --sb-surface-soft:#eefaff;
  --sb-text:#08243b;
  --sb-muted:#53758a;
  --sb-border:rgba(23,105,170,.22);
  --sb-primary:#1769aa;
  --sb-primary-strong:#0d527f;
  --sb-success:#237a4a;
  --sb-warning:#8a6515;
  --sb-error:#a43c4b;
  --sb-radius:14px;
  --sb-focus:0 0 0 3px rgba(23,105,170,.24);
  --sb-header-safe:78px;
}

html{scroll-padding-top:calc(var(--sb-header-safe) + 12px)}
body{overflow-x:clip}
:where(a,button,input,select,textarea,[tabindex]):focus-visible{
  outline:2px solid var(--sb-primary)!important;
  outline-offset:3px!important;
  box-shadow:var(--sb-focus);
}

/* Keep fixed navigation from covering first-page content. */
html[data-big-update-subpage="true"] body.big-update-subpage > main,
body.my-orders-page > main,
body.roles-page > main,
body.builds-page > .page,
.marketplace-owner-shell,
.future-simple-page{
  scroll-margin-top:calc(var(--sb-header-safe) + 12px);
}

/* Public header alignment and compact laptop behavior. */
.future-topbar.v43-topbar{
  min-height:64px;
  align-items:center;
}
.future-nav{align-items:center}
.future-nav a{white-space:nowrap}
.future-nav-search-button{min-width:170px}

/* Homepage: preserve ShoreBuild look, remove inflated empty spacing. */
.future-hero{padding-top:6px}
.future-hero h1{letter-spacing:-.025em}
.future-hero p{max-width:640px;line-height:1.5}
.future-hero-actions{flex-wrap:wrap}
.future-hero-button{min-height:44px}
.shore-home-section{scroll-margin-top:96px}
.shore-home-stat-grid > div{gap:5px}
.shore-home-stat-grid strong,.shore-home-stat-grid span{display:block}
.shore-home-stat-grid span{line-height:1.2}
.shore-home-update-loading{min-height:132px}

/* A single compact account entry stays above content, never above modal dialogs. */
.account-area{z-index:22000}
.account-dropdown{max-height:min(560px,calc(100dvh - 100px));overflow:auto}

/* Signed-out account states. */
.sb-auth-state{
  background:var(--sb-surface);
  border:1px solid var(--sb-border);
  border-radius:var(--sb-radius);
  padding:24px;
  text-align:left;
  box-shadow:0 12px 32px rgba(25,91,128,.08);
}
.sb-auth-state h1,.sb-auth-state h2{margin:0 0 8px;color:var(--sb-text)}
.sb-auth-state p{margin:0 0 16px;color:var(--sb-muted);line-height:1.55}
.sb-auth-state button,.sb-auth-state a{
  display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;
  border-radius:10px;border:1px solid var(--sb-primary);background:var(--sb-primary);color:#fff;
  text-decoration:none;font-weight:700;cursor:pointer;
}

/* Roles should never be a blank blue page while auth is unresolved. */
.roles-page-main{min-height:320px}
.roles-page-selector{min-height:220px}
.roles-signed-out{display:grid;gap:12px}
.roles-signed-out .role-examples{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:4px 0 6px}
.roles-signed-out .role-examples span{padding:9px 10px;border-radius:10px;background:var(--sb-surface-soft);border:1px solid var(--sb-border);font-size:12px}

/* Contact rows: compact and consistent. */
.contact-page-main .sb-contact-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:18px 0}
.contact-page-main .sb-contact-card{padding:16px;border:1px solid var(--sb-border);border-radius:12px;background:#fff}
.contact-page-main .sb-contact-card strong{display:block;margin-bottom:5px}
.contact-page-main .sb-contact-card span{color:var(--sb-muted);font-size:13px}

/* Updates replaces the ambiguous Catalog label without changing route. */
.update-catalog-intro{max-width:760px;line-height:1.55}
.dynamic-update-entry{scroll-margin-top:92px}

/* Loading, empty and failure states share one restrained treatment. */
.sb-state-card{border:1px solid var(--sb-border);border-radius:12px;background:#fff;padding:18px;text-align:center;color:var(--sb-muted)}
.sb-state-card strong{display:block;color:var(--sb-text);margin-bottom:6px}
.sb-skeleton{position:relative;overflow:hidden;background:#dfeff7!important;color:transparent!important}
.sb-skeleton::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);animation:sbShimmer 1.2s ease-in-out infinite}
@keyframes sbShimmer{to{transform:translateX(100%)}}
@media (prefers-reduced-motion:reduce){.sb-skeleton::after{animation:none}.build-card{transition:none!important}}

/* Build/media reliability. */
.build-card img{object-fit:cover}
.sb-image-fallback{display:grid;place-items:center;min-height:120px;background:#e8f7fd;border-bottom:1px solid var(--sb-border);color:var(--sb-muted);text-align:center;padding:12px}
.sb-image-fallback strong{display:block;color:var(--sb-text);font-size:12px}.sb-image-fallback span{font-size:10px}

/* Custom shulker: tap/keyboard first, drag remains a shortcut. */
.shulker-slot{position:relative}
.shulker-slot[aria-selected="true"]{box-shadow:0 0 0 3px rgba(23,105,170,.28) inset}
.shulker-slot-empty-index{font-size:9px;color:#7c99a8}
.shulker-editor-status{margin:8px 0 0;color:var(--sb-muted);font-size:12px}
.shulker-summary{gap:10px;align-items:center}
.shulker-summary .sb-slot-summary{display:flex;gap:12px;flex-wrap:wrap}

/* Keep overlays within the viewport. */
:where(.future-search-card,.customer-order-dialog,.name-appearance-card,.owned-item-popup-card,.shulker-quantity-dialog,.shulker-enchant-dialog){max-height:calc(100dvh - 28px);overflow:auto}

@media (max-width:1024px){
  :root{--sb-header-safe:72px}
  .future-nav{gap:10px}.future-nav a{font-size:11px}.future-nav-search-button{min-width:150px}
}
@media (max-width:768px){
  :root{--sb-header-safe:64px}
  html{scroll-padding-top:72px}
  .future-home-main{padding-top:18px!important}
  .future-hero{padding-top:10px!important}
  .contact-page-main .sb-contact-grid{grid-template-columns:1fr}
  .roles-signed-out .role-examples{grid-template-columns:1fr}
  .account-area{right:max(14px,env(safe-area-inset-right));bottom:max(14px,env(safe-area-inset-bottom))}
  .customer-message-compose textarea,input,select{font-size:16px}
}
@media (max-width:390px){
  .future-hero h1{font-size:32px!important}
  .shore-home-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}
/* v112 Shulker shelf view controls */
.shulker-shelf-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.shulker-view-toggle{display:flex;gap:6px}.shulker-view-toggle button{min-height:36px;border:1px solid var(--sb-border);background:#fff;color:var(--sb-text);border-radius:9px;padding:7px 10px;cursor:pointer}.shulker-view-toggle button.active{background:var(--sb-primary);color:#fff;border-color:var(--sb-primary)}
.item-grid.list-view{display:flex!important;flex-direction:column!important;gap:8px!important}.item-grid.list-view .item-card{display:grid!important;grid-template-columns:42px 1fr auto!important;align-items:center!important;gap:10px!important;min-height:54px!important}.item-grid.list-view .item-card img,.item-grid.list-view .item-placeholder{width:42px!important;height:42px!important;grid-row:1/3!important}.item-grid.list-view .item-card strong{align-self:end}.item-grid.list-view .item-card small{grid-column:3;grid-row:1/3;align-self:center}.shulker-summary-actions{display:flex;gap:8px;align-items:center}.shulker-summary-actions button{min-height:42px}
/* Grouped global search */
.future-search-results{gap:14px!important}.future-search-group{display:flex;flex-direction:column;gap:7px}.future-search-group h3{margin:4px 4px 2px;color:var(--sb-muted);font-size:10px;letter-spacing:.12em;text-transform:uppercase}.future-search-empty{display:grid;gap:5px}.future-search-empty strong{color:var(--sb-text);font-size:13px}.future-search-empty span{font-size:11px}
