:root{
  color:#17231a;
  --green-900:#163f2b;--green-700:#1f6f49;--green-600:#1f8f5f;--green-100:#dceee0;--green-050:#eef7ed;
  --red-600:#d14343;--gray-900:#202326;--gray-700:#4b5357;--gray-500:#7a858b;--gray-200:#e3e9e2;--gray-100:#f1f5ef;
  --shadow:0 16px 36px #183c261a;
  background:#f8fbf7;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
}
*{box-sizing:border-box}
html{background:#f8fbf7;min-height:100%}
body{
  min-width:320px;min-height:100%;color:var(--gray-900);margin:0;
  background:
    linear-gradient(#fffffff0,#f8fbf7f5),
    url("data:image/svg+xml,%3Csvg width='140' height='140' viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%239cc89f' stroke-opacity='.25' stroke-width='4'%3E%3Cellipse cx='70' cy='70' rx='46' ry='58'/%3E%3Cpath d='M44 20c20 20 31 74 13 101M72 12c-12 26-10 80 4 116M96 22c-18 28-22 69-8 98'/%3E%3C/g%3E%3C/svg%3E");
}
button,input,select,textarea{font:inherit}
button{-webkit-tap-highlight-color:transparent}
[hidden]{display:none!important}

.hero{
  position:relative;width:100%;min-height:100vh;overflow:hidden;
  display:flex;align-items:center;justify-content:center;
  padding:64px 20px 48px;
  background:radial-gradient(120% 100% at 50% -10%,#1c5b3c 0%,#123c28 45%,#0c2a1c 100%);
  font-family:"Noto Sans KR",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
}
.hero-slice{position:absolute;top:-14%;right:-18%;width:min(70vw,560px);height:auto;opacity:.9;pointer-events:none;filter:drop-shadow(0 30px 60px #00000055)}
.hero-inner{position:relative;z-index:1;width:100%;max-width:560px;color:#fdf6e3}
.hero .eyebrow{color:#ffd166;letter-spacing:.14em;font-size:12px;font-weight:700}
.hero h1{
  font-family:"Black Han Sans","Noto Sans KR",sans-serif;
  font-weight:400;font-size:clamp(34px,7vw,54px);line-height:1.18;
  margin-top:14px;color:#fdf6e3;text-shadow:0 8px 30px #00000040;
}
.hero h1 em{font-style:normal;color:#ff6b81}
.hero-lead{margin-top:16px;max-width:420px;color:#cfe4d6;font-size:15px;line-height:1.65}

.hero-steps{list-style:none;margin:32px 0 0;padding:0;display:grid;gap:10px;max-width:420px}
.hero-steps li{display:flex;align-items:center;gap:14px;background:#ffffff12;border:1px solid #ffffff1f;border-radius:12px;padding:12px 16px;backdrop-filter:blur(2px)}
.hero-step-num{font-family:"Black Han Sans",sans-serif;font-size:20px;color:#ffd166;flex:none;width:34px}
.hero-steps strong{display:block;color:#fdf6e3;font-size:14px;font-weight:700}
.hero-steps span{display:block;color:#a9c4b3;font-size:12.5px;margin-top:2px}

.hero-cta{
  position:relative;margin-top:34px;padding:18px 40px;border:0;border-radius:999px;
  background:linear-gradient(135deg,#ff6b81,#e6435c);color:#fff;
  font-family:"Black Han Sans",sans-serif;font-size:18px;letter-spacing:.02em;
  cursor:pointer;box-shadow:0 18px 34px #e6435c4d;
  transition:transform .15s ease,box-shadow .15s ease;
}
.hero-cta:hover{transform:translateY(-2px);box-shadow:0 22px 40px #e6435c66}
.hero-cta:active{transform:translateY(0)}
.hero-cta-ring{position:absolute;inset:-6px;border:2px solid #ff6b8155;border-radius:999px;animation:cta-pulse 2.4s ease-out infinite}
@keyframes cta-pulse{0%{opacity:.9;transform:scale(.96)}70%{opacity:0}100%{opacity:0;transform:scale(1.12)}}

@media (max-width:560px){
  .hero-slice{top:-8%;right:-30%;width:80vw}
}
@media (prefers-reduced-motion:reduce){
  .hero-cta-ring{animation:none;display:none}
}

.app-shell{width:100%;max-width:980px;padding:max(18px,env(safe-area-inset-top)) 16px max(26px,env(safe-area-inset-bottom));display:grid;grid-template-columns:minmax(0,1fr);gap:18px;margin:0 auto}
.measure-panel,.result-panel{min-width:0;max-width:100%;box-shadow:var(--shadow);background:#ffffffeb;border:1px solid #1f6f491f;border-radius:8px;padding:20px}
.eyebrow,.step{min-height:24px;color:var(--green-700);align-items:center;font-size:12px;font-weight:800;display:inline-flex}
h1,h2,h3,p{margin:0}
h1{font-size:34px;line-height:1.14;margin-top:4px}
h2{font-size:21px;line-height:1.25}
h3{font-size:15px;line-height:1.35}
.lead{color:var(--gray-700);margin-top:10px;font-size:15px;line-height:1.55}
.record-section,.optional-grid,.result-panel{margin-top:18px}
.section-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.section-head.compact{margin-bottom:10px}
.state-pill{background:var(--gray-100);color:var(--gray-700);border-radius:999px;flex:none;padding:7px 10px;font-size:12px;font-weight:750}
.state-pill.live{color:#b82b2b;background:#fee7e7}
.state-pill.done{background:var(--green-100);color:var(--green-700)}

.record-button{aspect-ratio:1;color:#fff;touch-action:none;cursor:pointer;background:linear-gradient(145deg,#2fb268,#176943);border:0;border-radius:50%;display:grid;place-items:center;width:188px;margin:20px auto 14px;position:relative;box-shadow:0 18px 40px #1f8f5f42}
.record-button:disabled{opacity:.55;cursor:not-allowed}
.record-button.recording{background:linear-gradient(145deg,#e14d4d,#aa2424);box-shadow:0 18px 42px #d143434d}
.record-ring{aspect-ratio:1;background:#ffffff42;border:9px solid #ffffffb3;border-radius:50%;width:76px}
.record-button.recording .record-ring{border-radius:18px;width:64px;animation:pulse 1s ease-in-out infinite}
.record-text{font-size:14px;font-weight:800;position:absolute;bottom:30px}
.record-meter{display:flex;justify-content:center;align-items:center;gap:4px;height:64px;padding:0 6px;overflow:hidden}
.record-meter span{background:linear-gradient(#2fb268,#1f6f49);border-radius:999px;width:5px;min-height:8px;transition:height 80ms linear}
.record-meta{color:var(--gray-700);flex-wrap:wrap;justify-content:center;gap:8px;font-size:13px;display:flex}
.record-meta strong,.record-meta span{background:var(--gray-100);border-radius:999px;align-items:center;min-height:28px;padding:5px 10px;display:inline-flex}
.helper-text{color:var(--gray-700);text-align:center;margin-top:10px;font-size:13px;line-height:1.5}
.inline-actions{display:flex;justify-content:center;align-items:center;gap:8px;margin-top:8px}
.text-button{color:var(--green-700);cursor:pointer;background:0 0;border:0;padding:8px;font-size:13px;font-weight:750}
.text-button.danger{color:var(--red-600)}
.hidden-input{display:none}

.image-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:100%;min-width:0}
.image-slot{min-width:0}
.image-button{aspect-ratio:1;background:var(--green-050);cursor:pointer;border:1px solid #1f6f4929;border-radius:8px;width:100%;min-width:0;padding:0;overflow:hidden}
.image-button img{object-fit:cover;width:100%;height:100%;display:block}
.image-empty{height:100%;color:var(--green-700);display:grid;place-items:center;font-size:30px;position:relative}
.image-empty-copy{text-align:left;background:#ffffffe6;border-radius:6px;gap:2px;max-width:calc(100% - 16px);padding:5px 7px;display:grid;position:absolute;top:8px;left:8px}
.image-empty-copy strong{color:var(--green-900);font-size:12px;line-height:1.1}
.image-empty-copy small{color:var(--gray-700);font-size:10px;line-height:1.2}
.slot-actions{min-width:0;min-height:32px;color:var(--gray-500);display:flex;justify-content:space-between;align-items:center;gap:4px;font-size:11px}
.slot-actions span{overflow-wrap:anywhere;min-width:0;line-height:1.25}

.weight-field{background:var(--gray-100);border-radius:8px;display:grid;grid-template-columns:minmax(0,1fr) 120px auto;align-items:center;gap:10px;margin-top:14px;padding:14px}
.weight-field span{gap:2px;min-width:0;display:grid}
.weight-field small{color:var(--gray-500);font-size:12px}
.weight-field input,.feedback-form input,.feedback-form select,.feedback-form textarea{border:1px solid var(--gray-200);width:100%;color:var(--gray-900);background:#fff;border-radius:8px;outline:none;padding:11px 12px}
.weight-field input:focus,.feedback-form input:focus,.feedback-form select:focus,.feedback-form textarea:focus{border-color:var(--green-600);box-shadow:0 0 0 3px #1f8f5f24}
.weight-field em{color:var(--gray-700);font-style:normal}

.error-box{color:#a62323;background:#fff1f1;border-radius:8px;margin-top:12px;padding:12px 14px;font-size:14px;line-height:1.45}
.analyze-button,.feedback-form button{background:var(--green-600);color:#fff;cursor:pointer;border:0;border-radius:8px;width:100%;min-height:54px;margin-top:14px;font-size:16px;font-weight:850;box-shadow:0 12px 24px #1f8f5f33}
.analyze-button:disabled,.feedback-form button:disabled{box-shadow:none;cursor:not-allowed;background:#b9c8b7}

.result-panel{display:grid;gap:12px;scroll-margin-top:14px}
.result-visual{aspect-ratio:4/3;width:100%;min-width:0;max-width:280px;margin:0 auto;display:grid;place-items:center}
.watermelon-gauge{position:relative;width:100%;max-width:220px;aspect-ratio:1}
.watermelon-gauge svg{width:100%;height:100%;transform:rotate(-90deg)}
.gauge-track{fill:none;stroke:var(--gray-200);stroke-width:10}
.gauge-fill{fill:none;stroke:var(--green-600);stroke-width:10;stroke-linecap:round;stroke-dasharray:326.7;stroke-dashoffset:326.7;transition:stroke-dashoffset .6s ease}
.gauge-emoji{position:absolute;inset:0;display:grid;place-items:center;font-size:56px}
.result-copy{text-align:center}
.result-copy h2{min-height:54px;color:var(--green-900);display:flex;justify-content:center;align-items:baseline;gap:4px;margin-top:2px;font-size:42px}
.result-score-number{font-size:48px;font-weight:900;line-height:1.05}
.result-score-unit{font-size:27px;font-weight:850;line-height:1.1}
.result-copy p{color:var(--gray-700);word-break:keep-all;margin-top:6px;line-height:1.5}

.photo-correction-strip{background:var(--gray-100);border-radius:8px;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px;padding:10px}
.photo-correction-label{color:var(--gray-700);white-space:nowrap;font-size:12px;font-weight:800}
.photo-status-list{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;min-width:0}
.photo-status-chip{border:1px solid var(--gray-200);min-width:0;min-height:34px;color:var(--gray-900);white-space:nowrap;background:#fff;border-radius:8px;display:inline-flex;justify-content:center;align-items:center;gap:5px;font-size:12px;font-weight:850}
.photo-status-chip span{border-radius:50%;display:grid;place-items:center;width:18px;height:18px;font-size:12px;line-height:1}
.photo-status-chip.check span{background:var(--green-100);color:var(--green-700)}
.photo-status-chip.warn span{color:#9b6717;background:#fbf0d9}

.affiliate-cta{display:grid;gap:8px}
.affiliate-button{color:#fff;cursor:pointer;word-break:keep-all;background:#2563eb;border:0;border-radius:8px;width:100%;min-height:52px;font-size:15px;font-weight:850;line-height:1.25;box-shadow:0 12px 24px #2563eb2e}
.affiliate-button:active{transform:translateY(1px)}
.affiliate-disclosure{color:var(--gray-500);text-align:center;word-break:keep-all;font-size:11px;line-height:1.45}

.feedback-form{background:var(--gray-100);border-radius:8px;display:grid;gap:10px;padding:12px}
.feedback-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.feedback-form label{color:var(--gray-700);display:grid;gap:6px;font-size:13px;font-weight:700}
.feedback-form textarea{resize:vertical;min-height:84px}

.analysis-wait-page{z-index:40;min-width:320px;padding:max(24px,env(safe-area-inset-top)) 22px max(28px,env(safe-area-inset-bottom));background:linear-gradient(#f9fdf7,#eef7ed),url("data:image/svg+xml,%3Csvg width='140' height='140' viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%239cc89f' stroke-opacity='.18' stroke-width='4'%3E%3Cellipse cx='70' cy='70' rx='46' ry='58'/%3E%3Cpath d='M44 20c20 20 31 74 13 101M72 12c-12 26-10 80 4 116M96 22c-18 28-22 69-8 98'/%3E%3C/g%3E%3C/svg%3E");display:grid;place-items:center;position:fixed;inset:0}
.wait-contents{text-align:center;display:grid;justify-items:center;gap:24px;width:min(100%,420px)}
.wait-watermelon{aspect-ratio:1.22;background:repeating-linear-gradient(92deg,#14542fd1 0 11px,#2fb268f2 11px 26px,#b1de80b8 26px 34px);border:9px solid #174a32;border-radius:50%;width:min(56vw,210px);animation:wait-melon-breathe 1.4s ease-in-out infinite;position:relative;overflow:hidden;box-shadow:0 24px 46px #1f6f492e}
.wait-watermelon:before{content:"";background:#eeffe575;border:8px solid #ffffff9e;border-radius:50%;position:absolute;inset:18%}
.wait-watermelon:after{content:"";background:#ffffff57;border-radius:50%;width:20%;height:12%;position:absolute;top:14%;right:22%;transform:rotate(-22deg)}
.wait-watermelon span{aspect-ratio:1;background:#ffffffe0;border-radius:50%;width:7px;animation:wait-dot 1.4s ease-in-out infinite;position:absolute;bottom:18px}
.wait-watermelon span:nth-child(1){left:calc(50% - 22px)}
.wait-watermelon span:nth-child(2){animation-delay:.16s;left:calc(50% - 4px)}
.wait-watermelon span:nth-child(3){animation-delay:.32s;left:calc(50% + 14px)}
.wait-copy{display:grid;gap:7px}
.wait-copy h2{min-height:58px;color:var(--green-900);word-break:keep-all;display:grid;place-items:center;font-size:clamp(19px,5.1vw,24px);line-height:1.32}
.wait-copy p{color:var(--gray-700);font-size:14px}

@keyframes pulse{0%,100%{transform:scale(.95)}50%{transform:scale(1.04)}}
@keyframes wait-melon-breathe{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-5px) scale(1.025)}}
@keyframes wait-dot{0%,100%{opacity:.35;transform:translateY(0)}50%{opacity:1;transform:translateY(-7px)}}

@media (min-width:840px){
  .app-shell{grid-template-columns:minmax(0,1fr) 390px;align-items:start;padding-top:34px}
  .result-panel{margin-top:0;position:sticky;top:24px}
}
@media (max-width:360px){
  .measure-panel,.result-panel{padding:16px}
  h1{font-size:30px}
  .record-button{width:168px}
  .image-grid{gap:8px}
  .weight-field{grid-template-columns:minmax(0,1fr) 96px auto}
  .feedback-fields{grid-template-columns:1fr}
}
@media (max-width:420px){
  .image-empty-copy{max-width:calc(100% - 12px);padding:4px 6px;top:6px;left:6px}
  .image-empty-copy small{display:none}
}
@media (max-width:839px){
  .app-shell{max-width:none;padding-left:clamp(12px,4vw,20px);padding-right:clamp(12px,4vw,20px)}
  .measure-panel,.result-panel{width:auto;max-width:none}
}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}
