/* Store styles. Colors live in :root so the whole look can be re-themed in one place. */
:root {
  --bg: #0b0d18;
  --surface: #141829;
  --surface-2: #1c2136;
  --border: #2a3150;
  --text: #eef0f8;
  --muted: #a3aac4;
  --accent: #4cc2ff;
  --accent-strong: #1fa8f0;
  --accent-text: #04121c;
  --good: #3ddc97;
  --warn: #ffb347;
  --bad: #ff6b6b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --max: 1200px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
@media (hover: hover) { a:hover { color: #8fd8ff; } }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

/* ---------- Scrollbars ----------
   Touch screens (phones, tablets): none shown.
   Mouse/trackpad: a slim blue gradient pill, in the logo's colours. */
@media (hover: none) and (pointer: coarse) {
  /* No grey tap flash, and (below) hover highlights only exist with a mouse. */
  html { -webkit-tap-highlight-color: transparent; }
  html, body, * { scrollbar-width: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar, *::-webkit-scrollbar { display: none; width: 0; height: 0; }
}
@media (hover: hover) and (pointer: fine) {
  ::-webkit-scrollbar { width: 12px; height: 12px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-corner { background: transparent; }
  ::-webkit-scrollbar-thumb {
    border: 3px solid transparent; border-radius: 999px; background-clip: padding-box;
    background-image: linear-gradient(180deg, var(--accent), #7a5cff);
  }
  @media (hover: hover) { ::-webkit-scrollbar-thumb:hover { background-image: linear-gradient(180deg, #7fd5ff, #9a82ff); } }
  ::-webkit-scrollbar-thumb:active { background-image: linear-gradient(180deg, var(--accent-strong), #6a4cf0); }
  /* Browsers without ::-webkit-scrollbar (Firefox): no gradients there, so a slim blue bar. */
  @supports not selector(::-webkit-scrollbar) {
    html, * { scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
  }
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-text); padding: 10px 16px; border-radius: 8px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Buttons: plain and simple ---------- */
.btn {
  display: inline-block; min-height: 40px; padding: 8px 16px; border-radius: 6px;
  border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
  font-weight: 600; text-decoration: none; text-align: center; cursor: pointer;
}
@media (hover: hover) { .btn:hover { border-color: var(--accent); color: var(--text); } }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
@media (hover: hover) { .btn-primary:hover { background: var(--accent-strong); color: var(--accent-text); } }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--bad); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(11,13,24,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; color: var(--text); text-decoration: none; white-space: nowrap; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), #7a5cff); display: grid; place-items: center; color: #fff; }
.logo-mark svg { width: 20px; height: 20px; }
.search { flex: 1; display: flex; max-width: 560px; margin-left: auto; }
.search input {
  flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 6px 0 0 6px;
  border: 1px solid var(--border); border-right: 0; background: var(--surface); color: var(--text);
}
.search input::placeholder { color: var(--muted); }
.search .btn { border-radius: 0 6px 6px 0; }
.category-nav { border-top: 1px solid var(--border); }
.category-nav ul { list-style: none; display: flex; gap: 4px; margin: 0 auto; padding: 6px 16px; overflow-x: auto; scrollbar-width: none; }
.category-nav ul::-webkit-scrollbar { display: none; }
.category-nav a {
  display: block; padding: 8px 14px; border-radius: 6px; color: var(--muted); text-decoration: none; white-space: nowrap; font-weight: 600;
}
.category-nav a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
@media (hover: hover) { .category-nav a:hover { background: var(--surface-2); color: var(--text); } }

@media (max-width: 720px) {
  .header-row { flex-wrap: wrap; gap: 10px; padding-top: 10px; padding-bottom: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .header-buttons { margin-left: auto; }
}

/* ---------- Footer ---------- */
.site-footer { margin-top: 64px; border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; padding: 32px 16px; }
.site-footer h2 { font-size: 1rem; color: var(--text); }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: var(--muted); text-decoration: none; }
@media (hover: hover) { .site-footer a:hover { color: var(--text); text-decoration: underline; } }
.footer-bottom { border-top: 1px solid var(--border); padding: 16px; text-align: center; }

/* ---------- Home ---------- */
.hero { padding: 56px 0 40px; background: radial-gradient(900px 400px at 15% 0%, rgba(76,194,255,.18), transparent 70%), radial-gradient(700px 400px at 90% 10%, rgba(122,92,255,.18), transparent 70%); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
.hero h1 span { color: var(--accent); }
.hero p { color: var(--muted); font-size: 1.15rem; max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.hero-art { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-art a { aspect-ratio: 1; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; color: var(--accent); }
@media (hover: hover) { .hero-art a:hover { border-color: var(--accent); } }
.hero-art svg { width: 45%; height: 45%; }
@media (max-width: 820px) { .hero-inner { grid-template-columns: 1fr; } .hero-art { display: none; } }

.section { padding: 32px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: 1.5rem; margin: 0; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.category-tile {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px 12px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-weight: 700; text-align: center;
}
@media (hover: hover) { .category-tile:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); } }
.category-tile svg { width: 40px; height: 40px; color: var(--accent); }

.perks { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.perk { padding: 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.perk h3 { font-size: 1.05rem; margin-bottom: 4px; }
.perk p { margin: 0; color: var(--muted); }

/* ---------- Product cards ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.product-card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); transition: border-color .15s, transform .15s;
}
@media (hover: hover) { .product-card:hover { border-color: var(--accent); transform: translateY(-2px); } }
.product-card .thumb { aspect-ratio: 1; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb svg { width: 42%; height: 42%; color: var(--muted); }
.product-card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .brand { color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.product-card h3 { font-size: 1rem; margin: 0; }
.product-card h3 a { color: var(--text); text-decoration: none; }
.product-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.product-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.price { font-weight: 800; font-size: 1.15rem; }
.price s { color: var(--muted); font-weight: 500; font-size: .9rem; margin-left: 6px; }
.stock-note { font-size: .85rem; color: var(--muted); }
.stock-note.low { color: var(--warn); }
.stock-note.out { color: var(--bad); }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; border: 1px solid; white-space: nowrap; }
.badge-new { color: var(--good); border-color: rgba(61,220,151,.45); background: rgba(61,220,151,.1); }
.badge-like-new, .badge-excellent { color: var(--accent); border-color: rgba(76,194,255,.45); background: rgba(76,194,255,.1); }
.badge-open-box, .badge-renewed { color: #7ee0d0; border-color: rgba(126,224,208,.45); background: rgba(126,224,208,.1); }
.badge-good { color: #c9b6ff; border-color: rgba(201,182,255,.45); background: rgba(201,182,255,.1); }
.badge-fair { color: var(--warn); border-color: rgba(255,179,71,.45); background: rgba(255,179,71,.1); }
.badge-sale { position: absolute; top: 10px; left: 10px; z-index: 1; background: var(--bad); color: #fff; border-color: transparent; }
.badge-soldout { position: absolute; top: 10px; right: 10px; z-index: 1; background: var(--surface-2); color: var(--muted); border-color: var(--border); }

.empty-state, .load-error { padding: 40px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); grid-column: 1 / -1; }
.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; aspect-ratio: .78; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- Shop page ---------- */
.shop-layout { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding-top: 24px; }
.filters { position: sticky; top: 130px; align-self: start; display: grid; gap: 18px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.filters fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.filters legend { font-weight: 700; margin-bottom: 6px; }
.filters label { display: flex; align-items: center; gap: 10px; min-height: 36px; cursor: pointer; color: var(--muted); }
@media (hover: hover) { .filters label:hover { color: var(--text); } }
.filters input[type="radio"], .filters input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); }
.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.shop-toolbar h1 { margin: 0; font-size: 1.6rem; }
.result-count { color: var(--muted); }
select, input[type="text"], input[type="email"], input[type="number"], input[type="password"], input[type="search"], input[type="url"], input[type="tel"], input[type="date"], textarea {
  min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text);
}
textarea { min-height: 120px; resize: vertical; }
.filters-toggle { display: none; }
@media (max-width: 820px) {
  .shop-layout { grid-template-columns: 1fr; }
  .filters { position: static; display: none; }
  .filters.open { display: grid; }
  .filters-toggle { display: inline-flex; }
}

/* ---------- Product page ---------- */
.breadcrumbs { padding: 18px 0 0; color: var(--muted); font-size: .92rem; }
.breadcrumbs a { color: var(--muted); }
.product-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; padding-top: 18px; }
.gallery-main { aspect-ratio: 1; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; display: grid; place-items: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main svg { width: 40%; height: 40%; color: var(--muted); }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; overflow-x: auto; }
.gallery-thumbs button { flex: 0 0 72px; height: 72px; border-radius: 10px; border: 2px solid var(--border); background: var(--surface); padding: 0; overflow: hidden; cursor: pointer; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--accent); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.product-info .brand { color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; }
.product-info .price { font-size: 1.9rem; }
.savings { color: var(--good); font-weight: 700; margin-left: 8px; font-size: 1rem; }
.condition-box { margin: 16px 0; padding: 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.condition-box p { margin: 6px 0 0; color: var(--muted); }
.buy-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 18px 0; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty .btn { min-width: 40px; padding: 8px 12px; }
.qty output, .qty span { min-width: 40px; text-align: center; font-weight: 700; }
.buy-row > .btn { flex: 1; min-width: 160px; }
.trust-list { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; color: var(--muted); }
.trust-list li::before { content: "✓"; color: var(--good); font-weight: 800; margin-right: 10px; }
.specs { width: 100%; border-collapse: collapse; margin-top: 8px; }
.specs th, .specs td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.specs th { color: var(--muted); font-weight: 600; width: 40%; }
.description { white-space: pre-line; color: var(--text); }
@media (max-width: 820px) { .product-layout { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Cart page ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; padding-top: 24px; align-items: start; }
@media (max-width: 820px) { .cart-layout { grid-template-columns: 1fr; } }
.cart-lines { list-style: none; margin: 0; padding: 0; }
.cart-line { display: grid; grid-template-columns: 80px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--border); align-items: start; }
.cart-line .thumb { width: 80px; height: 80px; border-radius: 8px; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line .thumb svg { width: 50%; height: 50%; color: var(--muted); }
.cart-line a { color: var(--text); font-weight: 600; }
.cart-line .line-controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.cart-summary { display: grid; gap: 10px; }
.totals-row { display: flex; justify-content: space-between; color: var(--muted); }
.totals-row.total { color: var(--text); font-weight: 800; font-size: 1.15rem; border-top: 1px solid var(--border); padding-top: 10px; }
.cart-note { font-size: .88rem; color: var(--muted); margin: 0; }
.notice { padding: 10px 12px; border-radius: 8px; font-size: .92rem; border: 1px solid; }
.notice-warn { color: var(--warn); border-color: rgba(255,179,71,.45); background: rgba(255,179,71,.08); }
.notice-error { color: var(--bad); border-color: rgba(255,107,107,.45); background: rgba(255,107,107,.08); }
.notice-good { color: var(--good); border-color: rgba(61,220,151,.45); background: rgba(61,220,151,.08); }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px; padding: 12px 20px; box-shadow: var(--shadow); font-weight: 600; max-width: calc(100% - 32px);
}

/* ---------- Simple content pages ---------- */
.page { max-width: 820px; padding-top: 32px; }
.page h2 { margin-top: 1.6em; }
.page p, .page li { color: var(--muted); }
.page dl { display: grid; gap: 10px; }
.page dt { font-weight: 700; color: var(--text); }
.page dd { margin: 0 0 6px; color: var(--muted); }
.card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.order-lines { list-style: none; padding: 0; margin: 12px 0; }
.order-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); color: var(--text); }

/* ---------- Small utilities ---------- */
.toolbar-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.loading-note { padding: 40px 0; color: var(--muted); }
.page-title { margin-top: 28px; }
.center { text-align: center; }

/* Phones: two product cards per row. */
@media (max-width: 520px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .product-card .body { padding: 10px; }
  .product-card h3 { font-size: .92rem; }
  .price { font-size: 1rem; }
  .badge-sale, .badge-soldout { top: 6px; font-size: .7rem; }
  .badge-sale { left: 6px; } .badge-soldout { right: 6px; }
}

/* ---------- Header buttons ---------- */
.header-buttons { display: flex; gap: 8px; }
.account-menu { position: relative; }
.account-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 160px; display: grid; padding: 6px;
  border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.account-menu-list a, .account-menu-list button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 6px; background: none;
  color: var(--text); font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.account-menu-list a:focus-visible, .account-menu-list button:focus-visible { background: var(--surface-2); color: var(--text); }
@media (hover: hover) { .account-menu-list a:hover, .account-menu-list button:hover { background: var(--surface-2); color: var(--text); } }

/* ---------- Forms (account, cart email) ---------- */
.form-grid { display: grid; gap: 10px; }
.form-grid label { font-weight: 600; }
.form-grid input { width: 100%; }
.field-hint { font-size: .88rem; color: var(--muted); margin: 0; }

/* ---------- Account page ---------- */
/* Same layout as CrypticalLife's account page (one form at a time when
   signed out; profile, 2FA and connected-account cards when signed in),
   in this store's colors. */
.account-page { padding-top: 28px; padding-bottom: 40px; }
.account-panel { display: grid; gap: 20px; }
.account-session-status { color: var(--muted); }
.account-form { display: none; width: 100%; max-width: 460px; margin: 0 auto; gap: 14px; }
.account-form.active { display: grid; }
.account-form h2, .account-card h2 { margin: 0; }
.account-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.account-card { display: grid; gap: 12px; }
.account-card p { margin: 0; }
.account-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.account-orders { margin-top: 28px; }
.account-switch { margin: 0; text-align: center; color: var(--muted); }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; }
@media (hover: hover) { .link-button:hover { color: #8fd8ff; } }
.account-form-message:empty { display: none; }
.account-form-message { margin: 0; }
.email-verification-banner { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.email-verification-status { color: var(--text); }
#admin-links { margin-bottom: 16px; }
.phone-field { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.phone-field input { width: 100%; }
.password-field { position: relative; }
.password-field input { width: 100%; padding-right: 72px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 32px; padding: 4px 10px;
  border-radius: 6px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .85rem; cursor: pointer; }
@media (hover: hover) { .password-toggle:hover { color: var(--text); border-color: var(--accent); } }
.password-requirements { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: .88rem; color: var(--muted); }
.password-requirements li::before { content: "\25CB  "; }
.password-requirements li.met { color: var(--good); }
.password-requirements li.met::before { content: "\2713  "; }
.google-signin-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.google-signin-divider::before, .google-signin-divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
/* color-scheme: light stops the browser painting Google's button frame white on this dark page. */
.google-signin-button { display: flex; justify-content: center; min-height: 44px; color-scheme: light; }
#connected-accounts-card .account-actions { display: grid; gap: 10px; }
#connected-accounts-card .google-signin-button { justify-content: stretch; width: 100%; }
#connected-accounts-card #google-link-password { width: 100%; }
.human-check { display: flex; justify-content: center; }
.account-form.shake { animation: account-shake .35s ease; }
@keyframes account-shake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@media (prefers-reduced-motion: reduce) { .account-form.shake { animation: none; } }

/* 2FA popups */
html.modal-open { overflow: hidden; }
.two-factor-modal { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(4, 6, 14, .72); }
.two-factor-modal-panel { position: relative; width: 100%; max-width: 440px; max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.two-factor-modal-panel h2 { margin: 0 32px 12px 0; }
.two-factor-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface-2); color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.two-factor-qr-wrap { display: flex; justify-content: center; }
.two-factor-qr { width: 200px; height: 200px; padding: 8px; background: #fff; border-radius: 10px; }
.two-factor-qr svg { width: 100%; height: 100%; display: block; }
.two-factor-error { margin: 0; color: var(--bad); min-height: 1.2em; font-size: .92rem; }
.two-factor-recovery { display: grid; gap: 10px; }
.two-factor-recovery h3, .two-factor-recovery p { margin: 0; }
.two-factor-recovery code { display: block; padding: 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border);
  font-size: .95rem; overflow-wrap: anywhere; user-select: all; }
.order-history { display: grid; gap: 14px; }
.order-history .card { display: grid; gap: 8px; }
.order-history-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.order-status { font-weight: 700; }
.order-status.paid { color: var(--warn); }
.order-status.shipped { color: var(--good); }
.order-status.cancelled { color: var(--muted); }

/* ---------- Home-screen app (js/app-shell.js): admins only ----------
   The normal site, behind an admin login check. Nothing else changes. */
html.ict-app-checking body { visibility: hidden; }
/* No rubber-band pull past the top or bottom of the page, like an app. */
html.ict-app, html.ict-app body { overscroll-behavior: none; }
/* Pull to refresh (js/app-shell.js): a spinner that follows the pull. */
.app-pull { position: fixed; left: 50%; top: 8px; z-index: 70; width: 36px; height: 36px; margin-left: -18px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); display: grid; place-items: center; pointer-events: none;
  transform: translateY(calc(var(--pull, 0px) * .6 - 56px)); opacity: min(1, calc(var(--pull, 0px) / 90px)); transition: transform .15s, opacity .15s; }
.app-pull span { width: 16px; height: 16px; border: 2px solid var(--muted); border-top-color: transparent; border-radius: 50%; transform: rotate(calc(var(--pull, 0px) * 3)); }
.app-pull.is-ready span { border-color: var(--accent); border-top-color: transparent; }
.app-pull.is-refreshing span { animation: app-pull-spin .8s linear infinite; }
@keyframes app-pull-spin { to { transform: rotate(360deg); } }
html.ict-app-checking { background: var(--bg) url("/favicon.svg") center / 64px no-repeat; }
/* Text the size iPhone needs so tapping a field doesn't zoom the page. */
html.ict-app input, html.ict-app select, html.ict-app textarea { font-size: max(16px, 1em); }
/* App login screen (/app-login) */
.app-login-page { display: grid; place-items: center; min-height: 100vh; padding: calc(24px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); }
.app-login { width: 100%; max-width: 380px; display: grid; gap: 18px; }
.app-login-brand { display: grid; justify-items: center; gap: 10px; text-align: center; }
.app-login-brand img { width: 72px; height: 72px; border-radius: 18px; }
.app-login-brand h1 { margin: 0; font-size: 1.8rem; }
.app-login-brand p { margin: 0; color: var(--muted); }
.app-login form, .app-login-locked { display: grid; gap: 12px; }
.app-login form h2 { margin: 0; font-size: 1.2rem; }
.app-login input { width: 100%; }
.app-login .link-button { justify-self: center; }
/* Wholesale */
.account-wholesale { margin-top: 20px; max-width: 640px; }
.account-wholesale p { margin: 0; }
.wholesale-note { margin: 12px 0 0; }
.wholesale-tag { display: inline-block; padding: 0 6px; border-radius: 999px; border: 1px solid rgba(61,220,151,.45); color: var(--good); font-size: .75rem; font-weight: 700; }

/* Discount code in the cart */
.discount-form { display: grid; gap: 6px; margin-top: 4px; }
.discount-form label { font-weight: 600; font-size: .92rem; }
.discount-row-input { display: flex; gap: 8px; }
.discount-row-input input { flex: 1; min-width: 0; text-transform: uppercase; }
.discount-error { color: var(--bad); }
.discount-row span:last-child { color: var(--good); }
.discount-applied { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
