/* 동물상 — 동물원 매표소처럼 밝고 동글동글한 화면
   Layout: 크림색 바닥, 가운데 한 단. 결과는 큰 동그라미 그림 + 닮음 비율 막대, 동물마다 --c 색. 한 가지 모습으로 고정 */
:root {
  color-scheme: light;
  --bg: #FFF7EA;      /* 크림 */
  --card: #FFFFFF;
  --ink: #2B2420;     /* 글자 */
  --muted: #7A6E66;
  --line: #F0E3D0;
  --accent: #FF9F1C;  /* 귤색 버튼 */
  --accent-deep: #D97C00;
  --f-display: "Jua", "Gowun Dodum", sans-serif;
  --f-body: "Gowun Dodum", "Apple SD Gothic Neo", sans-serif;
}
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 16px; line-height: 1.6; padding-inline: 16px; padding-block: 16px 40px; word-break: keep-all; overflow-wrap: anywhere; overflow-x: clip; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 460px; margin: 0 auto; display: grid; gap: 18px; }
.tohub { justify-self: start; font-size: 14px; color: var(--muted); text-decoration: none; }
.screen { display: grid; gap: 16px; }
.parade { display: flex; justify-content: center; height: 96px; margin-top: 4px; }
.parade img { width: 84px; height: 84px; margin: 0 -8px; animation: hop 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * .16s); filter: drop-shadow(0 6px 6px rgba(43, 36, 32, .12)); }
@keyframes hop { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-12px); } }
.title { margin: 0; text-align: center; font-family: var(--f-display); font-weight: 400; font-size: clamp(36px, 11vw, 48px); line-height: 1.15; }
.title em { font-style: normal; color: var(--accent-deep); }
.hook { margin: 0; text-align: center; color: var(--muted); }
.actions { display: grid; gap: 10px; }
.btn { appearance: none; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; text-align: center; text-decoration: none; min-height: 56px; padding: 12px 18px;
  border-radius: 999px; background: var(--accent); color: #fff; font-family: var(--f-display); font-size: 20px; box-shadow: 0 6px 0 var(--accent-deep); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--accent-deep); }
.btn.ghost { background: var(--card); color: var(--ink); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--line); font-size: 18px; }
.btn input { display: none; }
.note { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.privacy { margin: 0; font-size: 13.5px; color: var(--muted); background: var(--card); border-radius: 14px; padding: 10px 14px; }
.privacy b { color: var(--ink); }
.sec { margin: 6px 0 0; text-align: center; font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.zoo { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.zoo a { display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--ink); font-size: 13px; }
.zoo img { width: 100%; max-width: 76px; height: auto; }
.scan { justify-items: center; }
.scan canvas { width: 100%; max-width: 320px; aspect-ratio: 3 / 4; border-radius: 26px; border: 4px solid var(--accent); background: var(--card); }
.bar { width: 100%; max-width: 320px; height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s; }
.msg { margin: 0; font-family: var(--f-display); font-size: 20px; }
.oops { text-align: center; }
.oops h2 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 26px; }
.oops p { margin: 0; color: var(--muted); }
.ribbon { justify-self: center; margin: 0; padding: 4px 14px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 14px; }

.result { --c: var(--accent); display: grid; gap: 14px; text-align: center; }
.kicker { margin: 0; font-family: var(--f-display); font-size: 18px; color: var(--muted); }
.hero { position: relative; justify-self: center; width: min(220px, 60vw); }
.hero img { width: 100%; height: auto; display: block; animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both; filter: drop-shadow(0 12px 14px rgba(43, 36, 32, .15)); }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.pct { position: absolute; right: -10px; top: 6px; background: var(--c); color: #fff; font-family: var(--f-display); font-size: 22px; padding: 4px 12px; border-radius: 99px; transform: rotate(8deg); box-shadow: 0 4px 0 rgba(0, 0, 0, .15); font-variant-numeric: tabular-nums; }
.name { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: clamp(42px, 13vw, 56px); line-height: 1.05; color: var(--c); }
.look { margin: 0; font-family: var(--f-display); font-size: 18px; }
.sum { margin: 0; color: var(--muted); text-wrap: balance; }
.mix { background: var(--card); border-radius: 20px; padding: 14px 16px; text-align: left; display: grid; gap: 8px; }
.mix h3 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 17px; }
.mixbars { display: grid; gap: 8px; }
.mrow { display: grid; grid-template-columns: 36px 64px minmax(0, 1fr) 44px; gap: 8px; align-items: center; font-size: 14px; }
.mrow img { width: 36px; height: 36px; }
.mrow .track { height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.mrow i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--c); transition: width 1s ease; }
.mrow b { font-family: var(--f-display); font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; }
.traits { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.traits li { background: var(--card); border: 2px solid var(--c); border-radius: 99px; padding: 4px 12px; font-family: var(--f-display); font-size: 15px; }
.tip { background: var(--card); border-radius: 20px; padding: 14px 16px; text-align: left; }
.tip b { font-family: var(--f-display); font-weight: 400; color: var(--c); }
.tip p { margin: 4px 0 0; }
.best { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); background: var(--card); border-radius: 20px; padding: 10px 14px; text-align: left; }
.best img { width: 56px; height: 56px; }
.best span { display: grid; }
.best small { color: var(--muted); }
.best b { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.sharebox { width: 100%; border: 2px solid var(--line); border-radius: 12px; padding: 10px; font: inherit; font-size: 14px; resize: none; background: #fff; }
.ad { border: 2px dashed var(--line); border-radius: 16px; min-height: 90px; display: grid; place-items: center; font-size: 12px; letter-spacing: .1em; color: #B8A994; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: #fff; border-radius: 99px; padding: 10px 18px; font-size: 14px; z-index: 5; max-width: calc(100% - 32px); text-align: center; }
.foot { max-width: 460px; margin: 22px auto 0; text-align: center; font-size: 12.5px; color: var(--muted); }
.foot a { color: inherit; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
