/* 사이트 화면 스타일 */
:root {
  --bg: #f7f2ea;
  --paper: #fffdf9;
  --ink: #2a2522;
  --muted: #7a6f66;
  --line: #e6ddd2;
  --accent: #8c3b2b;
  --accent-ink: #fffdf9;
  --accent-soft: #f6ebe4;
  --gold: #b08a3e;
  --error: #b3261e;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Noto Sans KR', system-ui, sans-serif;
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
[hidden] { display: none !important; }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; max-width: 1080px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: 'Noto Serif KR', serif; font-weight: 700; font-size: 19px; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 19px; }
.beta { font-size: 13px; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; }

.hero { padding: 56px 20px 64px; text-align: center; background: radial-gradient(ellipse at top, #fbf6ef 0%, var(--bg) 70%); }
.hero-inner { max-width: 720px; margin: 0 auto; }
.eyebrow { color: var(--gold); font-weight: 700; letter-spacing: 1px; margin: 0 0 12px; }
.hero h1 { font-family: 'Noto Serif KR', serif; font-size: clamp(30px, 6vw, 46px); line-height: 1.35; margin: 0 0 18px; }
.lead { font-size: 17px; color: #4c443e; margin: 0 auto 28px; max-width: 600px; }
.hero-note { color: var(--muted); font-size: 14px; margin-top: 14px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 12px; padding: 14px 26px; font-size: 16px; font-weight: 700; border: 1.5px solid var(--accent); cursor: pointer; text-decoration: none; font-family: inherit; transition: transform .1s ease, box-shadow .2s ease; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(140, 59, 43, .22); }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(140, 59, 43, .3); }
.btn-ghost { background: transparent; color: var(--accent); }
.btn-sm { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid rgba(176, 138, 62, .5); outline-offset: 2px; }

.section { max-width: 1000px; margin: 0 auto; padding: 48px 20px; }
.section-title { font-family: 'Noto Serif KR', serif; font-size: 28px; text-align: center; margin: 0 0 28px; }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.feature h3 { margin: 10px 0 6px; font-size: 17px; }
.feature p { margin: 0; color: #5a514a; font-size: 14.5px; }
.f-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); font-family: 'Noto Serif KR', serif; font-size: 22px; font-weight: 700; }

.products { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.product { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; }
.product.featured { border: 2px solid var(--accent); }
.p-badge { position: absolute; top: -13px; left: 24px; background: var(--accent); color: var(--accent-ink); font-size: 13px; padding: 3px 12px; border-radius: 999px; }
.p-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.p-head h3 { margin: 0; font-family: 'Noto Serif KR', serif; font-size: 22px; }
.p-pages { color: var(--gold); font-weight: 700; }
.p-price { margin: 8px 0 14px; color: var(--muted); }
.p-price b { color: var(--accent); font-size: 19px; }
.product ul { margin: 0 0 22px; padding-left: 20px; flex: 1; }
.product li { margin-bottom: 6px; }

.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 28px; max-width: 640px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
fieldset { border: none; margin: 0; padding: 0; min-width: 0; }
legend, .field > span { display: block; font-weight: 700; margin-bottom: 8px; font-size: 15px; padding: 0; }
.field { display: block; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input[type="text"], select { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; font-family: inherit; background: #fff; color: var(--ink); appearance: none; -webkit-appearance: none; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }
select:disabled { opacity: .45; }
.date-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; margin-top: 8px; }
fieldset .date-row:first-of-type { margin-top: 0; }
.seg { display: inline-flex; background: #f1eae0; border-radius: 10px; padding: 3px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: block; padding: 8px 18px; border-radius: 8px; cursor: pointer; font-weight: 500; }
.seg input:checked + span { background: #fff; color: var(--accent); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.seg input:focus-visible + span { outline: 3px solid rgba(176, 138, 62, .5); }
.seg-sm span { padding: 5px 14px; font-size: 14px; }
.check { display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.agree { background: #faf6f0; border-radius: 10px; padding: 12px 14px; font-size: 14px; color: #5a514a; }
.hint { color: var(--muted); font-size: 13.5px; margin: 8px 0 0; }
.center { text-align: center; }
.error { color: var(--error); margin: 0; min-height: 1em; font-weight: 500; }
.tier-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tier-pick legend { grid-column: 1 / -1; }
.radio-card { position: relative; display: block; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; }
.radio-card span { display: block; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; background: #fff; }
.radio-card input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.radio-card input:focus-visible + span { outline: 3px solid rgba(176, 138, 62, .5); }
.advanced { border-top: 1px dashed var(--line); padding-top: 12px; }
.advanced summary { cursor: pointer; color: var(--muted); font-size: 14.5px; }
.advanced .field { margin-top: 12px; }

.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; max-width: 760px; margin: 0 auto 10px; }
.faq summary { cursor: pointer; font-weight: 700; }
.faq p { margin: 10px 0 0; color: #5a514a; }

.footer { text-align: center; color: var(--muted); font-size: 13.5px; padding: 40px 20px 60px; border-top: 1px solid var(--line); margin-top: 30px; }
.footer p { margin: 4px 0; }

.viewer-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: rgba(247, 242, 234, .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.viewer-title { flex: 1; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-actions { display: flex; gap: 8px; }
#report-root { padding: 24px 16px; }
.viewer-foot { text-align: center; padding: 10px 20px 60px; color: #5a514a; }

.loading { position: fixed; inset: 0; z-index: 50; background: rgba(247, 242, 234, .96); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.spinner { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 1.1s linear infinite; display: grid; place-items: center; }
.spinner span { animation: spin 1.1s linear infinite reverse; font-family: 'Noto Serif KR', serif; font-size: 30px; color: var(--accent); }
#loading-text { font-weight: 500; color: #4c443e; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner, .spinner span { animation: none; } html { scroll-behavior: auto; } }

@media (max-width: 860px) {
  .features { grid-template-columns: 1fr 1fr; }
  .products { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .features, .row { grid-template-columns: 1fr; }
  .hero { padding: 36px 16px 44px; }
  .section { padding: 36px 16px; }
  .form-card, .product { padding: 20px 16px; }
  .viewer-title { display: none; }
  .viewer-bar { justify-content: space-between; }
  #report-root { padding: 14px 8px; }
}

@media print {
  body { background: #fff; }
  .no-print, #landing, .footer { display: none !important; }
  #viewer { display: block !important; }
  #report-root { padding: 0; }
}
.preview-note { font-size: 13px; color: var(--muted); }
.seg-wrap { flex-wrap: wrap; }
.date-row.two { grid-template-columns: 1fr 1fr; }
#time-exact, #time-branch { margin-top: 10px; }
.gate { position: fixed; inset: 0; z-index: 100; background: var(--bg); display: grid; place-items: center; padding: 20px; }
.gate-card { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 32px 26px; max-width: 380px; width: 100%; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.gate-card h2 { margin: 6px 0 0; font-family: 'Noto Serif KR', serif; }
.gate-card p { margin: 0; color: #5a514a; }
.gate-card input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: 16px; text-align: center; }
body.gated { overflow: hidden; }

/* 언어 전환 버튼 */
.lang-switch { display: flex; gap: 2px; background: #efe7dc; border-radius: 999px; padding: 3px; }
.lang-switch button { border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; padding: 6px 11px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.lang-switch button[aria-pressed="true"] { background: #fff; color: var(--accent); font-weight: 700; box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.lang-switch button:focus-visible { outline: 3px solid rgba(176, 138, 62, .5); }
.lang-switch .l-short { display: none; }
.beta-pill { display: inline-block; font-size: 13px; color: var(--accent); background: var(--accent-soft); padding: 4px 12px; border-radius: 999px; margin: 0 0 14px; }
.culture-lead { max-width: 720px; margin: -8px auto 26px; text-align: center; color: #4c443e; font-size: 16px; }
#f-place { margin-top: 0; }
#place-label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 15px; }
#custom-place { margin-top: 10px; }
input[type="text"] { min-width: 0; }
button.preview-note { border: 0; background: none; font: inherit; }
@media (max-width: 680px) {
  .topbar { gap: 10px; padding: 12px 14px; }
  .brand { font-size: 16px; min-width: 0; }
  .brand span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lang-switch .l-long { display: none; }
  .lang-switch .l-short { display: inline; }
  .lang-switch button { padding: 6px 9px; }
}

/* 언어별 글꼴: 한자 모양이 언어마다 달라서 그 언어 글꼴을 먼저 써요 */
html:lang(zh) body, .report:lang(zh) { font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', 'Noto Sans KR', system-ui, sans-serif; }
html:lang(ja) body { font-family: 'Hiragino Sans', 'Yu Gothic', 'Meiryo', 'Noto Sans JP', 'Noto Sans KR', system-ui, sans-serif; }
html:lang(en) body, html:lang(es) body, html:lang(zh) body, html:lang(ja) body { word-break: normal; }
html:lang(ja) body { line-break: strict; }
.have-key { margin-top: 18px; }
.legal-wrap { max-width: 760px; }
.legal h1 { font-family: 'Noto Serif KR', serif; margin: 8px 0 6px; }
.legal h2 { margin: 40px 0 10px; scroll-margin-top: 80px; }
.legal h3 { font-size: 17px; margin: 22px 0 6px; }
.legal p, .legal li { line-height: 1.75; }
.legal-nav { margin: 14px 0 0; }
.legal-links a { color: inherit; }
.notice { background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 10px 14px; margin: 10px 0 0; font-weight: 500; font-size: 14.5px; }
