@import url("/ycdesign-theme.css");

:root {
  font: 14px/1.4 Arial, sans-serif;
  color: var(--yc-ink);
  background: var(--yc-cream);
  --studio-accent: var(--yc-primary);
  --line: var(--yc-line);
  --muted: var(--yc-muted);
  --soft: var(--yc-sage);
  --shadow: 0 1px 3px #17192324;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; overflow: hidden; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap; }
button, input, select, textarea { font: inherit; }
button, select, input[type="color"], input[type="checkbox"], input[type="range"] { cursor: pointer; }
button, .primary { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: .55rem; padding: .45rem .75rem; text-decoration: none; }
button:disabled { opacity: .52; cursor: default; }
button:hover:not(:disabled) { border-color: var(--yc-outline); }
:focus-visible { outline: 2px solid var(--yc-primary); outline-offset: 3px; }
a { color: var(--yc-link); }
h1, h2, p { margin-top: 0; }
h2 { font-size: 1.12rem; margin-bottom: .5rem; }

.topbar { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1.7rem; min-height: 70px; padding: 0 24px 0 18px; background: #fff; border-bottom: 1px solid var(--line); }
.mark { flex: 0 0 auto; display: block; width: 120px; }
.mark img { display: block; width: 100%; height: auto; }
.topbar nav { align-self: stretch; flex: 1; display: flex; align-items: stretch; gap: .4rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.topbar nav > * { position: relative; display: inline-flex; align-items: center; gap: .55rem; padding: 0 .8rem; background: transparent; border: 0; border-radius: 0; font-weight: 600; color: var(--yc-ink); }
.topbar nav button { font: inherit; font-weight: 600; letter-spacing: inherit; text-transform: inherit; }
.topbar nav b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #9fa2ae; color: #fff; font-size: .83rem; letter-spacing: 0; }
.topbar nav .current { color: var(--yc-link); }
.topbar nav .current::after { content: ''; position: absolute; inset: auto 0 11px; height: 3px; background: var(--studio-accent); box-shadow: 0 1px 8px #24584668; }
.topbar nav .current b { background: var(--studio-accent); }
.topbar nav .step-disabled { color: #a3a4ad; }
.step-disabled b { opacity: .56; }
.header-actions { display: flex; align-items: center; gap: clamp(.65rem, 1.6vw, 1.8rem); white-space: nowrap; }
.contact { border: 0; padding: 0; color: var(--yc-link); text-align: left; font-weight: 600; justify-content: flex-start; }
.contact small { display: block; color: var(--yc-muted); font-size: .78rem; font-weight: 400; }
.sign-in { border-radius: 2rem; background: var(--yc-cream); padding: .72rem 1.05rem; font-weight: 600; }
.cart-link { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; color: var(--yc-heading); font-weight: 600; }
.header-actions .icon { width: 17px; height: 17px; }

.workspace { display: grid; grid-template-columns: 78px clamp(285px, 22.45vw, 430px) minmax(0, 1fr); gap: 12px; min-height: calc(100dvh - 70px); padding: 12px 12px 12px 13px; }
.rail, .sidebar { border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow); background: var(--yc-paper); }
.rail { align-self: start; display: grid; gap: .2rem; padding: 8px; }
.rail button { width: 100%; min-height: 60px; padding: .35rem .14rem; flex-direction: column; gap: .36rem; background: transparent; border: 0; border-radius: 12px; font-size: .77rem; line-height: 1.32; }
.rail #clipart { min-height: 68px; }
.rail #add-team { min-height: 75px; }
.rail #saved-designs { min-height: 69px; }
.rail button[aria-pressed="true"] { background: var(--soft); color: var(--yc-primary-dark); font-weight: 600; }
.rail button:hover:not(:disabled) { background: var(--yc-sage); }
.number-icon { display: grid; font-weight: 700; font-size: 1.1rem; line-height: 1.1; }
.number-icon small { font-size: .59rem; font-weight: 400; }

.sidebar { align-self: stretch; min-width: 0; display: flex; flex-direction: column; padding: 16px; }
.category { margin: 0 0 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; font-size: .87rem; font-weight: 600; }
.product-card { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px; border: 2px solid var(--studio-accent); border-radius: 16px; background: #fff; }
#product-thumbnail { display: block; width: 64px; height: 64px; border: 1px solid var(--yc-line); border-radius: 10px; background: var(--yc-cream); }
.product-info { min-width: 0; }
#product-title { font-size: .98rem; color: #151622; }
#product-style { font-size: .84rem; color: #626576; white-space: nowrap; }
.product-links { display: flex; gap: .85rem; flex-wrap: wrap; margin: 2px 0 8px; }
.product-links a, .product-links button { color: var(--yc-ink); font-size: .84rem; text-decoration: none; }
.product-links button { border: 0; padding: 0; }
.product-links a:hover, .product-links button:hover { text-decoration: underline; }
.product-colors { display: flex; justify-content: space-between; align-items: flex-start; gap: .35rem; }
.current-color { display: grid; justify-items: center; gap: 2px; min-width: 50px; color: #65677a; font-size: .73rem; }
#color-sample { width: 32px; height: 32px; border: 1px solid #a8a8ae; border-radius: 6px; }
#open-colors { background: var(--soft); border-color: var(--yc-sage-strong); color: var(--yc-primary-dark); font-size: .84rem; box-shadow: var(--shadow); white-space: nowrap; }
.product-color-count { margin: .3rem 0 0; color: var(--muted); font-size: .78rem; }
#image-resolution { margin: .4rem 0; font-size: .85rem; }
.add-products { display: flex; width: 100%; margin-top: 9px; box-shadow: var(--shadow); }
.decoration-heading { margin-top: 24px; }
.decoration-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.decoration-options button { position: relative; justify-content: flex-start; text-align: left; border-radius: 14px; padding: .55rem .7rem; }
.decoration-options button:disabled { border-style: dashed; }
.decoration-options button[aria-pressed="true"] { border-color: var(--studio-accent); }
.decoration-options button[aria-pressed="true"]::after { content: '✓'; position: absolute; top: -7px; right: -4px; width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: var(--yc-sage); color: var(--yc-primary); font-size: 11px; }
.decoration-options strong, .decoration-options small { display: block; }
.decoration-options small { color: var(--muted); font-size: .8rem; }
.quick-help { margin-top: auto; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; color: #555b6d; }
.quick-help p { margin: .3rem 0 0; font-size: .81rem; }
.quick-help p span, kbd { display: inline-grid; place-items: center; padding: .08rem .3rem; border: 1px solid var(--line); border-radius: 5px; background: #fff; box-shadow: var(--shadow); }
.quick-help p span { margin-right: .42rem; }
#status { color: var(--yc-link); margin: .65rem 0; }

.stage { --board: min(calc(100% - 152px), calc(100dvh - 107px), 940px); position: relative; min-width: 0; display: flex; align-items: flex-start; justify-content: center; margin-top: -4px; }
.artboard { width: var(--board); max-width: 100%; aspect-ratio: 1; position: relative; overflow: hidden; background: #fff; box-shadow: 0 6px 15px #191b2920; }
#product-base, #preview { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
#product-base { object-fit: contain; }
#preview { touch-action: none; }
#preview-message { position: absolute; top: 12%; width: 100%; padding: 0 1rem; text-align: center; color: var(--muted); }
#preview-message.color-only { top: 7%; display: grid; justify-items: center; gap: .45rem; }
#preview-message.color-only::before { content: ""; width: clamp(2rem, 8vw, 4rem); aspect-ratio: 1; border: 1px solid var(--yc-outline); border-radius: .45rem; background: var(--preview-swatch); }
#catalog-preview-note { position: absolute; bottom: 3rem; left: .6rem; right: .6rem; margin: 0 auto; width: fit-content; max-width: calc(100% - 1.2rem); padding: .25rem .5rem; border-radius: .35rem; background: #ffffffe8; color: var(--yc-muted); text-align: center; font-size: .75rem; pointer-events: none; }
.stage.zoomed :is(#product-base, #preview) { transform: scale(1.21); }
.stage.drag-over .artboard { outline: 2px dashed var(--studio-accent); outline-offset: 2px; }
.stage-tools { position: absolute; top: 9px; left: 9px; display: flex; gap: .3rem; align-items: center; }
.stage-tools label { display: flex; align-items: center; gap: .3rem; margin: 0; background: #ffffffed; padding: .35rem; border-radius: .45rem; }
.quick { position: absolute; z-index: 1; top: 35.3%; left: 50%; transform: translateX(-50%); display: grid; width: 192px; gap: 6px; padding: 12px; border: 1px solid var(--yc-line); border-radius: 17px; background: var(--yc-paper); box-shadow: 0 3px 7px #171a212c; }
.quick button { min-height: 42px; padding: .45rem .55rem; border-color: transparent; background: transparent; color: #434452; font-size: .91rem; font-weight: 600; }
.quick .primary { background: var(--studio-accent); color: #fff; box-shadow: var(--shadow); }
.quick .primary:hover:not(:disabled) { background: var(--yc-primary-hover); }
.notes-button { position: absolute; z-index: 1; bottom: 12px; left: 50%; transform: translateX(-50%); border-radius: 2rem; padding: .55rem 1rem; white-space: nowrap; font-weight: 600; box-shadow: var(--shadow); }
.view-tools { position: absolute; z-index: 2; top: 9px; bottom: 5px; display: flex; flex-direction: column; align-items: stretch; gap: 9px; width: 68px; left: min(calc(100% - 71px), calc(50% + var(--board) / 2 + clamp(8px, 3.6vw, 68px))); }
.views { display: grid; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.views button { flex-direction: column; gap: .08rem; padding: .35rem .16rem; border-color: transparent; border-radius: 13px; width: 100%; font-size: .74rem; }
.views button[aria-pressed="true"] { outline: 2px solid var(--studio-accent); outline-offset: -1px; }
.view-thumb { position: relative; width: 100%; aspect-ratio: 1; pointer-events: none; }
.views img, .view-thumb canvas { width: 100%; height: auto; display: block; }
.view-thumb canvas { position: absolute; inset: 0; }
.view-button { display: flex; flex-direction: column; gap: .3rem; min-height: 54px; border-radius: 14px; padding: .48rem .35rem; font-size: .77rem; box-shadow: var(--shadow); }
.view-button .icon { width: 19px; height: 19px; }
.view-button.share { margin-top: auto; }

#layer-panel h2 { margin-bottom: .55rem; }
.muted { color: #646773; margin: .4rem 0 .65rem; }
.layers { display: grid; list-style: none; margin: 0; padding: 0; gap: .35rem; }
.layers button { justify-content: flex-start; width: 100%; overflow-wrap: anywhere; }
.layers button[aria-pressed="true"] { background: var(--soft); border-color: var(--studio-accent); }
label { display: block; margin: .55rem 0 .18rem; color: #4e5459; font-size: .91rem; }
select, input[type="text"], input:not([type]), input[type="number"], textarea { width: 100%; border: 1px solid var(--yc-outline); border-radius: .4rem; background: #fff; color: #252b30; padding: .45rem .5rem; }
.paired { display: flex; justify-content: space-between; align-items: center; gap: .45rem; }
input[type="range"] { width: 100%; accent-color: var(--studio-accent); }
.layer-actions { display: flex; gap: .42rem; flex-wrap: wrap; margin-top: .6rem; }
.swatches { display: flex; flex-wrap: wrap; gap: .6rem; margin: .7rem 0; }
.swatches button { width: 37px; height: 37px; padding: 0; border-radius: 9px; background: var(--swatch); }
.swatches button[aria-pressed="true"] { outline: 2px solid var(--studio-accent); outline-offset: 2px; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: space-between; align-items: center; padding: .9rem clamp(.7rem, 3vw, 2.2rem); border-top: 1px solid var(--line); background: var(--yc-paper); }
.actions p { margin: 0; color: var(--muted); }
.actions div { display: flex; flex-wrap: wrap; gap: .65rem; }
.actions button, .primary { padding: .6rem 1.1rem; }
.primary { background: var(--studio-accent); color: #fff; border-color: var(--studio-accent); font-weight: 700; }
.primary:hover:not(:disabled) { background: var(--yc-primary-hover); color: #fff; }
dialog { width: min(560px, calc(100% - 1.5rem)); padding: 1rem; color: inherit; border: 1px solid var(--line); border-radius: .8rem; }
dialog::backdrop { background: #1c2c36a0; }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.dialog-header h2 { margin: 0; }
.dialog-buttons, .art-options { display: flex; gap: .55rem; flex-wrap: wrap; margin-top: .8rem; }
.order-color-row { display: flex; flex-wrap: wrap; align-items: end; gap: .55rem; margin: 0 0 .7rem; padding: .6rem; border: 1px solid var(--line); border-radius: .5rem; }
.order-color-row > div:first-child { flex: 1 1 10rem; }
.order-color-row > div:nth-child(2) { flex: 1 1 7rem; }
#wizard-form > button { margin-top: .85rem; }
#proof { width: min(830px, calc(100% - 1.5rem)); }
#proof-image { display: block; width: 100%; border-radius: .6rem; }
#draft-status { margin: .6rem 0 0; }

.icon { width: 21px; height: 21px; display: inline-block; flex: 0 0 auto; background: currentColor; mask: var(--icon) center / contain no-repeat; }
.quick .icon { width: 15px; height: 15px; }
.icon-shirt { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='m8 3-5 2-1 6 4 1 1-3v12h10V9l1 3 4-1-1-6-5-2c0 4-8 4-8 0Z'/%3E%3C/svg%3E"); }
.icon-upload { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3m-5 5 5-5 5 5M3 15v5h18v-5'/%3E%3C/svg%3E"); }
.icon-text { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round'%3E%3Cpath d='M4 6V3h16v3M12 3v17m-4 0h8'/%3E%3C/svg%3E"); }
.icon-graphics { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='m12 2 4 6H8l4-6ZM3 20v-6h6v6Z'/%3E%3Ccircle cx='17.5' cy='17' r='3.5'/%3E%3C/svg%3E"); }
.icon-spark { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linejoin='round'%3E%3Cpath d='m11 3 2.2 5.8L19 11l-5.8 2.2L11 19l-2.2-5.8L3 11l5.8-2.2L11 3Zm7 12v7m-3.5-3.5h7M20 2v6m-3-3h6'/%3E%3C/svg%3E"); }
.icon-picture { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='m3 19 5-5 3 3 5-6 5 5'/%3E%3Ccircle cx='8' cy='8' r='1.3'/%3E%3C/svg%3E"); }
.icon-zoom { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6.5'/%3E%3Cpath d='m15 15 5 5m-13-10h6m-3-3v6'/%3E%3C/svg%3E"); }
.icon-share { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7'%3E%3Ccircle cx='5' cy='12' r='2.5'/%3E%3Ccircle cx='18' cy='5' r='2.5'/%3E%3Ccircle cx='18' cy='19' r='2.5'/%3E%3Cpath d='m7 11 8.5-4.8M7 13l8.5 4.8'/%3E%3C/svg%3E"); }
.icon-chat { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linejoin='round'%3E%3Cpath d='M4 17a9 9 0 1 1 4 3l-5 1 1-4Z'/%3E%3C/svg%3E"); }
.icon-phone { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linejoin='round'%3E%3Cpath d='M3 4l4-2 4 5-3 3a11 11 0 0 0 6 6l3-3 5 4-2 4C12 24 1 12 3 4Z'/%3E%3C/svg%3E"); }
.icon-cart { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linejoin='round'%3E%3Cpath d='M2 3h3l3 12h11l3-9H6'/%3E%3Ccircle cx='9' cy='20' r='1.2'/%3E%3Ccircle cx='18' cy='20' r='1.2'/%3E%3C/svg%3E"); }
.icon-user { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.65' stroke-linecap='round'%3E%3Ccircle cx='12' cy='8' r='3'/%3E%3Cpath d='M5 20v-2a7 7 0 0 1 14 0v2'/%3E%3C/svg%3E"); }
.icon-print { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linejoin='round'%3E%3Cpath d='M12 2c3 5 7 9 7 13a7 7 0 0 1-14 0c0-4 4-8 7-13Z'/%3E%3C/svg%3E"); }

@media (max-width: 1120px) {
  .topbar { gap: 1rem; padding: 0 .8rem; }
  .header-actions .contact { display: none; }
  .workspace { grid-template-columns: 66px 280px minmax(0, 1fr); gap: 8px; }
  .rail, .sidebar { padding: 9px; }
  .stage { --board: min(calc(100% - 87px), calc(100dvh - 107px), 810px); justify-content: flex-start; }
  .view-tools { left: calc(var(--board) + 9px); }
}

@media (max-width: 790px) {
  .topbar { flex-wrap: wrap; gap: 0; min-height: 0; }
  .mark { width: 91px; margin-block: .3rem; }
  .topbar nav { order: 3; flex: 0 0 100%; min-height: 44px; gap: 0; font-size: .8rem; }
  .topbar nav > * { padding: 0 .5rem; }
  .topbar nav .current::after { bottom: 0; }
  .workspace { display: flex; flex-direction: column; padding: 6px; min-height: 0; }
  .rail { position: relative; display: flex; width: 100%; padding: 4px; gap: 1px; overflow: auto; order: 1; }
  .rail button, .rail #clipart, .rail #add-team, .rail #saved-designs { min-width: 48px; flex: 1; font-size: .67rem; min-height: 46px; }
  .rail .icon { width: 16px; height: 16px; }
  .sidebar { order: 2; }
  .quick-help { display: none; }
  .stage { --board: calc(100% - 56px); margin-top: 0; }
  .view-tools { width: 48px; left: auto; right: 0; gap: 5px; top: 2px; }
  .view-button { min-height: 36px; font-size: .68rem; padding: .28rem .14rem; }
  .view-button .icon { width: 14px; height: 14px; }
  .quick { top: 35%; width: 151px; padding: 6px; gap: 2px; }
  .quick button { min-height: 32px; font-size: .78rem; padding: .2rem; }
  .notes-button { bottom: 5px; padding: .35rem .62rem; font-size: .76rem; }
}
