@font-face {
  font-family:"DM Serif";
  src:url("./fonts/DMSerifDisplay-Regular.ttf") format("truetype");
  font-style:normal;
  font-weight:400;
  font-display:swap
}

@font-face {
  font-family:"DM Serif";
  src:url("./fonts/DMSerifDisplay-Italic.ttf") format("truetype");
  font-style:italic;
  font-weight:400;
  font-display:swap
}

@font-face {
  font-family:"DM Sans";
  src:url("./fonts/DMSans-Variable.ttf") format("truetype");
  font-style:normal;
  font-weight:100 900;
  font-display:swap
}

:root {
  --bg:#f4f2ed;
  --fg:#252925;
  --panel:#faf9f6;
  --line:#deded4;
  --muted:#797d73;
  --accent:#355bdf;
  --front:#888;
  --back:#444;
  --tape:#2a2a2a;
  --tooth:#c8c8c8;
  --slider:#d8d8d8;
  --danger:#b44b42;
  --del-tape:#6e1414;
  --del-tooth:#e53935;
  --del-slider:#ef6a66;
  --gold-tooth:#f2c14e;
  --gold-slider:#ffd86b;
  color-scheme:light
}

* {
  box-sizing:border-box;
  -webkit-tap-highlight-color:transparent
}

html {
  height:100%;
  scrollbar-width:thin;
  scrollbar-color:#c6c8be var(--bg)
}

body {
  margin:0;
  min-height:100%;
  background:var(--bg);
  color:var(--fg);
  font-family:"DM Sans",sans-serif;
  font-size:14px;
  -webkit-font-smoothing:antialiased;
  touch-action:manipulation;
  -webkit-user-select:none;
  user-select:none
}

body::before {
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.16;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' opacity='.3' filter='url(%23n)'/%3E%3C/svg%3E")
}

button,input {
  font:inherit
}

button,a,label {
  -webkit-touch-callout:none
}

button:disabled {
  opacity:.5;
  cursor:default
}

a {
  color:inherit;
  text-decoration:none
}

svg {
  display:block;
  flex:none
}

button svg {
  width:20px;
  height:20px
}

button:focus-visible,a:focus-visible,.pick:focus-within {
  outline:2px solid var(--accent);
  outline-offset:4px
}

button:focus:not(:focus-visible),a:focus:not(:focus-visible) {
  outline:none
}

.hidden {
  display:none!important
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap
}

#app {
  position:relative;
  width:min(100%,1880px);
  min-height:100svh;
  margin:0 auto;
  padding:max(20px,env(safe-area-inset-top)) clamp(24px,3.2vw,60px) max(18px,env(safe-area-inset-bottom));
  display:flex;
  flex-direction:column
}

.masthead {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  min-height:55px;
  padding-bottom:14px;
  border-bottom:1px solid var(--line)
}

.brand {
  display:flex;
  align-items:center;
  gap:11px;
  min-height:44px
}

.brand-mark {
  width:28px;
  height:34px;
  color:var(--accent)
}

.brand>span {
  font-size:20px;
  font-weight:600;
  letter-spacing:-.75px
}

.brand b {
  font-weight:400
}

.brand small {
  display:block;
  margin-top:5px;
  font-size:8px;
  font-weight:600;
  letter-spacing:1.7px;
  color:var(--muted)
}

.masthead-right {
  display:flex;
  align-items:center;
  gap:clamp(28px,5vw,80px)
}

.edition {
  color:var(--muted);
  font-size:12px
}

.home-link {
  display:flex;
  align-items:center;
  gap:17px;
  min-height:44px;
  font-size:12px;
  font-weight:600
}

.home-link>span {
  font-size:19px;
  font-weight:400
}

.home-link:hover {
  color:var(--accent)
}

.workbench {
  flex:1;
  display:grid;
  grid-template-columns:minmax(0,1fr) clamp(480px,40.3vw,720px) minmax(0,1fr);
  gap:clamp(24px,2.5vw,48px);
  align-items:center;
  padding:22px 0 18px
}

.intro {
  align-self:center;
  min-width:0;
  padding-bottom:26px
}

.eyebrow {
  display:flex;
  align-items:center;
  gap:9px;
  margin:0;
  color:var(--muted);
  font-size:9px;
  font-weight:600;
  line-height:1.5;
  letter-spacing:1.65px
}

.intro .eyebrow {
  display:flex;
  color:var(--accent)
}

.intro .eyebrow>span {
  width:22px;
  height:1px;
  background:currentColor
}

.intro h1 {
  font-family:"DM Serif",serif;
  font-weight:400;
  font-size:clamp(52px,5.4vw,78px);
  line-height:1.01;
  letter-spacing:-2.6px;
  margin:23px 0 20px
}

.intro h1>span,.intro h1>em {
  display:block
}

.intro h1 em {
  font-weight:400;
  color:var(--accent)
}

.intro-copy {
  display:block;
  color:#6b7066;
  font-size:13px;
  line-height:1.8;
  margin:0
}

.instructions {
  list-style:none;
  padding:0;
  margin:38px 0 22px;
  display:flex;
  flex-direction:column;
  gap:23px
}

.instructions li {
  display:flex;
  align-items:flex-start;
  gap:13px
}

.step-number {
  min-width:22px;
  margin-top:2px;
  font-size:10px;
  color:#8a8f81;
  font-weight:500;
  font-variant-numeric:tabular-nums
}

.instructions strong {
  display:block;
  font-size:12px;
  font-weight:600;
  line-height:1.4
}

.instructions p {
  margin:5px 0 0;
  color:var(--muted);
  font-size:11px;
  line-height:1.6
}

.keyboard-note {
  display:flex;
  align-items:center;
  gap:4px;
  margin:25px 0 0;
  font-size:9px;
  color:#868b80;
  white-space:nowrap
}

.key {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  width:20px;
  height:20px;
  border:1px solid #ddded5;
  border-radius:4px;
  background:#f8f7f3;
  font-size:12px
}

.key:last-of-type {
  margin-right:5px
}

.intro-doodle {
  display:block;
  width:175px;
  margin:18px 0 0 34px;
  color:#8e9786;
  transform:rotate(-4deg)
}

.intro-doodle svg {
  width:112px;
  height:46px
}

.intro-doodle span {
  font-family:"DM Serif",serif;
  font-size:15px;
  font-style:italic
}

.photo-workspace {
  min-width:0;
  width:100%;
  max-width:720px;
  margin:auto
}

.canvas-caption {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:0 4px 10px;
  font-size:8px;
  font-weight:500;
  letter-spacing:1.2px;
  color:#939889
}

.canvas-caption>span:first-child {
  display:flex;
  align-items:center;
  gap:6px;
  color:#596552
}

.canvas-caption i {
  width:4px;
  height:4px;
  border-radius:50%;
  background:#899a74
}

.photo-mat {
  position:relative;
  padding:12px;
  border:1px solid #e4e3da;
  border-radius:4px;
  background:#fbfaf7;
  box-shadow:0 28px 44px -34px #454b3566,0 4px 12px #333c2610,0 1px 2px #fff inset;
  isolation:isolate
}

.photo-mat::before {
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  transform:rotate(-1.2deg);
  background:#fbfaf7;
  border:1px solid #e3e2d8;
  border-radius:4px
}

#stage {
  position:relative;
  width:100%;
  height:clamp(560px,calc(100dvh - 240px),800px);
  min-height:0;
  overflow:hidden;
  border-radius:1px;
  background:#b19b80
}

canvas {
  display:block;
  width:100%;
  height:100%;
  touch-action:none
}

#cv:focus-visible {
  outline:2px solid #f4f2ed;
  outline-offset:-3px
}

.corner {
  position:absolute;
  z-index:2;
  width:13px;
  height:13px;
  border-color:#e0e0d4;
  border-style:solid;
  pointer-events:none
}

.corner-tl {
  left:5px;
  top:5px;
  border-width:1px 0 0 1px
}

.corner-tr {
  right:5px;
  top:5px;
  border-width:1px 1px 0 0
}

.corner-bl {
  left:5px;
  bottom:5px;
  border-width:0 0 1px 1px
}

.corner-br {
  right:5px;
  bottom:5px;
  border-width:0 1px 1px 0
}

.stage-hint {
  position:absolute;
  bottom:20px;
  left:50%;
  transform:translateX(-50%);
  pointer-events:none;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  width:max-content;
  max-width:calc(100% - 24px);
  min-height:40px;
  border-radius:22px;
  padding:10px 16px;
  background:#fffdf8ed;
  box-shadow:0 3px 14px #25292533;
  font-size:11px;
  font-weight:500;
  color:var(--fg);
  backdrop-filter:blur(10px)
}

.stage-hint svg {
  width:16px;
  height:16px;
  color:var(--accent)
}

.canvas-status {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:10px 4px 0;
  font-size:10px;
  color:var(--muted)
}

.mode {
  display:flex;
  align-items:center;
  gap:7px
}

.mode>i {
  display:block;
  width:5px;
  height:5px;
  border-radius:50%;
  background:#869774
}

.seam-count {
  display:flex;
  align-items:baseline;
  gap:6px
}

.seam-count b {
  font-size:13px;
  color:#535d4b;
  font-weight:500;
  font-variant-numeric:tabular-nums
}

.toolbox {
  min-width:0;
  max-width:300px;
  justify-self:end;
  width:100%
}

.toolbox-heading {
  margin-bottom:20px
}

.toolbox-heading h2 {
  font-family:"DM Serif",serif;
  font-size:25px;
  font-weight:400;
  line-height:1.25;
  margin:10px 0 0;
  letter-spacing:-.4px
}

.photos {
  display:grid;
  gap:10px
}

.pick {
  position:relative;
  display:flex;
  align-items:center;
  gap:14px;
  width:100%;
  min-height:90px;
  padding:9px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#faf9f570;
  cursor:pointer;
  transition:background .18s,border-color .18s,box-shadow .18s
}

.pick:hover {
  border-color:#b9beae;
  background:#fbfaf7;
  box-shadow:0 3px 9px #323b2010
}

.pick input {
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none
}

.photo-thumb {
  position:relative;
  display:block;
  width:62px;
  height:70px;
  flex:none;
  border-radius:5px;
  overflow:hidden;
  background:#d1d0c4
}

.photo-thumb img {
  width:100%;
  height:100%;
  object-fit:cover
}

.photo-number {
  position:absolute;
  left:5px;
  bottom:5px;
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:19px;
  height:18px;
  border-radius:3px;
  padding:2px 4px;
  background:#fdfbf0dc;
  color:#363d2f;
  font-size:8px;
  font-weight:600;
  font-variant-numeric:tabular-nums;
  backdrop-filter:blur(4px)
}

.photo-copy {
  display:flex;
  flex-direction:column;
  gap:7px;
  min-width:0
}

.photo-overline {
  font-size:7px;
  font-weight:600;
  letter-spacing:1.1px;
  color:#8b9082
}

.photo-copy strong {
  font-weight:600;
  font-size:15px;
  line-height:1.3
}

.replace-copy {
  display:flex;
  gap:10px;
  align-items:center;
  font-size:12px;
  color:var(--muted)
}

.replace-copy>span {
  color:#5b6c49;
  font-size:13px
}

.photo-note {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  margin:10px 0 16px;
  color:#7f8774;
  font-size:10px
}

.photo-note svg {
  width:12px;
  height:12px
}

.btn {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:46px;
  padding:10px 13px;
  border:1px solid #d9ddcf;
  border-radius:6px;
  background:transparent;
  color:var(--fg);
  cursor:pointer;
  font-size:13px;
  font-weight:500;
  transition:background .18s,color .18s,border-color .18s,box-shadow .18s
}

.btn:hover:not(:disabled) {
  background:#eaece2;
  border-color:#bbc2ac
}

.btn:active:not(:disabled) {
  transform:translateY(1px)
}

.tools-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px
}

.tool-btn {
  min-width:0;
  padding:10px 8px;
  font-size:12px;
  gap:6px
}

.tool-btn>svg {
  width:18px;
  height:18px
}

.tool-btn>small {
  color:#8b927f;
  font-size:8px;
  margin-left:auto
}

#cam[aria-pressed="true"] {
  background:#e9edde;
  border-color:#c3cdae
}

#cam[aria-pressed="true"] #cam-status {
  color:#536638
}

#sound .off,#del .on {
  display:none
}

#sound[aria-pressed="false"] .on,#del[aria-pressed="true"] .off {
  display:none
}

#sound[aria-pressed="false"] .off,#del[aria-pressed="true"] .on {
  display:block
}

.erase-btn {
  grid-column:1/-1;
  justify-content:flex-start;
  font-size:12px
}

.erase-btn svg {
  width:18px;
  height:18px
}

.toggle-dot {
  width:6px;
  height:6px;
  border-radius:50%;
  margin-left:auto;
  border:1px solid #bec5b2
}

#del[aria-pressed="true"] {
  color:var(--danger);
  border-color:#d1a39e;
  background:#f7eae5
}

#del[aria-pressed="true"] .toggle-dot {
  background:var(--danger);
  border-color:var(--danger)
}

.action-row {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:9px;
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid var(--line)
}

.share-btn {
  background:#303d2c;
  border-color:#303d2c;
  color:#f8f7ee
}

.share-btn:hover:not(:disabled) {
  background:#43503d;
  border-color:#43503d;
  box-shadow:0 3px 10px #303d2c1a
}

.restart-btn {
  color:var(--accent);
  background:#edf0f9;
  border-color:#cbd3ee
}

.restart-btn:hover:not(:disabled) {
  background:#e1e7fa;
  border-color:#a6b6ea
}

.restart-note {
  margin:11px 0 0;
  text-align:center;
  color:#79816e;
  font-size:11px
}

.toolbox-foot {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin-top:20px;
  color:#959b8b;
  font-family:"DM Serif",serif;
  font-size:12px;
  font-style:italic
}

.tiny-seam {
  width:17px;
  height:1px;
  border-top:1px dashed #939d84
}

.studio-footer {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-top:13px;
  border-top:1px solid var(--line);
  color:#959a8e;
  font-size:9px
}

.studio-footer>span:last-child {
  font-size:7px;
  letter-spacing:1.4px;
  display:flex;
  align-items:center;
  gap:10px
}

.studio-footer>span:last-child>span {
  font-size:14px;
  color:#849271
}

#cam-video {
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none
}

#unsupported {
  position:absolute;
  inset:0;
  margin:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  text-align:center;
  line-height:1.7;
  background:#ebe9e1;
  z-index:5
}

.toast {
  position:fixed;
  z-index:20;
  bottom:max(24px,env(safe-area-inset-bottom));
  left:50%;
  transform:translateX(-50%);
  max-width:calc(100% - 32px);
  width:max-content;
  padding:13px 19px;
  border-radius:8px;
  background:#303d2cf2;
  color:#fbfaf4;
  box-shadow:0 4px 20px #303d2c25;
  font-size:12px;
  pointer-events:none;
}

.modal {
  position:fixed;
  inset:0;
  z-index:30;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:#2228206b;
  backdrop-filter:blur(9px)
}

.panel {
  width:min(100%,410px);
  max-height:calc(100dvh - 48px);
  overflow-y:auto;
  padding:30px;
  border:1px solid #eeeee5;
  border-radius:14px;
  background:#faf9f5;
  box-shadow:0 32px 90px #202b2340;
  touch-action:pan-y
}

.panel h2 {
  font-family:"DM Serif",serif;
  font-size:38px;
  font-weight:400;
  letter-spacing:-.9px;
  line-height:1.15;
  margin:9px 0 15px
}

.modal-symbol {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  margin-bottom:23px;
  border:1px solid #dfe3d5;
  border-radius:12px;
  color:#697856;
  background:#eef0e5
}

.modal-symbol svg {
  width:25px;
  height:25px
}

#cam-text {
  margin:0;
  color:#767e6c;
  font-size:13px;
  line-height:1.8
}

.modal-note {
  margin:15px 0 23px;
  font-size:10px;
  color:#929987;
  line-height:1.7
}

.modal-actions {
  display:flex;
  gap:9px
}

.modal-actions .btn {
  flex:1;
  min-width:0;
  font-size:12px
}

.primary-btn {
  background:#303d2c;
  color:#fbfaf4;
  border-color:#303d2c
}

.primary-btn:hover:not(:disabled) {
  background:#47583d;
  border-color:#47583d
}

.secondary-btn {
  background:#f5f4ed
}

.share-panel {
  width:min(100%,440px);
  padding:24px
}

.share-heading {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px
}

.share-heading .eyebrow {
  font-size:7px;
  letter-spacing:1.2px
}

.share-heading h2 {
  font-size:32px;
  margin:5px 0 18px
}

.share-star {
  color:#8c9b78;
  font-size:30px
}

.share-image-mat {
  display:flex;
  justify-content:center;
  padding:10px;
  background:#efeee6;
  border:1px solid #e3e4d7;
  border-radius:4px
}

#share-img {
  display:block;
  width:100%;
  max-height:min(49dvh,450px);
  object-fit:contain
}

#share-text {
  color:#8c9380;
  white-space:pre-wrap;
  word-break:break-word;
  -webkit-user-select:text;
  user-select:text;
  font-size:9px;
  line-height:1.6;
  margin:14px 0 17px
}

@media(min-width:1100px) and (max-height:820px) {
  #app {
    padding-top:16px;
    padding-bottom:14px
  }
  .masthead {
    padding-bottom:10px
  }
  .workbench {
    padding:18px 0 14px
  }
  #stage {
    height:clamp(500px,calc(100dvh - 220px),600px)
  }
  .intro h1 {
    font-size:60px;
    margin-top:18px
  }
  .instructions {
    margin-top:24px;
    gap:17px
  }
  .intro-doodle {
    display:none
  }
  .toolbox-heading {
    margin-bottom:14px
  }
  .toolbox-heading h2 {
    font-size:23px
  }
  .pick {
    min-height:82px;
    padding:8px
  }
  .photo-thumb {
    height:64px;
    width:60px
  }
  .photo-note {
    margin:10px 0 17px
  }
  .toolbox-foot {
    margin-top:17px
  }
}

@media(max-width:1099px) and (min-width:701px) {
  #app {
    padding-inline:26px
  }
  .workbench {
    grid-template-columns:minmax(0,1fr) 240px;
    gap:24px;
    padding-top:20px
  }
  .intro {
    grid-column:1/-1;
    display:grid;
    grid-template-columns:1fr 1fr;
    align-items:center;
    gap:24px;
    padding:0
  }
  .intro .eyebrow {
    display:none
  }
  .intro h1>span,.intro h1>em {
    display:inline
  }
  .intro h1 {
    font-size:36px;
    margin:0;
    letter-spacing:-1.3px
  }
  .intro-copy {
    display:block;
    text-align:right;
    font-size:11px;
    line-height:1.6
  }
  .instructions,.keyboard-note,.intro-doodle {
    display:none
  }
  .photo-workspace {
    max-width:600px
  }
  #stage {
    height:clamp(400px,calc(100dvh - 310px),760px)
  }
  .toolbox {
    max-width:none
  }
  .toolbox-heading h2 {
    font-size:23px
  }
  .pick {
    gap:10px;
    padding:9px
  }
  .photo-thumb {
    width:54px;
    height:65px
  }
  .photo-copy strong {
    font-size:13px
  }
  .replace-copy {
    font-size:11px
  }
  .edition {
    display:none
  }
}

@media(max-width:700px) {
  #app {
    padding:max(17px,env(safe-area-inset-top)) 16px 110px
  }
  .masthead {
    min-height:44px;
    padding-bottom:14px;
    gap:12px
  }
  .brand {
    gap:8px
  }
  .brand-mark {
    width:24px;
    height:30px
  }
  .brand>span {
    font-size:17px;
    letter-spacing:-.5px
  }
  .brand small {
    font-size:6px;
    letter-spacing:1.2px
  }
  .edition {
    display:none
  }
  .home-link {
    gap:5px;
    font-size:9px
  }
  .home-link>span {
    font-size:16px
  }
  .workbench {
    display:flex;
    flex-direction:column;
    gap:18px;
    align-items:stretch;
    padding:18px 0 22px
  }
  .intro {
    display:block;
    padding:0;
    width:100%
  }
  .intro .eyebrow {
    display:none;
    font-size:7px;
    letter-spacing:1.3px
  }
  .intro .eyebrow>span {
    width:15px
  }
  .intro h1 {
    margin:0;
    font-size:clamp(30px,8.2vw,46px);
    line-height:1.1;
    letter-spacing:-1.15px
  }
  .intro h1>span,.intro h1>em {
    display:inline
  }
  .intro-copy {
    display:none;
    font-size:11px;
    line-height:1.6
  }
  .intro-copy br {
    display:none
  }
  .instructions,.keyboard-note,.intro-doodle {
    display:none
  }
  .canvas-caption {
    font-size:7px;
    letter-spacing:1px;
    margin:0 3px 8px
  }
  .photo-workspace {
    max-width:540px
  }
  .photo-mat {
    padding:9px
  }
  #stage {
    height:clamp(250px,calc(100dvh - 310px),620px)
  }
  .stage-hint {
    min-height:34px;
    padding:8px 12px;
    bottom:15px;
    font-size:10px
  }
  .canvas-status {
    padding-top:10px;
    font-size:9px
  }
  .seam-count b {
    font-size:11px
  }
  .toolbox {
    width:100%;
    max-width:540px;
    margin:0 auto;
    animation:none;
    translate:none
  }
  .toolbox-heading,.toolbox-foot {
    display:none
  }
  .photos {
    grid-template-columns:1fr 1fr;
    gap:9px
  }
  .pick {
    gap:9px;
    min-height:77px;
    padding:8px;
    border-radius:6px
  }
  .photo-thumb {
    width:42px;
    height:57px;
    border-radius:3px
  }
  .photo-copy {
    gap:5px
  }
  .photo-overline {
    font-size:6px;
    letter-spacing:.7px
  }
  .photo-copy strong {
    font-size:10px
  }
  .replace-copy {
    font-size:8px;
    gap:3px
  }
  .replace-copy>span {
    font-size:10px
  }
  .photo-number {
    height:14px;
    min-width:15px;
    font-size:6px;
    bottom:3px;
    left:3px
  }
  .photo-note {
    margin:10px 0 14px;
    font-size:8px
  }
  .tools-row {
    grid-template-columns:1fr 1fr 1fr;
    gap:8px
  }
  .tools-row .btn {
    min-height:44px;
    justify-content:center;
    font-size:12px;
    padding:9px 6px;
    gap:5px
  }
  .tool-btn>small,.toggle-dot,.desktop-only {
    display:none
  }
  .erase-btn {
    grid-column:auto
  }
  .action-row {
    position:fixed;
    left:16px;
    right:16px;
    bottom:max(16px,env(safe-area-inset-bottom));
    z-index:12;
    margin:0;
    padding:8px;
    gap:8px;
    border:1px solid #ddded4;
    border-radius:10px;
    background:#f9f8f2f5;
    box-shadow:0 4px 24px #303d2c20;
    backdrop-filter:blur(12px)
  }
  .action-row .btn {
    min-height:46px;
    font-size:13px
  }
  .restart-note {
    margin-top:12px;
    font-size:9px
  }
  .toast {
    bottom:108px
  }
  .studio-footer {
    display:none;
    padding-top:13px;
    font-size:7px
  }
  .studio-footer>span:first-child {
    display:none
  }
  .studio-footer>span:last-child {
    width:100%;
    justify-content:center;
    font-size:6px;
    gap:9px
  }
  .studio-footer>span:last-child>span {
    font-size:12px
  }
  .modal {
    padding:18px
  }
  .panel {
    padding:25px;
    max-height:calc(100dvh - 36px)
  }
  .share-panel {
    padding:20px
  }
}

@media(max-width:360px) {
  #app {
    padding-inline:12px
  }
  .home-link {
    font-size:8px
  }
  .intro h1 {
    font-size:30px
  }
  .workbench {
    gap:18px;
    padding-top:16px
  }
  .canvas-caption>span:last-child {
    font-size:6px
  }
  .pick {
    padding:7px;
    gap:7px
  }
  .photo-thumb {
    width:35px;
    height:54px
  }
  .photo-copy strong {
    font-size:9px
  }
  .replace-copy {
    font-size:7px
  }
  .photo-note {
    margin-bottom:12px
  }
}

@media(prefers-reduced-motion:no-preference) {
  .intro,.photo-workspace,.toolbox {
    animation:arrive .55s ease-out both
  }
  .photo-workspace {
    animation-delay:.07s
  }
  .toolbox {
    animation-delay:.14s
  }
  .modal .panel {
    animation:dialog-arrive .2s ease-out both
  }
  @keyframes arrive {
    from {
      opacity:0;
      translate:0 7px
    }
    to {
      opacity:1;
      translate:none
    }
  }
  @keyframes dialog-arrive {
    from {
      opacity:0;
      transform:translateY(7px)
    }
    to {
      opacity:1;
      transform:translateY(0)
    }
  }
}

@media(max-width:700px) and (max-height:650px) {
  #app {
    padding-top:max(12px,env(safe-area-inset-top))
  }
  .masthead {
    padding-bottom:10px
  }
  .workbench {
    padding-top:14px;
    gap:14px
  }
  #stage {
    height:clamp(250px,calc(100dvh - 280px),370px)
  }
  .stage-hint {
    bottom:12px
  }
}

@media(max-width:700px) {
  .toolbox {
    animation:none;
    translate:none
  }
}
