:root {
  --paper: #f4f1e9;
  --paper-deep: #e8e3d7;
  --ink: #263e34;
  --muted: #7b8175;
  --line: #dcded2;
  --accent: #a34b38;
  --green: #35594c;
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --sans:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft Yahei",
    sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--paper);
  color: var(--ink);
  font: 14px/1.6 var(--sans);
}
body {
  margin: 0;
}
button,
input {
  font: inherit;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
button,
summary,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button:focus-visible,
input:focus-visible,
summary:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}
button:not(:disabled):active {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2 {
  font-weight: 500;
  font-family: var(--serif);
}
h3 {
  font-size: 14px;
  font-weight: 500;
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.site-header {
  height: 104px;
  max-width: 1600px;
  margin: auto;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e2e1d7;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  padding: 0;
}
.brand-seal {
  background: var(--accent);
  color: #f7eddb;
  line-height: 1.05;
  font: 19px/1.02 var(--serif);
  padding: 5px 7px;
  border-radius: 2px;
  box-shadow: inset 0 0 0 2px #ffffff26;
}
.brand b {
  font: 22px var(--serif);
  letter-spacing: 0.12em;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-top: 5px;
}
.quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 8px;
  font-size: 14px;
}
.site-header .quiet {
  color: #586958;
}
.primary,
.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 49px;
  padding: 12px 20px;
  border-radius: 3px;
  transition:
    background 0.18s,
    box-shadow 0.18s;
}
.primary {
  background: var(--green);
  color: #faf5e8;
}
.primary:not(:disabled):hover {
  background: #294b3e;
  box-shadow: 0 4px 16px #243d2d16;
}
.secondary {
  background: #f9f7f0;
  border: 1px solid #d5d9ce;
}
.secondary:hover {
  background: #fffdf7;
}
.text-button {
  padding: 10px 0;
  min-height: 44px;
  line-height: 1.6;
  text-align: left;
  font-size: 14px;
}
.text-button:hover {
  color: var(--accent);
}
.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f8f6efbd;
}
.eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.cover {
  max-width: 1440px;
  min-height: calc(100svh - 104px);
  margin: auto;
  padding: 24px 6.5% 0;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  grid-template-rows: 1fr auto;
  align-items: center;
  position: relative;
}
.hero-copy {
  padding-bottom: 22px;
  z-index: 1;
}
.hero-copy .eyebrow {
  letter-spacing: 0.3em;
  font-size: 12px;
  margin-bottom: 26px;
}
.hero-copy h1 {
  font-size: clamp(36px, 4.3vw, 66px);
  line-height: 1.45;
  letter-spacing: 0.1em;
}
.hero-copy h1 span {
  color: var(--accent);
  margin-left: -0.15em;
}
.hero-intro {
  font-size: 15px;
  color: #7a8074;
  line-height: 2.1;
  margin: 24px 0 28px;
  letter-spacing: 0.07em;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.hero-actions .primary {
  min-width: 192px;
  height: 54px;
  justify-content: space-between;
}
.craft-note {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 46px;
  font-size: 12px;
  color: #777f70;
}
.craft-note i {
  width: 18px;
  height: 1px;
  background: #b9bfac;
}
.craft-note small {
  margin-left: 7px;
  color: #94998b;
}
.hero-art {
  position: relative;
  height: min(720px, 75svh);
  min-height: 500px;
}
.hero-art canvas {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
  transform: rotate(-9deg);
  filter: drop-shadow(8px 16px 15px #776d4d12);
}
.hero-halo {
  position: absolute;
  inset: 12% -4% 3% -8%;
  background: radial-gradient(ellipse, #dcdcca66, transparent 66%);
}
.hero-caption {
  position: absolute;
  right: 2%;
  bottom: 13%;
  z-index: 2;
  display: flex;
  gap: 13px;
  align-items: center;
  writing-mode: vertical-rl;
}
.hero-caption > span {
  font: 25px var(--serif);
  letter-spacing: 0.22em;
}
.hero-caption small {
  font-size: 11px;
  color: #889080;
  letter-spacing: 0.16em;
}
.vertical-note {
  position: absolute;
  right: 0;
  top: 9%;
  writing-mode: vertical-rl;
  font: 13px var(--serif);
  letter-spacing: 0.28em;
  color: #92957f;
}
.cover-bottom {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: #94998b;
  padding: 20px 0 24px;
  border-top: 1px solid #e1e0d3;
}
#progress {
  display: flex;
  gap: 22px;
}
#progress button {
  font-size: 13px;
  color: #8b9182;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 0;
}
#progress button span {
  font:
    italic 14px Georgia,
    serif;
  color: #a4ad98;
}
#progress button[aria-current="step"] {
  color: var(--ink);
}
#progress button[aria-current="step"]:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
}
#progress button[aria-current="step"] span {
  color: var(--accent);
}
.workspace {
  max-width: 1510px;
  margin: auto;
  padding: 30px 4% 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 316px;
  gap: 40px;
  min-height: calc(100svh - 104px);
}
.studio {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.stage-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  padding: 0 4px 18px;
  gap: 15px;
}
.stage-heading h1 {
  font-size: 26px;
  letter-spacing: 0.06em;
  margin-top: 5px;
}
.stage-heading > span {
  font-size: 12px;
  color: #929987;
  padding-bottom: 4px;
}
.art-stage {
  position: relative;
  flex: 1;
  min-height: 450px;
  max-height: 900px;
  overflow: hidden;
  background: radial-gradient(ellipse at 48% 37%, #f5f2e8, #e9e5d9);
  border: 1px solid #e3dfd0;
  border-radius: 5px;
}
.art-stage:after {
  content: "";
  pointer-events: none;
  position: absolute;
  inset: 0;
  opacity: 0.13;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.6' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath filter='url(%23n)' opacity='.24' d='M0 0h160v160H0z'/%3E%3C/svg%3E");
}
.art-stage > canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.art-stage[data-view="work"] > canvas {
  cursor: crosshair;
}
.art-stage[data-view="dip"] > canvas {
  cursor: grab;
}
.art-stage[data-view="ins"] > canvas {
  cursor: crosshair;
}
#expand {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 3;
  box-shadow: 0 1px 4px #454f3210;
}
.stage-badge {
  position: absolute;
  top: 20px;
  left: 24px;
  pointer-events: none;
  writing-mode: vertical-rl;
  font: 12px var(--serif);
  letter-spacing: 0.25em;
  color: #8e927e;
}
.canvas-cursor {
  position: absolute;
  pointer-events: none;
  border: 1px solid #304a3a66;
  border-radius: 50%;
  z-index: 4;
  background: #ffffff20;
  transform: translate(-50%, -50%);
}
.live-preview {
  position: absolute;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  flex-direction: column;
  background: #f9f6eeea;
  width: 110px;
  border: 1px solid #dddccf;
  border-radius: 3px;
  padding: 10px 8px 8px;
  pointer-events: none;
  box-shadow: 0 4px 12px #504b2d09;
}
.live-preview canvas {
  width: 82px;
  height: 100px;
}
.live-preview span {
  font: 11px var(--serif);
  color: #8b917e;
  letter-spacing: 0.08em;
}
.stage-footer {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 3px 0;
}
.stage-footer p {
  font-size: 12px;
  color: #838b7b;
  flex: 1;
}
.stage-footer .text-button {
  white-space: nowrap;
}
.saved-state {
  font-size: 10px;
  color: #969c8d;
  white-space: nowrap;
}
.control-panel {
  padding-top: 9px;
  align-self: start;
  position: sticky;
  top: 20px;
}
.panel-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.panel-title {
  padding-bottom: 8px;
}
.panel-title h2 {
  font-size: 23px;
  letter-spacing: 0.025em;
  margin-top: 8px;
}
.fan-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.fan-options button {
  background: #edece2;
  border: 1px solid transparent;
  text-align: left;
  padding: 15px 17px;
  border-radius: 3px;
}
.fan-options b {
  font: 19px var(--serif);
  display: block;
  margin-bottom: 4px;
}
.fan-options small {
  font-size: 11px;
  color: #919781;
}
.fan-options button[aria-pressed="true"] {
  background: #e7ece1;
  border-color: #84947a;
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.section-label > span {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #8e9583;
}
.recipe-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: -7px;
}
.recipe-card {
  padding: 0;
  background: #ede9dc;
  border: 1px solid transparent;
  border-radius: 3px;
  text-align: left;
  overflow: hidden;
  position: relative;
}
.recipe-card img {
  display: block;
  width: 100%;
  height: 69px;
  object-fit: cover;
  opacity: 0.9;
  transition: opacity 0.2s;
}
.recipe-card > div {
  padding: 9px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f2f1e8;
}
.recipe-card b {
  font: 16px var(--serif);
}
.recipe-card small {
  font-size: 10px;
  color: #949985;
}
.recipe-card[aria-pressed="true"] {
  border-color: #72866b;
  box-shadow: 0 0 0 1px #72866b33;
}
.recipe-card[aria-pressed="true"]:after {
  content: "✓";
  position: absolute;
  right: 8px;
  top: 7px;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  color: #fff;
  background: #3d6051;
  border-radius: 50%;
  font-size: 10px;
}
.recipe-card:hover img {
  opacity: 1;
}
.blank-option {
  border: 1px dashed #c5ccba;
  border-radius: 3px;
  padding: 12px;
  text-align: left;
  min-height: 50px;
  font-size: 13px;
}
.blank-option span {
  display: block;
  color: #939b87;
  font-size: 11px;
  margin-top: 2px;
}
.blank-option[aria-pressed="true"] {
  border-style: solid;
  background: #e7ece1;
  border-color: #84947a;
}
.panel-description {
  color: #858d7e;
  font-size: 13px;
  line-height: 1.9;
}
.panel-next {
  margin-top: 5px;
  justify-content: space-between;
}
.palette {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: -7px;
}
.swatch {
  width: 36px;
  min-height: 55px;
  padding: 0;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  font-size: 10px;
  color: #8b927f;
}
.swatch i {
  display: block;
  width: 31px;
  height: 31px;
  background: var(--color);
  border-radius: 50%;
  border: 4px solid #eae7dd;
  box-shadow:
    inset -2px -2px 4px #0002,
    inset 1px 1px 2px #fff3;
}
.swatch[aria-pressed="true"] i {
  outline: 1px solid #7d8d75;
  outline-offset: 3px;
}
.swatch[aria-pressed="true"] {
  color: var(--ink);
}
.swatch.gold i {
  background: linear-gradient(130deg, #edd49c, #ba9855 48%, #907239);
}
.tools {
  display: flex;
  background: #eaece1;
  padding: 4px;
  border-radius: 4px;
  gap: 4px;
}
.tools button {
  min-height: 48px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 13px;
  border-radius: 2px;
  color: #829078;
}
.tools button[aria-pressed="true"] {
  background: #faf9f1;
  color: var(--green);
  box-shadow: 0 1px 5px #30402b09;
}
.size-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: #929982;
  margin-top: -3px;
}
.sizes {
  display: flex;
  gap: 4px;
}
.sizes button {
  min-width: 43px;
  min-height: 44px;
  font-size: 12px;
  color: #8b9580;
  border: 1px solid transparent;
  border-radius: 3px;
}
.sizes button[aria-pressed="true"] {
  border-color: #acb59e;
  background: #ecede3;
  color: var(--ink);
}
.tool-hint {
  font-size: 12px;
  line-height: 1.9;
  color: #909782;
  border-left: 2px solid #c8cfb9;
  padding-left: 12px;
}
.history-row {
  display: flex;
  gap: 8px;
}
.history-row > .secondary {
  padding: 9px 13px;
  min-height: 44px;
  flex: 1;
  font-size: 12px;
  gap: 6px;
}
.history-row .quiet {
  font-size: 12px;
}
.history-row svg {
  width: 16px;
  height: 16px;
}
.small-details {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 13px 0;
  font-size: 12px;
}
.small-details summary {
  cursor: pointer;
  min-height: 22px;
}
.small-details summary span {
  float: right;
  color: #929c85;
}
.small-details p {
  font-size: 12px;
  color: #8c957f;
  margin-top: 13px;
}
.recipe-switch {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 9px 0;
}
.recipe-switch button {
  border: 1px solid #cbd2be;
  border-radius: 2px;
  padding: 6px 10px;
  min-height: 40px;
}
.methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}
.method {
  border: 1px solid #d8ddce;
  background: #f6f5ec;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 12px;
  border-radius: 3px;
}
.method svg {
  width: 27px;
  height: 27px;
  color: #8d9b82;
}
.method b {
  display: block;
  font-size: 13px;
  font-weight: 500;
}
.method small {
  display: block;
  font-size: 10px;
  color: #939c87;
  margin-top: 3px;
}
.method:last-child {
  grid-column: 1/-1;
}
.method[aria-pressed="true"] {
  border-color: #8c9d7d;
  background: #e9eee1;
}
.dip-status {
  font-size: 12px;
  color: #818f74;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
progress {
  width: 100%;
  height: 4px;
  border: 0;
  display: block;
  accent-color: var(--green);
  background: #d9dfcf;
}
progress::-webkit-progress-bar {
  background: #d9dfcf;
}
progress::-webkit-progress-value {
  background: #718464;
}
.split-actions {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 9px;
}
.split-actions button {
  padding: 12px 9px;
  font-size: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  color: #858e7b;
}
.field input {
  width: 100%;
  background: #faf9f2;
  border: 1px solid #d7ddcd;
  border-radius: 3px;
  min-height: 47px;
  padding: 10px 14px;
  color: var(--ink);
  font-size: 15px;
}
.phrase-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}
.phrase-options button {
  border: 1px solid #d7ddcd;
  min-height: 40px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 2px;
}
.range-field {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #8d987f;
  min-height: 44px;
}
.range-field input {
  flex: 1;
  width: 100%;
  accent-color: #607756;
}
.range-field > span {
  min-width: 35px;
  text-align: right;
}
.seal-styles {
  margin-top: 12px;
}
.cure-progress {
  margin: 30px 0 10px;
}
.cure-progress p {
  font: 15px var(--serif);
  color: #9a9e8b;
  letter-spacing: 0.15em;
  margin-top: 25px;
}
.export-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.export-options .secondary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 5px;
  font-size: 12px;
}
.export-options small {
  font-size: 9px;
  color: #8c9780;
}
.panel-divider {
  border-top: 1px solid var(--line);
  margin: 3px 0;
}
.panel-body > .text-button {
  padding-top: 0;
  padding-bottom: 0;
}
#toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%, 12px);
  padding: 12px 22px;
  background: #294839ed;
  color: #fbf5e6;
  border-radius: 3px;
  font-size: 13px;
  box-shadow: 0 5px 30px #182f2626;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}
#toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.busy {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #f4f1e9bd;
  backdrop-filter: blur(4px);
}
.busy > div {
  width: 270px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background: #f9f7ee;
  padding: 32px;
  border: 1px solid #dce0d1;
  border-radius: 5px;
  box-shadow: 0 8px 50px #3c4b2110;
}
.busy-flower {
  font-size: 32px;
  color: #859376;
  animation: turn 6s linear infinite;
}
.busy p {
  font: 16px var(--serif);
}
@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}
dialog {
  border: 1px solid #d8ddcb;
  border-radius: 5px;
  background: #f4f1e9;
  color: var(--ink);
  width: min(900px, 92vw);
  max-height: 90svh;
  padding: 27px;
  box-shadow: 0 20px 100px #192e2533;
}
dialog::backdrop {
  background: #263c315e;
  backdrop-filter: blur(4px);
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
  gap: 20px;
}
.dialog-top h2 {
  font-size: 27px;
  margin-top: 6px;
}
.dialog-foot {
  font-size: 12px;
  color: #919b83;
  border-top: 1px solid #d8ddcb;
  padding-top: 18px;
  margin-top: 25px;
}
.gallery-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gallery-card {
  border: 1px solid #d9dece;
  border-radius: 3px;
  overflow: hidden;
}
.gallery-card img {
  width: 100%;
  height: 210px;
  object-fit: contain;
  background: #eae8db;
  display: block;
}
.gallery-card .card-open {
  display: block;
  padding: 0;
  width: 100%;
  text-align: left;
}
.gallery-card .card-open div {
  padding: 13px 14px;
}
.gallery-card h3 {
  font-family: var(--serif);
  font-size: 18px;
}
.gallery-card small {
  color: #98a088;
  font-size: 11px;
}
.gallery-card .card-actions {
  display: flex;
  justify-content: space-between;
  padding: 0 13px 10px;
  font-size: 11px;
}
.gallery-card .card-actions button {
  min-height: 38px;
  font-size: 11px;
  color: #819171;
}
.gallery-empty {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  font: 21px var(--serif);
  line-height: 2;
}
.gallery-empty p {
  font: 13px var(--sans);
  color: #929c84;
  margin-top: 14px;
}
.viewer {
  width: min(1000px, 94vw);
}
.zoom-viewport {
  height: 65svh;
  overflow: auto;
  background: #e8e5d8;
  border-radius: 3px;
  touch-action: pan-x pan-y;
}
.zoom-viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.viewer > .range-field {
  max-width: 500px;
  margin: 12px auto 0;
}
@media (min-width: 1100px) {
  .workspace {
    height: calc(100svh - 104px);
    min-height: 680px;
  }
  .control-panel {
    max-height: calc(100svh - 145px);
    overflow-y: auto;
    scrollbar-width: thin;
    padding-right: 5px;
    min-height: 560px;
  }
}
@media (max-width: 1099px) {
  .site-header {
    height: 85px;
    padding: 0 4%;
    gap: 12px;
  }
  #progress {
    gap: 16px;
  }
  #progress button {
    font-size: 11px;
    gap: 4px;
  }
  .workspace {
    padding: 25px 3%;
    gap: 25px;
    grid-template-columns: minmax(0, 1fr) 292px;
  }
  .art-stage {
    min-height: 560px;
  }
  .stage-heading > span {
    display: none;
  }
  .stage-heading h1 {
    font-size: 23px;
  }
  .stage-footer {
    flex-wrap: wrap;
    gap: 4px 12px;
  }
  .stage-footer .saved-state {
    margin-left: auto;
  }
  .stage-footer p {
    order: 3;
    flex-basis: 100%;
    font-size: 11px;
  }
  .cover {
    min-height: calc(100svh - 85px);
  }
  .hero-art {
    min-height: 440px;
  }
  .craft-note small {
    display: none;
  }
  .hero-copy h1 {
    font-size: 42px;
  }
}
@media (max-width: 699px) {
  html {
    font-size: 14px;
  }
  .site-header {
    height: 76px;
    padding: 0 5%;
    gap: 12px;
    flex-wrap: wrap;
  }
  .brand-seal {
    font-size: 16px;
    padding: 5px 6px;
  }
  .brand b {
    font-size: 19px;
  }
  .brand small {
    font-size: 8px;
  }
  .site-header .quiet {
    margin-left: auto;
    font-size: 12px;
  }
  .site-header .quiet svg {
    width: 18px;
  }
  body:has(#workspace:not([hidden])) .site-header {
    height: 112px;
    padding-top: 13px;
    padding-bottom: 7px;
  }
  #progress {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
    gap: 8px;
    margin-top: -5px;
  }
  #progress button {
    font-size: 12px;
    min-height: 34px;
  }
  #progress button span {
    font-size: 12px;
  }
  .cover {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 26px 7% 0;
    min-height: calc(100svh - 76px);
  }
  .hero-copy {
    padding-bottom: 0;
    position: relative;
  }
  .hero-copy .eyebrow {
    font-size: 10px;
    margin-bottom: 16px;
  }
  .hero-copy h1 {
    font-size: 36px;
    line-height: 1.4;
    letter-spacing: 0.07em;
  }
  .hero-intro {
    font-size: 13px;
    line-height: 1.9;
    margin: 14px 0 17px;
  }
  .hero-actions {
    gap: 8px 16px;
  }
  .hero-actions .primary {
    min-width: 165px;
    height: 48px;
    min-height: 48px;
    font-size: 13px;
  }
  .hero-actions .text-button {
    font-size: 12px;
  }
  .craft-note {
    margin-top: 19px;
    font-size: 10px;
    gap: 11px;
  }
  .hero-art {
    height: 380px;
    min-height: 300px;
    margin-top: -8px;
    margin-left: 40px;
    margin-right: -20px;
  }
  .hero-art canvas {
    transform: rotate(-13deg);
  }
  .hero-caption {
    bottom: 14%;
    right: 2%;
  }
  .hero-caption > span {
    font-size: 20px;
  }
  .hero-caption small {
    font-size: 9px;
  }
  .vertical-note {
    font-size: 10px;
    right: 0;
    top: 10%;
  }
  .cover-bottom {
    margin-top: 4px;
    gap: 10px;
    padding: 17px 0;
    font-size: 9px;
    letter-spacing: 0.02em;
  }
  .cover-bottom span:last-child {
    color: #a0a48f;
  }
  .workspace {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 22px 4% 24px;
    min-height: calc(100svh - 112px);
  }
  .stage-heading {
    padding: 0 6px 15px;
  }
  .stage-heading h1 {
    font-size: 23px;
    margin-top: 3px;
  }
  .stage-heading .eyebrow {
    font-size: 10px;
  }
  .art-stage {
    min-height: 0;
    height: 440px;
    flex: none;
    border-radius: 4px;
  }
  .art-stage[data-view="work"] {
    height: min(103vw, 450px);
  }
  .art-stage[data-view="dip"] {
    height: min(112vw, 470px);
  }
  .art-stage[data-view="res"] {
    height: min(132vw, 530px);
  }
  .stage-footer {
    padding: 5px 6px 0;
    gap: 2px 12px;
  }
  .stage-footer .text-button {
    font-size: 12px;
  }
  .stage-footer p {
    font-size: 12px;
  }
  .saved-state {
    font-size: 10px;
  }
  .control-panel {
    position: static;
    align-self: stretch; /* desktop's align-self: start shrank it to content width */
    padding: 18px 10px 0;
    border-top: 1px solid #dfe1d3;
    margin-top: 9px;
    max-height: none;
  }
  .panel-body {
    gap: 17px;
  }
  .panel-title h2 {
    font-size: 23px;
  }
  .panel-title .eyebrow {
    font-size: 10px;
  }
  .panel-description {
    font-size: 14px;
  }
  .section-label h3 {
    font-size: 14px;
  }
  .section-label > span {
    font-size: 12px;
  }
  .fan-options small {
    font-size: 12px;
  }
  .fan-options b {
    font-size: 20px;
  }
  .recipe-card img {
    height: 76px;
  }
  .recipe-card small {
    font-size: 12px;
  }
  .blank-option {
    font-size: 14px;
  }
  .blank-option span {
    font-size: 12px;
  }
  .panel-next {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    box-shadow: 0 5px 16px #283c2820;
    min-height: 50px;
  }
  .swatch {
    min-height: 58px;
    width: 38px;
    font-size: 12px;
  }
  .swatch i {
    width: 34px;
    height: 34px;
  }
  .tools button {
    font-size: 14px;
  }
  .size-row {
    font-size: 14px;
  }
  .sizes button {
    font-size: 14px;
    min-width: 48px;
  }
  .tool-hint {
    font-size: 13px;
  }
  .history-row > .secondary,
  .history-row .quiet {
    font-size: 13px;
  }
  .small-details,
  .small-details p {
    font-size: 13px;
  }
  .method small {
    font-size: 11px;
  }
  .method b {
    font-size: 14px;
  }
  .dip-status {
    font-size: 13px;
  }
  .split-actions button {
    font-size: 14px;
    min-height: 52px;
  }
  .field {
    font-size: 13px;
  }
  .field input {
    font-size: 16px;
  }
  .phrase-options button {
    font-size: 13px;
  }
  .export-options .secondary {
    font-size: 14px;
  }
  .export-options small {
    font-size: 11px;
  }
  .stage-badge {
    left: 15px;
    top: 16px;
    font-size: 11px;
  }
  .live-preview {
    width: 81px;
    padding: 5px;
    right: 10px;
    bottom: 10px;
  }
  .live-preview canvas {
    width: 60px;
    height: 73px;
  }
  .live-preview span {
    font-size: 9px;
  }
  #expand {
    right: 10px;
    top: 10px;
  }
  .gallery-list {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }
  .gallery-card img {
    height: 180px;
  }
  .gallery-card h3 {
    font-size: 16px;
  }
  .gallery-card .card-open div {
    padding: 10px;
  }
  .gallery-card .card-actions {
    padding: 0 7px 7px;
  }
  .dialog-top h2 {
    font-size: 24px;
  }
  dialog {
    padding: 20px 15px;
    max-height: 92svh;
  }
  .dialog-foot {
    font-size: 11px;
  }
  .zoom-viewport {
    height: 65svh;
  }
  .viewer .dialog-top {
    margin-bottom: 15px;
  }
}
@media (max-width: 380px) {
  .hero-copy h1 {
    font-size: 32px;
  }
  .hero-art {
    height: 310px;
    min-height: 290px;
  }
  .art-stage {
    height: 385px;
  }
  .workspace {
    padding: 18px 3%;
  }
  .control-panel {
    padding-left: 8px;
    padding-right: 8px;
  }
  .tools button {
    gap: 5px;
  }
  .recipe-card img {
    height: 64px;
  }
  .swatch {
    width: 33px;
  }
  .swatch i {
    width: 31px;
    height: 31px;
  }
  .palette {
    gap: 4px;
  }
}
@media (min-width: 700px) and (max-height: 550px) {
  .workspace {
    padding-top: 18px;
    gap: 20px;
  }
  .art-stage {
    min-height: 440px;
  }
  .site-header {
    height: 70px;
  }
  .control-panel {
    position: static;
  }
  .hero-art {
    height: 550px;
  }
  .cover {
    min-height: 650px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.panel-toggle {
  display: none;
}
.panel-description,
.tool-hint {
  font-size: 14px;
}
.panel-collapsed .panel-body {
  display: none !important;
}
@media (max-width: 699px) {
  .panel-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    width: 100%;
    padding: 0 0 14px;
    font-size: 12px;
    color: #859477;
  }
  .panel-toggle span {
    font-size: 12px;
  }
  .tool-hint {
    font-size: 14px;
  }
}
.palette {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
}
.swatch {
  width: 100%;
  min-height: 60px;
  padding: 5px 0;
}
.recipe-switch button,
.phrase-options button {
  min-height: 44px;
}
@media (max-width: 350px) {
  .palette {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 8px;
  }
}
@media (min-width: 700px) {
  .panel-collapsed .panel-body:not([hidden]) {
    display: flex !important;
  }
}
@media (max-width: 699px) {
  .panel-next {
    position: static;
    box-shadow: none;
  }
  #panel-work .panel-title {
    display: none;
  }
  .art-stage[data-view="work"] {
    height: min(95vw, 400px);
  }
  #panel-work {
    gap: 15px;
  }
}
