* {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --nav: #080c18;
  --panel: #0e1424;
  --panel-2: #101828;
  --panel-dark: #060a14;
  --shadow: rgba(0, 0, 0, .72);
  --line: rgba(74, 181, 196, .12);
  --line-strong: rgba(74, 181, 196, .24);
  --text: #eef2ff;
  --muted: #8b9cc0;
  --accent: #4ab5c4;
  --accent-glow: rgba(74, 181, 196, .18);
  --primary: #c8a96e;
  --green: #28c76f;
  --green-dark: rgba(40, 199, 111, .12);
  --blue: #2b7fff;
  --yellow: #c8a96e;
  --danger: #e07272;
  --border: rgba(74, 181, 196, .14);
  --border-strong: rgba(74, 181, 196, .28);
  --radius: 9px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --dur-mid: 220ms;
  --transition: 0.22s var(--ease-out);
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(74, 181, 196, .11) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 85% 80%, rgba(200, 169, 110, .07) 0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 15% 70%, rgba(43, 127, 255, .06) 0%, transparent 50%),
    #060a14;
  color: var(--text);
  font-family: "Nunito", "Noto Sans Thai", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(74, 181, 196, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 181, 196, .045) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 100%);
}

button {
  font: inherit;
}

.lucide {
  width: 1em;
  height: 1em;
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: -0.16em;
}

.topbar {
  width: min(1272px, calc(100% - 48px));
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 14px auto 0;
  padding: 0 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .02) 100%),
              rgba(8, 12, 24, .88);
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .28);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}

.brand,
.topbar a,
.footer-links a {
  color: #eef3ff;
  font-weight: 900;
  letter-spacing: 0;
  text-decoration: none;
}

.brand {
  min-width: 150px;
  white-space: nowrap;
  font-size: 15px;
  background: linear-gradient(135deg, var(--text) 0%, var(--muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  min-width: 0;
}

.topbar nav a,
.footer-links a {
  color: var(--muted);
  transition: color var(--transition);
}

.topbar nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.topbar nav a .lucide {
  width: 15px;
  height: 15px;
}

.topbar nav a:hover,
.footer-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.nav-toggle:hover,
.nav-toggle.is-open {
  background: rgba(74, 181, 196, .1);
  border-color: var(--border-strong);
  color: var(--accent);
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle.is-open .icon-menu {
  display: none;
}

.nav-toggle.is-open .icon-close {
  display: block;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  width: min(1272px, calc(100% - 48px));
  margin: 6px auto 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, .06) 0%, rgba(255, 255, 255, .02) 100%),
              rgba(8, 12, 24, .94);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .32);
}

.mobile-nav.open {
  display: flex;
  animation: mobileNavIn 0.18s var(--ease-out) both;
}

.mobile-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: calc(var(--radius-lg) - 4px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}

.mobile-nav a:hover {
  background: rgba(74, 181, 196, .1);
  color: var(--text);
}

@keyframes mobileNavIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.shell {
  width: min(1048px, calc(100% - 32px));
  min-height: calc(100dvh - 172px);
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: clamp(36px, 8vh, 72px) 0 42px;
}

.hidden {
  display: none !important;
}

.captcha-shell {
  min-height: calc(100dvh - 104px);
  display: grid;
  place-items: center;
  padding: 26px 16px 96px;
}

.captcha-card {
  width: min(380px, 100%);
  display: grid;
  justify-items: center;
  gap: 42px;
  padding-top: 52px;
}

.captcha-caption {
  margin: 0;
  color: #e0e5f1;
  font-family: "Noto Sans Thai", "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

.captcha-widget {
  min-height: 78px;
  display: grid;
  place-items: center;
}

.local-captcha {
  width: 302px;
  min-height: 76px;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d7dce8;
  border-radius: 4px;
  background: #f8f8f8;
  color: #1c2435;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  cursor: pointer;
}

.local-captcha input {
  width: 30px;
  height: 30px;
  margin: 0;
  accent-color: #35ad67;
  cursor: pointer;
}

.local-captcha span {
  font-family: "Noto Sans Thai", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
}

.local-captcha strong {
  max-width: 64px;
  color: #4b5563;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.gateway-card {
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, .05) 0%, rgba(255, 255, 255, .01) 100%),
              rgba(10, 16, 28, .92);
  border: 1px solid var(--border);
  box-shadow:
    0 0 0 1px var(--border),
    0 0 40px var(--accent-glow),
    0 32px 80px rgba(0, 0, 0, .52);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  animation: fadeScaleIn 0.44s var(--ease-spring) both;
}

.reward-panel {
  display: grid;
  grid-template-columns: minmax(180px, .72fr) minmax(260px, 1.25fr) minmax(120px, 152px);
  align-items: center;
  gap: clamp(18px, 3vw, 32px);
  margin: 0 16px;
  padding: clamp(22px, 4vw, 32px) clamp(18px, 3vw, 24px);
  border-radius: calc(var(--radius-lg) - 2px);
  background: linear-gradient(135deg, rgba(74, 181, 196, .07) 0%, rgba(74, 181, 196, .02) 100%),
              rgba(14, 20, 36, .8);
  border-bottom: 1px solid rgba(74, 181, 196, .1);
}

.reward-title {
  min-width: 0;
}

h1 {
  margin: 0;
  max-width: 330px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.4;
  letter-spacing: 0;
}

.description {
  margin: 6px 0 0;
  color: var(--muted);
  font-family: "Noto Sans Thai", "Nunito", sans-serif;
  font-size: 14px;
  font-weight: 800;
}

.progress-wrap {
  display: grid;
  gap: 7px;
}

.progress-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 18px;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

#session-state {
  min-width: 74px;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
  text-transform: capitalize;
}

.bar {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
}

.bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1aab5a, var(--green));
  box-shadow: 0 0 8px rgba(40, 199, 111, .42);
  transition: width 0.36s var(--ease-out);
}

.actions {
  display: flex;
  justify-content: flex-end;
}

.start-btn,
.new-key-btn,
.key-action {
  border-radius: var(--radius);
  font-weight: 900;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}

.start-btn:hover,
.new-key-btn:hover,
.key-action:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 108px;
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  background: linear-gradient(135deg, #1aab5a 0%, var(--green) 100%);
  color: #fff;
  box-shadow: 0 6px 20px rgba(40, 199, 111, .32);
}

.start-btn:hover {
  box-shadow: 0 10px 28px rgba(40, 199, 111, .42);
}

.start-btn.done {
  border: 1px solid rgba(40, 199, 111, .35);
  background: rgba(40, 199, 111, .08);
  color: var(--green);
  box-shadow: none;
}

.keys-panel {
  overflow-x: auto;
  padding: clamp(22px, 4vw, 34px) clamp(16px, 3vw, 24px) 30px;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

th {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(255, 255, 255, .02);
}

td {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

tbody tr {
  transition: background var(--transition);
}

tbody tr:hover {
  background: rgba(74, 181, 196, .04);
}

.key-cell {
  max-width: 420px;
  overflow-wrap: anywhere;
  color: #aac9f7;
  font-family: "Menlo", "Consolas", "Fira Mono", monospace;
  font-size: 12px;
  font-weight: 400;
}

.key-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
}

.key-icon {
  color: var(--yellow);
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.key-icon .lucide {
  width: 22px;
  height: 22px;
}

.new-key-row {
  display: flex;
  justify-content: center;
  padding-top: 22px;
}

.new-key-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 18px;
  border: 1px solid rgba(43, 127, 255, .4);
  background: transparent;
  color: var(--blue);
}

.new-key-btn:not(:disabled) {
  background: linear-gradient(135deg, #1a5fc7 0%, var(--blue) 100%);
  color: white;
  border: 0;
  box-shadow: 0 6px 18px rgba(43, 127, 255, .28);
}

.new-key-btn:not(:disabled):hover {
  box-shadow: 0 10px 24px rgba(43, 127, 255, .42);
}

.key-action {
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .04);
  color: var(--muted);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform var(--transition), background var(--transition), border-color var(--transition), color var(--transition);
}

.key-action:hover {
  background: rgba(255, 255, 255, .08);
  border-color: var(--border-strong);
  color: var(--text);
  transform: translateY(-2px);
  filter: none;
}

.key-action.copy {
  min-width: 50px;
}

.key-action.extend {
  border-color: rgba(40, 199, 111, .3);
  color: #7eeda0;
}

.key-action.extend:hover {
  background: rgba(40, 199, 111, .08);
  border-color: rgba(40, 199, 111, .5);
  color: var(--green);
}

.key-action.reset {
  border-color: rgba(200, 169, 110, .3);
  color: #e8c77e;
}

.key-action.reset:hover {
  background: rgba(200, 169, 110, .08);
  border-color: rgba(200, 169, 110, .5);
  color: var(--primary);
}

button:disabled {
  opacity: .42;
  cursor: not-allowed;
  transform: none !important;
}

.status {
  display: inline-flex;
  min-width: 68px;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(40, 199, 111, .12);
  border: 1px solid rgba(40, 199, 111, .28);
  color: #5ae08b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status.reset {
  background: rgba(43, 127, 255, .1);
  border-color: rgba(43, 127, 255, .24);
  color: #7eb4ff;
  text-transform: none;
}

.status.expired,
.status.banned {
  background: rgba(224, 114, 114, .1);
  border-color: rgba(224, 114, 114, .24);
  color: #f09090;
}

.key-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: max-content;
}

.empty {
  color: var(--muted);
  text-align: center;
}

.time-active {
  color: var(--green);
}

.footer-links {
  position: fixed;
  right: max(28px, calc((100vw - 1048px) / 2));
  bottom: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.success-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  background: rgba(4, 7, 16, .64);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  pointer-events: none;
}

#progress-modal {
  pointer-events: auto;
}

.success-card {
  width: min(512px, calc(100% - 36px));
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 38px 36px 34px;
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, rgba(255, 255, 255, .07) 0%, rgba(255, 255, 255, .02) 100%),
              rgba(10, 16, 28, .92);
  border: 1px solid rgba(40, 199, 111, .28);
  box-shadow:
    0 0 40px rgba(40, 199, 111, .12),
    0 24px 64px rgba(0, 0, 0, .52);
  backdrop-filter: blur(28px) saturate(1.4);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  text-align: center;
  animation: fadeScaleIn 0.44s var(--ease-spring) both;
}

.success-mark {
  position: relative;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(40, 199, 111, .35);
  border-radius: 50%;
  color: var(--green);
  line-height: 1;
  animation: successRingPulse 2s ease-in-out infinite;
}

.success-mark::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 2px solid rgba(40, 199, 111, .14);
  border-radius: 50%;
}

.success-mark .lucide {
  width: 52px;
  height: 52px;
  stroke-width: 2.2;
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  animation: checkDraw 0.6s 0.2s var(--ease-out) forwards;
}

.success-card h2 {
  margin: 8px 0 0;
  background: linear-gradient(135deg, #fff 0%, var(--green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 30px;
  line-height: 1.1;
}

.success-card p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.confetti-layer {
  position: fixed;
  inset: 0;
  z-index: 31;
  pointer-events: none;
  overflow: hidden;
}

.confetti {
  position: absolute;
  width: 5px;
  height: 12px;
  opacity: .95;
  box-shadow: 0 0 4px currentColor;
  animation: confetti-fall 1.8s ease-out forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, -20vh, 0) rotate(0deg);
  }
  100% {
    transform: translate3d(var(--x), 74vh, 0) rotate(580deg);
    opacity: 0;
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 40;
  max-width: min(520px, calc(100% - 28px));
  transform: translate(-50%, 20px);
  padding: 12px 18px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, .08) 0%, rgba(255, 255, 255, .03) 100%),
              rgba(10, 16, 28, .9);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  color: var(--text);
  font-weight: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s var(--ease-out), transform .22s var(--ease-out);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .32);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: linear-gradient(135deg, rgba(224, 114, 114, .12) 0%, rgba(224, 114, 114, .04) 100%),
              rgba(10, 16, 28, .9);
  border-color: rgba(224, 114, 114, .28);
  color: #f0b0b0;
}

@keyframes fadeScaleIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(12px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}

@keyframes successRingPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(40, 199, 111, 0);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(40, 199, 111, 0);
  }
  25% {
    box-shadow: 0 0 0 6px rgba(40, 199, 111, .14);
  }
}

@keyframes checkDraw {
  to {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 820px) {
  .topbar {
    width: min(100% - 24px, 1272px);
    align-items: center;
    flex-direction: row;
    gap: 12px;
    padding: 0 16px;
    min-height: 50px;
  }

  .topbar nav {
    display: none;
  }

  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .mobile-nav {
    width: min(100% - 24px, 1272px);
  }

  .shell {
    place-items: start center;
    padding-top: 42px;
  }

  .gateway-card {
    box-shadow:
      0 0 0 1px var(--border),
      0 22px 52px rgba(0, 0, 0, .42);
  }

  .reward-panel {
    grid-template-columns: 1fr;
    margin: 0;
    gap: 18px;
  }

  .actions,
  #session-state {
    justify-content: stretch;
    text-align: left;
  }

  .footer-links {
    position: static;
    width: min(1048px, calc(100% - 32px));
    margin: 0 auto 24px;
    justify-content: center;
  }

  .start-btn,
  .new-key-btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body {
    background-attachment: local;
  }

  body::before {
    background-image:
      linear-gradient(rgba(74, 181, 196, .035) 1px, transparent 1px),
      linear-gradient(90deg, rgba(74, 181, 196, .035) 1px, transparent 1px);
    background-size: 32px 32px;
  }

  .topbar {
    width: calc(100% - 20px);
    margin-top: 10px;
    padding: 0 14px;
    min-height: 48px;
  }

  .mobile-nav {
    width: calc(100% - 20px);
  }

  .brand {
    min-width: 0;
    font-size: 14px;
  }

  .shell {
    width: calc(100% - 20px);
    min-height: auto;
    padding: 20px 0 26px;
  }

  .captcha-shell {
    min-height: calc(100dvh - 92px);
    padding: 18px 10px 64px;
  }

  .captcha-card {
    gap: 28px;
    padding-top: 22px;
  }

  .local-captcha {
    width: min(302px, calc(100vw - 40px));
    grid-template-columns: 34px minmax(0, 1fr) auto;
  }

  .gateway-card {
    border-radius: var(--radius-lg);
    box-shadow:
      0 0 0 1px var(--border),
      0 18px 44px rgba(0, 0, 0, .44);
  }

  .reward-panel {
    padding: 20px 16px;
  }

  h1 {
    max-width: none;
    font-size: 17px;
    line-height: 1.35;
  }

  .description {
    font-size: 13px;
    line-height: 1.45;
  }

  .progress-line {
    gap: 8px 14px;
  }

  #session-state {
    min-width: 0;
  }

  .keys-panel {
    overflow: visible;
    padding: 18px 12px 24px;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  table {
    min-width: 0;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  tbody {
    display: grid;
    gap: 12px;
  }

  tr {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(14, 20, 36, .6);
  }

  td {
    min-height: 42px;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
  }

  td:last-child {
    border-bottom: 0;
  }

  td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.25;
  }

  .empty {
    display: block;
    padding: 18px 12px;
    text-align: center;
  }

  .empty::before {
    content: none;
  }

  .key-cell {
    max-width: none;
  }

  .key-chip {
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
  }

  .key-chip span:last-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .key-icon .lucide {
    width: 18px;
    height: 18px;
  }

  .key-actions {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(76px, 1fr));
    gap: 8px;
  }

  .key-action {
    min-width: 0;
    min-height: 34px;
    padding: 0 8px;
    font-size: 12px;
  }

  .new-key-row {
    padding-top: 16px;
  }

  .footer-links {
    width: calc(100% - 20px);
    margin-bottom: 18px;
    gap: 8px 18px;
    font-size: 13px;
    text-align: center;
  }

  .success-card {
    width: calc(100% - 28px);
    gap: 12px;
    padding: 28px 20px 24px;
  }

  .success-mark {
    width: 74px;
    height: 74px;
  }

  .success-mark .lucide {
    width: 42px;
    height: 42px;
  }

  .success-card h2 {
    font-size: 24px;
  }

  .success-card p {
    font-size: 15px;
  }
}

@media (max-width: 380px) {
  .topbar nav {
    grid-template-columns: 1fr;
  }

  td {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .key-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-height: 620px) and (min-width: 821px) {
  .shell {
    min-height: auto;
    padding-top: 34px;
  }

  .captcha-shell {
    min-height: auto;
    padding-top: 24px;
  }

  .footer-links {
    position: static;
    width: min(1048px, calc(100% - 32px));
    margin: 0 auto 22px;
    justify-content: flex-end;
  }
}
