/* 배추공주 미니게임 — A안 (깔끔한 앱) */
:root {
  --or: #ff6924; --or2: #de6c01; --cream: #fffaf2; --ink: #1f1a17; --sub: #8a7e76; --line: #f1e6da; --brown: #3b1f12;
  --gold: #ffc114; --green: #03c75a; --soft: #fff3eb;
  --shadow: 0 2px 0 var(--line), 0 6px 14px rgba(90,50,20,.06);
  --tabh: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #efe7df; overscroll-behavior: none; }
body { font-family: SUIT, 'Apple SD Gothic Neo', system-ui, sans-serif; font-weight: 700; color: var(--ink);
       -webkit-user-select: none; user-select: none; -webkit-font-smoothing: antialiased; word-break: keep-all; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
#app { position: fixed; inset: 0; overflow: hidden; max-width: 520px; margin: 0 auto; background: var(--cream); }
canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; -webkit-touch-callout: none; }
svg { display: block; }

/* 누르는 느낌 */
.press { transition: transform .12s ease, box-shadow .12s ease, background-color .15s, border-color .15s, color .15s; cursor: pointer; touch-action: manipulation; }
.press:active { transform: scale(.97); }
.press:disabled { cursor: default; }
:focus-visible { outline: 3px solid rgba(255,105,36,.45); outline-offset: 2px; }

/* ===== 화면 ===== */
.screen { position: absolute; inset: 0; z-index: 10; overflow-y: auto; -webkit-overflow-scrolling: touch; background: var(--cream);
          padding: calc(14px + var(--safe-t)) 18px calc(24px + var(--safe-b)); }
.screen.tabbed { padding-bottom: calc(var(--tabh) + 24px + var(--safe-b)); }
.screen.enter { animation: enter .26s cubic-bezier(.2,.8,.3,1) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

/* 하단 탭바 */
#tabbar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: rgba(255,255,255,.96);
          border-top: 1px solid var(--line); padding: 6px 8px calc(6px + var(--safe-b)); height: calc(var(--tabh) + var(--safe-b));
          -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
#tabbar button { flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
                 font-size: 11px; font-weight: 700; color: #b5a99f; cursor: pointer; touch-action: manipulation; transition: color .15s; }
#tabbar button svg { width: 24px; height: 24px; transition: transform .15s; }
#tabbar button:active svg { transform: scale(.88); }
#tabbar button.on { color: var(--or); font-weight: 800; }

/* 공통 버튼 */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border: 0; border-radius: 16px; padding: 15px;
       font-weight: 800; font-size: 16px; text-align: center; text-decoration: none; }
.btn.pri { background: var(--or); color: #fff; box-shadow: 0 6px 14px rgba(255,105,36,.3); }
.btn.pri:active { box-shadow: 0 2px 6px rgba(255,105,36,.3); }
.btn.ghost { background: #fff; border: 1.5px solid var(--line); color: var(--ink); padding: 13px; font-size: 15px; }
.btn.soft { background: var(--brown); color: #fff; margin-top: 12px; padding: 13px; font-size: 15px; }
.weblink { display: block; margin-top: 10px; text-align: center; font-size: 13px; color: var(--sub, #8a7a70); text-decoration: underline; }
.btn.naver { background: var(--green); color: #fff; box-shadow: 0 6px 14px rgba(3,199,90,.25); }
.btn:disabled { opacity: .65; }
.row { display: flex; gap: 8px; margin-top: 8px; }
.row .btn { flex: 1; }

/* 로딩 스피너 */
.spin { display: none; width: 15px; height: 15px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; flex: none; }
.busy .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(90deg, #f6eee6 25%, #fbf6f1 50%, #f6eee6 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 12px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* 상단바 (설명·결과) */
.topbar { display: flex; align-items: center; justify-content: space-between; margin: 0 -6px 6px; color: var(--sub); font-weight: 800; font-size: 14px; }
.topbar .sp, .iconbtn { width: 40px; height: 40px; flex: none; }
.iconbtn { border: 0; background: none; border-radius: 12px; display: grid; place-items: center; color: var(--ink); }
.iconbtn svg { width: 22px; height: 22px; }
.iconbtn:active { background: var(--line); }

/* ===== 홈 ===== */
.hello { display: flex; align-items: center; gap: 10px; margin: 6px 0 16px; }
.hello img { width: 44px; height: 44px; border-radius: 13px; background: var(--or); object-fit: cover; flex: none; }
.hello b { display: block; font-size: 20px; font-weight: 900; letter-spacing: -.4px; }
.hello small { color: var(--sub); font-size: 13px; font-weight: 600; }

.feat { position: relative; display: block; width: 100%; height: 186px; border: 0; border-radius: 24px; overflow: hidden; text-align: left;
        background: linear-gradient(135deg, #ff7a3a, #ff5a1a); color: #fff; padding: 18px; box-shadow: 0 10px 24px rgba(255,105,36,.3); }
.feat .thumb { position: absolute; right: -8px; bottom: -6px; width: 52%; max-width: 190px; border-radius: 18px; overflow: hidden; transform: rotate(-4deg);
               box-shadow: 0 8px 18px rgba(0,0,0,.18); }
.feat .thumb svg { width: 100%; height: auto; }
.feat .fchip { position: relative; z-index: 1; display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: rgba(255,255,255,.22); }
.feat h3 { position: relative; z-index: 1; margin: 8px 0 2px; font-size: 24px; font-weight: 900; letter-spacing: -.5px; max-width: 58%; }
.feat p { position: relative; z-index: 1; margin: 0; font-size: 13px; opacity: .92; font-weight: 600; max-width: 54%; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feat .go { position: absolute; z-index: 1; left: 18px; bottom: 16px; display: inline-flex; align-items: center; gap: 2px; background: #fff; color: var(--or);
            font-weight: 800; font-size: 14px; border-radius: 999px; padding: 8px 10px 8px 14px; }
.feat .go svg { width: 16px; height: 16px; }

.sec { display: flex; justify-content: space-between; align-items: baseline; margin: 22px 2px 10px; }
.sec b { font-size: 17px; font-weight: 900; }
.sec small { color: var(--sub); font-size: 12px; font-weight: 700; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gcard { position: relative; border: 0; background: #fff; border-radius: 20px; padding: 8px; box-shadow: var(--shadow); text-align: left; }
.gcard:active { box-shadow: 0 1px 0 var(--line), 0 3px 8px rgba(90,50,20,.06); }
.gcard .t { border-radius: 14px; overflow: hidden; aspect-ratio: 4 / 3; background: #ffe6d2; }
.gcard .t svg { width: 100%; height: 100%; }
.gcard b { display: block; font-size: 15px; font-weight: 800; margin: 8px 4px 0; letter-spacing: -.3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard small { display: block; color: var(--sub); font-size: 12px; font-weight: 600; margin: 2px 4px 4px; }
.gcard small.has { color: var(--or2); font-weight: 700; }
.badge { position: absolute; top: 14px; left: 14px; z-index: 1; font-size: 10px; font-weight: 900; color: #fff; background: var(--brown); border-radius: 6px; padding: 2px 6px; }
.badge.new { background: #ff3d57; }

.banner { display: flex; width: 100%; align-items: center; gap: 10px; margin: 14px 0 0; background: #fff3e6; border: 1.5px solid #ffd7b8;
          border-radius: 18px; padding: 12px 14px; text-align: left; }
.banner .ic { width: 40px; height: 40px; border-radius: 12px; background: var(--or); display: grid; place-items: center; flex: none; }
.banner .ic svg { width: 22px; height: 22px; }
.banner .tx { min-width: 0; }
.banner b { font-size: 14px; font-weight: 800; display: block; }
.banner small { font-size: 12px; color: var(--sub); font-weight: 600; }
.banner .arr { margin-left: auto; color: var(--or); flex: none; }
.banner .arr svg { width: 20px; height: 20px; }

/* ===== 게임 설명 ===== */
#scrHow { display: flex; flex-direction: column; }
.how { text-align: center; flex: 1; }
.how-thumb { width: min(68%, 240px); margin: 4px auto 0; border-radius: 26px; overflow: hidden; box-shadow: 0 10px 24px rgba(90,50,20,.14);
             animation: bob 2.4s ease-in-out infinite; }
.how-thumb svg { width: 100%; height: auto; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-1.5deg); } }
.tag { display: inline-block; margin-top: 18px; font-size: 12px; font-weight: 800; color: var(--or); background: var(--soft); border-radius: 999px; padding: 4px 10px; }
.how h2 { margin: 8px 0 14px; font-size: 26px; font-weight: 900; letter-spacing: -.6px; }
.howlist { list-style: none; margin: 0; padding: 14px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); text-align: left; }
.howlist li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 600; line-height: 1.5; color: #4a3d35; }
.howlist li + li { margin-top: 10px; }
.howlist .n { flex: none; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: var(--brown); color: #fff; font-size: 12px; font-weight: 900; display: grid; place-items: center; }
.howlist b { color: var(--ink); font-weight: 900; }
.warn { margin: 10px 0 0; font-size: 13px; color: var(--sub); font-weight: 600; }
.howbest { margin: 10px 0 0; font-size: 13px; font-weight: 800; color: var(--or2); }
.actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }

/* ===== 게임 중 ===== */
#hud { position: absolute; top: calc(var(--safe-t) + 10px); left: 10px; right: 10px; z-index: 5; display: flex; gap: 6px; align-items: center; pointer-events: none; }
.hpill, .hbtn { height: 36px; border-radius: 999px; background: rgba(255,255,255,.94); color: var(--ink); box-shadow: 0 2px 8px rgba(40,20,10,.16);
                display: flex; align-items: center; gap: 5px; padding: 0 12px; font-size: 15px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hbtn { width: 36px; padding: 0; justify-content: center; border: 0; pointer-events: auto; flex: none; }
.hbtn svg { width: 18px; height: 18px; }
.hbtn:disabled { opacity: .5; }
.hpill.name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: block; line-height: 36px; font-size: 14px; color: #5a4a40; }
.hpill.time svg { width: 16px; height: 16px; color: var(--or); }
.hpill.time.low { background: var(--or); color: #fff; animation: beat .5s ease-in-out infinite alternate; }
.hpill.time.low svg { color: #fff; }
@keyframes beat { to { transform: scale(1.08); } }
.hpill.score { background: var(--brown); color: #fff; }
#hud .i-floor { display: none; }
#hud.untimed .i-clock { display: none; }
#hud.untimed .i-floor { display: block; }
#mute .i-off { display: none; }
#mute.muted .i-on { display: none; }
#mute.muted .i-off { display: block; }

#countdown { position: absolute; inset: 0; z-index: 25; display: grid; place-items: center; pointer-events: none; background: rgba(31,26,23,.18); }
#cdNum { display: grid; place-items: center; min-width: 128px; height: 128px; padding: 0 22px; border-radius: 64px; background: #fff; color: var(--or);
         font-size: 72px; font-weight: 900; letter-spacing: -2px; box-shadow: 0 16px 40px rgba(40,20,10,.25); }
#cdNum.go { font-size: 44px; background: var(--or); color: #fff; }
#cdNum.pop { animation: cdpop .55s cubic-bezier(.2,1.5,.4,1) both; }
@keyframes cdpop { from { transform: scale(.4); opacity: 0; } 60% { opacity: 1; } }

#sheet { position: absolute; inset: 0; z-index: 28; background: rgba(31,26,23,.45); display: flex; align-items: flex-end; animation: fade .2s both; }
@keyframes fade { from { opacity: 0; } }
.sheet-card { width: 100%; background: #fff; border-radius: 26px 26px 0 0; padding: 10px 18px calc(18px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px;
              text-align: center; animation: up .26s cubic-bezier(.2,.8,.3,1) both; }
@keyframes up { from { transform: translateY(100%); } }
.sheet-card .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 6px; }
.sheet-card b { font-size: 19px; font-weight: 900; }
.sheet-card small { color: var(--sub); font-size: 13px; font-weight: 700; margin-bottom: 6px; }

/* 토스트 (화면 위에 뜸) */
#toast { position: absolute; left: 16px; right: 16px; top: 38%; z-index: 30; text-align: center; pointer-events: none;
         font-size: 40px; font-weight: 900; letter-spacing: -1px; color: #fff; text-shadow: 0 3px 0 var(--or2), 0 6px 16px rgba(0,0,0,.35);
         opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s; }
#toast.on { opacity: 1; transform: scale(1); }
/* 작은 알림(콤보·감점)은 게임 화면을 가리지 않게 상단 HUD 바로 아래에 */
#toast.small { top: calc(var(--safe-t) + 66px); font-size: 16px; font-weight: 800; letter-spacing: 0; text-shadow: none; left: 50%; right: auto; width: max-content; max-width: calc(100% - 32px);
               transform: translate(-50%, 8px); background: rgba(31,26,23,.9); padding: 11px 16px; border-radius: 14px; box-shadow: 0 8px 20px rgba(0,0,0,.2); }
#toast.small.on { transform: translate(-50%, 0); }

/* ===== 결과 ===== */
.res { text-align: center; }
.thumbsm { width: 124px; margin: 2px auto 0; border-radius: 22px; overflow: hidden; box-shadow: 0 6px 16px rgba(90,50,20,.12); }
.thumbsm svg { width: 100%; height: auto; }
.res .label { margin-top: 12px; font-size: 14px; color: var(--sub); font-weight: 700; }
.res .score { font-size: 64px; font-weight: 900; letter-spacing: -2px; line-height: 1; margin: 4px 0; font-variant-numeric: tabular-nums; animation: scpop .5s cubic-bezier(.2,1.4,.4,1) both; }
.res .score small { font-size: 22px; letter-spacing: 0; margin-left: 2px; color: var(--sub); font-weight: 800; }
@keyframes scpop { from { transform: scale(.6); opacity: 0; } }
.stars { font-size: 30px; letter-spacing: 4px; line-height: 1.1; }
.stars span { display: inline-block; color: #eadfd4; }
.stars span.on { color: var(--gold); animation: star .45s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes star { from { transform: scale(0) rotate(-40deg); } }
.best { display: inline-block; margin-top: 6px; background: #f6efe8; color: var(--sub); font-weight: 800; font-size: 12px; padding: 4px 10px; border-radius: 999px; }
.best.new { background: #fff0e6; color: var(--or); }
.chef { margin: 8px 0 0; font-size: 13px; font-weight: 700; color: #5a4a40; }
.stats { display: flex; background: #fff; border-radius: 18px; margin: 14px 0 0; padding: 12px 0; box-shadow: var(--shadow); }
.stats div { flex: 1; min-width: 0; text-align: center; font-size: 11px; color: var(--sub); font-weight: 700; padding: 0 4px; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-size: 18px; color: var(--ink); font-weight: 900; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
.stats div.flash b { color: var(--or); animation: scpop .5s cubic-bezier(.2,1.4,.4,1) both; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin: 10px 0 0; }
.chip { background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px 9px; font-size: 12px; font-weight: 700; color: #5a4a40; }
.card { background: #fff; border-radius: 18px; padding: 12px; box-shadow: var(--shadow); }
.rank { margin-top: 10px; text-align: left; }
.rank-msg { margin: 0 0 8px; font-size: 13px; font-weight: 700; color: #5a4a40; min-height: 18px; }
.rank-msg b { font-weight: 900; color: var(--ink); }
.rank-msg em { font-style: normal; color: var(--or); font-weight: 800; }
.rankform { display: flex; gap: 6px; margin-bottom: 4px; }
.rankform input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 11px 12px; font: inherit; font-size: 16px; font-weight: 700;
                  color: var(--ink); background: #fff; -webkit-user-select: text; user-select: text; outline: none; transition: border-color .15s; }
.rankform input:focus { border-color: var(--or); }
.rankform input::placeholder { color: #b5a99f; font-weight: 600; }
.rankform button { border: 0; border-radius: 12px; background: var(--brown); color: #fff; font-size: 14px; font-weight: 800; padding: 0 16px; flex: none; }
.rankform button:disabled { opacity: .55; }
.mini-h { margin: 10px 0 0; font-size: 11px; font-weight: 800; color: var(--sub); }
.ranklist { list-style: none; padding: 0; margin: 4px 0 0; }
.ranklist li { display: flex; gap: 10px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.ranklist li:last-child { border-bottom: 0; }
.ranklist li.skel { height: 34px; border: 0; margin: 6px 0; padding: 0; }
.ranklist .no { width: 24px; height: 24px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 900; color: var(--sub); background: #f6efe8; }
.ranklist .no.m1 { background: var(--gold); color: #fff; }
.ranklist .no.m2 { background: #b8bec7; color: #fff; }
.ranklist .no.m3 { background: #d39a6a; color: #fff; }
.ranklist .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranklist .sc { color: var(--or2); font-weight: 800; font-variant-numeric: tabular-nums; }
.ranklist li.me { background: var(--soft); border-radius: 10px; border-bottom-color: transparent; }
.ranklist li.empty { justify-content: center; color: var(--sub); font-weight: 600; font-size: 13px; padding: 12px 4px; }
#btnScoreReview { margin-top: 14px; }

/* ===== 랭킹 ===== */
.ptitle { margin: 6px 0 2px; font-size: 22px; font-weight: 900; letter-spacing: -.5px; }
.psub { margin: 0 0 14px; font-size: 13px; color: var(--sub); font-weight: 600; }
.psub b { color: var(--or); font-weight: 800; }
.seg { display: flex; gap: 6px; overflow-x: auto; margin: 0 -18px; padding: 0 18px 4px; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 800; color: #5a4a40; }
.seg button.on { background: var(--brown); border-color: var(--brown); color: #fff; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 8px; align-items: end; margin-top: 16px; }
.pod { background: #fff; border-radius: 18px; padding: 14px 6px 12px; text-align: center; box-shadow: var(--shadow); min-width: 0; }
.pod.skel { height: 120px; box-shadow: none; }
.podium.loading .pod.skel:nth-child(2) { height: 140px; }
.pod.p1 { padding-top: 20px; padding-bottom: 16px; background: linear-gradient(180deg, #fff7e0, #fff); border: 1.5px solid #ffe08a; }
.pod .medal { display: grid; place-items: center; width: 32px; height: 32px; margin: 0 auto 8px; border-radius: 50%; font-size: 15px; font-weight: 900; color: #fff; background: #d39a6a; }
.pod.p1 .medal { width: 40px; height: 40px; font-size: 18px; background: var(--gold); box-shadow: 0 4px 10px rgba(255,193,20,.4); }
.pod.p2 .medal { background: #b8bec7; }
.pod .nm { display: block; font-size: 14px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pod.p1 .nm { font-size: 16px; }
.pod .sc { display: block; margin-top: 2px; font-size: 12px; font-weight: 800; color: var(--or2); font-variant-numeric: tabular-nums; min-height: 15px; }
.pod.none { opacity: .5; }
.ranklist.board { margin-top: 10px; background: #fff; border-radius: 18px; padding: 4px 10px; box-shadow: var(--shadow); }
.ranklist.board:empty { display: none; }
.board-empty { margin: 16px 0 0; padding: 28px 16px; text-align: center; background: #fff; border-radius: 18px; box-shadow: var(--shadow); color: var(--sub); font-size: 14px; font-weight: 700; }

/* ===== 리뷰 이벤트 ===== */
.rhead { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rhead img { width: 48px; height: 48px; border-radius: 14px; background: var(--or); object-fit: cover; flex: none; margin-top: 4px; }
.steps { display: flex; align-items: center; gap: 6px; margin: 0 0 12px; }
.steps .st { width: 26px; height: 26px; flex: none; border: 0; border-radius: 50%; padding: 0; background: var(--line); color: #a89a8f; display: grid; place-items: center;
             font-size: 12px; font-weight: 900; cursor: pointer; transition: background-color .2s, color .2s, transform .2s; }
.steps .st.on { background: var(--or); color: #fff; transform: scale(1.08); box-shadow: 0 3px 8px rgba(255,105,36,.35); }
.steps .st.done { background: var(--brown); color: #fff; }
.steps .ln { flex: 1; height: 3px; background: var(--line); border-radius: 2px; transition: background-color .3s; }
.steps .ln.on { background: var(--brown); }
.box { background: #fff; border-radius: 18px; padding: 14px 12px; box-shadow: var(--shadow); margin-bottom: 10px; scroll-margin-top: 12px; }
.box h5 { margin: 0 0 10px; font-size: 14px; font-weight: 900; }
.box h5 small { color: var(--sub); font-weight: 700; }
.rw { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.rw button { border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 9px 2px 8px; text-align: center; font-size: 11.5px; font-weight: 800; line-height: 1.3; min-width: 0; }
.rw .ri { display: block; font-size: 24px; line-height: 1.15; margin-bottom: 3px; }
.rw .rt { display: block; }
.rw button.on { border-color: var(--or); background: var(--soft); color: var(--or); box-shadow: 0 3px 10px rgba(255,105,36,.18); }
.lbl { margin: 4px 0 6px; font-size: 12px; color: var(--sub); font-weight: 700; }
.lbl + .tags { margin-bottom: 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tags button { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 11px; font-size: 12.5px; font-weight: 700; }
.tags button.on { background: var(--brown); border-color: var(--brown); color: #fff; }
.gen { margin-top: 12px; background: #fffaf4; border: 1.5px dashed #f2c9a6; border-radius: 14px; padding: 4px 4px 8px; animation: enter .25s both; }
.gen textarea { display: block; width: 100%; min-height: 120px; border: 0; background: transparent; resize: none; padding: 8px; font: inherit; font-size: 14px; font-weight: 600;
                line-height: 1.65; color: #4a3d35; -webkit-user-select: text; user-select: text; outline: none; }
.gen textarea.loading { opacity: .4; }
.gen .bar { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 4px; }
.gen .bar small { margin-right: auto; font-size: 11px; color: var(--sub); font-weight: 600; }
.gen .bar button, .tagline button { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 800; padding: 7px 11px; border-radius: 10px;
                                    background: #fff; border: 1.5px solid var(--line); flex: none; }
.gen .bar button.c { background: var(--brown); color: #fff; border-color: var(--brown); }
.gen .bar button.copied, .tagline button.copied { background: var(--green); border-color: var(--green); color: #fff; }
.tagline { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.tagline em { flex: 1; min-width: 0; font-style: normal; font-size: 12.5px; font-weight: 700; color: #2f6fe0; line-height: 1.5; -webkit-user-select: text; user-select: text; word-break: keep-all; overflow-wrap: anywhere; }
.fine { margin: 8px 0 0; font-size: 12px; color: var(--sub); font-weight: 600; text-align: center; }
.pickline { margin: 12px 0 0; padding-top: 12px; border-top: 1px dashed var(--line); text-align: center; font-size: 14px; font-weight: 800; line-height: 1.6; }
.pickline span { font-size: 13px; color: var(--sub); font-weight: 700; }
.pickline b { color: var(--sub); font-weight: 800; }
.pickline b.set { color: var(--or); }
.foot { margin: 18px 0 4px; text-align: center; font-size: 12px; color: #b5a99f; font-weight: 600; }

/* 꽃가루 */
#confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 11; }
#confetti i { position: absolute; top: -20px; width: 9px; height: 14px; border-radius: 2px; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .6; } }

/* 작은 화면 (320px) */
@media (max-width: 350px) {
  .screen { padding-left: 14px; padding-right: 14px; }
  .seg { margin: 0 -14px; padding: 0 14px 4px; }
  .feat { height: 178px; padding: 16px; }
  .feat h3 { font-size: 21px; }
  .feat .go { left: 16px; }
  .hello b { font-size: 18px; }
  .gcard b { font-size: 14px; }
  .res .score { font-size: 56px; }
  .rw button { font-size: 10.5px; }
  .hpill { padding: 0 10px; font-size: 14px; }
  .hpill.name { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
