@layer reset, base, layout, components, utilities;

@layer reset {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    min-width: 320px;
    background: #090b0e;
    color-scheme: dark;
  }

  body,
  h1,
  h2,
  p,
  dl,
  dd {
    margin: 0;
  }

  button,
  select {
    color: inherit;
    font: inherit;
  }

  button {
    border: 0;
  }
}

@layer base {
  :root {
    --background: #090b0e;
    --background-soft: #0d1014;
    --surface: #11151a;
    --surface-raised: #161b22;
    --surface-soft: #0d1116;
    --border: #252c35;
    --border-strong: #333c47;
    --text: #f4f7fa;
    --text-soft: #c9d1da;
    --muted: #8e9aa8;
    --faint: #64707e;
    --mint: #7ae3bd;
    --mint-bright: #9ceccc;
    --mint-ink: #062c20;
    --green: #65d69b;
    --amber: #f0ba68;
    --red: #f07d85;
    --blue: #7eafff;
    --shadow: 0 24px 80px rgb(0 0 0 / 28%);
    --radius-large: 24px;
    --radius-medium: 16px;
    --radius-small: 11px;
    --page-width: 1180px;
    --font-sans:
      Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
      sans-serif;
    --font-mono:
      "SFMono-Regular", Consolas, "Liberation Mono", ui-monospace, monospace;
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
      radial-gradient(circle at 76% -10%, rgb(64 110 95 / 11%), transparent 34rem),
      radial-gradient(circle at -12% 35%, rgb(57 81 115 / 8%), transparent 28rem),
      var(--background);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
  }

  button,
  select,
  a {
    -webkit-tap-highlight-color: transparent;
  }

  button,
  select {
    min-height: 44px;
  }

  button {
    cursor: pointer;
  }

  button:disabled {
    cursor: not-allowed;
  }

  :focus-visible {
    outline: 3px solid rgb(122 227 189 / 68%);
    outline-offset: 3px;
  }

  ::selection {
    background: rgb(122 227 189 / 25%);
    color: var(--text);
  }
}

@layer layout {
  .app-shell {
    position: relative;
    z-index: 1;
    width: min(calc(100% - 40px), var(--page-width));
    margin: 0 auto;
    padding-bottom: 48px;
  }

  .topbar {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 1px solid rgb(255 255 255 / 6%);
  }

  .dashboard {
    padding-top: clamp(42px, 7vw, 76px);
  }

  .hero {
    display: grid;
    align-items: end;
    gap: 30px;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .server-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-top: 38px;
  }

  .server-card {
    grid-column: span 2;
  }

  .server-card:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .server-card:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .page-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 28px;
    padding: 22px 2px 0;
    border-top: 1px solid rgb(255 255 255 / 5%);
  }

  @media (max-width: 900px) {
    .hero {
      align-items: start;
      grid-template-columns: 1fr;
    }

    .capacity-panel {
      width: 100%;
    }

    .server-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .server-card,
    .server-card:nth-child(4),
    .server-card:nth-child(5) {
      grid-column: auto;
    }

    .server-card:last-child:nth-child(odd) {
      grid-column: 1 / -1;
    }
  }

  @media (max-width: 640px) {
    .app-shell {
      width: min(calc(100% - 28px), var(--page-width));
      padding-bottom: 32px;
    }

    .topbar {
      min-height: 72px;
    }

    .dashboard {
      padding-top: 36px;
    }

    .server-grid {
      grid-template-columns: 1fr;
      margin-top: 30px;
    }

    .server-card:last-child:nth-child(odd) {
      grid-column: auto;
    }

    .page-footer {
      align-items: flex-start;
      flex-direction: column;
      gap: 8px;
    }
  }
}

@layer components {
  .page-glow {
    position: fixed;
    z-index: 0;
    top: -240px;
    left: 50%;
    width: min(920px, 90vw);
    height: 520px;
    border: 1px solid rgb(255 255 255 / 3%);
    border-radius: 50%;
    background: radial-gradient(circle, rgb(115 206 174 / 6%), transparent 68%);
    filter: blur(6px);
    pointer-events: none;
    transform: translateX(-50%);
  }

  .skip-link {
    position: fixed;
    z-index: 100;
    top: 12px;
    left: 12px;
    padding: 10px 14px;
    border-radius: 9px;
    background: var(--text);
    color: var(--background);
    font-size: 0.875rem;
    font-weight: 750;
    text-decoration: none;
    transform: translateY(-160%);
    transition: transform 150ms ease;
  }

  .skip-link:focus {
    transform: translateY(0);
  }

  .wordmark {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 720;
    letter-spacing: -0.01em;
    text-decoration: none;
  }

  .brand-grid,
  .loading-brand {
    display: grid;
    width: 26px;
    height: 26px;
    padding: 4px;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 30px rgb(0 0 0 / 24%);
    gap: 3px;
    grid-template-columns: 1fr 1fr;
  }

  .brand-grid span,
  .loading-brand span {
    border-radius: 2px;
    background: var(--mint);
    opacity: 0.9;
  }

  .brand-grid span:nth-child(2),
  .loading-brand span:nth-child(2) {
    opacity: 0.38;
  }

  .brand-grid span:nth-child(3),
  .loading-brand span:nth-child(3) {
    opacity: 0.58;
  }

  .user-cluster {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .preview-badge {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 9px;
    border: 1px solid rgb(240 186 104 / 22%);
    border-radius: 999px;
    background: rgb(240 186 104 / 7%);
    color: #e5bd80;
    font-size: 0.7rem;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .user-identity {
    display: flex;
    align-items: center;
    gap: 9px;
    padding-left: 7px;
  }

  .avatar {
    display: grid;
    width: 34px;
    height: 34px;
    border: 1px solid rgb(122 227 189 / 22%);
    border-radius: 50%;
    background: rgb(122 227 189 / 9%);
    color: var(--mint-bright);
    font-size: 0.78rem;
    font-weight: 780;
    place-items: center;
  }

  .user-name {
    max-width: 160px;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 0.84rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .text-button {
    min-height: 36px;
    padding: 0 9px;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 650;
    transition:
      background-color 150ms ease,
      color 150ms ease;
  }

  .text-button:hover {
    background: rgb(255 255 255 / 5%);
    color: var(--text);
  }

  .eyebrow {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--mint);
    font-size: 0.72rem;
    font-weight: 780;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }

  .eyebrow::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 5px rgb(122 227 189 / 8%);
    content: "";
  }

  .hero h1 {
    max-width: 760px;
    margin-top: 14px;
    font-size: clamp(2.25rem, 5.8vw, 4.5rem);
    font-weight: 720;
    letter-spacing: -0.055em;
    line-height: 0.98;
  }

  .hero-copy {
    max-width: 650px;
    margin-top: 20px;
    color: var(--muted);
    font-size: clamp(1rem, 1.8vw, 1.13rem);
    line-height: 1.65;
  }

  .capacity-panel {
    width: 228px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
    background: rgb(17 21 26 / 72%);
    box-shadow: 0 18px 50px rgb(0 0 0 / 16%);
    backdrop-filter: blur(16px);
  }

  .capacity-label {
    color: var(--faint);
    font-size: 0.69rem;
    font-weight: 760;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .capacity-value {
    margin-top: 5px;
    color: var(--text-soft);
    font-size: 0.91rem;
    font-weight: 650;
  }

  .capacity-meter {
    display: flex;
    gap: 7px;
    margin-top: 14px;
  }

  .capacity-dot {
    height: 6px;
    flex: 1;
    border-radius: 999px;
    background: #272e37;
  }

  .capacity-dot.is-active {
    background: var(--mint);
    box-shadow: 0 0 14px rgb(122 227 189 / 22%);
  }

  .capacity-footnote {
    margin-top: 12px;
    color: var(--faint);
    font-size: 0.72rem;
  }

  .status-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
    padding: 13px 15px;
    border: 1px solid rgb(240 186 104 / 18%);
    border-radius: 12px;
    background: rgb(240 186 104 / 6%);
    color: #d9bd91;
    font-size: 0.82rem;
  }

  .status-notice::before {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    margin-top: 6px;
    border-radius: 50%;
    background: var(--amber);
    content: "";
  }

  .server-card {
    --card-accent: #8894a2;
    position: relative;
    display: flex;
    min-height: 408px;
    overflow: hidden;
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    background:
      linear-gradient(180deg, rgb(255 255 255 / 2.4%), transparent 32%),
      var(--surface);
    box-shadow: 0 16px 48px rgb(0 0 0 / 14%);
    flex-direction: column;
    isolation: isolate;
    transition:
      border-color 180ms ease,
      box-shadow 180ms ease,
      transform 180ms ease;
  }

  .server-card::before {
    position: absolute;
    z-index: -1;
    top: -80px;
    right: -70px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(circle, color-mix(in srgb, var(--card-accent) 14%, transparent), transparent 70%);
    content: "";
    pointer-events: none;
  }

  .server-card::after {
    position: absolute;
    top: -1px;
    right: 24px;
    left: 24px;
    height: 2px;
    border-radius: 0 0 4px 4px;
    background: var(--card-accent);
    content: "";
    opacity: 0.72;
  }

  .server-card--ttt2 {
    --card-accent: #e1b56d;
  }

  .server-card--murder {
    --card-accent: #df7d87;
  }

  .server-card--prophunt {
    --card-accent: #7ed8a7;
  }

  .server-card--atm10 {
    --card-accent: #af92ed;
  }

  .server-card--prominence2 {
    --card-accent: #76aaf5;
  }

  .server-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
  }

  .server-card__identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 12px;
  }

  .server-mark {
    display: grid;
    width: 43px;
    height: 43px;
    flex: 0 0 auto;
    border: 1px solid color-mix(in srgb, var(--card-accent) 28%, var(--border));
    border-radius: 13px;
    background: color-mix(in srgb, var(--card-accent) 8%, var(--surface-soft));
    color: color-mix(in srgb, var(--card-accent) 88%, white);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    place-items: center;
  }

  .server-type {
    color: var(--faint);
    font-size: 0.67rem;
    font-weight: 740;
    letter-spacing: 0.075em;
    text-transform: uppercase;
  }

  .server-title {
    margin-top: 2px;
    overflow: hidden;
    font-size: 1.05rem;
    font-weight: 720;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .status-pill {
    display: inline-flex;
    min-height: 28px;
    flex: 0 0 auto;
    align-items: center;
    gap: 7px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgb(255 255 255 / 2%);
    color: var(--muted);
    font-size: 0.67rem;
    font-weight: 760;
    letter-spacing: 0.055em;
    text-transform: uppercase;
  }

  .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
  }

  .status-pill--online {
    border-color: rgb(101 214 155 / 22%);
    background: rgb(101 214 155 / 7%);
    color: var(--green);
  }

  .status-pill--starting,
  .status-pill--stopping {
    border-color: rgb(240 186 104 / 22%);
    background: rgb(240 186 104 / 7%);
    color: var(--amber);
  }

  .status-pill--starting .status-dot,
  .status-pill--stopping .status-dot {
    animation: status-pulse 1.5s ease-in-out infinite;
  }

  .status-pill--needs_attention {
    border-color: rgb(240 125 133 / 24%);
    background: rgb(240 125 133 / 8%);
    color: var(--red);
  }

  .server-description {
    min-height: 48px;
    margin-top: 19px;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
  }

  .server-facts {
    display: grid;
    gap: 1px;
    margin-top: 20px;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 5%);
    border-radius: 13px;
    background: rgb(255 255 255 / 4%);
  }

  .fact-row {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 10px 12px;
    background: var(--surface-soft);
  }

  .fact-row dt {
    color: var(--faint);
    font-size: 0.72rem;
    font-weight: 600;
  }

  .fact-row dd {
    max-width: 64%;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 0.74rem;
    font-weight: 660;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .fact-row dd.is-address {
    font-family: var(--font-mono);
    font-size: 0.68rem;
  }

  .server-actions {
    display: grid;
    gap: 9px;
    grid-template-columns: 1fr;
    margin-top: auto;
    padding-top: 21px;
  }

  .action-button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 15px;
    border: 1px solid rgb(122 227 189 / 16%);
    border-radius: 12px;
    background: var(--mint);
    color: var(--mint-ink);
    font-size: 0.82rem;
    font-weight: 780;
    letter-spacing: -0.005em;
    transition:
      background-color 150ms ease,
      border-color 150ms ease,
      box-shadow 150ms ease,
      transform 150ms ease;
  }

  .action-button:hover:not(:disabled) {
    background: var(--mint-bright);
    box-shadow: 0 10px 26px rgb(122 227 189 / 15%);
    transform: translateY(-1px);
  }

  .action-button:active:not(:disabled) {
    transform: translateY(0);
  }

  .action-button:disabled {
    border-color: var(--border);
    background: #1b2128;
    color: #75808d;
    box-shadow: none;
  }

  .action-button--copy {
    border-color: color-mix(in srgb, var(--card-accent) 26%, var(--border));
    background: color-mix(in srgb, var(--card-accent) 14%, var(--surface-raised));
    color: color-mix(in srgb, var(--card-accent) 82%, white);
  }

  .action-button--copy:hover:not(:disabled) {
    background: color-mix(in srgb, var(--card-accent) 21%, var(--surface-raised));
    box-shadow: 0 10px 26px rgb(0 0 0 / 16%);
  }

  .button-icon {
    position: relative;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
  }

  .button-icon--launch::before {
    position: absolute;
    top: 50%;
    left: 50%;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 8px solid currentColor;
    content: "";
    transform: translate(-38%, -50%);
  }

  .button-icon--copy::before,
  .button-icon--copy::after {
    position: absolute;
    width: 8px;
    height: 8px;
    border: 1.5px solid currentColor;
    border-radius: 2px;
    content: "";
  }

  .button-icon--copy::before {
    top: 1px;
    right: 1px;
  }

  .button-icon--copy::after {
    bottom: 1px;
    left: 1px;
    background: inherit;
  }

  .spinner {
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 800ms linear infinite;
    opacity: 0.8;
  }

  .server-cost {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: var(--faint);
    font-size: 0.67rem;
  }

  .server-cost strong {
    color: var(--muted);
    font-weight: 650;
  }

  .footer-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.76rem;
  }

  .footer-note::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px rgb(101 214 155 / 7%);
    content: "";
  }

  .footer-detail {
    color: var(--faint);
    font-size: 0.73rem;
  }

  .auth-shell,
  .error-shell {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: 100vh;
    padding: 28px;
    place-items: center;
  }

  .auth-card,
  .error-card {
    width: min(100%, 430px);
    padding: clamp(26px, 6vw, 40px);
    border: 1px solid var(--border);
    border-radius: 26px;
    background:
      linear-gradient(180deg, rgb(255 255 255 / 2.8%), transparent 45%),
      rgb(17 21 26 / 93%);
    box-shadow: var(--shadow);
    text-align: center;
    backdrop-filter: blur(20px);
  }

  .auth-card .brand-grid,
  .error-card .brand-grid {
    width: 42px;
    height: 42px;
    margin: 0 auto;
    padding: 7px;
    border-radius: 12px;
    gap: 4px;
  }

  .auth-kicker {
    margin-top: 25px;
    color: var(--mint);
    font-size: 0.7rem;
    font-weight: 780;
    letter-spacing: 0.13em;
    text-transform: uppercase;
  }

  .auth-card h1,
  .error-card h1 {
    margin-top: 10px;
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 720;
    letter-spacing: -0.052em;
    line-height: 1;
  }

  .auth-copy,
  .error-copy {
    margin-top: 18px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.65;
  }

  .auth-action {
    width: 100%;
    margin-top: 27px;
  }

  .auth-footnote {
    margin-top: 16px;
    color: var(--faint);
    font-size: 0.7rem;
  }

  .loading-view {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(calc(100% - 40px), var(--page-width));
    min-height: 100vh;
    margin: 0 auto;
    align-content: center;
    padding: 60px 0;
  }

  .loading-view .loading-brand {
    margin: 0 auto;
  }

  .loading-label {
    margin-top: 13px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 680;
    letter-spacing: 0.02em;
    text-align: center;
  }

  .loading-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 42px;
  }

  .skeleton-card {
    position: relative;
    height: 270px;
    overflow: hidden;
    border: 1px solid rgb(255 255 255 / 5%);
    border-radius: 20px;
    background: #101419;
  }

  .skeleton-card::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(
      110deg,
      transparent 24%,
      rgb(255 255 255 / 3.5%) 42%,
      transparent 62%
    );
    content: "";
    transform: translateX(-100%);
    animation: skeleton-shimmer 1.7s ease-in-out infinite;
  }

  .preview-controls {
    position: fixed;
    z-index: 50;
    right: 18px;
    bottom: 18px;
    display: flex;
    max-width: calc(100vw - 36px);
    align-items: end;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border-strong);
    border-radius: 14px;
    background: rgb(13 17 22 / 94%);
    box-shadow: 0 18px 55px rgb(0 0 0 / 38%);
    backdrop-filter: blur(18px);
  }

  .preview-controls[hidden] {
    display: none;
  }

  .preview-field {
    display: grid;
    gap: 4px;
  }

  .preview-field label {
    color: var(--faint);
    font-size: 0.58rem;
    font-weight: 760;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .preview-field select {
    min-height: 36px;
    padding: 0 30px 0 10px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: var(--surface-raised);
    color: var(--text-soft);
    font-size: 0.72rem;
  }

  .toast {
    position: fixed;
    z-index: 80;
    bottom: 24px;
    left: 50%;
    width: max-content;
    max-width: calc(100vw - 36px);
    padding: 12px 15px;
    border: 1px solid var(--border-strong);
    border-radius: 11px;
    background: #1a2027;
    box-shadow: 0 16px 50px rgb(0 0 0 / 35%);
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 620;
    transform: translateX(-50%);
  }

  .toast[hidden] {
    display: none;
  }

  .noscript-panel {
    position: fixed;
    z-index: 100;
    right: 16px;
    bottom: 16px;
    left: 16px;
    padding: 14px;
    border: 1px solid rgb(240 125 133 / 28%);
    border-radius: 12px;
    background: #2a171a;
    color: #f3b3b8;
    font-size: 0.86rem;
    text-align: center;
  }

  .clipboard-proxy {
    position: fixed;
    top: -1000px;
    left: -1000px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
  }

  @keyframes spin {
    to {
      transform: rotate(360deg);
    }
  }

  @keyframes status-pulse {
    0%,
    100% {
      opacity: 0.35;
      transform: scale(0.85);
    }

    50% {
      opacity: 1;
      transform: scale(1);
    }
  }

  @keyframes skeleton-shimmer {
    to {
      transform: translateX(100%);
    }
  }

  @media (hover: hover) and (pointer: fine) {
    .server-card:hover {
      border-color: color-mix(in srgb, var(--card-accent) 22%, var(--border));
      box-shadow: 0 22px 62px rgb(0 0 0 / 21%);
      transform: translateY(-2px);
    }
  }

  @media (max-width: 900px) {
    .loading-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .skeleton-card:last-child {
      display: none;
    }
  }

  @media (max-width: 640px) {
    .user-name {
      display: none;
    }

    .user-identity {
      padding-left: 0;
    }

    .preview-badge {
      display: none;
    }

    .hero h1 {
      max-width: 520px;
    }

    .server-card {
      min-height: 390px;
    }

    .loading-view {
      width: min(calc(100% - 28px), var(--page-width));
    }

    .loading-grid {
      grid-template-columns: 1fr;
    }

    .skeleton-card {
      height: 210px;
    }

    .skeleton-card:nth-child(n + 3) {
      display: none;
    }

    .preview-controls {
      right: 10px;
      bottom: 10px;
      left: 10px;
      align-items: stretch;
    }

    .preview-field {
      min-width: 0;
      flex: 1;
    }

    .preview-field select {
      width: 100%;
    }

    .toast {
      bottom: 88px;
    }
  }

  @media (max-width: 420px) {
    .text-button {
      padding: 0 5px;
    }

    .avatar {
      width: 32px;
      height: 32px;
    }

    .server-card {
      padding: 18px;
      border-radius: 20px;
    }

    .status-pill {
      padding: 0 8px;
    }

    .fact-row dd {
      max-width: 60%;
    }

    .fact-row--address {
      align-items: flex-start;
      flex-direction: column;
      gap: 6px;
    }

    .fact-row--address dd.is-address {
      width: 100%;
      max-width: none;
      overflow: visible;
      font-size: 0.62rem;
      overflow-wrap: anywhere;
      text-align: left;
      text-overflow: clip;
      white-space: normal;
    }
  }
}

@layer utilities {
  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    padding: 0;
    border: 0;
    margin: -1px;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
