:root {
  --bg: #f4f2ed;
  --bg-deep: #ded8cf;
  --panel: #fffdfa;
  --ink: #111111;
  --muted: #615a4f;
  --line: rgba(17, 17, 17, 0.12);
  --line-strong: rgba(17, 17, 17, 0.22);
  --shadow: 0 18px 45px rgba(17, 17, 17, 0.08);
  --accent: #1a1a1a;
  --accent-contrast: #ffffff;
  --warning: #8b4b00;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.75), transparent 34%),
    linear-gradient(180deg, var(--bg), var(--bg-deep));
  color: var(--ink);
  font-family: "Noto Sans CJK JP", "Noto Sans JP", "IPAexGothic", "M PLUS 1p", system-ui, sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(17, 17, 17, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 17, 17, 0.02) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.35;
}

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

.app-shell {
  position: relative;
  z-index: 1;
  max-width: 1680px;
  margin: 0 auto;
  padding: 28px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 24px;
}

.hero h1,
.print-toolbar h1,
.dialog-head h2,
.section-head h2 {
  margin: 0;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.03;
  max-width: 12ch;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  color: var(--muted);
}

.hero-copy {
  max-width: 64ch;
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.hero-panel,
.panel,
.print-toolbar,
.dialog-shell {
  background: rgba(255, 253, 250, 0.88);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-panel {
  border-radius: 22px;
  padding: 16px;
  display: grid;
  gap: 12px;
}

.hero-stat {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff, #f7f4ef);
}

.hero-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.hero-stat strong {
  font-size: 1.5rem;
  letter-spacing: 0.03em;
}

.layout {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
  gap: 20px;
  align-items: start;
}

.panel {
  border-radius: 24px;
  padding: 20px;
}

.controls {
  position: sticky;
  top: 20px;
  z-index: 6;
  pointer-events: auto;
}

.preview {
  position: relative;
  z-index: 1;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}

.guide-strip {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.guide-step {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.guide-step strong {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-contrast);
  flex: 0 0 auto;
}

.workflow-note {
  position: relative;
  z-index: 2;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 243, 236, 0.96));
  padding: 14px 16px;
  margin-bottom: 16px;
  color: var(--muted);
}

.workflow-note strong {
  display: block;
  color: var(--ink);
  margin-bottom: 6px;
}

.workflow-note p {
  margin: 0;
  line-height: 1.7;
}

.spec-chips {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 14px;
}

.spec-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.74);
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.button,
select,
input[type="text"],
input[type="number"],
textarea {
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
}

.button {
  padding: 11px 15px;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.button-file {
  display: inline-flex;
  align-items: center;
}

.settings-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.settings-grid label {
  display: grid;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.settings-grid select,
.settings-grid input[type="color"] {
  height: 46px;
  width: 100%;
}

.readonly-pill {
  min-height: 46px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-radius: 14px;
  border: 1px dashed var(--line-strong);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
}

.table-wrap {
  position: relative;
  z-index: 2;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.mobile-editor {
  position: relative;
  z-index: 2;
  display: none;
  gap: 14px;
  margin-top: 16px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  vertical-align: top;
}

.data-table th {
  position: sticky;
  top: 0;
  background: #f7f3ec;
  text-align: left;
  color: var(--muted);
  font-size: 0.85rem;
  z-index: 1;
}

.data-table textarea,
.data-table input,
.data-table select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
}

.data-table textarea {
  min-height: 72px;
  resize: vertical;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-button {
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.88rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 14px;
}

.mobile-row {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 14px;
}

.mobile-row-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.mobile-row-head strong {
  display: block;
  font-size: 1.02rem;
}

.mobile-row-grid {
  display: grid;
  gap: 12px;
}

.mobile-row-grid label,
.mobile-two-col label {
  display: grid;
  gap: 6px;
}

.mobile-row-grid span,
.mobile-two-col span {
  font-size: 0.84rem;
  color: var(--muted);
}

.mobile-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card-shell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #fffefb, #f6f1e8);
  overflow: hidden;
}

.card-shell.is-active {
  border-color: rgba(26, 26, 26, 0.42);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, 0.08);
}

.card-shell button {
  all: unset;
  cursor: pointer;
  display: block;
}

.card-shell:hover {
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.1);
}

.card-shell .card-meta-bar {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.82rem;
}

.card-shell.is-active .card-meta-bar {
  background: rgba(26, 26, 26, 0.05);
}

.card-shell .card-preview {
  transform-origin: top left;
  width: 100%;
}

.warning {
  margin: 0 0 10px;
  color: var(--warning);
  font-size: 0.88rem;
}

.sheet-viewport {
  position: relative;
  z-index: 0;
  overflow: auto;
  padding: 8px 0 4px;
  pointer-events: none;
}

.sheet-preview {
  width: 210mm;
  margin: 0 auto 18px;
  transform: scale(0.52);
  transform-origin: top center;
  margin-bottom: -148mm;
  pointer-events: none;
}

.sheet {
  width: 210mm;
  height: 297mm;
  background: #fff;
  border: 1px solid rgba(17, 17, 17, 0.18);
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.12);
  overflow: hidden;
}

.sheet-grid {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: repeat(var(--sheet-cols, 2), var(--sheet-card-width, 90mm));
  grid-template-rows: repeat(var(--sheet-rows, 2), var(--sheet-card-height, 130mm));
  gap: var(--sheet-gap, 5mm);
  padding: var(--sheet-margin, 10mm);
  justify-content: start;
  align-content: start;
}

.sheet-slot {
  position: relative;
  width: var(--sheet-card-width, 90mm);
  height: var(--sheet-card-height, 130mm);
}

.sheet-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0.25mm dashed rgba(17, 17, 17, 0.18);
  pointer-events: none;
}

.sheet-cutmarks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.cut-mark {
  position: absolute;
  width: 4mm;
  height: 4mm;
}

.cut-mark::before,
.cut-mark::after {
  content: "";
  position: absolute;
  background: rgba(17, 17, 17, 0.28);
}

.cut-mark::before {
  width: 4mm;
  height: 0.28mm;
}

.cut-mark::after {
  width: 0.28mm;
  height: 4mm;
}

.cut-mark-tl,
.cut-mark-tr,
.cut-mark-bl,
.cut-mark-br {
  position: absolute;
}

.cut-mark-tl {
  left: -1mm;
  top: -1mm;
}

.cut-mark-tr {
  right: -1mm;
  top: -1mm;
}

.cut-mark-bl {
  left: -1mm;
  bottom: -1mm;
}

.cut-mark-br {
  right: -1mm;
  bottom: -1mm;
}

.cut-mark-tl::before {
  left: 0;
  top: 0;
}

.cut-mark-tl::after {
  left: 0;
  top: 0;
}

.cut-mark-tr::before {
  right: 0;
  top: 0;
}

.cut-mark-tr::after {
  right: 0;
  top: 0;
}

.cut-mark-bl::before {
  left: 0;
  bottom: 0;
}

.cut-mark-bl::after {
  left: 0;
  bottom: 0;
}

.cut-mark-br::before {
  right: 0;
  bottom: 0;
}

.cut-mark-br::after {
  right: 0;
  bottom: 0;
}

.sheet-empty {
  width: 100%;
  height: 100%;
  border: 1px dashed rgba(17, 17, 17, 0.22);
  border-radius: 0;
  background: transparent;
}

.pop-card {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(17, 17, 17, 0.22);
  background: linear-gradient(180deg, #f6f5f1, #ece7dd);
  color: #111;
  padding: 8mm 7mm 7mm;
  display: flex;
  flex-direction: column;
  gap: 5mm;
  overflow: hidden;
}

.pop-card.design-sticker {
  display: block;
  padding: 0;
  border: 2px solid #332525;
  border-radius: 24px;
  background: linear-gradient(180deg, #f3f1eb, #e3ded2);
}

.pop-card.design-sticker .sticker-shell {
  height: 100%;
  padding: 5.5mm;
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 3mm;
}

.pop-card.design-sticker .sticker-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.pop-card.design-sticker .sticker-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.18);
  background: rgba(255, 255, 255, 0.82);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  line-height: 1;
}

.pop-card.design-sticker .sticker-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 23mm;
  height: 23mm;
  padding: 0;
  border-radius: 10px;
  background: transparent;
  border: none;
  overflow: visible;
  box-shadow: none;
}

.pop-card.design-sticker .sticker-badge-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pop-card.design-sticker .sticker-main,
.pop-card.design-sticker .sticker-hero {
  position: relative;
  display: block;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 18px;
  padding: 4mm 4.5mm 3.5mm;
  min-height: 0;
  overflow: hidden;
}

.pop-card.design-sticker .sticker-main,
.pop-card.design-sticker .sticker-hero-main {
  display: flex;
  flex-direction: column;
  gap: 1.6mm;
  min-width: 0;
}

.pop-card.design-sticker .pop-description {
  font-size: 0.8rem;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.pop-card.design-sticker .pop-warning {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.15;
}

.pop-card.design-sticker .sticker-price-wrap {
  display: flex;
  align-items: end;
  min-height: 0;
  margin-top: 0.5mm;
}

.pop-card.design-sticker .pop-price {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1;
}

.pop-card.design-sticker .sticker-footer {
  display: grid;
  gap: 2px;
  padding-top: 0.8mm;
  border-top: 1px solid rgba(17, 17, 17, 0.14);
  color: #202020;
}

.pop-card.design-sticker .pop-meta,
.pop-card.design-sticker .pop-sku {
  font-size: 0.68rem;
  line-height: 1.2;
}

.pop-card.design-sticker .pop-sku {
  letter-spacing: 0.02em;
}

.pop-card.pattern-a .pop-price {
  font-size: 26pt;
}

.pop-card.pattern-b .pop-price {
  font-size: 21pt;
}

.pop-card.pattern-c .pop-price {
  font-size: 20pt;
}

.pop-description {
  font-size: 9.5pt;
  line-height: 1.22;
  letter-spacing: 0.01em;
}

.pop-description .desc-line {
  display: block;
}

.pop-warning {
  color: var(--warning);
  font-size: 7.2pt;
  margin-top: 1mm;
}

.pop-meta,
.pop-sku {
  font-size: 8.1pt;
  color: #202020;
  line-height: 1.25;
}

.pop-price {
  margin: auto 0;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.pop-price .yen {
  font-size: 0.56em;
  vertical-align: top;
}

.pop-pattern-label {
  display: inline-flex;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  background: rgba(255, 255, 255, 0.62);
  font-size: 7.5pt;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pop-card.pattern-b .pop-description {
  font-size: 10.15pt;
  line-height: 1.28;
}

.pop-card.pattern-c {
  gap: 3.2mm;
  padding: 6.2mm 6mm 6mm;
}

.pop-card.pattern-c .pop-description {
  font-size: 8.65pt;
  line-height: 1.16;
}

.pop-card.pattern-c .pop-meta {
  display: grid;
  gap: 2px;
}

.pop-card.pattern-b {
  gap: 4mm;
  padding: 7.2mm 6.5mm 6.5mm;
}

.pop-card.pattern-b .pop-pattern-label {
  font-size: 7.3pt;
}

.pop-card.pattern-b .pop-meta,
.pop-card.pattern-b .pop-sku {
  font-size: 8.3pt;
}

.pop-card.pattern-c .pop-pattern-label {
  font-size: 7.1pt;
  padding: 4px 8px;
}

.pop-card.pattern-c .pop-price {
  font-size: 19.5pt;
  margin-top: 0.4mm;
  margin-bottom: 1.4mm;
}

.pop-card.pattern-c .pop-meta,
.pop-card.pattern-c .pop-sku {
  font-size: 7.7pt;
}

.pop-card.pattern-c .pop-warning {
  margin-top: 0.5mm;
}

.pop-card.design-sticker.pattern-a .pop-price,
.pop-card.design-sticker.pattern-b .pop-price,
.pop-card.design-sticker.pattern-c .pop-price {
  font-size: 1.45rem;
}

.pop-card.design-sticker.pattern-a .pop-description,
.pop-card.design-sticker.pattern-b .pop-description,
.pop-card.design-sticker.pattern-c .pop-description {
  font-size: 0.88rem;
  line-height: 1.22;
}

.pop-card.design-sticker.pattern-a .pop-meta,
.pop-card.design-sticker.pattern-a .pop-sku,
.pop-card.design-sticker.pattern-b .pop-meta,
.pop-card.design-sticker.pattern-b .pop-sku,
.pop-card.design-sticker.pattern-c .pop-meta,
.pop-card.design-sticker.pattern-c .pop-sku {
  font-size: 0.74rem;
}

.preview-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 480px);
}

.preview-dialog::backdrop {
  background: rgba(17, 17, 17, 0.45);
  backdrop-filter: blur(2px);
}

.dialog-shell {
  border-radius: 24px;
  padding: 18px;
}

.dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.dialog-body {
  display: grid;
  place-items: center;
}

.notice {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(139, 75, 0, 0.08);
  border: 1px solid rgba(139, 75, 0, 0.2);
  color: var(--warning);
  margin-bottom: 14px;
}

.hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.92rem;
}

.section-spacer {
  height: 18px;
}

.print-body {
  background: #fff;
  color: #111;
}

.print-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-width: 0 0 1px;
}

.print-root {
  padding: 16px 0 32px;
}

.print-sheet {
  width: 210mm;
  height: 297mm;
  margin: 0 auto 8mm;
  background: #fff;
}

.print-sheet .sheet-grid {
  box-shadow: none;
}

.print-sheet .pop-card {
  box-shadow: none;
}

.print-sheet .sheet-slot {
  position: relative;
}

.print-sheet .sheet-slot::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 0.25mm dashed rgba(17, 17, 17, 0.18);
  pointer-events: none;
}

.print-sheet .sheet-cutmarks {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.print-sheet .cut-mark::before,
.print-sheet .cut-mark::after {
  background: rgba(17, 17, 17, 0.24);
}

.print-sheet .sheet-empty {
  border: 0.35mm dashed rgba(17, 17, 17, 0.18);
}

.sheet-layout-6 .pop-card,
.print-sheet.sheet-layout-6 .pop-card {
  gap: 2.8mm;
  padding: 6mm 5.8mm 4.8mm;
}

.sheet-layout-6 .pop-card.pattern-a .pop-price,
.print-sheet.sheet-layout-6 .pop-card.pattern-a .pop-price {
  font-size: 24pt;
}

.sheet-layout-6 .pop-card.pattern-b .pop-price,
.print-sheet.sheet-layout-6 .pop-card.pattern-b .pop-price {
  font-size: 19pt;
}

.sheet-layout-6 .pop-card.pattern-c .pop-price,
.print-sheet.sheet-layout-6 .pop-card.pattern-c .pop-price {
  font-size: 18pt;
}

.sheet-layout-6 .pop-description,
.print-sheet.sheet-layout-6 .pop-description {
  font-size: 9.1pt;
  line-height: 1.16;
}

.sheet-layout-6 .pop-card.pattern-b .pop-description,
.print-sheet.sheet-layout-6 .pop-card.pattern-b .pop-description {
  font-size: 9.6pt;
  line-height: 1.2;
}

.sheet-layout-6 .pop-card.pattern-c,
.print-sheet.sheet-layout-6 .pop-card.pattern-c {
  gap: 2.4mm;
  padding: 5.2mm 5.2mm 4.4mm;
}

.sheet-layout-6 .pop-card.pattern-c .pop-description,
.print-sheet.sheet-layout-6 .pop-card.pattern-c .pop-description {
  font-size: 8.15pt;
  line-height: 1.12;
}

.sheet-layout-6 .pop-card.pattern-c .pop-pattern-label,
.print-sheet.sheet-layout-6 .pop-card.pattern-c .pop-pattern-label {
  font-size: 6.8pt;
  padding: 4px 7px;
}

.sheet-layout-6 .pop-meta,
.sheet-layout-6 .pop-sku,
.print-sheet.sheet-layout-6 .pop-meta,
.print-sheet.sheet-layout-6 .pop-sku {
  font-size: 7.2pt;
}

.sheet-layout-6 .pop-warning,
.print-sheet.sheet-layout-6 .pop-warning {
  font-size: 6.6pt;
}

.sheet-layout-8 .pop-card,
.print-sheet.sheet-layout-8 .pop-card {
  gap: 1.8mm;
  padding: 3.7mm 4.1mm 3.2mm;
}

.sheet-layout-8 .pop-card.pattern-a .pop-price,
.print-sheet.sheet-layout-8 .pop-card.pattern-a .pop-price {
  font-size: 17.2pt;
}

.sheet-layout-8 .pop-card.pattern-b .pop-price,
.print-sheet.sheet-layout-8 .pop-card.pattern-b .pop-price {
  font-size: 14.8pt;
}

.sheet-layout-8 .pop-card.pattern-c .pop-price,
.print-sheet.sheet-layout-8 .pop-card.pattern-c .pop-price {
  font-size: 13.6pt;
}

.sheet-layout-8 .pop-description,
.print-sheet.sheet-layout-8 .pop-description {
  font-size: 7pt;
  line-height: 1.08;
}

.sheet-layout-8 .pop-card.pattern-b .pop-description,
.print-sheet.sheet-layout-8 .pop-card.pattern-b .pop-description {
  font-size: 7.45pt;
  line-height: 1.11;
}

.sheet-layout-8 .pop-card.pattern-c,
.print-sheet.sheet-layout-8 .pop-card.pattern-c {
  gap: 1.4mm;
  padding: 3.4mm 4mm 3mm;
}

.sheet-layout-8 .pop-card.pattern-c .pop-description,
.print-sheet.sheet-layout-8 .pop-card.pattern-c .pop-description {
  font-size: 6.3pt;
  line-height: 1.05;
}

.sheet-layout-8 .pop-card.pattern-c .pop-pattern-label,
.print-sheet.sheet-layout-8 .pop-card.pattern-c .pop-pattern-label {
  font-size: 5.9pt;
  padding: 3px 6px;
}

.sheet-layout-8 .pop-meta,
.sheet-layout-8 .pop-sku,
.print-sheet.sheet-layout-8 .pop-meta,
.print-sheet.sheet-layout-8 .pop-sku {
  font-size: 6.1pt;
}

.sheet-layout-8 .pop-warning,
.print-sheet.sheet-layout-8 .pop-warning {
  font-size: 5.9pt;
}

.sheet-layout-6 .pop-card.design-sticker .sticker-shell,
.print-sheet.sheet-layout-6 .pop-card.design-sticker .sticker-shell {
  gap: 2.2mm;
  padding: 4.2mm;
}

.sheet-layout-6 .pop-card.design-sticker .sticker-badge,
.print-sheet.sheet-layout-6 .pop-card.design-sticker .sticker-badge {
  width: 16mm;
  height: 16mm;
}

.sheet-layout-6 .pop-card.design-sticker .pop-description,
.print-sheet.sheet-layout-6 .pop-card.design-sticker .pop-description {
  font-size: 6.7pt;
  line-height: 1.08;
}

.sheet-layout-6 .pop-card.design-sticker .pop-price,
.print-sheet.sheet-layout-6 .pop-card.design-sticker .pop-price {
  font-size: 12.5pt;
}

.sheet-layout-6 .pop-card.design-sticker .pop-meta,
.sheet-layout-6 .pop-card.design-sticker .pop-sku,
.print-sheet.sheet-layout-6 .pop-card.design-sticker .pop-meta,
.print-sheet.sheet-layout-6 .pop-card.design-sticker .pop-sku {
  font-size: 5.9pt;
}

.sheet-layout-8 .pop-card.design-sticker .sticker-shell,
.print-sheet.sheet-layout-8 .pop-card.design-sticker .sticker-shell {
  gap: 1.8mm;
  padding: 3.2mm;
}

.sheet-layout-8 .pop-card.design-sticker .sticker-badge,
.print-sheet.sheet-layout-8 .pop-card.design-sticker .sticker-badge {
  width: 13mm;
  height: 13mm;
}

.sheet-layout-8 .pop-card.design-sticker .pop-description,
.print-sheet.sheet-layout-8 .pop-card.design-sticker .pop-description {
  font-size: 6pt;
  line-height: 1.02;
}

.sheet-layout-8 .pop-card.design-sticker .pop-price,
.print-sheet.sheet-layout-8 .pop-card.design-sticker .pop-price {
  font-size: 10.5pt;
}

.sheet-layout-8 .pop-card.design-sticker .pop-meta,
.sheet-layout-8 .pop-card.design-sticker .pop-sku,
.print-sheet.sheet-layout-8 .pop-card.design-sticker .pop-meta,
.print-sheet.sheet-layout-8 .pop-card.design-sticker .pop-sku {
  font-size: 5.5pt;
}

.no-print {
  display: flex;
}

.mobile-actions {
  display: none;
}

@media (max-width: 1240px) {
  .hero,
  .layout {
    grid-template-columns: 1fr;
  }

  .controls {
    position: static;
  }
}

@media (max-width: 900px) {
  .app-shell {
    padding: 16px;
    padding-bottom: 92px;
  }

  .guide-strip {
    grid-template-columns: 1fr;
  }

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

  .section-head,
  .print-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar {
    justify-content: flex-start;
  }

  .table-wrap {
    display: none;
  }

  .mobile-editor {
    display: grid;
  }

  .mobile-actions {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    gap: 10px;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
    background: rgba(244, 242, 237, 0.88);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }

  .mobile-actions .button {
    flex: 1;
    min-height: 48px;
  }

  .mobile-row-head {
    flex-direction: column;
    align-items: stretch;
  }

  .mobile-two-col {
    grid-template-columns: 1fr;
  }

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

  .sheet-preview {
    transform: scale(0.38);
    margin-bottom: -184mm;
  }

  .sheet-viewport {
    overflow-x: auto;
  }

  .sheet-layout-6 .pop-card.design-sticker .sticker-shell,
  .print-sheet.sheet-layout-6 .pop-card.design-sticker .sticker-shell {
    gap: 1.8mm;
    padding: 3.5mm;
  }

  .sheet-layout-6 .pop-card.design-sticker .sticker-badge,
  .print-sheet.sheet-layout-6 .pop-card.design-sticker .sticker-badge {
    width: 13mm;
    height: 13mm;
  }

  .sheet-layout-6 .pop-card.design-sticker .pop-description,
  .print-sheet.sheet-layout-6 .pop-card.design-sticker .pop-description {
    font-size: 5.8pt;
    line-height: 1.02;
  }

  .sheet-layout-6 .pop-card.design-sticker .pop-price,
  .print-sheet.sheet-layout-6 .pop-card.design-sticker .pop-price {
    font-size: 10.8pt;
  }

  .sheet-layout-6 .pop-card.design-sticker .pop-meta,
  .sheet-layout-6 .pop-card.design-sticker .pop-sku,
  .print-sheet.sheet-layout-6 .pop-card.design-sticker .pop-meta,
  .print-sheet.sheet-layout-6 .pop-card.design-sticker .pop-sku {
    font-size: 5.3pt;
  }
}

@media print {
  body {
    background: #fff !important;
  }

  body::before,
  .no-print {
    display: none !important;
  }

  .print-root {
    padding: 0;
  }

  .print-sheet {
    margin: 0;
    page-break-after: always;
    break-after: page;
  }

  .print-sheet:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .spec-chips {
    gap: 6px;
  }

  .workflow-note {
    padding: 12px 14px;
  }
}
