/* 메추 시리즈 공통 스타일: 흰 바탕, 얇은 선, 포인트 색은 버튼과 진행바에만 */
:root {
  --primary: #ff6a3d;   /* 페이지별로 menu.js가 THEME 색으로 바꿔요 */
  --text: #191919;
  --muted: #8b8b8b;
  --line: #ececec;
  --bg: #ffffff;
  --soft: #f6f6f6;
  --tint: #fff1ec;   /* 그림 배경. menu.js가 THEME soft 색으로 바꿔요 */
  --kakao: #fee500;
  --col: 440px;
  --side-ad: 160px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Gowun Dodum', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', 'Noto Sans KR', sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px;
}
button { font: inherit; cursor: pointer; color: inherit; }
a { color: inherit; }

.layout {
  display: flex; justify-content: center; gap: 24px;
  padding: 12px max(20px, env(safe-area-inset-right, 0px)) 24px max(20px, env(safe-area-inset-left, 0px));
}
.app { width: 100%; max-width: var(--col); }

/* 광고 */
.ad { display: flex; align-items: center; justify-content: center; }
.ad-side { display: none; width: var(--side-ad); min-height: 600px; position: sticky; top: 16px; align-self: flex-start; }
.ad-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; height: 60px; z-index: 20;
  padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line);
}
.ad-placeholder { border: 1px dashed #ccc; color: #aaa; font-size: 12px; display: flex; align-items: center; justify-content: center; text-align: center; }
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .ad-side { display: flex; }
  .ad-bottom { display: none; }
}

/* 공통 */
.topbar { display: flex; justify-content: space-between; align-items: center; height: 44px; font-size: 13px; color: var(--muted); }
.topbar a { text-decoration: none; }
section { padding: 28px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 14px; }
.label { font-size: 13px; color: var(--muted); margin: 0 0 6px; }
h1 { font-size: 28px; line-height: 1.3; margin: 0 0 8px; letter-spacing: -0.6px; }
h3 { font-size: 15px; margin: 0 0 14px; }
p { margin: 0; }

.btn {
  display: block; width: 100%; padding: 15px; margin-top: 8px;
  border: 0; border-radius: 12px;
  background: var(--primary); color: #fff;
  font-weight: 700; font-size: 16px; text-align: center; text-decoration: none;
}
.btn:active { opacity: .85; }
.btn.secondary { background: var(--soft); color: var(--text); }
.btn.dark { background: var(--text); color: #fff; }
.btn.kakao { background: var(--kakao); color: #191600; }
.btn.ghost { background: none; color: var(--muted); font-weight: 500; font-size: 14px; padding: 10px; }
.row { display: flex; gap: 8px; }
.row .btn { flex: 1; }

.input {
  width: 100%; padding: 14px; margin-top: 24px;
  border: 1px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 16px; outline: none;
}
.input:focus { border-color: var(--text); }
.notice { font-size: 13px; margin-top: 12px; }

/* 그림 */
.ic { display: inline-block; user-select: none; -webkit-user-select: none; }
.hero {
  position: relative; height: 220px; margin-top: 4px; border-radius: 20px; background: var(--tint); overflow: hidden;
}
.hero .ic { position: absolute; }
.hero .h0 { width: 128px; height: 128px; font-size: 100px; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.hero .h1, .hero .h2, .hero .h3, .hero .h4 { width: 56px; height: 56px; font-size: 44px; }
.hero .h1 { left: 9%; top: 14%; transform: rotate(-12deg); }
.hero .h2 { right: 9%; top: 12%; transform: rotate(10deg); }
.hero .h3 { left: 13%; bottom: 12%; transform: rotate(8deg); }
.hero .h4 { right: 12%; bottom: 14%; transform: rotate(-8deg); }
.q-pic { margin-top: 18px; }
.q-pic .ic { width: 64px; height: 64px; font-size: 52px; }
.q-pic + .q-text { margin-top: 10px; }

/* 질문 */
.progress { height: 3px; background: var(--line); }
.progress > div { height: 100%; background: var(--primary); transition: width .25s ease; }
.q-meta { font-size: 13px; color: var(--muted); margin: 18px 0 6px; }
.q-text { font-size: 22px; font-weight: 700; margin: 0 0 22px; letter-spacing: -0.4px; word-break: keep-all; }
.choices { display: flex; flex-direction: column; gap: 8px; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
  font-size: 16px; text-align: left;
}
.choice .em { width: 30px; height: 30px; flex: none; font-size: 24px; text-align: center; }
.choice:hover { border-color: #cfcfcf; }
.choice.on { border-color: var(--primary); color: var(--primary); font-weight: 700; }

/* 고르는 중 */
.roulette { text-align: center; padding: 70px 0; border: 0; }
.slot { height: 120px; display: flex; justify-content: center; }
.slot .ic { width: 120px; height: 120px; font-size: 96px; line-height: 120px; }
.slot-name { font-size: 18px; font-weight: 700; margin-top: 14px; min-height: 28px; }

/* 결과 */
.result { text-align: center; }
.plate {
  width: 180px; height: 180px; margin: 14px auto 16px; border-radius: 50%;
  background: var(--tint); display: flex; align-items: center; justify-content: center;
}
.plate .ic { width: 120px; height: 120px; font-size: 96px; line-height: 120px; text-align: center; animation: pop .35s ease; }
@keyframes pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.menu-name { font-size: 32px; font-weight: 800; letter-spacing: -0.8px; }
.menu-desc { color: #555; margin: 8px 0 0; word-break: keep-all; }
.reasons { list-style: none; padding: 0; margin: 20px 0 8px; text-align: left; border-top: 1px solid var(--line); }
.reasons li { padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 14px; color: #444; }
.alts { display: flex; flex-direction: column; gap: 8px; }
.alt {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 15px; text-align: left;
}
.alt .em { width: 32px; height: 32px; flex: none; font-size: 26px; text-align: center; }

/* 따라 하기 순서 */
.steps { text-align: left; margin-top: 16px; padding: 16px 18px; border-radius: 16px; background: var(--tint); }
.steps-h { font-family: 'Jua', 'Gowun Dodum', sans-serif; font-size: 16px; margin-bottom: 8px; color: var(--primary); }
.steps ol { margin: 0; padding-left: 20px; }
.steps li { padding: 4px 0; font-size: 15px; word-break: keep-all; }

/* 다른 메추 */
.more-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.more-card, .more-wide { background: var(--soft); border-radius: 16px; text-decoration: none; color: var(--text); }
.more-card { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 18px 8px 16px; text-align: center; }
.more-card .em { width: 52px; height: 52px; font-size: 42px; margin-bottom: 6px; }
.more-card b { font-size: 15px; }
.more-card small, .more-wide small { color: var(--muted); font-size: 12px; word-break: keep-all; }
.more-wide { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-top: 8px; }
.more-wide .em { width: 40px; height: 40px; font-size: 32px; flex: none; }
.more-wide b { display: block; font-size: 15px; }
.foot { text-align: center; font-size: 13px; color: var(--muted); padding: 8px 0 20px; }

.toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%);
  background: #191919; color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.toast.show { opacity: 1; }
.fade-in { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* 제목, 버튼, 메뉴 이름은 둥근 글씨(Jua). Jua는 굵기가 하나라 font-weight는 400으로 */
h1, h3, .btn, .q-text, .menu-name, .slot-name, .choice, .alt, .more-card b, .more-wide b {
  font-family: 'Jua', 'Gowun Dodum', sans-serif; font-weight: 400; letter-spacing: 0;
}
.btn.ghost { font-family: inherit; }
h1 { font-size: 30px; }
h3 { font-size: 17px; }
.q-text { font-size: 24px; }
.menu-name { font-size: 34px; }
.btn { font-size: 17px; }
.choice { font-size: 17px; }
.choice.on { font-weight: 400; }
.more-card:last-child:nth-child(odd) { grid-column: span 2; }
