:root {
  /* CHANGE: Facepunch Rust brand + dark navy from the dark-variant sheet. */
  --rust-red: #cd412b;
  --rust-red-bright: #ec1c24;
  --charcoal: #1e2020;
  --navy: #111221;
  --cream: #e4dad1;
  --grey: #a4a6a7;
  --fp-green: #738d45;
  --fp-orange: #c26d33;
  --fp-blue: #1f6ba0;
  --fp-blue-light: #929ef4;
  --white: #ffffff;

  --bg: #111221;
  --panel: #1e2020;
  --panel-alt: #252828;
  --input: #16181c;
  --accent: #cd412b;
  --accent-hover: #ec1c24;
  --accent-soft: #929ef4;
  --danger: #cd412b;
  --ok: #738d45;
  --warn: #c26d33;
  --info: #1f6ba0;
  --admin-teal: #738d45;
  --admin-teal-hover: #8aa85a;
  --text: #e4dad1;
  --muted: #a4a6a7;
  --border: #3a3c3c;
  --radius: 8px;
  --font: "Segoe UI", system-ui, sans-serif;
  /* CHANGE: wider storefront shell for modern displays. */
  --content-max: 1600px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100%;
  /* CHANGE: dark thin scrollbar for main site */
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}

/* CHANGE: reserve scrollbar gutter so open panels don't shift layout by ~15px */
html {
  scrollbar-gutter: stable;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--bg);
}

*::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
  border: 2px solid var(--bg);
}

*::-webkit-scrollbar-thumb:hover {
  background: #5a5c5c;
}

*::-webkit-scrollbar-corner {
  background: var(--bg);
}

a { color: var(--accent-soft); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--cream); }

/* CHANGE: no sticky focus ring after mouse click/select; keyboard keeps :focus-visible */
:where(a, button, select, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus {
  outline: none;
}
:where(a, button, select, summary, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent, #CD412B) 70%, white);
  outline-offset: 2px;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-side {
  display: flex;
  align-items: center;
  min-width: 0;
}

.header-brand {
  justify-content: flex-start;
}

.header-actions {
  justify-content: flex-end;
  flex-shrink: 0;
  gap: 10px;
}

.header-center {
  display: flex;
  justify-content: center;
  justify-self: center;
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand span { color: var(--accent); }

.brand-admin {
  color: var(--muted) !important;
  font-weight: 600;
  font-size: 0.92em;
}

.header-storefront-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

/* ?? Admin header bar (not storefront UserBar) ?? */
.admin-header {
  background: var(--navy);
  border-bottom-color: var(--border);
}

.admin-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-bar-alert {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-bar-alert:hover {
  text-decoration: none;
  border-color: rgba(205, 65, 43, 0.45);
  background: var(--panel-alt);
}

.admin-bar-alert.has-count {
  border-color: rgba(205, 65, 43, 0.55);
  background: rgba(205, 65, 43, 0.14);
}

.admin-bar-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
}

.admin-bar-user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.admin-bar-user:hover,
.admin-bar-profile.open .admin-bar-user {
  border-color: rgba(205, 65, 43, 0.45);
  background: var(--panel-alt);
}

.admin-bar-user img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.admin-bar-user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  min-width: 0;
  text-align: left;
}

.admin-bar-name {
  font-size: 0.88rem;
  font-weight: 650;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-bar-role {
  font-size: 0.72rem;
  color: var(--muted);
}

@media (max-width: 720px) {
  .admin-bar-user-meta { display: none; }
  .admin-bar-alert span:nth-child(2) { display: none; }
}

.top-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.top-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.top-nav-item:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
}

.top-nav-item.active {
  color: var(--text);
  background: rgba(205, 65, 43, 0.15);
  border-color: rgba(205, 65, 43, 0.35);
}

.top-nav-ico {
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1;
}

.top-nav-dropdown {
  position: relative;
}

.top-nav-toggle .caret {
  width: 0;
  height: 0;
  margin-left: 2px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #c5c9d4;
}

.top-nav-dropdown.open .top-nav-toggle .caret {
  border-top: none;
  border-bottom: 5px solid #c5c9d4;
}

.top-nav-dropdown.open .top-nav-toggle {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.25);
}

.top-nav-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  padding: 8px 0;
  background: #161b24;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  z-index: 30;
}

.top-nav-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text);
  text-decoration: none;
}

.top-nav-menu a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.top-nav-empty {
  display: block;
  padding: 10px 16px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-body {
  white-space: pre-wrap;
  line-height: 1.55;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.form-grid label {
  display: block;
  margin-bottom: 12px;
}

.form-grid label.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  width: auto;
  max-width: 100%;
}

.form-grid input:not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
.form-grid select,
.form-grid textarea {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  background: var(--input);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  font: inherit;
}

.form-grid textarea {
  min-height: 180px;
  resize: vertical;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
}

.btn:hover { background: #2a2d2d; text-decoration: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.btn-primary:hover { background: var(--accent-hover); color: var(--white); }

/* CHANGE: dark-styled file picker (admin + forms), no browser default gray button */
input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
  color: var(--muted);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

input[type="file"]:hover {
  border-color: rgba(205, 65, 43, 0.45);
}

input[type="file"]:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, white);
  outline-offset: 2px;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  appearance: none;
  -webkit-appearance: none;
  margin-right: 12px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

input[type="file"]:hover::file-selector-button,
input[type="file"]:hover::-webkit-file-upload-button {
  background: var(--panel-alt);
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.form-grid-2 input[type="file"],
.form-grid input[type="file"] {
  margin-top: 4px;
}

.layout {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px;
}

.hero {
  margin-bottom: 24px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 1.75rem;
}

.muted { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-toolbar-opt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  white-space: nowrap;
}

/* CHANGE: storefront cards/list segmented control (auto-save) */
.srv-display-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
}

.srv-display-btn {
  appearance: none;
  border: 0;
  margin: 0;
  padding: 7px 14px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  cursor: pointer;
  line-height: 1.2;
  transition: background 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.srv-display-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.srv-display-btn.active {
  color: #fff;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
  box-shadow: 0 0 0 1px rgba(205, 65, 43, 0.45);
}

a.srv-display-btn {
  text-decoration: none;
}

.cat-seed-form {
  display: inline-flex;
  margin-left: auto;
}

  .srv-display-btn .muted {
  color: inherit;
  opacity: 0.72;
  font-weight: 550;
}

/* CHANGE: soft server create/edit panel — expand from top without page jump */
.server-editor-panel {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  margin: 0;
  pointer-events: none;
  overflow-anchor: none;
  transition:
    grid-template-rows 0.28s ease,
    opacity 0.22s ease,
    margin 0.28s ease;
}

.server-editor-panel.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
  margin: 0 0 14px;
  pointer-events: auto;
}

.server-editor-panel-inner {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}

.server-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-weight: 650;
}

/* CHANGE: Save/Add beside × — Cancel removed when close exists */
.server-editor-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}

.meta-create-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.meta-create-head strong {
  display: block;
  margin: 0;
  font-weight: 650;
}

.admin-lead {
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.admin-fold {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 12px 0;
  overflow: hidden;
}

.admin-fold > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
  user-select: none;
}

.admin-fold > summary::-webkit-details-marker { display: none; }

/* CHANGE: Burden-style fold chevron (tester groups) ? box + SVG, hover highlight */
.admin-fold > summary::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-color: transparent;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa8b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--panel-alt) 0%, var(--panel) 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: center, 0 0;
  background-size: 18px 18px, 100% 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-image 0.15s ease,
    transform 0.15s ease;
  transform: rotate(0deg);
}

/* Open: chevron points up (collapse). Closed: points down (expand). */
.admin-fold[open] > summary::before {
  transform: rotate(180deg);
}

.admin-fold > summary:hover::before {
  border-color: #4a7ec4;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236eb3ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #263040 0%, #1e2632 100%);
  box-shadow: 0 2px 6px rgba(205, 65, 43, 0.2);
}

.admin-fold.nested {
  margin: 8px 12px;
  background: #12171f;
}

.admin-fold.nested > summary {
  padding: 8px 12px;
  font-size: 0.92rem;
}

.admin-fold-body {
  padding: 4px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.admin-fold-pad {
  padding: 4px 14px 12px;
}

.admin-fold-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 14px 4px;
}

/* CHANGE: kit admin collapse rows + AJAX amount feedback */
.kit-fold-summary-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.kit-fold-meta {
  display: block;
  font-weight: 500;
}

.kit-fold-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.kit-fold-enabled {
  margin: 0;
  padding: 0 4px;
}

.kit-fold-enabled .admin-check-text {
  font-weight: 600;
  font-size: 0.85rem;
}

/* CHANGE: ??????? ? air after section/row title (not flush) */
.meta-active-inline {
  display: inline-flex;
  margin-left: 28px;
  margin-right: 6px;
  padding-left: 4px;
  vertical-align: middle;
}

.sc-section-head {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 8px;
  min-width: 0;
}

.sc-section-head > .meta-active-inline,
.kit-fold-summary-main .meta-active-inline {
  margin-left: 28px;
}

/* CHANGE: Save only visible while fold is open (soft-edit) */
details.meta-fold:not([open]) .meta-save-btn {
  display: none;
}

/* CHANGE: reduce scroll jump when folds open/close */
.meta-fold-list,
.meta-list-host {
  overflow-anchor: none;
}

.meta-fold {
  overflow-anchor: none;
}

.meta-fold .kit-fold-summary-main strong {
  margin-right: 0;
}

/* CHANGE: dirty Save/Add pulse — teal (unsaved confirm), idle stays accent blue */
.kit-save-btn.is-dirty,
.js-dirty-save-btn.is-dirty {
  position: relative;
  color: #fff;
  border-color: var(--admin-teal);
  background: linear-gradient(
    120deg,
    #0f6b61,
    var(--admin-teal),
    var(--admin-teal-hover),
    #5ee0d0,
    var(--admin-teal)
  );
  background-size: 220% 220%;
  animation: kit-save-pulse 1.4s ease-in-out infinite;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--admin-teal) 55%, transparent),
    0 0 14px color-mix(in srgb, var(--admin-teal) 55%, transparent);
}

@keyframes kit-save-pulse {
  0%, 100% {
    background-position: 0% 50%;
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--admin-teal) 45%, transparent),
      0 0 10px color-mix(in srgb, var(--admin-teal) 35%, transparent);
    transform: translateZ(0);
  }
  50% {
    background-position: 100% 50%;
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--admin-teal-hover) 85%, transparent),
      0 0 18px color-mix(in srgb, #5ee0d0 70%, transparent);
  }
}

.kit-group-fold {
  margin: 8px 0 !important;
}

.kit-item-amount.is-saving {
  outline: 1px solid #c9a227;
}

.kit-item-amount.is-saved {
  outline: 1px solid #3d9a5f;
}

/* ?? Admin products (GS-inspired) ?? */
.admin-products-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.admin-products-head h2 {
  margin: 0;
  color: var(--accent-hover);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.admin-products-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.admin-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #1a222c;
  color: #c5d0de;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
}

.admin-filter-pill:hover {
  text-decoration: none;
  border-color: rgba(205, 65, 43, 0.45);
  color: #fff;
}

.admin-filter-pill.active {
  background: #2a3544;
  color: #fff;
  border-color: #3d4d62;
}

.admin-products-searchbar {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

.admin-products-searchbar input[type="search"] {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  font: inherit;
}

.admin-products-searchbar input[type="search"]::placeholder {
  color: var(--muted);
}

.admin-products-searchbar input[type="search"]:focus {
  outline: none;
  border-color: rgba(205, 65, 43, 0.55);
  box-shadow: 0 0 0 2px rgba(205, 65, 43, 0.15);
}

.admin-products-bulk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-products-bulk-actions {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.admin-btn-group {
  display: inline-flex;
  flex-wrap: wrap;
}

.admin-btn-group > .btn {
  border-radius: 0;
  margin: 0;
}

.admin-btn-group > .btn:first-child {
  border-radius: 6px 0 0 6px;
}

.admin-btn-group > .btn:last-child {
  border-radius: 0 6px 6px 0;
}

.admin-btn-group > .btn + .btn {
  border-left-width: 0;
}

.btn-accent {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-accent:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}

.admin-modal-row-stack {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 6px !important;
}

.admin-modal-info {
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 8px;
  border-left: 3px solid var(--accent, #CD412B);
  background: color-mix(in srgb, var(--accent, #CD412B) 12%, transparent);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
}

.admin-modal {
  border: none;
  padding: 0;
  background: transparent;
  max-width: calc(100vw - 24px);
}

.admin-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.admin-modal-card {
  width: min(560px, 92vw);
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.admin-modal-card-wide {
  width: min(720px, 94vw);
}

.product-lists-table {
  width: 100%;
  margin: 0;
}

.product-lists-table th {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.product-lists-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
  align-items: center;
}

.product-lists-actions .btn {
  white-space: nowrap;
  padding: 6px 10px;
  font-size: 0.85rem;
}

.btn-list-select {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
}

.btn-list-select.is-active,
.btn-list-select:hover {
  background: var(--accent-hover) !important;
  border-color: var(--accent-hover) !important;
}

.btn-list-exclude {
  background: var(--panel-alt) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
}

.btn-list-exclude:hover {
  background: var(--panel-alt) !important;
  border-color: var(--border) !important;
  color: #fff !important;
}

.btn-list-delete {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
  color: #fff !important;
}

.btn-list-delete:hover {
  background: color-mix(in srgb, var(--danger) 85%, white) !important;
  border-color: color-mix(in srgb, var(--danger) 85%, white) !important;
}

.admin-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.admin-modal-close {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.admin-modal-close:hover { color: #fff; }

.admin-modal-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.admin-modal-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: center;
}

.admin-modal-row > span {
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-modal-row select,
.admin-modal-row input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  font: inherit;
}

.admin-modal-check {
  margin: 0;
  color: var(--text);
}

.admin-input-suffix {
  display: flex;
  align-items: stretch;
}

.admin-input-suffix input {
  border-radius: 6px 0 0 6px;
  flex: 1;
}

.admin-input-suffix > span {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  background: #1e2631;
  border: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  color: var(--muted);
}

.admin-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
}

@media (max-width: 560px) {
  .admin-modal-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

/* CHANGE: media library picker modal */
.media-picker-card {
  width: min(860px, 96vw);
}
.media-picker-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.media-picker-toolbar input[type="search"] {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  font: inherit;
}
.media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 10px;
  max-height: min(52vh, 480px);
  overflow: auto;
  padding: 2px;
}
.media-picker-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font: inherit;
}
.media-picker-item:hover {
  border-color: var(--accent, #CD412B);
}
.media-picker-item.is-selected {
  border-color: var(--accent, #CD412B);
  box-shadow: 0 0 0 2px rgba(205, 65, 43, 0.45);
  background: #152033;
}
.media-picker-item.is-selected::after {
  /* CHANGE: selection check (was corrupted to "?" by encoding) */
  content: "\2713";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent, #CD412B);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

@keyframes media-picker-dup-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-3px); }
  40% { transform: translateX(3px); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.media-picker-item.duplicate-block {
  border-color: rgba(220, 38, 38, 0.75);
  animation: media-picker-dup-shake 0.32s ease-in-out;
}

.media-picker-item.duplicate-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(220, 38, 38, 0.28);
  border-radius: 8px;
  pointer-events: none;
}

.media-picker-item.duplicate-block:not(.is-selected)::after {
  /* CHANGE: duplicate hint (was "????" after encoding loss) */
  content: "\0423\0436\0435 \0432 \0441\043f\0438\0441\043a\0435";
  position: absolute;
  top: 8px;
  left: 6px;
  right: 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #ffd1d1;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.7);
  z-index: 2;
}
.media-picker-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #0d1118;
  border-radius: 6px;
}
.media-picker-item-label {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.media-url-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.media-url-row input {
  flex: 1;
}

/* CHANGE: content i18n translator field + modal */
.i18n-field-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.i18n-field-row .i18n-visible {
  flex: 1;
  min-width: 0;
}
.i18n-field-row .i18n-open {
  flex-shrink: 0;
  padding: 8px 10px;
  line-height: 1;
}
.i18n-field-row .i18n-open svg {
  display: block;
  vertical-align: middle;
}
/* CHANGE: description style gear stacked under translate globe. */
.desc-i18n-with-settings {
  position: relative;
}
.desc-i18n-with-settings .desc-panel-settings-btn {
  position: absolute;
  top: 44px;
  right: 0;
  z-index: 2;
  flex-shrink: 0;
  padding: 8px 10px;
  line-height: 1;
  color: var(--muted);
}
.desc-i18n-with-settings .desc-panel-settings-btn:hover {
  color: var(--text);
}
.desc-i18n-with-settings .desc-panel-settings-btn svg {
  display: block;
}
.i18n-modal-card {
  width: min(560px, 96vw);
}
.i18n-lang-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.i18n-lang-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.i18n-lang-head .i18n-target-check {
  margin: 0;
  font-size: 13px;
}
.i18n-lang-label {
  font-size: 13px;
  color: var(--text);
}
/* CHANGE: dark inputs inside translator modal (browser default was white). */
.i18n-lang-row input[type="text"],
.i18n-lang-row textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  font: inherit;
  resize: vertical;
}
.i18n-lang-row input[type="text"]:focus,
.i18n-lang-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.i18n-lang-row input[type="text"]::placeholder,
.i18n-lang-row textarea::placeholder {
  color: var(--muted);
}
/* CHANGE: auto-translate source pills + help in i18n modal footer. */
.i18n-modal-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.i18n-auto-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.i18n-modal-foot-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}
.i18n-source-pills {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.i18n-source-label {
  margin-right: 2px;
}
.i18n-source-pill {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 4px 7px;
  border-radius: 5px;
  cursor: pointer;
  line-height: 1.2;
}
.i18n-source-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}
.i18n-source-pill.is-on {
  border-color: var(--admin-teal, #1a9e8f);
  background: rgba(26, 158, 143, 0.18);
  color: var(--text);
}
.i18n-help-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  font-style: italic;
  line-height: 1;
}
.i18n-help {
  margin: 0 16px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  line-height: 1.45;
}
.i18n-help a {
  color: var(--admin-teal, #1a9e8f);
}
.i18n-auto-unlock {
  max-width: 220px;
  line-height: 1.35;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.i18n-auto-unlock:hover {
  color: var(--text);
}
/* CHANGE: storefront language dropdown (code + globe). */
.lang-dropdown {
  position: relative;
  margin-right: 4px;
}
.lang-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}
.lang-dropdown-toggle:hover,
.lang-dropdown.open .lang-dropdown-toggle {
  border-color: var(--border);
  background: var(--panel-alt);
}
.lang-dropdown-globe {
  opacity: 0.85;
  flex-shrink: 0;
}
.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 120px;
  padding: 6px 0;
  background: #161c24;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  z-index: 40;
}
.lang-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.lang-dropdown-item:hover {
  background: rgba(205, 65, 43, 0.12);
  text-decoration: none;
  color: var(--text);
}
.lang-dropdown-item.active {
  background: rgba(255, 255, 255, 0.06);
}
.lang-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.lang-flag img {
  display: block;
  width: 20px;
  height: 15px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

/* CHANGE: Word-like align toggles for wipeblock */
.wipe-align-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #121820;
}
.align-toggle {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d1118;
}
.align-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  width: 34px;
  height: 28px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.align-btn.tiny {
  width: 28px;
  height: 24px;
  font-size: 12px;
}
.align-btn:hover { color: #fff; background: #1a2230; }
.align-btn.active {
  color: #fff;
  background: #243044;
  box-shadow: inset 0 0 0 1px var(--accent, #CD412B);
}


.admin-products-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

.admin-products-table {
  margin: 0;
  border: 0;
}

.admin-products-table th,
.admin-products-table td {
  vertical-align: middle;
}

/* CHANGE: whole ticket row opens the ticket. */
tr.row-link {
  cursor: pointer;
}

tr.row-link:hover td {
  background: rgba(205, 65, 43, 0.08);
}

tr.row-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.admin-product-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
  background: #12171f;
}

.admin-product-thumb.placeholder {
  background: linear-gradient(135deg, #1a222c, #12171f);
}

.admin-icon-btn {
  padding: 4px 8px;
  min-width: 32px;
  text-align: center;
}

.admin-icon-btn.danger {
  color: #e08a7a;
  border-color: rgba(184, 58, 50, 0.35);
}

/* CHANGE: shared admin list ? subtabs layout (.av-*); .sc-* aliases for ServerContent */
.av-page-head,
.sc-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.av-page-head-text h2,
.sc-page-head-text h2 {
  margin: 0 0 6px;
}

.av-page-head-text .admin-lead,
.sc-page-head-text .admin-lead {
  margin: 0;
}

.av-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
  flex-wrap: wrap;
}

.av-view-toggle,
.sc-view-toggle {
  display: inline-flex;
  flex-shrink: 0;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  margin-left: auto;
}

.av-view-btn,
.sc-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.av-view-btn:hover,
.sc-view-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.av-view-btn.active,
.sc-view-btn.active {
  color: #fff;
  background: rgba(205, 65, 43, 0.45);
  box-shadow: inset 0 0 0 1px rgba(205, 65, 43, 0.55);
}

.av-shell .av-subtabs,
.sc-shell .sc-subtabs,
.av-shell .sc-subtabs {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
}

.av-shell[data-view="tabs"] .av-subtabs,
.sc-shell[data-view="tabs"] .sc-subtabs,
.av-shell[data-view="tabs"] .sc-subtabs {
  display: flex;
}

.av-subtab,
.sc-subtab {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}

.av-subtab:hover,
.sc-subtab:hover {
  color: var(--text);
  border-color: rgba(205, 65, 43, 0.45);
}

.av-subtab.active,
.sc-subtab.active {
  color: #fff;
  background: rgba(205, 65, 43, 0.35);
  border-color: rgba(205, 65, 43, 0.7);
}

.av-shell[data-view="tabs"] .av-section:not(.is-active),
.sc-shell[data-view="tabs"] .sc-section:not(.is-active),
.av-shell[data-view="tabs"] .sc-section:not(.is-active) {
  display: none;
}

.av-shell[data-view="tabs"] .av-section.is-active,
.sc-shell[data-view="tabs"] .sc-section.is-active,
.av-shell[data-view="tabs"] .sc-section.is-active {
  display: block;
}

/* CHANGE: drive visibility from data-active so first paint matches URL/hash (all subtabs) */
.av-shell[data-view="tabs"][data-active="stats"] > .av-section[data-av-section]:not([data-av-section="stats"]),
.av-shell[data-view="tabs"][data-active="wipe"] > .av-section[data-av-section]:not([data-av-section="wipe"]),
.av-shell[data-view="tabs"][data-active="kits"] > .av-section[data-av-section]:not([data-av-section="kits"]),
.av-shell[data-view="tabs"][data-active="plugins"] > .av-section[data-av-section]:not([data-av-section="plugins"]),
.av-shell[data-view="tabs"][data-active="custom"] > .av-section[data-av-section]:not([data-av-section="custom"]),
.av-shell[data-view="tabs"][data-active="tabs"] > .av-section[data-av-section]:not([data-av-section="tabs"]),
.sc-shell[data-view="tabs"][data-active="stats"] > .sc-section[data-av-section]:not([data-av-section="stats"]),
.sc-shell[data-view="tabs"][data-active="wipe"] > .sc-section[data-av-section]:not([data-av-section="wipe"]),
.sc-shell[data-view="tabs"][data-active="kits"] > .sc-section[data-av-section]:not([data-av-section="kits"]),
.sc-shell[data-view="tabs"][data-active="plugins"] > .sc-section[data-av-section]:not([data-av-section="plugins"]),
.sc-shell[data-view="tabs"][data-active="custom"] > .sc-section[data-av-section]:not([data-av-section="custom"]),
.sc-shell[data-view="tabs"][data-active="tabs"] > .sc-section[data-av-section]:not([data-av-section="tabs"]) {
  display: none !important;
}

.av-shell[data-view="tabs"][data-active="stats"] > .av-section[data-av-section="stats"],
.av-shell[data-view="tabs"][data-active="wipe"] > .av-section[data-av-section="wipe"],
.av-shell[data-view="tabs"][data-active="kits"] > .av-section[data-av-section="kits"],
.av-shell[data-view="tabs"][data-active="plugins"] > .av-section[data-av-section="plugins"],
.av-shell[data-view="tabs"][data-active="custom"] > .av-section[data-av-section="custom"],
.av-shell[data-view="tabs"][data-active="tabs"] > .av-section[data-av-section="tabs"],
.sc-shell[data-view="tabs"][data-active="stats"] > .sc-section[data-av-section="stats"],
.sc-shell[data-view="tabs"][data-active="wipe"] > .sc-section[data-av-section="wipe"],
.sc-shell[data-view="tabs"][data-active="kits"] > .sc-section[data-av-section="kits"],
.sc-shell[data-view="tabs"][data-active="plugins"] > .sc-section[data-av-section="plugins"],
.sc-shell[data-view="tabs"][data-active="custom"] > .sc-section[data-av-section="custom"],
.sc-shell[data-view="tabs"][data-active="tabs"] > .sc-section[data-av-section="tabs"] {
  display: block !important;
}

/* CHANGE: highlight subtab from data-active before JS class toggle */
.av-shell[data-view="tabs"][data-active="stats"] .av-subtab[data-av-goto="stats"],
.av-shell[data-view="tabs"][data-active="wipe"] .av-subtab[data-av-goto="wipe"],
.av-shell[data-view="tabs"][data-active="kits"] .av-subtab[data-av-goto="kits"],
.av-shell[data-view="tabs"][data-active="plugins"] .av-subtab[data-av-goto="plugins"],
.av-shell[data-view="tabs"][data-active="custom"] .av-subtab[data-av-goto="custom"],
.av-shell[data-view="tabs"][data-active="tabs"] .av-subtab[data-av-goto="tabs"],
.sc-shell[data-view="tabs"][data-active="stats"] .sc-subtab[data-av-goto="stats"],
.sc-shell[data-view="tabs"][data-active="wipe"] .sc-subtab[data-av-goto="wipe"],
.sc-shell[data-view="tabs"][data-active="kits"] .sc-subtab[data-av-goto="kits"],
.sc-shell[data-view="tabs"][data-active="plugins"] .sc-subtab[data-av-goto="plugins"],
.sc-shell[data-view="tabs"][data-active="custom"] .sc-subtab[data-av-goto="custom"],
.sc-shell[data-view="tabs"][data-active="tabs"] .sc-subtab[data-av-goto="tabs"] {
  color: #fff;
  background: rgba(205, 65, 43, 0.35);
  border-color: rgba(205, 65, 43, 0.7);
}

.av-shell[data-view="tabs"] .av-section > summary,
.sc-shell[data-view="tabs"] .sc-section > summary,
.av-shell[data-view="tabs"] .sc-section > summary {
  pointer-events: none;
  cursor: default;
}

/* CHANGE: allow create/action controls inside section headers in tabs view */
.av-shell[data-view="tabs"] .av-section > summary a,
.av-shell[data-view="tabs"] .av-section > summary button,
.sc-shell[data-view="tabs"] .sc-section > summary a,
.sc-shell[data-view="tabs"] .sc-section > summary button,
.av-shell[data-view="tabs"] .sc-section > summary a,
.av-shell[data-view="tabs"] .sc-section > summary button {
  pointer-events: auto;
  cursor: pointer;
}

.av-shell[data-view="tabs"] .av-section > summary::before,
.sc-shell[data-view="tabs"] .sc-section > summary::before,
.av-shell[data-view="tabs"] .sc-section > summary::before {
  content: none;
}

.av-shell[data-view="list"] > .av-bar .av-subtabs {
  display: none;
}

@media (max-width: 720px) {
  .av-page-head,
  .sc-page-head {
    flex-wrap: wrap;
  }

  .av-view-toggle,
  .sc-view-toggle {
    margin-left: auto;
  }
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  padding: 4px 14px 12px;
}

.form-grid-2 label {
  display: block;
  margin: 0;
  font-size: 0.88rem;
}

.form-grid-2 label.admin-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 100%;
}

.form-grid-2 label.admin-check.form-span-2 {
  display: flex;
  grid-column: 1 / -1;
}

.form-grid-2 input:not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
.form-grid-2 select,
.form-grid-2 textarea {
  width: 100%;
  margin-top: 4px;
  padding: 7px 9px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  font: inherit;
}

.form-grid-2 textarea {
  min-height: 120px;
  resize: vertical;
}

.form-grid-2 .form-span-2 {
  grid-column: 1 / -1;
}

/* CHANGE: dark theme for textareas outside .form-grid (avoids white browser default). */
.admin-fold-pad label {
  display: block;
  font-size: 0.88rem;
}

.admin-fold-pad textarea {
  width: 100%;
  margin-top: 4px;
  padding: 7px 9px;
  min-height: 120px;
  resize: vertical;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  font: inherit;
}

.check-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.tiny { font-size: 0.78rem; }

.row-active td {
  background: rgba(205, 65, 43, 0.08);
}

@media (max-width: 720px) {
  .form-grid-2 { grid-template-columns: 1fr; }
}

.card h3 {
  margin: 0;
  font-size: 1rem;
}

.price {
  font-weight: 700;
  color: var(--ok);
}

.price .old {
  color: var(--muted);
  text-decoration: line-through;
  margin-right: 8px;
  font-weight: 500;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.9rem;
}

.chip.active {
  color: var(--text);
  border-color: var(--accent);
  background: #1a2740;
}

/* CHANGE: shop catalog — modes inside toolbar; accent blue (not purple) */
.shop-mode-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.shop-mode-hint-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
}

.shop-catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 18px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: #1a1f28;
}

.shop-catalog-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.shop-mode-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}

.shop-mode-bar-empty {
  flex: 1 1 auto;
}

.shop-mode-chip {
  padding: 8px 14px;
  border-radius: 9px;
  color: #c5cdd8;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.12s ease, color 0.12s ease;
}

.shop-mode-chip:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.shop-mode-chip.active {
  background: var(--accent, #CD412B);
  color: #fff;
}

.shop-mode-ico {
  margin-right: 4px;
}

.shop-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #12171f;
  color: var(--muted);
  text-decoration: none;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.shop-icon-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.shop-icon-btn.active {
  color: #f5c542;
  border-color: #f5c542;
  background: #1a2740;
}

.shop-icon-btn.sale-active,
.shop-icon-btn.active[href*="sale=1"] {
  color: #ffb347;
  border-color: #ffb347;
}

/* CHANGE: category dropdown — dark theme (match site, not light reference) */
.shop-cat-dropdown {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}

.shop-cat-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 148px;
  height: 40px;
  padding: 0 14px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #12171f;
  color: var(--text, #e8ecf2);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.shop-cat-trigger:hover {
  border-color: rgba(205, 65, 43, 0.45);
  background: #1a2230;
}

.shop-cat-trigger[aria-expanded="true"] {
  border-color: rgba(205, 65, 43, 0.7);
  background: #1a2740;
  box-shadow: 0 0 0 1px rgba(205, 65, 43, 0.2);
}

.shop-cat-trigger .shop-cat-ico {
  display: inline-flex;
  width: 18px;
  height: 18px;
  color: var(--muted, #9aa3b2);
  flex-shrink: 0;
}

.shop-cat-trigger .shop-cat-ico svg {
  display: block;
  width: 18px;
  height: 18px;
}

.shop-cat-label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.shop-cat-chevron {
  display: inline-flex;
  margin-left: 4px;
  color: var(--muted, #9aa3b2);
  flex-shrink: 0;
}

.shop-cat-chevron svg {
  display: block;
  width: 14px;
  height: 14px;
  transition: transform 0.15s ease;
}

.shop-cat-trigger[aria-expanded="true"] .shop-cat-chevron svg {
  transform: rotate(180deg);
}

.shop-cat-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 40;
  width: max-content;
  min-width: 200px;
  max-width: min(92vw, 280px);
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #161b24;
  box-shadow:
    0 4px 6px rgba(0, 0, 0, 0.2),
    0 16px 40px rgba(0, 0, 0, 0.45);
}

.shop-cat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 10px;
  color: #d5dbe6;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.2;
}

.shop-cat-item:hover {
  background: #1e2530;
  text-decoration: none;
  color: #fff;
}

.shop-cat-item.is-active {
  background: #1a2740;
  color: #fff;
}

.shop-cat-item .shop-cat-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  color: #9aa3b2;
  flex-shrink: 0;
  font-size: 0.95rem;
  line-height: 1;
}

.shop-cat-item.is-active .shop-cat-ico,
.shop-cat-item:hover .shop-cat-ico {
  color: #c5cdd8;
}

.shop-cat-item .shop-cat-ico svg {
  display: block;
  width: 16px;
  height: 16px;
}

.shop-cat-item .shop-cat-ico.is-dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.shop-cat-item > span:not(.shop-cat-ico):not(.shop-cat-check) {
  flex: 1;
  min-width: 0;
}

.shop-cat-check {
  margin-left: auto;
  display: inline-flex;
  color: #3dd68c;
  flex-shrink: 0;
}

.shop-cat-check svg {
  display: block;
  width: 16px;
  height: 16px;
}

/* CHANGE: favorite badge — yellow rounded tile + white star (like sale badge chrome) */
.product-fav-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  background: #e6a512;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  text-shadow: none;
  z-index: 2;
  box-sizing: border-box;
}
.product-fav-badge.is-on {
  display: inline-flex;
}

/* CHANGE: server editor filter chips — clean pill toggles (no nested check square) */
.server-filter-panel {
  padding-top: 4px;
}

.server-filter-groups {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.server-filter-group-title {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.filter-chip-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

/* CHANGE: beat .admin-fold-pad label { display:block } which stretched chips full-width */
.admin-fold-pad .filter-chip,
.admin-fold-pad label.filter-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #161b24;
  color: #c5cdd8;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  transition:
    border-color 0.12s ease,
    background 0.12s ease,
    color 0.12s ease,
    box-shadow 0.12s ease;
}

.filter-chip input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
}

.filter-chip-mark {
  display: none;
  width: 14px;
  height: 14px;
  min-width: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  position: relative;
  flex-shrink: 0;
}

.filter-chip-mark::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--accent, #CD412B);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter-chip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
  flex-shrink: 0;
}

.filter-chip-label {
  line-height: 1.2;
}

.admin-fold-pad .filter-chip:hover {
  border-color: rgba(205, 65, 43, 0.55);
  color: #fff;
  background: #1a2230;
}

.admin-fold-pad .filter-chip.is-on,
.admin-fold-pad .filter-chip:has(input:checked) {
  color: #fff;
  border-color: transparent;
  background: var(--accent, #CD412B);
  box-shadow: 0 4px 14px rgba(205, 65, 43, 0.28);
}

.admin-fold-pad .filter-chip.is-on .filter-chip-mark,
.admin-fold-pad .filter-chip:has(input:checked) .filter-chip-mark {
  display: block;
}

/* CHANGE: chip ring only for keyboard — :focus-within stuck after mouse click */
.admin-fold-pad .filter-chip:has(:focus-visible) {
  outline: 2px solid color-mix(in srgb, var(--accent, #CD412B) 65%, white);
  outline-offset: 2px;
}

/* CHANGE: multi-select checkbox dropdown (product servers). */
.ms-select {
  position: relative;
  margin-top: 6px;
  width: 100%;
  max-width: 420px;
}

.ms-select-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-2, var(--panel));
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.ms-select-toggle:hover {
  border-color: color-mix(in srgb, var(--accent, #CD412B) 50%, var(--border));
}

.ms-select-caret {
  opacity: 0.7;
  font-size: 0.85em;
}

.ms-select-panel {
  /* CHANGE: fixed — parent .admin-fold has overflow:hidden and was clipping the list. */
  position: fixed;
  z-index: 10050;
  max-height: min(280px, 50vh);
  overflow: auto;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  min-width: 200px;
}

.ms-select-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  margin: 0;
}

.ms-select-option:hover {
  background: color-mix(in srgb, var(--accent, #CD412B) 12%, transparent);
}

.ms-select-option.is-on {
  background: color-mix(in srgb, var(--accent, #CD412B) 22%, transparent);
}

.ms-select-option input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.ms-select-option .filter-chip-mark {
  flex-shrink: 0;
}

/* CHANGE: product cooldown dial 00д : 00ч : 00м : 00с */
.cooldown-block {
  display: grid;
  gap: 6px;
}

.cooldown-dial {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input);
  width: fit-content;
  max-width: 100%;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.cooldown-dial.is-off {
  opacity: 0.45;
  filter: grayscale(0.35);
  pointer-events: none;
}

.cooldown-unit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 !important;
}

.cooldown-unit input[type="text"],
.cooldown-unit input[type="number"] {
  width: 3.1rem;
  margin-top: 0 !important;
  padding: 6px 4px !important;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  background: #0d1118 !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  color: inherit;
  -moz-appearance: textfield;
}

.cooldown-unit input[type="number"]::-webkit-outer-spin-button,
.cooldown-unit input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cooldown-unit span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 650;
  min-width: 0.9rem;
}

.cooldown-sep {
  color: var(--muted);
  opacity: 0.55;
  font-weight: 700;
  user-select: none;
}

.admin-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px;
}

.admin-nav {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 10px 12px;
  height: fit-content;
}

/* CHANGE: grouped sidebar sections */
.admin-nav-group {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(42, 51, 64, 0.9);
}

.admin-nav > a:first-child + .admin-nav-group,
.admin-nav > .admin-nav-group:first-child {
  margin-top: 8px;
}

.admin-nav-group-title {
  padding: 2px 10px 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  user-select: none;
}

.admin-nav a {
  display: block;
  padding: 8px 10px;
  border-radius: 6px;
  color: var(--muted);
  margin-bottom: 2px;
}

.admin-nav a.admin-nav-sub {
  padding-left: 18px;
  font-size: 0.92rem;
  color: #7f8b9a;
}

/* CHANGE: all items under a group share the same indent (not only “sub” links) */
.admin-nav-group > a {
  padding-left: 18px;
  font-size: 0.92rem;
  color: #7f8b9a;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: var(--panel-alt);
  color: var(--text);
  text-decoration: none;
}

.admin-nav a.admin-nav-sub:hover,
.admin-nav a.admin-nav-sub.active,
.admin-nav-group > a:hover,
.admin-nav-group > a.active {
  color: var(--text);
}

.admin-nav .nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
}

.admin-nav .nav-badge--danger {
  background: #c62828;
}

.admin-alert {
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

.admin-alert--danger {
  border-color: color-mix(in srgb, #c62828 50%, var(--border));
  background: color-mix(in srgb, #c62828 16%, var(--panel));
  color: #ffb4aa;
  font-weight: 650;
}

.admin-row--danger td {
  background: color-mix(in srgb, #c62828 10%, transparent);
}

.admin-chip--danger.active,
.admin-chip.admin-chip--danger.active {
  border-color: #c62828;
  color: #ffb4aa;
}

.hub-ticket-status.is-escalated {
  background: color-mix(in srgb, #c62828 22%, var(--panel));
  border-color: color-mix(in srgb, #c62828 55%, var(--border));
  color: #ffb4aa;
}

.hub-ticket-status.is-fixing {
  background: color-mix(in srgb, #c26d33 18%, var(--panel));
  border-color: color-mix(in srgb, #c26d33 45%, var(--border));
}

.hub-ticket-status.is-answered {
  background: color-mix(in srgb, #4a8fd4 16%, var(--panel));
  border-color: color-mix(in srgb, #4a8fd4 40%, var(--border));
}

.hub-pdp-support-form {
  margin-top: 12px;
  gap: 12px;
}

.hub-pdp-support-list-title {
  margin: 20px 0 10px;
  font-size: 1rem;
}

.hub-pdp-support-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hub-pdp-support-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input);
}

.hub-pdp-support-note {
  margin-top: 16px;
}
/* CHANGE: AutoTranslate nav — label left edge, БЕТА pill right edge of the row */
.admin-nav a.admin-nav-with-beta {
  display: flex !important;
  width: 100%;
  box-sizing: border-box;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.admin-nav a.admin-nav-with-beta > span:first-child {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left;
}
.admin-nav-beta {
  flex: 0 0 auto;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  color: #c9a66b;
  background: color-mix(in srgb, #c9a66b 14%, #151b22);
  border: 1px solid color-mix(in srgb, #c9a66b 38%, #2a3340);
  white-space: nowrap;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.table th, .table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.92rem;
}

.table th {
  background: var(--panel-alt);
  color: var(--muted);
  font-weight: 600;
}

.notice {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--ok) 16%, var(--panel));
  color: var(--text);
  margin-bottom: 16px;
}

.notice.warn {
  background: color-mix(in srgb, var(--warn) 18%, var(--panel));
  border-color: var(--warn);
}

/* CHANGE: empty ASP.NET validation summary must not show the orange .notice.warn box. */
.validation-summary-valid {
  display: none !important;
}

.notice-err,
.notice.error {
  background: #2a1414;
  border-color: #c84a4a;
}

.mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.85rem; }

/* ?? Storefront hero banner ?? */
.shop-banner {
  --banner-image: none;
  --banner-h: 220px;
  --banner-overlay: 0.35;
  --banner-from: #3a221c;
  --banner-to: #111221;
  --banner-accent: var(--accent);
  --banner-badge: transparent;
  margin: 16px auto 0;
  max-width: var(--content-max);
  padding: 0 24px;
}

.shop-banner-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  min-height: var(--banner-h);
  padding: 28px 32px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--banner-accent) 35%, transparent);
  background:
    linear-gradient(105deg, rgba(15, 22, 40, var(--banner-overlay)) 0%, rgba(20, 36, 70, calc(var(--banner-overlay) * 0.85)) 48%, rgba(12, 18, 32, calc(var(--banner-overlay) * 0.6)) 100%),
    var(--banner-image),
    linear-gradient(120deg, var(--banner-from) 0%, color-mix(in srgb, var(--banner-accent) 35%, var(--banner-from)) 42%, var(--banner-to) 100%);
  background-size: cover, cover, cover;
  background-position: center, right center, center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.shop-banner-inner.layout-text { grid-template-columns: 1fr; }
.shop-banner-inner.layout-bonuses-left { grid-template-columns: 0.9fr 1.4fr; }
.shop-banner-inner.layout-centered {
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}

.shop-banner-inner.align-center .shop-banner-copy,
.shop-banner-inner.layout-centered .shop-banner-copy {
  text-align: center;
  justify-self: center;
}

.shop-banner-inner.align-center .shop-banner-actions,
.shop-banner-inner.layout-centered .shop-banner-actions {
  justify-content: center;
}

.shop-banner-inner.align-center .shop-banner-sub,
.shop-banner-inner.layout-centered .shop-banner-sub {
  margin-left: auto;
  margin-right: auto;
}

.shop-banner-inner.theme-ocean {
  --banner-from: #0d2a3a;
  --banner-to: #12304a;
  --banner-accent: #3aa7d9;
}

.shop-banner-inner.theme-ember {
  --banner-from: #3a1a12;
  --banner-to: #4a2210;
  --banner-accent: #e07a3a;
}

.shop-banner-inner.theme-violet {
  --banner-from: #241435;
  --banner-to: #1a1230;
  --banner-accent: #9b6dff;
}

.shop-banner-inner.theme-midnight {
  --banner-from: #0c1018;
  --banner-to: #141a28;
  --banner-accent: #5b8def;
}

.shop-banner-inner.theme-forest {
  --banner-from: #12241a;
  --banner-to: #1a3020;
  --banner-accent: #4caf78;
}

.shop-banner-inner.theme-custom {
  /* uses inline --banner-from / --banner-to / --banner-accent */
}

.shop-banner-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 85% 50%, color-mix(in srgb, var(--banner-accent) 28%, transparent), transparent 60%),
    linear-gradient(90deg, rgba(10, 14, 22, 0.35), transparent 55%);
  pointer-events: none;
}

.shop-banner-copy,
.shop-banner-bonuses {
  position: relative;
  z-index: 1;
}

.shop-banner-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--banner-badge, transparent) 35%, rgba(0, 0, 0, 0.35));
  border: 1px solid color-mix(in srgb, var(--banner-accent) 40%, rgba(255, 255, 255, 0.12));
  color: #d7e4f5;
  font-size: 0.82rem;
  margin-bottom: 12px;
}

.shop-banner-title {
  margin: 0 0 10px;
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #eef5ff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.shop-banner-inner.title-lg .shop-banner-title {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
}

.shop-banner-inner.title-xl .shop-banner-title {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
}

.shop-banner-sub {
  margin: 0 0 18px;
  max-width: 36rem;
  color: rgba(232, 237, 242, 0.88);
  line-height: 1.5;
  font-size: 0.98rem;
}

.shop-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn-banner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 650;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn-banner.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--banner-accent) 70%, white), var(--banner-accent));
  color: #0b1220;
  border: 1px solid transparent;
}

.btn-banner.primary:hover {
  filter: brightness(1.08);
  text-decoration: none;
}

.btn-banner.ghost {
  background: transparent;
  color: #eef5ff;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.btn-banner.ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  text-decoration: none;
}

.shop-banner-bonuses {
  align-self: center;
  justify-self: end;
  min-width: 200px;
  width: min(100%, 260px);
}

.layout-bonuses-left .shop-banner-bonuses { justify-self: start; }
.layout-centered .shop-banner-bonuses { justify-self: center; width: min(100%, 320px); }

.bonus-head {
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--banner-accent) 70%, white);
  margin-bottom: 10px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.bonus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bonus-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-radius: 8px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--banner-accent) 22%, transparent));
  border: 1px solid color-mix(in srgb, var(--banner-accent) 28%, transparent);
  color: #e8f0ff;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.bonus-row.highlight {
  background: linear-gradient(90deg, transparent, rgba(8, 14, 28, 0.85));
  border-color: color-mix(in srgb, var(--banner-accent) 45%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--banner-accent) 25%, transparent);
}

.bonus-plus {
  color: color-mix(in srgb, var(--banner-accent) 55%, white);
}

@media (max-width: 860px) {
  .shop-banner-inner,
  .shop-banner-inner.layout-bonuses-left {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .shop-banner-bonuses {
    justify-self: stretch;
    width: 100%;
  }
}

/* ?? Admin banner editor ?? */
.banner-preview-wrap {
  position: sticky;
  top: 12px;
  z-index: 5;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.banner-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-alt);
}

.banner-preview-off {
  padding: 8px 12px;
  font-size: 0.86rem;
  color: #e0b07a;
  background: rgba(200, 122, 45, 0.12);
  border-bottom: 1px solid rgba(200, 122, 45, 0.25);
}

.banner-preview-wrap.is-disabled .banner-preview {
  opacity: 0.55;
}

.banner-preview {
  margin: 0;
  max-width: none;
  padding: 12px;
}

.banner-preview .shop-banner-inner {
  min-height: var(--banner-h, 220px);
}

.shop-banner-custom {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
}

.banner-admin .banner-code {
  min-height: 160px;
  font-size: 0.82rem;
  line-height: 1.4;
  tab-size: 2;
}

.banner-admin {
  padding: 0;
  overflow: hidden;
}

.banner-admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-alt);
}

.banner-admin-footer {
  border-bottom: 0;
  border-top: 1px solid var(--border);
}

.banner-admin-block {
  border-bottom: 1px solid var(--border);
}

.banner-admin-block > summary {
  cursor: pointer;
  padding: 10px 14px;
  font-weight: 650;
  list-style: none;
  color: var(--text);
}

.banner-admin-block > summary::-webkit-details-marker { display: none; }

/* CHANGE: same Burden fold-chevron as .admin-fold */
.banner-admin-block > summary::before {
  content: "";
  display: inline-block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  box-sizing: border-box;
  margin: 0 8px 0 0;
  vertical-align: middle;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa8b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--panel-alt) 0%, var(--panel) 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: center, 0 0;
  background-size: 18px 18px, 100% 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
  transform: rotate(0deg);
}

.banner-admin-block[open] > summary::before {
  transform: rotate(180deg);
}

.banner-admin-block > summary:hover::before {
  border-color: #4a7ec4;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236eb3ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #263040 0%, #1e2632 100%);
  box-shadow: 0 2px 6px rgba(205, 65, 43, 0.2);
}

.banner-admin-block .form-grid-2 {
  padding-top: 0;
  padding-bottom: 14px;
}

.banner-admin-block textarea {
  min-height: 64px;
}

/* ?? Home wipe calendar ?? */
.home-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wipe-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px 20px 18px;
}

.wipe-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.wipe-title {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.wipe-lead {
  margin: 0;
  max-width: 36rem;
  line-height: 1.45;
}

.wipe-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--muted);
  font-size: 0.85rem;
  align-items: center;
}

.wipe-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.wipe-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.wipe-dot.map { background: #3a8de6; }
.wipe-dot.full { background: #cd4632; }
.wipe-dot.custom { background: #e6bf33; }

/* CHANGE: admin Wipes table — kind label with color dot */
.wipe-kind-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.admin-lead .wipe-dot {
  vertical-align: middle;
  margin: 0 2px 1px;
}

.wipe-strip-wrap {
  position: relative;
  margin: 0 -4px;
}

.wipe-strip-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 48px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--panel));
}

.wipe-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 4px 10px;
  scroll-snap-type: x proximity;
  /* CHANGE: Burden-style horizontal scrollbar */
  scrollbar-width: thin;
  scrollbar-color: #3a4654 var(--input);
}

.wipe-strip::-webkit-scrollbar {
  height: 8px;
}

.wipe-strip::-webkit-scrollbar-track {
  background: var(--input);
  border-radius: 999px;
  margin: 0 4px;
}

.wipe-strip::-webkit-scrollbar-thumb {
  background: #3a4654;
  border-radius: 999px;
  border: 1px solid #2a3340;
}

.wipe-strip::-webkit-scrollbar-thumb:hover {
  background: #4e5d70;
}

.wipe-strip::-webkit-scrollbar-corner {
  background: transparent;
}

.wipe-day {
  flex: 0 0 auto;
  width: 64px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 12px;
  border-radius: 10px;
  border: 1px dashed #3a4554;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.wipe-day:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: #526274;
}

.wipe-day.is-today {
  border-style: solid;
  border-color: #3a4654;
  background: #1e2631;
}

.wipe-day.is-active {
  border-style: solid;
  border-color: rgba(205, 65, 43, 0.55);
  background: #1a2740;
  box-shadow: 0 0 0 1px rgba(205, 65, 43, 0.2);
}

.wipe-day.is-active .wipe-weekday {
  color: #6eb3ff;
}

.wipe-dots {
  display: flex;
  gap: 3px;
  min-height: 8px;
  margin-bottom: 2px;
}

.wipe-weekday {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wipe-num {
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.wipe-detail {
  margin-top: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #121820;
  overflow: hidden;
}

.wipe-detail-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg, rgba(205, 65, 43, 0.18), transparent 55%);
  border-left: 3px solid var(--accent);
}

.wipe-detail-date {
  font-weight: 700;
  letter-spacing: 0.02em;
}

.wipe-detail-body {
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

.wipe-empty {
  margin: 0;
}

.wipe-event {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  padding: 12px 14px;
  border-left: 3px solid #3a8de6;
}

.wipe-event.kind-full { border-left-color: #cd4632; }
.wipe-event.kind-custom { border-left-color: #e6bf33; }
.wipe-event.kind-map { border-left-color: #3a8de6; }

.wipe-event-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.wipe-server-tag {
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #cfe3ff;
}

.wipe-event-time {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-size: 0.9rem;
}

.wipe-event-title {
  font-weight: 650;
  margin-bottom: 6px;
}

.wipe-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.88rem;
}

.wipe-kind-badge {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(58, 141, 230, 0.18);
  color: #9cc7ff;
}

.wipe-kind-badge.full {
  background: rgba(205, 70, 50, 0.2);
  color: #f0a59a;
}

.wipe-kind-badge.custom {
  background: rgba(230, 191, 51, 0.18);
  color: #f0d88a;
}

.wipe-event-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.home-placeholder h3 {
  margin: 0 0 6px;
}

/* ?? User bar (balance + avatar + dropdown) ?? */
.user-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.balance-pill {
  display: inline-flex;
  align-items: stretch;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  background: var(--panel-alt);
}

.balance-pill:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.balance-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  background: #2a3340;
  font-size: 0.95rem;
}

.balance-value {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  background: #2a2618;
  font-weight: 700;
  font-size: 0.95rem;
}

.balance-value .coin {
  font-size: 0.9rem;
}

.btn-topup {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: #2f8f4e;
  color: #e8fff0;
  font-weight: 700;
  font-size: 0.88rem;
  text-decoration: none;
  border: 1px solid #3aa35c;
  white-space: nowrap;
}

.btn-topup:hover {
  background: #36a358;
  text-decoration: none;
  color: #fff;
}

.basket-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-alt);
  color: var(--text);
  text-decoration: none;
  position: relative;
}

.basket-chip:hover {
  border-color: var(--accent);
  background: var(--panel-alt);
  text-decoration: none;
}

.basket-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-dropdown {
  position: relative;
}

.profile-avatar-btn {
  display: inline-flex;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.profile-avatar-btn img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.profile-avatar-btn:hover,
.profile-dropdown.open .profile-avatar-btn {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(205, 65, 43, 0.25);
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  padding: 8px 0;
  background: #161c24;
  color: var(--text);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border);
  z-index: 40;
}

.profile-menu-head {
  padding: 10px 14px 12px;
}

.profile-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  word-break: break-word;
}

.profile-steam {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.8rem;
}

.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.profile-menu-item:hover {
  background: rgba(205, 65, 43, 0.12);
  text-decoration: none;
  color: var(--text);
}

.profile-menu-sep {
  height: 1px;
  margin: 6px 0;
  background: var(--border);
}

.profile-logout {
  color: #e07a72;
}

.pmi {
  width: 1.2em;
  text-align: center;
  opacity: 0.85;
}

.menu-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* ?? Shop product cards (ALSTA-like) ?? */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.product-card:hover {
  border-color: rgba(205, 65, 43, 0.55);
  transform: translateY(-2px);
}

/* CHANGE: no sticky focus ring on product card after modal close */
.product-card:focus {
  outline: none;
}
.product-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent, #CD412B) 70%, white);
  outline-offset: 2px;
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #161c24;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* CHANGE: custom product art — contain with padding (default game-icon look on card when not bleed) */
.product-media:not(.is-bleed) {
  padding: 14px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0) 0 0 / 14px 14px,
    #161c24;
}
.product-media:not(.is-bleed) img {
  object-fit: contain;
}
.product-media.is-bleed img {
  object-fit: cover;
}

.product-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2.8rem;
  font-weight: 800;
  color: rgba(158, 196, 255, 0.45);
  background: linear-gradient(145deg, #1a2230, #12171f);
}

.product-price-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.82);
  border: 1px solid rgba(205, 65, 43, 0.45);
  color: #eef5ff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 0.9rem;
}

.product-sale-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #c4453c;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
}

.product-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-name {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.product-prices {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-variant-numeric: tabular-nums;
}

.product-prices .old {
  text-decoration: line-through;
  color: var(--muted, #8a96a8);
  font-size: 0.85rem;
}

.product-prices .now {
  color: #7ec8ff;
  font-weight: 700;
}

.product-buy {
  width: auto;
  flex: 0 0 auto;
  margin-top: 0;
  padding: 8px 14px;
  white-space: nowrap;
}

.product-buy-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.product-buy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
}
.product-buy-row .product-prices {
  flex: 1 1 auto;
  min-width: 0;
}
.product-choice-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* CHANGE: Choice prize select — dark shop style (not browser white default) */
.shop-choice-select,
.shop-pm-choice {
  appearance: none;
  -webkit-appearance: none;
  margin: 4px 0 0;
  padding: 8px 32px 8px 10px;
  box-sizing: border-box;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--input);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239ec4ff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.shop-choice-select {
  width: 100%;
}
.shop-choice-select:hover,
.shop-pm-choice:hover {
  border-color: rgba(205, 65, 43, 0.55);
}
.shop-choice-select:focus-visible,
.shop-pm-choice:focus-visible {
  outline: none;
  border-color: var(--accent, #CD412B);
  box-shadow: 0 0 0 2px rgba(205, 65, 43, 0.35);
}
.shop-choice-select option,
.shop-pm-choice option {
  background: var(--input);
  color: var(--text);
}

/* CHANGE: storefront product detail modal (kit-modal pattern, dark shop style) */
.shop-product-modal {
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(480px, 96vw);
  width: 100%;
  max-height: 94vh;
}
.shop-product-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
}
.shop-pm-card {
  display: flex;
  flex-direction: column;
  max-height: min(860px, 94vh);
  background: var(--panel-alt, #121820);
  color: var(--text);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.shop-pm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  flex-shrink: 0;
}
.shop-pm-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.shop-pm-fav-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.shop-pm-fav-btn:hover {
  border-color: #e0b36a;
  color: #e0b36a;
}
.shop-pm-fav-btn.is-on {
  color: #e0b36a;
  border-color: color-mix(in srgb, #e0b36a 45%, var(--border));
  background: color-mix(in srgb, #e0b36a 12%, var(--input));
}
.shop-pm-title-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 48px);
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--input);
  border: 1px solid var(--border);
}
.shop-pm-fav {
  color: #e0b36a;
  font-size: 0.9rem;
}
.shop-pm-title {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-pm-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.shop-pm-close:hover {
  border-color: var(--accent);
}
.shop-pm-body {
  padding: 4px 16px 12px;
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 175, 195, 0.55) transparent;
}
.shop-pm-hero {
  position: relative;
  width: min(100%, 280px);
  aspect-ratio: 1 / 1;
  margin: 0 auto 12px;
  padding: 20px;
  box-sizing: border-box;
  border-radius: 14px;
  background:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0) 0 0 / 14px 14px,
    #161c24;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* CHANGE: polished description flip — textured controls + staged page turn */
.shop-pm-flip {
  --flip-accent: #e08a2e;
  --flip-accent-soft: rgba(224, 138, 46, 0.35);
  display: block;
  margin: 0 auto 16px;
  max-width: min(100%, 300px);
}
.shop-pm-flip-viewport {
  position: relative;
  width: 100%;
  overflow: visible;
}
.shop-pm-flip-inner {
  position: relative;
  width: 100%;
  border-radius: 14px;
  transform-style: flat;
}
.shop-pm-flip.is-flipped {
  max-width: 100%;
}
.shop-pm-flip-front.shop-pm-hero {
  position: relative;
  width: 100%;
  margin: 0;
  z-index: 2;
  transform-origin: center center;
  transition:
    opacity 0.42s cubic-bezier(0.4, 0.1, 0.2, 1),
    transform 0.48s cubic-bezier(0.4, 0.1, 0.2, 1),
    filter 0.42s ease;
  will-change: transform, opacity;
}
.shop-pm-flip-back {
  box-sizing: border-box;
  border-radius: 14px;
  /* CHANGE: panel accent/glow/border from product DescriptionPanelSettings. */
  border: 1px solid var(--flip-panel-border, rgba(224, 138, 46, 0.28));
  background:
    radial-gradient(ellipse at 20% 0%, var(--flip-panel-glow, rgba(224, 138, 46, 0.12)), transparent 55%),
    linear-gradient(165deg, #1e2633 0%, #141a22 48%, #10151c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(0, 0, 0, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.35);
  padding: 16px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 220px;
  max-height: min(62vh, 560px);
  overflow: hidden;
  z-index: 1;
  transform-origin: center center;
  transition:
    opacity 0.42s cubic-bezier(0.4, 0.1, 0.2, 1),
    transform 0.48s cubic-bezier(0.4, 0.1, 0.2, 1),
    filter 0.42s ease;
  will-change: transform, opacity;
}
.shop-pm-flip:not(.is-flipped) .shop-pm-flip-front.shop-pm-hero {
  transform: translateX(0) scale(1);
  opacity: 1;
  filter: blur(0);
  pointer-events: auto;
}
.shop-pm-flip:not(.is-flipped) .shop-pm-flip-back {
  position: absolute;
  inset: 0;
  transform: translateX(18%) scale(0.96);
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;
}
.shop-pm-flip.is-flipped .shop-pm-flip-front.shop-pm-hero {
  position: absolute;
  inset: 0;
  transform: translateX(-18%) scale(0.96);
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;
}
.shop-pm-flip.is-flipped .shop-pm-flip-back {
  position: relative;
  width: 100%;
  transform: translateX(0) scale(1);
  opacity: 1;
  filter: blur(0);
  pointer-events: auto;
}
.shop-pm-flip.is-animating .shop-pm-flip-front.shop-pm-hero,
.shop-pm-flip.is-animating .shop-pm-flip-back {
  pointer-events: none;
}
.shop-pm-flip-back-head {
  flex: 0 0 auto;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flip-accent);
  text-shadow: 0 0 var(--flip-title-glow, 18px) var(--flip-accent-soft);
}
.shop-pm-flip-back-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--flip-panel-border, rgba(224, 138, 46, 0.45)) transparent;
  padding-right: 4px;
}
.shop-pm-desc-flip {
  margin: 0;
  color: #e8edf2;
  font-size: 0.95rem;
  line-height: 1.55;
}

/* Shared chevron glyph */
.shop-pm-flip-chev {
  display: block;
  width: 1em;
  height: 1em;
  line-height: 1;
  font-size: 1.15rem;
  font-weight: 800;
  color: #f4f7fb;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  transition: transform 0.25s ease;
}

/* ===== Edge — straight gradient strip slide (no crescent) ===== */
.shop-pm-flip--edge {
  /* CHANGE: defaults; product settings override via inline CSS vars */
  --edge-strip-idle: 18px;
  --edge-strip-w: 48px;
  --edge-strip-h: 100%;
  --edge-strip-dur: 320ms;
  --edge-strip-ease: cubic-bezier(0.4, 0.08, 0.2, 1);
  --edge-grad-idle: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 28%,
    rgba(12, 16, 22, 0.55) 68%,
    rgba(10, 13, 18, 0.78) 100%
  );
  --edge-grad-hover: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.18) 22%,
    rgba(18, 24, 32, 0.72) 62%,
    rgba(10, 13, 18, 0.92) 100%
  );
  --edge-rim-w: 2px;
  --edge-rim-color: rgba(220, 235, 255, 0.22);
  --edge-rim-seen: rgba(220, 235, 255, 0.1);
  --edge-rim-glow: 0 0 2px rgba(220, 235, 255, 0.14);
  --edge-gleam-w: 2px;
  --edge-gleam-h: 44px;
  --edge-gleam-cycle: 3s;
  --edge-gleam-play: running;
  /* CHANGE: overridable anim names — pass% keyframes must win over defaults. */
  --edge-gleam-anim: shop-pm-edge-gleam;
  --edge-gleam-chev: shop-pm-edge-chev-nudge;
}
.shop-pm-flip--edge .shop-pm-flip-viewport {
  padding-right: 0;
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}
.shop-pm-flip--edge .shop-pm-flip-inner {
  isolation: isolate;
}

/* Stack faces for click turn; hover does not cut the image */
.shop-pm-flip--edge:not(.is-flipped) .shop-pm-flip-back {
  position: absolute !important;
  inset: 0;
  z-index: 0;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: none !important;
  filter: none !important;
}
.shop-pm-flip--edge:not(.is-flipped) .shop-pm-flip-front.shop-pm-hero {
  position: relative !important;
  z-index: 2;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  visibility: visible !important;
  pointer-events: auto;
  -webkit-mask-image: none;
  mask-image: none;
  clip-path: none;
  transition: filter 0.35s ease, opacity 0.4s ease, transform 0.44s cubic-bezier(0.4, 0.05, 0.2, 1);
}
.shop-pm-flip--edge.is-flipped .shop-pm-flip-back {
  position: relative !important;
  z-index: 2;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  visibility: visible !important;
  pointer-events: auto;
  -webkit-mask-image: none;
  mask-image: none;
  clip-path: none;
  /* CHANGE: match hero footprint so nothing peeks under description */
  width: 100%;
  min-height: 100%;
  aspect-ratio: 1 / 1;
  transition: filter 0.35s ease, opacity 0.4s ease, transform 0.44s cubic-bezier(0.4, 0.05, 0.2, 1);
}
.shop-pm-flip--edge.is-flipped .shop-pm-flip-front.shop-pm-hero {
  /* CHANGE: fully hide image under description (was opacity 1 → leak at bottom) */
  position: absolute !important;
  inset: 0;
  z-index: 0;
  opacity: 0 !important;
  transform: none !important;
  filter: none !important;
  visibility: hidden !important;
  pointer-events: none;
}

/* Hit zone — right edge */
.shop-pm-flip-edge {
  appearance: none;
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  height: var(--edge-strip-h, 100%);
  width: calc(var(--edge-strip-w, 48px) + 20px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 8;
  overflow: hidden;
  border-radius: 0 14px 14px 0;
}

/* CHANGE: straight sliding gradient strip — driven by CSS vars from admin */
.shop-pm-flip-edge-strip {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--edge-strip-idle, 18px);
  opacity: 0.55;
  pointer-events: none;
  display: grid;
  place-items: center;
  background: var(--edge-grad-idle);
  transition:
    width var(--edge-strip-dur, 320ms) var(--edge-strip-ease, cubic-bezier(0.4, 0.08, 0.2, 1)),
    opacity var(--edge-strip-dur, 320ms) ease;
}
.shop-pm-flip-edge:hover .shop-pm-flip-edge-strip,
.shop-pm-flip-edge:focus-visible .shop-pm-flip-edge-strip {
  width: var(--edge-strip-w, 48px);
  opacity: 1;
  background: var(--edge-grad-hover);
}
.shop-pm-flip-edge .shop-pm-flip-chev {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(240, 243, 248, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateX(4px);
  transition:
    opacity var(--edge-strip-dur, 320ms) ease,
    transform var(--edge-strip-dur, 320ms) var(--edge-strip-ease, cubic-bezier(0.4, 0.08, 0.2, 1));
  line-height: 1;
}
.shop-pm-flip-edge:hover .shop-pm-flip-chev,
.shop-pm-flip-edge:focus-visible .shop-pm-flip-chev {
  opacity: 0.9;
  transform: translateX(0);
}
.shop-pm-flip-edge:focus { outline: none; }
.shop-pm-flip-edge:focus-visible .shop-pm-flip-edge-strip {
  outline: 2px solid rgba(224, 138, 46, 0.5);
  outline-offset: -2px;
}

/* Click page turn */
.shop-pm-flip--edge.is-turn-to-back .shop-pm-flip-front.shop-pm-hero {
  transform: perspective(900px) rotateY(-78deg) !important;
  opacity: 0 !important;
  filter: blur(0.5px) !important;
  transform-origin: left center;
  transition:
    transform 0.42s cubic-bezier(0.4, 0.05, 0.2, 1),
    opacity 0.38s ease,
    filter 0.38s ease !important;
}
.shop-pm-flip--edge.is-turn-to-front .shop-pm-flip-back {
  transform: perspective(900px) rotateY(78deg) !important;
  opacity: 0 !important;
  filter: blur(0.5px) !important;
  transform-origin: left center;
  transition:
    transform 0.42s cubic-bezier(0.4, 0.05, 0.2, 1),
    opacity 0.38s ease,
    filter 0.38s ease !important;
}
.shop-pm-flip--edge.is-animating .shop-pm-flip-edge-strip {
  opacity: 0 !important;
  width: var(--edge-strip-idle, 18px) !important;
}

/* ===== Edge attention — 1–2px right rim + periodic gleam (idle only) ===== */

/* Permanent hairline on the image's right border only */
.shop-pm-flip--edge:not(.is-flipped) .shop-pm-flip-viewport::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--edge-rim-w, 2px);
  z-index: 9;
  pointer-events: none;
  border-radius: 0 14px 14px 0;
  background: var(--edge-rim-color, rgba(220, 235, 255, 0.22));
  box-shadow: var(--edge-rim-glow, 0 0 2px rgba(220, 235, 255, 0.14));
  opacity: 1;
  transition: opacity 0.22s ease;
}

/* Running gleam — same ~1.5px column, top → bottom, ~3s cycle */
.shop-pm-flip--edge:not(.is-flipped):not(.is-edge-seen) .shop-pm-flip-viewport::before {
  content: "";
  position: absolute;
  top: calc(-1 * var(--edge-gleam-h, 44px));
  right: 0;
  width: var(--edge-gleam-w, var(--edge-rim-w, 2px));
  height: var(--edge-gleam-h, 44px);
  z-index: 10;
  pointer-events: none;
  border-radius: 1px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 28%,
    rgba(255, 255, 255, 0.8) 50%,
    rgba(255, 255, 255, 0.2) 72%,
    transparent 100%
  );
  opacity: 0;
  /* CHANGE: linear so pass% ≈ real travel time (e.g. 50% of 3s = 1.5s full path). */
  animation: var(--edge-gleam-anim, shop-pm-edge-gleam) var(--edge-gleam-cycle, 3s) linear infinite;
  animation-play-state: var(--edge-gleam-play, running);
}

@keyframes shop-pm-edge-gleam {
  0% {
    top: calc(-1 * var(--edge-gleam-h, 44px));
    opacity: 0;
  }
  2% {
    opacity: 1;
  }
  18% {
    top: 100%;
    opacity: 1;
  }
  19%,
  100% {
    top: 100%;
    opacity: 0;
  }
}

/* Idle chevron faintly visible; nudge when gleam runs */
.shop-pm-flip--edge:not(.is-flipped):not(:has(.shop-pm-flip-edge:hover)):not(:has(.shop-pm-flip-edge:focus-visible)) .shop-pm-flip-edge .shop-pm-flip-chev {
  opacity: 0.65;
  transform: translateX(0);
}
.shop-pm-flip--edge:not(.is-flipped):not(.is-edge-seen):not(:has(.shop-pm-flip-edge:hover)):not(:has(.shop-pm-flip-edge:focus-visible)) .shop-pm-flip-edge .shop-pm-flip-chev {
  animation: var(--edge-gleam-chev, shop-pm-edge-chev-nudge) var(--edge-gleam-cycle, 3s) linear infinite;
  animation-play-state: var(--edge-gleam-play, running);
}

@keyframes shop-pm-edge-chev-nudge {
  0%,
  2% {
    transform: translateX(0);
    opacity: 0.65;
  }
  8% {
    transform: translateX(-3px);
    opacity: 1;
  }
  16% {
    transform: translateX(0);
    opacity: 0.65;
  }
  100% {
    transform: translateX(0);
    opacity: 0.65;
  }
}

/* Hover / focus / flip: stop attention immediately; keep existing strip peel */
.shop-pm-flip--edge:has(.shop-pm-flip-edge:hover) .shop-pm-flip-viewport::before,
.shop-pm-flip--edge:has(.shop-pm-flip-edge:focus-visible) .shop-pm-flip-viewport::before,
.shop-pm-flip--edge.is-animating .shop-pm-flip-viewport::before,
.shop-pm-flip--edge.is-flipped .shop-pm-flip-viewport::before,
.shop-pm-flip--edge.is-edge-seen .shop-pm-flip-viewport::before {
  animation: none !important;
  opacity: 0 !important;
  visibility: hidden;
}
/* CHANGE: hide rim line while gradient strip is open; restore on mouse leave */
.shop-pm-flip--edge:has(.shop-pm-flip-edge:hover) .shop-pm-flip-viewport::after,
.shop-pm-flip--edge:has(.shop-pm-flip-edge:focus-visible) .shop-pm-flip-viewport::after,
.shop-pm-flip--edge.is-animating .shop-pm-flip-viewport::after,
.shop-pm-flip--edge.is-flipped .shop-pm-flip-viewport::after {
  opacity: 0;
}
.shop-pm-flip--edge:has(.shop-pm-flip-edge:hover) .shop-pm-flip-edge .shop-pm-flip-chev,
.shop-pm-flip--edge:has(.shop-pm-flip-edge:focus-visible) .shop-pm-flip-edge .shop-pm-flip-chev,
.shop-pm-flip--edge.is-edge-seen .shop-pm-flip-edge .shop-pm-flip-chev {
  animation: none !important;
}

/* After first open: no gleam / no nudge; keep weak rim */
.shop-pm-flip--edge.is-edge-seen:not(.is-flipped) .shop-pm-flip-viewport::after {
  background: var(--edge-rim-seen, rgba(220, 235, 255, 0.1));
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .shop-pm-flip--edge .shop-pm-flip-viewport::before,
  .shop-pm-flip--edge .shop-pm-flip-edge .shop-pm-flip-chev {
    animation: none !important;
  }
}

/* ===== Peel — hover peeks description under curled corner ===== */
.shop-pm-flip--peel .shop-pm-flip-viewport {
  overflow: visible;
}
.shop-pm-flip-peek {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 42%;
  z-index: 1;
  border-radius: 0 0 14px 0;
  overflow: hidden;
  background:
    linear-gradient(145deg, #1a2230 0%, #121820 100%);
  border-top: 1px solid rgba(224, 138, 46, 0.25);
  border-left: 1px solid rgba(224, 138, 46, 0.18);
  opacity: 0;
  transform: translate(8px, 8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  padding: 10px 8px 8px 12px;
  box-sizing: border-box;
}
.shop-pm-flip-peek-text {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.68rem;
  line-height: 1.35;
  color: rgba(232, 237, 242, 0.85);
}
.shop-pm-flip--peel:not(.is-flipped):hover .shop-pm-flip-peek,
.shop-pm-flip--peel:not(.is-flipped):focus-within .shop-pm-flip-peek {
  opacity: 1;
  transform: translate(0, 0);
}
.shop-pm-flip.is-flipped .shop-pm-flip-peek {
  display: none;
}
.shop-pm-flip--peel:not(.is-flipped) .shop-pm-flip-front.shop-pm-hero {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  transition:
    clip-path 0.35s cubic-bezier(0.4, 0.1, 0.2, 1),
    opacity 0.42s cubic-bezier(0.4, 0.1, 0.2, 1),
    transform 0.48s cubic-bezier(0.4, 0.1, 0.2, 1),
    filter 0.42s ease;
}
.shop-pm-flip--peel:not(.is-flipped):hover .shop-pm-flip-front.shop-pm-hero,
.shop-pm-flip--peel:not(.is-flipped):focus-within .shop-pm-flip-front.shop-pm-hero {
  clip-path: polygon(0 0, 100% 0, 100% 62%, 62% 100%, 0 100%);
}
.shop-pm-flip-peel {
  appearance: none;
  position: absolute;
  right: 0;
  bottom: 0;
  width: 78px;
  height: 78px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 7;
}
.shop-pm-flip.is-flipped .shop-pm-flip-peel {
  right: auto;
  left: 0;
  top: 0;
  bottom: auto;
}
.shop-pm-flip-peel-sheet {
  position: absolute;
  inset: 0;
  clip-path: polygon(100% 18%, 100% 100%, 18% 100%);
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.14) 0%,
      rgba(160, 175, 195, 0.2) 18%,
      #2a3340 36%,
      #151b24 62%,
      #0c1016 100%);
  box-shadow:
    -10px -10px 22px rgba(0, 0, 0, 0.5),
    inset 1px 1px 0 rgba(255, 255, 255, 0.12);
  transform-origin: 100% 100%;
  transition: transform 0.35s cubic-bezier(0.4, 0.1, 0.2, 1), box-shadow 0.35s ease;
}
.shop-pm-flip.is-flipped .shop-pm-flip-peel-sheet {
  clip-path: polygon(0 0, 82% 0, 0 82%);
  transform-origin: 0 0;
  box-shadow:
    10px 10px 22px rgba(0, 0, 0, 0.5),
    inset -1px -1px 0 rgba(255, 255, 255, 0.1);
}
.shop-pm-flip--peel:not(.is-flipped):hover .shop-pm-flip-peel-sheet,
.shop-pm-flip--peel:not(.is-flipped):focus-within .shop-pm-flip-peel-sheet {
  transform: rotate(-14deg) translate(6px, 6px) scale(1.06);
  box-shadow:
    -14px -14px 28px rgba(0, 0, 0, 0.55),
    inset 1px 1px 0 rgba(255, 255, 255, 0.16);
}
.shop-pm-flip-peel .shop-pm-flip-chev {
  position: absolute;
  right: 14px;
  bottom: 12px;
  color: var(--flip-accent);
  font-size: 1.1rem;
  filter: drop-shadow(0 0 6px var(--flip-accent-soft));
}
.shop-pm-flip.is-flipped .shop-pm-flip-peel .shop-pm-flip-chev {
  right: auto;
  bottom: auto;
  left: 14px;
  top: 12px;
}
.shop-pm-flip-peel:focus { outline: none; }
.shop-pm-flip-peel:focus-visible {
  outline: 2px solid rgba(240, 162, 74, 0.7);
  outline-offset: 2px;
}

/* ===== Curl — dog-ear page corner ===== */
.shop-pm-flip--curl .shop-pm-flip-viewport {
  overflow: visible;
}
.shop-pm-flip-curl {
  appearance: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 84px;
  height: 84px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 7;
}
.shop-pm-flip.is-flipped .shop-pm-flip-curl {
  top: auto;
  right: auto;
  bottom: 0;
  left: 0;
}
.shop-pm-flip-curl-sheet {
  position: absolute;
  inset: 0;
  clip-path: polygon(28% 0, 100% 0, 100% 72%);
  background:
    linear-gradient(225deg,
      #dfe6f0 0%,
      #9aa6b8 14%,
      #3a4556 34%,
      #1a2230 58%,
      #0e131a 100%);
  box-shadow:
    -8px 10px 20px rgba(0, 0, 0, 0.48),
    inset -2px 2px 0 rgba(255, 255, 255, 0.18);
  transform-origin: 100% 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.2, 0.64, 1), box-shadow 0.3s ease;
}
.shop-pm-flip.is-flipped .shop-pm-flip-curl-sheet {
  clip-path: polygon(0 28%, 0 100%, 72% 100%);
  transform-origin: 0 100%;
  box-shadow:
    8px -10px 20px rgba(0, 0, 0, 0.48),
    inset 2px -2px 0 rgba(255, 255, 255, 0.14);
}
.shop-pm-flip-curl:hover .shop-pm-flip-curl-sheet {
  transform: rotate(10deg) scale(1.05);
  box-shadow:
    -12px 14px 26px rgba(0, 0, 0, 0.55),
    inset -2px 2px 0 rgba(255, 255, 255, 0.22);
}
.shop-pm-flip.is-flipped .shop-pm-flip-curl:hover .shop-pm-flip-curl-sheet {
  transform: rotate(-10deg) scale(1.05);
}
.shop-pm-flip-curl .shop-pm-flip-chev {
  position: absolute;
  top: 16px;
  right: 14px;
  color: #f4f7fb;
}
.shop-pm-flip.is-flipped .shop-pm-flip-curl .shop-pm-flip-chev {
  top: auto;
  right: auto;
  bottom: 16px;
  left: 14px;
}
.shop-pm-flip-curl:focus { outline: none; }
.shop-pm-flip-curl:focus-visible {
  outline: 2px solid rgba(205, 65, 43, 0.55);
  outline-offset: 2px;
}

/* ===== Tab — peeking pull-tab on the right edge, slides out on hover ===== */
.shop-pm-flip--tab .shop-pm-flip-viewport {
  overflow: visible;
}
.shop-pm-flip-tab {
  appearance: none;
  position: absolute;
  top: 50%;
  right: 0;
  width: 12px;
  height: 52px;
  margin: 0;
  padding: 0;
  border: 0;
  transform: translateY(-50%);
  transform-origin: right center;
  background: transparent;
  cursor: pointer;
  z-index: 8;
  transition:
    width 0.28s cubic-bezier(0.34, 1.15, 0.64, 1),
    height 0.28s cubic-bezier(0.34, 1.15, 0.64, 1);
}
.shop-pm-flip-tab:hover,
.shop-pm-flip-tab:focus-visible {
  width: 34px;
  height: 74px;
}
.shop-pm-flip.is-flipped .shop-pm-flip-tab {
  right: auto;
  left: 0;
  transform-origin: left center;
}
.shop-pm-flip-tab-body {
  position: absolute;
  inset: 0;
  border-radius: 16px 0 0 16px;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.22), transparent 40%),
    linear-gradient(180deg,
      #c5cedb 0%,
      #8b96a8 18%,
      #5a6576 42%,
      #3a4556 68%,
      #2a3340 100%);
  border: 1px solid rgba(230, 236, 245, 0.4);
  border-right: 0;
  box-shadow:
    -4px 0 14px rgba(0, 0, 0, 0.35),
    inset 1px 0 0 rgba(255, 255, 255, 0.28),
    inset 0 -3px 6px rgba(0, 0, 0, 0.28);
  transition: box-shadow 0.22s ease, filter 0.2s ease;
}
.shop-pm-flip-tab:hover .shop-pm-flip-tab-body,
.shop-pm-flip-tab:focus-visible .shop-pm-flip-tab-body {
  filter: brightness(1.08);
  box-shadow:
    -8px 0 20px rgba(0, 0, 0, 0.42),
    inset 1px 0 0 rgba(255, 255, 255, 0.35),
    inset 0 -3px 6px rgba(0, 0, 0, 0.28);
}
.shop-pm-flip-tab-body::before,
.shop-pm-flip-tab-body::after {
  content: "";
  position: absolute;
  left: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  opacity: 0;
  background: radial-gradient(circle at 30% 30%, #e8edf2, #6a7382 55%, #1a2230);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.5), 0 1px 1px rgba(0, 0, 0, 0.4);
  transition: opacity 0.18s ease;
}
.shop-pm-flip-tab-body::before { top: 12px; }
.shop-pm-flip-tab-body::after { bottom: 12px; }
.shop-pm-flip-tab:hover .shop-pm-flip-tab-body::before,
.shop-pm-flip-tab:hover .shop-pm-flip-tab-body::after,
.shop-pm-flip-tab:focus-visible .shop-pm-flip-tab-body::before,
.shop-pm-flip-tab:focus-visible .shop-pm-flip-tab-body::after {
  opacity: 1;
}
.shop-pm-flip.is-flipped .shop-pm-flip-tab-body {
  border-radius: 0 16px 16px 0;
  border-right: 1px solid rgba(230, 236, 245, 0.4);
  border-left: 0;
  background:
    linear-gradient(270deg, rgba(0, 0, 0, 0.22), transparent 40%),
    linear-gradient(180deg,
      #c5cedb 0%,
      #8b96a8 18%,
      #5a6576 42%,
      #3a4556 68%,
      #2a3340 100%);
  box-shadow:
    4px 0 14px rgba(0, 0, 0, 0.35),
    inset -1px 0 0 rgba(255, 255, 255, 0.28),
    inset 0 -3px 6px rgba(0, 0, 0, 0.28);
}
.shop-pm-flip.is-flipped .shop-pm-flip-tab-body::before,
.shop-pm-flip.is-flipped .shop-pm-flip-tab-body::after {
  left: auto;
  right: 8px;
}
.shop-pm-flip-tab .shop-pm-flip-chev {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateX(4px);
  font-size: 1.05rem;
  color: #f2f5fa;
  opacity: 0;
  z-index: 1;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.45));
  transition: opacity 0.18s ease, transform 0.22s ease;
}
.shop-pm-flip-tab:hover .shop-pm-flip-chev,
.shop-pm-flip-tab:focus-visible .shop-pm-flip-chev {
  opacity: 1;
  transform: translate(-50%, -50%) translateX(0);
}
.shop-pm-flip.is-flipped .shop-pm-flip-tab .shop-pm-flip-chev {
  transform: translate(-50%, -50%) translateX(-4px);
}
.shop-pm-flip.is-flipped .shop-pm-flip-tab:hover .shop-pm-flip-chev,
.shop-pm-flip.is-flipped .shop-pm-flip-tab:focus-visible .shop-pm-flip-chev {
  transform: translate(-50%, -50%) translateX(0);
}
.shop-pm-flip-tab:focus { outline: none; }
.shop-pm-flip-tab:focus-visible .shop-pm-flip-tab-body {
  box-shadow: 0 0 0 2px rgba(205, 65, 43, 0.55);
}

/* CHANGE: Float — idle glowing circle, hover inward D-bump; driven by --float-* vars. */
.shop-pm-flip-float {
  appearance: none;
  position: absolute;
  top: 50%;
  right: 0;
  width: var(--float-hit-w, 40px);
  height: var(--float-hit-h, 56px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 8;
  transform: translateY(calc(-50% + var(--float-offset-y, 0px)));
  transform-origin: right center;
  transition:
    width var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1)),
    height var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1));
}
.shop-pm-flip-float:hover,
.shop-pm-flip-float:focus-visible {
  width: var(--float-hover-w, 46px);
  height: var(--float-hover-h, 100px);
}
/* CHANGE: Float stays on the right over description so it does not cover the title. */
.shop-pm-flip-float-body {
  position: absolute;
  top: 50%;
  right: var(--float-idle-inset, 8px);
  width: var(--float-idle-size, 20px);
  height: var(--float-idle-size, 20px);
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, var(--float-idle-hi, rgba(255, 255, 255, 0.42)), transparent 52%),
    var(--float-idle-fill, rgba(224, 138, 46, 0.38));
  border: var(--float-idle-border, 1px solid rgba(224, 138, 46, 0.62));
  box-shadow: var(--float-idle-shadow, 0 0 10px rgba(224, 138, 46, 0.55), 0 0 22px rgba(224, 138, 46, 0.28));
  animation: shop-pm-float-pulse var(--float-pulse-dur, 2400ms) ease-in-out infinite;
  animation-play-state: var(--float-pulse-play, running);
  transition:
    width var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1)),
    height var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1)),
    right var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1)),
    left var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1)),
    border-radius var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1)),
    background var(--float-dur, 220ms) ease,
    box-shadow var(--float-dur, 220ms) ease,
    border-color var(--float-dur, 220ms) ease,
    filter var(--float-dur, 220ms) ease;
}
.shop-pm-flip-float:hover .shop-pm-flip-float-body,
.shop-pm-flip-float:focus-visible .shop-pm-flip-float-body {
  right: var(--float-hover-inset, 0px);
  width: var(--float-hover-w, 46px);
  height: var(--float-hover-h, 100px);
  border-radius: var(--float-round, 50px) 0 0 var(--float-round, 50px);
  background:
    radial-gradient(ellipse at 28% 50%, var(--float-hover-hi, rgba(255, 255, 255, 0.22)), transparent 58%),
    var(--float-hover-fill, rgba(224, 138, 46, 0.48));
  border: var(--float-hover-border, 1px solid rgba(224, 138, 46, 0.62));
  box-shadow: var(--float-hover-shadow, 0 0 16px rgba(224, 138, 46, 0.4));
  animation: none;
  filter: none;
}
.shop-pm-flip-float .shop-pm-flip-chev {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--float-chev-size, 17px);
  color: var(--float-chev-color, #fff);
  opacity: 0;
  z-index: 1;
  filter: drop-shadow(0 0 6px var(--float-idle-fill, rgba(224, 138, 46, 0.55)));
  transition: opacity 0.18s ease, left var(--float-dur, 280ms) ease;
  pointer-events: none;
}
.shop-pm-flip-float:hover .shop-pm-flip-chev,
.shop-pm-flip-float:focus-visible .shop-pm-flip-chev {
  opacity: var(--float-chev-op, 1);
  left: var(--float-chev-x, 38%);
}
.shop-pm-flip-float:focus { outline: none; }
.shop-pm-flip-float:focus-visible .shop-pm-flip-float-body {
  box-shadow:
    0 0 0 2px rgba(205, 65, 43, 0.55),
    var(--float-hover-shadow, 0 0 16px rgba(224, 138, 46, 0.4));
}
.shop-pm-flip.is-flipped .shop-pm-flip-float .shop-pm-flip-float-body {
  animation: none;
}
@keyframes shop-pm-float-pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(var(--float-pulse-bright, 1.18)); }
}

/* Admin tip extras for Curl / Tab / Float */
.dft-curl {
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  background: linear-gradient(225deg, #3a4452, #121820);
  clip-path: polygon(35% 0, 100% 0, 100% 65%);
  display: grid;
  place-items: start end;
  padding: 6px 8px 0 0;
  box-sizing: border-box;
}
.dft-tab {
  position: absolute;
  top: 50%;
  right: 0;
  width: 7px;
  height: 22px;
  transform: translateY(-50%);
  border-radius: 8px 0 0 8px;
  background: linear-gradient(180deg, #8b96a8, #3a4452);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-right: 0;
  display: grid;
  place-items: center;
  transition: width 0.28s ease, height 0.28s ease;
}
.dft-tab .dft-chev {
  opacity: 0;
  font-size: 0.7rem;
  color: #f0f3f8;
  transition: opacity 0.18s ease;
}
.desc-flip-style-btn[data-flip-preview="tab"]:hover .dft-tab,
.desc-flip-style-btn[data-flip-preview="tab"]:focus-within .dft-tab {
  width: 18px;
  height: 32px;
}
.desc-flip-style-btn[data-flip-preview="tab"]:hover .dft-tab .dft-chev,
.desc-flip-style-btn[data-flip-preview="tab"]:focus-within .dft-tab .dft-chev {
  opacity: 1;
}
.dft-float {
  position: absolute;
  top: 50%;
  right: 6px;
  width: 10px;
  height: 10px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: color-mix(in srgb, #e08a2e 45%, transparent);
  border: 1px solid color-mix(in srgb, #e08a2e 70%, transparent);
  box-shadow: 0 0 8px rgba(224, 138, 46, 0.55);
  display: grid;
  place-items: center;
  transition: width 0.28s ease, height 0.28s ease, right 0.28s ease, border-radius 0.28s ease;
}
.dft-float .dft-chev {
  opacity: 0;
  font-size: 0.65rem;
  color: #fff;
  transition: opacity 0.18s ease;
}
.desc-flip-style-btn[data-flip-preview="float"]:hover .dft-float,
.desc-flip-style-btn[data-flip-preview="float"]:focus-within .dft-float {
  right: 0;
  width: 18px;
  height: 36px;
  border-radius: 18px 0 0 18px;
}
.desc-flip-style-btn[data-flip-preview="float"]:hover .dft-float .dft-chev,
.desc-flip-style-btn[data-flip-preview="float"]:focus-within .dft-float .dft-chev {
  opacity: 1;
}
.desc-flip-style-toggle {
  margin-top: 6px;
  flex-wrap: wrap;
  align-items: center;
}
.desc-flip-settings-btn {
  display: inline-grid;
  place-items: center;
  padding: 7px 10px;
  color: var(--muted);
}
.desc-flip-settings-btn:hover {
  color: var(--text);
}
.desc-flip-settings-btn svg {
  display: block;
}

/* CHANGE: flip settings modal tabs + Edge preview */
.flip-set-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.flip-set-tab {
  appearance: none;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  border-radius: 8px;
  padding: 6px 12px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
}
.flip-set-tab:hover { color: var(--text); }
.flip-set-tab.active {
  color: #fff;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
  border-color: transparent;
}
.flip-set-grid {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 640px) {
  .flip-set-grid { grid-template-columns: 1fr; }
}
.flip-set-preview-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #121820;
  --edge-strip-idle: 14px;
  --edge-strip-w: 40px;
  --edge-strip-h: 100%;
  --edge-strip-dur: 320ms;
  --edge-strip-ease: cubic-bezier(0.4, 0.08, 0.2, 1);
  --edge-rim-w: 2px;
  --edge-rim-color: rgba(220, 235, 255, 0.22);
  --edge-rim-glow: 0 0 2px rgba(220, 235, 255, 0.14);
}
.flip-set-preview-card::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--edge-rim-w, 2px);
  background: var(--edge-rim-color);
  box-shadow: var(--edge-rim-glow);
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.2s ease;
}
.flip-set-preview-card:hover::after {
  opacity: 0;
}
.flip-set-preview-img {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 40% 40%, #3a4a62 0%, transparent 55%),
    linear-gradient(160deg, #2a3344, #121820);
}
.flip-set-preview-strip {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  height: var(--edge-strip-h, 100%);
  width: var(--edge-strip-idle, 14px);
  display: grid;
  place-items: center;
  color: #f0f3f8;
  font-weight: 700;
  background: var(--edge-grad-idle, linear-gradient(90deg, transparent, #0a0d12));
  transition:
    width var(--edge-strip-dur, 320ms) var(--edge-strip-ease),
    background var(--edge-strip-dur, 320ms) ease;
  pointer-events: none;
}
.flip-set-preview-card:hover .flip-set-preview-strip {
  width: var(--edge-strip-w, 40px);
  background: var(--edge-grad-hover, linear-gradient(90deg, transparent, #0a0d12));
}
.flip-set-preview-card[data-float-preview]::after,
.flip-set-preview-card[data-float-preview]::before {
  display: none;
}
.flip-set-preview-card[data-float-preview] {
  overflow: hidden;
}
.flip-set-preview-float {
  appearance: none;
  position: absolute;
  top: 50%;
  right: 0;
  width: var(--float-hit-w, 40px);
  height: var(--float-hit-h, 56px);
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: default;
  transform: translateY(calc(-50% + var(--float-offset-y, 0px)));
  z-index: 5;
  transition:
    width var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1)),
    height var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1));
}
.flip-set-preview-card[data-float-preview]:hover .flip-set-preview-float {
  width: var(--float-hover-w, 46px);
  height: var(--float-hover-h, 100px);
}
.flip-set-preview-float-body {
  position: absolute;
  top: 50%;
  right: var(--float-idle-inset, 8px);
  width: var(--float-idle-size, 20px);
  height: var(--float-idle-size, 20px);
  transform: translateY(-50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, var(--float-idle-hi, rgba(255, 255, 255, 0.42)), transparent 52%),
    var(--float-idle-fill, rgba(224, 138, 46, 0.38));
  border: var(--float-idle-border, 1px solid rgba(224, 138, 46, 0.62));
  box-shadow: var(--float-idle-shadow, 0 0 10px rgba(224, 138, 46, 0.55));
  animation: shop-pm-float-pulse var(--float-pulse-dur, 2400ms) ease-in-out infinite;
  animation-play-state: var(--float-pulse-play, running);
  pointer-events: none;
  transition:
    width var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1)),
    height var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1)),
    right var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1)),
    border-radius var(--float-dur, 320ms) var(--float-ease, cubic-bezier(0.34, 1.12, 0.64, 1)),
    background 0.22s ease,
    box-shadow 0.22s ease;
}
.flip-set-preview-card[data-float-preview]:hover .flip-set-preview-float-body {
  right: var(--float-hover-inset, 0px);
  width: var(--float-hover-w, 46px);
  height: var(--float-hover-h, 100px);
  border-radius: var(--float-round, 50px) 0 0 var(--float-round, 50px);
  background:
    radial-gradient(ellipse at 28% 50%, var(--float-hover-hi, rgba(255, 255, 255, 0.22)), transparent 58%),
    var(--float-hover-fill, rgba(224, 138, 46, 0.48));
  border: var(--float-hover-border, 1px solid rgba(224, 138, 46, 0.62));
  box-shadow: var(--float-hover-shadow, 0 0 16px rgba(224, 138, 46, 0.4));
  animation: none;
  filter: none;
}
.flip-set-preview-float-chev {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--float-chev-size, 17px);
  color: var(--float-chev-color, #fff);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, left var(--float-dur, 280ms) ease;
}
.flip-set-preview-card[data-float-preview]:hover .flip-set-preview-float-chev {
  opacity: var(--float-chev-op, 1);
  left: var(--float-chev-x, 38%);
}
.flip-set-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
/* CHANGE: preview stays put; only the settings column scrolls. */
#modal-flip-settings .admin-modal-card {
  display: flex;
  flex-direction: column;
  max-height: min(88vh, 860px);
}
#modal-flip-settings .admin-modal-head,
#modal-flip-settings .admin-modal-foot {
  flex: 0 0 auto;
}
#modal-flip-settings .admin-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#modal-flip-settings .flip-set-tabs {
  flex: 0 0 auto;
}
#modal-flip-settings .flip-set-pane {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#modal-flip-settings .flip-set-pane[hidden] {
  display: none !important;
}
#modal-flip-settings .flip-set-grid {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  align-items: stretch;
}
#modal-flip-settings .flip-set-preview {
  position: sticky;
  top: 0;
  align-self: start;
}
#modal-flip-settings .flip-set-fields {
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 6px;
  scrollbar-width: thin;
}
@media (max-width: 640px) {
  #modal-flip-settings .flip-set-pane {
    overflow-y: auto;
  }
  #modal-flip-settings .flip-set-preview {
    z-index: 3;
    background: var(--panel);
    padding-bottom: 8px;
  }
  #modal-flip-settings .flip-set-fields {
    overflow: visible;
    max-height: none;
  }
}
.flip-set-fields {
  display: grid;
  gap: 10px;
}
.flip-set-fields .tiny {
  font-size: 0.78rem;
}
.flip-set-fields label {
  display: grid;
  gap: 4px;
  font-size: 0.86rem;
  color: var(--muted);
}
.flip-set-fields input[type="number"],
.flip-set-fields select {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #121820;
  color: var(--text);
  font: inherit;
}
.flip-set-fields input[type="range"] {
  width: 100%;
}
.flip-set-colors {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.flip-set-colors legend {
  padding: 0 6px;
  font-size: 0.82rem;
  color: var(--muted);
}
.flip-set-color-row {
  display: grid !important;
  grid-template-columns: 72px 44px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.flip-set-preview-panel {
  min-height: 168px;
  width: 100%;
  box-sizing: border-box;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 12px;
  border: 1px solid var(--flip-panel-border, rgba(224, 138, 46, 0.28));
  background:
    radial-gradient(ellipse at 20% 0%, var(--flip-panel-glow, rgba(224, 138, 46, 0.12)), transparent 55%),
    linear-gradient(165deg, #1e2633 0%, #141a22 48%, #10151c 100%);
}
.flip-set-preview-panel-head {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--flip-accent, #e08a2e);
  text-shadow: 0 0 var(--flip-title-glow, 18px) var(--flip-accent-soft, rgba(224, 138, 46, 0.35));
}
.flip-set-preview-panel-body {
  color: #e8edf2;
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-line;
}
.flip-set-color-row input[type="color"] {
  width: 40px;
  height: 28px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.desc-flip-style-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.desc-flip-style-btn .desc-flip-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(4px);
  width: 220px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #121820;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 40;
}
.desc-flip-style-btn:hover .desc-flip-tip,
.desc-flip-style-btn:focus-within .desc-flip-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.desc-flip-tip-title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.dft-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1.35;
  border-radius: 10px;
  overflow: hidden;
  background: #1a2230;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.dft-img {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 40% 40%, #3a4a62 0%, transparent 55%),
    linear-gradient(160deg, #2a3344, #121820);
}
.dft-edge {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 6px;
  opacity: 0.45;
  background: linear-gradient(90deg, transparent, rgba(10, 13, 18, 0.85));
  display: grid;
  place-items: center;
  transition: width 0.3s ease, opacity 0.2s ease;
}
.desc-flip-style-btn[data-flip-preview="edge"]:hover .dft-edge,
.desc-flip-style-btn[data-flip-preview="edge"]:focus-within .dft-edge {
  width: 22px;
  opacity: 1;
}
.desc-flip-style-btn[data-flip-preview="edge"]:hover .dft-img,
.desc-flip-style-btn[data-flip-preview="edge"]:focus-within .dft-img {
  -webkit-mask-image: none;
  mask-image: none;
  clip-path: none;
}
.dft-peel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, transparent 40%, #0f1318 41%);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.dft-card.is-peeling .dft-img {
  clip-path: polygon(0 0, 100% 0, 100% 68%, 68% 100%, 0 100%);
}
.dft-back-peek {
  position: absolute;
  right: 4px;
  bottom: 4px;
  font-size: 0.62rem;
  color: #f0a24a;
  z-index: 0;
}
.dft-chev {
  color: #e8edf2;
  font-weight: 800;
  font-size: 0.95rem;
}
.dft-caption {
  display: block;
  margin-top: 8px;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
}
.shop-pm-hero img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}
/* CHANGE: custom upload — fill hero edge-to-edge (no padding) */
.shop-pm-hero.is-bleed {
  padding: 0;
  background: #161c24;
}
.shop-pm-hero.is-bleed img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
}
.shop-pm-hero-ph {
  font-size: 4rem;
  font-weight: 800;
  color: rgba(158, 196, 255, 0.4);
}
.shop-pm-sale {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #1a9e5a;
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
}
.shop-pm-desc {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}
.shop-pm-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.shop-pm-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  font-size: 0.88rem;
  background: var(--input);
}
.shop-pm-meta-row:nth-child(even) {
  background: #151b24;
}
.shop-pm-meta-row span {
  color: var(--muted);
}
.shop-pm-meta-row strong {
  font-weight: 650;
  text-align: right;
}
.shop-pm-section-label {
  margin: 4px 0 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
/* CHANGE: Bundle entry groups — tabs like kit modal */
.shop-pm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  background: rgba(17, 22, 29, 0.75);
  border-radius: 12px;
  padding: 4px;
}
.shop-pm-tab {
  appearance: none;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: var(--muted);
  font: inherit;
}
.shop-pm-tab.active {
  background: rgba(205, 65, 43, 0.35);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(205, 65, 43, 0.7);
}
.shop-pm-tab-title { font-weight: 650; font-size: 0.9rem; }
.shop-pm-tab-sub { font-size: 0.75rem; opacity: 0.75; }
.shop-pm-panels { margin-bottom: 4px; }
.shop-pm-panel[hidden] { display: none !important; }
.shop-pm-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
/* CHANGE: composition tiles match kit grid — square, amount bottom-right */
.shop-pm-item {
  position: relative;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 10px;
  background: #121820;
  border: 1px solid var(--border);
  min-height: 0;
}
/* CHANGE: Choice variants — clickable pick tiles */
button.shop-pm-choice-opt {
  appearance: none;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
button.shop-pm-choice-opt:hover {
  border-color: rgba(205, 65, 43, 0.55);
  background: #151d28;
}
button.shop-pm-choice-opt.is-selected {
  border-color: var(--accent, #CD412B);
  box-shadow: 0 0 0 2px rgba(205, 65, 43, 0.35);
  background: #1a2740;
}
button.shop-pm-choice-opt:focus {
  outline: none;
}
button.shop-pm-choice-opt:focus-visible {
  outline: none;
  border-color: var(--accent, #CD412B);
  box-shadow: 0 0 0 2px rgba(205, 65, 43, 0.35);
}
.shop-pm-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.shop-pm-item-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: rgba(158, 196, 255, 0.45);
  font-size: 1.2rem;
}
.shop-pm-item-amount {
  position: absolute;
  right: 4px;
  bottom: 3px;
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.shop-pm-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: color-mix(in srgb, var(--panel) 80%, #0a0e14);
}
.shop-pm-qty-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--input);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--text);
}
.shop-pm-qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--input);
  overflow: hidden;
}
.shop-pm-qty-btn {
  appearance: none;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.shop-pm-qty-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
}
.shop-pm-qty-btn:disabled {
  opacity: 0.35;
  cursor: default;
}
.shop-pm-qty-val {
  min-width: 72px;
  padding: 0 8px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  line-height: 36px;
  color: var(--text);
}
.shop-pm-buy-form {
  display: flex;
  flex: 1 1 200px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}
.shop-pm-choice {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 220px;
  width: auto;
  margin: 0;
  /* dark fill + chevron come from shared .shop-pm-choice rules above */
}
.shop-pm-buy {
  flex: 1 1 auto;
  min-width: 160px;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
}
.shop-pm-buy-old {
  text-decoration: line-through;
  opacity: 0.55;
  font-weight: 600;
  font-size: 0.85em;
  margin-right: 4px;
}

@media (max-width: 520px) {
  .shop-pm-items { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-pm-buy-form { width: 100%; margin-left: 0; }
  .shop-pm-buy { width: 100%; }
}

.topup-layout,
.support-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  align-items: start;
}

@media (max-width: 800px) {
  .topup-layout,
  .support-layout {
    grid-template-columns: 1fr;
  }
}

.ticket-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ticket-list a {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
}

.ticket-list a:hover {
  border-color: rgba(205, 65, 43, 0.5);
  text-decoration: none;
}

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-msg {
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--panel);
}

.ticket-msg.staff {
  border-color: rgba(205, 65, 43, 0.4);
  background: rgba(205, 65, 43, 0.08);
}

.ticket-msg-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.ticket-msg-body {
  white-space: pre-wrap;
  line-height: 1.45;
}

/* ?? Profile (BloodRust-inspired) ?? */
/* CHANGE: profile stays compact ? not full storefront width */
.profile-page { max-width: var(--content-max); }
.support-page { max-width: var(--content-max); }

.profile-hero {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  background: var(--panel);
  margin-bottom: 14px;
}

.profile-hero-banner {
  height: 140px;
  background: linear-gradient(120deg, var(--panel-alt), var(--navy) 55%, #3a221c);
  background-size: cover;
  background-position: center;
}

.profile-hero-body {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  padding: 0 18px 16px;
  margin-top: -48px;
  position: relative;
}

.profile-hero-avatar {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  border: 3px solid #0f1318;
  object-fit: cover;
  background: #1a2230;
}

.profile-hero-meta {
  flex: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding-bottom: 4px;
}

.profile-hero-name {
  margin: 0;
  font-size: 1.45rem;
}

.profile-hero-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.steam-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #1b2838;
  border: 1px solid #3a5a7a;
  font-size: 0.85rem;
  font-weight: 650;
}

.profile-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #151a22;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.profile-tab {
  padding: 8px 16px;
  border-radius: 999px;
  color: var(--muted, #8a96a8);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.92rem;
}

.profile-tab:hover { text-decoration: none; color: #eef5ff; }

.profile-tab.active {
  background: #2a3340;
  color: #fff;
}

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 16px;
}

.profile-balance-value {
  font-size: 2rem;
  font-weight: 800;
  margin: 6px 0 12px;
  font-variant-numeric: tabular-nums;
}

.profile-balance-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.promo-inline {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.promo-inline input {
  flex: 1;
  min-width: 140px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.price-neg { color: #e08a7a; font-weight: 650; }

.server-card.preferred {
  border-color: rgba(205, 65, 43, 0.55);
  box-shadow: inset 0 0 0 1px rgba(205, 65, 43, 0.2);
}

.server-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.server-card-head h3 { margin: 0; }

.status-dot {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 8px;
  border-radius: 999px;
}

.status-dot.on {
  background: rgba(46, 160, 90, 0.18);
  color: #7ddea4;
  border: 1px solid rgba(46, 160, 90, 0.35);
}

.status-dot.off {
  background: rgba(120, 80, 80, 0.2);
  color: #d9a0a0;
  border: 1px solid rgba(160, 90, 90, 0.3);
}

/* CHANGE: color-only online LED (public cards / list). */
.svc-led {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  z-index: 1;
}

.svc-led.on {
  background: #3ecf7a;
  box-shadow: 0 0 8px rgba(62, 207, 122, 0.75);
  border-color: rgba(180, 255, 210, 0.35);
}

.svc-led.off {
  background: #5a6574;
  box-shadow: none;
  border-color: rgba(0, 0, 0, 0.25);
}

.svc-led.static {
  position: static;
  display: inline-block;
  vertical-align: middle;
}

.ticket-chip { border-color: rgba(205, 65, 43, 0.45); }

/* CHANGE: support uses full storefront width with hub-store. */
.support-page { max-width: var(--content-max); }

.ticket-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  border: 1px solid var(--border);
  color: var(--muted);
}

.ticket-status.open {
  color: #7ddea4;
  border-color: rgba(46, 160, 90, 0.35);
  background: rgba(46, 160, 90, 0.12);
}

.ticket-status.answered {
  color: #8ec0f0;
  border-color: rgba(205, 65, 43, 0.4);
  background: rgba(205, 65, 43, 0.14);
}

.ticket-status.closed {
  color: #9aa6b4;
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.ticket-agent {
  font-weight: 550;
  color: var(--muted);
}

.btn-danger {
  border-color: rgba(184, 58, 50, 0.55);
  background: rgba(184, 58, 50, 0.22);
  color: #f0b0aa;
}

.btn-danger:hover {
  background: rgba(184, 58, 50, 0.38);
  border-color: rgba(184, 58, 50, 0.75);
  color: #fff;
  text-decoration: none;
}

.close-resolution-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.close-res-pill {
  display: inline-flex;
  cursor: pointer;
  margin: 0;
}

.close-res-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.close-res-pill span {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  font-size: 0.9rem;
}

.close-res-pill input:checked + span {
  border-color: var(--accent);
  background: rgba(205, 65, 43, 0.18);
  color: #fff;
}

.star-rating {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.star-rating .star {
  border: 0;
  background: transparent;
  color: #3a4554;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.star-rating.readonly .star {
  cursor: default;
}

.star-rating .star.on {
  color: #f0c14b;
}

.ticket-feedback-summary {
  padding: 14px 16px;
}

.ticket-feedback-card {
  padding: 14px 16px;
}

.ticket-feedback-card-head {
  font-weight: 700;
  margin-bottom: 4px;
}

.feedback-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.feedback-pill.resolved {
  color: #7ddea4;
  border-color: rgba(46, 160, 90, 0.4);
  background: rgba(46, 160, 90, 0.12);
}

.feedback-pill.notresolved {
  color: #f0b0aa;
  border-color: rgba(184, 58, 50, 0.4);
  background: rgba(184, 58, 50, 0.12);
}

.feedback-pill.unsure {
  color: #e0c56e;
  border-color: rgba(200, 160, 40, 0.4);
  background: rgba(200, 160, 40, 0.12);
}

.feedback-pill.skip {
  color: #9aa6b4;
  background: rgba(255, 255, 255, 0.04);
}

.feedback-pill.staff {
  color: #8ec0f0;
  border-color: rgba(205, 65, 43, 0.35);
  background: rgba(205, 65, 43, 0.1);
}

.star-rating.tiny-stars .star {
  font-size: 0.95rem;
}

.staff-stats-grid {
  margin-top: 8px;
}

.staff-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 4px 0;
}

.staff-stat-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  font-size: 0.9rem;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 12px;
}

.perm-grid .admin-check {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--input);
}

.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ticket-msg {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.ticket-msg.staff {
  border-color: rgba(205, 65, 43, 0.4);
  background: linear-gradient(180deg, #1a2432, var(--panel));
}

.ticket-msg-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.ticket-msg-body {
  white-space: pre-wrap;
  line-height: 1.45;
}

.avatar-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  border: 2px solid #0f1318;
}

.profile-avatar-btn { position: relative; }

/* ?? Server detail page ?? */
.server-detail {
  --sd-accent: var(--accent);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sd-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.sd-head-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.sd-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.sd-orb {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 42%), var(--sd-accent);
  box-shadow: 0 0 18px color-mix(in srgb, var(--sd-accent) 45%, transparent);
  flex-shrink: 0;
}

.sd-title {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
}

.sd-online-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.sd-play { min-width: 110px; }

.sd-capacity { margin-top: 2px; }

.sd-bar {
  display: flex;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: #1a222d;
  border: 1px solid var(--border);
}

.sd-bar-online { background: #3dba6e; height: 100%; }
.sd-bar-reserved { background: #d4a017; height: 100%; }

.sd-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.sd-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.sd-dot.online { background: #3dba6e; }
.sd-dot.reserved { background: #d4a017; }

.sd-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sd-tab {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.sd-tab:hover { color: var(--text); text-decoration: none; border-color: rgba(205, 65, 43, 0.4); }
.sd-tab.active {
  color: var(--text);
  background: rgba(205, 65, 43, 0.18);
  border-color: rgba(205, 65, 43, 0.5);
}

.sd-panel { padding: 18px; }

.sd-desc { margin: 0 0 14px; line-height: 1.5; white-space: pre-wrap; }

.sd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-bottom: 16px;
}

.sd-accent { color: color-mix(in srgb, var(--sd-accent) 70%, white); }

.sd-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.sd-stat {
  padding: 12px 14px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--panel-alt);
}

.sd-stat:nth-child(4n) { border-right: 0; }
.sd-stat-label { font-size: 0.78rem; color: var(--muted); margin-bottom: 4px; }
.sd-stat-value { font-weight: 700; font-size: 1.02rem; }

/* CHANGE: per-stat highlight color / gradient / glow */
.sd-stat-hi-solid {
  color: color-mix(in srgb, var(--hi, var(--sd-accent)) 78%, white);
}
.sd-stat-hi-gradient {
  background: linear-gradient(90deg, var(--hi, var(--sd-accent)), var(--hi2, #7EB6FF));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.sd-stat-hi-glow {
  color: color-mix(in srgb, var(--hi, var(--sd-accent)) 70%, white);
  text-shadow:
    0 0 10px color-mix(in srgb, var(--hi, var(--sd-accent)) 55%, transparent),
    0 0 22px color-mix(in srgb, var(--hi, var(--sd-accent)) 35%, transparent);
}

/* CHANGE: admin checkbox style B ? soft square + glow */
.admin-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 2px 0;
  cursor: pointer;
  user-select: none;
  font-size: 0.92rem;
  vertical-align: middle;
  width: auto;
  max-width: 100%;
  box-sizing: border-box;
}
.admin-check input[type="checkbox"],
.admin-check input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  pointer-events: none;
  clip: rect(0, 0, 0, 0);
}
.admin-check-box {
  display: block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #12171f;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.12s ease, background 0.12s ease, box-shadow 0.12s ease;
}
.admin-check:hover .admin-check-box {
  border-color: rgba(205, 65, 43, 0.45);
}
.admin-check input[type="checkbox"]:checked + .admin-check-box,
.admin-check input[type="radio"]:checked + .admin-check-box,
.admin-check input[type="checkbox"]:checked ~ .admin-check-box,
.admin-check input[type="radio"]:checked ~ .admin-check-box {
  border-color: rgba(205, 65, 43, 0.9);
  background: var(--accent, #CD412B);
  box-shadow:
    0 0 0 1px rgba(205, 65, 43, 0.35),
    0 0 12px color-mix(in srgb, var(--accent, #CD412B) 55%, transparent);
}
.admin-check input[type="checkbox"]:checked + .admin-check-box::after,
.admin-check input[type="radio"]:checked + .admin-check-box::after,
.admin-check input[type="checkbox"]:checked ~ .admin-check-box::after,
.admin-check input[type="radio"]:checked ~ .admin-check-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}
.admin-check input[type="checkbox"]:focus-visible + .admin-check-box,
.admin-check input[type="radio"]:focus-visible + .admin-check-box,
.admin-check input[type="checkbox"]:focus-visible ~ .admin-check-box,
.admin-check input[type="radio"]:focus-visible ~ .admin-check-box {
  outline: 2px solid color-mix(in srgb, var(--accent, #CD412B) 70%, white);
  outline-offset: 2px;
}
.admin-check-text {
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}
.admin-check.compact {
  padding: 0;
}
.admin-check.compact .admin-check-text {
  flex: 0;
}
td .admin-check,
th .admin-check {
  display: inline-flex;
  justify-content: center;
}

.stat-hi-swatch {
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  vertical-align: middle;
  margin-right: 6px;
  border: 1px solid var(--border);
  background: var(--hi, var(--accent));
}
.stat-hi-swatch[data-effect="Gradient"] {
  background: linear-gradient(135deg, var(--hi, var(--accent)), var(--hi2, #7EB6FF));
}
.stat-hi-swatch[data-effect="Glow"] {
  box-shadow: 0 0 8px color-mix(in srgb, var(--hi, var(--accent)) 70%, transparent);
}

.stat-hi-controls { display: block; }
.stat-hi-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.stat-hi-pick {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #12171f;
  flex-shrink: 0;
}
.stat-hi-pick input[type="color"] {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
}
.stat-hi-row select {
  min-width: 120px;
  margin: 0;
  height: 38px;
}

.sd-map { display: flex; flex-direction: column; gap: 10px; }
.sd-map-frame {
  width: 100%;
  min-height: 420px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0c1016;
}

.sd-section-title { margin: 0 0 8px; }
.sd-wipe-group { margin-top: 18px; }
.sd-wipe-title { margin: 0 0 10px; font-size: 1rem; }

.sd-wipe-group .sd-item-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sd-wipe-group.sd-align-left { text-align: left; }
.sd-wipe-group.sd-align-left .sd-item-grid { justify-content: flex-start; }

.sd-wipe-group.sd-align-center { text-align: center; }
.sd-wipe-group.sd-align-center .sd-item-grid { justify-content: center; }

.sd-wipe-group.sd-align-right { text-align: right; }
.sd-wipe-group.sd-align-right .sd-item-grid { justify-content: flex-end; }

.sd-wipe-group .sd-item-card {
  width: 72px;
  flex: 0 0 72px;
}

.sd-item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}

.sd-item-grid-lg {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.sd-item-card {
  aspect-ratio: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #121820;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 6px;
}

.sd-item-card img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sd-item-fallback { font-size: 0.7rem; text-align: center; color: var(--muted); }

.sd-custom-card {
  aspect-ratio: auto;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  text-align: center;
}

.sd-custom-name { font-weight: 650; font-size: 0.9rem; }

.sd-kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.sd-kit {
  padding: 12px;
  margin: 0;
  text-align: left;
  cursor: pointer;
  appearance: none;
  border: 1px solid var(--border);
  background: var(--panel-alt, #121820);
  color: inherit;
  font: inherit;
  border-radius: 12px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.sd-kit:hover {
  border-color: var(--sd-accent, #CD412B);
  transform: translateY(-1px);
}
/* CHANGE: show full kit art (contain), slot capped at 512?512 so uploads don't stretch the card */
.sd-kit-img {
  display: block;
  width: 100%;
  max-width: 512px;
  aspect-ratio: 1 / 1;
  height: auto;
  max-height: 512px;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  margin: 0 auto 8px;
  background: #0d1118;
}
.sd-kit-img-empty {
  width: 100%;
  max-width: 512px;
  aspect-ratio: 1 / 1;
  max-height: 512px;
  margin: 0 auto 8px;
}
.sd-kit h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}
.sd-kit-contents {
  white-space: pre-wrap;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.8rem;
  margin: 8px 0 0;
}

.sd-kit-modal {
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(720px, 96vw);
  width: 100%;
  /* CHANGE: stable dialog chrome ? card owns fixed height */
  max-height: 94vh;
}
.sd-kit-modal::backdrop {
  background: rgba(0, 0, 0, 0.65);
}
.sd-kit-modal-card {
  background: var(--panel-alt, #121820);
  color: var(--text);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  /* CHANGE: taller fixed kit modal (~+20% vs 640) ? content still scrolls inside */
  display: flex;
  flex-direction: column;
  height: min(780px, 94vh);
  max-height: 94vh;
  width: 100%;
}
.sd-kit-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 8px;
  flex-shrink: 0;
}
.sd-kit-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}
.sd-kit-modal-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.sd-kit-modal-body {
  padding: 8px 18px 20px;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}
.sd-kit-modal-desc {
  white-space: pre-wrap;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 14px;
  flex: 0 1 auto;
  max-height: 7.5rem;
  overflow-y: auto;
}
.sd-kit-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
  background: rgba(17, 22, 29, 0.75);
  border-radius: 12px;
  padding: 4px;
  flex-shrink: 0;
}
.sd-kit-tab {
  appearance: none;
  border: none;
  background: transparent;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: var(--muted);
  font: inherit;
}
.sd-kit-tab.active {
  background: rgba(205, 65, 43, 0.35);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(205, 65, 43, 0.7);
}
.sd-kit-tab-title { font-weight: 650; font-size: 0.9rem; }
.sd-kit-tab-sub { font-size: 0.75rem; opacity: 0.75; }
.sd-kit-panels {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  overflow: hidden;
}
.sd-kit-panel {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  /* CHANGE: minimal kit modal scrollbar ? thumb only, no heavy track */
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 175, 195, 0.55) transparent;
  scrollbar-gutter: stable;
}
.sd-kit-panel[hidden] { display: none !important; }

.sd-kit-panel::-webkit-scrollbar,
.sd-kit-modal-desc::-webkit-scrollbar,
.sd-kit-contents::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.sd-kit-panel::-webkit-scrollbar-track,
.sd-kit-modal-desc::-webkit-scrollbar-track,
.sd-kit-contents::-webkit-scrollbar-track {
  background: transparent;
}
.sd-kit-panel::-webkit-scrollbar-thumb,
.sd-kit-modal-desc::-webkit-scrollbar-thumb,
.sd-kit-contents::-webkit-scrollbar-thumb {
  background: rgba(160, 175, 195, 0.5);
  border-radius: 999px;
  border: none;
}
.sd-kit-panel::-webkit-scrollbar-thumb:hover,
.sd-kit-modal-desc::-webkit-scrollbar-thumb:hover,
.sd-kit-contents::-webkit-scrollbar-thumb:hover {
  background: rgba(190, 205, 225, 0.75);
}
.sd-kit-panel::-webkit-scrollbar-button,
.sd-kit-modal-desc::-webkit-scrollbar-button,
.sd-kit-contents::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}
.sd-kit-panel::-webkit-scrollbar-corner,
.sd-kit-modal-desc::-webkit-scrollbar-corner,
.sd-kit-contents::-webkit-scrollbar-corner {
  background: transparent;
}

.sd-kit-modal-desc,
.sd-kit-contents {
  scrollbar-width: thin;
  scrollbar-color: rgba(160, 175, 195, 0.55) transparent;
}
.sd-kit-items {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  align-content: start;
}
.sd-kit-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  background: #121820;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}
.sd-kit-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.sd-kit-item-fallback { color: #9ca3af; font-size: 1.2rem; }
.sd-kit-item-amount {
  position: absolute;
  right: 4px;
  bottom: 3px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.sd-kit-contents {
  white-space: pre-wrap;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  font-size: 0.8rem;
  margin: 8px 0 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

@media (max-width: 640px) {
  .sd-kit-modal-card { height: min(680px, 94vh); }
  .sd-kit-items { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.sd-plugin-list { display: flex; flex-direction: column; gap: 10px; }

/* CHANGE: plugin accordion ? collapsed strip (icon + name + short), expand for rich body */
.sd-plugin-fold {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-alt);
  overflow: hidden;
}

.sd-plugin-fold > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.sd-plugin-fold > summary::-webkit-details-marker { display: none; }

.sd-plugin-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.sd-plugin-strip::after {
  content: "";
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa8b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"),
    linear-gradient(180deg, var(--panel-alt) 0%, var(--panel) 100%);
  background-repeat: no-repeat, no-repeat;
  background-position: center, 0 0;
  background-size: 16px 16px, 100% 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.sd-plugin-fold[open] > .sd-plugin-strip::after {
  transform: rotate(180deg);
}

.sd-plugin-fold > summary:hover::after {
  border-color: #4a7ec4;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236eb3ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #263040 0%, #1e2632 100%);
  box-shadow: 0 2px 6px rgba(205, 65, 43, 0.2);
}

.sd-plugin-strip-static {
  cursor: default;
}

.sd-plugin-strip-static::after {
  display: none;
}

/* CHANGE: icon left, title + short description to the right */
.sd-plugin-strip-main {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex: 1;
}

.sd-plugin-icon {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: #0d1118;
}

.sd-plugin-icon-empty {
  display: inline-block;
  width: 72px;
  height: 72px;
  background: linear-gradient(180deg, #1e2632 0%, #12171f 100%);
}

.sd-plugin-strip-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
}

.sd-plugin-name {
  font-size: 1rem;
  line-height: 1.25;
}

.sd-plugin-short {
  font-size: 0.88rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sd-plugin-body {
  padding: 0 14px 14px;
  border-top: 1px solid var(--border);
}

.sd-plugin-html {
  line-height: 1.55;
  padding-top: 12px;
}

.sd-plugin-html img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.sd-plugin-html p { margin: 0 0 0.75em; }

.sd-plugin-link {
  display: inline-block;
  margin-top: 10px;
}

.plugin-fold-icon {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  flex-shrink: 0;
  background: #0d1118;
}

.plugin-fold-icon-empty {
  display: inline-block;
  background: linear-gradient(180deg, #1e2632 0%, #12171f 100%);
}

.tox-tinymce {
  border-radius: 8px !important;
  border-color: var(--border) !important;
  width: 100% !important;
}

/* CHANGE: make TinyMCE resize grip easier to grab in dark admin */
.tox .tox-statusbar__resize-handle {
  cursor: ns-resize;
}

.sd-plugin {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-alt);
}

.sd-custom-html { line-height: 1.5; }

@media (max-width: 900px) {
  .sd-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sd-stat:nth-child(4n) { border-right: 1px solid var(--border); }
  .sd-stat:nth-child(2n) { border-right: 0; }
}

@media (max-width: 560px) {
  .sd-stats { grid-template-columns: 1fr; }
  .sd-stat { border-right: 0; }
}

.svc-clickable {
  position: relative;
  cursor: pointer;
}

.svc-clickable:hover {
  border-color: rgba(205, 65, 43, 0.45);
}

.svc-hit {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  text-decoration: none;
}

.svc-clickable .btn-connect,
.svc-clickable .svl-actions {
  position: relative;
  z-index: 2;
}

/* ?? Servers browser (Burden + GS-inspired) ?? */
.servers-page {
  max-width: var(--content-max);
  width: 100%;
  padding-left: 10px;
  padding-right: 16px;
  box-sizing: border-box;
}

.servers-hero {
  text-align: center;
  margin-bottom: 18px;
}

.servers-hero h1 {
  margin: 0 0 6px;
  font-size: 2rem;
}

.server-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 14px;
}

.server-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #151a22;
  color: #d7e2f0;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.92rem;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.server-pill:hover { text-decoration: none; border-color: rgba(205, 65, 43, 0.5); transform: translateY(-1px); }

.server-pill.active {
  background: #e8eef6;
  color: #0f1318;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(232, 238, 246, 0.18);
}

.server-pill.is-switching {
  transform: scale(0.96);
}

.servers-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding-left: 2px;
}

.servers-filters-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.servers-filters-toggle-ico {
  width: 14px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-radius: 1px;
  opacity: 0.85;
  position: relative;
}

.servers-filters-toggle-ico::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: currentColor;
}

.servers-filters-toggle.is-collapsed .servers-filters-toggle-ico {
  opacity: 0.45;
}

.servers-shell {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

/* CHANGE: keep card column width stable ? filter slot stays 200px when collapsed. */
.servers-shell.filters-collapsed {
  grid-template-columns: 200px minmax(0, 1fr);
}

.servers-shell.filters-collapsed .server-filters {
  display: none;
}

.servers-filters-show {
  width: 100%;
  padding: 10px 8px;
  height: fit-content;
  position: sticky;
  top: 12px;
  letter-spacing: 0.02em;
  text-align: center;
}

.servers-shell:not(.filters-collapsed) .servers-filters-show {
  display: none !important;
}

.server-filters {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  position: sticky;
  top: 12px;
  margin-left: 0;
}

.server-filters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.server-filters-head strong {
  font-size: 0.95rem;
}

.servers-filters-hide {
  font-size: 0.8rem;
  padding: 4px 10px;
}

.server-filter-block {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.server-filter-block:last-of-type { border-bottom: 0; }

.server-filter-title {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.server-filter-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.server-filter-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  color: #c5d0de;
  text-decoration: none;
  font-size: 0.9rem;
}

.server-filter-opt:hover { background: rgba(205, 65, 43, 0.1); text-decoration: none; }

.server-filter-opt.on {
  color: #fff;
  background: rgba(205, 65, 43, 0.18);
}

.sf-mark {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #4a5568;
  flex-shrink: 0;
}

.server-filter-opt.on .sf-mark {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: inset 0 0 0 2px #0f1318;
}

.server-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  width: 100%;
  min-width: 0;
}

/* CHANGE: filter switch ? exit cascade + staggered enter for cards/list. */
.servers-results .servers-item {
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  filter: blur(2px);
  animation: servers-item-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i, 0) * 55ms);
}

.servers-results.is-exiting .servers-item {
  animation: servers-item-out 0.22s ease-in forwards;
  animation-delay: calc(var(--i, 0) * 28ms);
}

@keyframes servers-item-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes servers-item-out {
  to {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
    filter: blur(3px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .servers-results .servers-item,
  .servers-results.is-exiting .servers-item {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }

  .server-pill {
    transition: none;
  }
}

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.28s;
}

.svc {
  position: relative;
  background: linear-gradient(180deg, #161c26, #12171f);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.svc.preferred { border-color: rgba(205, 65, 43, 0.55); }

.svc-body {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 6px;
}

.svc-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.svc-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
  background: #1a222e;
  border: 1px solid var(--border);
}

.svc-orb {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 45%), var(--orb, #CD412B);
  box-shadow: 0 0 14px color-mix(in srgb, var(--orb, #CD412B) 50%, transparent);
}

.svc-text {
  min-width: 0;
  padding-right: 4px;
}

.svc-name {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.svc-map {
  font-size: 0.82rem;
  margin-top: 2px;
  line-height: 1.2;
}

.svc-addr {
  font-size: 0.78rem;
  margin-top: 2px;
  line-height: 1.2;
  opacity: 0.9;
}

.svc-online-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.svc-bar {
  flex: 1;
  height: 7px;
  border-radius: 999px;
  background: #1c2430;
  overflow: hidden;
  min-width: 0;
}

.svc-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3d9e68, var(--accent) 70%, #c4453c);
  max-width: 100%;
}

.svc-online-num {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 0.82rem;
  color: #c5d0de;
  flex-shrink: 0;
}

.svc-tags {
  color: #8aa0b8;
  font-weight: 500;
  font-size: 0.85rem;
}

.svc-foot {
  display: flex;
  justify-content: space-between;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 0.9rem;
}

.svc-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.btn-connect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #3cb05a;
  border: none;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(60, 176, 90, 0.35);
  flex-shrink: 0;
  transition: filter 0.12s ease, transform 0.12s ease;
}

.btn-connect::after {
  content: "";
  width: 0;
  height: 0;
  margin-left: 2px;
  border-style: solid;
  border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #e8ffe8;
}

.btn-connect:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  text-decoration: none;
}

.server-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.svl {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px 14px;
  align-items: center;
  background: linear-gradient(180deg, #161c26, #12171f);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  padding-right: 16px;
}

.svl .svc-led {
  top: 8px;
  right: 8px;
}

.svl-orb { width: 40px; height: 40px; }

.svl .svc-icon { width: 40px; height: 40px; border-radius: 10px; }

.svl-main { min-width: 0; }

.svl-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.svl-bar { margin-top: 0; }

.svl-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.svl.preferred { border-color: rgba(205, 65, 43, 0.55); }

@media (max-width: 720px) {
  .svl {
    grid-template-columns: auto 1fr;
  }
  .svl-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 900px) {
  .servers-shell,
  .servers-shell.filters-collapsed {
    grid-template-columns: 1fr;
  }
  .server-filters { position: static; }
  .servers-filters-show { width: auto; justify-self: start; }
  .servers-page { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 800px) {
  .profile-grid,
  .stat-grid { grid-template-columns: 1fr; }
  .profile-hero-body { align-items: center; }
}

@media (max-width: 800px) {
  .admin-shell { grid-template-columns: 1fr; }
  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "brand actions"
      "nav nav";
  }
  .header-brand { grid-area: brand; }
  .header-actions { grid-area: actions; }
  .header-center {
    grid-area: nav;
    width: 100%;
    overflow-x: auto;
  }
  .user-bar { justify-content: flex-end; }
}

/* CHANGE: public maintenance / ????????? landing */
.maint-page {
  min-height: calc(100vh - 120px);
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.maint-card {
  width: min(560px, 100%);
  padding: 28px 26px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(160deg, #121820, #0d1118 55%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.maint-card h1 {
  margin: 6px 0 12px;
  font-size: 1.65rem;
}

.maint-msg {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
  white-space: pre-wrap;
}

.maint-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.maint-mode-set {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
}

.maint-mode-set legend {
  padding: 0 6px;
  font-weight: 600;
}

/* CHANGE: admin Bundle groups — half-width fields, kit-like tiles */
.product-entry-groups-wrap {
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0a0e14;
}
.product-entry-groups-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.product-entry-groups {
  display: grid;
  gap: 12px;
}
.product-entry-group-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel) 88%, #0a0e14);
  padding: 10px 12px;
}
.product-entry-group-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}
.product-entry-group-fields {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(120px, 180px);
  gap: 8px;
  flex: 0 1 auto;
}
.product-entry-group-fields label {
  display: block;
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.product-entry-group-fields .i18n-field-row .i18n-visible,
.product-entry-group-fields input:not([type="hidden"]) {
  width: 100%;
  box-sizing: border-box;
  margin-top: 4px;
  padding: 7px 9px;
  background: var(--input);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  font: inherit;
}
.product-entry-group-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: auto;
  align-items: center;
}
.product-entry-ungrouped {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.peg-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}
.peg-tile {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #121820;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: grab;
  user-select: none;
}
.peg-tile--cmd {
  box-shadow: inset 0 0 0 1px rgba(205, 65, 43, 0.35);
}
.peg-tile--bal {
  box-shadow: inset 0 0 0 1px rgba(80, 180, 120, 0.35);
}
.peg-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  pointer-events: none;
}
.peg-tile-fallback {
  font-weight: 800;
  color: rgba(158, 196, 255, 0.45);
}
.peg-tile-amount {
  position: absolute;
  right: 3px;
  bottom: 2px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}
.peg-tile-edit {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  margin: 0;
  border: none;
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.55);
  color: #fff;
  cursor: pointer;
  padding: 0;
}
.peg-tile:hover .peg-tile-edit,
.peg-tile:focus-within .peg-tile-edit {
  display: grid;
}
.peg-tile-del {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 18px;
  height: 18px;
  padding: 0;
  line-height: 1;
  font-size: 12px;
  border-radius: 4px;
  opacity: 0;
  z-index: 2;
}
.peg-tile:hover .peg-tile-del {
  opacity: 1;
}
@media (max-width: 720px) {
  .product-entry-group-fields {
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .product-entry-group-actions {
    margin-left: 0;
    width: 100%;
  }
}

/* CHANGE: admin product composite slots (Bundle / Roulette / Choice) */
.product-entries {
  display: grid;
  gap: 12px;
  margin: 10px 0 12px;
}

.product-entries[hidden],
.choice-entries-tiles[hidden],
.peg-tiles[hidden] {
  display: none !important;
}

.product-entry-card {
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--border));
  border-radius: 10px;
  overflow: hidden;
  background: var(--panel);
}

.product-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: color-mix(in srgb, var(--accent) 28%, #0e1620);
  border-bottom: 1px solid var(--border);
  font-weight: 650;
}

.product-entry-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.product-entry-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.product-entry-strip-img,
.product-entry-strip-ph {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  flex-shrink: 0;
  background: #121820;
  object-fit: contain;
}

.product-entry-strip-ph {
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  color: var(--muted);
}

.product-entry-strip-ph[hidden],
.product-entry-strip-img[hidden] {
  display: none !important;
}

.product-entry-strip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-entry-card.is-collapsed .form-grid {
  display: none;
}

.product-entry-card.is-collapsed .product-entry-head {
  border-bottom: 0;
}

.product-entry-card [data-entry-collapse] svg {
  display: block;
  transition: transform 0.18s ease;
}

.product-entry-card.is-collapsed [data-entry-collapse] svg {
  transform: rotate(180deg);
}

.choice-entries-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 8px 0 4px;
}

.choice-entries-tiles {
  margin: 8px 0 12px;
}

.product-entry-card .form-grid {
  padding: 12px;
}

/* CHANGE: locked fields — hatch only on the control, not the whole label block. */
.is-field-locked {
  pointer-events: none;
  user-select: none;
  cursor: not-allowed;
}

/* CHANGE: beat .form-grid input { background } specificity so number fields get hatch too. */
.form-grid .is-field-locked > input:not([type="checkbox"]):not([type="color"]):not([type="file"]):not([type="hidden"]),
.form-grid .is-field-locked > textarea,
.form-grid .is-field-locked > select,
.form-grid .is-field-locked .media-url-row > input,
.is-field-locked > input:not([type="checkbox"]):not([type="hidden"]):not([type="radio"]),
.is-field-locked > textarea,
.is-field-locked > select,
.is-field-locked .media-url-row > input {
  color: var(--muted);
  border-style: dashed;
  border-color: rgba(148, 163, 184, 0.4);
  background-color: rgba(15, 19, 24, 0.55);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 7px,
    rgba(148, 163, 184, 0.18) 7px 14px
  );
  opacity: 1;
  filter: grayscale(0.25);
}

.is-field-locked .media-url-row > button,
.is-field-locked > button {
  opacity: 0.55;
  filter: grayscale(0.4);
}

/* checkbox / admin-check: hatch only the box, keep label text clear */
.is-field-locked.admin-check .admin-check-box,
.is-field-locked .admin-check-box {
  border-style: dashed;
  background-color: rgba(15, 19, 24, 0.55);
  background-image: repeating-linear-gradient(
    -45deg,
    transparent 0 4px,
    rgba(148, 163, 184, 0.22) 4px 8px
  );
  opacity: 0.85;
}

.is-field-locked.admin-check .admin-check-text {
  opacity: 0.55;
}

#product-editor input:disabled:not([type="checkbox"]):not([type="hidden"]),
#product-editor textarea:disabled,
#product-editor select:disabled {
  color: var(--muted);
}

.shop-prize-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 4px;
}

/* CHANGE: modern side action toasts (glass + slide + glow). */
.action-toasts {
  position: fixed;
  top: 76px;
  right: 18px;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 28px));
  pointer-events: none;
}
.action-toast {
  --toast-accent: #3dd68c;
  --toast-accent-dim: rgba(61, 214, 140, 0.28);
  pointer-events: auto;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: 44px 1fr 28px;
  gap: 10px 12px;
  align-items: start;
  padding: 14px 12px 16px 12px;
  border-radius: 16px;
  color: #f4f7fb;
  background: rgba(16, 22, 30, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 16px 32px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  animation: action-toast-in 0.32s cubic-bezier(0.22, 1, 0.32, 1) both;
}
.action-toast.is-err {
  --toast-accent: #ff5d6c;
  --toast-accent-dim: rgba(255, 93, 108, 0.32);
}
.action-toast.is-warn {
  --toast-accent: #f0a23a;
  --toast-accent-dim: rgba(240, 162, 58, 0.32);
}
.action-toast-glow {
  position: absolute;
  inset: -40% auto -40% -20%;
  width: 90px;
  background: radial-gradient(circle, var(--toast-accent-dim), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.action-toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: linear-gradient(180deg, #fff, var(--toast-accent) 35%, var(--toast-accent));
  box-shadow: 0 0 10px var(--toast-accent);
  z-index: 1;
}
.action-toast::after {
  display: none;
}
.action-toast-orb {
  position: relative;
  z-index: 3;
  width: 40px;
  height: 40px;
  margin-top: 1px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.42), transparent 46%),
    radial-gradient(circle at 50% 50%, var(--toast-accent), color-mix(in srgb, var(--toast-accent) 35%, #0b1016));
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.18),
    0 0 14px var(--toast-accent-dim);
}
.action-toast-copy {
  position: relative;
  z-index: 3;
  min-width: 0;
  padding-top: 2px;
}
.action-toast-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--toast-accent);
  margin-bottom: 4px;
}
.action-toast-text {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.35;
  font-weight: 650;
  color: #f3f6fa;
}
.action-toast-hint {
  margin: 6px 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: rgba(210, 220, 232, 0.72);
}
.action-toast-close {
  position: relative;
  z-index: 3;
  appearance: none;
  width: 28px;
  height: 28px;
  margin: -2px -2px 0 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
}
.action-toast-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.action-toast-rail {
  grid-column: 1 / -1;
  position: relative;
  z-index: 3;
  display: block;
  height: 3px;
  margin: 2px 2px 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.action-toast-rail-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--toast-accent), #fff);
  animation: action-toast-rail var(--toast-life, 5600ms) linear forwards;
}
.action-toast.is-out {
  animation: action-toast-out 0.38s cubic-bezier(0.4, 0, 1, 1) both;
}
@keyframes action-toast-in {
  from {
    opacity: 0;
    transform: translate3d(24px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}
@keyframes action-toast-out {
  to {
    opacity: 0;
    transform: translate3d(28px, 0, 0);
  }
}
@keyframes action-toast-rail {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}
@media (max-width: 640px) {
  .action-toasts {
    top: auto;
    bottom: 16px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .action-toast,
  .action-toast::after,
  .action-toast-orb,
  .action-toast-rail-fill {
    animation: none !important;
  }
}

.shop-prize-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.shop-prize-list img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* CHANGE: dark confirm dialog — same panel as shop product modal. */
.confirm-modal {
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(440px, 92vw);
  width: 100%;
}
.confirm-modal::backdrop {
  background: rgba(0, 0, 0, 0.7);
}
.confirm-card {
  background: var(--panel-alt, #1e2631);
  color: var(--text);
  border-radius: 16px;
  padding: 22px 24px 18px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.confirm-card h2 {
  margin: 0 0 10px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}
.confirm-card p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.95rem;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.confirm-ok:disabled {
  opacity: 0.65;
  cursor: wait;
}
[data-basket-table] td:last-child {
  text-align: right;
  white-space: nowrap;
}

/* CHANGE: player history badges + admin player card. */
.history-search {
  width: 100%;
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  font: inherit;
}
.hist-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.hist-purchase { background: color-mix(in srgb, #2aa8a0 28%, var(--panel)); color: #8fe8e0; }
.hist-refund { background: color-mix(in srgb, #c9a227 28%, var(--panel)); color: #f0d56a; }
.hist-issue, .is-issued { background: color-mix(in srgb, var(--accent) 30%, var(--panel)); color: #9cc4f0; }
.hist-topup { background: color-mix(in srgb, var(--accent) 22%, var(--panel)); color: #b7d4f5; }
.hist-admin { background: color-mix(in srgb, #c9a227 22%, var(--panel)); color: #ead27a; }
.is-pending { background: color-mix(in srgb, var(--danger) 32%, var(--panel)); color: #f0b0aa; }
.is-cancel { background: color-mix(in srgb, #c9a227 38%, var(--panel)); color: #f5e08a; }

.player-modal-card { width: min(920px, 96vw); }
#player-modal [hidden] { display: none !important; }
.player-modal-card .admin-modal-body { max-height: min(64vh, 640px); overflow: auto; }
.player-modal-foot { justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.player-modal-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.player-table-wrap { overflow: auto; max-height: 48vh; }
.act-row { display: inline-flex; gap: 6px; }
.act-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: #fff;
  cursor: pointer;
  font: inherit;
  line-height: 1;
}
.act-issue { background: #5b4b9a; border-color: #5b4b9a; }
.act-cancel { background: color-mix(in srgb, var(--danger) 80%, #000); border-color: transparent; }
.act-reissue { background: #3d5a73; border-color: #3d5a73; }
.act-btn.is-off,
.act-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.qty-stepper { display: inline-flex; align-items: center; gap: 6px; }
.qty-stepper input { width: 64px; text-align: center; }
