@font-face {
  font-family: "Paperlogy";
  font-weight: 300;
  font-display: swap;
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-3Light.woff2") format("woff2");
}

@font-face {
  font-family: "Paperlogy";
  font-weight: 400;
  font-display: swap;
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2") format("woff2");
}

@font-face {
  font-family: "Paperlogy";
  font-weight: 500;
  font-display: swap;
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-5Medium.woff2") format("woff2");
}

@font-face {
  font-family: "Paperlogy";
  font-weight: 700;
  font-display: swap;
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2") format("woff2");
}

@font-face {
  font-family: "Paperlogy";
  font-weight: 800;
  font-display: swap;
  src: url("https://fastly.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2") format("woff2");
}

:root {
  --primary-50: #eef4ff;
  --primary-500: #356df3;
  --primary-600: #245be7;
  --primary-700: #1748c7;
  --neutral-50: #f7f8fa;
  --neutral-100: #eceff3;
  --neutral-300: #cfd4dc;
  --neutral-600: #586174;
  --neutral-900: #11151d;
  --white: #ffffff;
  --line: #e1e5eb;
  --success: #13945f;
  --warning: #b54708;
  --error: #d92d20;
  --panel-width: 428px;
  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 20px 48px rgba(17, 21, 29, 0.18);
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--neutral-50);
  color: var(--neutral-900);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  font-size: 16px;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(36, 91, 231, 0.22);
  outline-offset: 2px;
}

.studio-header {
  position: relative;
  z-index: 100;
  width: 100%;
  height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.studio-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--neutral-600);
  text-decoration: none;
  white-space: nowrap;
}

.studio-brand img { width: auto; height: 24px; display: block; }

.studio-brand span {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.product-switch {
  height: 40px;
  padding: 4px;
  display: inline-flex;
  gap: 4px;
  border-radius: var(--radius);
  background: var(--neutral-100);
}

.product-switch a {
  min-width: 104px;
  height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--neutral-600);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.product-switch a.active {
  background: var(--white);
  color: var(--neutral-900);
  box-shadow: 0 1px 4px rgba(17, 21, 29, 0.12);
}

.header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-button,
.header-link,
.hb {
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: #3d4656;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.header-button:hover,
.header-link:hover,
.hb:hover { background: var(--neutral-50); }

.header-button.primary,
.hb.prim {
  border-color: var(--primary-600);
  background: var(--primary-600);
  color: var(--white);
}

.header-button.primary:hover,
.hb.prim:hover { background: var(--primary-700); }

.header-user {
  max-width: 160px;
  overflow: hidden;
  color: var(--neutral-600);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-user a { color: var(--primary-600); text-decoration: none; }

.mobile-menu {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.mobile-menu span {
  width: 20px;
  height: 2px;
  margin: 5px auto;
  display: block;
  background: var(--neutral-900);
}

.card-workspace {
  width: 100%;
  height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--panel-width);
  overflow: hidden;
}

.canvas-shell {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--neutral-50);
}

.canvas-toolbar {
  flex: 0 0 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.canvas-title strong { display: block; font-size: 14px; }
.canvas-title span { display: block; margin-top: 4px; color: var(--neutral-600); font-size: 12px; }

.view-switch {
  padding: 4px;
  display: inline-flex;
  gap: 4px;
  border-radius: var(--radius);
  background: var(--neutral-100);
}

.view-switch button {
  min-width: 56px;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--neutral-600);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.view-switch button.active {
  background: var(--white);
  color: var(--neutral-900);
  box-shadow: 0 1px 4px rgba(17, 21, 29, 0.12);
}

.card-stage {
  min-height: 0;
  flex: 1;
  padding: 32px 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(32px, 5vw, 80px);
  overflow: auto;
  background-color: #f4f6f9;
  background-image: radial-gradient(#d8dde6 1px, transparent 1px);
  background-size: 20px 20px;
}

.card-side {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.face-label {
  min-height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--neutral-600);
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(17, 21, 29, 0.06);
}

.face-label span { color: var(--primary-600); font-size: 10px; letter-spacing: 0.1em; }

.cardwrap {
  position: relative;
  width: clamp(220px, 20vw, 320px);
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-card);
  line-height: 0;
}

.cardwrap svg,
.cardwrap img {
  width: 101.754%;
  height: auto;
  margin-left: -0.877%;
  display: block;
}

.cardwrap .ovl {
  position: absolute;
  top: 0;
  left: -0.877%;
  width: 101.754%;
  height: 100%;
  margin-left: 0;
}

body.card-front-only [data-card-face="back"],
body.card-back-only [data-card-face="front"] { display: none; }

body.card-front-only .cardwrap,
body.card-back-only .cardwrap { width: clamp(260px, 25vw, 360px); }

.canvas-status {
  flex: 0 0 48px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border-top: 1px solid var(--line);
  color: var(--neutral-600);
  font-size: 12px;
}

.canvas-status strong { color: var(--neutral-900); }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(19, 148, 95, 0.12);
}

.editor-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 40px rgba(17, 21, 29, 0.04);
}

.panel-heading {
  flex: 0 0 auto;
  padding: 24px 24px 16px;
}

.panel-heading > p {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-600);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.panel-heading > p span { width: 24px; height: 2px; background: currentColor; }

.panel-heading h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.3;
  letter-spacing: -0.035em;
}

.panel-heading > span {
  margin-top: 8px;
  display: block;
  color: var(--neutral-600);
  font-size: 14px;
  line-height: 1.6;
}

.editor-tabs {
  flex: 0 0 auto;
  margin: 0 20px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  border-radius: var(--radius);
  background: var(--neutral-100);
}

.editor-tabs button {
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--neutral-600);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.editor-tabs button span {
  width: 20px;
  height: 20px;
  margin-right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(88, 97, 116, 0.1);
  font-size: 11px;
}

.editor-tabs button.active {
  background: var(--white);
  color: var(--primary-600);
  box-shadow: 0 1px 4px rgba(17, 21, 29, 0.12);
}

.editor-tabs button.active span { background: var(--primary-600); color: var(--white); }

.panel-scroll {
  min-height: 0;
  flex: 1;
  padding: 24px 24px 112px;
  overflow-y: auto;
  scrollbar-color: var(--neutral-300) transparent;
}

.editor-step[hidden] { display: none !important; }

.step-heading { margin-bottom: 24px; }
.step-heading > span { color: var(--primary-600); font-size: 11px; font-weight: 800; letter-spacing: 0.12em; }
.step-heading h2 { margin: 8px 0 0; font-size: 20px; line-height: 1.4; letter-spacing: -0.025em; }
.step-heading p { margin: 8px 0 0; color: var(--neutral-600); font-size: 13px; line-height: 1.6; }

.picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.picker .p {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  line-height: 0;
  box-shadow: 0 0 0 1px var(--line);
  transition: box-shadow 0.16s, transform 0.16s;
}

.picker .p:hover { transform: translateY(-2px); box-shadow: 0 0 0 2px #9db7f9; }
.picker .p.active { box-shadow: 0 0 0 3px var(--primary-600); }
.picker .p.active::after {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-600);
  color: var(--white);
  content: "✓";
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.picker .p img { width: 100%; height: auto; display: block; }

.sec {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.sech { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 14px; font-weight: 700; }
.schip { padding: 4px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.schip.sg { background: var(--neutral-100); color: var(--neutral-600); }
.schip.sf { background: var(--primary-50); color: var(--primary-600); }
.schip.sb { background: #f4f0ff; color: #6941c6; }
.secd { margin: 0 0 12px; color: var(--neutral-600); font-size: 11px; line-height: 1.5; }
.subdiv { margin: 16px 0 8px; display: flex; align-items: center; gap: 8px; color: var(--neutral-600); font-size: 11px; font-weight: 700; }
.subdiv::after { height: 1px; flex: 1; background: var(--neutral-100); content: ""; }
.cap { color: var(--neutral-600); font-size: 11px; font-weight: 400; }

.grp { margin: 8px 0; }
.glbl { margin: 0 0 8px; color: var(--neutral-600); font-size: 12px; font-weight: 700; }
.fld { margin: 12px 0; }
.fld label { margin-bottom: 6px; display: block; color: #3d4656; font-size: 12px; font-weight: 700; line-height: 1.5; }

.fld input[type="text"],
.fld input[type="number"],
.fld select,
.fld textarea,
.cfgBox input[type="text"] {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--neutral-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--neutral-900);
  font-size: 13px;
}

.fld textarea { min-height: 80px; padding-top: 12px; resize: vertical; }

.fld input:focus,
.fld select:focus,
.fld textarea:focus,
.cfgBox input:focus {
  border-color: var(--primary-600);
  outline: none;
  box-shadow: 0 0 0 3px rgba(36, 91, 231, 0.14);
}

.row2 { display: flex; gap: 12px; }
.row2 .fld { min-width: 0; flex: 1; }
input[type="range"] { width: 100%; min-height: 28px; accent-color: var(--primary-600); }

.swatches { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sw { width: 40px; height: 36px; padding: 3px; border: 1px solid var(--neutral-300); border-radius: var(--radius-sm); background: var(--white); cursor: pointer; }
.mini { min-height: 36px; padding: 0 12px; border: 1px solid var(--neutral-300); border-radius: var(--radius-sm); background: var(--white); color: #3d4656; cursor: pointer; font-size: 12px; font-weight: 700; }
.mini:hover { border-color: #9db7f9; background: var(--primary-50); }

.segs { padding: 4px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; border-radius: var(--radius); background: var(--neutral-100); }
.seg { min-height: 40px; padding: 0 8px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--neutral-600); cursor: pointer; font-size: 12px; font-weight: 700; }
.seg.active { background: var(--white); color: var(--neutral-900); box-shadow: 0 1px 4px rgba(17, 21, 29, 0.12); }
.segd { margin-top: 8px; color: var(--neutral-600); font-size: 11px; line-height: 1.6; }

.fdet,
.secfold { margin-top: 8px; }

.fdet summary,
.secfold summary {
  min-height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--neutral-50);
  color: var(--neutral-600);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}

.fdet summary::-webkit-details-marker,
.secfold summary::-webkit-details-marker { display: none; }
.fdet .inner,
.secfold .inner { padding: 8px 4px 0; }
.mini2 { display: flex; gap: 8px; }
.mini2 select { min-width: 0; flex: 1; min-height: 36px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); color: var(--neutral-600); font-size: 11px; }

.filebtn {
  width: 100%;
  min-height: 44px;
  padding: 6px;
  border: 1px dashed var(--neutral-300);
  border-radius: var(--radius-sm);
  background: var(--neutral-50);
  color: var(--neutral-600);
  font-size: 12px;
}

.filebtn::file-selector-button {
  min-height: 32px;
  margin-right: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  color: #3d4656;
  cursor: pointer;
  font-weight: 700;
}

.hint { margin-top: 12px; color: var(--neutral-600); font-size: 11px; line-height: 1.6; }
.warn { margin-top: 6px; color: var(--warning); font-size: 11px; line-height: 1.5; }
#adjustNote { margin-top: 12px; color: #175cd3; font-size: 11px; line-height: 1.6; }
#adjustNote:not(:empty) { padding: 10px 12px; border: 1px solid #b2ddff; border-radius: var(--radius-sm); background: #eff8ff; }

.reset-button {
  width: 100%;
  min-height: 44px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: #3d4656;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.reset-button:hover { background: var(--neutral-50); }

.review-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.review-card div { min-height: 64px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.review-card div:last-child { border-bottom: 0; }
.review-card span { color: var(--neutral-600); font-size: 12px; }
.review-card strong { text-align: right; font-size: 13px; }

.review-list { margin: 20px 0; padding: 0; display: grid; gap: 10px; list-style: none; }
.review-list li { position: relative; padding-left: 28px; color: #3d4656; font-size: 13px; line-height: 1.6; }
.review-list li::before { position: absolute; left: 0; top: 1px; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: #ecfdf3; color: var(--success); content: "✓"; font-size: 11px; font-weight: 800; }

.order-button,
.submit-order {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary-600);
  color: var(--white);
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(36, 91, 231, 0.24);
}

.order-button:hover,
.submit-order:hover { background: var(--primary-700); }

.wizard-actions {
  flex: 0 0 88px;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.wizard-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: #3d4656;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.wizard-button.primary { border-color: var(--primary-600); background: var(--primary-600); color: var(--white); }
.wizard-button.primary:hover { background: var(--primary-700); }
.wizard-button:disabled { opacity: 0.36; cursor: default; }

#orderModal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 16px;
  overflow: auto;
  background: rgba(9, 14, 26, 0.58);
  backdrop-filter: blur(4px);
}

.order-box {
  position: relative;
  width: min(760px, 100%);
  padding: 28px;
  border-radius: 20px;
  background: var(--white);
  box-shadow: 0 24px 72px rgba(9, 14, 26, 0.32);
}

.order-box h2 { margin: 0; font-size: 20px; letter-spacing: -0.025em; }
.order-sub { margin: 8px 40px 20px 0; color: var(--neutral-600); font-size: 13px; line-height: 1.6; }
#orderClose { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--neutral-100); color: var(--neutral-600); cursor: pointer; font-size: 20px; }

#orderPreview {
  margin-bottom: 16px;
  padding: 24px;
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  border-radius: var(--radius-lg);
  background-color: var(--neutral-50);
  background-image: radial-gradient(#d8dde6 1px, transparent 1px);
  background-size: 20px 20px;
}

#orderPreview .cardwrap { width: 220px; }
.order-mode { grid-template-columns: repeat(2, 1fr); margin-bottom: 16px; }
.is-hidden { display: none; }
.compact-field { margin-top: 0; }
.download-template { display: inline-flex; align-items: center; color: #3d4656; text-decoration: none; }

.order-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.order-grid .fld { margin: 0; }
.order-grid .full { grid-column: 1 / -1; }
.consent { margin: 16px 0; padding: 12px; display: flex; align-items: flex-start; gap: 10px; border: 1px solid #fedf89; border-radius: var(--radius-sm); background: #fffaeb; color: #5f4710; font-size: 12px; line-height: 1.6; }
.consent input { margin-top: 3px; accent-color: var(--primary-600); }
#orderMsg { margin-top: 12px; color: var(--error); font-size: 13px; line-height: 1.6; }

.pwrap { margin-top: 12px; }
.pbar { height: 8px; overflow: hidden; border-radius: 999px; background: var(--neutral-100); }
.pbar i { width: 0; height: 100%; display: block; border-radius: inherit; background: var(--primary-600); transition: width 0.24s; }
.plbl { margin-top: 8px; color: #3d4656; font-size: 12px; font-weight: 700; }
.pwarn { margin-top: 6px; color: var(--warning); font-size: 11px; }
.btbl { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 12px; }
.btbl th,
.btbl td { padding: 8px; border: 1px solid var(--line); text-align: left; }
.btbl th { background: var(--neutral-50); color: var(--neutral-600); }
.btbl .ok { color: var(--success); font-weight: 700; }
.btbl .bad { color: var(--error); font-weight: 700; }
.bsum { margin: 8px 0; color: var(--neutral-600); font-size: 12px; font-weight: 700; }

.cfgOvl {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(9, 14, 26, 0.58);
  backdrop-filter: blur(4px);
}

.cfgBox {
  width: min(440px, 100%);
  max-height: 76vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: 0 24px 64px rgba(9, 14, 26, 0.28);
}

.cfgBox h3 { margin: 0 0 16px; font-size: 18px; }
.cfgBox .bts { margin-top: 16px; display: flex; justify-content: flex-end; gap: 8px; }
.cfgList { display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.cfgItem { min-height: 52px; padding: 0 12px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.cfgItem:hover { border-color: #9db7f9; background: var(--primary-50); }
.cfgItem .t { min-width: 0; flex: 1; overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.cfgItem .d { color: var(--neutral-600); font-size: 11px; }
.cfgItem .del { border: 0; background: transparent; color: var(--error); cursor: pointer; font-size: 12px; }
.cfgToast { position: fixed; left: 50%; bottom: 24px; z-index: 1200; padding: 10px 18px; transform: translateX(-50%); border-radius: 999px; background: var(--neutral-900); color: var(--white); font-size: 13px; box-shadow: 0 8px 24px rgba(17, 21, 29, 0.24); }

@media (max-width: 1180px) {
  :root { --panel-width: 388px; }
  .studio-header { gap: 12px; }
  .studio-brand span { display: none; }
  .header-link,
  .header-user { display: none; }
  .card-stage { padding: 24px; gap: 24px; }
  .cardwrap { width: clamp(200px, 19vw, 260px); }
  .picker { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 940px) {
  html,
  body { height: auto; min-height: 100%; overflow: auto; }

  body { padding-bottom: 80px; }

  .studio-header { position: sticky; top: 0; height: 60px; padding: 0 16px; gap: 12px; }
  .studio-brand img { height: 21px; }
  .product-switch { height: 36px; padding: 2px; }
  .product-switch a { min-width: 72px; height: 32px; padding: 0 8px; font-size: 12px; }
  .mobile-menu { display: block; }

  .header-actions {
    position: absolute;
    top: 60px;
    right: 0;
    left: 0;
    z-index: 20;
    margin: 0;
    padding: 12px 16px;
    display: none;
    grid-template-columns: repeat(2, 1fr);
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(17, 21, 29, 0.08);
  }

  .studio-header.menu-open .header-actions { display: grid; }
  .header-link { display: inline-flex; }
  .header-user { display: none; }

  .card-workspace { height: auto; display: flex; flex-direction: column; overflow: visible; }
  .canvas-shell { min-height: calc(100svh - 60px); }
  .canvas-toolbar { flex: 0 0 56px; padding: 0 12px; }
  .canvas-title span { display: none; }
  .view-switch button { min-width: 48px; padding: 0 8px; }
  .card-stage { min-height: 480px; padding: 20px 12px; gap: 12px; overflow: hidden; }
  .cardwrap { width: min(40vw, 190px); border-radius: 12px; }
  body.card-front-only .cardwrap,
  body.card-back-only .cardwrap { width: min(68vw, 280px); }
  .face-label { min-height: 28px; font-size: 11px; }
  .canvas-status { padding: 0 16px; }
  .canvas-status > span:last-child { display: none; }

  .editor-panel { min-height: 720px; border-top: 8px solid var(--neutral-100); border-left: 0; box-shadow: none; }
  .panel-heading { padding: 24px 16px 16px; }
  .editor-tabs { position: sticky; top: 60px; z-index: 8; margin: 0; border-radius: 0; border-bottom: 1px solid var(--line); }
  .panel-scroll { padding: 24px 16px 104px; overflow: visible; }
  .picker { grid-template-columns: repeat(5, 1fr); gap: 8px; }

  .wizard-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 90;
    height: 80px;
    padding: 12px 16px;
    grid-template-columns: 88px 1fr;
  }

  .order-box { padding: 24px 16px; }
  .order-grid { grid-template-columns: 1fr; }
  .order-grid .full { grid-column: auto; }
}

@media (max-width: 560px) {
  .studio-header { gap: 8px; }
  .studio-brand { flex: 0 0 auto; }
  .studio-brand img { width: 112px; height: auto; }
  .product-switch { margin-left: 0; }
  .product-switch a { min-width: 64px; font-size: 11px; }
  .card-stage { min-height: 420px; }
  .card-side { gap: 8px; }
  .cardwrap { width: min(39vw, 164px); }
  .picker { grid-template-columns: repeat(4, 1fr); }
  .editor-tabs button { font-size: 12px; }
  .editor-tabs button span { display: none; }
  .row2 { flex-direction: column; gap: 0; }
  #orderPreview .cardwrap { width: 164px; }
}

@media (max-width: 380px) {
  .studio-brand img { width: 96px; }
  .product-switch a { min-width: 56px; padding: 0 6px; }
  .view-switch button { min-width: 42px; font-size: 11px; }
  .card-stage { min-height: 384px; padding-inline: 8px; gap: 8px; }
  .cardwrap { width: 38vw; }
}
