/* coriX storefront — deep teal / ink + warm amber */
:root {
  --ink: #041416;
  --ink-2: #0a2226;
  --teal: #0e3d42;
  --teal-mid: #176066;
  --teal-soft: #2a8a8f;
  --foam: #c8e8e6;
  --cream: #f3eee4;
  --amber: #e8a22a;
  --amber-hot: #f0b84a;
  --amber-dim: rgba(232, 162, 42, 0.18);
  --danger: #e85a4a;
  --ok: #3dbf8a;
  --muted: rgba(200, 232, 230, 0.62);
  --line: rgba(200, 232, 230, 0.12);
  --glass: rgba(10, 34, 38, 0.72);
  --radius: 14px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Syne", system-ui, sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --max: 1120px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--cream);
  background: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.nav-open {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, rgba(232, 162, 42, 0.16), transparent 55%),
    radial-gradient(ellipse 70% 50% at 88% 18%, rgba(42, 138, 143, 0.28), transparent 50%),
    radial-gradient(ellipse 60% 45% at 50% 95%, rgba(14, 61, 66, 0.9), transparent 55%),
    linear-gradient(165deg, #031012 0%, #0a2429 42%, #062022 100%);
  animation: meshDrift 22s ease-in-out infinite alternate;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(200, 232, 230, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200, 232, 230, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}

@keyframes meshDrift {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.06) translate(-1.5%, 1%); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes brandGlow {
  0%, 100% { text-shadow: 0 0 24px rgba(232, 162, 42, 0.25), 0 0 60px rgba(42, 138, 143, 0.15); }
  50% { text-shadow: 0 0 36px rgba(232, 162, 42, 0.45), 0 0 80px rgba(42, 138, 143, 0.28); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

a {
  color: var(--amber-hot);
  text-decoration: none;
}
a:hover { color: var(--cream); }

img { max-width: 100%; display: block; }

h1, h2, h3, .logo, .brand-mark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

@media (max-width: 480px) {
  .wrap {
    width: min(100% - 1.25rem, var(--max));
  }
}

/* ——— Header ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px);
  background: rgba(4, 20, 22, 0.72);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, var(--max));
}

.logo {
  font-size: 1.45rem;
  color: var(--cream);
  display: inline-flex;
  align-items: baseline;
  gap: 0.15rem;
}
.logo span {
  color: var(--amber);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-links a {
  color: var(--foam);
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.88;
  transition: opacity 0.15s, color 0.15s;
}
.nav-links a:hover,
.nav-links a.is-active {
  opacity: 1;
  color: var(--amber-hot);
}

.nav-discord {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4rem;
}

.nav-discord svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.25rem;
  border-radius: 999px;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(10, 34, 38, 0.65);
  border: 1px solid var(--line);
  color: var(--cream);
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s, background 0.2s;
}
.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
  border-color: rgba(232, 162, 42, 0.45);
  background: rgba(232, 162, 42, 0.12);
}

.nav-burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 18px;
  height: 14px;
  pointer-events: none;
}
.nav-burger span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--cream);
  transition: transform 0.22s ease, opacity 0.18s ease;
  transform-origin: center;
}
.nav-toggle[aria-expanded="true"] .nav-burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-burger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
  display: none;
}

@media (max-width: 860px) {
  .site-header .wrap {
    position: relative;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    top: var(--header-h);
    z-index: 90;
    background: rgba(2, 10, 12, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
  }
  body.nav-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links {
    display: flex;
    position: absolute;
    top: calc(100% + 0.55rem);
    right: 0;
    left: auto;
    width: min(18.5rem, calc(100vw - 1.5rem));
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    padding: 0.55rem;
    background: rgba(6, 24, 28, 0.98);
    border: 1px solid rgba(200, 232, 230, 0.16);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px);
    z-index: 110;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 12px;
    font-size: 1rem;
    opacity: 1;
    color: var(--foam);
  }
  .nav-links a:hover,
  .nav-links a.is-active {
    background: rgba(232, 162, 42, 0.12);
    color: var(--amber-hot);
  }
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--amber-hot), var(--amber));
  color: var(--ink);
}
.btn-primary:hover {
  color: var(--ink);
  filter: brightness(1.06);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--cream);
}
.btn-ghost:hover {
  border-color: var(--amber);
  color: var(--amber-hot);
}

.btn-discord {
  background: #5865f2;
  color: #fff;
}
.btn-discord:hover { filter: brightness(1.08); color: #fff; }
.btn-discord svg { width: 20px; height: 20px; }

.btn-danger {
  background: transparent;
  border-color: rgba(232, 90, 74, 0.45);
  color: #ff8f82;
}
.btn-sm {
  padding: 0.4rem 0.8rem;
  font-size: 0.85rem;
}

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: center;
  padding: 3.5rem 0 4.5rem;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  width: min(52vw, 420px);
  height: min(52vw, 420px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 162, 42, 0.22), transparent 68%);
  right: 4%;
  top: 12%;
  filter: blur(8px);
  animation: floatY 7s ease-in-out infinite;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  animation: riseIn 0.8s ease-out both;
}

.brand-mark {
  font-size: clamp(3.8rem, 14vw, 7.5rem);
  margin: 0 0 0.35rem;
  color: var(--cream);
  animation: brandGlow 5s ease-in-out infinite;
}
.brand-mark span { color: var(--amber); }

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3.2vw, 2rem);
  font-weight: 600;
  margin: 0 0 0.85rem;
  max-width: 18ch;
  color: var(--foam);
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: 36ch;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.server-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

.ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--amber-dim);
  border: 1px solid rgba(232, 162, 42, 0.35);
  color: var(--cream);
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 0.92rem;
  cursor: pointer;
}
.ip-chip:hover { border-color: var(--amber); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--foam);
  text-transform: uppercase;
}

.section {
  padding: 3.5rem 0;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.4rem;
}

.section-sub {
  margin: 0 0 1.75rem;
  color: var(--muted);
  max-width: 42ch;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 800px) {
  .feature-row { grid-template-columns: 1fr; }
}

.feature {
  padding: 0.25rem 0;
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}
.feature h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer {
  margin-top: 3rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer a { color: var(--foam); }

/* ——— Page chrome ——— */
.page-head {
  padding: 2.25rem 0 1.25rem;
  animation: riseIn 0.55s ease-out both;
}
.page-head h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.page-head p {
  margin: 0;
  color: var(--muted);
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  margin: 1rem 0;
  font-size: 0.95rem;
}
.alert-error {
  border-color: rgba(232, 90, 74, 0.4);
  color: #ffb4ab;
}
.alert-ok {
  border-color: rgba(61, 191, 138, 0.4);
  color: #9aecc8;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  padding: 0.85rem 1.1rem;
  border-radius: 12px;
  background: var(--teal-mid);
  border: 1px solid rgba(232, 162, 42, 0.35);
  color: var(--cream);
  box-shadow: var(--shadow);
  animation: riseIn 0.3s ease-out;
}

/* ——— Forms ——— */
.auth-shell {
  max-width: 420px;
  margin: 2rem auto 4rem;
  animation: riseIn 0.55s ease-out both;
}

.form-stack {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--foam);
  font-weight: 500;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(4, 20, 22, 0.65);
  color: var(--cream);
  font: inherit;
  outline: none;
  transition: border-color 0.15s;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--amber);
}
input[type="number"] {
  -moz-appearance: textfield;
}
input[type="checkbox"] {
  width: auto;
}

.form-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

/* ——— Store ——— */
.store-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
  padding-bottom: 3rem;
}
@media (max-width: 960px) {
  .store-layout { grid-template-columns: 1fr; }
}

.store-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.store-toolbar .search {
  flex: 1 1 220px;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--foam);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.chip:hover { border-color: var(--teal-soft); }
.chip.is-active {
  background: var(--amber-dim);
  border-color: var(--amber);
  color: var(--amber-hot);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.product {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 34, 38, 0.45);
  transition: border-color 0.2s, transform 0.2s;
}
.product:hover {
  border-color: rgba(232, 162, 42, 0.35);
  transform: translateY(-2px);
}

.product-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}

.product-badge {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: rgba(42, 138, 143, 0.25);
  color: var(--foam);
  white-space: nowrap;
}
.product-badge.tag { background: rgba(232, 162, 42, 0.22); color: var(--amber-hot); }
.product-badge.money { background: rgba(61, 191, 138, 0.2); color: #7de0b2; }
.product-badge.shards { background: rgba(120, 160, 255, 0.22); color: #b8c9ff; }

.product h3 {
  margin: 0;
  font-size: 1.05rem;
}
.product .desc {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product .price {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--amber-hot);
}
.product-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.qty-input {
  width: 4.2rem;
  padding: 0.45rem 0.5rem;
  text-align: center;
}

.empty-state {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* Cart sidebar */
.cart-panel {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  backdrop-filter: blur(10px);
}
.cart-panel h2 {
  margin: 0 0 1rem;
  font-size: 1.2rem;
}
.cart-list {
  display: grid;
  gap: 0.75rem;
  max-height: 50vh;
  overflow: auto;
  margin-bottom: 1rem;
}
.cart-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
}
.cart-item .meta { color: var(--muted); font-size: 0.8rem; grid-column: 1 / -1; }
.cart-item .remove {
  grid-column: 2;
  grid-row: 1;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0;
}
.cart-item .remove:hover { color: var(--danger); }
.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0.5rem 0 1rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.cart-panel .btn { width: 100%; }

/* ——— Prices ——— */
.charts-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
@media (max-width: 860px) {
  .charts-grid { grid-template-columns: 1fr; }
}

.chart-box {
  padding: 1rem 1rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 34, 38, 0.45);
  min-height: 320px;
}
.chart-box h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}
.chart-box canvas {
  width: 100% !important;
  max-height: 280px;
}

.material-picker {
  max-width: 280px;
  margin-bottom: 1rem;
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
table.data th,
table.data td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data th {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(4, 20, 22, 0.5);
}
table.data tr:hover td {
  background: rgba(42, 138, 143, 0.08);
}
table.data tr.is-selected td {
  background: var(--amber-dim);
}
table.data button.linkish {
  background: none;
  border: none;
  color: var(--amber-hot);
  font: inherit;
  cursor: pointer;
  padding: 0;
}

/* ——— Account ——— */
.account-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.5rem;
  padding-bottom: 3rem;
}
@media (max-width: 760px) {
  .account-grid { grid-template-columns: 1fr; }
}

.profile-card,
.panel {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 34, 38, 0.45);
}
.profile-card dl {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}
.profile-card dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.profile-card dd {
  margin: 0.15rem 0 0;
  font-size: 1.05rem;
}

.order-list {
  display: grid;
  gap: 0.85rem;
}
.order {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.order-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.promo-code {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: 1.1rem;
  letter-spacing: 0.12em;
  color: var(--amber-hot);
  background: var(--amber-dim);
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  display: inline-block;
}

.status-pill {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
}
.status-pill.paid { border-color: rgba(61, 191, 138, 0.5); color: #7de0b2; }
.status-pill.pending { border-color: rgba(232, 162, 42, 0.5); color: var(--amber-hot); }
.status-pill.failed,
.status-pill.refunded { border-color: rgba(232, 90, 74, 0.45); color: #ff8f82; }

/* ——— Admin ——— */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

table.admin {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
table.admin th,
table.admin td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.admin th {
  text-align: left;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(4, 20, 22, 0.55);
  position: sticky;
  top: 0;
}
table.admin input,
table.admin select {
  padding: 0.4rem 0.5rem;
  font-size: 0.85rem;
  min-width: 0;
}
table.admin .col-price { width: 6rem; }
table.admin .col-actions { white-space: nowrap; }

.create-form {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.85rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 34, 38, 0.45);
  margin-bottom: 2rem;
}
.create-form .full { grid-column: 1 / -1; }
.create-form h2 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 1.15rem;
}

.settings-form {
  max-width: 520px;
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 34, 38, 0.45);
}

.settings-form .full {
  grid-column: 1 / -1;
}

.branding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.branding-card {
  display: grid;
  gap: 0.75rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 34, 38, 0.45);
}

.branding-card h3 {
  margin: 0;
  font-size: 1rem;
  font-family: Syne, sans-serif;
}

.branding-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 14px;
  border: 1px dashed rgba(232, 162, 42, 0.35);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.branding-preview-wide {
  width: 100%;
  height: 120px;
  aspect-ratio: 1.91 / 1;
}

.branding-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.branding-empty {
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  padding: 0.5rem;
}

.branding-note {
  position: absolute;
  left: 0.4rem;
  bottom: 0.4rem;
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--amber-hot);
}

.file-pick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  width: fit-content;
}

.file-pick input {
  display: none;
}

/* ——— Success / Cancel ——— */
.result-page {
  min-height: calc(100vh - var(--header-h) - 8rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0 4rem;
  text-align: center;
  animation: riseIn 0.7s ease-out both;
}
.result-page h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 0.75rem;
}
.result-page .lead {
  color: var(--muted);
  margin: 0 0 1.5rem;
}
.promo-huge {
  font-family: ui-monospace, "Cascadia Code", monospace;
  font-size: clamp(1.8rem, 6vw, 3rem);
  letter-spacing: 0.18em;
  color: var(--amber-hot);
  background: var(--amber-dim);
  border: 1px solid rgba(232, 162, 42, 0.4);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  margin: 0 auto 1.5rem;
  display: inline-block;
  animation: brandGlow 4s ease-in-out infinite;
}
.steps {
  text-align: left;
  max-width: 420px;
  margin: 0 auto 1.75rem;
  color: var(--foam);
  padding-left: 1.2rem;
}
.steps li { margin-bottom: 0.5rem; }
.steps code {
  font-family: ui-monospace, monospace;
  background: rgba(4, 20, 22, 0.6);
  padding: 0.15rem 0.4rem;
  border-radius: 6px;
  color: var(--amber-hot);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.hidden { display: none !important; }

/* ——— Responsive polish ——— */
@media (max-width: 960px) {
  .store-layout {
    gap: 1.15rem;
  }
  .cart-panel {
    position: static;
  }
}

@media (max-width: 860px) {
  :root {
    --header-h: 64px;
  }

  .hero {
    min-height: auto;
    padding: 2.25rem 0 3rem;
  }

  .hero-orb {
    width: min(70vw, 280px);
    height: min(70vw, 280px);
    top: 4%;
    right: -8%;
    opacity: 0.85;
  }

  .hero-headline {
    max-width: none;
  }

  .hero-lead {
    max-width: none;
    font-size: 1rem;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .server-strip {
    flex-direction: column;
    align-items: flex-start;
  }

  .section {
    padding: 2.5rem 0;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .product-actions {
    flex-wrap: wrap;
  }

  .product-actions .btn {
    flex: 1 1 auto;
  }

  .chart-box {
    min-height: 260px;
  }

  .create-form {
    grid-template-columns: 1fr 1fr;
  }

  .toast {
    left: 1rem;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 560px) {
  .brand-mark {
    font-size: clamp(3rem, 18vw, 4.5rem);
  }

  .page-head {
    padding: 1.5rem 0 1rem;
  }

  .auth-shell {
    margin: 1.25rem auto 3rem;
  }

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

  .create-form {
    grid-template-columns: 1fr;
  }

  .category-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
    margin-inline: -0.15rem;
    padding-inline: 0.15rem;
    scrollbar-width: thin;
  }

  .category-filters .chip {
    flex: 0 0 auto;
  }

  .store-toolbar {
    flex-direction: column;
  }

  .store-toolbar .search {
    flex: 1 1 auto;
    width: 100%;
  }

  .btn {
    white-space: normal;
    text-align: center;
  }

  .promo-huge {
    letter-spacing: 0.1em;
    word-break: break-all;
    padding: 0.85rem 1rem;
  }

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

  .result-page {
    padding: 1.5rem 0 3rem;
  }

  .ip-chip {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  table.admin .col-actions {
    white-space: normal;
  }

  table.admin .col-actions .btn {
    margin: 0.15rem 0;
  }
}

@media (max-width: 380px) {
  .logo {
    font-size: 1.25rem;
  }

  .wrap {
    width: min(100% - 1rem, var(--max));
  }
}

@supports (padding: max(0px)) {
  .site-footer {
    padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  }
}
