:root {
  color-scheme: light;
  --navy: #061a33;
  --navy-2: #0b2b52;
  --blue: #087cff;
  --blue-2: #005fd0;
  --blue-soft: #eaf4ff;
  --ink: #0b1627;
  --muted: #607086;
  --line: #d8e1ec;
  --panel: #ffffff;
  --canvas-bg: #e6edf5;
  --good: #0d8b62;
  --warn: #c47a00;
  --danger: #cf2f3d;
  --shadow: 0 12px 32px rgba(6, 26, 51, .11);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { background: #f4f7fb; color: var(--ink); overflow: hidden; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }

.app-shell { min-height: 100dvh; height: 100dvh; display: grid; grid-template-rows: 58px minmax(0, 1fr); }
.topbar { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 12px; color: #fff; background: linear-gradient(115deg, #041326, var(--navy) 56%, #0b3261); border-bottom: 3px solid var(--blue); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-mark { width: 40px; height: 40px; flex: 0 0 40px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--blue); font-weight: 900; letter-spacing: -.06em; box-shadow: inset 0 0 0 2px rgba(255,255,255,.16); }
.brand > span:last-child { min-width: 0; display: grid; }
.brand strong { font-size: 1.08rem; letter-spacing: .01em; white-space: nowrap; }
.brand small { margin-top: 1px; color: #bdd3ee; font-size: .77rem; white-space: nowrap; }
.top-summary { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: .84rem; color: #d9e8f9; }
.top-summary strong { color: #fff; font-size: 1.1rem; }
.test-badge { padding: 6px 9px; border: 1px solid #93c5fd; border-radius: 999px; color: #061a33; background: #dbeafe; font-size: .68rem; font-weight: 950; letter-spacing: .06em; }
.width-pill { padding: 7px 10px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.07); border-radius: 999px; }
.ghost-button { border: 1px solid rgba(255,255,255,.3); color: #fff; background: transparent; border-radius: 9px; padding: 8px 11px; }

.builder-grid { min-height: 0; display: grid; grid-template-columns: minmax(230px, 16vw) minmax(560px, 1fr) minmax(245px, 17vw); gap: 6px; padding: 6px; }
.panel, .studio { min-height: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); box-shadow: 0 2px 9px rgba(6, 26, 51, .05); }
.panel { padding: 12px; overflow: auto; scrollbar-width: thin; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.panel-head small, .selection-title small, .locked-card small, .length-card small, .modal-card header small { display: block; margin-bottom: 3px; color: var(--blue-2); font-size: .7rem; font-weight: 900; letter-spacing: .11em; }
.panel-head h1, .panel-head h2 { margin: 0; font-size: 1.2rem; line-height: 1.2; }
.count { min-width: 31px; height: 27px; display: grid; place-items: center; padding: 0 7px; border-radius: 999px; color: white; background: var(--navy); font-size: .78rem; font-weight: 800; }

.upload-zone { width: 100%; display: grid; place-items: center; gap: 4px; padding: 17px 10px; border: 1.5px dashed #84bfff; border-radius: 12px; color: var(--ink); background: linear-gradient(180deg, #f7fbff, var(--blue-soft)); text-align: center; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--blue); background: #deefff; }
.upload-zone .upload-icon, .canvas-empty > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--blue); font-size: 1.15rem; font-weight: 900; }
.upload-zone strong { font-size: .94rem; }
.upload-zone small { color: var(--muted); font-size: .75rem; }
.upload-zone > span:last-child { margin-top: 4px; padding: 6px 10px; border-radius: 7px; color: #fff; background: var(--navy); font-size: .75rem; font-weight: 800; }

.primary-soft, .primary-button, .secondary-button, .tool-grid button, .crop-actions button, .download-row button { min-height: 39px; border: 1px solid #b7d6fb; border-radius: 9px; color: #06488f; background: var(--blue-soft); font-size: .82rem; font-weight: 800; }
.primary-soft { width: 100%; margin-top: 10px; }
.primary-soft:hover, .tool-grid button:hover, .crop-actions button:hover { border-color: var(--blue); background: #dceeff; }
.primary-button { padding: 0 18px; color: #fff; border-color: var(--blue); background: var(--blue); }
.secondary-button { padding: 0 18px; color: var(--ink); border-color: var(--line); background: #fff; }

.asset-list { margin-top: 12px; display: grid; gap: 8px; }
.empty-state { min-height: 94px; display: grid; place-items: center; align-content: center; gap: 4px; color: #8290a1; border: 1px solid #e2e8f0; border-radius: 10px; background: #f9fbfd; text-align: center; }
.empty-state span { font-size: 1.5rem; }
.empty-state p { margin: 0; max-width: 180px; font-size: .78rem; }
.asset-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 9px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.asset-card:hover { border-color: #8ebff4; }
.asset-card.selected { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(8,124,255,.12); }
.asset-thumb { width: 52px; height: 52px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background-color: #f6f7f9; background-image: linear-gradient(45deg,#d9dfe7 25%,transparent 25%),linear-gradient(-45deg,#d9dfe7 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#d9dfe7 75%),linear-gradient(-45deg,transparent 75%,#d9dfe7 75%); background-size: 12px 12px; background-position: 0 0,0 6px,6px -6px,-6px 0; }
.asset-thumb img { width: 100%; height: 100%; object-fit: contain; }
.asset-info { min-width: 0; display: grid; gap: 6px; }
.asset-info > button { min-width: 0; padding: 0; border: 0; color: var(--ink); background: transparent; text-align: left; }
.asset-info strong { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .78rem; }
.asset-info small { color: var(--muted); font-size: .67rem; }
.dtf-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.dtf-badges span { padding: 3px 6px; border-radius: 999px; font-size: .59rem; font-weight: 900; line-height: 1.2; }
.dtf-warning { color: #865000; background: #fff0cf; }
.dtf-good { color: #08704e; background: #e3f7ef; }
.asset-info > .remove-bg-option { width: 100%; min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 10px; border: 1px solid var(--blue); border-radius: 8px; color: #fff; background: var(--blue); text-align: center; font-size: .72rem; font-weight: 900; box-shadow: 0 3px 9px rgba(8,124,255,.2); }
.asset-info > .remove-bg-option:hover { border-color: var(--blue-2); background: var(--blue-2); }
.asset-info > .remove-bg-option:focus-visible { outline: 3px solid rgba(8,124,255,.24); outline-offset: 2px; }
.quantity-row { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.quantity-row > span { font-size: .69rem; color: var(--muted); font-weight: 700; }
.quantity { display: grid; grid-template-columns: 27px 34px 27px; overflow: hidden; border: 1px solid var(--line); border-radius: 7px; }
.quantity button { height: 27px; border: 0; color: var(--blue-2); background: #f3f7fb; font-weight: 900; }
.quantity output { display: grid; place-items: center; font-size: .72rem; font-weight: 800; }

.selection-tools { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.selection-title { display: flex; align-items: start; justify-content: space-between; gap: 10px; }
.selection-title > div { min-width: 0; }
.selection-title strong { display: block; max-width: 165px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .84rem; }
.selection-title > span { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; color: var(--good); background: #e5f7f0; font-size: .66rem; font-weight: 900; }
.selection-title > span.low { color: #9c5e00; background: #fff0d6; }
.lock-row { display: flex; align-items: center; gap: 7px; margin: 10px 0 8px; color: var(--muted); font-size: .75rem; }
.size-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.size-grid > label { display: grid; gap: 4px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.number-stepper { display: grid; grid-template-columns: 27px minmax(45px,1fr) 27px; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; }
.number-stepper button { border: 0; color: var(--blue-2); background: #f4f8fc; font-weight: 900; }
.number-stepper input { width: 100%; min-width: 0; height: 35px; padding: 0 4px; border: 0; outline: 0; text-align: center; font-size: .76rem; font-weight: 800; }
.tool-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
.tool-grid button { min-width: 0; padding: 7px 4px; font-size: .72rem; }
.tool-grid .danger { grid-column: 1 / -1; color: var(--danger); border-color: #f4c6cb; background: #fff5f6; }

.studio { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; background: #edf2f8; }
.studio-toolbar { min-height: 46px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 9px; border-bottom: 1px solid var(--line); background: #fff; }
.toolbar-left { min-width: 0; display: flex; align-items: center; gap: 7px; }
.toolbar-right { display: flex; align-items: center; gap: 12px; }
.drag-tip { color: var(--blue-2); font-size: .7rem; font-weight: 900; white-space: nowrap; }
.toolbar-left > label { color: var(--muted); font-size: .74rem; font-weight: 800; }
.icon-button, .fit-button { min-width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 7px; color: var(--navy-2); background: #fff; font-weight: 900; }
.fit-button { padding: 0 8px; font-size: .72rem; }
.divider { width: 1px; height: 23px; margin: 0 3px; background: var(--line); }
#zoomRange { width: clamp(70px, 9vw, 150px); accent-color: var(--blue); }
#zoomOutput { min-width: 41px; font-size: .7rem; font-weight: 800; }
.snap-toggle { display: flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--muted); font-size: .73rem; font-weight: 800; }
.snap-toggle input { accent-color: var(--blue); }
.canvas-scroll { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 22px 12px 28px; background-color: var(--canvas-bg); background-image: radial-gradient(#c9d3df 1px, transparent 1px); background-size: 15px 15px; }
.sheet-stage { position: relative; margin: 0 auto; transform-origin: top left; }
.sheet-width-label { position: absolute; top: -21px; left: 0; width: 100%; color: #5d6d80; text-align: center; font-size: .7rem; font-weight: 800; }
.sheet { position: relative; overflow: hidden; margin: 0 auto; background-color: transparent; background-image: linear-gradient(45deg,#e9edf2 25%,transparent 25%),linear-gradient(-45deg,#e9edf2 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#e9edf2 75%),linear-gradient(-45deg,transparent 75%,#e9edf2 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; box-shadow: 0 6px 28px rgba(6,26,51,.19); }
.safe-border { position: absolute; z-index: 1; inset: 7px; pointer-events: none; border: 1px dashed rgba(8,124,255,.36); }
.canvas-empty { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; align-content: center; gap: 6px; border: 0; color: var(--ink); background: transparent; }
.canvas-empty strong { font-size: .96rem; }
.canvas-empty small { color: var(--muted); font-size: .75rem; }
.design { position: absolute; z-index: 3; touch-action: none; user-select: none; cursor: grab; outline: 1px solid transparent; }
.design:active { cursor: grabbing; }
.design.dragging { z-index: 8; cursor: grabbing; filter: drop-shadow(0 7px 8px rgba(7,26,49,.22)); }
.design.selected { z-index: 5; outline: 2px solid var(--blue); outline-offset: 2px; }
.design.low-dpi::after { content: attr(data-dpi); position: absolute; right: 0; top: -21px; padding: 3px 5px; border-radius: 4px; color: #7b4900; background: #ffe4b5; font-size: 9px; font-weight: 900; }
.design img { position: absolute; left: 50%; top: 50%; max-width: none; max-height: none; pointer-events: none; transform-origin: center; object-fit: contain; }
.design-label { position: absolute; left: 2px; bottom: 2px; max-width: calc(100% - 4px); overflow: hidden; padding: 2px 4px; border-radius: 4px; color: #fff; background: rgba(6,26,51,.74); white-space: nowrap; text-overflow: ellipsis; font-size: 8px; }
.move-hint { position: absolute; z-index: 2; left: 50%; top: -25px; padding: 4px 7px; border-radius: 6px; color: #fff; background: var(--blue); box-shadow: 0 2px 7px rgba(7,26,49,.2); font-size: 9px; font-weight: 900; white-space: nowrap; pointer-events: none; transform: translateX(-50%); }
.resize-handle { position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border: 2px solid #fff; border-radius: 50%; background: var(--blue); box-shadow: 0 1px 4px rgba(0,0,0,.25); touch-action: none; }
.statusbar { min-height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 11px; border-top: 1px solid var(--line); color: var(--muted); background: #fff; font-size: .7rem; }

.locked-card, .length-card { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 11px; }
.locked-card { color: #fff; background: linear-gradient(130deg, var(--navy), #0d396d); }
.locked-card > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.11); }
.locked-card small { color: #9acaff; }
.locked-card strong, .length-card strong { display: block; font-size: .98rem; }
.locked-card p { margin: 2px 0 0; color: #c1d5ec; font-size: .69rem; }
.length-card { justify-content: space-between; margin-top: 9px; border: 1px solid #bad9fa; background: var(--blue-soft); }
.length-card span { color: var(--blue-2); font-size: .68rem; font-weight: 800; }
.pricing-note { margin: 10px 1px; color: var(--muted); font-size: .74rem; line-height: 1.4; }
.pricing-note strong { color: var(--ink); }
.usage-card { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; }
.usage-card > div:not(.progress) { display: flex; justify-content: space-between; gap: 10px; font-size: .72rem; }
.usage-card > div:last-child { margin-top: 7px; padding-top: 7px; border-top: 1px solid #e4eaf1; }
.progress { height: 6px; overflow: hidden; margin: 8px 0; border-radius: 99px; background: #dfe7f0; }
.progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--blue); transition: width .2s; }
.checks { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.checks-head, .check { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.checks-head { margin-bottom: 5px; font-size: .76rem; }
.checks-head span { color: var(--blue-2); font-size: .62rem; font-weight: 900; text-transform: uppercase; }
.check { min-height: 27px; color: var(--good); font-size: .68rem; }
.check em { flex: 1; color: var(--muted); font-style: normal; }
.check strong { font-size: .65rem; }
.check.warn { color: var(--warn); }
.rush-row { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.rush-row strong, .rush-row small { display: block; font-size: .73rem; }
.rush-row small { margin-top: 2px; color: var(--muted); font-size: .65rem; }
.rush-row input { position: absolute; opacity: 0; }
.rush-row i { width: 39px; height: 22px; padding: 3px; border-radius: 99px; background: #cbd4df; transition: background .2s; }
.rush-row i::after { content: ""; display: block; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform .2s; }
.rush-row input:checked + i { background: var(--blue); }
.rush-row input:checked + i::after { transform: translateX(17px); }
.fulfillment-card { display: grid; gap: 6px; margin: 10px 0 0; padding: 9px; border: 1px solid var(--line); border-radius: 10px; }
.fulfillment-card legend { padding: 0 4px; color: var(--ink); font-size: .72rem; font-weight: 900; }
.fulfillment-card label { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; padding: 8px; border: 1px solid #dbe4ee; border-radius: 8px; background: #fbfcfe; cursor: pointer; }
.fulfillment-card label:has(input:checked) { border-color: #70b8ff; background: var(--blue-soft); box-shadow: inset 0 0 0 1px rgba(8,124,255,.18); }
.fulfillment-card input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.fulfillment-card strong, .fulfillment-card small { display: block; }
.fulfillment-card strong { color: var(--ink); font-size: .72rem; }
.fulfillment-card small { margin-top: 2px; color: var(--muted); font-size: .63rem; line-height: 1.3; }
.price-box { display: grid; gap: 6px; margin-top: 10px; padding: 11px; border-radius: 10px; color: #dceafb; background: var(--navy); font-size: .72rem; }
.price-box > div { display: flex; justify-content: space-between; gap: 8px; }
.price-box .total { margin-top: 3px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.18); color: #fff; font-size: .9rem; }
.review-button, .cart-button { width: 100%; min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 0 14px; border: 0; border-radius: 10px; color: #fff; background: var(--blue); font-size: .84rem; font-weight: 900; box-shadow: 0 5px 14px rgba(8,124,255,.25); }
.review-button:hover, .cart-button:hover { background: var(--blue-2); }
.privacy-note { margin: 8px 0 0; color: var(--muted); text-align: center; font-size: .65rem; }

.modal { width: min(920px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 16px; box-shadow: var(--shadow); }
.modal::backdrop { background: rgba(2,12,25,.72); backdrop-filter: blur(3px); }
.modal-card { display: grid; gap: 12px; margin: 0; padding: 18px; }
.modal-card header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.modal-card h2 { margin: 0; font-size: 1.25rem; }
.close-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; font-size: 1.25rem; }
.modal-intro { margin: -4px 0 0; color: var(--muted); font-size: .8rem; }
.background-warning { padding: 10px 12px; border: 1px solid #efc66f; border-radius: 9px; color: #714500; background: #fff5dc; font-size: .76rem; line-height: 1.45; }
.crop-workspace { min-height: 290px; display: grid; place-items: center; overflow: auto; padding: 12px; border-radius: 12px; background-color: #dfe5ec; background-image: linear-gradient(45deg,#c7ced8 25%,transparent 25%),linear-gradient(-45deg,#c7ced8 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#c7ced8 75%),linear-gradient(-45deg,transparent 75%,#c7ced8 75%); background-size: 20px 20px; background-position: 0 0,0 10px,10px -10px,-10px 0; }
#cropCanvas { display: block; max-width: 100%; cursor: crosshair; touch-action: none; box-shadow: 0 4px 18px rgba(0,0,0,.2); }
.crop-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.crop-actions button { padding: 0 11px; }
.crop-actions button.active { color: #fff; border-color: var(--blue); background: var(--blue); }
.background-tool { display: grid; grid-template-columns: minmax(170px, 1fr) minmax(180px, .9fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid #b8d9fb; border-radius: 11px; background: var(--blue-soft); }
.background-tool strong, .background-tool small { display: block; }
.background-tool strong { font-size: .82rem; }
.background-tool small { margin-top: 3px; color: var(--muted); font-size: .69rem; }
.background-tool label { display: grid; grid-template-columns: auto 1fr 30px; align-items: center; gap: 6px; color: var(--muted); font-size: .7rem; font-weight: 800; }
.background-tool input { min-width: 70px; accent-color: var(--blue); }
.background-tool .primary-soft { width: auto; margin: 0; padding: 0 13px; }
.modal-card footer { display: flex; justify-content: flex-end; gap: 8px; }
.review-card { max-width: 600px; }
.review-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.review-summary > div { display: grid; gap: 4px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.review-summary span { color: var(--muted); font-size: .7rem; }
.review-summary strong { font-size: .92rem; }
.review-summary .review-total { color: #fff; border-color: var(--navy); background: var(--navy); }
.review-summary .review-total span { color: #c6d8ed; }
.review-warning { padding: 10px; border: 1px solid #f1d3a0; border-radius: 9px; color: #7c4b00; background: #fff4df; font-size: .76rem; }
.download-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.download-row button { color: var(--navy-2); border-color: var(--line); background: #fff; }
.checkout-note { margin: 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.checkout-note.unavailable { padding: 10px 12px; border: 1px solid #efc66f; border-radius: 9px; color: #714500; background: #fff5dc; font-weight: 700; }
.cart-button { margin-top: 0; }
.orders-card { max-width: 720px; }
.orders-card footer { align-items: center; justify-content: space-between; }
.orders-status { color: var(--muted); font-size: .74rem; }
.orders-list { min-height: 150px; max-height: min(60dvh, 560px); display: grid; align-content: start; gap: 10px; overflow: auto; padding: 2px; scrollbar-width: thin; }
.orders-empty { min-height: 145px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 20px; border: 1px dashed #b9c8d9; border-radius: 12px; color: var(--muted); background: #f8fafc; text-align: center; }
.orders-empty strong { color: var(--ink); }
.orders-empty p { max-width: 430px; margin: 0; font-size: .78rem; line-height: 1.45; }
.order-history-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.order-history-main { min-width: 0; }
.order-history-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-history-head strong { font-size: .9rem; }
.order-status { padding: 4px 7px; border-radius: 999px; color: #805300; background: #fff0cf; font-size: .65rem; font-weight: 900; text-transform: uppercase; }
.order-status.paid { color: #08704e; background: #e3f7ef; }
.order-history-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 7px; color: var(--muted); font-size: .74rem; }
.order-history-price { align-self: start; color: var(--navy); font-size: 1rem; font-weight: 900; }
.order-history-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.order-history-actions a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 11px; border: 1px solid #b7d6fb; border-radius: 8px; color: #06488f; background: var(--blue-soft); font-size: .72rem; font-weight: 800; text-decoration: none; }
.order-history-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .72rem; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 24px; max-width: min(460px, calc(100vw - 24px)); padding: 11px 15px; border-radius: 9px; color: #fff; background: #071a31; box-shadow: var(--shadow); font-size: .78rem; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

body.embed .topbar { height: 50px; padding-block: 5px; }
body.embed .app-shell { grid-template-rows: 50px minmax(0, 1fr); }
body.embed .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
body.embed .brand small { display: none; }

@media (max-width: 1100px) {
  body { overflow: auto; }
  .app-shell { height: auto; min-height: 100dvh; grid-template-rows: auto auto; }
  .builder-grid { grid-template-columns: minmax(240px, 300px) minmax(460px, 1fr); }
  .order-panel { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: start; }
  .order-panel .panel-head { grid-column: 1 / -1; margin-bottom: 0; }
  .order-panel .pricing-note, .order-panel .rush-row, .order-panel .fulfillment-card, .order-panel .price-box, .order-panel .review-button, .order-panel .privacy-note { grid-column: 3; }
  .order-panel .locked-card, .order-panel .length-card, .order-panel .usage-card { grid-column: 1; }
  .order-panel .checks { grid-column: 2; grid-row: 2 / span 3; margin: 0; }
  .studio { min-height: 750px; }
}

@media (max-width: 760px) {
  .topbar { position: sticky; z-index: 20; top: 0; padding: 8px 10px; }
  .top-summary { gap: 8px; }
  #fullscreenButton { display: none; }
  .width-pill, #topLength { display: none; }
  .builder-grid { display: flex; flex-direction: column; padding: 7px; }
  .art-panel, .order-panel { overflow: visible; }
  .studio { min-height: 72dvh; order: 2; }
  .art-panel { order: 1; }
  .order-panel { order: 3; display: block; }
  .order-panel > * { margin-top: 9px; }
  .selection-title strong { max-width: 230px; }
  .studio-toolbar { align-items: flex-start; flex-direction: column; }
  .toolbar-left { width: 100%; flex-wrap: wrap; }
  .toolbar-right { width: 100%; justify-content: space-between; }
  #zoomRange { flex: 1; min-width: 90px; }
  .canvas-scroll { padding: 25px 14px; }
  .statusbar { align-items: flex-start; flex-direction: column; gap: 2px; }
  .background-tool { grid-template-columns: 1fr; }
  .background-tool .primary-soft { width: 100%; }
  .review-summary, .download-row { grid-template-columns: 1fr; }
  .order-history-card { grid-template-columns: 1fr; }
  .order-history-price, .order-history-actions, .order-history-note { grid-column: 1; }
  .orders-card footer { align-items: stretch; flex-direction: column; }
  .crop-workspace { min-height: 230px; }
}

@media (max-width: 420px) {
  .brand strong { font-size: .91rem; }
  .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .top-summary strong { font-size: .92rem; }
  #myOrdersButton { padding-inline: 8px; font-size: .75rem; }
  .panel { padding: 12px; }
  .size-grid { grid-template-columns: 1fr; }
}
