:root {
  color-scheme: light;
  --bg: #070708;
  --black: #0c0c0d;
  --panel: #f2f1ee;
  --panel-soft: #ffffff;
  --panel-mid: #dedbd4;
  --ink: #171717;
  --ink-soft: #505050;
  --muted: #7a756b;
  --gold: #d7a84a;
  --gold-strong: #f1cb73;
  --gold-deep: #9a6d28;
  --line: rgba(0, 0, 0, 0.14);
  --line-dark: rgba(255, 255, 255, 0.16);
  --green: #3c9d60;
  --amber: #d99a2e;
  --coral: #d9694f;
  --selected-filament: #f7f4eb;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
  --focus-ring: rgba(10, 132, 255, 0.32);
  --primary-color: #b47a1f;
  --primary-contrast: #ffffff;
  --motion-spring: cubic-bezier(0.22, 1, 0.36, 1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(215, 168, 74, 0.08), transparent 230px),
    var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button,
input,
select,
.tool-section,
.print-check,
.ring-category-tabs button,
.segmented button {
  transition:
    color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 220ms ease,
    transform 240ms var(--motion-spring),
    opacity 180ms ease;
}

button:active:not(:disabled) {
  transform: scale(0.97);
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

button:disabled {
  cursor: wait;
  opacity: 0.64;
}

body.access-locked {
  overflow: hidden;
}

body.access-locked .app-shell {
  max-height: 100vh;
  overflow: hidden;
  filter: blur(12px) saturate(0.7);
  transform: scale(0.992);
  pointer-events: none;
  user-select: none;
}

body.access-granted .access-gate {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 42px);
  background: rgba(7, 7, 8, 0.96);
  transition:
    opacity 220ms ease,
    visibility 220ms ease;
}

.access-card {
  width: min(520px, 100%);
  border: 1px solid rgba(215, 168, 74, 0.48);
  border-radius: 8px;
  padding: clamp(24px, 4vw, 38px);
  background: linear-gradient(180deg, #191816, #0e0e0f);
  color: #fff9ed;
  box-shadow: var(--shadow);
}

.access-mark {
  width: 58px;
  aspect-ratio: 1;
  display: block;
  border: 10px solid var(--gold);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 5px #111012,
    0 0 34px rgba(215, 168, 74, 0.28);
}

.access-eyebrow {
  margin: 22px 0 8px;
  color: var(--gold-strong);
  font-size: 0.78rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.access-card h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.8rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.access-copy {
  max-width: 38rem;
  margin: 16px 0 0;
  color: #d8cdb8;
  font-size: 1rem;
  line-height: 1.55;
}

.access-form {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.access-form label {
  color: #d5c9b2;
  font-size: 0.82rem;
  font-weight: 760;
}

.access-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.access-row input {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  border: 1px solid var(--line-dark);
  background: rgba(255, 255, 255, 0.08);
  color: #fff9ed;
  padding: 0 14px;
  outline: none;
}

.access-row input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 168, 74, 0.16);
}

.access-message {
  min-height: 22px;
  margin: 0;
  color: #c7b99f;
  font-size: 0.86rem;
  line-height: 1.35;
}

.access-message.error {
  color: #ffb097;
}

.access-message.success {
  color: #a9e0bb;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px clamp(16px, 3vw, 34px);
  border-bottom: 1px solid rgba(215, 168, 74, 0.28);
  background: rgba(9, 9, 10, 0.92);
  color: #fff9ed;
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: wrap;
}

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

.brand-mark {
  width: 40px;
  aspect-ratio: 1;
  border: 8px solid var(--gold);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 4px #111012,
    0 0 22px rgba(215, 168, 74, 0.22);
  flex: 0 0 auto;
}

.merchant-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.15;
}

.brand span {
  color: #c7b99f;
  font-size: 0.82rem;
  margin-top: 3px;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 0 auto;
}

.top-downloads {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border: 1px solid rgba(215, 168, 74, 0.42);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.top-downloads > span {
  padding: 0 5px 0 7px;
  color: #d5c9b2;
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
  white-space: nowrap;
}

.top-download-button {
  min-width: 54px;
  min-height: 38px;
  padding: 0 10px;
}

.studio-orders-launch {
  min-width: 104px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid rgba(215, 168, 74, 0.42);
  border-radius: 8px;
  color: #f7efe1;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.75rem;
  font-weight: 820;
}

.studio-orders-launch strong {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #17120b;
  background: var(--gold);
  font-size: 0.7rem;
}

.studio-orders-launch:focus-visible {
  outline: 3px solid rgba(215, 168, 74, 0.34);
  outline-offset: 2px;
}

.ui-mode-toggle {
  min-height: 54px;
  display: grid;
  grid-template-columns: repeat(2, minmax(92px, 1fr));
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.ui-mode-toggle button {
  min-height: 48px;
  padding: 0 10px;
  border: 0;
  border-radius: 5px;
  color: #cfc5b3;
  background: transparent;
  font-size: 0.74rem;
  font-weight: 820;
}

.ui-mode-toggle button[aria-pressed="true"] {
  color: #17120b;
  background: var(--gold);
}

.ui-mode-toggle button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.top-fillet-control {
  min-width: 250px;
  min-height: 40px;
  display: grid;
  grid-template-columns: auto minmax(92px, 1fr) 62px;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border: 1px solid var(--line-dark);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.top-fillet-control span {
  color: #d5c9b2;
  font-size: 0.72rem;
  font-weight: 820;
  text-transform: uppercase;
  white-space: nowrap;
}

.top-fillet-control input {
  min-width: 0;
}

.top-fillet-control output {
  color: var(--gold-strong);
  font-size: 0.74rem;
  text-align: right;
}

.button {
  min-height: 40px;
  border-radius: 8px;
  padding: 0 15px;
  border: 1px solid transparent;
  font-weight: 780;
  color: #fff9ed;
}

.button.primary {
  background: linear-gradient(180deg, var(--gold-strong), var(--gold));
  color: #17120b;
  box-shadow: 0 10px 26px rgba(215, 168, 74, 0.2);
}

.button.primary:hover {
  background: linear-gradient(180deg, #f8dc92, var(--gold));
}

.button.secondary,
.button.ghost {
  background: rgba(255, 255, 255, 0.05);
  color: #fff9ed;
  border-color: var(--line-dark);
}

.button.secondary:hover,
.button.ghost:hover {
  border-color: rgba(215, 168, 74, 0.55);
  color: var(--gold-strong);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "studio"
    "backer";
  gap: 0;
  align-items: stretch;
}

.hero-panel {
  grid-area: hero;
  min-height: calc(100vh - 68px);
  position: sticky;
  top: 68px;
  align-self: start;
  display: grid;
  align-content: center;
  gap: clamp(24px, 5vw, 52px);
  padding: clamp(28px, 5vw, 58px);
  color: #fff9ed;
  background:
    radial-gradient(ellipse at 76% 24%, rgba(255, 255, 255, 0.16), transparent 28%),
    radial-gradient(ellipse at 90% 54%, rgba(215, 168, 74, 0.16), transparent 36%),
    linear-gradient(180deg, #0f0f10, #070708);
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 36%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.66), transparent);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-copy h1 {
  margin: 0;
  color: var(--gold-strong);
  font-size: clamp(3rem, 7vw, 6rem);
  font-weight: 950;
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0;
}

.hero-tagline {
  margin: 14px 0 0;
  color: var(--gold);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  font-weight: 820;
}

.hero-copyline {
  max-width: 34rem;
  margin: 18px 0 0;
  color: #f0eadf;
  font-size: 1rem;
  line-height: 1.5;
}

.hero-features {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

.hero-features span {
  min-height: 30px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #fff7e7;
  font-size: 0.96rem;
}

.hero-features span::before {
  content: "";
  width: 18px;
  aspect-ratio: 1;
  border: 2px solid var(--gold);
  border-radius: 4px;
  box-shadow: inset 0 0 0 4px rgba(215, 168, 74, 0.12);
}

.hero-ring {
  position: relative;
  z-index: 1;
  width: min(360px, 78vw);
  aspect-ratio: 1.25;
  justify-self: center;
  filter: drop-shadow(0 32px 40px rgba(0, 0, 0, 0.46));
}

.hero-ring span,
.hero-ring i {
  position: absolute;
  inset: 16% 7%;
  border-radius: 50%;
  transform: rotate(-18deg) skewX(-8deg);
}

.hero-ring span {
  border: clamp(28px, 6vw, 58px) solid #d4d0c7;
  background: transparent;
  box-shadow:
    inset 22px 8px 24px rgba(0, 0, 0, 0.55),
    inset -16px -10px 22px rgba(255, 255, 255, 0.56),
    0 0 0 7px rgba(255, 255, 255, 0.08);
}

.hero-ring i {
  inset: 22% 15%;
  border: clamp(9px, 2vw, 18px) dashed rgba(15, 15, 16, 0.62);
  opacity: 0.78;
}

.studio-frame {
  grid-area: studio;
  min-width: 0;
  padding: clamp(16px, 2vw, 28px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(232, 230, 225, 0.96)),
    var(--panel);
}

.studio-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin: 0 0 12px;
  color: var(--ink);
}

.studio-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 2.2rem);
  line-height: 1;
  text-transform: uppercase;
}

.studio-heading p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.studio-heading strong {
  color: var(--ink);
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  text-transform: uppercase;
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(560px, 1fr) minmax(292px, 350px);
  min-height: calc(100vh - 186px);
  border: 1px solid #111;
  border-radius: 8px;
  overflow: clip;
  background: #efeee9;
  box-shadow: var(--shadow);
}

.controls-pane {
  min-width: 0;
}

.right-pane {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 12px;
  background: #e6e3dc;
  border-left: 1px solid rgba(0, 0, 0, 0.16);
}

.viewer-pane {
  display: grid;
  grid-template-rows: auto minmax(410px, 1fr) auto auto;
  gap: 0;
  min-width: 0;
  position: sticky;
  top: 82px;
  align-self: start;
  background: #f5f4f1;
}

.viewer-quick-tools {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(230px, 0.8fr);
  gap: 10px;
  padding: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.14);
  background: #e6e3dc;
}

.viewer-quick-tools .tool-section {
  min-width: 0;
}

.stage-label {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.14);
  color: var(--muted);
}

.stage-label span {
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stage-label strong {
  color: var(--gold-deep);
  font-size: 0.92rem;
}

.canvas-shell {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  background: #30353b;
}

#ringCanvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

#ringCanvas:active {
  cursor: grabbing;
}

.plate-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  min-width: 116px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(22, 26, 29, 0.84);
  color: #f5f7f8;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.plate-badge strong,
.plate-badge span {
  display: block;
  line-height: 1.2;
}

.plate-badge strong {
  font-size: 0.76rem;
}

.plate-badge span {
  margin-top: 3px;
  color: #aeb8c0;
  font-size: 0.64rem;
  font-weight: 700;
}

.viewport-toolbar {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
}

.view-button-group {
  display: flex;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 7px;
  background: rgba(22, 26, 29, 0.86);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(8px);
}

.view-button {
  min-width: 42px;
  height: 40px;
  border: 0;
  border-radius: 5px;
  padding: 0 8px;
  background: transparent;
  color: #c7cfd4;
  font: inherit;
  font-size: 0.67rem;
  font-weight: 800;
  cursor: pointer;
}

.view-button:hover,
.view-button:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.view-button.is-active {
  background: #dca947;
  color: #15181a;
}

.viewport-hud {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  pointer-events: none;
}

.viewport-hud div {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 10px;
  background: rgba(27, 31, 35, 0.82);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
}

.viewport-hud span,
.summary-list span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
  letter-spacing: 0;
  text-transform: uppercase;
}

.viewport-hud strong,
.summary-list strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: clamp(0.86rem, 1.2vw, 1rem);
  line-height: 1.15;
}

.viewport-hud span {
  color: #aeb8c0;
}

.viewport-hud strong {
  color: #f5f7f8;
}

.tool-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.7);
}

.disclosure-card > summary,
.inline-options > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.disclosure-card > summary::-webkit-details-marker,
.inline-options > summary::-webkit-details-marker {
  display: none;
}

.disclosure-card > summary::after,
.inline-options > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--gold-deep);
  font-size: 1.1rem;
  font-weight: 780;
}

.disclosure-card[open] > summary::after,
.inline-options[open] > summary::after {
  content: "−";
}

.disclosure-card > .section-heading {
  margin-bottom: 0;
}

.disclosure-card[open] > .section-heading {
  margin-bottom: 12px;
}

.inline-options {
  margin-top: 10px;
  border-block: 1px solid rgba(0, 0, 0, 0.11);
}

.inline-options > summary {
  color: var(--gold-deep);
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.inline-options[open] {
  padding-bottom: 4px;
}

.viewer-recommendations.disclosure-card > summary::after {
  color: var(--gold);
}

.texture-library {
  height: 100%;
  border: 0;
  border-radius: 0;
  padding: 12px;
  background: transparent;
  color: #fff9ed;
}

.conversion-panel {
  border-color: rgba(215, 168, 74, 0.52);
  box-shadow: 0 0 0 1px rgba(215, 168, 74, 0.12);
}

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

.section-heading h2 {
  font-size: 0.92rem;
  margin: 0;
  text-transform: uppercase;
}

.section-heading span {
  color: var(--gold-deep);
  font-size: 0.74rem;
  font-weight: 820;
}

.texture-library .section-heading span,
.texture-library .section-heading h2 {
  color: var(--gold-strong);
}

.control {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.initial-selector[hidden],
.catalog-collection-selector[hidden],
.catalog-design-selector[hidden],
.catalog-feature-control[hidden] {
  display: none;
}

.control > span {
  color: #333;
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.engraving-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.engraving-label small {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.control input[type="text"],
.control input[type="number"],
.control select {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  min-height: 42px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #f9f9f7;
  color: var(--ink);
  padding: 0 10px;
  outline: none;
}

.control select option {
  color: var(--ink);
}

.control input[type="text"]:focus,
.control input[type="number"]:focus,
.control select:focus,
.control input[type="range"]:focus-visible {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(215, 168, 74, 0.18);
}

.control input:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.range-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 74px;
  align-items: center;
  gap: 10px;
}

input[type="range"] {
  accent-color: var(--gold-deep);
  width: 100%;
  min-height: 36px;
}

output {
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 760;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.split-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.orientation-grid .control {
  margin-top: 0;
}

.orientation-grid .stepper input {
  min-width: 0;
  padding: 0 6px;
}

.orientation-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
}

.orientation-actions button {
  min-width: 0;
  min-height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  padding: 0 6px;
  background: #f9f9f7;
  color: var(--ink);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}

.orientation-actions button:hover,
.orientation-actions button:focus-visible {
  border-color: var(--gold-deep);
  background: #fff8e8;
}

.text-style-controls {
  align-items: end;
}

.text-safety-note {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.font-toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  margin-top: 10px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.font-toggle > span {
  font-size: 0.78rem;
  font-weight: 760;
  text-transform: uppercase;
}

.font-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.font-toggle i {
  position: relative;
  width: 30px;
  height: 18px;
  border-radius: 999px;
  background: #c7c2b9;
  transition: background 160ms ease;
}

.font-toggle i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform 160ms ease;
}

.font-toggle input:checked + i {
  background: var(--gold-deep);
}

.font-toggle input:checked + i::after {
  transform: translateX(12px);
}

.font-toggle:focus-within {
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(215, 168, 74, 0.18);
}

.base-file-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(215, 168, 74, 0.42);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 244, 236, 0.76));
}

.ring-category-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  margin-bottom: 10px;
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 8px;
  background: #d7d3ca;
}

.ring-category-tabs button:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.ring-library-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-bottom: 8px;
}

.ring-search {
  min-width: 0;
}

.ring-search input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  outline: 0;
}

.ring-search input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
}

.favorites-filter {
  min-width: 48px;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 7px;
  padding: 0 10px;
  color: #514c43;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 820;
}

.favorites-filter > span:first-child {
  color: var(--gold-deep);
  font-size: 1rem;
}

.favorites-filter small {
  min-width: 20px;
  min-height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2f2f2d;
  font-size: 0.67rem;
}

.favorites-filter[aria-pressed="true"] {
  border-color: var(--gold-deep);
  color: #17120b;
  background: color-mix(in srgb, var(--gold) 28%, #fff);
}

.ring-browser {
  max-height: 258px;
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  padding-right: 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.ring-choice {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.86);
  overflow: hidden;
}

.ring-choice[data-selected="true"] {
  border-color: var(--primary-color);
  box-shadow: inset 3px 0 0 var(--primary-color);
}

.ring-choice-main,
.ring-favorite {
  min-width: 0;
  min-height: 54px;
  border: 0;
  color: var(--ink);
  background: transparent;
}

.ring-choice-main {
  display: block;
  padding: 8px 11px;
  text-align: left;
}

.ring-choice-main strong,
.ring-choice-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ring-choice-main strong {
  font-size: 0.82rem;
  line-height: 1.2;
}

.ring-choice-main span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 680;
}

.ring-favorite {
  width: 48px;
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  color: #777269;
  font-size: 1.25rem;
}

.ring-favorite[aria-pressed="true"] {
  color: var(--gold-deep);
  background: color-mix(in srgb, var(--gold) 18%, #fff);
}

.ring-search-empty {
  margin: 0 0 10px;
  padding: 14px 10px;
  border: 1px dashed rgba(0, 0, 0, 0.22);
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.ring-sizer-launch {
  width: 100%;
  min-height: 48px;
  border-color: rgba(0, 0, 0, 0.22);
  color: var(--ink);
  background: #fff;
}

.ring-sizer-launch:hover,
.ring-sizer-launch:focus-visible {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.ring-sizer-modal {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  overflow: hidden;
}

.ring-sizer-modal::backdrop {
  background: rgba(7, 7, 8, 0.74);
  backdrop-filter: blur(8px);
}

.ring-sizer-card {
  display: grid;
  gap: 16px;
  max-height: calc(100dvh - 32px);
  padding: 22px;
  overflow-y: auto;
}

.ring-sizer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ring-sizer-header span {
  color: var(--primary-color);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ring-sizer-header h2 {
  margin: 3px 0 0;
  font-size: 1.35rem;
}

.ring-sizer-close {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 0;
  border-radius: 50%;
  color: #343434;
  background: #ececea;
  font-size: 1.65rem;
  line-height: 1;
}

.ring-sizer-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: #e9e8e4;
}

.ring-sizer-tabs button {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  color: #4c4b48;
  background: transparent;
  font-weight: 760;
}

.ring-sizer-tabs button[aria-selected="true"] {
  color: var(--primary-contrast);
  background: var(--primary-color);
}

.ring-sizer-panel {
  display: grid;
  gap: 14px;
}

.ring-sizer-panel p {
  max-width: 58ch;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ring-comparison-stage,
.paper-comparison-stage {
  min-height: 190px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 8px;
  background: #f1f2f3;
  overflow: auto;
}

.ring-comparison-circle {
  box-sizing: content-box;
  width: 18.19mm;
  height: 18.19mm;
  flex: 0 0 auto;
  border: 4px solid var(--primary-color);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.16);
}

.paper-comparison-bar {
  box-sizing: content-box;
  width: 57.15mm;
  height: 12px;
  flex: 0 0 auto;
  border: 2px solid color-mix(in srgb, var(--primary-color) 75%, #000);
  border-radius: 2px;
  background: var(--primary-color);
}

.sizer-slider {
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr) 92px;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  font-weight: 760;
}

.sizer-slider input {
  width: 100%;
  min-width: 48px;
  min-height: 48px;
  accent-color: var(--primary-color);
}

.sizer-slider output {
  font-variant-numeric: tabular-nums;
}

.ring-sizer-result {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 35%, #ccc);
  border-radius: 8px;
  background: color-mix(in srgb, var(--primary-color) 7%, #fff);
}

.ring-sizer-result span {
  color: var(--muted);
  font-size: 0.78rem;
}

.ring-sizer-result strong {
  font-size: 1rem;
}

.sizer-accuracy-note {
  margin: -4px 2px 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.4;
}

.ring-sizer-apply {
  width: 100%;
  min-height: 52px;
}

.ring-category-tabs button {
  min-width: 0;
  min-height: 44px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #514c43;
  background: transparent;
  font-size: 0.73rem;
  font-weight: 850;
  line-height: 1.1;
}

.ring-category-tabs button[data-ring-category="basic"] {
  border-color: rgba(163, 112, 31, 0.34);
  color: #5d4218;
}

.ring-category-tabs button[aria-selected="true"] {
  border-color: #1b1b1a;
  color: #fff;
  background: #1b1b1a;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
}

.ring-category-tabs button[data-ring-category="basic"][aria-selected="true"] {
  border-color: var(--gold-deep);
  color: #17120b;
  background: var(--gold);
}

.ring-type-control[hidden] {
  display: none;
}

.base-file-card span,
.base-file-card strong {
  display: block;
}

.base-file-card span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.base-file-card strong {
  margin-top: 4px;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.18;
}

.base-file-card a {
  min-width: 48px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(215, 168, 74, 0.58);
  border-radius: 6px;
  color: #17120b;
  background: var(--gold);
  font-size: 0.72rem;
  font-weight: 880;
  text-decoration: none;
}

.base-file-card a[aria-disabled="true"] {
  opacity: 0.62;
  pointer-events: none;
}

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

.stepper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 42px;
}

.stepper span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.filament-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.filament-swatch {
  min-height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.46), transparent 42%),
    var(--filament-color);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.filament-swatch:hover,
.filament-swatch[aria-pressed="true"] {
  border-color: var(--gold-deep);
  box-shadow:
    0 0 0 3px rgba(215, 168, 74, 0.16),
    inset 0 0 0 1px rgba(0, 0, 0, 0.14);
}

.color-control {
  min-height: 42px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 5px;
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
  background: #f9f8f5;
}

.color-control input {
  width: 32px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
}

.color-control span {
  color: #333;
  font-size: 0.78rem;
  font-weight: 760;
}

.feature-source-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.motif-library-control {
  margin-bottom: 10px;
}

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

.motif-dimensions .control {
  margin-top: 10px;
}

.motif-dimensions .stepper input {
  min-width: 0;
  padding: 0 6px;
}

.feature-source-actions .button {
  min-width: 0;
  min-height: 46px;
}

.feature-upload {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  place-items: center;
  color: #161006;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 5px 14px rgba(119, 78, 12, 0.2);
  cursor: pointer;
}

.feature-upload > span {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #18120a;
  font-size: 0.82rem;
  line-height: 1;
}

.feature-upload > strong {
  font-size: inherit;
}

.feature-upload .beta-badge {
  padding: 2px 5px;
  border: 1px solid rgba(22, 16, 6, 0.32);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.58);
  color: #24190b;
  font-size: 0.58rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

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

.sample-feature-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: #25272b;
  font-weight: 820;
}

.sample-feature-button > span {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 4px;
  background: var(--selected-filament);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.28);
}

.feature-editor[hidden] {
  display: none;
}

.feature-preview-shell {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
  padding: 8px;
  border: 1px solid rgba(215, 168, 74, 0.42);
  border-radius: 7px;
  background: #efede7;
}

.feature-preview-shell canvas {
  display: block;
  width: 112px;
  height: 76px;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 4px;
  background: #111318;
}

.feature-preview-shell div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.feature-preview-shell strong,
.feature-preview-shell span {
  overflow-wrap: anywhere;
}

.feature-preview-shell strong {
  font-size: 0.78rem;
}

.feature-preview-shell span {
  color: #68645d;
  font-size: 0.7rem;
  line-height: 1.35;
}

.feature-invert {
  margin-top: 10px;
}

.feature-color-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-top: 10px;
}

.feature-color-controls[hidden] {
  display: none;
}

.feature-color-controls .control {
  min-width: 0;
}

.compact-segmented {
  min-height: 34px;
  margin-top: 5px;
}

.compact-segmented button {
  min-height: 26px;
  padding: 4px 7px;
}

.feature-palette {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  min-width: 58px;
  min-height: 34px;
  padding-bottom: 1px;
}

.feature-palette span {
  width: 18px;
  height: 32px;
  border: 1px solid rgba(0, 0, 0, 0.28);
  border-radius: 4px;
  background: var(--motif-color, #777);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.35);
}

#featureReliefControl[hidden] {
  display: none;
}

.feature-clear {
  width: 100%;
  margin-top: 10px;
  color: #271b0c;
  border-color: rgba(154, 109, 40, 0.48);
  background: #fff;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.08);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  min-height: 38px;
  padding: 4px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: #f7f6f2;
  border-radius: 8px;
  margin-top: 10px;
}

.segmented.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.segmented.one-up {
  grid-template-columns: 1fr;
}

.segmented button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4f4a40;
  font-size: 0.75rem;
  font-weight: 800;
}

.segmented button[aria-pressed="true"] {
  color: #17120b;
  background: var(--gold);
}

.segmented button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.export-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.final-download-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(32, 33, 36, 0.14);
}

.final-download-heading strong {
  color: #191816;
  font-size: 0.78rem;
}

.final-download-heading span {
  color: #756f64;
  font-size: 0.68rem;
}

.obj-export {
  color: #fff;
  border-color: #202124;
  background: #202124;
}

.obj-export:hover {
  color: var(--gold-strong);
  border-color: var(--gold-deep);
  background: #111;
}

.kiosk-order-panel {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(32, 33, 36, 0.14);
}

.kiosk-order-heading {
  display: grid;
  gap: 4px;
}

.kiosk-order-heading strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.kiosk-order-heading span,
.order-status {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.submit-order {
  width: 100%;
  min-height: 54px;
  font-size: 1rem;
}

.order-status {
  min-height: 20px;
  margin: 0;
}

.order-status[data-status="success"] {
  color: #237a43;
}

.order-status[data-status="error"] {
  color: #b53b2c;
}

.kiosk-customer-name input[aria-invalid="true"] {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(217, 105, 79, 0.16);
}

.studio-orders {
  display: grid;
  gap: 0;
  scroll-margin-top: 18px;
  transition: border-color 240ms ease, box-shadow 240ms ease, background 240ms ease;
}

.studio-orders.is-highlighted {
  border-color: var(--gold-deep);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 0 0 4px rgba(215, 168, 74, 0.2);
}

.studio-orders-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.studio-orders-list {
  display: grid;
  max-height: 320px;
  overflow-y: auto;
}

.studio-order-row {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 11px 54px 11px 0;
  border-top: 1px solid rgba(32, 33, 36, 0.12);
}

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

.studio-order-primary,
.studio-order-detail {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.studio-order-primary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-order-primary span {
  color: var(--gold-deep);
  font-size: 0.68rem;
  font-weight: 850;
}

.studio-order-detail {
  color: var(--muted);
  font-size: 0.68rem;
}

.studio-order-detail span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-order-detail time {
  flex: 0 0 auto;
}

.studio-order-config summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  color: var(--gold-deep);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 820;
  list-style: none;
}

.studio-order-config summary::after {
  content: "+";
  margin-left: 6px;
}

.studio-order-config[open] summary::after {
  content: "−";
}

.studio-order-config dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px;
  margin: 0 0 4px;
}

.studio-order-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.studio-order-actions button {
  min-height: 44px;
  padding: 0 10px;
  border: 1px solid rgba(180, 122, 31, 0.34);
  border-radius: 7px;
  color: var(--gold-deep);
  background: rgba(215, 168, 74, 0.09);
  font-size: 0.68rem;
  font-weight: 840;
}

.studio-order-actions button:last-child {
  color: #17120b;
  background: var(--gold);
}

.studio-order-actions button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.studio-orders-status {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.4;
}

.studio-orders-status[data-status="success"] {
  color: #237a43;
}

.studio-orders-status[data-status="warning"] {
  color: #8c6419;
}

.studio-orders-status[data-status="error"] {
  color: #b53b2c;
}

.studio-order-config dl div {
  min-width: 0;
}

.studio-order-config dt,
.studio-order-config dd {
  margin: 0;
  overflow: hidden;
  font-size: 0.66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-order-config dt {
  color: var(--muted);
}

.studio-order-config dd {
  margin-top: 2px;
  color: var(--ink);
  font-weight: 760;
}

.studio-order-row > em {
  position: absolute;
  top: 10px;
  right: 0;
  padding: 3px 6px;
  border-radius: 5px;
  color: #785719;
  background: rgba(215, 168, 74, 0.16);
  font-size: 0.6rem;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.studio-order-row > em[data-delivery="webhook"] {
  color: #24663b;
  background: rgba(60, 157, 96, 0.14);
}

.studio-orders-clear {
  width: 100%;
  margin-top: 10px;
  color: #7d3328;
  border-color: rgba(181, 59, 44, 0.3);
  background: transparent;
}

body.kiosk-mode [data-advanced-control],
body.kiosk-mode #standardExportPanel,
body.kiosk-mode [data-development-path],
body.kiosk-mode [data-studio-only] {
  display: none !important;
}

body.kiosk-mode .studio-frame {
  padding: clamp(10px, 1.4vw, 18px);
}

body.kiosk-mode .studio-heading {
  margin-bottom: 8px;
}

body.kiosk-mode .viewer-quick-tools {
  grid-template-columns: minmax(0, 1fr);
}

body.kiosk-mode button,
body.kiosk-mode select,
body.kiosk-mode input,
body.kiosk-mode label,
body.kiosk-mode [role="button"] {
  touch-action: manipulation;
}

body.kiosk-mode select,
body.kiosk-mode input[type="text"],
body.kiosk-mode input[type="number"] {
  font-size: 16px;
}

body.kiosk-mode .topbar {
  border-bottom-color: color-mix(in srgb, var(--primary-color) 45%, transparent);
}

body.kiosk-mode .button.primary {
  color: var(--primary-contrast);
  background: var(--primary-color);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--primary-color) 26%, transparent);
}

body.kiosk-mode .button.primary:hover {
  background: color-mix(in srgb, var(--primary-color) 88%, #000);
}

body.kiosk-mode .ring-category-tabs button[aria-selected="true"],
body.kiosk-mode .segmented button[aria-pressed="true"] {
  color: var(--primary-contrast);
  background: var(--primary-color);
}

body.kiosk-mode input[type="range"] {
  min-width: 48px;
  min-height: 48px;
  accent-color: var(--primary-color);
}

body.kiosk-mode button,
body.kiosk-mode select,
body.kiosk-mode input[type="text"],
body.kiosk-mode input[type="number"],
body.kiosk-mode input[type="color"],
body.kiosk-mode .font-toggle,
body.kiosk-mode [role="button"] {
  min-width: 48px;
  min-height: 48px;
}

body.kiosk-mode .filament-swatch,
body.kiosk-mode .view-button {
  width: 48px;
  height: 48px;
}

body.kiosk-mode .controls-pane {
  -webkit-overflow-scrolling: touch;
}

body.kiosk-mode .studio-heading strong::after {
  content: " · In-store";
  color: var(--primary-color);
}

.filament-color-control {
  margin-top: 0;
}

.backer-panel {
  grid-area: backer;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border-top: 1px solid rgba(215, 168, 74, 0.34);
  background: linear-gradient(180deg, #161616, #09090a);
  color: #fff9ed;
}

.summary-board {
  padding: clamp(12px, 2vw, 20px);
}

.summary-board {
  border-right: 0;
}

.backer-panel .section-heading h2 {
  color: var(--gold);
}

.backer-panel .section-heading span {
  color: var(--gold-strong);
}

.summary-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.summary-list div {
  min-height: 54px;
  padding: 9px 10px;
  border: 1px solid rgba(215, 168, 74, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.backer-panel .summary-list span {
  color: #c7b99f;
}

.backer-panel .summary-list strong {
  color: #fff9ed;
  margin-top: 4px;
  font-size: 0.78rem;
}

.print-check-board {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(215, 168, 74, 0.22);
}

.viewer-recommendations {
  margin-top: 0;
  padding: 13px 16px 16px;
  border-top: 1px solid rgba(215, 168, 74, 0.36);
  background: linear-gradient(180deg, #181a1d, #101113);
  color: #fff9ed;
}

.viewer-recommendations:not([open]) {
  padding-block: 7px;
}

.viewer-recommendations .section-heading {
  margin-bottom: 10px;
}

.viewer-recommendations .section-heading h2 {
  color: var(--gold-strong);
}

.viewer-recommendations .section-heading span {
  color: var(--gold);
}

.nozzle-profile-control {
  display: grid;
  grid-template-columns: auto minmax(230px, 360px);
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.nozzle-profile-control > span {
  color: #c7b99f;
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.nozzle-profile-control .segmented {
  min-height: 36px;
  margin-top: 0;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

.nozzle-profile-control .segmented button {
  color: #f2eadb;
}

.nozzle-profile-control .segmented button[aria-pressed="true"] {
  color: #17120b;
}

.nozzle-preset-card {
  display: block;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px) saturate(130%);
}

.nozzle-preset-card span,
.nozzle-preset-card strong {
  display: block;
}

.nozzle-preset-card span {
  color: #aaa69d;
  font-size: 0.64rem;
  font-weight: 760;
  text-transform: uppercase;
}

.nozzle-preset-card strong {
  margin-top: 3px;
  color: #fff9ed;
  font-size: 0.86rem;
}

.nozzle-preset-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}

.nozzle-preset-heading strong {
  margin-top: 0;
  text-align: right;
}

.export-figure-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-block: 1px solid rgba(255, 255, 255, 0.11);
}

.export-figure-grid > div {
  min-width: 0;
  padding: 8px 7px;
  border-right: 1px solid rgba(255, 255, 255, 0.11);
  cursor: pointer;
}

.export-figure-grid > div:hover,
.export-figure-grid > div:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  outline: 0;
  box-shadow: inset 0 -2px var(--gold);
}

.export-figure-grid > div:last-child {
  border-right: 0;
}

.export-figure-grid strong {
  overflow: hidden;
  margin-top: 4px;
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.slicer-figures summary {
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #d7d2c9;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.slicer-figures summary::-webkit-details-marker,
.print-check summary::-webkit-details-marker {
  display: none;
}

.slicer-figures summary::after,
.print-check summary::after {
  content: "+";
  color: var(--gold);
  font-size: 0.9rem;
}

.slicer-figures[open] summary::after,
.print-check[open] summary::after {
  content: "-";
}

.slicer-figures > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  padding-bottom: 4px;
}

.slicer-figures > div span {
  color: #aaa69d;
  font-size: 0.66rem;
  text-transform: none;
}

.slicer-figures > div strong {
  margin-top: 2px;
  font-size: 0.7rem;
}

.print-check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.print-check {
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(215, 168, 74, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.print-check summary {
  min-height: 40px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr) auto 12px;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.print-check summary > span {
  width: 9px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(60, 157, 96, 0.14);
}

.print-check.warn summary > span {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(217, 154, 46, 0.14);
}

.print-check.fail summary > span {
  background: var(--coral);
  box-shadow: 0 0 0 3px rgba(217, 105, 79, 0.14);
}

.print-check.recommend {
  border-color: rgba(215, 168, 74, 0.42);
  background: rgba(215, 168, 74, 0.08);
}

.print-check.recommend summary > span {
  background: var(--gold);
  box-shadow: 0 0 0 3px rgba(215, 168, 74, 0.16);
}

.print-check p {
  margin: 0 0 10px 17px;
  color: #eee6d7;
  font-size: 0.78rem;
  line-height: 1.35;
}

.print-check summary strong {
  overflow: hidden;
  color: #f3ede2;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.print-check summary em {
  color: #9fd1ad;
  font-size: 0.62rem;
  font-style: normal;
  font-weight: 800;
  text-transform: uppercase;
}

.print-check.warn summary em {
  color: #f2c267;
}

.print-check.fail summary em {
  color: #f29a85;
}

.print-check.recommend summary em {
  color: var(--gold-strong);
}

@media (max-width: 1320px) {
  .workspace {
    grid-template-columns: 1fr;
    grid-template-areas:
      "studio"
      "backer";
  }

  .studio-grid {
    grid-template-columns: minmax(460px, 1fr) minmax(280px, 330px);
    min-height: 720px;
  }
}

@media (max-width: 980px) {
  .studio-grid {
    grid-template-columns: minmax(0, 1fr);
    min-height: auto;
  }

  .viewer-pane {
    grid-row: 1;
    position: relative;
    top: auto;
    z-index: 4;
    min-height: 510px;
  }

  .right-pane {
    grid-row: 2;
    border-left: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.16);
  }

  .backer-panel {
    grid-template-columns: 1fr;
  }

  .summary-board {
    border-bottom: 0;
  }
}

@media (max-width: 720px) {
  .topbar,
  .access-row,
  .hero-panel,
  .viewport-hud,
  .split-controls {
    grid-template-columns: 1fr;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    position: relative;
  }

  .top-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-orders-launch {
    grid-column: 1 / -1;
    width: 100%;
  }

  .top-downloads {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
  }

  .top-fillet-control {
    grid-column: 1 / -1;
    width: 100%;
  }

  .ui-mode-toggle {
    grid-column: 1 / -1;
    width: 100%;
  }

  .top-actions .button {
    padding: 0 8px;
  }

  .ring-library-tools {
    grid-template-columns: 1fr;
  }

  .favorites-filter {
    width: 100%;
  }

  .ring-browser {
    max-height: 230px;
  }

  .button,
  button,
  .control input[type="text"],
  .control input[type="number"],
  .control select,
  .font-toggle,
  .segmented button,
  .orientation-actions button {
    min-height: 44px;
  }

  input[type="color"] {
    min-width: 44px;
    min-height: 44px;
  }

  .filament-swatch {
    min-height: 44px;
  }

  input[type="range"] {
    min-height: 44px;
  }

  .ring-sizer-card {
    padding: 16px;
  }

  .sizer-slider {
    grid-template-columns: 1fr 90px;
  }

  .sizer-slider > span {
    grid-column: 1 / -1;
  }

  .studio-frame {
    padding: 10px;
  }

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

  .viewer-pane {
    min-height: 0;
    grid-template-rows: auto clamp(270px, 62vw, 350px) auto auto;
    top: 0;
  }

  .viewer-quick-tools {
    grid-template-columns: 1fr;
    padding: 9px;
  }

  .canvas-shell {
    min-height: 270px;
    height: clamp(270px, 62vw, 350px);
  }

  .plate-badge {
    top: 10px;
    left: 10px;
  }

  .viewport-toolbar {
    inset: auto 8px 9px;
    max-width: none;
    align-items: center;
    justify-content: center;
    flex-direction: row;
  }

  .view-button {
    min-width: 44px;
    height: 44px;
    padding: 0 6px;
  }

  .viewport-hud {
    display: none;
  }

  .viewport-hud div {
    min-height: 42px;
    padding: 8px;
  }

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

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

  .motif-dimensions {
    grid-template-columns: 1fr;
  }

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

  .nozzle-profile-control {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .nozzle-preset-card {
    grid-template-columns: 1fr;
    gap: 6px;
  }

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

  .export-figure-grid > div:nth-child(3) {
    border-right: 0;
  }

  .export-figure-grid > div:nth-child(n + 4) {
    border-top: 1px solid rgba(255, 255, 255, 0.11);
  }

  .print-check-list {
    grid-template-columns: 1fr;
  }

  .viewer-recommendations {
    padding: 12px;
  }

  .access-gate {
    align-items: start;
    padding: 12px;
    overflow-y: auto;
  }

  .access-card {
    margin: auto 0;
    padding: 22px 18px;
  }
}

@media (max-width: 470px) {
  .brand-mark {
    width: 36px;
    border-width: 7px;
  }

  .brand span {
    font-size: 0.74rem;
  }

  .top-fillet-control {
    min-width: 0;
    grid-template-columns: auto minmax(70px, 1fr) 56px;
    gap: 7px;
  }

  .studio-heading {
    margin-bottom: 8px;
  }

  .studio-grid {
    border-radius: 6px;
  }

  .stage-label {
    min-height: 42px;
    gap: 8px;
    padding: 6px 10px;
  }

  .stage-label span {
    font-size: 0.64rem;
  }

  .stage-label strong {
    max-width: 56%;
    overflow: hidden;
    font-size: 0.78rem;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .plate-badge {
    min-width: 0;
    padding: 6px 8px;
  }

  .plate-badge strong {
    font-size: 0.68rem;
  }

  .plate-badge span {
    display: none;
  }

  .viewport-toolbar {
    gap: 4px;
  }

  .view-button-group {
    padding: 2px;
  }

  .view-button {
    min-width: 44px;
    padding: 0 4px;
    font-size: 0.61rem;
  }

  .right-pane {
    gap: 9px;
    padding: 9px;
  }

  .nozzle-preset-heading {
    align-items: start;
    flex-direction: column;
    gap: 3px;
  }

  .nozzle-preset-heading strong {
    text-align: left;
  }

  .export-figure-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .export-figure-grid > div,
  .export-figure-grid > div:nth-child(3) {
    border-right: 1px solid rgba(255, 255, 255, 0.11);
  }

  .export-figure-grid > div:nth-child(even),
  .export-figure-grid > div:last-child {
    border-right: 0;
  }

  .export-figure-grid > div:nth-child(n + 3) {
    border-top: 1px solid rgba(255, 255, 255, 0.11);
  }

  .slicer-figures > div {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tool-section {
    padding: 11px;
  }

  .range-row {
    grid-template-columns: minmax(0, 1fr) 66px;
    gap: 7px;
  }

  .orientation-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-source-actions,
  .feature-color-controls {
    grid-template-columns: 1fr;
  }

  .feature-palette {
    justify-content: flex-start;
  }

  .feature-preview-shell {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .feature-preview-shell canvas {
    width: 76px;
    height: 64px;
  }

  .summary-board {
    padding: 12px;
  }

  .hero-copy h1 {
    font-size: 3.4rem;
  }
}

@media (max-width: 440px) {
  .summary-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) and (max-height: 540px) {
  .viewer-pane {
    grid-template-rows: auto 220px auto auto;
  }

  .canvas-shell {
    min-height: 220px;
    height: 220px;
  }
}

@media (min-width: 981px) {
  .studio-grid {
    height: clamp(620px, calc(100dvh - 150px), 900px);
    min-height: 620px;
  }

  .viewer-pane,
  .right-pane {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }

  .viewer-pane {
    position: relative;
    top: auto;
    align-self: stretch;
  }
}

@media (min-width: 820px) and (max-width: 980px) {
  body.kiosk-mode .studio-grid {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 40%);
    height: calc(100dvh - 150px);
    min-height: 640px;
  }

  body.kiosk-mode .viewer-pane,
  body.kiosk-mode .right-pane {
    grid-row: 1;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  body.kiosk-mode .right-pane {
    border-top: 0;
    border-left: 1px solid rgba(0, 0, 0, 0.16);
  }
}

@media (hover: hover) {
  .ring-category-tabs button:hover,
  .ring-choice:hover,
  .ring-favorite:hover,
  .favorites-filter:hover,
  .segmented button:hover:not(:disabled),
  .orientation-actions button:hover,
  .view-button:hover {
    transform: translateY(-1px);
  }

  .tool-section:hover {
    border-color: rgba(0, 0, 0, 0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
