:root {
  --paper: #f2eadc;
  --paper-soft: #fbf7ef;
  --paper-deep: #e5d8c4;
  --ink: #1b1815;
  --muted: #746b61;
  --line: rgba(49, 40, 32, .16);
  --orange: #da5b2a;
  --orange-dark: #a93d19;
  --teal: #064e55;
  --gold: #b67a2e;
  --shadow: 0 24px 70px rgba(68, 43, 25, .13);
  --sans: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Songti SC", STSong, SimSun, serif;
}

* { box-sizing: border-box; }
html { min-width: 0; background: var(--paper); color: var(--ink); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; font-family: var(--sans); background: radial-gradient(circle at 15% 10%, rgba(255,255,255,.75), transparent 30%), linear-gradient(130deg, #f7f0e4 0%, #eee3d3 100%); }
body.is-embedded { min-height: 0; background: transparent; }
body.is-embedded .topbar { display: none; }
body.is-embedded .diy-layout { width: 100%; min-height: 0; margin: 0; }
body.is-embedded .config-card { position: static; top: auto; max-height: none; }
body.is-embedded .config-scroll { overflow: visible; }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(218,91,42,.35); outline-offset: 3px; }

.topbar { height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; padding: 0 clamp(20px, 3.2vw, 58px); border-bottom: 1px solid var(--line); background: rgba(250,246,238,.88); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 50; }
.brand { color: inherit; text-decoration: none; display: inline-flex; width: fit-content; align-items: center; gap: 11px; }
.brand-paw { position: relative; width: 38px; height: 38px; display: grid; place-items: center; color: var(--paper-soft); background: var(--orange); border-radius: 48% 52% 44% 56%; font-size: 14px; box-shadow: inset 0 0 0 6px rgba(255,255,255,.12); }
.brand-paw::before, .brand-paw::after { content: ""; position: absolute; top: 6px; width: 7px; height: 9px; border-radius: 50%; background: currentColor; }
.brand-paw::before { left: 8px; transform: rotate(-18deg); }.brand-paw::after { right: 8px; transform: rotate(18deg); }
.brand > span:last-child, .product-title > span:last-child { display: flex; flex-direction: column; }
.brand strong { font: 800 17px var(--sans); letter-spacing: .05em; }.brand small { color: var(--muted); font-size: 8px; letter-spacing: .16em; margin-top: 2px; }
.product-title { display: flex; align-items: center; gap: 11px; }
.product-index { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: var(--ink); border-radius: 50%; font: 800 12px var(--sans); }
.product-title strong { font-size: 14px; }.product-title small { color: var(--muted); font-size: 10px; margin-top: 3px; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.save-state { display: inline-flex; align-items: center; gap: 7px; margin-right: 8px; color: var(--muted); font-size: 10px; }.save-state i { width: 7px; height: 7px; border-radius: 50%; background: #6d9149; box-shadow: 0 0 0 4px rgba(109,145,73,.12); }
.quiet-button, .primary-button, .back-button { min-height: 42px; border-radius: 999px; padding: 0 17px; border: 1px solid var(--line); background: rgba(255,255,255,.55); cursor: pointer; font-weight: 750; font-size: 12px; }
.primary-button { border-color: var(--orange); color: white; background: var(--orange); box-shadow: 0 7px 17px rgba(218,91,42,.23); }.primary-button:hover { background: var(--orange-dark); }

.diy-layout { width: min(1740px, calc(100% - 40px)); min-height: calc(100vh - 110px); margin: 20px auto 32px; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(430px, .72fr); gap: 18px; }
.viewer-card, .config-card { min-width: 0; border: 1px solid rgba(49,40,32,.14); background: rgba(251,247,239,.92); box-shadow: var(--shadow); border-radius: 28px; overflow: hidden; }
.viewer-card { display: grid; grid-template-rows: auto minmax(430px, 1fr) auto auto; padding: 30px; }
.viewer-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 0 4px 24px; }
.eyebrow, .config-head span:first-child, .panel-title > span { color: var(--orange); font-size: 9px; font-weight: 850; letter-spacing: .18em; }
.viewer-head h1 { margin: 5px 0 0; font: 600 clamp(31px, 3vw, 48px)/1.08 var(--serif); }
.viewer-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }.viewer-badges span { border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; color: var(--muted); font-size: 9px; background: rgba(255,255,255,.6); }

.canvas-shell { min-height: 520px; position: relative; overflow: hidden; border-radius: 22px; isolation: isolate; background: radial-gradient(circle at 50% 44%, #fffdf7 0 18%, #e9dfd0 58%, #d6c7b1 100%); }
.canvas-shell::before { content: ""; position: absolute; inset: auto 12% 8% 12%; height: 18%; border-radius: 50%; background: radial-gradient(ellipse, rgba(80,52,31,.18), transparent 67%); filter: blur(20px); z-index: -1; }
#collarCanvas { display: block; width: 100%; height: 100%; min-height: 520px; cursor: grab; touch-action: none; }#collarCanvas:active { cursor: grabbing; }
#collarCanvas.is-moving-tag { cursor: move; }
.canvas-loading, .canvas-fallback { position: absolute; inset: 0; z-index: 8; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(140deg,#f8f2e8,#e5d6c1); }
.canvas-loading.is-hidden { opacity: 0; pointer-events: none; transition: opacity .45s; }.canvas-loading strong { font: 600 19px var(--serif); }.canvas-loading span { color: var(--muted); font-size: 11px; margin-top: 7px; }
.loading-ring { width: 45px; height: 45px; margin-bottom: 15px; border: 3px solid rgba(218,91,42,.17); border-top-color: var(--orange); border-radius: 50%; animation: spin .9s linear infinite; }@keyframes spin { to { transform: rotate(360deg); } }
.canvas-fallback[hidden] { display: none; }.canvas-fallback img { width: 100%; height: 100%; object-fit: cover; }.canvas-fallback p { position: absolute; bottom: 18px; margin: 0; padding: 8px 13px; border-radius: 999px; background: rgba(255,255,255,.9); font-size: 11px; }
.model-chip { position: absolute; z-index: 4; display: flex; flex-direction: column; padding: 8px 11px; border-radius: 11px; border: 1px solid rgba(56,45,35,.15); background: rgba(255,251,244,.85); backdrop-filter: blur(9px); box-shadow: 0 8px 20px rgba(63,45,31,.09); cursor: pointer; transition: .2s; }.model-chip:hover { transform: translateY(-2px); border-color: rgba(218,91,42,.5); }.model-chip b { font-size: 11px; }.model-chip span { color: var(--muted); font-size: 8px; margin-top: 2px; }.chip-buckle { left: 48%; bottom: 17%; }.chip-nameplate { left: 8%; top: 31%; }.chip-adjuster { right: 7%; top: 31%; }.chip-holes { left: 16%; bottom: 19%; }
.canvas-hint { position: absolute; left: 50%; bottom: 14px; z-index: 3; transform: translateX(-50%); display: flex; align-items: center; gap: 8px; white-space: nowrap; color: rgba(36,31,26,.55); font-size: 9px; }.canvas-hint i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.mobile-hint { display: none; }
.accessory-canvas-status { position: absolute; top: 13px; left: 50%; z-index: 9; transform: translateX(-50%); width: max-content; max-width: calc(100% - 26px); padding: 9px 13px; border-radius: 12px; color: white; background: rgba(27,24,21,.9); box-shadow: 0 9px 25px rgba(0,0,0,.2); text-align: center; pointer-events: none; }.accessory-canvas-status[hidden] { display: none; }.accessory-canvas-status b, .accessory-canvas-status span { display: block; }.accessory-canvas-status b { font-size: 11px; }.accessory-canvas-status span { margin-top: 2px; color: #eadfce; font-size: 9px; }
.viewer-toolbar { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
  .view-buttons, .viewer-tools { display: flex; gap: 5px; flex-wrap: wrap; }.viewer-toolbar button { border: 0; border-radius: 999px; padding: 8px 11px; color: var(--muted); background: transparent; cursor: pointer; font-size: 10px; font-weight: 750; }.viewer-toolbar button:hover, .viewer-toolbar button.is-active, #toggleSpin[aria-pressed="true"], #toggleDRing[aria-pressed="true"] { color: var(--ink); background: var(--paper-deep); }.viewer-toolbar button:disabled { cursor: wait; opacity: .45; }.viewer-toolbar #toggleDRing:not(:disabled) { box-shadow: inset 0 0 0 1px rgba(184,113,38,.22); }
.live-summary { display: grid; grid-template-columns: repeat(4, 1fr); padding-top: 19px; }.live-summary div { min-width: 0; padding: 0 16px; border-right: 1px solid var(--line); }.live-summary div:first-child { padding-left: 4px; }.live-summary div:last-child { border: 0; }.live-summary span, .config-result span { display: block; color: var(--muted); font-size: 9px; margin-bottom: 5px; }.live-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }

.config-card { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; max-height: calc(100vh - 130px); position: sticky; top: 98px; }
.config-head { display: flex; justify-content: space-between; gap: 20px; padding: 28px 28px 20px; }.config-head h2 { margin: 5px 0 0; font: 600 28px/1.14 var(--serif); }.config-progress { align-self: flex-start; color: var(--muted) !important; letter-spacing: 0 !important; font-size: 11px !important; }.config-progress b { color: var(--orange); font-size: 25px; }
.config-tabs { display: grid; grid-template-columns: repeat(6, 1fr); padding: 0 18px 15px; gap: 4px; border-bottom: 1px solid var(--line); }.config-tabs button { min-width: 0; border: 0; border-radius: 10px; padding: 8px 2px; color: var(--muted); background: transparent; cursor: pointer; font-size: 9px; }.config-tabs button span { display: block; margin-bottom: 3px; font-size: 8px; }.config-tabs button.is-active { color: white; background: var(--ink); }
.config-scroll { min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #c8b8a4 transparent; }.config-panel { display: none; padding: 28px; }.config-panel.is-active { display: block; animation: panel-in .24s ease-out; }@keyframes panel-in { from { opacity: 0; transform: translateY(7px); } }
.base-grid { display: grid; gap: 10px; margin-top: 22px; }.base-option { min-height: 92px; display: grid; grid-template-columns: 92px minmax(0,1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 12px; border: 1.5px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.68); text-align: left; }.base-option:hover:not(:disabled), .base-option.is-active { border-color: var(--orange); box-shadow: 0 8px 22px rgba(218,91,42,.12); }.base-option.is-active { background: #fff9f1; }.base-option:disabled { cursor: default; opacity: .58; }.base-option > span:nth-child(2) { min-width: 0; }.base-option b, .base-option small { display: block; }.base-option b { font-size: 13px; }.base-option small { margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.5; }.base-option em { padding: 6px 9px; border-radius: 999px; color: var(--orange); background: #f9e4d8; font-size: 9px; font-style: normal; white-space: nowrap; }.base-visual { position: relative; height: 56px; display: grid; place-items: center; border-radius: 13px; background: #eadfce; overflow: hidden; }.base-visual::before, .base-visual::after { content: ""; position: absolute; left: 12px; right: 12px; height: 15px; border: 4px solid #814321; border-radius: 999px; }.base-visual::after { border-width: 1px; border-color: #e8c795; transform: scale(.78); }.base-light::before { height: 9px; }.base-double::before { height: 24px; box-shadow: inset 0 0 0 5px #c77c48; }.friendly-note { margin-top: 18px; padding: 15px 17px; border-radius: 16px; background: #eef3dc; }.friendly-note b { font-size: 11px; }.friendly-note p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.finish-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 20px 0; }.finish-summary div { padding: 12px 13px; border-radius: 14px; background: rgba(255,255,255,.74); }.finish-summary span, .finish-summary b { display: block; }.finish-summary span { color: var(--muted); font-size: 9px; }.finish-summary b { margin-top: 4px; font-size: 11px; }.finish-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.production-button { min-height: 100px; display: grid; grid-template-columns: 38px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 9px; padding: 14px; border: 1.5px solid var(--line); border-radius: 17px; background: white; text-align: left; }.production-button:hover { border-color: var(--orange); transform: translateY(-1px); }.production-button > span { grid-row: 1 / 3; align-self: center; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; color: white; background: var(--orange); font-size: 20px; }.production-button b { font-size: 12px; }.production-button small { color: var(--muted); font-size: 9px; line-height: 1.45; }.mini-handoff { display: grid; grid-template-columns: 48px 1fr; gap: 13px; margin-top: 14px; padding: 16px; border-radius: 18px; background: #e8f5e7; }.mini-handoff__mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: white; background: #19a15f; font-weight: 900; }.mini-handoff b, .mini-handoff p, .mini-handoff small { display: block; }.mini-handoff b { font-size: 11px; }.mini-handoff p { margin: 5px 0; color: #405547; font-size: 10px; line-height: 1.55; }.mini-handoff small { color: #64736a; font-size: 8px; line-height: 1.5; }
.panel-title h3 { margin: 7px 0 8px; font: 600 26px/1.18 var(--serif); }.panel-title p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.field-group { margin-top: 27px; }.field-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }.field-label b { font-size: 12px; }.field-label span { color: var(--orange); font-size: 10px; font-weight: 750; }
.swatch-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }.swatch { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px 5px 9px; background: white; cursor: pointer; }.swatch i { display: block; height: 38px; border-radius: 8px; margin-bottom: 6px; background: var(--swatch); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }.swatch span { font-size: 9px; }.swatch.is-active { border: 2px solid var(--orange); padding: 7px 4px 8px; box-shadow: 0 5px 15px rgba(218,91,42,.12); }
.thread-palette { grid-template-columns: repeat(6, 1fr); }.thread-palette .swatch i { height: 30px; }
.material-note, .interface-card, .safety-card { margin-top: 27px; padding: 17px; border-radius: 15px; background: #e8dfd0; }.material-note b { font-size: 11px; }.material-note p, .interface-card p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.module-list { display: grid; gap: 9px; margin-top: 24px; }.module-option { width: 100%; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); border-radius: 15px; padding: 11px; background: white; cursor: pointer; }.module-option > span:nth-child(2) { display: flex; flex-direction: column; gap: 4px; }.module-option b { font-size: 11px; }.module-option small { color: var(--muted); font-size: 9px; }.module-option em { color: #6c8a48; font-style: normal; font-size: 8px; font-weight: 800; }.module-option.is-active { border: 2px solid var(--orange); padding: 10px; }.module-option.is-pending { cursor: not-allowed; opacity: .55; }.module-option.is-pending em { color: var(--muted); }
.module-icon { height: 45px; position: relative; display: block; border-radius: 10px; background: #eee4d5; }.buckle-icon::before, .slim-icon::before, .cobra-icon::before { content: ""; position: absolute; inset: 9px 8px; border: 5px solid var(--gold); border-radius: 6px; }.buckle-icon::after { content: ""; position: absolute; top: 10px; bottom: 10px; left: 26px; border-left: 2px solid #684821; }.slim-icon::before { inset: 8px 13px; }.cobra-icon::before { border-width: 7px; }.adjuster-icon::before, .adjuster-wide::before { content: ""; position: absolute; inset: 6px 10px; border: 4px solid var(--gold); border-radius: 7px; }.adjuster-icon::after, .adjuster-wide::after { content: ""; position: absolute; top: 8px; bottom: 8px; left: 50%; border-left: 4px solid var(--gold); }.adjuster-wide::before { inset: 7px 5px; }
.finish-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }.finish { border: 1px solid var(--line); border-radius: 12px; padding: 9px 5px; background: white; cursor: pointer; font-size: 9px; }.finish i { display: block; width: 30px; height: 30px; margin: 0 auto 6px; border-radius: 50%; }.finish-brass { background: linear-gradient(135deg,#7c4c13,#e9bd67,#9b641c); }.finish-silver { background: linear-gradient(135deg,#777,#f3f3f3,#8a8a8a); }.finish-black { background: linear-gradient(135deg,#0e0e0e,#555,#111); }.finish.is-active { border: 2px solid var(--orange); padding: 8px 4px; }
.interface-card { display: grid; grid-template-columns: 1fr auto; align-items: end; }.interface-card span { color: var(--muted); font-size: 9px; }.interface-card strong { color: var(--teal); font-size: 29px; }.interface-card p { grid-column: 1 / 3; }
.plate-preview { width: min(100%, 360px); aspect-ratio: 3 / 1; margin: 24px auto; padding: 0 18px; display: grid; grid-template-columns: 11px 1fr 11px; align-items: center; gap: 12px; color: #5b360f; background: linear-gradient(145deg,#98601e,#e6b85e 45%,#9e671f); clip-path: polygon(6% 0,94% 0,100% 18%,100% 82%,94% 100%,6% 100%,0 82%,0 18%); box-shadow: inset 0 1px 2px rgba(255,255,255,.7), 0 13px 25px rgba(77,49,18,.18); }.plate-preview i { width: 10px; height: 10px; border-radius: 50%; background: #805318; box-shadow: inset 0 1px 2px rgba(255,255,255,.45); }.plate-preview div { min-width: 0; text-align: center; display: flex; flex-direction: column; }.plate-preview strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 24px var(--serif); letter-spacing: .06em; }.plate-preview span { font-size: 9px; margin-top: 4px; }
.text-field { display: grid; grid-template-columns: 82px 1fr auto; align-items: center; gap: 9px; margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 9px 12px; background: white; }.text-field > span { font-size: 10px; font-weight: 750; }.text-field input { min-width: 0; border: 0; outline: 0; padding: 5px; background: transparent; font-weight: 750; }.text-field small { color: var(--muted); font-size: 8px; }.small-list { margin-top: 18px; }.plate-shape { width: 50px; height: 26px; display: block; background: linear-gradient(145deg,#91601d,#e2b359); }.cut-shape { clip-path: polygon(10% 0,90% 0,100% 20%,100% 80%,90% 100%,10% 100%,0 80%,0 20%); }.pill-shape { border-radius: 999px; }
.hole-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 24px; }.hole-modes button { min-width: 0; min-height: 113px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 14px; background: white; cursor: pointer; }.hole-modes b { margin-top: 8px; font-size: 10px; }.hole-modes small { color: var(--muted); font-size: 8px; margin-top: 3px; }.hole-modes button.is-active { border: 2px solid var(--orange); }.hole-preview { width: 55px; height: 31px; display: block; border-radius: 5px; background-color: #8f451f; }.hole-preview.guides { background-image: radial-gradient(circle,#442015 0 2px,transparent 2.5px); background-size: 11px 11px; }.hole-preview.eyelet { position: relative; }.hole-preview.eyelet::after { content: ""; position: absolute; inset: 8px 20px; border-radius: 50%; border: 4px solid #d6a44c; background: #1b1815; }.hole-preview.none { box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.tag-builder-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: white; }.tag-builder-head > div { min-width: 0; }.tag-builder-head b, .tag-builder-head small { display: block; }.tag-builder-head b { font-size: 12px; }.tag-builder-head small { margin-top: 4px; color: var(--muted); font-size: 9px; }.add-tag-button { white-space: nowrap; }.add-tag-button:disabled { border-color: var(--line); color: var(--muted); background: #eee7dc; box-shadow: none; cursor: not-allowed; }
.tag-strip { min-height: 74px; display: flex; gap: 8px; margin-top: 11px; padding: 10px; overflow-x: auto; border-radius: 15px; background: #e8dfd0; scrollbar-width: thin; }.tag-empty { align-self: center; width: 100%; margin: 0; color: var(--muted); text-align: center; font-size: 10px; }.tag-empty[hidden] { display: none; }.tag-pill { flex: 0 0 130px; min-height: 54px; display: grid; grid-template-columns: 30px 1fr; grid-template-rows: auto auto; align-content: center; column-gap: 7px; border: 1px solid rgba(49,40,32,.14); border-radius: 12px; padding: 8px; text-align: left; background: white; cursor: pointer; }.tag-pill > span { grid-row: 1 / 3; align-self: center; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: white; background: var(--ink); font-size: 9px; }.tag-pill b { font-size: 10px; }.tag-pill small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }.tag-pill.is-active { border: 2px solid var(--orange); padding: 7px; box-shadow: 0 5px 16px rgba(218,91,42,.13); }.tag-pill.is-active > span { background: var(--orange); }
.tag-editor { margin-top: 14px; }.tag-editor[hidden] { display: none; }.selected-tag-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 2px 3px; }.selected-tag-head span, .selected-tag-head b { display: block; }.selected-tag-head span { color: var(--muted); font-size: 8px; }.selected-tag-head b { margin-top: 2px; font-size: 13px; }.danger-link { min-height: 36px; border: 0; padding: 0 8px; color: #a43f26; background: transparent; cursor: pointer; font-size: 9px; font-weight: 800; }
.accessory-field { margin-top: 18px; }.accessory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }.accessory-grid button { min-width: 0; min-height: 82px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 13px; padding: 7px 4px; background: white; cursor: pointer; }.accessory-grid button b { margin-top: 5px; font-size: 9px; }.accessory-grid button small { margin-top: 2px; color: var(--muted); font-size: 8px; }.accessory-grid button.is-active { border: 2px solid var(--orange); padding: 6px 3px; background: #fffaf4; }.charm-grid { grid-template-columns: repeat(4, 1fr); }
.accessory-icon { width: 31px; height: 31px; position: relative; display: grid; place-items: center; color: #70451b; }.eyelet-icon { border: 6px solid #c18a3f; border-radius: 50%; box-shadow: inset 0 0 0 2px #3a2818; }.screw-icon { border-radius: 50%; background: radial-gradient(circle,#6b4a24 0 2px,#d5aa60 3px 65%,#79501d 66%); }.screw-icon::after { content: ""; width: 15px; border-top: 2px solid #5b3a18; transform: rotate(-18deg); }.ring-icon { border: 4px double #bd8135; border-radius: 50%; }.bone-icon::before { content: ""; width: 26px; height: 9px; border-radius: 999px; background: #d7a552; box-shadow: -7px -4px 0 -1px #d7a552,-7px 4px 0 -1px #d7a552,7px -4px 0 -1px #d7a552,7px 4px 0 -1px #d7a552; }.bell-icon { width: 24px; height: 25px; border-radius: 50% 50% 35% 35%; background: linear-gradient(135deg,#704616,#e0b761,#84531a); }.bell-icon::after { content: ""; position: absolute; bottom: -3px; width: 6px; height: 6px; border-radius: 50%; background: #5c3813; }.star-icon { color: #c58a31; font-size: 30px; text-shadow: 0 1px #6b451b; }.tassel-icon::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #9d4b35; box-shadow: 0 8px 0 #9d4b35, -5px 14px 0 -2px #9d4b35, 0 14px 0 -2px #9d4b35, 5px 14px 0 -2px #9d4b35; }
.drag-instruction { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; margin-top: 18px; padding: 13px; border-radius: 14px; color: #f5eee3; background: var(--teal); }.drag-instruction > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.13); font-size: 18px; }.drag-instruction b, .drag-instruction small { display: block; }.drag-instruction b { font-size: 10px; }.drag-instruction small { margin-top: 3px; color: #bed5d7; font-size: 8px; }.drag-instruction button { min-height: 36px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: 0 11px; color: white; background: rgba(255,255,255,.1); cursor: pointer; font-size: 8px; font-weight: 800; }
.safety-card { background: #1c1a17; color: #f3eadc; }.safety-card > span { color: #e5a17c; font-size: 8px; letter-spacing: .14em; }.safety-card h4 { margin: 7px 0 11px; font: 600 17px var(--serif); }.safety-card ul { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 18px; margin: 0; padding-left: 16px; color: #cec4b5; font-size: 9px; line-height: 1.5; }.safety-card p { margin: 13px 0 0; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.14); color: #e4b88e; font-size: 9px; line-height: 1.55; }
.config-foot { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 13px; padding: 16px 22px; border-top: 1px solid var(--line); background: rgba(246,239,228,.9); }.config-result strong { display: block; font-size: 11px; }.config-result small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }.config-actions { display: flex; gap: 6px; }.back-button:disabled { opacity: .35; cursor: default; }.next-button { min-width: 96px; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translate(-50%, 22px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 999px; color: white; background: #1b1815; box-shadow: 0 10px 28px rgba(0,0,0,.22); font-size: 11px; transition: .25s; }.toast.is-visible { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 1180px) {
  .topbar { grid-template-columns: 1fr auto; }.product-title { display: none; }.diy-layout { grid-template-columns: 1fr; width: min(1040px, calc(100% - 28px)); }.config-card { position: static; max-height: none; }.config-scroll { max-height: none; overflow: visible; }.viewer-card { min-height: 800px; }.canvas-shell, #collarCanvas { min-height: 560px; }
}
@media (max-width: 720px), (max-height: 520px) and (max-width: 900px) {
  :root { --mobile-topbar: calc(56px + env(safe-area-inset-top)); }
  html, body { height: 100%; }
  body:not(.is-embedded) { height: 100dvh; overflow: hidden; }
  .topbar { height: var(--mobile-topbar); padding: env(safe-area-inset-top) 12px 0; grid-template-columns: 1fr auto; gap: 8px; }.brand { gap: 8px; }.brand-paw { width: 34px; height: 34px; }.brand strong { font-size: 13px; letter-spacing: .035em; }.brand small, .save-state, .quiet-button { display: none; }.top-actions { gap: 4px; }.top-actions .primary-button { min-width: 88px; }
  .quiet-button, .primary-button, .back-button { min-height: 44px; padding: 0 14px; font-size: 12px; }
  .diy-layout { width: 100%; height: calc(100dvh - var(--mobile-topbar)); min-height: 0; margin: 0; display: grid; grid-template-rows: minmax(220px, 43%) minmax(0, 57%); gap: 0; }
  body.is-embedded .diy-layout { width: 100%; height: 100dvh; margin: 0; grid-template-rows: minmax(220px, 43%) minmax(0, 57%); }
  .viewer-card, .config-card { border-radius: 0; box-shadow: none; }
  .viewer-card { min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; padding: 9px 10px 0; overflow: hidden; border-width: 0 0 1px; }
  .viewer-head { min-height: 35px; align-items: center; padding: 0 2px 7px; }.viewer-head .eyebrow, .viewer-badges { display: none; }.viewer-head h1 { margin: 0; font: 600 19px/1.15 var(--serif); }
  .canvas-shell, #collarCanvas { width: 100%; height: 100%; min-height: 0; border-radius: 15px; }.model-chip, .live-summary { display: none; }.canvas-hint { bottom: 6px; max-width: calc(100% - 14px); gap: 5px; overflow: hidden; font-size: 8px; }.desktop-hint { display: none; }.mobile-hint { display: inline; }
  .viewer-toolbar { min-height: 49px; display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; overflow-x: auto; border: 0; scrollbar-width: none; }.viewer-toolbar::-webkit-scrollbar { display: none; }.view-buttons, .viewer-tools { flex: 0 0 auto; flex-wrap: nowrap; gap: 6px; }.viewer-toolbar button { min-height: 44px; padding: 0 13px; white-space: nowrap; font-size: 10px; background: rgba(255,255,255,.48); }
  .config-card { position: relative; top: auto; max-height: none; height: 100%; display: grid; grid-template-rows: 12px auto minmax(0,1fr) auto; overflow: hidden; border: 0; border-radius: 20px 20px 0 0; background: var(--paper-soft); }.config-card::before { content: ""; align-self: center; justify-self: center; width: 42px; height: 4px; border-radius: 999px; background: #c7b9a5; }.config-head { display: none; }
  .config-tabs { position: static; z-index: 10; min-height: 50px; padding: 0 8px 7px; gap: 4px; overflow-x: auto; grid-template-columns: repeat(6, minmax(62px,1fr)); background: var(--paper-soft); scrollbar-width: none; }.config-tabs::-webkit-scrollbar { display: none; }.config-tabs button { min-height: 44px; padding: 4px 2px; font-size: 9px; }.config-tabs button span { margin-bottom: 1px; }
  .config-scroll { min-height: 0; max-height: none; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding-bottom: 8px; }.config-panel { padding: 17px 16px 22px; }.panel-title h3 { margin-top: 4px; font-size: 19px; line-height: 1.22; }.panel-title p { font-size: 10px; line-height: 1.6; }
  .swatch-grid { grid-template-columns: 1fr 1fr; }.thread-palette { grid-template-columns: repeat(3, 1fr); }.swatch, .finish, .module-option, .accessory-grid button { min-height: 48px; }.module-option { grid-template-columns: 48px 1fr; }.module-option em { grid-column: 2; }.text-field { min-height: 48px; grid-template-columns: 72px 1fr; }.text-field small { grid-column: 2; }.field-group { margin-top: 20px; }
  .tag-builder-head { margin-top: 15px; padding: 10px; }.tag-builder-head b { font-size: 11px; }.tag-builder-head small { font-size: 8px; }.add-tag-button { min-height: 46px; }.tag-strip { min-height: 70px; margin-top: 8px; padding: 8px; }.tag-pill { min-height: 52px; }.tag-pill b { font-size: 9px; }.danger-link { min-height: 44px; font-size: 9px; }.accessory-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }.charm-grid { grid-template-columns: repeat(2, 1fr); }.accessory-grid button { min-height: 78px; }.accessory-grid button b { font-size: 9px; }.drag-instruction { grid-template-columns: 34px 1fr; }.drag-instruction button { grid-column: 1 / 3; min-height: 44px; }.safety-card ul { grid-template-columns: 1fr; }
  .config-foot { position: static; z-index: 12; grid-template-columns: minmax(0,1fr) auto; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); background: rgba(246,239,228,.97); }.config-result { min-width: 0; }.config-result strong, .config-result small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.config-actions { display: grid; grid-template-columns: auto minmax(94px,1fr); gap: 6px; }.config-actions button { min-height: 48px; padding: 0 11px; }.toast { bottom: calc(76px + env(safe-area-inset-bottom)); max-width: calc(100% - 24px); text-align: center; }
  .base-option { grid-template-columns: 72px minmax(0,1fr) auto; min-height: 78px; gap: 10px; }.base-visual { height: 48px; }.finish-actions { grid-template-columns: 1fr; }.production-button { min-height: 78px; }.mini-handoff { grid-template-columns: 40px 1fr; padding: 13px; }.mini-handoff__mark { width: 40px; height: 40px; }.finish-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 360px), (max-height: 650px) and (max-width: 900px) {
  .diy-layout, body.is-embedded .diy-layout { grid-template-rows: minmax(190px, 39%) minmax(0, 61%); }.viewer-head { display: none; }.viewer-toolbar { min-height: 46px; }.viewer-toolbar button { min-height: 44px; }.config-result small { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) and (max-width: 900px) {
  :root { --mobile-topbar: calc(48px + env(safe-area-inset-top)); }
  .topbar { padding-left: calc(10px + env(safe-area-inset-left)); padding-right: calc(10px + env(safe-area-inset-right)); }.brand-paw { width: 30px; height: 30px; }.top-actions .primary-button { min-height: 40px; }
  .diy-layout, body.is-embedded .diy-layout { height: calc(100dvh - var(--mobile-topbar)); grid-template-columns: minmax(0, 48%) minmax(0, 52%); grid-template-rows: minmax(0, 1fr); }
  body.is-embedded .diy-layout { height: 100dvh; }
  .viewer-card { border-right: 1px solid var(--line); border-bottom: 0; }.config-card { border-radius: 16px 0 0 16px; }.viewer-toolbar { min-height: 44px; }.viewer-toolbar button { min-height: 40px; }.canvas-hint { display: none; }
  .config-tabs { min-height: 45px; }.config-tabs button { min-height: 40px; }.config-panel { padding: 14px; }.panel-title h3 { font-size: 19px; }.config-foot { padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
