/* FocusMom 출산 혜택 검색 — focusmom-user-app-pg 테마(variables.scss / notion-home) 기준 */
:root {
  --primary: #8E4D2D; --primary-shade: #713719; --primary-tint: #FFB694;
  --text1: #333333; --text2: #555555; --text3: #666666; --text4: #888888;
  --peach: #FFCAB0; --peach-l: #FFF0E8; --rose: #F8B4C8; --rose-l: #FFF0F5; --rose-d: #ED4074; --rose-txt: #EB2963;
  --cream: #FFF5E6; --light-shade: #F1DFD8; --sky-d: #3F94B8;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font-family: Roboto, "Noto Sans KR", "Apple SD Gothic Neo", "Helvetica Neue", sans-serif;
  color: var(--text1); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, #FFF9F5 0%, #FFFBF8 50%, #FFFFFF 100%) fixed;
}
a { color: var(--primary); text-decoration: none; }
button { font: inherit; cursor: pointer; }
svg { flex-shrink: 0; }

.toolbar { position: sticky; top: 0; z-index: 10; background: rgba(255,255,255,.95); box-shadow: 0 1px 0 rgba(0,0,0,.06); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.toolbar-inner { height: 56px; display: flex; align-items: center; padding: 0 4px; gap: 4px; max-width: 1000px; margin: 0 auto; }
.toolbar h1 { flex: 1; margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -.3px; line-height: 1.2; }
.toolbar .link { font-size: 13px; font-weight: 500; color: var(--text2); padding: 0 12px; height: 48px; display: flex; align-items: center; white-space: nowrap; }
.icon-btn { width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; border-radius: 9999px; background: none; border: 0; color: var(--text1); padding: 0; }
.icon-btn:hover { background: rgba(0,0,0,.04); }

.container { width: 100%; max-width: 800px; margin: 0 auto; padding: 0 16px 34px; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 20px 0 24px; }
.badge-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: rgba(255,255,255,.8); border-radius: 9999px; box-shadow: 0 4px 16px rgba(0,0,0,.05); font-size: 12px; font-weight: 600; color: var(--primary); letter-spacing: .5px; }
.hero h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.5px; line-height: 1.3; }

.form { display: flex; flex-direction: column; gap: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 14px; font-weight: 500; }
.card { background: #fff; border-radius: 16px; border: 1px solid rgba(0,0,0,.03); box-shadow: 0 2px 12px rgba(0,0,0,.04); padding: 0 16px; display: flex; flex-direction: column; }
.select-row { position: relative; height: 60px; display: flex; align-items: center; border-bottom: 1px solid #f0f0f0; }
.select-row:last-child { border-bottom: 0; }
.select-row .cap { position: absolute; left: 0; top: 10px; font-size: 12px; color: var(--text3); pointer-events: none; }
.select-row:focus-within .cap { color: var(--primary); }
.select-row select { appearance: none; -webkit-appearance: none; width: 100%; height: 100%; padding: 18px 28px 0 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text1); outline: none; cursor: pointer; }
.select-row select:disabled { color: var(--text4); cursor: default; }
.select-row > svg { position: absolute; right: 0; top: 20px; pointer-events: none; color: var(--text4); }

.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.option { border-radius: 16px; padding: 20px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; border: 2px solid var(--light-shade); background: #fff; box-shadow: 0 2px 12px rgba(0,0,0,.04); font-size: 15px; font-weight: 500; letter-spacing: -.2px; color: var(--text1); transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease; }
.option .ic { width: 44px; height: 44px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.option .ic.rose { background: var(--rose-l); color: var(--rose-d); }
.option .ic.peach { background: var(--peach-l); color: #FF7530; }
.option:active { transform: scale(.96); }
.option[aria-pressed="true"] { border-color: var(--primary); background: var(--peach-l); color: var(--primary); font-weight: 600; box-shadow: 0 4px 20px rgba(142,77,45,.18); }

.chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.chip { height: 48px; border-radius: 9999px; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 500; border: 2px solid var(--light-shade); background: #fff; color: var(--text1); padding: 0; transition: border-color .2s ease, background .2s ease; }
.chip[aria-pressed="true"] { border-color: var(--primary); background: var(--peach-l); color: var(--primary); font-weight: 600; }

.cta-wrap { padding-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.cta { height: 56px; width: 100%; border: 0; border-radius: 20px; background: linear-gradient(135deg, #8E4D2D 0%, #F38DAC 100%); color: #fff; font-size: 16px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.15); transition: transform .2s ease, opacity .2s ease; }
.cta:active { transform: scale(.98); }
.cta:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.note { margin: 0; text-align: center; font-size: 13px; color: var(--text3); }

.field-label .opt { font-weight: 400; color: var(--text4); font-size: 12px; }
.select-row input[type="date"] { appearance: none; -webkit-appearance: none; width: 100%; height: 100%; padding: 18px 28px 0 0; border: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text1); outline: none; }
.select-row input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0; position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.select-row .cap.hint { font-size: 11px; }

/* 결과 */
.results { display: flex; flex-direction: column; gap: 16px; padding-top: 16px; }
.summary { position: relative; overflow: hidden; border-radius: 24px; background: linear-gradient(135deg, #FFF5F0 0%, #FFEEEA 100%); border: 1px solid rgba(255,202,176,.3); box-shadow: 0 8px 32px rgba(0,0,0,.08); }
.summary .deco { position: absolute; top: -100px; right: -100px; width: 200px; height: 200px; border-radius: 9999px; background: linear-gradient(135deg, rgba(255,202,176,.3) 0%, rgba(248,180,200,.2) 100%); }
.summary-inner { position: relative; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.badge-rose { align-self: flex-start; display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 9999px; background: rgba(248,180,200,.15); color: var(--rose-txt); font-size: 12px; font-weight: 600; }
.badge-rose svg { color: var(--rose); }
.summary h2 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.3px; line-height: 1.3; }
.stats { display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.7); border-radius: 16px; padding: 16px 20px; }
.stat { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat b { font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: -1px; line-height: 1.1; }
.stat span { font-size: 12px; font-weight: 500; color: var(--text2); }
.stat-div { width: 1px; height: 44px; background: rgba(142,77,45,.15); margin: 0 20px; }
.crit { display: flex; flex-wrap: wrap; gap: 8px; }
.crit span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 9999px; background: rgba(142,77,45,.08); color: var(--primary); font-size: 13px; font-weight: 500; }

.share-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.btn { height: 48px; border-radius: 12px; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; border: 2px solid var(--primary); background: #fff; color: var(--primary); padding: 0 16px; }
.btn.fill { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.btn.lg { height: 52px; border-radius: 14px; font-size: 16px; margin-top: 8px; }
.btn:active { transform: scale(.98); }
.section-title { margin: 12px 0 0; font-size: 18px; font-weight: 700; letter-spacing: -.3px; }

.group { background: #fff; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,.08); overflow: hidden; }
.group-head { width: 100%; height: 60px; padding: 0 16px; background: #FFF9F5; border: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text1); text-align: left; }
.group-head .t { font-size: 16px; font-weight: 600; }
.group-head .n { font-size: 13px; font-weight: 600; color: var(--primary); margin-left: 8px; }
.group-head svg { color: var(--text4); transition: transform .2s ease; }
.group[data-open="false"] .group-head svg { transform: rotate(180deg); }
.group[data-open="false"] .group-body { display: none; }
.group-body { background: #FFF9F5; padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.group-desc { margin: 0; padding: 12px 14px; font-size: 13px; font-weight: 500; color: var(--primary); background: rgba(142,77,45,.08); border-radius: 10px; }
.policies { display: flex; flex-direction: column; gap: 12px; }
.policy-cat { align-self: flex-start; font-size: 11px; font-weight: 600; color: var(--text3); background: #f5f5f5; border-radius: 6px; padding: 2px 8px; letter-spacing: -.2px; }
.policy-cat.special { background: #EDE7F6; color: #6A3FA0; }
.one { margin: 0; font-size: 16px; font-weight: 700; color: var(--primary); letter-spacing: -.3px; line-height: 1.4; }
.kv { display: grid; grid-template-columns: 34px 1fr; gap: 6px 10px; margin: 0; font-size: 13px; line-height: 1.55; }
.kv dt { color: var(--text4); font-weight: 500; }
.kv dd { margin: 0; color: var(--text2); }
.dday { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; font-weight: 700; color: var(--primary); }
.dday.soon { color: #C62828; }
.dday.past { color: var(--text4); font-weight: 500; }
.dday .pill { font-size: 12px; padding: 1px 8px; border-radius: 9999px; background: var(--peach-l); white-space: nowrap; }
.dday.soon .pill { background: #FFEBEE; }
.dday.past .pill { background: #f0f0f0; }
.subhead { margin: 4px 0 0; font-size: 12px; font-weight: 600; color: var(--text4); display: flex; align-items: center; gap: 8px; }
.subhead::after { content: ""; flex: 1; height: 1px; background: rgba(0,0,0,.06); }
.birth-line { font-size: 13px; color: var(--text2); display: flex; align-items: center; gap: 6px; }
.birth-line b { color: var(--primary); }
.policy { background: #fff; border-radius: 14px; border: 1px solid rgba(142,77,45,.1); box-shadow: 0 2px 12px rgba(0,0,0,.06); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.policy-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.policy-head h4 { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.5; letter-spacing: -.2px; flex: 1; }
.policy-head h4 a { color: inherit; }
.policy-head h4 a:hover { color: var(--primary); }
.policy-head .icon-btn { width: 32px; height: 32px; margin: -6px -8px -6px 0; color: var(--primary); }
.amount { align-self: flex-start; display: inline-flex; align-items: flex-start; gap: 8px; padding: 10px 14px; background: linear-gradient(135deg, #e8f5e9, #c8e6c9); border-radius: 10px; font-size: 15px; font-weight: 700; color: #1b5e20; letter-spacing: -.3px; line-height: 1.4; }
.amount svg { margin-top: 2px; }
.how { margin: 0; font-size: 13px; color: var(--text3); line-height: 1.6; }
.deadline { margin: 0; padding: 10px 12px; font-size: 13px; color: var(--text2); line-height: 1.6; background: var(--cream); border-radius: 8px; border-left: 3px solid var(--primary-tint); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 11px; font-weight: 500; color: #fff; }
.tag.sigungu { background: linear-gradient(135deg, var(--primary), var(--primary-shade)); }
.tag.sido { background: linear-gradient(135deg, #7FB8D2, var(--sky-d)); }
.tag.central { background: linear-gradient(135deg, var(--rose), var(--rose-d)); }
.tag.gray { background: #e8e8e8; color: var(--text2); }

.state { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 48px 24px; text-align: center; color: var(--text3); }
.state .ic { width: 60px; height: 60px; border-radius: 50%; background: var(--peach-l); display: flex; align-items: center; justify-content: center; color: var(--primary); }
.state h3 { margin: 0; font-size: 18px; font-weight: 600; color: var(--text1); }
.state p { margin: 0; font-size: 14px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--light-shade); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 16px; right: 16px; bottom: 24px; background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.15); padding: 14px 16px; font-size: 14px; text-align: center; z-index: 20; opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }
.footer { margin-top: 32px; font-size: 12px; color: var(--text4); text-align: center; line-height: 1.7; }
.footer a { color: var(--text3); text-decoration: underline; }

@media (min-width: 768px) {
  .hero { padding: 32px 0 28px; }
  .hero h2 { font-size: 32px; }
  .card.region { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
  .card.region .select-row { border-bottom: 0; }
  .cta-wrap { padding-top: 32px; }
  .container { padding-bottom: 48px; }
  .results { padding-top: 24px; }
  .summary h2 { font-size: 28px; }
  .policies { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toast { left: 50%; right: auto; min-width: 280px; transform: translate(-50%, 8px); }
  .toast.show { transform: translate(-50%, 0); }
}
