:root {
  color-scheme: light;
  background: #f4f3eb;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: #f4f3eb;
}

body {
  min-width: 320px;
  margin: 0;
  background: #f4f3eb;
  color: #313a32;
  font-family:
    Arial,
    "Segoe UI Emoji",
    "Apple Color Emoji",
    "Noto Color Emoji",
    sans-serif;
}

.site-header {
  width: 100%;
  border-top: 2px solid #e2e1da;
  border-bottom: 1px solid #e2e1da;
  background: #fbfaf5;
}

.site-header__inner {
  display: flex;
  width: 100%;
  min-height: 136px;
  margin: 0 auto;
  padding: 20px clamp(22px, 2.5vw, 48px);
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header__logo img {
  display: block;
  width: auto;
  height: 72px;
  max-width: 132px;
  object-fit: contain;
  filter: drop-shadow(3px 3px 0 #a9b2a9);
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.account-widget {
  min-width: 0;
}

.account-login-form__fields {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.account-login-form label {
  display: block;
  margin-bottom: 7px;
  color: #24562c;
  font-size: 14px;
  font-weight: 800;
}

.account-login-form input {
  display: block;
  width: min(100%, 260px);
  min-width: 0;
  min-height: 46px;
  padding: 9px 11px;
  border: 2px solid #889189;
  border-radius: 5px;
  background: #ffffff;
  color: #202721;
  font: inherit;
}

.account-login-form input:focus {
  border-color: #3478bd;
  outline: 2px solid rgba(52, 120, 189, 0.18);
}

.account-login-form--header input {
  width: 230px;
}

.account-login-button {
  min-height: 46px;
  padding: 9px 15px;
  border: 2px solid #24562c;
  border-radius: 5px;
  background: #eef5df;
  color: #24562c;
  font: inherit;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}

.account-login-button:hover {
  background: #e1edcb;
}

.account-login-button:focus-visible,
.account-logout-button:focus-visible,
.account-login-form input:focus-visible {
  outline: 3px solid #3478bd;
  outline-offset: 2px;
}

.account-error {
  display: block;
  margin-top: 5px;
  color: #8b3030;
  font-size: 12px;
  line-height: 1.3;
}

.account-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #3f4940;
  font-size: 14px;
}

.account-summary strong {
  color: #24562c;
}

.account-summary--header {
  padding: 10px 12px;
  border: 1px solid #c2c8bf;
  border-radius: 5px;
  background: #ffffff;
}

.account-logout-button {
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: #a43a3a;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  white-space: nowrap;
  cursor: pointer;
}

.site-header__basket {
  display: inline-flex;
  min-width: 160px;
  min-height: 64px;
  padding: 15px 24px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 2px solid #55b85a;
  border-radius: 0;
  background: #55b85a;
  color: #07152d;
  font-size: 22px;
  font-family: inherit;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 150ms ease,
    border-color 150ms ease,
    transform 150ms ease;
}

.site-header__basket:hover {
  border-color: #24562c;
  background: #65c66a;
  transform: translateY(-1px);
}

.site-header__basket:focus-visible {
  outline: 3px solid #3478bd;
  outline-offset: 3px;
}

.site-header__basket-count {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #07152d;
  color: #ffffff;
  font-size: 13px;
  line-height: 1;
}

.page-shell {
  width: calc(100% - 32px);
  margin: 24px auto;
}

.page-shell--home {
  max-width: 940px;
}

.page-shell--ranks {
  max-width: 1080px;
}

.store-status,
.payment-complete {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid #a9b2a9;
  border-left: 5px solid #3478bd;
  border-radius: 6px;
  background: #edf5fa;
  color: #34434d;
  font-size: 14px;
  line-height: 1.5;
}

.store-status[data-tone="warning"] {
  border-left-color: #c98a20;
  background: #fff7e3;
  color: #6a4a12;
}

.store-status[data-tone="error"] {
  border-left-color: #b64141;
  background: #fff0f0;
  color: #722b2b;
}

.payment-complete {
  border-left-color: #55b85a;
  background: #eef8e8;
  color: #24562c;
  font-weight: 700;
}

.live-price {
  margin-top: 6px;
  color: #313a32;
  font-size: 16px;
  font-weight: 800;
}

.rank-image img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 10px;
  object-fit: contain;
}

.rank-action,
.store-primary-button,
.store-text-button,
.store-dialog__close {
  font: inherit;
}

.rank-action {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--rank-shadow);
  border-radius: 5px;
  background: var(--rank-color);
  box-shadow: 0 3px 0 var(--rank-shadow);
  color: #ffffff;
  font-weight: 800;
  text-align: center;
  cursor: pointer;
}

.rank-action:hover:not(:disabled) {
  filter: brightness(1.07);
}

.rank-action:focus-visible,
.store-primary-button:focus-visible,
.store-text-button:focus-visible,
.store-dialog__close:focus-visible {
  outline: 3px solid #3478bd;
  outline-offset: 3px;
}

.rank-action:disabled {
  cursor: wait;
  filter: grayscale(0.65);
  opacity: 0.6;
}

.rank-action--bubble {
  --rank-color: #48abd4;
  --rank-shadow: #2f7897;
}

.rank-action--tadpole {
  --rank-color: #6331c7;
  --rank-shadow: #492398;
}

.rank-action--seagrass {
  --rank-color: #ae49f4;
  --rank-shadow: #7b28b0;
}

.rank-action--lillypad {
  --rank-color: #e0629a;
  --rank-shadow: #a43a68;
}

.store-dialog {
  width: min(640px, calc(100% - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  overflow: auto;
  border: 1px solid #8e978f;
  border-radius: 10px;
  background: #fbfaf2;
  box-shadow: 0 22px 70px rgba(20, 35, 23, 0.3);
  color: #313a32;
}

.store-dialog::backdrop {
  background: rgba(16, 27, 18, 0.66);
  backdrop-filter: blur(2px);
}

.store-dialog__surface {
  padding: 24px;
}

.store-dialog__close-row {
  display: flex;
  margin: -10px -8px 0 0;
  justify-content: flex-end;
}

.store-dialog__close {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4f5950;
  font-size: 31px;
  line-height: 1;
  cursor: pointer;
}

.store-dialog__close:hover {
  background: #e7eadf;
}

.store-dialog__eyebrow {
  color: #3478bd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.store-dialog__title {
  margin: 4px 0 0;
  color: #24562c;
  font-size: clamp(27px, 5vw, 36px);
  line-height: 1.15;
}

.store-dialog__price {
  margin-top: 8px;
  color: #313a32;
  font-size: 20px;
  font-weight: 800;
}

.package-description {
  margin: 20px 0;
  color: #3f4940;
  line-height: 1.65;
}

.package-description img {
  max-width: 100%;
  height: auto;
}

.package-description > :first-child {
  margin-top: 0;
}

.package-description > :last-child {
  margin-bottom: 0;
}

.account-panel {
  margin: 20px 0;
  padding: 16px;
  border: 1px solid #c2c8bf;
  border-left: 5px solid #3478bd;
  border-radius: 6px;
  background: #f4f8fa;
}

.store-primary-button {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  padding: 12px 18px;
  align-items: center;
  justify-content: center;
  border: 2px solid #24562c;
  border-radius: 5px;
  background: #55b85a;
  box-shadow: 0 3px 0 #24562c;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.store-primary-button:hover:not(:disabled) {
  background: #65c66a;
}

.store-primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.basket-empty {
  margin-top: 18px;
  padding: 18px;
  border-radius: 6px;
  background: #eef5df;
  color: #59625a;
  line-height: 1.55;
}

.basket-summary {
  display: flex;
  margin-top: 18px;
  padding: 16px 0;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid #cbd1c9;
  border-bottom: 1px solid #cbd1c9;
}

.basket-summary__price {
  margin-top: 4px;
  color: #24562c;
  font-weight: 800;
}

.store-text-button {
  padding: 6px;
  border: 0;
  background: transparent;
  color: #a43a3a;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.checkout-form {
  margin-top: 20px;
}

.checkout-form label {
  display: block;
  margin-bottom: 7px;
  color: #24562c;
  font-weight: 800;
}

.checkout-form input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 2px solid #889189;
  border-radius: 5px;
  background: #ffffff;
  color: #202721;
  font: inherit;
}

.checkout-form input:focus {
  border-color: #3478bd;
  outline: 2px solid rgba(52, 120, 189, 0.18);
}

.checkout-form__hint {
  margin: 8px 0 18px;
  color: #667067;
  font-size: 13px;
  line-height: 1.45;
}

.checkout-error {
  margin: 0 0 15px;
  padding: 10px 12px;
  border-left: 4px solid #b64141;
  background: #fff0f0;
  color: #722b2b;
  font-size: 14px;
  line-height: 1.45;
}

/* Retro web presentation: layout and texture only; the existing palette stays intact. */
body {
  font-family:
    Tahoma,
    Verdana,
    Arial,
    "Segoe UI Emoji",
    "Apple Color Emoji",
    "Noto Color Emoji",
    sans-serif;
}

.retro-page-frame,
.rank-intro,
.retro-subpanel {
  font-family:
    Tahoma,
    Verdana,
    Arial,
    "Segoe UI Emoji",
    "Apple Color Emoji",
    "Noto Color Emoji",
    sans-serif !important;
}

.site-header {
  border-top-width: 3px;
  border-bottom: 3px solid #a9b2a9;
  box-shadow: 0 4px 0 #24562c;
}

.site-header__logo:focus-visible {
  outline: 2px dotted #24562c;
  outline-offset: 5px;
}

.site-header__basket,
.account-login-button,
.rank-action,
.store-primary-button {
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.site-header__basket {
  box-shadow: 5px 5px 0 #24562c;
}

.site-header__basket:active,
.account-login-button:active,
.rank-action:active:not(:disabled),
.store-primary-button:active:not(:disabled) {
  transform: translate(3px, 3px);
  box-shadow: 2px 2px 0 #24562c;
}

.site-header__basket-count {
  border-radius: 0;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.account-login-form input,
.checkout-form input {
  border-radius: 0;
  box-shadow:
    inset 2px 2px 0 #c2c8bf,
    inset -2px -2px 0 #ffffff;
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.account-login-button {
  box-shadow: 3px 3px 0 #24562c;
  font-family: "Courier New", monospace;
}

.account-summary,
.account-summary--header,
.account-panel {
  border-radius: 0;
}

.account-summary--header,
.account-panel {
  box-shadow: 3px 3px 0 #a9b2a9;
}

.account-summary strong,
.live-price,
.store-dialog__eyebrow,
.store-dialog__price,
.basket-summary__price {
  font-family: "Courier New", monospace;
}

.content-panel,
.retro-card,
.retro-callout,
.retro-subpanel,
.retro-widget,
.rank-card,
.retro-notice,
.comparison-wrap {
  border-radius: 0 !important;
}

.content-panel {
  box-shadow: 7px 7px 0 #a9b2a9 !important;
}

.content-panel--hero {
  box-shadow: 8px 8px 0 #24562c !important;
}

.retro-card {
  box-shadow: 4px 4px 0 #a9b2a9;
}

.feature-icon {
  color: #313a32;
  font-family:
    "Segoe UI Symbol",
    "Noto Sans Symbols 2",
    "Arial Unicode MS",
    sans-serif;
  font-variant-emoji: text;
}

.retro-callout {
  outline: 1px dotted #24562c;
  outline-offset: -7px;
}

.retro-callout a {
  border-radius: 0 !important;
  box-shadow: 4px 4px 0 #24562c !important;
  font-family: "Courier New", monospace;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.retro-subpanel {
  box-shadow: 4px 4px 0 #a9b2a9 !important;
}

.retro-widget {
  box-shadow: 6px 6px 0 #24562c;
}

.retro-widget iframe {
  border-radius: 0 !important;
}

.store-status,
.payment-complete,
.retro-notice {
  border-radius: 0;
  box-shadow: 3px 3px 0 #a9b2a9;
  font-family: "Courier New", monospace;
}

.rank-grid {
  padding: 4px 6px 10px 0;
}

.rank-card {
  box-shadow: 6px 6px 0 #a9b2a9 !important;
}

.rank-card > div:first-child,
.rank-image {
  border-bottom-width: 2px !important;
  border-bottom-style: dashed !important;
}

.rank-card code,
.comparison-wrap code {
  font-family: "Courier New", monospace;
  font-weight: 700;
}

.rank-action {
  box-shadow: 4px 4px 0 var(--rank-shadow);
  font-family: "Courier New", monospace;
}

.section-title {
  font-family: "Trebuchet MS", Tahoma, sans-serif;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.comparison-wrap {
  border-width: 2px !important;
  box-shadow: 6px 6px 0 #a9b2a9;
}

.comparison-wrap th {
  font-family: "Courier New", monospace;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.comparison-wrap th:not(:last-child),
.comparison-wrap td:not(:last-child) {
  border-right: 1px dotted #cbd1c9;
}

.store-dialog {
  border-width: 3px;
  border-radius: 0;
  box-shadow: 9px 9px 0 #24562c;
}

.store-dialog::backdrop {
  backdrop-filter: none;
}

.store-dialog__surface {
  outline: 1px dotted #a9b2a9;
  outline-offset: -10px;
}

.store-dialog__close {
  border: 2px solid #8e978f;
  border-radius: 0;
  box-shadow: 2px 2px 0 #a9b2a9;
  font-family: "Courier New", monospace;
}

.store-dialog__title {
  font-family: "Trebuchet MS", Tahoma, sans-serif;
  letter-spacing: 0.5px;
}

.store-primary-button {
  box-shadow: 4px 4px 0 #24562c;
  font-family: "Courier New", monospace;
}

@media (max-width: 620px) {
  .site-header__inner {
    min-height: 100px;
    padding: 15px 16px;
    flex-wrap: wrap;
  }

  .site-header__logo img {
    height: 58px;
    max-width: 100px;
  }

  .site-header__basket {
    min-width: 0;
    min-height: 50px;
    padding: 12px 16px;
    font-size: 17px;
  }

  .site-header__actions {
    flex: 1 1 100%;
    align-items: stretch;
  }

  .account-widget {
    flex: 1 1 auto;
  }

  .account-login-form--header input {
    width: 100%;
  }

  .account-summary--header {
    min-height: 50px;
  }

  .page-shell {
    width: calc(100% - 20px);
    margin-top: 14px;
  }

  .store-dialog__surface {
    padding: 19px;
  }
}

@media (max-width: 430px) {
  .site-header__actions,
  .account-login-form__fields {
    flex-wrap: wrap;
  }

  .site-header__basket,
  .account-login-form--header,
  .account-login-form--header .account-login-form__fields,
  .account-login-form--header input,
  .account-login-form--header .account-login-button {
    width: 100%;
  }
}
