:root {
  --ink: #181a20;
  --ink-soft: #30343c;
  --muted: #686d78;
  --line: #ead9b5;
  --paper: #fff9ec;
  --panel: #ffffff;
  --cream: #fff3d2;
  --cheese: #ffc247;
  --cheese-dark: #f0a918;
  --tomato: #f05a3a;
  --fresh: #2ac184;
  --blue: #57a7ff;
  --shadow: 0 20px 55px rgba(24, 26, 32, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 194, 71, 0.24), transparent 28%),
    linear-gradient(180deg, #fff7e3 0%, #fffaf2 42%, #ffffff 100%);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: default;
  opacity: 0.72;
}

body.modal-open {
  overflow: hidden;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  padding: 14px 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 186px;
}

.brand img {
  width: 48px;
  height: 48px;
}

.brand span {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 22px;
  line-height: 1;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(24, 26, 32, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar,
.category-strip::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 14px;
  white-space: nowrap;
}

.main-nav a:hover {
  background: var(--cream);
}

.icon-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 999px;
  background: var(--ink);
}

.bag-icon {
  width: 18px;
  height: 18px;
  border: 2px solid var(--cheese);
  border-top: 0;
  border-radius: 4px;
}

.bag-icon::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 8px;
  transform: translate(1px, -8px);
  border: 2px solid var(--cheese);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
}

.bag-count {
  position: absolute;
  right: -4px;
  top: -5px;
  display: grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--tomato);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

main {
  overflow: hidden;
}

.hero,
.market-section,
.bundles-section,
.membership-section,
.quality-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(380px, 0.84fr);
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 82px);
  padding: 46px 0 76px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--tomato);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 690px;
  margin-bottom: 22px;
  font-size: clamp(42px, 5.2vw, 72px);
  line-height: 1.08;
  letter-spacing: 0;
}

.hero-text {
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.primary-button,
.secondary-button,
.bundle-card button,
.member-card button,
.member-plan button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 900;
}

.compact-button {
  min-height: 42px;
  padding: 0 18px;
  white-space: nowrap;
}

.primary-button,
.bundle-card button,
.member-card button,
.member-plan button {
  border: 0;
  background: var(--ink);
  color: #fff;
}

.secondary-button {
  border: 1px solid rgba(24, 26, 32, 0.12);
  background: #fff;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--muted);
}

.trust-row strong {
  margin-right: 5px;
  color: var(--ink);
}

.hero-board {
  display: flex;
  justify-content: center;
}

.menu-ticket {
  width: min(100%, 430px);
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  padding: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.ticket-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ticket-head img {
  width: 64px;
  height: 64px;
}

.ticket-head span {
  display: block;
  color: var(--tomato);
  font-size: 13px;
  font-weight: 900;
}

.ticket-head strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

.stack-preview {
  display: grid;
  gap: 10px;
  margin: 28px 0;
}

.stack-preview span {
  display: block;
  min-height: 34px;
  border-radius: 999px;
}

.stack-preview .bun {
  width: 78%;
  min-height: 58px;
  margin: 0 auto;
  border-radius: 80px 80px 20px 20px;
  background: var(--cheese);
}

.stack-preview .code {
  display: grid;
  place-items: center;
  width: 92%;
  margin: 0 auto;
  background: var(--ink);
  color: var(--cheese);
  font-weight: 900;
}

.stack-preview .tomato {
  background: var(--tomato);
}

.stack-preview .module {
  width: 88%;
  margin: 0 auto;
  background: repeating-linear-gradient(90deg, var(--fresh) 0 54px, var(--blue) 54px 108px, var(--cheese) 108px 162px);
}

.stack-preview .base {
  width: 82%;
  min-height: 42px;
  margin: 0 auto;
  background: var(--cheese-dark);
}

.ticket-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ticket-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
}

.ticket-list li::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fresh);
}

.ticket-bottom {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
}

.ticket-bottom span {
  color: var(--muted);
}

.ticket-bottom strong {
  color: var(--tomato);
  font-size: 42px;
  line-height: 1;
}

.category-strip {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  width: min(1180px, calc(100% - 40px));
  margin: -34px auto 72px;
  padding: 12px;
  overflow-x: auto;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(24, 26, 32, 0.08);
  scrollbar-width: none;
}

.category {
  min-height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 800;
  white-space: nowrap;
}

.category.active {
  background: var(--ink);
  color: #fff;
}

.market-section,
.bundles-section,
.membership-section,
.quality-section {
  padding: 78px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-heading h2,
.membership-section h2 {
  margin-bottom: 0;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.05;
}

.section-note,
.member-copy p {
  max-width: 480px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(390px, 100%);
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 999px;
  background: #fff;
}

.search-icon {
  width: 16px;
  height: 16px;
  border: 2px solid var(--muted);
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  display: block;
  width: 8px;
  height: 2px;
  transform: translate(11px, 10px) rotate(45deg);
  background: var(--muted);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.product-grid,
.bundle-grid,
.quality-section {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.product-card,
.bundle-card,
.member-card,
.quality-item {
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: var(--panel);
}

.product-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  padding: 20px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover,
.product-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(24, 26, 32, 0.1);
}

.product-card:focus-visible {
  outline: 3px solid rgba(240, 90, 58, 0.28);
  outline-offset: 3px;
}

.product-card.hidden {
  display: none;
}

.card-top,
.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.tag.red {
  background: rgba(240, 90, 58, 0.12);
  color: var(--tomato);
}

.tag.green {
  background: rgba(42, 193, 132, 0.14);
  color: #148c5a;
}

.tag.yellow {
  background: rgba(255, 194, 71, 0.24);
  color: #946200;
}

.tag.blue {
  background: rgba(87, 167, 255, 0.14);
  color: #256fbf;
}

.meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.product-card h3 {
  min-height: 58px;
  margin: 18px 0 12px;
  font-size: 24px;
  line-height: 1.2;
}

.product-preview {
  display: grid;
  gap: 8px;
  width: 100%;
  min-height: 94px;
  margin-top: 18px;
  padding: 16px;
  border-radius: 8px;
  background: var(--cream);
}

.product-preview span {
  display: block;
  min-height: 14px;
  border-radius: 999px;
  background: var(--ink);
}

.product-preview span:nth-child(1) {
  width: 76%;
  background: var(--cheese);
}

.product-preview span:nth-child(2) {
  width: 92%;
}

.product-preview span:nth-child(3) {
  width: 64%;
  background: var(--tomato);
}

.mini-green span:nth-child(3),
.mini-green span:nth-child(1) {
  background: var(--fresh);
}

.mini-yellow span:nth-child(1),
.mini-yellow span:nth-child(3) {
  background: var(--cheese);
}

.mini-blue span:nth-child(1),
.mini-blue span:nth-child(3) {
  background: var(--blue);
}

.product-card p {
  color: var(--muted);
  line-height: 1.7;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 20px;
}

.specs span {
  padding: 7px 9px;
  border: 1px solid rgba(24, 26, 32, 0.08);
  border-radius: 999px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 800;
}

.benefit-line {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff4d8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.benefit-line.warn {
  background: rgba(255, 194, 71, 0.22);
  color: #946200;
}

.product-card.unavailable {
  opacity: 0.78;
}

.card-bottom {
  margin-top: 22px;
}

.card-bottom strong {
  color: var(--tomato);
  font-size: 28px;
}

.buy-button {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.buy-button:disabled,
.buy-button[aria-disabled="true"] {
  cursor: not-allowed;
  background: rgba(24, 26, 32, 0.16);
  color: rgba(24, 26, 32, 0.55);
}

.card-actions {
  display: flex;
  gap: 8px;
}

.bundle-grid {
  grid-template-columns: 1.2fr 1fr 1fr;
}

.bundle-card {
  display: grid;
  gap: 18px;
  min-height: 285px;
  padding: 24px;
}

.bundle-card.featured {
  background: var(--ink);
  color: #fff;
}

.bundle-card h3 {
  margin: 0;
  font-size: 30px;
}

.bundle-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.bundle-card.featured p {
  color: #d8d2c4;
}

.bundle-card strong {
  color: var(--tomato);
  font-size: 38px;
}

.bundle-card.featured strong {
  color: var(--cheese);
}

.bundle-card button {
  align-self: end;
  width: fit-content;
}

.bundle-card:not(.featured) button {
  background: var(--cream);
  color: var(--ink);
}

.membership-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 30px;
  padding: 56px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cream), #fff);
  border: 1px solid var(--line);
}

.member-copy {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.55fr);
  gap: 28px;
  align-items: end;
}

.member-card {
  padding: 28px;
  background: var(--ink);
  color: #fff;
}

.member-card span {
  color: var(--cheese);
  font-weight: 900;
}

.member-card strong {
  display: block;
  margin: 14px 0 20px;
  font-size: 42px;
}

.member-card ul {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.member-card li {
  color: #e8e1d0;
}

.member-card button {
  width: 100%;
  background: var(--cheese);
  color: var(--ink);
}

.member-compare {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.member-plan {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 16px;
  min-height: 320px;
  padding: 22px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.member-plan.highlighted {
  border-color: rgba(244, 176, 56, 0.76);
  background: #fff7df;
  box-shadow: 0 18px 44px rgba(244, 176, 56, 0.18);
}

.member-plan.lifetime {
  background: var(--ink);
  color: #fff;
}

.member-plan span {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff0d0;
  color: var(--tomato);
  font-size: 13px;
  font-weight: 900;
}

.member-plan.lifetime span {
  background: rgba(244, 176, 56, 0.16);
  color: var(--cheese);
}

.member-price {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.member-price strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.member-price del {
  color: rgba(24, 26, 32, 0.42);
  font-size: 17px;
  font-weight: 900;
  text-decoration-thickness: 2px;
}

.member-plan.lifetime .member-price del {
  color: rgba(255, 255, 255, 0.48);
}

.member-promo {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--tomato);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.member-plan ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-plan li {
  color: var(--muted);
  line-height: 1.55;
}

.member-plan.lifetime li {
  color: #e8e1d0;
}

.member-plan button {
  width: 100%;
}

.member-plan.highlighted button,
.member-plan.lifetime button {
  background: var(--cheese);
  color: var(--ink);
}

.quality-section {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quality-item {
  padding: 24px;
}

.quality-icon {
  display: block;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  border-radius: 12px;
  background: var(--cream);
}

.quality-icon.check::before,
.quality-icon.file::before,
.quality-icon.refresh::before {
  content: "";
  display: block;
  width: 18px;
  height: 10px;
  transform: translate(11px, 13px) rotate(-45deg);
  border-left: 3px solid var(--fresh);
  border-bottom: 3px solid var(--fresh);
}

.quality-icon.file::before {
  width: 16px;
  height: 20px;
  transform: translate(13px, 10px);
  border: 3px solid var(--blue);
  border-radius: 3px;
}

.quality-icon.refresh::before {
  width: 18px;
  height: 18px;
  transform: translate(12px, 11px);
  border: 3px solid var(--tomato);
  border-left-color: transparent;
  border-radius: 50%;
}

.quality-item h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.quality-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 40px));
  margin: 40px auto 0;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
}

.site-footer img {
  width: 220px;
  max-width: 48%;
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

.site-footer p a {
  margin-left: 12px;
  color: var(--ink);
  font-weight: 900;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  padding: 28px;
}

.modal-shell.open {
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 26, 32, 0.52);
  backdrop-filter: blur(10px);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 980px);
  max-height: min(760px, calc(100vh - 56px));
  overflow: auto;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 8px;
  background: #fffaf0;
  box-shadow: var(--shadow);
}

.small-modal,
.profile-modal {
  width: min(100%, 560px);
}

.profile-modal {
  width: min(100%, 720px);
}

.account-modal {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.account-modal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 118px;
  background: linear-gradient(135deg, rgba(255, 191, 64, 0.24), rgba(240, 90, 58, 0.12), rgba(84, 180, 138, 0.15));
  pointer-events: none;
}

.account-modal-head {
  position: relative;
  padding: 30px 34px 18px;
}

.account-modal-head h2 {
  margin: 6px 0 8px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.02;
}

.account-modal-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.account-form,
.profile-form {
  display: block;
  grid-template-columns: none;
  position: relative;
  padding: 0 34px 30px;
}

.form-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fffaf0;
}

.form-section + .form-section {
  margin-top: 14px;
}

.form-section-title {
  color: var(--ink);
  font-weight: 950;
}

.account-form input,
.profile-form input {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(24, 26, 32, 0.14);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.account-form input:focus,
.profile-form input:focus {
  border-color: rgba(240, 90, 58, 0.65);
  box-shadow: 0 0 0 4px rgba(240, 90, 58, 0.12);
  outline: none;
}

.code-field {
  align-items: end;
}

.account-note {
  position: relative;
  margin: -12px 34px 30px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(84, 180, 138, 0.1);
  color: var(--ink-soft);
  font-size: 14px;
}

.avatar-uploader {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fffaf0;
}

#profileAvatarPreview,
.profile-modal .avatar-uploader img {
  display: block;
  flex: 0 0 auto;
  width: 112px;
  height: 112px;
  min-width: 112px;
  max-width: 112px;
  min-height: 112px;
  max-height: 112px;
  border: 4px solid #fff;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(24, 26, 32, 0.12);
  object-fit: cover;
  object-position: center;
}

.avatar-uploader div {
  display: grid;
  gap: 8px;
}

.avatar-uploader strong {
  font-size: 20px;
}

.avatar-uploader span,
.profile-fields small {
  color: var(--muted);
  line-height: 1.6;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.reset-avatar {
  justify-content: flex-start;
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.profile-fields label {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 900;
}

.profile-fields label:first-child {
  grid-column: 1 / -1;
}

.profile-actions {
  margin-top: 18px;
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 18px;
  width: 16px;
  height: 2px;
  background: #fff;
}

.modal-close::before {
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(0, 1fr);
  gap: 30px;
  padding: 34px;
}

.detail-preview {
  display: grid;
  align-content: center;
  gap: 16px;
  min-height: 420px;
  padding: 36px;
  border-radius: 8px;
  background: var(--ink);
}

.detail-preview span {
  display: block;
  min-height: 42px;
  border-radius: 999px;
  background: var(--cheese);
}

.detail-preview span:nth-child(1) {
  width: 78%;
  min-height: 70px;
  margin: 0 auto;
  border-radius: 100px 100px 22px 22px;
}

.detail-preview span:nth-child(2) {
  width: 94%;
  margin: 0 auto;
  background: #fff;
}

.detail-preview span:nth-child(3) {
  background: var(--tomato);
}

.detail-preview span:nth-child(4) {
  width: 82%;
  margin: 0 auto;
  background: var(--cheese-dark);
}

.detail-content h2,
.checkout-panel h2 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.08;
}

.detail-content p {
  color: var(--ink-soft);
  line-height: 1.75;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}

.detail-meta span {
  padding: 8px 11px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 999px;
  background: #fff;
  font-size: 13px;
  font-weight: 900;
}

.detail-block {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.detail-block h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.detail-block ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  color: var(--ink-soft);
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 12px;
}

.detail-actions strong {
  color: var(--tomato);
  font-size: 44px;
}

.checkout-panel {
  width: min(100%, 520px);
  padding: 34px;
}

.checkout-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
}

.checkout-summary span {
  font-weight: 900;
}

.checkout-summary strong {
  color: var(--tomato);
  font-size: 30px;
}

.checkout-form {
  display: grid;
  gap: 16px;
}

.checkout-form[hidden],
.checkout-payment[hidden] {
  display: none;
}

.checkout-form label,
.checkout-form fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--ink-soft);
  font-weight: 800;
}

.checkout-form small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.checkout-form input[type="text"] {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(24, 26, 32, 0.14);
  border-radius: 8px;
  background: #fff;
}

.checkout-form fieldset {
  grid-template-columns: 1fr 1fr;
  padding: 14px;
  border: 1px solid rgba(24, 26, 32, 0.14);
  border-radius: 8px;
  background: #fff;
}

.checkout-form legend {
  padding: 0 6px;
}

.checkout-note {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.checkout-payment {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.pay-method-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fffaf0;
}

.pay-method-tabs label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 8px;
  background: #fff;
  font-weight: 950;
}

.checkout-qr {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 190px;
  height: 190px;
  margin: 0 auto;
  padding: 16px;
  border: 10px solid #fff;
  border-radius: 8px;
  background: #181a20;
  box-shadow: 0 18px 38px rgba(24, 26, 32, 0.16);
}

.checkout-qr span {
  min-height: 64px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, #181a20 25%, transparent 25% 50%, #181a20 50% 75%, transparent 75%),
    linear-gradient(#ffc247 0 0);
}

.checkout-qr span:nth-child(2),
.checkout-qr span:nth-child(3) {
  background:
    linear-gradient(90deg, transparent 20%, #181a20 20% 38%, transparent 38% 62%, #181a20 62% 80%, transparent 80%),
    linear-gradient(#fffaf0 0 0);
}

.checkout-qr i {
  position: absolute;
  inset: 72px;
  border: 8px solid #fffaf0;
  border-radius: 12px;
  background: var(--tomato);
}

.checkout-qr img {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  background: #fff;
}

.checkout-qr img:not([hidden]) ~ span,
.checkout-qr img:not([hidden]) ~ i {
  display: none;
}

.checkout-pay-copy {
  text-align: center;
}

.checkout-pay-copy strong {
  color: var(--tomato);
  font-size: 34px;
}

.checkout-pay-copy p,
.checkout-status {
  margin: 6px 0 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.55;
  text-align: center;
}

.member-plan button:disabled,
.member-plan button[data-blocked="true"] {
  opacity: 0.58;
}

.account-page {
  background:
    radial-gradient(circle at 86% 0%, rgba(42, 193, 132, 0.14), transparent 26%),
    linear-gradient(180deg, #fff7e3 0%, #fffaf2 34%, #ffffff 100%);
}

.account-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 78px;
}

.order-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 36px 0 78px;
}

.account-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 20px;
  align-items: stretch;
}

.profile-card,
.level-card,
.account-panel,
.referral-card {
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 26, 32, 0.08);
}

.profile-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 28px;
}

.profile-card img {
  width: 112px;
  height: 112px;
}

.profile-card h1 {
  margin-bottom: 10px;
  font-size: clamp(38px, 5vw, 64px);
}

.profile-edit {
  position: absolute;
  top: 24px;
  right: 24px;
  margin-left: 0;
  box-shadow: 0 12px 24px rgba(24, 26, 32, 0.08);
}

.profile-card p:last-child,
.level-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.level-card {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 28px;
  background: var(--ink);
  color: #fff;
}

.level-card span {
  color: var(--cheese);
  font-weight: 900;
}

.level-card strong {
  font-size: 34px;
}

.level-card p {
  color: #e8e1d0;
}

.account-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 20px;
  margin-top: 20px;
}

.security-panel {
  margin-top: 20px;
}

.security-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.security-form label {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 900;
}

.security-form input {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(24, 26, 32, 0.14);
  border-radius: 8px;
  background: #fffaf0;
  font: inherit;
}

.profile-modal .profile-form {
  display: block;
  grid-template-columns: none;
}

.profile-modal .avatar-uploader {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
}

.profile-modal .profile-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-modal .profile-fields label:first-child {
  grid-column: 1 / -1;
}

.account-panel {
  padding: 24px;
}

.collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.collapse-toggle span {
  font-size: 22px;
}

.collapse-toggle i {
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transition: transform 0.2s ease;
}

.collapse-toggle[aria-expanded="true"] i {
  transform: rotate(225deg);
}

.collapse-content {
  margin-top: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.panel-heading h2,
.orders-section h2,
.referral-section h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
}

.info-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
}

.info-list div,
.stats-grid div {
  padding: 16px;
  border: 1px solid rgba(24, 26, 32, 0.08);
  border-radius: 8px;
  background: #fffaf0;
}

.info-list dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.info-list dd {
  margin: 0;
  color: var(--ink);
  font-weight: 900;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.stats-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--tomato);
  font-size: 34px;
}

.stats-grid span {
  color: var(--muted);
  font-weight: 800;
}

.orders-section,
.referral-section {
  padding-top: 74px;
}

.orders-table {
  overflow: hidden;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fff;
}

.orders-row {
  display: grid;
  grid-template-columns: 1.25fr 1fr 0.8fr 0.56fr 0.62fr;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border-top: 1px solid rgba(24, 26, 32, 0.08);
}

.orders-row:first-child {
  border-top: 0;
}

.orders-head {
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.orders-row span {
  min-width: 0;
}

.orders-row mark {
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(42, 193, 132, 0.14);
  color: #148c5a;
  font-weight: 900;
}

.orders-row button,
.referral-card button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.referral-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 28px;
  align-items: center;
}

.referral-copy p {
  max-width: 560px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.7;
}

.referral-card {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.referral-card span {
  color: var(--muted);
  font-weight: 900;
}

.referral-card code {
  overflow-wrap: anywhere;
  padding: 16px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.referral-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.order-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  gap: 28px;
  align-items: center;
  padding: 34px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 26, 32, 0.08);
}

.order-hero h1 {
  max-width: 720px;
  font-size: clamp(38px, 5vw, 64px);
}

.order-hero p {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.lookup-only {
  min-height: 420px;
}

.order-detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 22px;
  align-items: stretch;
  padding: 34px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 26, 32, 0.08);
}

.order-detail-hero h1 {
  max-width: 740px;
  font-size: clamp(36px, 5vw, 62px);
}

.order-detail-hero p {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.75;
}

.order-status-card {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 22px;
  border-radius: 8px;
  background: var(--cream);
}

.order-status-card span {
  color: var(--muted);
  font-weight: 900;
}

.order-status-card strong {
  color: var(--tomato);
  font-size: 28px;
}

.lookup-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 8px;
  background: var(--cream);
}

.lookup-card label {
  display: grid;
  gap: 9px;
  color: var(--ink-soft);
  font-weight: 900;
}

.lookup-card input {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 8px;
  background: #fff;
}

.lookup-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.delivery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 22px;
  margin-top: 22px;
}

.delivery-card {
  padding: 28px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 26, 32, 0.08);
}

.delivery-info {
  margin-top: 18px;
}

.payment-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 194, 71, 0.45);
  border-radius: 8px;
  background: #fff7df;
}

.payment-box[hidden] {
  display: none;
}

.payment-box div {
  display: grid;
  gap: 6px;
}

.payment-box span {
  color: #946200;
  font-weight: 950;
}

.payment-box strong {
  color: var(--ink);
  font-size: 28px;
}

.payment-box p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.feedback-entry {
  margin-top: 16px;
  width: fit-content;
}

.feedback-form textarea {
  min-height: 130px;
  resize: vertical;
}

.feedback-form select,
.feedback-form textarea {
  padding: 12px 14px;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
}

.feedback-admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 22px;
}

.feedback-list,
.member-orders {
  display: grid;
  gap: 12px;
}

.feedback-item,
.member-orders a {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(24, 26, 32, 0.08);
  border-radius: 8px;
  background: #fffaf0;
}

.feedback-item div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feedback-item button {
  border: 0;
  background: transparent;
  color: var(--tomato);
  font: inherit;
  font-weight: 950;
  cursor: pointer;
}

.feedback-item p,
.member-orders p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.7;
}

.feedback-item span,
.member-orders span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.member-orders h3 {
  margin-top: 18px;
}

.drive-box {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding: 18px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
}

.drive-box span,
.extract-code span {
  color: var(--cheese);
  font-weight: 900;
}

.drive-box code {
  overflow-wrap: anywhere;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.drive-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.drive-actions button,
.drive-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: var(--cheese);
  color: var(--ink);
  font-weight: 900;
}

.extract-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fffaf0;
}

.extract-code span {
  color: var(--muted);
}

.extract-code strong {
  color: var(--tomato);
  font-size: 36px;
}

.delivery-side {
  display: grid;
  gap: 18px;
  align-content: start;
}

.delivery-list,
.timeline {
  display: grid;
  gap: 12px;
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--ink-soft);
  line-height: 1.7;
}

.timeline {
  list-style: decimal;
}

.table-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.admin-page {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
  background: #fffaf0;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: grid;
  align-content: start;
  gap: 24px;
  min-height: 100vh;
  padding: 24px;
  background: var(--ink);
  color: #fff;
}

.admin-brand {
  min-width: 0;
}

.admin-brand small {
  color: #d8d2c4;
}

.admin-nav {
  display: grid;
  gap: 8px;
}

.admin-nav a,
.admin-home {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 8px;
  color: #f7efd9;
  font-weight: 900;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(255, 194, 71, 0.16);
  color: var(--cheese);
}

.admin-home {
  margin-top: 8px;
  background: var(--cheese);
  color: var(--ink);
  justify-content: center;
}

.admin-logout {
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: transparent;
  color: #f7efd9;
  font-weight: 900;
}

.admin-main {
  width: min(1240px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 78px;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-topbar h1 {
  margin-bottom: 0;
  font-size: clamp(38px, 5vw, 64px);
}

.admin-filter {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.admin-filter label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.admin-filter input {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 900;
}

.quick-ranges {
  display: flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 999px;
  background: #fff;
}

.quick-ranges button {
  min-height: 34px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 900;
}

.quick-ranges button.active {
  background: var(--ink);
  color: #fff;
}

.revenue-board {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
  margin-bottom: 18px;
}

.revenue-card {
  display: grid;
  gap: 10px;
  align-content: center;
  min-height: 190px;
  padding: 28px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 26, 32, 0.08);
}

a.revenue-card {
  text-decoration: none;
}

.revenue-card.primary {
  background: var(--ink);
  color: #fff;
}

.revenue-card span,
.revenue-card small {
  color: var(--muted);
  font-weight: 900;
}

.revenue-card.primary span,
.revenue-card.primary small {
  color: #e8e1d0;
}

.revenue-card strong {
  color: var(--tomato);
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1;
}

.revenue-card.primary strong {
  color: var(--cheese);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.compact-metrics article {
  min-height: 132px;
}

.admin-metrics article,
.admin-panel {
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(24, 26, 32, 0.08);
}

.admin-metrics article {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.admin-metrics span,
.admin-metrics small {
  color: var(--muted);
  font-weight: 800;
}

.admin-metrics strong {
  color: var(--tomato);
  font-size: 38px;
  line-height: 1;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px;
  margin-bottom: 18px;
}

.admin-panel {
  padding: 24px;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 900;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  font: inherit;
}

.admin-form input[type="file"] {
  display: flex;
  align-items: center;
  padding: 11px;
}

.admin-form input[type="url"] {
  font-family: Consolas, "Courier New", monospace;
}

.admin-form small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
}

.admin-form textarea {
  min-height: 102px;
  padding-top: 12px;
  resize: vertical;
}

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

.inline-combo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 8px;
}

.inline-combo input,
.inline-combo select {
  min-width: 0;
}

.membership-admin-grid {
  grid-template-columns: minmax(360px, 0.7fr) minmax(0, 1fr);
}

.membership-plan-form button {
  width: fit-content;
}

.form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.product-save-note {
  color: var(--muted);
  font-weight: 800;
}

.settings-grid {
  grid-template-columns: minmax(420px, 1fr) minmax(320px, 0.64fr);
}

.settings-preview {
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fffaf0;
}

.settings-preview span {
  color: var(--tomato);
  font-weight: 1000;
  text-transform: uppercase;
}

.settings-preview h3 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.08;
}

.settings-preview p,
.settings-preview small {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.7;
}

.settings-checklist {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(24, 26, 32, 0.08);
}

.settings-checklist h3 {
  margin: 0;
}

.settings-checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-weight: 900;
}

.payment-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.payment-preview-grid > div {
  display: grid;
  gap: 10px;
}

.payment-preview-qr {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 8px;
  background: #fffaf0;
  overflow: hidden;
}

.payment-preview-qr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dynamic-qr-sample {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  text-align: center;
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 48%, rgba(21, 24, 32, 0.16) 49% 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, rgba(21, 24, 32, 0.16) 49% 51%, transparent 52%),
    #fff8e8;
  background-size: 24px 24px;
}

.dynamic-qr-sample strong {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}

.dynamic-qr-sample span {
  font-size: 26px;
  font-weight: 900;
  color: var(--hot);
}

.dynamic-qr-sample small {
  color: var(--muted);
  font-weight: 800;
}

.payment-preview-qr span {
  color: var(--muted);
  font-weight: 900;
}

.launch-summary {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, minmax(140px, 0.5fr));
  gap: 14px;
  margin-bottom: 18px;
}

.launch-summary article {
  display: grid;
  gap: 8px;
  padding: 20px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fff;
}

.launch-summary span,
.launch-summary small {
  color: var(--muted);
  font-weight: 900;
}

.launch-summary strong {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1;
}

.launch-score-card {
  background: #181a20 !important;
  color: #fff;
}

.launch-score-card span,
.launch-score-card small {
  color: rgba(255, 255, 255, 0.72);
}

.launch-grid {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.58fr);
}

.launch-check-list,
.launch-action-list {
  display: grid;
  gap: 12px;
}

.launch-check-item,
.launch-action-item {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  text-decoration: none;
}

.launch-check-item strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.launch-check-item strong span {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(24, 26, 32, 0.08);
  color: var(--muted);
  font-size: 12px;
}

.launch-check-item p,
.launch-action-item small {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.55;
}

.launch-check-item.launch-blocked {
  border-color: rgba(255, 91, 58, 0.42);
  background: #fff0ea;
}

.launch-action-item {
  grid-template-columns: 42px 1fr;
  align-items: center;
}

.launch-action-item > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--cheese);
  color: var(--ink);
  font-weight: 1000;
}

.launch-manual-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-admin-list {
  display: grid;
  gap: 12px;
}

.plan-admin-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fffaf0;
}

.plan-admin-item.is-disabled {
  opacity: 0.62;
}

.plan-admin-item strong {
  display: block;
  margin-bottom: 6px;
}

.plan-admin-item span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.plan-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.plan-admin-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
}

.admin-member-preview {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-member-preview .member-plan {
  min-height: 270px;
}

.admin-note {
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.7;
}

.json-output {
  width: 100%;
  min-height: 260px;
  padding: 14px;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  font: 13px/1.6 Consolas, "Courier New", monospace;
  resize: vertical;
}

.wide-field {
  grid-column: 1 / -1;
}

.admin-radio-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 8px;
  background: #fffaf0;
}

.admin-radio-group legend {
  padding: 0 6px;
  color: var(--ink-soft);
  font-weight: 900;
}

.admin-radio-group label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.delivery-admin-list,
.member-admin-list {
  display: grid;
  gap: 12px;
}

.delivery-admin-list div,
.product-admin-list button,
.member-admin-list div {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid rgba(24, 26, 32, 0.08);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  text-align: left;
}

.product-admin-list button {
  cursor: pointer;
  font: inherit;
}

.product-admin-list button.active {
  border-color: rgba(24, 26, 32, 0.45);
  box-shadow: 0 0 0 3px rgba(255, 194, 71, 0.18);
}

.delivery-admin-list div.delivery-missing,
.product-admin-list button.delivery-missing {
  border-color: rgba(255, 194, 71, 0.55);
  background: #fff7df;
}

.delivery-admin-list div.delivery-ready,
.product-admin-list button.delivery-ready {
  border-color: rgba(84, 180, 138, 0.35);
}

.delivery-admin-list code,
.referral-admin-card code {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 900;
}

.delivery-admin-list span,
.product-admin-list span,
.member-admin-list span {
  color: var(--muted);
  font-weight: 800;
}

.member-toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: 14px 0;
}

.member-toolbar label {
  display: grid;
  flex: 1;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.member-toolbar input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fffaf0;
  color: var(--ink);
  font: inherit;
}

.member-list-row {
  display: grid;
  gap: 6px;
  width: 100%;
  border: 1px solid rgba(24, 26, 32, 0.08);
  border-radius: 8px;
  padding: 14px;
  background: #fffaf0;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.member-list-row:hover {
  border-color: rgba(242, 85, 44, 0.55);
}

.member-list-row em {
  color: var(--hot);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.member-admin-modal {
  width: min(920px, calc(100vw - 32px));
}

.member-detail-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 18px;
}

.audit-list {
  display: grid;
  gap: 10px;
}

.audit-list div {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid rgba(24, 26, 32, 0.08);
  border-radius: 8px;
  background: #fffaf0;
}

.audit-list span,
.audit-list small {
  color: var(--muted);
  font-weight: 800;
}

.admin-table {
  overflow: hidden;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr 0.48fr 0.68fr 0.54fr;
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
  border-top: 1px solid rgba(24, 26, 32, 0.08);
}

.admin-orders-page .admin-row {
  grid-template-columns: 1fr 1.18fr 0.92fr 0.9fr 0.46fr 0.62fr 0.5fr;
}

.admin-row:first-child {
  border-top: 0;
}

.admin-head {
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.admin-row mark {
  width: fit-content;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(42, 193, 132, 0.14);
  color: #148c5a;
  font-weight: 900;
}

.admin-row mark.warn {
  background: rgba(255, 194, 71, 0.24);
  color: #946200;
}

.admin-row button {
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.referral-admin-card {
  display: grid;
  gap: 16px;
}

.referral-admin-card > span {
  color: var(--muted);
  font-weight: 900;
}

.admin-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.admin-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-shortcuts a {
  display: flex;
  align-items: center;
  min-height: 62px;
  padding: 0 16px;
  border: 1px solid rgba(24, 26, 32, 0.08);
  border-radius: 8px;
  background: #fffaf0;
  color: var(--ink);
  font-weight: 900;
}

.admin-product-preview {
  margin-bottom: 22px;
}

.admin-product-preview .product-card {
  min-height: 0;
  cursor: default;
}

.admin-product-preview .product-card:hover,
.admin-product-preview .product-card:focus-visible {
  transform: none;
  box-shadow: none;
}

.product-list-heading {
  padding-top: 18px;
  border-top: 1px solid rgba(24, 26, 32, 0.08);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.pagination button {
  min-height: 38px;
  min-width: 38px;
  padding: 0 12px;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.pagination button.active {
  background: var(--ink);
  color: #fff;
}

.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 88% 12%, rgba(42, 193, 132, 0.16), transparent 28%),
    linear-gradient(180deg, #fff7e3 0%, #fffaf2 100%);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 460px;
  gap: 40px;
  align-items: center;
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 44px 0;
}

.login-brand h1 {
  max-width: 680px;
  margin: 42px 0 20px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.06;
}

.login-brand p {
  max-width: 620px;
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.75;
}

.login-panel {
  padding: 28px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-panel h2 {
  margin: 0 0 20px;
  font-size: 36px;
}

.login-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
  padding: 6px;
  border: 1px solid rgba(24, 26, 32, 0.1);
  border-radius: 999px;
  background: #fffaf0;
}

.login-tabs button {
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 900;
}

.login-tabs button.active {
  background: var(--ink);
  color: #fff;
}

.login-form {
  display: none;
  gap: 16px;
}

.login-form.active {
  display: grid;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-weight: 900;
}

.login-form input {
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid rgba(24, 26, 32, 0.14);
  border-radius: 8px;
  background: #fffaf0;
  font: inherit;
}

.inline-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  gap: 10px;
  align-items: end;
}

.inline-field button {
  min-height: 50px;
  border: 0;
  border-radius: 8px;
  background: var(--cheese);
  color: var(--ink);
  font-weight: 900;
}

.qr-login {
  text-align: center;
}

.qr-box {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin: 0 auto 18px;
  border: 10px solid var(--cream);
  border-radius: 8px;
  background: #fffaf0;
}

.qr-box img {
  width: 132px;
  height: 132px;
}

.qr-login p,
.login-note {
  color: var(--muted);
  line-height: 1.7;
}

.login-note {
  margin: 16px 0 0;
}

.login-helpbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 2px 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.guest-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 12px;
  border: 1px solid rgba(24, 26, 32, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.text-link {
  display: inline-flex;
  width: 100%;
  justify-content: center;
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--tomato);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.text-link.inline-link {
  width: auto;
  margin-top: 0;
  padding: 0;
  white-space: nowrap;
}

.avatar-field {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  color: var(--ink-soft);
  font-weight: 900;
}

.avatar-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.avatar-options button {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid rgba(24, 26, 32, 0.12);
  border-radius: 8px;
  background: #fffaf0;
  cursor: pointer;
}

.avatar-options button.active {
  border-color: var(--tomato);
  box-shadow: 0 0 0 4px rgba(240, 90, 58, 0.12);
}

.avatar-options img {
  max-width: 46px;
  max-height: 46px;
}

@media (max-width: 980px) {
  .site-header {
    flex-wrap: wrap;
  }

  .main-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 32px;
  }

  .hero-board {
    justify-content: flex-start;
  }

  .product-grid,
  .bundle-grid,
  .member-compare,
  .quality-section {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .membership-section {
    grid-template-columns: 1fr;
    padding: 34px;
  }

  .member-copy {
    grid-template-columns: 1fr;
  }

  .account-hero,
  .account-grid,
  .referral-section,
  .order-hero,
  .order-detail-hero,
  .feedback-admin-layout,
  .delivery-layout {
    grid-template-columns: 1fr;
  }

  .orders-row {
    grid-template-columns: 1fr;
  }

  .orders-head {
    display: none;
  }

  .admin-page {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: relative;
    min-height: 0;
  }

  .admin-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-main {
    width: min(100% - 32px, 1240px);
  }

  .admin-metrics,
  .admin-grid,
  .membership-admin-grid,
  .revenue-board,
  .settings-grid,
  .launch-grid,
  .launch-summary,
  .launch-manual-list {
    grid-template-columns: 1fr 1fr;
  }

  .admin-member-preview {
    grid-template-columns: 1fr;
  }

  .admin-row {
    grid-template-columns: 1fr;
  }

  .plan-admin-item {
    grid-template-columns: 1fr;
  }

  .plan-admin-actions {
    justify-content: flex-start;
  }

  .admin-orders-page .admin-row {
    grid-template-columns: 1fr;
  }

  .admin-head {
    display: none;
  }
}

@media (max-width: 680px) {
  .site-header,
  .hero,
  .market-section,
  .bundles-section,
  .membership-section,
  .quality-section,
  .category-strip,
  .site-footer {
    width: min(100% - 28px, 1180px);
  }

  .brand small {
    display: none;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-text {
    font-size: 17px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .product-grid,
  .bundle-grid,
  .member-compare,
  .quality-section {
    grid-template-columns: 1fr;
  }

  .category-strip {
    margin-bottom: 44px;
    border-radius: 8px;
  }

  .market-section,
  .bundles-section,
  .quality-section {
    padding: 52px 0;
  }

  .membership-section {
    padding: 26px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer img {
    max-width: 100%;
  }

  .modal-shell {
    padding: 14px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
    padding: 22px;
  }

  .detail-preview {
    min-height: 260px;
  }

  .detail-actions,
  .checkout-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .checkout-panel {
    padding: 24px;
  }

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

  .account-modal-head,
  .account-form,
  .profile-form {
    padding-left: 20px;
    padding-right: 20px;
  }

  .avatar-uploader,
  .profile-fields,
  .profile-modal .avatar-uploader,
  .profile-modal .profile-fields {
    grid-template-columns: 1fr;
  }

  .account-note {
    margin-left: 20px;
    margin-right: 20px;
  }

  .account-shell,
  .order-shell {
    width: min(100% - 28px, 1180px);
  }

  .profile-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-edit {
    position: static;
    margin-left: 0;
  }

  .info-list,
  .stats-grid,
  .security-form {
    grid-template-columns: 1fr;
  }

  .order-hero,
  .delivery-card {
    padding: 22px;
  }

  .extract-code {
    align-items: flex-start;
    flex-direction: column;
  }

  .payment-box {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .admin-filter {
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
  }

  .quick-ranges {
    overflow-x: auto;
    border-radius: 8px;
  }

  .admin-nav,
  .admin-metrics,
  .admin-grid,
  .admin-form,
  .membership-admin-grid,
  .admin-stats,
  .revenue-board,
  .settings-grid,
  .launch-grid,
  .launch-summary,
  .launch-manual-list,
  .admin-shortcuts,
  .admin-radio-group {
    grid-template-columns: 1fr;
  }

  .login-tabs,
  .inline-field {
    grid-template-columns: 1fr;
    border-radius: 8px;
  }
}
