/*
 * Orbitron and Rajdhani are self-hosted under the SIL Open Font License 1.1.
 * See /assets/fonts/OFL.txt. Keeping the original theme faces local restores
 * the branded UI without disclosing a visitor request to a font CDN.
 */
@font-face {
  font-family: "Orbitron";
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url("/assets/fonts/orbitron-latin-500-900.woff2") format("woff2");
}

@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/rajdhani-latin-400.woff2") format("woff2");
}

@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/rajdhani-latin-500.woff2") format("woff2");
}

@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/rajdhani-latin-600.woff2") format("woff2");
}

@font-face {
  font-family: "Rajdhani";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/rajdhani-latin-700.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg-primary: #030509;
  --bg: var(--bg-primary);
  --surface: #0d1527;
  --surface-elevated: #08101f;
  --surface-2: var(--surface-elevated);
  --bg-card: var(--surface);
  --bg-input: var(--surface-elevated);
  --select-background: var(--surface-elevated);
  --select-border: var(--border-color);
  --select-color: var(--text-color);
  --select-option-background: var(--surface-elevated);
  --select-option-active: var(--accent);
  --bg-disabled: rgba(255, 255, 255, 0.04);
  --border-color: #236481;
  --line: var(--border-color);
  --border-subtle: color-mix(in srgb, var(--border-color) 58%, var(--surface));
  --accent: #00d2ff;
  --accent-strong: #0077b6;
  --accent-dark: #0077b6;
  --accent-hover: color-mix(in srgb, var(--accent) 86%, var(--accent-strong));
  --accent-active: color-mix(in srgb, var(--accent) 72%, var(--accent-strong));
  --accent-text: #ffffff;
  --accent-glow: color-mix(in srgb, var(--accent) 16%, transparent);
  --accent-gradient: linear-gradient(
    135deg,
    var(--accent),
    var(--accent-strong)
  );
  --text-color: #e0e6ed;
  --text-primary: var(--text-color);
  --text: var(--text-color);
  --text-muted: #8a99ad;
  --text-secondary: var(--text-muted);
  --muted: #8a99ad;
  --text-subtle: #b9c8d6;
  --text-on-accent: #061017;
  --price-color: #eafff5;
  --price: #eafff5;
  --danger: #ff1744;
  --danger-border: #8a3d55;
  --admin-color: #ff2a5f;
  --admin-border: rgba(255, 42, 95, 0.6);
  --admin-glow: 0 0 12px rgba(255, 42, 95, 0.4);
  --success: #63e6a5;
  --warning: #ffdf91;
  --status-instock: #72dfff;
  --status-instock-bg: rgba(114, 223, 255, 0.14);
  --status-preorder: #a7efff;
  --status-preorder-border: #42c9e6;
  --status-preorder-bg: rgba(66, 201, 230, 0.13);
  --status-nostock: #b8f3ff;
  --status-nostock-border: #58cfe6;
  --status-nostock-bg: rgba(88, 207, 230, 0.13);
  --font-display: "Orbitron", "Segoe UI", system-ui, sans-serif;
  --font-body: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --display: "Orbitron", "Segoe UI", system-ui, sans-serif;
  --body: "Rajdhani", "Segoe UI", system-ui, sans-serif;
  --font-size-base: 0.9rem;
  --font-size-xs: 0.72rem;
  --font-size-sm: 0.82rem;
  --font-size-md: 0.9rem;
  --font-size-lg: 1.1rem;
  --font-size-xl: 1.35rem;
  --font-size-h1: clamp(1.8rem, 4vw, 2.4rem);
  --font-size-h2: 1.35rem;
  --font-size-h3: 1.1rem;
  --font-size-h4: 0.95rem;
  --line-height-tight: 1.2;
  --line-height-heading: 1.15;
  --line-height-body: 1.5;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 24px;
  --spacing-md: var(--space-3);
  --field-gap: 8px;
  --panel-padding: 24px;
  --control-height: 42px;
  --control-radius: 8px;
  --card-radius: 12px;
  --panel-radius: 16px;
  --shadow-panel: 0 18px 50px #0005;
  --settings-feedback-duration: 700ms;
  --settings-feedback-ease: linear;
  --body-background: radial-gradient(
    circle at 15% 0%,
    color-mix(in srgb, var(--accent-strong) 38%, var(--surface)) 0,
    color-mix(in srgb, var(--surface) 70%, var(--bg-primary)) 42%,
    var(--bg-primary) 78%
  );
}

html.theme-pending {
  --bg-primary: #0a0d12;
  --surface: #12171f;
  --surface-elevated: #0e131a;
  --border-color: #495362;
  --text-muted: #aeb7c4;
  --text-color: #edf1f6;
  --price-color: #edf1f6;
  --accent: #b8c1ce;
  --accent-strong: #687384;
  --status-instock: #d2d9e2;
}

html.theme-single,
html[data-theme="single"],
body.theme-single,
body[data-theme="single"] {
  color-scheme: dark;
  --bg-primary: #030509;
  --surface: #0d1527;
  --surface-elevated: #08101f;
  --border-color: #236481;
  --text-muted: #8a99ad;
  --text-color: #e0e6ed;
  --price-color: #eafff5;
  --accent: #00d2ff;
  --accent-strong: #0077b6;
}

html.theme-blue,
html[data-theme="blue"],
body.theme-blue,
body[data-theme="blue"] {
  --bg-primary: #04070d;
  --surface: #101a2d;
  --surface-elevated: #0a1322;
  --border-color: #315b88;
  --text-muted: #9eb7d8;
  --text-color: #e8f1ff;
  --price-color: #d9e8ff;
  --accent: #5aa9ff;
  --accent-strong: #2457a6;
  --status-instock: #7fc3ff;
  --status-preorder: #b8c7ff;
  --status-preorder-border: #7188e8;
  --status-nostock: #c8e1ff;
  --status-nostock-border: #6ba8e8;
  --status-nostock-bg: rgba(107, 168, 232, 0.14);
}

html.theme-violet,
html[data-theme="violet"],
body.theme-violet,
body[data-theme="violet"] {
  --bg-primary: #07040d;
  --surface: #171126;
  --surface-elevated: #0f0a1d;
  --border-color: #654db2;
  --text-muted: #c2b6db;
  --text-color: #f4efff;
  --price-color: #f0e2ff;
  --accent: #b78cff;
  --accent-strong: #654db2;
  --status-instock: #c8a8ff;
  --status-preorder: #e0c8ff;
  --status-preorder-border: #a977e6;
  --status-nostock: #e4d4ff;
  --status-nostock-border: #ad8be6;
  --status-nostock-bg: rgba(173, 139, 230, 0.14);
}

html.theme-flat-plum,
html[data-theme="flat-plum"],
body.theme-flat-plum,
body[data-theme="flat-plum"] {
  --bg-primary: #120a11;
  --surface: #21131d;
  --surface-elevated: #190f17;
  --border-color: #63394d;
  --text-muted: #b7a3ae;
  --text-color: #f4e8ef;
  --price-color: #e4a3bf;
  --accent: #e4a3bf;
  --accent-strong: #8b3d63;
  --danger: #ff7e9e;
  --success: #a7e6bf;
  --status-instock: #f0b4d2;
  --status-preorder: #f0bdd4;
  --status-preorder-border: #c36b92;
  --status-nostock: #f2c8dc;
  --status-nostock-border: #c785a5;
  --status-nostock-bg: rgba(199, 133, 165, 0.14);
}

html.theme-emerald,
html[data-theme="emerald"],
body.theme-emerald,
body[data-theme="emerald"] {
  --bg-primary: #020806;
  --surface: #07130e;
  --surface-elevated: #0b1d15;
  --border-color: #16815a;
  --text-muted: #8db9a5;
  --text-color: #e6fff1;
  --price-color: #b8ffd8;
  --accent: #19e68a;
  --accent-strong: #087443;
  --danger: #ff7894;
  --success: #62e6a0;
  --status-instock: #7dffc0;
  --status-preorder: #a7ffd1;
  --status-preorder-border: #38c985;
  --status-preorder-bg: rgba(56, 201, 133, 0.14);
  --status-nostock: #b8f5d2;
  --status-nostock-border: #49bc83;
  --status-nostock-bg: rgba(73, 188, 131, 0.14);
}

html.theme-black,
html[data-theme="black"],
body.theme-black,
body[data-theme="black"] {
  color-scheme: dark;
  --bg-primary: #000000;
  --surface: #121212;
  --surface-elevated: #1a1a1a;
  --border-color: #8ea3b7;
  --text-muted: #c5d1db;
  --text-color: #ffffff;
  --price-color: #ffffff;
  --accent: #66ddff;
  --accent-strong: #006e8b;
  --accent-hover: #90e9ff;
  --accent-active: #3bb8d8;
  --accent-text: #001017;
  --text-on-accent: #001017;
  --accent-gradient: linear-gradient(135deg, #006e8b, #00475d);
  --status-instock: #91ebff;
  --status-preorder: #c1f3ff;
  --status-preorder-border: #66ddff;
  --status-nostock: #d9f7ff;
  --status-nostock-border: #8ea3b7;
  --status-nostock-bg: rgba(102, 221, 255, 0.14);
}

html.theme-inverted,
html[data-theme="inverted"],
body.theme-inverted,
body[data-theme="inverted"] {
  color-scheme: light;
  --bg-primary: #ffffff;
  --surface: #f4f7fa;
  --surface-elevated: #e7edf3;
  --border-color: #334155;
  --text-muted: #455468;
  --text-color: #0f172a;
  --text-primary: #0f172a;
  --text: #0f172a;
  --text-secondary: #455468;
  --muted: #455468;
  --text-subtle: #526277;
  --price-color: #0f172a;
  --accent: #005ea8;
  --accent-strong: #003f72;
  --accent-hover: #004d89;
  --accent-active: #003b69;
  --accent-text: #ffffff;
  --text-on-accent: #ffffff;
  --accent-gradient: linear-gradient(135deg, #005ea8, #003f72);
  --danger: #b42318;
  --success: #087443;
  --status-instock: #005ea8;
  --status-preorder: #5a3b00;
  --status-preorder-border: #8a5c00;
  --status-nostock: #0f172a;
  --status-nostock-border: #455468;
  --status-nostock-bg: rgba(0, 94, 168, 0.09);
}

html.theme-mix,
html[data-theme="mix"],
body.theme-mix,
body[data-theme="mix"],
html.theme-accent,
html[data-theme="accent"],
body.theme-accent,
body[data-theme="accent"] {
  color-scheme: dark;
  --bg-primary: #170b2d;
  --surface: #251342;
  --surface-elevated: #1d1035;
  --border-color: #bf8aff;
  --text-muted: #eadfff;
  --text-color: #fff8ff;
  --price-color: #fff3ca;
  --accent: #ffd15c;
  --accent-strong: #905500;
  --accent-hover: #ffe38d;
  --accent-active: #e0ab31;
  --accent-text: #241500;
  --text-on-accent: #241500;
  --accent-gradient: linear-gradient(135deg, #905500, #5d3500);
  --danger: #ff9eb4;
  --success: #91f5bc;
  --status-instock: #ffe7a3;
  --status-preorder: #f1d9ff;
  --status-preorder-border: #bf8aff;
  --status-nostock: #f8eaff;
  --status-nostock-border: #d5b7ff;
  --status-nostock-bg: rgba(191, 138, 255, 0.15);
}

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

html {
  font-size: 100%;
  width: 100vw;
  height: 100dvh;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--bg-primary);
}

/* Keep every scroll container usable while removing the visual scrollbar. */
* {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

*::-webkit-scrollbar {
  display: none !important;
}

body {
  width: 100vw;
  height: 100dvh;
  min-width: 320px;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  color: var(--text-color);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  background: var(--body-background);
}

h1,
h2,
h3,
h4 {
  margin-block: 0;
  color: var(--text-color);
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-heading);
}

h1 {
  font-size: var(--font-size-h1);
}
h2 {
  font-size: var(--font-size-h2);
}
h3 {
  font-size: var(--font-size-h3);
}
h4 {
  font-size: var(--font-size-h4);
}

.simulation-viewport-glow {
  box-shadow: inset 0 0 0 2px rgba(255, 180, 84, 0.72);
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 9998;
}

.simulation-status-bar {
  align-items: center;
  background: color-mix(in srgb, var(--surface, #0b151d) 94%, #ffb454);
  border: 1px solid rgba(255, 180, 84, 0.72);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.24);
  color: var(--text-color, #ffffff);
  display: flex;
  gap: 12px;
  justify-content: flex-start;
  left: 50%;
  max-width: min(480px, calc(100vw - 24px));
  padding: 11px 10px 9px 12px;
  pointer-events: none;
  position: fixed;
  top: max(10px, env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  width: max-content;
  z-index: 29;
}

.simulation-status-copy {
  align-items: center;
  display: flex;
  gap: 9px;
  min-width: 0;
}

.simulation-status-marker {
  background: #ffb454;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 180, 84, 0.14);
  flex: 0 0 9px;
  height: 9px;
  width: 9px;
}

.simulation-status-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.simulation-status-text strong {
  font-size: 0.8rem;
  line-height: 1.1;
}

.simulation-status-text span {
  color: var(--muted-text, rgba(255, 255, 255, 0.72));
  font-size: 0.72rem;
  line-height: 1.1;
  white-space: nowrap;
}

.simulation-exit-button {
  align-items: center;
  background: #ffb454;
  border: 1px solid #ffb454;
  border-radius: 50%;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
  color: #1f1608;
  display: inline-flex;
  font-size: 1.35rem;
  height: 48px;
  justify-content: center;
  left: max(16px, env(safe-area-inset-left, 0px));
  line-height: 1;
  padding: 0;
  position: fixed;
  width: 48px;
  z-index: 10000;
}

.simulation-exit-icon {
  font-size: 1rem;
  font-weight: 500;
  line-height: 0.8;
}

.simulation-exit-button:hover,
.simulation-exit-button:focus-visible {
  background: #ffd18f;
  border-color: #ffd18f;
  color: #1f1608;
}

.simulation-exit-button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
}

.simulation-exit-button > span:not(.simulation-exit-icon) {
  display: none;
}

@media (max-width: 600px) {
  .simulation-status-bar {
    gap: 10px;
    max-width: calc(100vw - 16px);
    padding: 10px 8px 8px;
  }
}

@media (max-width: 420px) {
  .simulation-status-bar {
    align-items: center;
    display: flex;
  }

  .simulation-status-text span {
    white-space: normal;
  }

  .simulation-exit-icon {
    line-height: 1;
  }
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
textarea {
  resize: none !important;
}

input[type="checkbox"],
input[type="radio"] {
  appearance: none;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  margin: 0;
  padding: 0;
  position: relative;
  flex: 0 0 18px;
  border: 1px solid var(--border-color);
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}

input[type="radio"] {
  border-radius: 50%;
}

input[type="checkbox"] {
  border-radius: 5px;
}

input[type="radio"]::after,
input[type="checkbox"]::after {
  content: "";
  position: absolute;
  display: block;
}

input[type="radio"]::after {
  inset: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.16s ease;
}

input[type="radio"]:checked::after {
  transform: scale(1);
}

input[type="checkbox"]:checked {
  border-color: var(--accent);
  background: var(--accent);
}

input[type="checkbox"]:checked::after {
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border-right: 2px solid var(--bg-primary);
  border-bottom: 2px solid var(--bg-primary);
  transform: rotate(45deg);
}

button {
  min-height: unset;
  padding: 10px 14px;
  border: 0;
  border-radius: 7px;
  background: var(--accent-gradient);
  color: #fff;
  font: var(--font-weight-bold) var(--font-size-sm)/var(--line-height-tight)
    var(--font-display);
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease;
}

/* iOS zooms focused form controls below 16px. Keep every editable field stable. */
@media (max-width: 1024px), (pointer: coarse) {
  :where(
    input:not([type="button"]):not([type="checkbox"]):not([type="color"]):not(
        [type="file"]
      ):not([type="hidden"]):not([type="image"]):not([type="radio"]):not(
        [type="range"]
      ):not([type="reset"]):not([type="submit"]),
    select,
    textarea
  ) {
    font-size: 16px !important;
  }
}

button:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 66%, transparent);
  outline-offset: 2px;
  box-shadow: 0 0 15px color-mix(in srgb, var(--accent) 50%, transparent);
}

@media (hover: hover) and (pointer: fine) {
  button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 15px color-mix(in srgb, var(--accent) 50%, transparent);
  }
}

button:active {
  transform: scale(0.97);
}

button:disabled {
  background: var(--bg-disabled);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

button:disabled:hover,
button:disabled:focus-visible,
input:disabled:hover,
select:disabled:hover,
textarea:disabled:hover,
.theme-select-trigger:disabled:hover,
.choice-card.is-disabled:hover {
  transform: none;
  border-color: var(--border-color);
  box-shadow: none;
}

.btn-admin,
.admin-portal-btn,
.profile-heading-actions .profile-admin-action {
  background: var(--admin-color) !important;
  border: 1px solid var(--admin-border) !important;
  box-shadow: var(--admin-glow) !important;
  color: #fff !important;
}

a {
  color: var(--accent);
}

input,
select,
textarea {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--control-radius);
  outline: none;
  background: var(--bg-input);
  color: var(--text-color);
  caret-color: var(--accent);
  accent-color: var(--accent);
  font-family: var(--font-body);
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

select,
option {
  color-scheme: dark;
  font-family: var(--font-body);
}

select {
  border-color: var(--select-border);
  background: var(--select-background);
  color: var(--select-color);
}

option {
  background: var(--select-option-background);
  color: var(--select-color);
}

option:checked {
  background: var(--select-option-active);
  color: var(--text-on-accent);
}

.theme-select {
  position: relative;
  width: 100%;
  min-width: 0;
}

.theme-select > select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.theme-select-trigger {
  width: 100%;
  min-height: 40px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid var(--select-border);
  border-radius: var(--control-radius);
  background: var(--select-background);
  color: var(--select-color);
  font: inherit;
  text-align: left;
}

.theme-select-trigger:hover,
.theme-select-trigger:focus-visible,
.theme-select-trigger[aria-expanded="true"] {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--select-background));
}

.theme-select-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.theme-select-trigger:disabled:hover,
.theme-select-trigger:disabled:focus-visible {
  border-color: var(--select-border);
  background: var(--select-background);
  box-shadow: none;
}

.theme-select-chevron {
  color: var(--accent);
  line-height: 0.75;
}

.theme-select-options {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  z-index: 4;
  display: grid;
  gap: 3px;
  max-height: 220px;
  overflow: auto;
  padding: 4px;
  border: 1px solid var(--select-border);
  border-radius: var(--control-radius);
  background: var(--select-option-background);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--bg-primary) 70%, transparent);
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.theme-select-options::-webkit-scrollbar {
  display: none;
}

.theme-select-options[hidden] {
  display: none;
}

.theme-select-options button {
  width: 100%;
  min-height: 32px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--select-color);
  font: inherit;
  text-align: left;
}

.theme-select-options button:hover,
.theme-select-options button:focus-visible,
.theme-select-options button[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--select-option-active);
  color: var(--text-on-accent);
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--text-muted) 88%, var(--text-color));
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 13%, transparent);
}

.panel,
.profile-card,
.access-card {
  border-radius: var(--panel-radius);
  box-shadow: var(--shadow-panel);
}

.profile-card {
  border: 1px solid var(--border-color);
  background: var(--bg-card);
}

.profile-skeleton,
.profile-skeleton-visual {
  display: grid;
  min-width: 0;
  gap: 12px;
}

.profile-skeleton {
  pointer-events: none;
  user-select: none;
}

.profile-skeleton-tabs,
.profile-skeleton-cards {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.profile-skeleton-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-skeleton-tab:last-child {
  grid-column: 1 / -1;
}

.profile-skeleton-cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-skeleton-block {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 14%, var(--border-color));
  background: color-mix(
    in srgb,
    var(--surface-elevated) 84%,
    var(--bg-primary)
  );
}

.profile-skeleton-block::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 18%,
    color-mix(in srgb, var(--accent) 13%, transparent) 48%,
    transparent 78%
  );
  content: "";
  transform: translateX(-105%);
  animation: profile-skeleton-sweep 1.35s ease-in-out infinite;
}

.profile-skeleton-tab {
  min-height: 36px;
  border-radius: 8px;
}

.profile-skeleton-card {
  min-height: 74px;
  border-radius: var(--card-radius);
}

.profile-skeleton-details {
  display: grid;
  min-height: 132px;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: var(--card-radius);
}

.profile-skeleton-line {
  position: relative;
  z-index: 1;
  display: block;
  width: min(72%, 26rem);
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-muted) 24%, transparent);
}

.profile-skeleton-line-short {
  width: min(42%, 13rem);
}

@keyframes profile-skeleton-sweep {
  to {
    transform: translateX(105%);
  }
}

@media (max-width: 420px) {
  .profile-skeleton-cards {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 900px) {
  .profile-skeleton-tabs {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }

  .profile-skeleton-tab:last-child {
    grid-column: auto;
  }
}

.notification-list {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  max-height: 480px;
  overflow: auto;
  margin-bottom: var(--space-2);
  padding: 0;
  scrollbar-color: var(--accent) var(--surface-elevated);
}

.notification-card {
  width: 100%;
  max-width: none;
  overflow-wrap: anywhere;
  padding: var(--space-2) var(--space-3);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--border-color));
  border-radius: var(--card-radius);
  background: var(--bg-card);
  box-shadow: inset 0 1px 0
    color-mix(in srgb, var(--text-color) 5%, transparent);
  cursor: pointer;
}

.notification-card.is-new {
  border-color: color-mix(in srgb, var(--accent) 62%, var(--border-color));
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
}

.notification-card strong {
  display: block;
  color: var(--text-color);
  font-weight: var(--font-weight-bold);
}

.notification-card p {
  margin: 6px 0 0;
  color: var(--text-color);
}

.notification-card small {
  display: block;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: var(--font-size-xs);
}

.product h3.product-title,
.product-card h3.product-title {
  margin: 0 0 8px;
  color: var(--text-color);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

.product h3.product-title.is-out-of-stock {
  color: color-mix(in srgb, var(--text-color) 46%, var(--bg-primary));
}

.product .variant.variant-in-stock,
.product .variant.variant-out-of-stock {
  min-height: 32px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
}

.product .variant.variant-in-stock {
  opacity: 1;
  border: 1px solid var(--accent);
  background: var(--bg-card);
  color: var(--text-color);
  cursor: pointer;
}

.product .variant.variant-in-stock.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--bg-primary);
}

.product .variant.variant-out-of-stock,
.product .variant.variant-out-of-stock:disabled {
  opacity: 0.4;
  border: 1px dashed var(--border-color);
  background: color-mix(in srgb, var(--bg-disabled) 86%, var(--bg-primary));
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: line-through;
}

.product .variant.variant-out-of-stock:hover,
.product .variant.variant-out-of-stock:focus,
.product .variant.variant-out-of-stock:focus-visible,
.product .variant.variant-out-of-stock:active {
  transform: none;
  border-color: var(--border-color);
  background: color-mix(in srgb, var(--bg-disabled) 86%, var(--bg-primary));
  color: var(--text-muted);
  box-shadow: none;
}

.message.error,
.error-state {
  color: var(--danger);
  text-shadow: 0 0 12px color-mix(in srgb, var(--danger) 42%, transparent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--danger) 32%, transparent);
}

.global-toast-region {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 100002;
  display: grid;
  gap: 8px;
  width: max-content;
  max-width: 90vw;
  pointer-events: none;
  transform: translateX(-50%);
}

.global-error-toast {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 11px 16px;
  border: 1px solid var(--danger);
  border-radius: var(--control-radius);
  background: color-mix(in srgb, var(--danger) 18%, var(--surface));
  box-shadow:
    0 0 18px color-mix(in srgb, var(--danger) 48%, transparent),
    var(--shadow-panel);
  color: var(--text-color);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  overflow-wrap: anywhere;
  opacity: 0;
  transform: translateY(-20px);
}

.global-error-toast.is-visible {
  animation: global-error-toast-enter 180ms ease-out forwards;
}
.global-error-toast.is-success {
  background: color-mix(
    in srgb,
    var(--success, #35f2a0) 14%,
    var(--surface-elevated, #141418)
  );
  border-color: color-mix(in srgb, var(--success, #35f2a0) 55%, transparent);
  box-shadow:
    0 0 18px color-mix(in srgb, var(--success, #35f2a0) 48%, transparent),
    var(--shadow-panel);
  color: var(--success, #35f2a0);
}

.global-error-toast.is-hiding {
  animation: global-error-toast-exit 240ms ease-in forwards;
}

.global-error-toast[hidden] {
  display: none;
}

@keyframes global-error-toast-enter {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes global-error-toast-exit {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.settings-message {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.settings-message::after {
  content: "";
  width: 0.8em;
  height: 0.8em;
  flex: 0 0 0.8em;
  border: 2px solid color-mix(in srgb, var(--border-color) 72%, transparent);
  border-top-color: var(--accent);
  border-radius: 50%;
  opacity: 0;
}

.settings-message.settings-message-transitioning::after {
  opacity: 1;
  animation: settings-feedback-spinner var(--settings-feedback-duration)
    var(--settings-feedback-ease);
}

@keyframes settings-feedback-spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Checkout validation and live feedback */
.checkout-shell .required-marker {
  display: inline !important;
  margin-left: 2px;
  color: #ff2a5f;
  font-weight: 800;
}

.checkout-shell .field-label,
.checkout-shell .required-field,
.checkout-shell .cryptgeon-password-field > label {
  display: block;
}

.checkout-shell #shipping-region,
.checkout-shell label[for="shipping-region"] {
  display: block !important;
}

.checkout-shell input.checkout-field-invalid,
.checkout-shell select.checkout-field-invalid,
.checkout-shell textarea.checkout-field-invalid {
  border: 1px solid #ff2a5f !important;
  box-shadow: none !important;
}

.checkout-shell #shipping-recipient.checkout-field-invalid,
.checkout-shell #shipping-postal.checkout-field-invalid,
.checkout-shell #shipping-city.checkout-field-invalid,
.checkout-shell #shipping-address.checkout-field-invalid {
  box-shadow: 0 0 12px rgba(255, 42, 95, 0.6) !important;
}

.checkout-shell .choice-card.has-invalid-field,
.checkout-shell label.has-invalid-field {
  border-color: #ff2a5f;
  box-shadow: none;
}

.checkout-shell #submit-order.is-blocked[aria-disabled="true"]:not(:disabled) {
  cursor: not-allowed;
  opacity: 0.68;
}

[hidden] {
  display: none !important;
}

#cart-items .cart-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

#cart-items .cart-item-info {
  grid-column: 1;
  min-width: 0;
}

#cart-items .cart-item-info small {
  margin-top: 2px;
}

#cart-items .cart-item-tier {
  color: var(--success) !important;
  font-weight: 700;
}

#cart-items .cart-item-total {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  color: var(--price-color);
  white-space: nowrap;
}

#cart-items .cart-item .quantity {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: start;
}

@media (max-width: 560px) {
  #cart-items .cart-item {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #cart-items .cart-item-total {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  #cart-items .cart-item .quantity {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .profile-skeleton-block::after {
    animation: none;
    transform: none;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
/* Disabled controls keep the regular pointer across all project surfaces. */
:where(
  button:disabled,
  input:disabled,
  select:disabled,
  textarea:disabled,
  [role="button"][aria-disabled="true"],
  .button[aria-disabled="true"],
  .btn[aria-disabled="true"],
  .is-disabled
) {
  cursor: default !important;
}
