/* Fbrkh v3.2.0 — shared safe viewport and final-result contract */
:root{
  --v320-safe-top:max(8px,env(safe-area-inset-top));
  --v320-safe-right:max(8px,env(safe-area-inset-right));
  --v320-safe-bottom:max(10px,env(safe-area-inset-bottom));
  --v320-safe-left:max(8px,env(safe-area-inset-left));
  --v320-final-gap:clamp(8px,1.35vh,16px);
}
.v320-viewport{
  min-width:0;
  min-height:calc(100svh - var(--v320-safe-top) - var(--v320-safe-bottom));
  min-height:calc(100dvh - var(--v320-safe-top) - var(--v320-safe-bottom));
  padding-bottom:var(--v320-safe-bottom);
  box-sizing:border-box;
}
.v320-final-shell{
  position:relative;
  isolation:isolate;
  width:min(1120px,100%);
  min-width:0;
  max-width:100%;
  margin-inline:auto;
  display:grid;
  align-content:center;
  justify-items:stretch;
  gap:var(--v320-final-gap);
  padding:clamp(12px,2.2vh,24px) clamp(12px,2vw,26px) var(--v320-safe-bottom);
  box-sizing:border-box;
  overflow:visible;
}
.v320-final-hero{
  min-width:0;
  display:grid;
  justify-items:center;
  gap:clamp(4px,.8vh,9px);
  text-align:center;
}
.v320-final-hero h1,
.v320-final-hero h2{
  max-width:100%;
  margin:0;
  line-height:1.06;
  text-wrap:balance;
  overflow-wrap:anywhere;
}
.v320-final-primary{
  min-width:0;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));
  gap:clamp(8px,1vw,14px);
}
.v320-final-stats{
  min-width:0;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(180px,100%),1fr));
  gap:clamp(7px,.9vw,12px);
}
.v320-final-actions{
  width:min(980px,100%);
  min-width:0;
  margin-inline:auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  gap:8px;
  padding-bottom:var(--v320-safe-bottom);
}
.v320-final-actions>*{
  min-width:0;
  min-height:44px;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
}
.v320-final-shell :is(button,a,input,select,textarea):focus-visible{
  outline:3px solid color-mix(in srgb,#ffd65a 78%,white);
  outline-offset:2px;
}
.v320-no-inner-scroll{
  min-height:0;
  overflow:visible!important;
  scrollbar-width:none;
}
@media (min-width:761px){
  .v320-final-shell{
    max-height:calc(100dvh - var(--v320-safe-top) - var(--v320-safe-bottom) - 8px);
  }
}
@media (max-height:620px) and (orientation:landscape){
  .v320-final-shell{
    align-content:start;
    gap:6px;
    padding-top:6px;
    padding-bottom:6px;
  }
  .v320-final-hero{gap:2px}
  .v320-final-hero h1{font-size:clamp(24px,6.2vh,42px)!important}
  .v320-final-stats{gap:6px}
  .v320-final-actions{gap:6px;padding-bottom:max(4px,env(safe-area-inset-bottom))}
  .v320-final-actions>*{min-height:38px}
}
@media (max-width:760px){
  .v320-viewport{height:auto;min-height:100svh;min-height:100dvh;overflow:visible}
  .v320-final-shell{align-content:start;max-height:none;padding-inline:10px}
  .v320-final-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:390px){
  .v320-final-actions{grid-template-columns:1fr}
}
@media (prefers-reduced-motion: reduce){
  .v320-final-shell *,
  .v320-final-shell *::before,
  .v320-final-shell *::after{
    animation:none!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important;
  }
}
