body.pottery-studio {
  margin: 0; overflow: hidden; color: #edf0de;
  background: #39483b; font-family: ui-rounded, "Avenir Next", system-ui, sans-serif;
  -webkit-user-select: none; user-select: none;
}
.pottery-studio .studio {
  height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto;
  background: radial-gradient(ellipse at 18% 30%, #7c8466 0, #465841 38%, #263b32 100%);
}
.pottery-studio .studio-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}
.pottery-studio .studio-title { font-size: 20px; font-weight: 600; margin: 0; letter-spacing: -.5px; }
.pottery-studio .studio-header-actions { display: flex; gap: 8px; }
.pottery-studio .studio-button {
  appearance: none; box-sizing: border-box; border: 1px solid #e5edce55;
  color: inherit; background: #253b3288; border-radius: 50%; width: 56px; height: 56px;
  min-width: 56px; min-height: 56px; padding: 0; display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer; touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.pottery-studio .studio-button svg { width: 27px; height: 27px; }
.pottery-studio .studio-button:active { transform: scale(.96); }
.pottery-studio .studio-button:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
.pottery-studio .studio-button[aria-pressed="true"] { background: #edf0de; color: #304738; border-color: #edf0de; }
.pottery-studio .studio-button:disabled { opacity: .3; cursor: default; }
.pottery-studio .studio-viewport { min-height: 0; position: relative; overflow: hidden; }
.pottery-studio canvas.stage { display: block; position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.pottery-studio canvas.stage:active { cursor: grabbing; }
.pottery-studio .studio-footer { padding: 0 16px max(18px, env(safe-area-inset-bottom)); text-align: center; }
.pottery-studio .studio-stages { display: flex; justify-content: center; align-items: center; gap: 20px; margin-bottom: 12px; }
.pottery-studio .studio-step { opacity: .35; display: flex; }
.pottery-studio .studio-step svg { width: 18px; height: 18px; }
.pottery-studio .studio-step.active { opacity: 1; color: #fffde9; }
.pottery-studio .studio-hint { margin: 0 0 14px; min-height: 24px; font-size: 16px; color: #edf0de; }
.pottery-studio .studio-tools { display: flex; align-items: center; justify-content: center; gap: 14px; }
.pottery-studio .studio-tool { display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 12px; }
.pottery-studio .studio-tool .studio-button { width: 56px; height: 56px; box-shadow: 0 4px 12px #10221938; }
.pottery-studio .studio-tool span { opacity: .8; }
.pottery-studio .studio-gesture {
  position: absolute; pointer-events: none; border: 2px solid #f5f2d9b0; border-radius: 50%;
  width: 46px; height: 46px; margin: -23px; box-shadow: 0 0 0 7px #f5f2d912;
}
.pottery-studio .studio-guide { position: absolute; pointer-events: none; color: #ffffec; display: flex; gap: 15px; align-items: center; }
.pottery-studio .studio-guide svg { width: 28px; height: 28px; filter: drop-shadow(0 1px 3px #192c24); }
.pottery-studio .studio-guide { animation: studio-invite 2s ease-in-out infinite; }
.pottery-studio .studio-grow { gap: 0; animation: studio-rise 2s ease-in-out infinite; }
.pottery-studio .studio-guide[hidden], .pottery-studio .studio-gesture[hidden] { display: none; }
@keyframes studio-invite { 0%,100% { transform: translateX(-6px); opacity: .7; } 50% { transform: translateX(6px); opacity: 1; } }
@keyframes studio-rise { 0%,100% { transform: translateY(4px); opacity: .7; } 50% { transform: translateY(-4px); opacity: 1; } }
@media (max-width: 360px) {
  .pottery-studio .studio-header { gap: 8px; padding-inline: 12px; }
  .pottery-studio .studio-title { font-size: 16px; }
  .pottery-studio .studio-tools { gap: 6px; }
  .pottery-studio .studio-footer { padding-inline: 8px; }
  .pottery-studio .studio-tool .studio-button { width: 56px; height: 56px; }
}
@media (min-width: 700px) and (min-height: 650px) {
  .pottery-studio .studio-header { padding: 22px 30px 0; }
  .pottery-studio .studio-title { font-size: 24px; }
  .pottery-studio .studio-footer { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
}
@media (max-height: 520px) and (min-width: 580px) {
  .pottery-studio .studio { grid-template-columns: minmax(0, 1fr) 274px; grid-template-rows: 68px minmax(0, 1fr); }
  .pottery-studio .studio-header { grid-column: 1 / -1; padding-top: 6px; }
  .pottery-studio .studio-footer { display: flex; flex-direction: column; justify-content: flex-start; padding: 10px 8px; overflow-y: auto; }
  .pottery-studio .studio-tools { flex-wrap: wrap; gap: 12px; }
  .pottery-studio .studio-hint { font-size: 14px; }
  .pottery-studio .studio-tool .studio-button { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) { .pottery-studio .studio-guide { animation: none; } }

.pottery-studio .studio-tools { gap: 8px; flex-wrap: wrap; }
.pottery-studio[data-phase="shape"] .studio-tools { max-width: 600px; }
.pottery-studio[data-phase="view"] canvas.stage { cursor: move; }
.pottery-studio[data-phase="view"] .studio-stages { opacity: .45; }
.pottery-studio .studio-trays { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pottery-studio .studio-primary { background: #edf0de; color: #304738; border-color: #edf0de; }
.pottery-studio .studio-palette { display: flex; gap: 8px; width: 100%; max-width: 600px; overflow-x: auto; padding: 5px 4px 8px; scrollbar-width: thin; }
.pottery-studio .studio-colour { flex: 0 0 56px; border: 3px solid #eef2db45; }
.pottery-studio .studio-colour[aria-pressed="true"] { border-color: #fff; outline: 2px solid #fff; outline-offset: 2px; box-shadow: inset 0 0 0 3px #263b3280; }
.pottery-studio .studio-patterns { display: flex; gap: 8px; justify-content: center; }
.pottery-studio .studio-gesture.painting { border-color: var(--paint); background: color-mix(in srgb, var(--paint) 25%, transparent); }
.pottery-studio .studio-footer { flex-shrink: 0; max-height: 100%; overflow-y: auto; }
.pottery-studio[data-phase="paint"] .studio-hint { margin-bottom: 4px; }
.pottery-studio .studio-kiln { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 120px 18px #e98a39; background: radial-gradient(ellipse at 50% 65%, #ffd79060, #cf571726); animation: studio-fire 2.2s ease-in-out; }
.pottery-studio .studio-kiln[hidden] { display: none; }
@keyframes studio-fire { 0%,100% { opacity: .15; } 50% { opacity: 1; } }
.pottery-studio .studio-shelf { color: #edf0de; background: #304638; border: 1px solid #edf0de50; border-radius: 24px; padding: 16px; width: min(720px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overscroll-behavior: contain; }
.pottery-studio .studio-shelf::backdrop { background: #172e22aa; backdrop-filter: blur(7px); }
.pottery-studio .studio-shelf-header { position: sticky; top: -16px; z-index: 1; display: flex; align-items: center; justify-content: space-between; background: #304638; padding: 8px 0 12px; }
.pottery-studio .studio-shelf h2 { font-size: 24px; font-weight: 600; margin: 0; }
.pottery-studio .studio-shelf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.pottery-studio .studio-pot-card { color: #edf0de; background: #39483b; padding: 0; border: 1px solid #edf0de55; border-radius: 14px; overflow: hidden; cursor: pointer; min-width: 56px; min-height: 56px; }
.pottery-studio .studio-pot-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; }
.pottery-studio .studio-pot-card span { display: block; font: inherit; padding-bottom: 8px; }
.pottery-studio .studio-pot-card:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.pottery-studio .studio-shelf-empty { text-align: center; margin: 24px 0; }
@media (max-width: 360px) { .pottery-studio .studio-tools { gap: 6px; } }
@media (max-width: 460px) {
  .pottery-studio[data-phase="shape"] .studio-tools { display: grid; grid-template-columns: repeat(3, 64px); column-gap: 20px; row-gap: 10px; }
  .pottery-studio .studio-header { padding-top: max(8px, env(safe-area-inset-top)); }
  .pottery-studio .studio-title { font-size: 18px; }
  .pottery-studio .studio-hint { font-size: 14px; margin-bottom: 10px; }
  .pottery-studio .studio-stages { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { .pottery-studio .studio-kiln { animation: none; } }

.pottery-studio .studio-goal { display: flex; align-items: center; gap: 10px; width: min(100%, 590px); margin: 0 auto 14px; padding: 10px 0; border-top: 1px solid #e5edce35; border-bottom: 1px solid #e5edce35; text-align: left; }
.pottery-studio .studio-reference { display: flex; flex-direction: column; align-items: center; font-size: 11px; color: #edf0dec0; }
.pottery-studio .studio-reference-button { width: 78px; height: 92px; border-radius: 14px; background: #203d3080; }
.pottery-studio .studio-reference-button .studio-target { width: 76px; height: 88px; }
.pottery-studio .target-shape { fill: #e7e9cc; stroke: #e7e9cc; stroke-width: 1.5; }
.pottery-studio .your-shape { fill: none; stroke: #efba63; stroke-width: 2; stroke-dasharray: 4 3; }
.pottery-studio .studio-goal-detail { flex: 1; min-width: 0; }
.pottery-studio .studio-goal-title { display: flex; align-items: center; gap: 6px; font-size: 17px; font-weight: 600; }
.pottery-studio .studio-goal-title svg { width: 18px; height: 18px; color: #c3eab3; }
.pottery-studio .studio-target-key { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 6px 0; font-size: 11px; color: #e7e9cc; }
.pottery-studio .studio-target-key span:last-child { color: #efba63; }
.pottery-studio .studio-goal-result { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; min-height: 32px; font-size: 12px; }
.pottery-studio .studio-goal-result svg { width: 20px; height: 20px; color: #efba63; }
.pottery-studio .studio-goal-result strong { font-size: 21px; font-variant-numeric: tabular-nums; }
.pottery-studio .studio-goal-result.passed { color: #c3eab3; }
.pottery-studio .studio-goal-result.passed svg { color: inherit; }
.pottery-studio .studio-match-lights { display: flex; align-items: center; gap: 5px; margin-top: 6px; }
.pottery-studio .studio-match-lights > span { width: 9px; height: 9px; border-radius: 50%; background: #edf0de35; }
.pottery-studio .studio-match-lights > .matched { background: #c3eab3; }
.pottery-studio .studio-match-lights > .needs-work { outline: 2px solid #efba63; outline-offset: 2px; }
.pottery-studio .studio-match-lights > .height-light { display: flex; margin-left: 4px; width: 16px; height: 16px; border-radius: 3px; }
.pottery-studio .height-light svg { width: 16px; height: 16px; }
.pottery-studio .studio-goal-actions { display: grid; grid-template-columns: 56px 56px; gap: 8px; }
.pottery-studio .studio-goal-actions .studio-tool { gap: 3px; }
.pottery-studio .studio-goal-actions .studio-tool:last-child:nth-child(3) { grid-column: 2; }
.pottery-studio .studio-goal.free { border: 0; padding: 0; margin-bottom: 10px; justify-content: center; }
.pottery-studio .studio-goal.free > button { width: 56px; height: 56px; }
.pottery-studio .studio-free-label { font-size: 13px; }
.pottery-studio .studio-challenge-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pottery-studio .studio-challenge-card { width: 100%; height: 170px; border-radius: 14px; display: flex; flex-direction: column; gap: 6px; font: inherit; font-size: 12px; }
.pottery-studio .studio-challenge-card > svg:first-child { width: 80px; height: 105px; }
.pottery-studio .studio-challenge-card > svg:last-child { width: 18px; height: 18px; }
@media (max-width: 360px) {
  .pottery-studio .studio-goal { gap: 7px; }
  .pottery-studio .studio-reference-button { width: 60px; }
  .pottery-studio .studio-goal-title { font-size: 14px; }
  .pottery-studio .studio-goal-result { font-size: 11px; }
}
@media (max-height: 520px) and (min-width: 580px) {
  .pottery-studio .studio-goal { display: grid; grid-template-columns: 70px minmax(0, 1fr); margin-bottom: 12px; }
  .pottery-studio .studio-goal-actions { display: flex; grid-column: 1 / -1; justify-content: center; }
}
