:root {
  color-scheme: light;
  --ink: #294738;
  --muted: #637164;
  --paper: #faf8f0;
  --line: #cfd3c2;
  --gold: #a38d60;
  --jp: "Yu Mincho", YuMincho, "Hiragino Mincho ProN", "MS PMincho", serif;
  --sans: "Yu Gothic UI", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  --latin: Georgia, "Times New Roman", serif;
  font-family: var(--sans);
  color: var(--ink);
  background: #f7f6ef;
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .64; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible, .artboard:focus-visible { outline: 2px solid #608163; outline-offset: 3px; }
p, h1, h2, fieldset { margin: 0; }
fieldset { padding: 0; border: 0; min-width: 0; }
img { max-width: 100%; }
.mast { background: #294638; color: #fff9e9; border-block-end: 3px double #9da38a; }
.mast-inner { width: min(1280px, 90%); height: 66px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.identity, .context { display: flex; align-items: center; }
.identity { gap: 14px; }
.identity img { height: 38px; width: 40px; object-fit: contain; filter: brightness(0) invert(.96) sepia(.15); }
.identity span { font: 22px/1.1 var(--latin); letter-spacing: -.5px; }
.identity i { color: #dedcc4; }
.context { gap: 8px; color: #ecebdb; font-size: 12px; letter-spacing: .08em; }
main { width: min(1280px, 90%); margin: 0 auto; padding: 35px 0 44px; }
.intro { margin-bottom: 26px; }
.intro h1, .display-info h1, .thank-you h1 { margin: 0; font: 500 clamp(27px, 3vw, 39px)/1.45 var(--jp); letter-spacing: .07em; }
.intro p, .display-info p, .thank-you p { color: var(--muted); font-size: 13px; line-height: 1.9; letter-spacing: .035em; margin-top: 7px; }
.studio-grid { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(340px, 1fr); gap: clamp(16px, 2.5vw, 34px); align-items: start; }
.panel, .preview-panel { border: 1px solid #c9cfbd; background: #fdfbf4; }
.preview-panel { overflow: hidden; }
.panel-bar { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 9px; padding: 9px 19px; color: #4e6250; border-bottom: 1px solid #c5cdb9; background: #eff1e6; }
.panel-bar span { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .06em; }
.panel-bar i, .theme-english { font: italic 15px var(--latin); color: #64765f; }
.mat, .display-mat { padding: clamp(16px, 2.2vw, 32px); background-color: #e1e6d8; background-image: repeating-linear-gradient(115deg, #8c96740b 0 1px, transparent 1px 5px), radial-gradient(ellipse at 50% 30%, #f0f1e5, #d9dfcf); }
.certificate {
  position: relative; isolation: isolate; width: 100%; text-align: center;
  color: #384f39; padding: 17px;
  background-color: #fcf8ec;
  background-image: radial-gradient(ellipse at 46% 32%, #fffdf4 15%, transparent 84%), repeating-linear-gradient(7deg, transparent 0 2px, #d3bf8e0b 2px 3px);
  box-shadow: 0 3px 9px #39473125, 0 12px 23px -16px #32472b70;
}
.certificate::before, .certificate::after { content: ''; pointer-events: none; position: absolute; }
.certificate::before { inset: 10px; border: 1px solid #acaa89; }
.certificate::after { inset: 14px; border: 1px solid #cac5a6; }
.corner { position: absolute; z-index: 1; width: 30px; height: 30px; color: #818966; pointer-events: none; }
.corner svg { width: 100%; height: 100%; }
.corner.tl { top: 8px; left: 8px; }
.corner.tr { top: 8px; right: 8px; transform: rotate(90deg); }
.corner.br { bottom: 8px; right: 8px; transform: rotate(180deg); }
.corner.bl { bottom: 8px; left: 8px; transform: rotate(270deg); }
.paper-inner { container-type: inline-size; padding: 10px 3.4% 14px; }
.paper-fleur, .paper-date { display: flex; align-items: center; justify-content: center; gap: 9px; }
.paper-fleur { font: 18px/1 var(--latin); color: var(--gold); }
.paper-fleur span { width: 27px; height: 1px; background: #bdb18c; }
.paper-heading { margin-top: 4px; font: 400 clamp(24px, 6.9cqw, 53px)/1.15 var(--latin); letter-spacing: -.055em; }
.paper-sub { margin-top: 6px; font: 11px/1.4 var(--jp); color: #5e7056; letter-spacing: .13em; }
.artboard { display: block; width: 100%; height: auto; aspect-ratio: 600/345; margin: 7px auto 3px; overflow: hidden; }
.interactive { cursor: crosshair; touch-action: manipulation; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.interactive[aria-disabled="true"] { cursor: default; }
.interactive:focus:not(:focus-visible) { outline: 0; }
.scene, .stamp-layer, .draft-layer, .shadow-layer { pointer-events: none; }
.stamp-ink { mix-blend-mode: multiply; }
.stamp-ink.stamp-light { mix-blend-mode: normal; }
.interactive:not([data-contact="touch"]):not([data-contact="pen"]) .finger-shadow { display: none; }
.stamp-name { font: 600 10px var(--sans); fill: #324935; stroke: #fff9e9; stroke-width: 2.7px; stroke-linejoin: round; paint-order: stroke fill; }
.stamp-name.leaf-name { font-size: 8px; stroke-width: 2px; }
.artboard[data-theme="polaris"] .drawing-paper { fill: #152438; stroke: #69788b; }
[data-theme="polaris"] .stamp-ink { mix-blend-mode: normal; }
.artboard[data-theme="polaris"] .stamp-name { fill: #fff5df; stroke: #101e30; }
.artboard[data-theme="polaris"] .hold-shadow .contact-shadow { color: #b5c5da; }
.artboard[data-theme="polaris"] .hold-shadow .finger-guide { stroke: #d7deeb; }
.keyboard-aim { stroke: #4f5d50; }
.artboard[data-theme="polaris"] .keyboard-aim { stroke: #e8d8a9; }
.paper-vow { font: 400 clamp(8px, 2.15cqw, 15px)/1.7 var(--jp); letter-spacing: .035em; }
.paper-names { font: italic 400 clamp(18px, 5.4cqw, 42px)/1.2 var(--latin), var(--jp); margin: 7px 0; overflow-wrap: anywhere; }
.paper-date { color: #766e4e; font: 11px/1.4 var(--latin); letter-spacing: .12em; }
.paper-date span { height: 1px; width: 24px; background: #c7b995; }
.settings, .single-panel { padding: clamp(20px, 2.1vw, 32px); }
.panel-title { font: 500 23px/1.4 var(--jp); letter-spacing: .08em; padding-bottom: 15px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
legend, .field { color: #394f3c; font: 600 13px/1.6 var(--sans); letter-spacing: .04em; }
legend { margin-bottom: 9px; padding: 0; }
.theme-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.theme-option, .color-option { position: relative; cursor: pointer; min-width: 0; }
.theme-option input, .color-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.theme-card { display: flex; flex-direction: column; border: 1px solid #d5d6c5; text-align: center; padding: 5px 3px 9px; background: #faf8ee; height: 100%; }
.theme-option input:checked + .theme-card { border-color: #5a7658; box-shadow: inset 0 0 0 1px #5a7658; background: #f1f3e7; }
.theme-option input:focus-visible + .theme-card, .color-option input:focus-visible + .swatch { outline: 2px solid #607e61; outline-offset: 3px; }
.theme-image { display: grid; position: relative; height: clamp(49px, 4.8vw, 75px); place-items: center; margin: 0 0 4px; }
.theme-image img { width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.theme-option[data-theme="rail"] .theme-image img { padding: 5px 12%; }
.radio-indicator { position: absolute; right: 2px; top: 0; height: 14px; width: 14px; display: grid; place-items: center; border: 1px solid #aeb8a5; background: #fbf9ee; border-radius: 50%; color: transparent; }
.theme-option input:checked + .theme-card .radio-indicator { color: white; background: #506c4e; border-color: #506c4e; }
.theme-card strong { font: 600 clamp(11px, 1.05vw, 15px)/1.5 var(--jp); text-wrap: balance; }
.theme-card small { color: #687460; font-size: 10px; margin-top: 3px; }
.field { display: block; margin-top: 18px; }
.field input { width: 100%; min-width: 0; min-height: 44px; color: var(--ink); background: #fffef8; border: 1px solid #c6cbb9; border-radius: 3px; padding: 9px 13px; display: block; margin-top: 6px; font: 16px/1.5 var(--sans); }
.field input::placeholder { color: #858d7c; }
input[type=date] { -webkit-appearance: none; text-align: left; }
.primary, .secondary { display: inline-flex; border: 1px solid var(--ink); border-radius: 3px; min-height: 48px; align-items: center; justify-content: center; gap: 11px; text-decoration: none; padding: 12px 18px; color: #fffdf4; background: var(--ink); font: 600 14px/1.5 var(--sans); letter-spacing: .055em; }
.primary:hover { background: #3f5945; }
.secondary { color: var(--ink); background: #f7f7ed; }
.settings .primary, .single-panel .primary { width: 100%; margin-top: 22px; }
.primary svg:last-child { margin-left: auto; }
.primary svg:first-child:not(:last-child) { margin-right: auto; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.8; }
.form-note { margin: 9px 0 0; text-align: center; font-size: 11px; }
.error { font-size: 13px; color: #934d39; line-height: 1.7; }
.error:not(:empty) { margin-top: 12px; }
.single-panel { max-width: 460px; }
.single-panel .field:first-child { margin-top: 0; }
.archive { margin-top: 24px; border-block: 1px solid var(--line); }
.archive summary { padding: 16px 4px; cursor: pointer; font-size: 14px; }
.archive summary span { margin-left: 10px; color: var(--muted); }
.archive ul { margin: 0; padding: 0; list-style: none; }
.archive li { padding: 12px 4px; border-top: 1px dotted var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; overflow-wrap: anywhere; }
.archive b, .archive small { display: block; }.archive small { color: var(--muted); font-size: 11px; }
.archive a, .text-link { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13px; min-height: 44px; }
.archive a { flex-shrink: 0; }
.qr-paper { background: white; padding: 3px; border: 1px solid var(--line); width: fit-content; margin: 19px auto 12px; line-height: 0; }
.qr-paper img { display: block; width: 160px; height: 160px; }
.issued { text-align: center; }
.issued .panel-title { text-align: left; }
.link-row { display: flex; border: 1px solid #a5b39a; border-radius: 3px; margin-top: 10px; }
.link-row a, .copy { display: inline-flex; align-items: center; justify-content: center; min-height: 47px; gap: 8px; }
.link-row a { flex: 1; padding: 7px; text-decoration: none; font-size: 13px; }
.copy { color: var(--ink); background: #eff2e7; border: none; border-left: 1px solid #a5b39a; width: 44px; }
.issued .hint { overflow-wrap: anywhere; }
.manage-actions { display: grid; gap: 8px; margin-top: 14px; }
.manage-actions > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px 12px; }
.manage-actions button, #sign-on-display { min-height: 44px; }
.manage-actions .text-button, #sign-on-display { background: none; border: 0; color: var(--ink); font-size: 13px; text-decoration: underline; text-underline-offset: 4px; }
.display-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 28%); gap: 22px; align-items: center; }
.display-mat { border: 1px solid var(--line); }
.replay-heading, .replay-controls, .replay-mat { max-width: 800px; margin-inline: auto; }
.replay-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.replay-heading h1 { font: 500 clamp(22px, 4vw, 33px)/1.35 var(--jp); }
.replay-controls { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 12px; padding: 10px 14px; margin-bottom: 12px; }
.replay-controls button { min-width: 92px; padding-inline: 10px; font-size: 13px; white-space: nowrap; }
.replay-progress { display: grid; font-size: 11px; color: var(--muted); }
.replay-progress input { width: 100%; height: 32px; margin: 0; accent-color: var(--ink); }
#replay-count { font-size: 12px; font-variant-numeric: tabular-nums; }
#replay-detail { grid-column: 1 / -1; }
#replay-download { grid-column: 1 / -1; justify-self: start; margin-top: 5px; }
.replay-export-status { grid-column: 1 / -1; }
.replay-export-status:empty { display: none; }
.replay-appear { animation: replay-impression .25s ease-out both; }
@keyframes replay-impression { from { opacity: .15; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .replay-appear { animation: none; } }
.display-info { text-align: center; padding: 26px 15px; }
.display-info h1 { font-size: 27px; margin-top: 5px; }
.display-info .scan { display: block; font-size: 12px; font-weight: 600; }
.display-info .text-link { margin-top: 4px; }
.count { display: flex; gap: 9px; justify-content: center; align-items: center; border-top: 1px solid var(--line); padding-top: 17px; margin: 14px 8px 5px; font-size: 15px; }
.live { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11px; }
.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #7c986e; }
.colors { margin: 22px 0 16px; }
.color-options { display: flex; justify-content: space-between; gap: 5px; }
.color-option { display: grid; text-align: center; justify-items: center; gap: 5px; font-size: 11px; }
.swatch { border: 1px solid #c3cbb7; background: #faf9f0; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; }
.swatch svg { width: 29px; height: 29px; }
.color-option input:checked + .swatch { outline: 2px solid #526e53; outline-offset: 1px; background: #eeefe1; }
[data-theme="polaris"] :is(.swatch, .thank-stamp, .stamp-sample),
[data-theme="polaris"] .color-option input:checked + .swatch { background: #182b43; border-color: #76849b; }
[data-theme="polaris"] .stamp-sample { color: #fff5e2; outline-color: #72849c; }
[data-theme="polaris"] .drawing-area { background: #101c2d; }
[data-theme="polaris"] .artboard:focus-visible { outline-color: #e8d8a9; }
.stamp-actions { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; margin-top: 8px; }
.stamp-actions[hidden] { display: none; }
.stamp-actions .primary > svg:first-child:not(:last-child) { margin: 0; }
.stamp-actions .secondary:disabled { cursor: default; }
.colors:disabled .color-option { cursor: default; }
.thank-you { max-width: 580px; padding: 44px 22px; text-align: center; margin: 35px auto; }
.thank-stamp { background: #eaf0e1; border: 1px solid var(--line); height: 72px; width: 72px; display: grid; place-items: center; border-radius: 50%; margin: auto; }
.thank-stamp svg { width: 41px; height: 41px; }
.thank-you i { display: block; font: italic 39px var(--latin); margin: 18px 0 8px; }
.thank-you h1 { font-size: 22px; }
.thank-you .primary { margin: 24px auto 5px; max-width: 300px; width: 100%; display: flex; }
.loading { color: var(--muted); text-align: center; padding: 70px 0; }
@media (min-width: 781px) and (orientation: landscape) {
  .display-grid .display-mat { width: min(100%, max(490px, calc((100svh - 165px) * 1.24))); justify-self: center; }
}
@media (max-width: 1000px) {
  main, .mast-inner { width: 94%; }
  .studio-grid { grid-template-columns: minmax(0, 1.22fr) minmax(310px, 1fr); gap: 15px; }
  .settings { padding: 17px; }.mat { padding: 16px; }
  .theme-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1001px) and (max-width: 1350px) {
  .theme-option[data-theme="polaris"] strong { font-size: 12px; }
}
@media (max-width: 780px) {
  .studio-grid { grid-template-columns: minmax(0, 1fr); max-width: 610px; margin-inline: auto; }
  .intro { max-width: 610px; margin-inline: auto; }
  .theme-image { height: 74px; }.theme-card strong { font-size: 14px; }
}
@media (max-width: 780px), (orientation: portrait) and (max-width: 1100px) {
  .display-grid { grid-template-columns: 1fr; max-width: 670px; margin: auto; gap: 15px; }
  .display-info { display: grid; grid-template-columns: 135px 1fr; text-align: left; align-items: center; gap: 3px 20px; padding: 17px; }
  .display-info #guest-access { grid-column: 1; grid-row: 1 / 7; }
  .display-info .qr-paper { width: 130px; margin: 0; }
  .display-info .qr-paper img { width: 100%; height: auto; }
  .display-info > :not(#guest-access) { grid-column: 2; }
  .display-info .theme-english, .display-info > p { display: none; }
  .display-info h1 { font-size: 22px; margin: 0 0 3px; }
  .display-info .text-link, .count { justify-content: flex-start; }
  .display-info .count { margin: 0; padding: 7px 0 0; font-size: 13px; }
}
@media (max-width: 520px) {
  main, .mast-inner { width: 92%; }
  main { padding-block: 23px 32px; }.mast-inner { height: 55px; }
  .identity { gap: 7px; }.identity img { width: 30px; height: 30px; }.identity span { font-size: 18px; }.context { font-size: 10px; gap: 5px; }
  .intro { margin-bottom: 17px; }.intro h1 { font-size: 27px; }.intro p { font-size: 12px; }
  .panel-bar { padding: 8px 12px; min-height: 35px; }.panel-bar span { font-size: 10px; }.panel-bar i { font-size: 13px; }
  .mat, .display-mat { padding: 10px; }
  .certificate { padding: 12px; }.certificate::before { inset: 6px; }.certificate::after { inset: 9px; }
  .corner { width: 21px; height: 21px; }.corner.tl, .corner.tr { top: 5px; }.corner.bl, .corner.br { bottom: 5px; }
  .corner.tl, .corner.bl { left: 5px; }.corner.tr, .corner.br { right: 5px; }
  .paper-inner { padding: 5px 1% 8px; }.paper-fleur { font-size: 13px; }.paper-sub, .paper-date { font-size: 9px; }
  .paper-names { margin: 4px 0; }.paper-heading { margin-top: 2px; }.paper-sub { margin-top: 3px; }
  .panel-title { font-size: 21px; margin-bottom: 14px; padding-bottom: 10px; }
  .theme-image { height: 58px; }.theme-card strong { font-size: 12px; }
  .thank-you h1 { font-size: 19px; }.form-note { font-size: 10px; }
  .display-info { gap: 2px 11px; grid-template-columns: 106px 1fr; padding: 12px; }
  .display-info .qr-paper { width: 106px; }
}

/* A guest prepares their stamp, then works on the picture with both hands free to pan and zoom. */
.stamp-desk { max-width: 620px; margin: 0 auto; }
.stamp-desk button { touch-action: manipulation; }
.setup-heading { margin: 0 0 18px; }
.setup-heading h1, .edit-heading h1 { margin: 0; font: 500 clamp(25px, 3vw, 34px)/1.4 var(--jp); letter-spacing: .055em; }
.setup-heading p { font-size: 13px; line-height: 1.65; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.stamp-tools { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 22px; align-items: center; padding: 17px 22px; border: 1px solid var(--line); background: #f3f2e7; }
.stamp-sample { min-width: 0; margin: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; justify-items: center; align-items: center; align-self: stretch; padding: 9px 6px; background: radial-gradient(ellipse, #fffdf0 15%, #f5efdf); border: 1px solid #c3b997; outline: 1px solid #e1d8be; outline-offset: -4px; }
.stamp-sample figcaption { font: 11px/1.5 var(--jp); letter-spacing: .08em; }
#sample-print { width: 72px; height: 72px; max-width: 100%; }
#sample-print svg { width: 100%; height: 100%; }
#sample-name { font: 500 12px/1.4 var(--jp); text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.adjustments { min-width: 0; }
.adjustment { display: grid; grid-template-columns: 3.2em minmax(45px, 1fr) 3.45em; align-items: center; gap: 8px; min-height: 45px; font-size: 13px; }
.adjustment output { text-align: right; color: #596754; font: 12px/1.3 var(--sans); font-variant-numeric: tabular-nums; }
.adjustment input { appearance: none; -webkit-appearance: none; width: 100%; min-width: 0; height: 44px; margin: 0; background: transparent; cursor: pointer; accent-color: var(--ink); }
.adjustment input::-webkit-slider-runnable-track { height: 4px; background: #b7c2a9; border-radius: 4px; }
.adjustment input::-moz-range-track { height: 4px; background: #b7c2a9; border-radius: 4px; }
.adjustment input::-webkit-slider-thumb { appearance: none; height: 23px; width: 23px; border-radius: 50%; background: #4d6a50; border: 3px solid #faf8ec; box-shadow: 0 0 0 1px #6b8064; margin-top: -9.5px; }
.adjustment input::-moz-range-thumb { height: 18px; width: 18px; border-radius: 50%; background: #4d6a50; border: 3px solid #faf8ec; box-shadow: 0 0 0 1px #6b8064; }
.adjustment input:disabled { opacity: .5; cursor: default; }
.setup-fields { border: 1px solid var(--line); border-top: 0; padding: 19px 22px 23px; background: #fdfbf4; }
.setup-fields .field { margin: 0; }
.setup-fields .color-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; }
.color-hint { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.setup-fields .color-option { text-wrap: balance; }
.setup-fields .primary { width: 100%; }
.open-shapes, .shape-picker button { -webkit-tap-highlight-color: transparent; }
.shape-select { width: 100%; min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: 8px;
  margin-top: 14px; padding: 8px 12px; color: var(--ink); background: #f4f3e7; border: 1px solid var(--line); border-radius: 3px; font-size: 13px; }
.shape-selected { display: inline-flex; align-items: center; gap: 8px; }
#shape-summary-icon { display: flex; width: 23px; }
.shape-picker { width: min(440px, calc(100% - 24px)); max-width: none; max-height: calc(100% - 30px); padding: 10px 14px 16px;
  color: var(--ink); background: #faf8ef; border: 1px solid #a4ae96; border-radius: 7px; box-shadow: 0 10px 42px #17251e40; }
.shape-picker::backdrop { background: #17291fd1; }
.shape-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 5px; }
.shape-picker-heading h2 { font: 500 20px/1.3 var(--jp); }
.shape-picker-heading button { min-height: 44px; border: 0; background: transparent; color: var(--ink); font-size: 13px; }
.shape-options { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.shape-option { min-width: 0; min-height: 68px; display: grid; align-content: center; justify-items: center; gap: 3px;
  padding: 4px 2px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: #fffdf5; font-size: 11px; line-height: 1.15; }
.shape-option[aria-pressed=true] { border-color: #4f6e56; box-shadow: inset 0 0 0 1px #4f6e56; background: #e9eddf; }
.shape-glyph { display: grid; place-items: center; width: 27px; height: 27px; }
.shape-glyph svg, #shape-summary-icon svg { display: block; width: 100%; height: auto; }
[data-theme="polaris"] .shape-glyph { background: #182b43; color: #f3ce82; border-radius: 50%; }
[data-theme="polaris"] .shape-glyph svg { width: 21px; }
.stamp-desk[data-stage=setup] :is(.edit-heading, .drawing, .dock-space, [data-control=density]),
.stamp-desk[data-stage=edit] :is(.setup-heading, .setup-fields) { display: none; }
body.stamp-open { overflow: hidden; overscroll-behavior: none; }
.stamp-desk[data-stage=edit] {
  position: fixed; z-index: 10; inset: 0; height: 100vh; height: 100dvh; max-width: none;
  display: grid; grid-template-rows: auto auto minmax(0,1fr) auto; grid-template-columns: minmax(0,1fr);
  background: #e9eddf; padding-top: env(safe-area-inset-top);
}
.edit-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 0 max(14px, calc((100% - 930px)/2)); min-height: 45px; color: #fbf8ec; background: var(--ink); }
.edit-heading { padding-inline: max(14px, env(safe-area-inset-left), calc((100% - 930px)/2)) max(14px, env(safe-area-inset-right), calc((100% - 930px)/2)); }
.edit-heading h1 { font-size: 18px; letter-spacing: .08em; }
.edit-heading button { color: inherit; background: transparent; border: none; text-decoration: underline; text-underline-offset: 4px; min-height: 44px; font-size: 12px; padding-inline: 8px; }
.edit-settings { display: flex; }
.edit-settings button { white-space: nowrap; }
.stamp-desk[data-stage=edit] .stamp-tools { padding: 8px max(14px, calc((100% - 740px)/2)); grid-template-columns: 112px minmax(0,1fr); border-width: 0 0 1px; }
.stamp-desk[data-stage=edit] .adjustment { min-height: 39px; }
.stamp-desk[data-stage=edit] .adjustment input { height: 39px; }
.drawing { min-height: 0; min-width: 0; display: grid; grid-template-rows: auto minmax(0,1fr); }
.canvas-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 max(4px, calc((100% - 930px)/2)); background: #fbfaf2; border-bottom: 1px solid var(--line); }
.canvas-inks { display: flex; }
.canvas-inks button { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0; background: transparent; border: 0; }
.canvas-inks .swatch { width: 28px; height: 28px; }
.canvas-inks .swatch svg { width: 20px; height: 20px; }
.canvas-inks button[aria-pressed=true] .swatch { outline: 2px solid #526e53; outline-offset: 2px; }
.zoom-controls { display: flex; align-items: center; }
.zoom-controls button { min-height: 44px; min-width: 44px; border: 0; background: transparent; color: var(--ink); font-size: 21px; }
.zoom-controls button:disabled { opacity: .38; cursor: default; }
#zoom-fit { min-width: 48px; font: 600 13px var(--sans); font-variant-numeric: tabular-nums; }
@media (max-width: 370px) {
  .canvas-toolbar { flex-wrap: wrap; }
  .canvas-inks { flex: 1 0 100%; justify-content: space-around; border-bottom: 1px solid var(--line); }
  .zoom-controls { margin-inline-start: auto; }
  .color-option .swatch { width: 41px; height: 41px; }
  .setup-fields .color-option { font-size: 10px; }
}
.drawing-area { min-height: 0; overflow: hidden; background: repeating-linear-gradient(115deg, #909b770a 0 1px, transparent 1px 6px), #e6eadc; }
.drawing-area .artboard { display: block; margin: 0; width: 100%; height: 100%; aspect-ratio: auto; touch-action: none; }
.drawing-area .artboard:focus-visible { outline-offset: -3px; }
.dock-space { height: var(--dock-height, 76px); }
.editor-dock { position: fixed; left: 0; top: 0; z-index: 20; width: var(--dock-width, 100%); transform-origin: 0 0;
  transform: translate(var(--dock-x, 0px), var(--dock-y, 100dvh)) scale(var(--dock-scale, 1)) translateY(-100%);
  min-height: calc(58px + max(10px, env(safe-area-inset-bottom))); display: grid; align-content: center;
  padding: 9px max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: #faf9ef; border-top: 1px solid #adb69d; box-shadow: 0 -3px 12px #263e2e0d;
}
.dock-inner { width: 100%; max-width: 640px; margin: auto; }
.editor-dock[data-review=true] #position { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.editor-dock #position { color: #53634f; font-size: 12px; line-height: 1.6; text-align: center; }
.editor-dock .error { text-align: center; }
.editor-dock .error:not(:empty) { margin-top: 4px; }
.editor-dock .stamp-actions { margin-top: 0; }
.editor-dock .stamp-actions button { min-height: 49px; }
@media(max-width: 540px) {
  .stamp-tools { grid-template-columns: 82px minmax(0,1fr); gap: 12px; padding: 12px; }
  .stamp-sample { padding: 6px; }.stamp-sample figcaption { font-size: 10px; }.stamp-sample #sample-name { font-size: 11px; }
  #sample-print { width: 68px; height: 68px; }
  .adjustment { font-size: 12px; gap: 5px; grid-template-columns: 3em minmax(0,1fr) 3.2em; }
  .setup-fields { padding: 16px; }
  .stamp-desk[data-stage=edit] .stamp-tools { grid-template-columns: 83px minmax(0,1fr); }
}
@media (orientation: landscape) and (max-height: 540px) {
  .stamp-desk[data-stage=edit] { grid-template-columns: minmax(190px, 31%) minmax(0,1fr); grid-template-rows: auto minmax(0,1fr) auto; }
  .edit-heading, .dock-space { grid-column: 1 / -1; }
  .stamp-desk[data-stage=edit] .stamp-tools { grid-column: 1; grid-row: 2; grid-template-columns: minmax(0,1fr); align-content: start; gap: 3px; padding: 6px 12px 6px max(12px, env(safe-area-inset-left)); overflow: auto; }
  .stamp-sample { display: flex; gap: 5px; justify-content: center; flex-wrap: wrap; }
  #sample-print { width: 44px; height: 44px; }
  .drawing { grid-column: 2; grid-row: 2; }
  .dock-inner { display: flex; justify-content: center; align-items: center; gap: 8px; }
  .editor-dock .stamp-actions { flex: 1; min-width: 225px; max-width: 350px; margin: 0; }
  .editor-dock #position { flex: 1; }
}
