/* Shared chrome polish for 88z.ai. Tokens live in theme.css. Keep this file
   limited to header, footer, home, and listing layout so other pages stay intact. */

button:focus-visible,a:focus-visible,.icon-button:focus-visible,.theme-trigger:focus-visible{
  outline:2px solid var(--focus-line,#8da4ff);
  outline-offset:2px
}
input:focus-visible,textarea:focus-visible,select:focus-visible{
  outline:2px solid var(--focus-line,#8da4ff);
  outline-offset:2px
}
.skip-link{border-radius:var(--radius-md,8px);box-shadow:var(--shadow-md);font-weight:600}

.wrap{width:calc(100% - 96px)}
.main-content{padding-top:var(--space-6,24px);padding-bottom:var(--space-10,40px)}

/* Header */
.site-header{
  background:var(--surface,#fff);
  background:color-mix(in srgb,var(--surface,#fff) 86%,transparent);
  backdrop-filter:saturate(1.6) blur(16px);
  -webkit-backdrop-filter:saturate(1.6) blur(16px);
  border-bottom:1px solid var(--line,#e6eaf0)
}
.header-inner{height:var(--header-h,64px);gap:var(--space-6,24px)}
.channel-nav-wrap{display:flex;align-items:stretch;min-width:0;flex:1 1 auto;height:100%;overflow:hidden}
.channel-nav{gap:4px}
.channel-nav a{
  font-size:14px;
  font-weight:500;
  padding:0 10px;
  color:var(--text-secondary,#3f4b5f);
  border-radius:var(--radius-md,8px)
}
.channel-nav a:hover{color:var(--ink,#111827);background:var(--surface-soft,#f2f4f7)}
.channel-nav a.active{color:var(--brand,#315bea);font-weight:600;background:transparent}
.channel-nav a.active:after{height:2px;left:10px;right:10px;border-radius:2px 2px 0 0}
.header-actions{gap:8px}
.icon-button{width:36px;height:36px;border-radius:var(--radius-md,8px)}
.theme-picker .theme-trigger{width:36px;height:36px;border-radius:var(--radius-md,8px)}
.language-switch{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:32px;padding:0 10px;border:1px solid var(--line,#e6eaf0);
  border-radius:var(--radius-md,8px);font-size:13px;font-weight:600;
  color:var(--text-secondary,#3f4b5f);background:var(--surface,#fff)
}
.language-switch:hover{color:var(--brand,#315bea);background:var(--brand-soft,#eef2ff);border-color:color-mix(in srgb,var(--brand,#315bea) 25%,var(--line,#e6eaf0))}
.account-link{padding:6px 12px;border-radius:var(--radius-md,8px);font-weight:600}
.account-link.account-register,.account-cta{
  color:#fff;background:var(--action,var(--brand,#315bea));border-color:transparent
}
.account-link.account-register:hover,.account-cta:hover{color:#fff;background:var(--action-hover,#2547c4)}
.publish-button{
  display:inline-flex;align-items:center;height:36px;padding:0 12px;
  border-radius:var(--radius-md,8px);font-weight:600
}
.saved-trigger{padding:0 4px;height:36px}
.brand-mark{border-radius:var(--radius-md,8px)}
.brand-name{font-size:20px;letter-spacing:-.04em;font-weight:700}

/* Mid-width: shorter labels, drop the duplicate studio CTA, keep actions from clipping. */
@media(max-width:1280px){
  .channel-nav .nav-full{display:none}
  .header-actions .publish-button{display:none}
  .saved-trigger>span{display:none}
  .header-inner{gap:16px}
  .channel-nav a{padding:0 8px}
  .channel-nav a.active:after{left:8px;right:8px}
  .brand-domain{display:none}
}
@media(min-width:681px) and (max-width:900px){.wrap{width:calc(100% - 40px)}}
@media(min-width:901px) and (max-width:1150px){.wrap{width:calc(100% - 48px)}}

/* Mobile: one horizontally scrolling nav row so the eighth item no longer wraps. */
@media(max-width:680px){
  html{scroll-padding-top:112px}
  .wrap{width:calc(100% - 32px)}
  .site-header{height:104px}
  .header-inner{height:56px;gap:12px;position:relative}
  .brand-name{font-size:18px}
  .brand-mark{width:32px;height:32px;font-size:20px;border-radius:8px}
  .channel-nav-wrap{
    position:absolute;top:56px;left:0;right:0;height:48px;flex:none;
    overflow-x:auto;overflow-y:hidden;scrollbar-width:none;
    mask-image:linear-gradient(90deg,transparent,#000 8px,#000 calc(100% - 12px),transparent);
    -webkit-mask-image:linear-gradient(90deg,transparent,#000 8px,#000 calc(100% - 12px),transparent)
  }
  .channel-nav-wrap::-webkit-scrollbar{display:none}
  .channel-nav{
    position:static;top:auto;left:auto;right:auto;
    display:flex;grid-template-columns:none;
    height:48px;width:max-content;min-width:100%;
    justify-content:flex-start;align-items:stretch;gap:0;padding:0 8px
  }
  .channel-nav a{
    flex:none;justify-content:center;padding:0 12px;font-size:14px;font-weight:550
  }
  .channel-nav .nav-full{display:none}
  .channel-nav a.active:after{left:10px;right:10px;height:2px}
  .header-actions{gap:6px}
  .header-actions .icon-button,.header-actions .theme-trigger{width:32px;height:32px}
  .header-actions .publish-button{display:none}
  .saved-trigger>span{display:none}
  .account-link{padding:6px 8px}
}

/* Search + chips */
.home-search-row{gap:20px;margin-bottom:24px}
.portal-search,.dir-search{
  height:48px;border-radius:var(--radius-lg,12px);box-shadow:var(--shadow-xs)
}
.portal-search:focus-within,.dir-search:focus-within{
  border-color:var(--brand,#315bea);
  box-shadow:0 0 0 4px var(--brand-soft,#eef2ff)
}
.portal-search>button,.dir-search button{
  height:36px;border-radius:var(--radius-md,8px);padding:0 16px;font-weight:600
}
.quick-search{gap:8px}
.quick-search button{
  padding:6px 12px;border-radius:var(--radius-full,999px);
  border:1px solid var(--line,#e6eaf0);background:var(--surface,#fff);
  color:var(--text-secondary,#3f4b5f)
}
.quick-search button:hover{color:var(--brand,#315bea);border-color:color-mix(in srgb,var(--brand,#315bea) 30%,var(--line));background:var(--brand-soft,#eef2ff)}
@media(max-width:680px){
  .portal-search,.dir-search{height:44px;border-radius:12px}
  .quick-search{margin-top:10px}
}

/* Buttons, cards, tags */
.button-primary,.dir-official,.relay-primary{
  border-radius:var(--radius-md,8px);font-weight:600;
  transition:background .15s ease,transform .15s ease,box-shadow .15s ease
}
.button-primary:hover{box-shadow:var(--shadow-sm)}
.panel,.account-card,.dir-group,.dir-profile,.dir-cats{
  border-radius:var(--radius-lg,12px)
}
.tool-card,.dir-card a,.game-card{
  border-radius:var(--radius-lg,12px);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease
}
.tool-card:hover,.dir-card a:hover,.game-card:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
  border-color:var(--line-strong,#d0d5dd)
}
.tool-logo,.tool-mark{border-radius:12px}
.feature-tags>span,.modality,span[class*="tag"]{
  border-radius:var(--radius-full,999px)
}
.tab-row button{border-radius:var(--radius-md,8px)}

/* Replace the repeated default share image with a typographic panel. */
.feature-image{position:relative}
.feature-image:has(img[src*="share-cover"]){
  background:
    radial-gradient(120% 80% at 8% 0%,#8da4ff55,transparent 55%),
    radial-gradient(90% 90% at 100% 100%,#a78bfa33,transparent 50%),
    linear-gradient(160deg,#1b2744 0%,#2a3f7a 48%,#315bea 100%)
}
.feature-image:has(img[src*="share-cover"]) img{opacity:0}
.feature-image:has(img[src*="share-cover"]):after{
  content:"88Z";position:absolute;inset:0;display:grid;place-items:center;
  font-weight:750;font-size:clamp(56px,8vw,88px);letter-spacing:-.06em;color:rgba(255,255,255,.22);pointer-events:none
}
.feature-badge{
  border-radius:var(--radius-sm,6px);backdrop-filter:blur(8px);font-weight:600
}
.news-thumbnail:has(img[src*="share-cover"]),
.news-row .thumb:has(img[src*="share-cover"]),
.flash-item img[src*="share-cover"]{display:none}
.feature-slider,.briefing{border-radius:var(--radius-xl,16px)}
.slider-arrows button{border-radius:var(--radius-full,999px)}

/* Listing heroes and sticky sidebars */
.channel-heading h1,.directory-heading h1,.dir-hero h1,.flash-hero h1,.games-heading h1{
  letter-spacing:-.04em;font-weight:700
}
.dir-cats{top:calc(var(--header-h,64px) + 16px)}
.directory-categories{top:calc(var(--header-h,64px) + 16px)}
@media(max-width:680px){
  .dir-cats,.directory-categories{top:auto}
  .dir-hero h1,.flash-hero h1,.channel-heading h1{font-size:28px;line-height:1.2}
}

/* Footer */
.site-footer{background:var(--surface,#fff);border-top:1px solid var(--line,#e6eaf0)}
.footer-inner{padding:40px 0;gap:32px;align-items:flex-start}
.footer-brand{color:var(--ink,#111827);font-size:16px;font-weight:700;letter-spacing:-.03em}
.copyright{margin-left:10px;color:var(--text-soft,#98a2b3)}
.footer-inner p{margin-top:8px;color:var(--muted,#667085)}
.footer-links{gap:24px;flex-wrap:wrap;align-items:center}
.footer-links a,.footer-links button{color:var(--text-secondary,#3f4b5f);padding:4px 0}
.footer-links a:hover,.footer-links button:hover{color:var(--brand,#315bea)}
@media(max-width:680px){
  .footer-inner{display:grid;gap:20px;padding:32px 0}
  .footer-links{gap:12px 20px}
}

/* Empty states, tables, forms */
.empty-state{padding:48px 24px;border-radius:var(--radius-xl,16px)}
.account-table,.relay-model-table,.relay-data-table{border-collapse:separate;border-spacing:0}
.account-table th,.account-table td{padding:10px 12px}
body[data-page="pricing"] .main-content,
body[data-page="pricing"] article,
body[data-page="models"] .main-content>article{max-width:960px}
body[data-page="pricing"] .main-content{background:var(--surface,#fff);border:1px solid var(--line);border-radius:var(--radius-xl,16px);padding:40px 44px}
body[data-page="pricing"] h1{letter-spacing:-.04em}
body[data-page="pricing"] ul{padding-left:20px}
@media(max-width:680px){body[data-page="pricing"] .main-content{padding:24px 18px}}

/* Auth pages share the same type and radius language when they load this sheet. */
.auth-body{font-family:var(--font,ui-sans-serif,system-ui,sans-serif)}
.auth-card{border-radius:var(--radius-xl,16px);box-shadow:var(--shadow-md)}
.auth-submit,.auth-field input{border-radius:var(--radius-md,8px)}

@media(prefers-reduced-motion:reduce){
  .tool-card,.dir-card a,.game-card,.button-primary,.portal-search>button,.feature-image img{transition:none!important;transform:none!important}
}

@media(max-width:1520px){
  html[lang="en"] .channel-nav .nav-full{display:none}
}
@media(min-width:681px){
  .channel-nav-wrap{overflow:visible}
}
