:root {
  color-scheme: dark;
  --bg: #101110;
  --panel: #191a18;
  --input: #131412;
  --border: #2d302a;
  --line: #2a2d27;
  --text: #f5f6f1;
  --muted: #a0a298;
  --accent: #d0fa55;
  --accent-muted: #252e17;
  --danger: #ffaba6;
  --radius: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p, h1, h2, h3, dl, dd { margin: 0; }
svg { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.symbol-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.shell { width: min(100% - 64px, 1080px); margin-inline: auto; }
.header { border-bottom: 1px solid #252723; background: #121310; }
.header-inner { min-height: 73px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; justify-self: start; font-size: 17px; font-weight: 900; line-height: 1.05; letter-spacing: -.055em; white-space: nowrap; }
.brand img { border-radius: 10px; border: 1px solid #373b32; object-fit: cover; }
.brand-shop { color: var(--accent); margin-left: 4px; }
.brand small { font-size: 10px; font-weight: 500; letter-spacing: .01em; color: var(--muted); display: block; margin-top: 5px; }
.main-nav { display: flex; align-items: center; gap: 5px; }
.main-nav a { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 650; padding: 10px 14px; border-radius: 10px; white-space: nowrap; }
.main-nav a svg { width: 18px; height: 18px; }
.main-nav a:hover { color: var(--text); }
.main-nav a[aria-current] { color: var(--accent); background: #22291a; }
.demo-toggle { justify-self: end; padding: 7px 10px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 8px; background: transparent; color: var(--muted); white-space: nowrap; font-size: 12px; }
.demo-toggle:hover { color: var(--text); border-color: var(--muted); }
.demo-toggle svg { width: 15px; height: 15px; }

.main { padding-top: 28px; }
.hero { position: relative; min-height: 285px; overflow: hidden; isolation: isolate; display: flex; align-items: center; border: 1px solid #303329; border-radius: 24px; background: #0c0d0a; }
.hero-image { position: absolute; z-index: -2; width: 65%; height: 100%; inset: 0 0 0 auto; object-fit: cover; object-position: 50% 55%; }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#0c0d0a 0%,#0c0d0a 32%,#0c0d0a00 72%); }
.hero-content { padding: 35px 41px 38px; }
.hero-eyebrow { display: flex; gap: 9px; align-items: center; font-size: 10px; font-weight: 760; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.hero-eyebrow span { width: 15px; height: 1px; background: var(--accent); }
.hero h1 { font-size: clamp(52px, 6.1vw, 81px); font-weight: 860; line-height: .89; letter-spacing: -.081em; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-content > p:last-child { font-size: 14px; line-height: 1.5; color: #c1c3b9; max-width: 265px; margin-top: 18px; }

.calculator-grid { display: grid; grid-template-columns: 1.52fr 1fr; align-items: start; gap: 17px; margin-top: 17px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.order-form, .summary { padding: 25px; }
.section-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.heading-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto; color: var(--accent); background: var(--accent-muted); border: 1px solid #344123; border-radius: 11px; }
.section-heading h2 { font-size: 20px; letter-spacing: -.038em; line-height: 1.15; }
.section-heading p, .field-note { color: var(--muted); font-size: 12px; margin-top: 4px; line-height: 1.35; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 13px; }
.wide { grid-column: 1 / -1; }
.field { display: grid; gap: 8px; min-width: 0; }
.field > span:first-child { font-weight: 650; font-size: 13px; }
.field small { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 5px; }
.input-wrap, textarea, select { border: 1px solid #33362d; border-radius: 9px; background: var(--input); }
.input-wrap { display: flex; align-items: center; gap: 9px; padding: 0 12px; min-height: 44px; }
.input-wrap:focus-within, textarea:focus { border-color: var(--accent); }
.input-wrap svg { color: var(--muted); height: 17px; width: 17px; }
.unit { color: var(--accent); font-size: 13px; font-weight: 750; white-space: nowrap; }
input { width: 100%; min-width: 0; padding: 10px 0; border: 0; background: transparent; }
input:focus, textarea:focus { outline: none; }
input, textarea { font-size: 14px; }
input::placeholder, textarea::placeholder { color: #919389; opacity: 1; }
textarea { resize: vertical; min-height: 58px; width: 100%; padding: 11px 12px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.presets button { border: 1px solid #34382e; color: #c2c5bb; background: #21231e; min-height: 31px; padding: 4px 11px; border-radius: 7px; font-size: 11px; font-weight: 650; }
.presets button:hover, .presets button[aria-pressed="true"] { color: var(--accent); border-color: #697f38; }
.field-note { font-size: 11px; margin-top: 6px; }

.summary { container-type: inline-size; }
.rate-box { display: grid; gap: 6px; background: #1e2318; border: 1px solid #333c25; border-radius: 11px; padding: 12px; }
.rate-line { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-size: 12px; color: #c7cbbd; }
.rate-line strong { color: var(--accent); text-align: right; }
.rate-line:last-child { font-size: 11px; color: var(--muted); }
.rate-dot { width: 6px; height: 6px; display: inline-block; background: var(--accent); border-radius: 100%; margin: 0 7px 2px 0; }
.text-button { border: 0; padding: 0; background: transparent; color: var(--accent); font-size: inherit; }
.breakdown { display: grid; gap: 13px; padding: 20px 0 17px; }
.breakdown > div, .grand-total { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.breakdown dt { color: #d0d1c9; font-size: 13px; }
.breakdown small { margin-left: 3px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.breakdown dd { font-size: 13px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.discount { color: var(--accent); }
.grand-total { border-top: 1px solid #35392e; padding-top: 17px; margin-bottom: 14px; }
.grand-total span { font-size: 13px; color: #e1e4d8; font-weight: 650; }
.grand-total strong { font-size: clamp(21px, 9cqw, 43px); color: var(--accent); letter-spacing: -.062em; line-height: 1; text-align: right; font-variant-numeric: tabular-nums; }
.primary { width: 100%; gap: 10px; display: flex; justify-content: center; align-items: center; min-height: 45px; background: var(--accent); color: #141909; border: 1px solid transparent; border-radius: 10px; font-weight: 850; font-size: 14px; }
.primary:hover:not(:disabled) { background: #e0ff8e; }
.primary:disabled { opacity: .62; }
.primary svg { width: 17px; height: 17px; }
.order-note { display: flex; justify-content: center; gap: 6px; align-items: center; margin-top: 11px; font-size: 11px; color: var(--muted); text-align: center; line-height: 1.4; }
.order-note svg { width: 13px; height: 13px; }
.error { color: var(--danger); font-size: 12px; margin-top: 10px; line-height: 1.4; }

.notice { background: #241d1a; border: 1px solid #55352e; padding: 14px 16px; border-radius: 12px; color: var(--danger); font-size: 14px; line-height: 1.4; margin: 16px 0; }
.success { color: var(--accent); background: #222918; border-color: #465831; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.success a, .empty a { text-decoration: underline; text-underline-offset: 3px; }
.inner-view { min-height: 62vh; }
.page-title { padding: 18px 0 22px; }
.page-title h1 { font-size: clamp(30px, 5vw, 54px); line-height: 1.05; letter-spacing: -.065em; }
.page-title p { margin-top: 9px; color: var(--muted); font-size: 14px; }
.profile-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 15px; margin-bottom: 15px; }
.profile-card, .tier-card { padding: 22px; display: flex; align-items: center; gap: 14px; overflow-wrap: anywhere; }
.profile-card h2, .tier-card h2, .listing h2 { font-size: 21px; letter-spacing: -.035em; }
.profile-card p, .tier-card p { font-size: 13px; color: var(--muted); margin: 4px 0; }
.tier-card span:not(.heading-icon) { color: var(--accent); font-size: 13px; }
.profile-avatar { display: grid; place-items: center; color: var(--accent); width: 45px; height: 45px; border-radius: 12px; background: var(--accent-muted); font-size: 21px; font-weight: 800; flex-shrink: 0; }
.listing { padding: 20px; }
.list-heading, .list-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; flex-wrap: wrap; }
.list-heading { margin-bottom: 14px; }
.secondary, select, .segmented button { padding: 8px 10px; min-height: 36px; background: #22241e; border: 1px solid var(--border); color: var(--text); border-radius: 8px; font-size: 13px; }
.secondary:hover, .segmented button:hover { border-color: #697f38; }
.segmented { display: flex; gap: 6px; }
.segmented button[aria-pressed="true"] { color: var(--accent); border-color: #697f38; background: var(--accent-muted); }
.empty { color: var(--muted); font-size: 14px; padding: 20px 0; }
.order-entry { border-top: 1px solid var(--border); padding: 12px 0; }
.order-entry summary { cursor: pointer; align-items: center; gap: 9px; display: grid; grid-template-columns: 1fr auto auto; }
.order-entry summary::-webkit-details-marker { display: none; }
.order-entry summary::after { grid-column: 3; grid-row: 1; content: '＋'; color: var(--muted); }
.order-entry[open] summary::after { content: '−'; }
.order-entry summary span:first-child { min-width: 0; overflow-wrap: anywhere; }
.order-entry summary strong { display: block; font-size: 15px; }
.order-entry summary small { font-size: 12px; color: var(--muted); }
.order-details { display: grid; gap: 8px; margin: 13px 0 2px; font-size: 13px; line-height: 1.45; }
.order-details div { overflow-wrap: anywhere; }
.order-details dt { color: var(--muted); display: inline; margin-right: 7px; }
.order-details dd { display: inline; }
.order-details a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.order-details select { margin-left: 3px; }
.status { font-size: 11px; color: #e0e2d9; padding: 5px 8px; background: #2b2e25; border-radius: 6px; white-space: nowrap; }
.status[data-status="new"], .status[data-status="delivered"] { color: var(--accent); background: var(--accent-muted); }
.status[data-status="cancelled"] { color: var(--danger); background: #382321; }
.customer-row { border-top: 1px solid var(--border); padding: 11px 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.customer-row div { min-width: 0; overflow-wrap: anywhere; }
.customer-row strong { font-size: 14px; }
.customer-row small { display: block; color: var(--muted); margin-top: 3px; }
.more { margin-top: 8px; }
.footer { padding: 18px 2px 22px; color: #a2a499; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; font-size: 11px; }
.footer span:first-child { letter-spacing: .12em; font-weight: 760; }

@media (max-width: 850px) {
  .shell { width: calc(100% - 36px); }
  .calculator-grid { grid-template-columns: 1.23fr 1fr; gap: 12px; }
  .order-form, .summary { padding: 19px; }
  .hero-content { padding-left: 30px; }
}
@media (max-width: 640px) {
  .shell { width: calc(100% - 26px); }
  .header-inner { min-height: 59px; grid-template-columns: 1fr auto; }
  .brand img { width: 35px; height: 35px; border-radius: 8px; }
  .brand { font-size: 15px; gap: 8px; }
  .brand small { font-size: 9px; margin-top: 4px; }
  .main-nav { position: fixed; z-index: 5; bottom: 0; left: 0; right: 0; background: #151713; border-top: 1px solid #33372d; justify-content: center; padding: 5px 9px calc(5px + max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px))); }
  .main-nav a { flex: 1 1 0; flex-direction: column; justify-content: center; gap: 3px; font-size: 11px; padding: 5px 4px 6px; }
  .main-nav a svg { width: 17px; height: 17px; }
  .main { padding-top: 12px; padding-bottom: calc(54px + max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px))); }
  .hero { min-height: 205px; border-radius: 16px; }
  .hero-content { padding: 19px 14px; }
  .hero-image { width: 78%; object-position: 50% 53%; }
  .hero::after { background: linear-gradient(90deg,#0c0d0a 0%,#0c0d0af0 21%,#0c0d0a88 51%,#0c0d0a00 80%); }
  .hero-eyebrow { font-size: 8px; letter-spacing: .09em; gap: 5px; margin-bottom: 11px; }
  .hero-eyebrow span { width: 10px; }
  .hero h1 { font-size: clamp(42px, 11.6vw, 59px); }
  .hero-content > p:last-child { font-size: 11px; max-width: 155px; margin-top: 12px; }
  .calculator-grid { margin-top: 12px; grid-template-columns: 1fr; }
  .panel { border-radius: 15px; }
  .order-form, .summary, .listing { padding: 16px; }
  .section-heading { margin-bottom: 17px; }
  .section-heading h2 { font-size: 19px; }
  .heading-icon { width: 37px; height: 37px; }
  .fields { gap: 13px 9px; }
  .input-wrap { padding: 0 8px; }
  input, textarea, select { font-size: 16px; }
  input::placeholder, textarea::placeholder { font-size: 13px; }
  .profile-grid { grid-template-columns: 1fr; gap: 12px; }
  .profile-card, .tier-card { padding: 16px; }
  .page-title { padding-top: 10px; }
  .admin-heading { align-items: flex-start; }
  .admin-heading select, .customer-row select { font-size: 13px; }
}
