:root {
  --bg: #f6f4ef;
  --ink: #272a29;
  --muted: #777973;
  --line: #e4e4dc;
  --accent: #b74834;
  --accent-light: #fbf0eb;
  --serif: Georgia, "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP",
    sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
button,
a {
  touch-action: manipulation;
}
button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  min-height: 44px;
}
button:hover:not(:disabled) {
  border-color: #c7b6a9;
  background: #faf7f1;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #ad6245;
  outline-offset: 3px;
}
.header {
  height: 88px;
  padding: 0 4.8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: #faf9f5;
}
.brand {
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 36px;
  font-weight: bold;
  letter-spacing: -2px;
}
.brand-mark {
  font: 32px Georgia;
  color: var(--accent);
  letter-spacing: 0;
}
.brand-sub {
  font: 9px/1.6 sans-serif;
  font-weight: 600;
  letter-spacing: 2px;
  margin-left: 13px;
  border-left: 1px solid #cbcfc6;
  padding-left: 19px;
  max-width: 110px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.privacy-dot,
.status-dot {
  display: inline-block;
  background: #64866b;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.header-right .text-button {
  margin-left: 24px;
  font-size: 12px;
}
.text-button {
  background: none;
  border: 0;
  padding: 0 4px;
  font-size: 12px;
  color: #5c605a;
}
.text-button:hover:not(:disabled) {
  background: transparent;
  color: var(--accent);
}
main {
  max-width: 1460px;
  margin: auto;
  padding: 0 4.8%;
}
.intro {
  padding: 48px 0 39px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 600;
  color: #888c81;
  display: block;
}
.intro .eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow > span {
  height: 5px;
  width: 5px;
  background: var(--accent);
  border-radius: 50%;
}
h1 {
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: 1px;
  margin: 16px 0 13px;
}
h1 span {
  color: var(--accent);
}
.intro p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  margin: 0;
}
.intro-tag {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 25px;
  padding-right: 6px;
}
.intro-tag > span {
  font-size: 47px;
  font-weight: 200;
  color: #b09e78;
}
.intro-tag > div {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
}
.intro-tag small {
  display: block;
  font: 10px sans-serif;
  color: var(--muted);
  margin-top: 8px;
  letter-spacing: 1px;
}
.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 25px;
  align-items: start;
}
.workspace {
  min-width: 0;
}
.workspace-toolbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.workspace-toolbar > div {
  display: flex;
  gap: 14px;
  align-items: center;
}
.small-label {
  font-size: 10px;
  letter-spacing: 2px;
  color: #6b7165;
  font-weight: 650;
}
.pill {
  border: 1px solid #dedfd5;
  background: #eeeee6;
  border-radius: 4px;
  font-size: 10px;
  padding: 5px 8px;
  color: #73786c;
  font-variant-numeric: tabular-nums;
}
.reset {
  font-size: 10px;
}
.stage {
  height: 568px;
  min-height: 340px;
  background: #eeeee8;
  border: 1px solid #e1e1d8;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-image: radial-gradient(#d7d9cf 0.7px, transparent 0.7px);
  background-size: 16px 16px;
}
.empty-state {
  text-align: center;
  padding: 25px;
  z-index: 1;
}
.empty-art {
  height: 145px;
  width: 215px;
  position: relative;
  margin: 0 auto 21px;
}
.paper {
  position: absolute;
  width: 93px;
  height: 118px;
  border: 5px solid white;
  box-shadow: 0 5px 17px #54593b13;
  font-size: 40px;
  display: grid;
  place-items: center;
}
.p1 {
  background: #d3decf;
  transform: rotate(-15deg);
  left: 6px;
  top: 10px;
  color: #7c947a;
}
.p2 {
  background: #eedbc0;
  left: 67px;
  top: 0;
  z-index: 2;
  transform: rotate(6deg);
  overflow: hidden;
  color: #bba36f;
}
.p2 span {
  position: absolute;
  top: 5px;
  right: 8px;
  font-size: 30px;
}
.p2 i {
  width: 120px;
  height: 60px;
  border-radius: 50% 50% 0 0;
  background: #9eaa89;
  transform: rotate(-20deg);
  position: absolute;
  bottom: -16px;
  left: -15px;
}
.p3 {
  background: #e3cfcb;
  right: 0;
  top: 18px;
  transform: rotate(19deg);
  color: #bc8a80;
}
.empty-state .eyebrow {
  font-size: 8px;
  letter-spacing: 1.8px;
}
.empty-state h2 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  margin: 14px 0 9px;
}
.empty-state p {
  font-size: 11px;
  color: var(--muted);
  margin: 0 0 22px;
}
.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: white;
  padding: 12px 22px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 46px;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}
.primary:hover:not(:disabled) {
  background: #9f3b2a;
  border-color: #9f3b2a;
}
.primary span {
  font-size: 19px;
  font-weight: 300;
}
.empty-state small {
  display: block;
  font-size: 9px;
  color: #8a8c83;
  margin-top: 14px;
  line-height: 1.9;
}
.sample-button {
  font-size: 10px;
  background: none;
  border: 0;
  color: #6a7064;
  margin-top: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.canvas-wrap {
  max-width: 100%;
  max-height: 100%;
  padding: 30px;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.canvas-wrap[hidden] {
  display: none;
}
canvas {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  box-shadow: 0 7px 25px #30352814;
  border-radius: 1px;
  touch-action: pan-y;
}
canvas.editing {
  touch-action: none;
  cursor: grab;
}
.drop-overlay {
  position: absolute;
  inset: 0;
  background: #f7f3e9ef;
  border: 2px dashed var(--accent);
  border-radius: 10px;
  z-index: 10;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: var(--accent);
  pointer-events: none;
}
.drop-overlay[hidden] {
  display: none;
}
.preview-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #8b8e83;
  font-size: 9px;
  min-height: 43px;
  gap: 10px;
}
.preview-caption > span:first-child {
  display: flex;
  align-items: center;
  gap: 7px;
}
#grid-caption {
  letter-spacing: 1px;
  font-size: 8px;
}
.status-dot {
  background: #a5ad9a;
  width: 5px;
  height: 5px;
}
.header-note {
  font-size: 11px;
  background: #f1e9db;
  color: #7a6548;
  padding: 12px;
  border-radius: 6px;
  line-height: 1.8;
}
.image-tray {
  background: #fafbf7;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 16px 18px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}
.section-title h2 {
  font-size: 12px;
  font-weight: 600;
  margin: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}
.section-title h2 span {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  background: #edeee7;
  padding: 4px 7px;
  border-radius: 4px;
}
.section-title button {
  font-size: 10px;
}
.image-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 3px 3px 8px;
  min-height: 80px;
}
.tray-empty {
  font-size: 10px;
  color: #92948b;
  text-align: center;
  width: 100%;
  padding: 20px 0;
  margin: 0;
  line-height: 1.8;
}
.image-card {
  flex: 0 0 90px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  padding: 4px;
  position: relative;
}
.image-card.selected {
  border: 2px solid var(--accent);
  padding: 3px;
}
.image-card .select-image {
  width: 100%;
  height: 66px;
  padding: 0;
  overflow: hidden;
  position: relative;
  border: 0;
  border-radius: 3px;
  background: #f3f0eb;
  display: block;
}
.select-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.image-number {
  position: absolute;
  left: 3px;
  top: 3px;
  background: #272a29cb;
  color: white;
  border-radius: 3px;
  font-size: 9px;
  padding: 2px 4px;
}
.image-card .card-name {
  font-size: 8px;
  color: #7c7e74;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  display: block;
  margin: 5px 2px;
}
.card-buttons {
  display: flex;
  gap: 2px;
}
.card-buttons button {
  padding: 0;
  border: 0;
  min-height: 44px;
  width: 26px;
  border-radius: 3px;
  color: #6d7366;
  background: #f6f7f2;
  font-size: 12px;
  flex: 1;
}
.card-buttons .remove {
  color: var(--accent);
}
.tray-hint {
  font-size: 9px;
  line-height: 1.8;
  color: #8a8e82;
  margin: 8px 0 0;
}
.messages {
  font-size: 12px;
  line-height: 1.9;
  color: #8c4831;
}
.messages:empty {
  display: none;
}
.messages p {
  background: #faebe4;
  border: 1px solid #efd4c8;
  border-radius: 6px;
  padding: 12px;
  margin: 12px 0;
}
.messages .success {
  background: #eaf0e5;
  color: #52674c;
  border-color: #dbe5d3;
}
.local-note {
  display: flex;
  gap: 11px;
  align-items: center;
  margin: 23px 0;
  color: #8c9380;
}
.local-note > span {
  font-size: 27px;
}
.local-note p {
  font-size: 11px;
  color: #6b7461;
  margin: 0;
}
.local-note small {
  display: block;
  font-size: 9px;
  color: #94998a;
  margin-top: 6px;
}
.settings {
  background: #fffefa;
  border: 1px solid #e3e3d9;
  border-radius: 12px;
  overflow: hidden;
}
.settings-heading {
  padding: 24px 22px 21px;
  background: #f9faf4;
}
.settings-heading .small-label {
  font-size: 8px;
  color: #949b83;
}
.settings-heading h2 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin: 10px 0 0;
}
.setting-section {
  border-top: 1px solid var(--line);
  padding: 22px;
}
.setting-section h3 {
  font-size: 12px;
  font-weight: 650;
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.step {
  font-family: var(--serif);
  color: #a6ad95;
  font-size: 13px;
  font-weight: 400;
}
.preset-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.preset {
  padding: 15px 8px 12px;
  border-radius: 6px;
  background: #fffefa;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  position: relative;
  min-height: 106px;
}
.preset strong {
  font-size: 10px;
  font-weight: 500;
}
.preset small {
  font-size: 9px;
  color: #8c8f83;
}
.preset.active {
  background: #fcf4ee;
  border-color: #bd6b52;
  box-shadow: 0 0 0 0.5px #bd6b52;
}
.preset.active:after {
  content: "✓";
  position: absolute;
  right: 7px;
  top: 6px;
  color: var(--accent);
  font-size: 10px;
}
.ratio-icon {
  display: block;
  border: 1px solid #9ca18f;
  border-radius: 2px;
  height: 24px;
  width: 24px;
  background:
    linear-gradient(90deg, transparent 48%, #c8cbbd 49%, #c8cbbd 51%, transparent 52%),
    linear-gradient(0deg, transparent 48%, #c8cbbd 49%, #c8cbbd 51%, transparent 52%);
}
.active .ratio-icon {
  border-color: #b77057;
}
.ratio-icon.banner {
  width: 39px;
  height: 13px;
  margin: 6px 0 5px;
}
.ratio-icon.wide {
  width: 35px;
  height: 20px;
  margin: 2px 0;
}
.ratio-icon.portrait {
  width: 19px;
  height: 25px;
}
.select-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  margin-top: 12px;
  gap: 10px;
  color: #818778;
}
.select-label select {
  width: 150px;
  font-size: 10px;
  min-height: 44px;
  padding: 6px;
}
.control-label,
.range-heading,
.color-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
}
.control-label > span,
.range-heading output {
  font-size: 10px;
  color: #8c9381;
  font-variant-numeric: tabular-nums;
}
select {
  color: #5e6654;
  background: #fffefa;
  border: 1px solid #dedfd4;
  border-radius: 5px;
  padding: 8px 10px;
  width: 100%;
  min-height: 44px;
  font-size: 11px;
}
.control-label {
  margin-bottom: 8px;
}
.range-heading {
  margin-top: 19px;
  margin-bottom: 8px;
}
input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  background: #e6e8dd;
  height: 3px;
  width: 100%;
  margin: 12px 0;
  display: block;
  cursor: pointer;
  min-height: 3px;
}
input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border: 2px solid #fdfcf7;
  background: #8b9477;
  border-radius: 50%;
  box-shadow: 0 0 0 1px #bac1ac;
}
input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #8b9477;
  border: 2px solid #fff;
  border-radius: 50%;
}
input[type="range"]:disabled {
  opacity: 0.4;
  cursor: default;
}
.color-row {
  margin-top: 20px;
}
.color-input {
  display: flex;
  border: 1px solid #dedfd4;
  padding: 3px;
  gap: 5px;
  border-radius: 4px;
  align-items: center;
  background: white;
}
.color-input input[type="color"] {
  width: 30px;
  height: 35px;
  border: 0;
  padding: 1px;
  background: white;
  cursor: pointer;
}
.color-input input[type="text"],
#background-text {
  width: 76px;
  border: 0;
  font-family: monospace;
  font-size: 10px;
  color: #7d8471;
  min-height: 36px;
  outline-offset: 0;
}
.swatches {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.swatches button {
  background: var(--swatch);
  width: 29px;
  height: 29px;
  min-height: 29px;
  border-radius: 50%;
  border: 1px solid #d5d8cb;
  position: relative;
}
.swatches button:before {
  content: "";
  position: absolute;
  inset: -7px;
}
.swatches button:hover:not(:disabled) {
  background: var(--swatch);
  outline: 1px solid #a8af9a;
  outline-offset: 3px;
}
fieldset {
  padding: 0;
  border: 0;
  margin: 0;
  min-width: 0;
}
.segmented {
  display: flex;
  background: #f0f1ea;
  padding: 3px;
  border-radius: 5px;
  gap: 3px;
}
.segmented button {
  background: none;
  border: 0;
  flex: 1;
  font-size: 10px;
  border-radius: 3px;
  min-height: 40px;
}
.segmented button.active {
  background: white;
  box-shadow: 0 1px 4px #454d2810;
  color: var(--accent);
}
.setting-note {
  font-size: 9px;
  color: #929887;
  line-height: 1.9;
  margin: 10px 0 0;
}
#selection-note {
  margin: 0 0 13px;
}
#selected-number {
  margin-left: auto;
  font-size: 9px;
  color: var(--accent);
}
.position-buttons {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}
.position-buttons button {
  min-width: 0;
  flex: 1;
  min-height: 44px;
  font-size: 16px;
  color: #747e62;
}
.export-section {
  background: #f7f8f0;
}
.export-options {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 12px;
}
.export-options label {
  font-size: 9px;
  color: #8c9380;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.export-options select {
  font-size: 10px;
  background: #fffefa;
  min-width: 0;
}
.export-button {
  width: 100%;
  margin-top: 16px;
  justify-content: flex-start;
  font-size: 12px;
  padding: 10px 16px;
}
.export-arrow {
  margin-left: auto;
}
.export-section > p {
  font-size: 9px;
  text-align: center;
  color: #929986;
  margin: 10px 0 0;
}
.bottom-guide {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding: 31px 0 42px;
}
.bottom-guide > .eyebrow {
  text-align: center;
  font-size: 8px;
  color: #9c9f92;
}
.bottom-guide > div {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin-top: 28px;
  gap: 20px;
}
.bottom-guide p {
  margin: 0;
  display: grid;
  grid-template-columns: 35px 1fr;
  align-items: center;
  column-gap: 10px;
  border-right: 1px solid var(--line);
}
.bottom-guide p:last-child {
  border: 0;
}
.bottom-guide b {
  grid-row: span 2;
  font: italic 27px var(--serif);
  color: #b0b79f;
}
.bottom-guide strong {
  font-size: 11px;
  font-weight: 500;
}
.bottom-guide p span {
  font-size: 9px;
  color: #929687;
  margin-top: 8px;
}
footer {
  border-top: 1px solid var(--line);
  padding: 27px 4.8%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f0f1e9;
  gap: 20px;
}
footer .brand {
  font-size: 27px;
}
footer .brand-sub {
  font-size: 7px;
  max-width: none;
  padding-left: 13px;
  margin-left: 6px;
}
footer > span {
  font: italic 12px var(--serif);
  color: #959b89;
}
footer button {
  font-size: 10px !important;
}
.mobile-break {
  display: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
dialog {
  border: 1px solid #dddccf;
  border-radius: 14px;
  padding: 35px;
  max-width: 550px;
  width: calc(100% - 32px);
  background: #fffefa;
  color: var(--ink);
  box-shadow: 0 20px 80px #252a2630;
}
dialog::backdrop {
  background: #22292360;
  backdrop-filter: blur(4px);
}
dialog h2 {
  font: 500 24px var(--serif);
  margin: 18px 0;
}
dialog p,
dialog li {
  font-size: 12px;
  line-height: 2;
  color: #757b6b;
}
dialog li {
  margin-bottom: 8px;
}
dialog ol {
  padding-left: 20px;
}
.dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 44px;
  border: 0;
  background: none;
  font-size: 25px;
  color: #7e856f;
}
.dialog-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.dialog-actions button {
  padding: 10px 20px;
}
#result-image {
  display: block;
  max-width: 100%;
  max-height: 45vh;
  object-fit: contain;
  margin: 20px auto;
  background: #efeee7;
}
#result-download {
  display: flex;
}
#result-meta {
  text-align: center;
  font-size: 10px;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  .stage {
    height: 650px;
  }
}
@media (max-width: 1100px) {
  main {
    padding: 0 3%;
  }
  .header {
    padding: 0 3%;
  }
  .editor {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 18px;
  }
  .setting-section {
    padding: 19px;
  }
  .stage {
    height: 510px;
  }
  .intro-tag {
    display: none;
  }
  .intro {
    padding-top: 35px;
  }
  .settings-heading {
    padding: 22px 19px;
  }
  .bottom-guide p {
    column-gap: 4px;
  }
}
@media (max-width: 760px) {
  .header {
    height: 72px;
    padding: 0 5%;
  }
  .brand {
    font-size: 30px;
  }
  .brand-mark {
    font-size: 27px;
  }
  .brand-sub {
    font-size: 7px;
    max-width: 90px;
    margin-left: 5px;
    padding-left: 12px;
  }
  .header-right > span {
    display: none;
  }
  .header-right .text-button {
    margin-left: 0;
    font-size: 11px;
  }
  main {
    padding: 0 5%;
  }
  .intro {
    padding: 30px 0 22px;
  }
  h1 {
    font-size: 27px;
    letter-spacing: 0;
    margin-top: 15px;
  }
  .intro .eyebrow {
    font-size: 7px;
    letter-spacing: 1.4px;
  }
  .intro p {
    font-size: 10px;
  }
  .mobile-break {
    display: block;
  }
  .editor {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .workspace-toolbar {
    height: 48px;
  }
  .stage {
    height: 440px;
    min-height: 320px;
  }
  .canvas-wrap {
    padding: 20px;
  }
  .empty-art {
    transform: scale(0.85);
    margin-bottom: 5px;
  }
  .empty-state h2 {
    font-size: 21px;
  }
  .empty-state {
    padding: 20px;
  }
  .settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .settings-heading {
    grid-column: 1/-1;
    padding: 21px;
  }
  .settings-heading h2 {
    font-size: 21px;
  }
  .setting-section {
    padding: 20px;
    min-width: 0;
  }
  .setting-section:nth-of-type(even) {
    border-left: 1px solid var(--line);
  }
  .select-label {
    flex-direction: column;
    align-items: stretch;
  }
  .select-label select {
    width: 100%;
  }
  .preset {
    min-height: 99px;
    padding: 12px 3px;
  }
  .color-input {
    max-width: 125px;
  }
  .swatches {
    gap: 9px;
    flex-wrap: wrap;
  }
  .swatches button {
    width: 26px;
    min-height: 26px;
    height: 26px;
  }
  .color-row {
    flex-wrap: wrap;
    gap: 10px;
  }
  .export-options {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .image-settings h3 {
    flex-wrap: wrap;
  }
  .preview-caption {
    font-size: 8px;
  }
  .bottom-guide {
    margin-top: 30px;
    padding-top: 27px;
  }
  .bottom-guide > div {
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 25px 15px 0;
  }
  .bottom-guide p {
    border: 0;
    column-gap: 14px;
  }
  .bottom-guide strong {
    font-size: 12px;
  }
  .bottom-guide p span {
    font-size: 10px;
  }
  footer {
    padding: 23px 5%;
    flex-wrap: wrap;
  }
  footer .brand-sub {
    display: none;
  }
  footer > span {
    display: none;
  }
  .local-note {
    margin-bottom: 10px;
  }
  input[type="range"] {
    height: 5px;
    margin-top: 18px;
    margin-bottom: 18px;
  }
  input[type="range"]::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
  }
}
@media (max-width: 420px) {
  .settings {
    display: block;
  }
  .setting-section:nth-of-type(even) {
    border-left: 0;
  }
  .stage {
    height: 400px;
  }
  .preset-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  .preset {
    min-height: 100px;
  }
  .preset strong {
    font-size: 9px;
  }
  .preset small {
    font-size: 8px;
  }
  .ratio-icon.banner {
    width: 32px;
  }
  .select-label {
    flex-direction: row;
    align-items: center;
  }
  .select-label select {
    width: 170px;
  }
  .export-options {
    grid-template-columns: 1fr 1.5fr;
  }
  .settings-heading {
    padding: 22px;
  }
  .setting-section {
    padding: 22px;
  }
  .swatches {
    gap: 13px;
  }
  .color-row {
    flex-wrap: nowrap;
  }
  .image-tray {
    padding: 14px;
  }
  .workspace-toolbar > div {
    gap: 7px;
  }
  .small-label {
    font-size: 9px;
  }
  .pill {
    font-size: 9px;
  }
  .reset {
    font-size: 9px;
  }
  .empty-state p {
    font-size: 10px;
  }
  h1 {
    font-size: 25px;
  }
  .brand-sub {
    letter-spacing: 1px;
  }
  .header-right .text-button {
    font-size: 10px;
  }
  .local-note small {
    font-size: 8px;
  }
}

/* Readable controls and generous targets, with the quiet visual hierarchy intact. */
.intro p {
  font-size: 13px;
}
.header-right {
  font-size: 12px;
}
.setting-section h3 {
  font-size: 13px;
}
.preset strong {
  font-size: 12px;
}
.preset small {
  font-size: 11px;
}
.select-label,
.select-label select,
.control-label,
.range-heading,
.color-row {
  font-size: 12px;
}
select {
  font-size: 12px;
}
.control-label > span,
.range-heading output {
  font-size: 11px;
}
.setting-note {
  font-size: 11px;
  color: #737b65;
}
.segmented button {
  font-size: 12px;
}
.export-options label,
.export-options select {
  font-size: 11px;
}
.export-section > p {
  font-size: 11px;
  color: #737b65;
}
.export-button {
  font-size: 13px;
}
.tray-hint,
.tray-empty {
  font-size: 11px;
}
.preview-caption {
  font-size: 10px;
}
.local-note p {
  font-size: 12px;
}
.local-note small {
  font-size: 10px;
}
.image-card {
  flex-basis: 150px;
}
.image-card .select-image {
  height: 92px;
}
.image-card .card-name {
  font-size: 10px;
}
.card-buttons {
  gap: 3px;
}
.card-buttons button {
  min-width: 44px;
}
.section-title h2 {
  font-size: 13px;
}
.section-title button {
  font-size: 12px;
}
.image-list {
  gap: 12px;
}
.bottom-guide strong {
  font-size: 13px;
}
.bottom-guide p span {
  font-size: 11px;
}
.empty-state p {
  font-size: 12px;
}
.empty-state small {
  font-size: 11px;
}
.sample-button {
  font-size: 12px;
}
.empty-state .eyebrow {
  font-size: 9px;
}
.swatches {
  gap: 2px;
  flex-wrap: nowrap;
}
.swatches button {
  flex: 1;
  width: 44px;
  min-height: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  max-width: 46px;
}
.swatches button:before {
  inset: 0;
}
.swatches button:after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--swatch);
  border: 1px solid #d0d4c5;
  pointer-events: none;
}
.swatches button:hover:not(:disabled) {
  background: transparent;
  outline-offset: 0;
}
.image-number {
  font-size: 10px;
}
.messages p {
  white-space: pre-line;
}
.position-buttons {
  gap: 5px;
}
.position-buttons button {
  min-width: 44px;
}
.reset {
  font-size: 11px;
}
.pill {
  font-size: 11px;
}
input[type="range"] {
  height: 22px;
  background: linear-gradient(#e6e8dd, #e6e8dd) center/100% 3px no-repeat;
  margin: 3px 0;
}
.range-heading {
  margin-top: 15px;
}
footer button {
  font-size: 12px !important;
}
@media (min-width: 761px) {
  .workspace {
    position: sticky;
    top: 16px;
  }
  .stage {
    height: clamp(300px, 48vh, 568px);
  }
  .empty-art {
    height: 110px;
    transform: scale(0.8);
    transform-origin: center bottom;
    margin-bottom: 10px;
  }
  .empty-state {
    padding: 14px;
  }
  .empty-state h2 {
    margin: 12px 0 8px;
  }
  .empty-state p {
    margin-bottom: 14px;
  }
  .empty-state small {
    margin-top: 10px;
  }
  .sample-button {
    margin-top: 5px;
  }
}
@media (max-width: 760px) {
  .intro p {
    font-size: 12px;
  }
  .preset small {
    font-size: 10px;
  }
  .settings .select-label {
    font-size: 11px;
  }
  .image-tray {
    padding: 14px;
  }
  .stage {
    height: 440px;
  }
  .swatches {
    flex-wrap: wrap;
  }
  .swatches button {
    flex: 0 0 44px;
  }
  .position-buttons {
    flex-wrap: wrap;
  }
  .position-buttons button {
    flex: 0 0 44px;
  }
  .preview-caption {
    font-size: 10px;
    line-height: 1.7;
  }
  .local-note small {
    font-size: 10px;
    line-height: 1.7;
  }
  .header-right .text-button {
    font-size: 12px;
  }
  .reset {
    font-size: 10px;
  }
}
@media (max-width: 420px) {
  .preset-grid {
    grid-template-columns: 1fr 1fr;
  }
  .preset small {
    font-size: 11px;
  }
  .swatches {
    flex-wrap: nowrap;
  }
  .swatches button {
    flex: 1;
    min-width: 36px;
    max-width: 44px;
  }
  .position-buttons {
    flex-wrap: nowrap;
  }
  .position-buttons button {
    flex: 1;
    min-width: 44px;
  }
  .stage {
    height: 450px;
  }
  .workspace-toolbar > div {
    gap: 6px;
  }
  .small-label {
    font-size: 9px;
  }
  .pill {
    font-size: 10px;
  }
  .preview-caption {
    align-items: flex-start;
  }
  #grid-caption {
    font-size: 8px;
    white-space: nowrap;
  }
  .section-title button {
    font-size: 11px;
  }
  .select-label select {
    min-width: 0;
  }
  .local-note {
    align-items: flex-start;
  }
  .empty-state small {
    font-size: 11px;
  }
  .intro p {
    font-size: 11px;
  }
  .brand-sub {
    font-size: 7px;
  }
}
.stage:has(#empty-state:not([hidden])) {
  min-height: 480px;
}
@media (min-width: 761px) {
  .stage:has(#empty-state:not([hidden])) {
    min-height: 500px;
  }
}
:root {
  --muted: #62685b;
}
.eyebrow,
.intro .eyebrow,
.settings-heading .small-label,
.preset small,
.select-label,
.control-label > span,
.range-heading output,
.color-input input[type="text"],
#background-text,
.setting-note,
.export-options label,
.export-section > p,
.preview-caption,
.tray-empty,
.tray-hint,
.local-note p,
.local-note small,
.bottom-guide > .eyebrow,
.bottom-guide p span,
footer > span,
.empty-state small,
.image-card .card-name,
.step {
  color: #626958;
}
.pill {
  color: #5f6754;
}
.bottom-guide b {
  color: #727d60;
}
.empty-state {
  background: #eeeee8;
  border-radius: 12px;
}
.settings select,
.export-options select {
  color: #58624b;
}
.header-right,
.section-title h2 span,
dialog p,
dialog li {
  color: #62685b;
}
.color-input input[type="text"] {
  color: #626958;
}
.sample-button {
  color: #626958;
}

canvas.interactive {
  touch-action: none;
  cursor: grab;
}
canvas.interactive:active {
  cursor: grabbing;
}
