* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f0efe7;
  color: #293c34;
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 100px;
  min-height: 100dvh;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
#app {
  width: 420px;
  height: min(900px, calc(100dvh - 48px));
  min-height: 540px;
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  box-shadow: 0 25px 80px #344c3020;
  background: #faf8f2;
  touch-action: none;
}
canvas {
  display: block;
}
#actions {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.canvas-action {
  position: absolute;
  background: none;
  color: transparent;
  border: 0;
  border-radius: 14px;
  pointer-events: auto;
}
.canvas-action:hover {
  background: #30563a06;
}
.canvas-action:focus-visible {
  outline: 2px solid #2d7259;
  outline-offset: -2px;
}
.intro {
  width: 370px;
  position: relative;
}
.brand-mark {
  font-size: 42px;
  color: #d5a24b;
  margin-bottom: 38px;
}
.overline {
  letter-spacing: 3px;
  font-size: 10px;
  color: #7b897b;
}
.intro h1 {
  font-size: 43px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 2px;
  margin: 20px 0;
}
.intro p {
  color: #889188;
  font-size: 14px;
  line-height: 2.2;
}
.intro-rule {
  width: 34px;
  height: 2px;
  background: #c4cbb8;
  margin-top: 36px;
}
.intro-caption {
  font-size: 11px;
  letter-spacing: 3px;
  color: #7b897b;
  margin-top: 18px;
}
.sprout {
  height: 100px;
  width: 100px;
  position: absolute;
  right: 30px;
  bottom: -30px;
  transform: rotate(15deg);
}
.sprout i {
  position: absolute;
  left: 50px;
  bottom: 0;
  width: 2px;
  height: 65px;
  background: #a8b69a;
}
.sprout i:nth-child(2) {
  width: 25px;
  height: 43px;
  border-radius: 2px 35px 2px 35px;
  left: 25px;
  bottom: 25px;
  transform: rotate(-12deg);
  background: #c4ceb3;
}
.sprout i:nth-child(3) {
  width: 25px;
  height: 42px;
  border-radius: 35px 2px 35px 2px;
  left: 51px;
  bottom: 39px;
  background: #b0be9f;
}
.sheet {
  border: 0;
  padding: 28px;
  border-radius: 26px;
  width: min(440px, calc(100vw - 28px));
  max-height: 88dvh;
  color: #293c34;
  background: #faf8f2;
  box-shadow: 0 25px 100px #1e36224a;
}
.sheet::backdrop {
  background: #233a335e;
  backdrop-filter: blur(5px);
}
.sheet-head {
  position: relative;
  margin-bottom: 22px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  color: #9ba48f;
  margin-bottom: 14px;
}
.sheet h2 {
  font-size: 24px;
  margin: 0 24px 10px 0;
  font-weight: 600;
}
.subtitle {
  font-size: 12px;
  color: #879184;
  line-height: 1.9;
  white-space: pre-line;
  margin: 0;
}
.close {
  position: absolute;
  right: -8px;
  top: -10px;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ebece3;
  color: #7a877a;
  font-size: 23px;
}
.field {
  display: block;
  margin: 17px 0;
}
.label-text {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 9px;
}
input,
select,
textarea {
  width: 100%;
  background: #fff;
  border: 1px solid #e5e7dc;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 14px;
  color: #293c34;
  outline: none;
}
input:focus,
textarea:focus,
select:focus {
  border-color: #79a389;
  box-shadow: 0 0 0 3px #e0eadc;
}
textarea {
  resize: vertical;
  min-height: 85px;
  line-height: 1.8;
}
.primary {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 15px;
  background: #2d7259;
  color: #fff;
  font-weight: 600;
  margin-top: 8px;
}
.primary:disabled {
  opacity: 0.5;
}
.error {
  color: #ad674f;
  font-size: 12px;
  line-height: 1.7;
}
.photo-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.photo-thumb {
  width: 72px;
  height: 72px;
  position: relative;
}
.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}
.remove-photo {
  position: absolute;
  right: -4px;
  top: -4px;
  background: #293c34;
  color: white;
  border: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
}
input[type="file"] {
  font-size: 11px;
  padding: 9px;
}
.record-status {
  text-align: center;
  color: #879184;
  margin: 30px 0;
  font-size: 14px;
}
.record-button {
  display: block;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 8px solid #e0eadb;
  background: #2d7259;
  color: white;
  margin: 24px auto;
  font-size: 14px;
  box-shadow: 0 0 0 12px #eef0e6;
}
.recording {
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 22px #e0eadb66;
  }
}
@media (max-width: 850px) {
  .intro {
    display: none;
  }
  body {
    background: #faf8f2;
  }
  #app {
    height: 100dvh;
    min-height: 0;
    width: min(100vw, 460px);
    border-radius: 0;
    box-shadow: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
  }
}

/* Cozy toybox visual language shared by Browser, iOS and Android. */
body {
  background:
    radial-gradient(ellipse at 18% 20%, #fff3cf 0, transparent 50%), #dceadf;
  color: #344f44;
}
#app {
  background: #dfeee1;
  border: 6px solid #fff8e8;
  box-shadow:
    0 10px 0 #d6ceb7,
    0 30px 80px #3e665327;
  border-radius: 40px;
}
.brand-mark {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 20px;
}
.intro h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.55;
}
.intro p {
  color: #6e8679;
}
.desktop-friends {
  width: 150px;
  height: 150px;
  object-fit: contain;
  position: absolute;
  right: -30px;
  bottom: -90px;
  transform: rotate(9deg);
}
.sheet {
  background: #fff9e9;
  border: 3px solid #fffdf7;
  border-radius: 30px;
  box-shadow:
    0 7px 0 #d1bda1,
    0 24px 80px #254d4650;
}
.sheet h2 {
  font-weight: 800;
  color: #344f44;
}
.eyebrow {
  color: #b0884a;
  font-weight: 700;
}
.primary {
  background: #357c6d;
  box-shadow: 0 4px 0 #245a50;
  border: 1px solid #74a397;
  border-radius: 18px;
  font-weight: 700;
}
.close {
  background: #f2d1af;
  color: #78533c;
  box-shadow: 0 2px 0 #d6b28f;
}
input,
select,
textarea {
  background: #fffef7;
  border: 2px solid #e5ddc5;
  border-radius: 15px;
}
.record-button {
  background: #efaa8c;
  border: 7px solid #ffe6c5;
  box-shadow: 0 0 0 10px #f5d2b6;
  color: #673e30;
  font-weight: 700;
}
.native .intro {
  display: none;
}
.native #app {
  width: 100vw;
  height: 100dvh;
  max-width: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
@media (max-width: 850px) {
  #app {
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  body {
    background: #dfeee1;
  }
}
/* 16px avoids iOS focus zoom and keeps the keyboard from shifting hit targets. */
input,
select,
textarea {
  font-size: 16px;
}
input[type="file"]::file-selector-button {
  border: 0;
  background: #e4eddd;
  color: #357c6d;
  padding: 10px 12px;
  border-radius: 10px;
  font: inherit;
  margin-right: 10px;
}

/* Direction 05: original SVG art, deep green outlines and sunny flat colors. */
body {background: radial-gradient(ellipse at 10% 20%,#E7F6BA,transparent 48%),#A7EBDD;color:#064E47;}
#app {background:#A7EBDD;border:3px solid #07574E;box-shadow:0 8px 0 #60B6A0,0 28px 65px #07574e20;border-radius:34px;}
.intro h1 {color:#064E47;font-weight:850;line-height:1.5;}.intro p{color:#42796A}.intro-rule{background:#07574E}.intro-caption,.overline{color:#42796A}
.brand-mark{width:78px;height:78px}.desktop-friends{width:158px;height:158px}.sheet{background:#FFF9E5;border:2.5px solid #07574E;border-radius:28px;box-shadow:0 7px 0 #65BDA7,0 24px 70px #07574e44;padding:24px}.sheet h2{color:#064E47}.eyebrow{color:#388871}.subtitle{color:#537C69}.close{background:#FFD34D;color:#064E47;border:2px solid #07574E;box-shadow:0 2px 0 #C99C39;display:flex;align-items:center;justify-content:center;line-height:1}.primary{background:#FFD34D;border:2px solid #07574E;color:#064E47;box-shadow:0 4px 0 #65BDA7;border-radius:22px;font-size:16px;font-weight:800}.primary:hover{background:#FFE278}.primary:active{transform:translateY(2px);box-shadow:0 2px 0 #65BDA7}.label-text{color:#07574E;font-size:13px}input,select,textarea{border:2px solid #89BCA6;background:#FFFEF5;border-radius:14px;color:#064E47}input:focus,select:focus,textarea:focus{border-color:#07574E;box-shadow:0 0 0 3px #BEECDC}.record-button{background:#FFAC93;border:3px solid #07574E;box-shadow:0 0 0 12px #FFE1B8;color:#643D30}.error{color:#AF482E}
.choice-category{font-size:12px;font-weight:750;margin:16px 0 10px;color:#588671}.visual-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.visual-choice{position:relative;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:5px;padding:8px 2px;border:2px solid #BCD5B7;border-radius:17px;background:#FFFEF4;color:#07574E;font-size:11px;min-width:0;transition:background .15s,transform .15s}.visual-choice img{width:58px;height:58px;max-width:100%;object-fit:contain}.visual-choice[aria-pressed=true]{background:#FFE481;border-color:#07574E;box-shadow:0 3px 0 #60B59D}.visual-choice[aria-pressed=true]::after{content:'✓';position:absolute;right:3px;top:2px;font-size:11px;font-weight:900;background:#07574E;color:white;width:17px;height:17px;line-height:17px;border-radius:50%}.visual-choice:hover{transform:translateY(-2px);border-color:#07574E}.visual-choice:focus-visible{outline:3px solid #D99628;outline-offset:2px}
@media(max-width:850px){body{background:#A7EBDD}#app{border:0;border-radius:0;box-shadow:none}}
@media(prefers-reduced-motion:reduce){.visual-choice{transition:none}}
/* Keep submit reachable in tall forms, including short native WebView viewports. */
.sheet[open]{display:flex;flex-direction:column;overflow:hidden;}
.sheet-head{flex-shrink:0;}
.sheet form{min-height:0;overflow-y:auto;padding:0 3px 6px;overscroll-behavior:contain;}
.sheet form>.primary{position:sticky;bottom:0;z-index:2;}
