:root {
  --ink: #233747;
  --muted: #617079;
  --line: #dee3e4;
  --paper: #fff;
  --canvas: #eaf0f0;
  --accent: #dcef99;
  --accent-dark: #355437;
  --radius: 12px;
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  color: var(--ink);
  font-size: 16px;
  background: #f8faf9;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button,
select,
input[type='color'],
input[type='checkbox'] {
  cursor: pointer;
}
button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.875rem;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
button:hover {
  background: #f0f4f3;
  border-color: #b7c5c8;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}
button[aria-pressed='true'],
button.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #608dcc;
  outline-offset: 3px;
}
button svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
a {
  color: inherit;
}
.icon {
  width: 38px;
  padding: 8px;
}
.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #223525;
}
.primary:hover {
  background: #cfe68a;
  border-color: #bad772;
}
.dark {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}
.dark:hover {
  background: #38505f;
}
.quiet {
  background: transparent;
  border-color: transparent;
}
.wide {
  width: 100%;
}
.small {
  font-size: 0.8125rem;
}
.muted {
  color: var(--muted);
}
.hidden {
  display: none !important;
}
.row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.between {
  justify-content: space-between;
}
.stack {
  display: grid;
  gap: 12px;
}
.wrap {
  flex-wrap: wrap;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h2 {
  font-size: 1rem;
  font-weight: 650;
}
h3 {
  font-size: 0.875rem;
  font-weight: 650;
}
label,
.label {
  font-size: 0.875rem;
  font-weight: 500;
}
input:not([type='range']):not([type='color']):not([type='checkbox']),
select,
textarea {
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid #d4dcdf;
  border-radius: 7px;
  padding: 8px 9px;
  min-height: 37px;
  font-size: 0.875rem;
}
input[type='range'] {
  width: 100%;
  accent-color: var(--ink);
  min-width: 70px;
}
input[type='checkbox'] {
  accent-color: var(--ink);
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}
input[type='color'] {
  padding: 2px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  width: 40px;
  height: 36px;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
select {
  padding-right: 22px;
}
.field {
  display: grid;
  gap: 6px;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.check {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.875rem;
  line-height: 1.4;
}
hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 17px 0;
}
.pill {
  font-size: 0.75rem;
  background: #edf3eb;
  color: #456440;
  border-radius: 20px;
  padding: 5px 8px;
  white-space: nowrap;
}
.kbd {
  display: inline-block;
  background: #edf1f1;
  border: 1px solid #dce2e2;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.75rem;
}
.topbar {
  min-height: 76px;
  padding: 15px 24px;
  display: flex;
  align-items: center;
  gap: 25px;
  background: white;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brandmark {
  display: grid;
  grid-template-columns: 12px 12px;
  gap: 3px;
  transform: rotate(-8deg);
}
.brandmark i {
  height: 12px;
  background: var(--ink);
  border-radius: 1px;
}
.brandmark i:nth-child(2) {
  background: #c5dc8c;
}
.brandmark i:nth-child(3) {
  background: #d78d71;
}
.brand h1 {
  font-family: Georgia, serif;
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: -1px;
  line-height: 1;
}
.brand small {
  font-family: inherit;
  font-size: 0.625rem;
  letter-spacing: 2px;
  display: block;
  padding-top: 5px;
  margin-left: 2px;
}
.project-title {
  display: grid;
  gap: 3px;
  min-width: 80px;
  max-width: 260px;
  flex: 1;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.project-title input {
  font-weight: 600;
  border: 0 !important;
  background: transparent !important;
  min-height: 26px !important;
  padding: 0 !important;
  font-size: 0.9375rem !important;
}
.project-title span {
  font-size: 0.75rem;
  color: var(--muted);
}
.top-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.divider {
  height: 25px;
  width: 1px;
  background: var(--line);
  margin: 0 5px;
}
.app {
  display: grid;
  grid-template-columns: 276px minmax(320px, 1fr) 256px;
  height: calc(100dvh - 76px);
  min-height: 660px;
}
.sidebar {
  background: white;
  padding: 20px 18px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.left {
  border-right: 1px solid var(--line);
}
.right {
  border-left: 1px solid var(--line);
}
.section-head {
  margin-bottom: 14px;
}
.section-head small {
  font-size: 0.75rem;
  color: var(--muted);
}
.workspace {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--canvas);
  overflow: hidden;
}
.workspace-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 17px 20px;
  border-bottom: 1px solid #d7e1e0;
  background: #f6f8f7;
  flex-wrap: wrap;
}
.tabs {
  display: flex;
  border-radius: 9px;
  background: #e6eceb;
  padding: 4px;
  gap: 3px;
}
.tabs button {
  border: 0;
  background: transparent;
  color: #5a6972;
  padding: 8px 15px;
  min-height: 35px;
}
.tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 2px 5px #23374710;
}
.workspace-caption {
  font-size: 0.8125rem;
  color: #667780;
}
.stage-tools {
  padding: 12px 20px;
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.toolgroup {
  display: flex;
  padding: 3px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 5px #23374709;
  border: 1px solid #dde5e4;
}
.toolgroup button {
  border: 0;
  min-height: 34px;
  height: 34px;
  border-radius: 6px;
  padding: 7px 9px;
}
.toolgroup button:not(.active) {
  background: transparent;
}
.stage {
  flex: 1;
  min-height: 360px;
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(#b9c9c9 0.8px, transparent 0.8px);
  background-size: 18px 18px;
}
.stage.no-dots {
  background-image: none;
}
.stage > svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  touch-action: none;
  user-select: none;
}
.stage .hint {
  position: absolute;
  left: 50%;
  bottom: 15px;
  transform: translateX(-50%);
  font-size: 0.8125rem;
  color: #4d6267;
  background: #ffffffeb;
  border: 1px solid #e0e7e7;
  border-radius: 22px;
  padding: 9px 14px;
  text-align: center;
  max-width: 90%;
  width: max-content;
  pointer-events: none;
  box-shadow: 0 2px 8px #263d4410;
}
.stage-footer {
  padding: 11px 20px;
  background: #f6f8f7;
  border-top: 1px solid #d7e1e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  flex-wrap: wrap;
  font-size: 0.8125rem;
}
.stage-footer .icon {
  height: 30px;
  width: 30px;
  min-height: 30px;
  padding: 5px;
}
.stage-footer input {
  width: 80px;
}
.stage-footer output {
  width: 42px;
  text-align: center;
}
.shortcut {
  font-size: 0.75rem;
  color: var(--muted);
}
.block-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.block-card {
  height: 55px;
  padding: 4px;
  border: 2px solid transparent;
  background: #f3f6f5;
}
.block-card.active {
  background: #edf4de;
  border-color: #769456;
}
.block-card svg {
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.block-name {
  margin: 13px 0 9px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.block-name input {
  font-weight: 600;
  background: #f9fbfa !important;
}
.editor-frame {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f0f4f3;
  position: relative;
}
.editor-frame svg {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  touch-action: none;
  cursor: crosshair;
}
.editor-under {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}
.editor-under button {
  min-height: 30px;
  width: 30px;
  height: 30px;
  padding: 5px;
}
.shape-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 12px 0;
}
.shape-tools button {
  flex: 1;
  padding: 7px;
  min-width: 0;
}
.shape-tools svg {
  width: 25px;
  height: 25px;
}
.paint-colors {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.paint-color {
  flex: 1;
  justify-content: flex-start;
  padding: 7px;
  background: white !important;
  color: var(--ink) !important;
  border: 1px solid var(--line) !important;
  font-size: 0.8125rem;
}
.paint-color.active {
  border: 2px solid #547747 !important;
  padding: 6px;
  background: #f3f8ea !important;
}
.swatch {
  display: block;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: 1px solid #00000015;
}
.palettes {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 7px;
}
.palette-color {
  border-radius: 7px;
  padding: 0;
  height: 31px;
  min-height: 31px;
  border: 2px solid transparent;
}
.palette-color.active {
  outline: 2px solid #496944;
  outline-offset: 2px;
  border-color: white;
}
.palette-color:hover {
  border-color: #fff;
}
.palette-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 0 7px;
  font-size: 0.8125rem;
}
.palette-change {
  display: flex;
  gap: 7px;
  margin-top: 10px;
}
.palette-change input {
  flex: 1;
}
.palette-change select {
  flex: 3;
}
.tip {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
  padding: 11px 12px;
  background: #f2f6ef;
  border-radius: 8px;
  margin-top: 13px;
}
.subtle-note {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 7px;
}
.layout-stat {
  background: #edf3e2;
  border: 1px solid #dbe7c7;
  border-radius: 10px;
  padding: 15px;
  margin-top: 16px;
}
.layout-stat strong {
  display: block;
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 1.75rem;
  letter-spacing: -0.5px;
  margin: 4px 0;
}
.layout-stat small {
  font-size: 0.75rem;
  color: #52703f;
}
.segmented {
  display: flex;
  gap: 5px;
}
.segmented button {
  flex: 1;
  padding: 7px 5px;
}
.color-field {
  display: flex;
  align-items: center;
  gap: 7px;
}
.color-field select {
  width: 100%;
}
.selected-info {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px 0;
}
.board-empty {
  padding: 12px;
  border: 1px dashed #becdce;
  border-radius: 8px;
}
.fabric-key {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}
.fabric-row {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  align-items: center;
  font-size: 0.8125rem;
}
.fabric-row .swatch {
  width: 16px;
  height: 16px;
}
.fabric-row span:last-child {
  font-variant-numeric: tabular-nums;
}
.disclosure {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 14px;
}
.disclosure summary {
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  background: var(--ink);
  color: white;
  border-radius: 10px;
  z-index: 100;
  font-size: 0.875rem;
  box-shadow: 0 5px 25px #12232f30;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  max-width: 90%;
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
dialog {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  max-width: 560px;
  width: calc(100% - 32px);
  color: var(--ink);
  box-shadow: 0 24px 120px #14232e40;
}
dialog::backdrop {
  background: #1d354966;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.dialog-body {
  padding: 22px;
}
.dialog-body p {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 14px;
}
.dialog-body h3 {
  margin: 18px 0 8px;
}
.export-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.export-grid button {
  align-items: flex-start;
  flex-direction: column;
  text-align: left;
  padding: 15px;
  font-size: 0.9375rem;
}
.export-grid button span {
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--muted);
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.template-grid button {
  display: flex;
  flex-direction: column;
  padding: 12px 7px;
  font-size: 0.8125rem;
}
.template-grid svg {
  width: 100%;
  height: auto;
  max-height: 100px;
}
.help-step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 9px;
  margin-bottom: 15px;
  font-size: 0.875rem;
  line-height: 1.6;
}
.help-step b:first-child {
  border-radius: 50%;
  height: 25px;
  width: 25px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.help-step p {
  margin: 0;
  font-size: 0.875rem;
}
.danger {
  color: #a64138;
}
.file-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 8px;
  background: white;
  min-height: 38px;
  font-size: 0.875rem;
}
.selection-box {
  pointer-events: none;
  stroke: #5c8ac5;
  stroke-width: 2;
  stroke-dasharray: 7 4;
  fill: #659ddd0c;
  vector-effect: non-scaling-stroke;
}
.interactive-cell:focus {
  outline: none;
  stroke: #dfee92;
  stroke-width: 3;
}
.mobile-title {
  display: none;
}
@media (min-width: 1550px) {
  .app {
    grid-template-columns: 300px minmax(320px, 1fr) 290px;
  }
  .sidebar {
    padding: 23px;
  }
  .stage-tools {
    padding: 15px 26px;
  }
}
@media (max-width: 1150px) {
  .app {
    grid-template-columns: 260px minmax(300px, 1fr);
    height: auto;
    min-height: calc(100dvh - 76px);
  }
  .workspace {
    min-height: 740px;
    max-height: calc(100dvh - 76px);
  }
  .sidebar.left {
    max-height: 950px;
  }
  .right {
    grid-column: 1/-1;
    border-left: 0;
    border-top: 1px solid var(--line);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    overflow: visible;
  }
  .right > section {
    min-width: 0;
  }
  .right > section + section {
    border-left: 1px solid var(--line);
    padding-left: 24px;
  }
  .right hr {
    display: none;
  }
  .right .disclosure {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
  }
  .workspace-caption {
    display: none;
  }
  .project-title {
    max-width: 210px;
  }
  .topbar {
    padding: 14px 18px;
    gap: 18px;
  }
  .button-label.optional {
    display: none;
  }
}
@media (max-width: 700px) {
  .topbar {
    gap: 10px;
    padding: 12px;
    flex-wrap: wrap;
  }
  .brand h1 {
    font-size: 1.45rem;
  }
  .brand small {
    font-size: 0.6rem;
  }
  .project-title {
    border: 0;
    padding-left: 6px;
    max-width: none;
  }
  .top-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
  .top-actions .divider {
    margin-right: auto;
  }
  .app {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .workspace {
    order: 0;
    min-height: 580px;
    max-height: none;
    height: 68dvh;
  }
  .left {
    order: 1;
    overflow: visible;
    border-right: 0;
    border-top: 1px solid var(--line);
    max-height: none !important;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 16px;
  }
  .left > section {
    min-width: 0;
  }
  .left hr {
    display: none;
  }
  .right {
    order: 2;
    display: block;
    padding: 20px 16px;
  }
  .right > section + section {
    border-left: 0;
    padding-left: 0;
    margin-top: 23px;
    border-top: 1px solid var(--line);
    padding-top: 20px;
  }
  .stage-tools,
  .workspace-header,
  .stage-footer {
    padding-left: 12px;
    padding-right: 12px;
  }
  .stage {
    min-height: 340px;
  }
  .tabs button {
    padding: 8px 12px;
  }
  .stage-footer .shortcut {
    display: none;
  }
  .paint-colors {
    gap: 4px;
  }
  .paint-color {
    font-size: 0.75rem;
    gap: 4px;
  }
  .palettes {
    gap: 5px;
  }
  .shape-tools {
    gap: 3px;
  }
  .shape-tools button {
    padding: 4px;
  }
  .sidebar .section-head h2 {
    font-size: 0.9375rem;
  }
  .block-picker {
    gap: 5px;
  }
  .block-card {
    height: 42px;
  }
  .editor-frame {
    padding: 5px;
  }
  .template-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mobile-title {
    display: block;
  }
  .export-grid {
    grid-template-columns: 1fr;
  }
  .stage .hint {
    font-size: 0.75rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
@media print {
  body > * {
    display: none !important;
  }
  #print-area {
    display: block !important;
    padding: 10mm;
  }
  #print-area svg {
    width: 100%;
    max-height: 225mm;
  }
  #print-area h1 {
    font-family: Georgia, serif;
    margin-bottom: 12px;
  }
  #print-area p {
    margin: 12px 0;
    font-size: 12px;
  }
  #print-area .print-key {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
  }
}
#template-dialog {
  max-width: 800px;
  max-height: 90dvh;
  overflow: hidden;
}
#template-dialog .dialog-body {
  overflow-y: auto;
  max-height: calc(90dvh - 78px);
  overscroll-behavior: contain;
}
.template-library {
  display: grid;
  gap: 22px;
}
.template-category h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}
#template-dialog .template-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
#template-dialog .template-grid button {
  font-size: 0.875rem;
  gap: 9px;
  padding: 12px 8px;
  justify-content: flex-start;
}
#template-dialog .template-grid svg {
  max-height: 120px;
  aspect-ratio: 1;
}
.template-caption {
  display: grid;
  gap: 3px;
  text-align: center;
}
.template-caption small {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--muted);
}
@media (max-width: 600px) {
  #template-dialog .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.feature-buttons {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}
.feature-buttons button {
  justify-content: flex-start;
}
.feature-dialog {
  max-width: 1050px;
  max-height: 92dvh;
  overflow: hidden;
}
.feature-dialog .dialog-body {
  max-height: calc(92dvh - 78px);
  overflow: auto;
  overscroll-behavior: contain;
}
.fabric-editor {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
}
.fabric-photo {
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-shadow: 0 1px 3px #000;
}
.fabric-options {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}
.fabric-options button {
  height: 45px;
  background-size: cover;
  background-position: center;
  border: 3px solid white;
  outline: 1px solid var(--line);
}
.fabric-options button.active {
  outline: 3px solid #789343;
}
.variation-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.lock-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.lock-list label {
  border: 1px solid var(--line);
  padding: 6px 8px;
  border-radius: 6px;
  background: #f7f9f5;
}
.variation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.variation-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}
.variation-card svg {
  width: 100%;
  aspect-ratio: 1;
  max-height: 240px;
  background: #eef1ef;
}
.variation-card button {
  width: 100%;
}
.plan-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.plan-section {
  margin: 20px 0;
}
.plan-summary {
  padding: 13px 16px;
  border-radius: 9px;
  background: #eef5df;
  line-height: 1.6;
}
.plan-table-wrap {
  overflow-x: auto;
  margin: 12px 0;
}
.plan-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.875rem;
  line-height: 1.45;
}
.plan-table th,
.plan-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
.plan-table th {
  background: #f0f4ef;
  white-space: nowrap;
}
.plan-table td small {
  display: block;
  color: var(--muted);
}
.piece-thumb {
  width: 58px;
  height: 58px;
  display: block;
}
.plan-note {
  border-left: 3px solid #a2b86c;
  padding: 9px 12px;
  background: #f6f8ef;
  font-size: 0.875rem;
  line-height: 1.55;
}
.plan-warning {
  background: #fff3dc;
  color: #694c17;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  line-height: 1.5;
}
.plan-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0;
}
.plan-footnote {
  font-size: 0.8125rem !important;
  color: var(--muted);
}
@media (max-width: 700px) {
  .fabric-editor {
    grid-template-columns: 1fr;
  }
  .fabric-photo {
    max-width: 180px;
  }
  .variation-controls {
    grid-template-columns: 1fr;
  }
  .variation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .plan-controls {
    grid-template-columns: 1fr 1fr;
  }
  .plan-table {
    font-size: 0.8125rem;
  }
  .feature-dialog .dialog-body {
    padding: 16px;
  }
}
@media print {
  #print-area .plan-table {
    font-size: 9px;
  }
  #print-area .plan-table td,
  #print-area .plan-table th {
    padding: 4px;
  }
  #print-area .plan-table tr {
    break-inside: avoid;
  }
  #print-area .plan-table th {
    background: #eee;
  }
  #print-area .plan-table-wrap {
    overflow: visible;
  }
  #print-area button {
    display: none;
  }
  #print-area .piece-thumb {
    width: 35px;
    height: 35px;
  }
  #print-area .plan-note,
  #print-area .plan-summary,
  #print-area .plan-warning {
    font-size: 10px;
  }
}

/* Always-visible access to the newer studio features. */
.feature-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 24px;
  background: #f0f5ec;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.feature-nav button {
  font-size: 0.8125rem;
  min-height: 34px;
  padding: 7px 12px;
}
.release-tag {
  font-size: 0.75rem;
  color: var(--accent-dark);
  margin-right: 8px;
  font-weight: 650;
}
@media (min-width: 1151px) {
  .app {
    height: calc(100dvh - 132px);
  }
}
@media (max-width: 700px) {
  .feature-nav {
    padding: 10px 12px;
    gap: 6px;
  }
  .feature-nav button {
    flex: 1 1 44%;
  }
  .release-tag {
    width: 100%;
  }
}
@media print {
  .feature-nav {
    display: none !important;
  }
}

.patch-shape-label {
  font-size: 0.75rem;
  color: var(--muted);
  margin: -5px 0 12px;
  min-height: 1em;
}
.swap-paint {
  margin-bottom: 12px;
  font-size: 0.8125rem;
}
