/* 냥코 뽑기 도우미 화면 꾸밈
   원칙: 색은 먹색과 노랑 두 가지, 글꼴은 한 가지, 모서리는 6px, 그림자는 떠 있는 창에만 씁니다. */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-dynamic-subset.min.css');

:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --soft: #f0eee8;
  --ink: #1c1c1e;
  --muted: #66666c;
  --faint: #929298;
  --line: #dcd8ce;
  --line-strong: #b5b0a4;
  --accent: #ffcf33;
  --accent-soft: #fff4c7;
  --accent-ink: #5f4a00;
  --ok: #1f6f4a;
  --ok-soft: #e5f2e9;
  --bad: #a8323e;
  --bad-soft: #fbe9ea;
  --radius: 6px;
  /* 예전 이름. 다른 파일이 아직 쓸 수 있어서 남겨 둡니다 */
  --white: var(--surface);
  --border: var(--line);
  font-family: 'Pretendard', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; overflow-x: hidden; line-height: 1.6; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
[hidden] { display: none !important; }
.wrap { width: min(1040px, calc(100% - 48px)); margin-inline: auto; }

/* 상단 */
.site-header { height: 60px; border-bottom: 1px solid var(--line); background: var(--surface); }
.header-inner, .header-right, .brand { display: flex; align-items: center; }
.header-inner { height: 100%; justify-content: space-between; }
.brand { border: none; padding: 0; background: none; font-weight: 800; font-size: 18px; letter-spacing: -.4px; }
.header-right { gap: 14px; }
.header-caption { font-size: 12px; color: var(--faint); }
.state-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 12px; font-weight: 700; white-space: nowrap; }
.state-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); }
.state-pill--empty { color: var(--muted); background: var(--surface); }
.state-pill--ready { color: var(--ok); background: var(--ok-soft); border-color: #bcdcc8; }
.state-pill--ready::before { background: var(--ok); }

/* 홈 */
.hero { padding: 56px 0 36px; }
.hero-copy { max-width: 640px; }
.hero h1 { margin: 0 0 16px; font-weight: 800; font-size: clamp(32px, 4.6vw, 48px); letter-spacing: -1.4px; line-height: 1.25; word-break: keep-all; }
.highlight { box-shadow: inset 0 -.42em 0 var(--accent); }
.hero-description { max-width: 520px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.75; word-break: keep-all; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.hero-note { margin-top: 14px; color: var(--faint); font-size: 13px; }

.button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 20px; border-radius: var(--radius); border: 1px solid transparent; font-weight: 700; font-size: 14px; transition: background .15s, border-color .15s; }
.button--primary { color: #fff; background: var(--ink); }
.button--primary:hover:not(:disabled) { background: #000; }
.button--light { background: var(--surface); border-color: var(--line-strong); }
.button--light:hover:not(:disabled) { background: var(--soft); border-color: var(--ink); }
.button:disabled { cursor: not-allowed; color: #fff; background: #c4c0b6; border-color: transparent; }
.button--light:disabled { color: var(--faint); background: var(--soft); border-color: var(--line); }
/* 기다리는 동안 도는 표시 */
.button.is-busy::before, .ai-status.is-busy::before, .is-loading::before {
  content: ''; flex: none; display: inline-block; width: 13px; height: 13px; margin-right: 8px; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite;
}
.button.is-busy::before { margin-right: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.steps-strip { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.step { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 700; white-space: nowrap; }
.step-number { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 12px; }
.step-arrow { color: var(--line-strong); }

.features { padding-top: 48px; scroll-margin-top: 20px; }
.section-heading { margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.6px; }
.section-summary { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.feature-card { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 18px 18px 16px; display: flex; flex-direction: column; transition: border-color .15s; }
.feature-card:hover { border-color: var(--ink); }
.feature-card--locked { background: transparent; color: var(--muted); }
.feature-card--locked:hover { border-color: var(--line-strong); }
.feature-card--primary { border-top: 4px solid var(--accent); padding-top: 15px; }
.feature-top { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.feature-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 4px; background: var(--soft); font-size: 13px; font-weight: 800; }
.feature-card--locked .feature-icon { background: var(--line); }
.feature-star { font-size: 11px; font-weight: 800; padding: 3px 7px; border-radius: 4px; background: var(--accent); color: var(--ink); }
.feature-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.feature-card p { margin: 0 0 16px; font-size: 13px; color: var(--muted); line-height: 1.7; word-break: keep-all; }
.feature-action { margin-top: auto; font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.feature-card--locked .feature-action { color: var(--faint); text-decoration: none; }
.tip-banner { margin: 28px 0 72px; padding: 14px 18px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.tip-banner p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; word-break: keep-all; }
.tip-banner strong, .tip-banner b { color: var(--ink); }
.home-seed-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin: 24px 0 0; }
.home-seed-panel strong { font-size: 13px; }
.home-seed-panel p { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.home-seed-panel output { font-size: 16px; }

/* 기능 화면 공통 */
.screen--detail { padding: 28px 0 88px; min-height: 70vh; }
.back-button { border: none; padding: 6px 0; background: none; color: var(--muted); font-size: 13px; font-weight: 700; }
.back-button:hover { color: var(--ink); }
.detail-header { margin: 18px 0 22px; max-width: 790px; }
.detail-header h1 { margin: 0 0 6px; font-size: 30px; font-weight: 800; letter-spacing: -.8px; }
.detail-header p:last-child { margin: 0; color: var(--muted); font-size: 14px; word-break: keep-all; }
.panel { max-width: 790px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 24px; }
.panel-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.panel-row--spaced { margin-top: 28px; }
.panel-row label { font-size: 14px; font-weight: 800; }
.field-note { color: var(--faint); font-size: 12px; }
select, .results-grid input, .cat-select input, .app-panel .field { width: 100%; min-height: 46px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 0 12px; outline: none; }
select:disabled { color: var(--faint); background: var(--soft); }
.results-grid input:focus, .cat-select input:focus, .app-panel .field:focus, select:focus { border-color: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.results-grid input::placeholder, .cat-select input::placeholder { color: var(--faint); }
.results-grid .cat-row { display: flex; gap: 10px; align-items: center; min-width: 0; }
.results-grid .cat-row > label { min-width: 46px; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.checkbox-label { display: flex; align-items: center; gap: 8px; margin: 22px 0; font-size: 13px; color: var(--muted); }
input[type="checkbox"] { accent-color: var(--ink); }
.panel-submit { width: 100%; }
.setup-notice, .help-text { color: var(--muted); font-size: 12px; line-height: 1.8; }
.setup-notice { margin: 16px 0 0; }
.engine-note { font-size: 12px; line-height: 1.8; color: var(--muted); max-width: 790px; margin: 12px 0 0; }

/* 캐릭터 고르기 */
.cat-select { min-width: 0; flex: 1; position: relative; }
.cat-select input.is-selected { border-color: var(--ok); background: var(--ok-soft); }
.cat-select input[aria-invalid="true"] { border-color: var(--bad); }
.cat-options { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 4px; list-style: none; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--surface); box-shadow: 0 10px 24px rgba(0, 0, 0, .14); max-height: 295px; overflow-y: auto; scrollbar-width: thin; }
.cat-option { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 10px; background: transparent; border: 0; border-radius: 4px; text-align: left; font-size: 13px; }
.cat-option:hover, .cat-option.is-active, .cat-options li[role="option"].is-active .cat-option { background: var(--accent-soft); }
.cat-filter-row { position: sticky; top: -4px; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); margin: -4px -4px 4px; padding: 8px; }
.cat-filter-buttons { display: flex; flex-wrap: wrap; gap: 5px; }
.cat-filter-chip { border: 1px solid var(--line-strong); border-radius: 4px; background: var(--surface); color: var(--muted); padding: 4px 8px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.cat-filter-chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-filter-chip:disabled { opacity: .4; cursor: default; }
.cat-group-heading { padding: 8px 10px 3px; color: var(--faint); font-size: 11px; font-weight: 800; }
.cat-empty { font-size: 12px; padding: 14px; color: var(--muted); }
.picker-target .cat-select, .upcoming-quickfind .cat-select { width: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--ink); background: var(--accent-soft); padding: 4px 6px 4px 10px; border-radius: 4px; font-size: 13px; font-weight: 700; }
.chip button { border: none; background: none; font-weight: 800; padding: 0 4px; }

/* 등급 표시. 울슈레는 노랑, 레전드는 먹색으로 눈에 띄게 */
.rarity-pill { flex: none; border: 1px solid var(--line); border-radius: 4px; font-size: 11px; padding: 2px 6px; font-weight: 700; background: var(--surface); color: var(--muted); white-space: nowrap; }
.rarity-pill.rarity-3 { border-color: var(--line-strong); color: var(--ink); }
.rarity-pill.rarity-4 { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 800; }
.rarity-pill.rarity-5 { background: var(--ink); border-color: var(--ink); color: var(--accent); font-weight: 800; }
.cat-option .rarity-pill { min-width: 44px; text-align: center; }

/* 시드 찾기 */
.bonus-field { margin: 18px 0 0; padding: 14px; background: var(--accent-soft); border: 1px solid var(--accent); border-radius: var(--radius); }
.bonus-label { font-size: 13px; font-weight: 800; color: var(--accent-ink); margin-bottom: 8px; }
.bonus-field .cat-row > label { display: none; }
.seed-method { margin-top: 18px; padding: 14px 16px 12px; background: var(--accent-soft); border: 2px solid var(--ink); border-radius: var(--radius); }
.seed-method-title { font-size: 12px; font-weight: 800; color: var(--accent-ink); margin-bottom: 6px; }
.seed-method-check { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; cursor: pointer; }
.seed-method-check input { width: 22px; height: 22px; flex: none; cursor: pointer; }
.seed-method-note { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink); }
.seed-actions { display: flex; gap: 10px; align-items: stretch; margin-top: 22px; }
.seed-actions #seed-submit { flex: 1; }
.search-progress { margin: 18px 0 0; }
.progress-line { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.search-progress progress { width: 100%; height: 10px; accent-color: var(--ink); }
.seed-feedback { border: 1px solid var(--line); border-radius: var(--radius); margin: 14px 0 0; padding: 11px 14px; font-size: 13px; line-height: 1.7; background: var(--soft); }
.seed-feedback.is-error { color: var(--bad); background: var(--bad-soft); border-color: #eec3c7; }
.seed-feedback.is-success { color: var(--ok); background: var(--ok-soft); border-color: #bcdcc8; }
.seed-value-panel { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 16px; padding: 16px 18px; }
.seed-value-top { display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 10px; }
.seed-value-subtitle { font-size: 12px; color: var(--muted); }
.seed-number-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding: 10px 0; flex-wrap: wrap; }
.seed-number-row > span { font-size: 13px; font-weight: 700; }
.seed-number-row > span small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
.seed-number-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seed-number-actions output, .home-seed-panel output { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; user-select: all; overflow-wrap: anywhere; }
.seed-copy-btn { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 12px; background: var(--surface); font-size: 12px; font-weight: 700; }
.seed-copy-btn:hover { border-color: var(--ink); }
.seed-value-help { font-size: 12px; color: var(--muted); line-height: 1.8; margin: 4px 0 0; }

/* 기능 화면 안쪽 */
.app-panel { margin-bottom: 16px; }
.app-panel h2 { font-size: 19px; margin: 0 0 12px; letter-spacing: -.3px; }
.app-panel h3 { font-size: 15px; margin: 22px 0 8px; }
.app-panel label { display: block; font-weight: 700; font-size: 13px; margin: 14px 0 6px; }
.app-panel .panel-row { margin-top: 22px; }
.app-panel .full-btn { width: 100%; margin: 12px 0 0; }
.form-columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.form-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.form-actions .button { min-width: 150px; }
.upcoming-quickfind { margin: 16px 0 20px; padding: 14px; border: 1px solid var(--line); background: var(--soft); border-radius: var(--radius); }
.upcoming-quickfind > strong { font-size: 14px; }
.upcoming-quickfind .help-text { margin: 4px 0 6px; }
.upcoming-filter-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.upcoming-filter-actions .button { flex: 1; min-width: 160px; }

.prediction-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.prediction-item, .mini-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); background: var(--surface); }
.prediction-num { min-width: 44px; font-weight: 700; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.prediction-name { min-width: 0; flex: 1; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }
.item-extra { display: block; font-size: 11px; font-weight: 700; color: var(--accent-ink); margin-top: 1px; }
.is-rarity-4 { background: var(--accent-soft); border-color: var(--accent); }
.is-rarity-4 .prediction-name { font-weight: 800; }
.is-rarity-5 { background: var(--ink); border-color: var(--ink); color: #fff; }
.is-rarity-5 .prediction-num, .is-rarity-5 .item-extra { color: var(--accent); }
/* 눌러서 여는 칸은 글자색을 물려받게 돼 있어서, 레전드 칸의 이름 색은 여기서 직접 정합니다 */
.prediction-item.is-rarity-5, .mini-item.is-rarity-5 { color: #fff; }
.is-rarity-5 .prediction-name { color: #fff; font-weight: 800; }
.prediction-item.is-highlight { outline: 2px solid var(--ink); outline-offset: 1px; }
.prediction-empty { grid-column: 1 / -1; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 18px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.review-box { margin-top: 16px; padding: 14px; background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); }
.mini-list { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.mini-item { width: auto; padding: 6px 8px; font-size: 12px; }

/* 가챠 계획 */
.plan-rule-note { background: var(--soft); padding: 10px 14px; border-radius: var(--radius); }
.plan-verification { padding: 10px 14px; border: 1px solid #bcdcc8; border-radius: var(--radius); color: var(--ok); background: var(--ok-soft); font-size: 13px; font-weight: 700; line-height: 1.6; }
.plan-verification.is-limited { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-grid > div { padding: 12px 14px; }
.stat-grid > div + div { border-left: 1px solid var(--line); }
.stat-grid span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.stat-grid strong { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.plan-steps { margin: 16px 0; display: grid; gap: 8px; }
.plan-step { padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: var(--radius); }
.plan-step strong { font-size: 14px; white-space: pre-wrap; }
.plan-step p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.summary-text { font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: keep-all; }
.muted-box { background: var(--soft); padding: 12px 14px; border-radius: var(--radius); }
.muted-box.is-loading { color: var(--muted); }
.goal-summary { font-size: 13px; line-height: 1.8; white-space: pre-line; }
.ai-connection-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin: 14px 0 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); }
.ai-connection-row strong { font-size: 13px; }
.ai-connection-row p { margin: 2px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.ai-connection-row .button { font-size: 12px; min-height: 38px; flex-shrink: 0; }
.ai-explanation-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 22px 0 8px; }
.ai-explanation-heading h3 { margin: 0; }
.ai-status { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; color: var(--muted); }
.ai-status.is-success { color: var(--ok); background: var(--ok-soft); border-color: #bcdcc8; }
.ai-status.is-warning { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent); }
.ai-status.is-busy { color: var(--ink); border-color: var(--ink); }
.ai-retry-btn { margin-top: 10px; }

/* AI에게 물어보기 */
.app-panel textarea.ask-question { width: 100%; min-height: 84px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); resize: vertical; line-height: 1.6; outline: none; }
.app-panel textarea.ask-question:focus { border-color: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
.ask-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ask-examples .cat-filter-chip { font-size: 12px; padding: 6px 10px; white-space: normal; text-align: left; }
.ask-context-box { margin-top: 14px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.ask-context-box summary { cursor: pointer; font-size: 13px; font-weight: 700; }
.ask-context { margin: 10px 0 0; font: inherit; font-size: 12px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--muted); max-height: 320px; overflow-y: auto; }

/* 캐릭터 찾기, 내 위치 다시 찾기 */
.banner-search-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.banner-result-card { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 14px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.banner-result-card.has-result { border-left: 4px solid var(--accent); }
.banner-result-card.no-result { background: transparent; color: var(--muted); }
.banner-result-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; }
.banner-result-header strong { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.banner-result-period { color: var(--muted); font-size: 12px; }
.banner-result-main { font-size: 15px; font-weight: 800; margin: 2px 0; }
.no-result .banner-result-main { font-weight: 600; font-size: 13px; }
.banner-result-help { color: var(--muted); font-size: 12px; margin: 0; }
.banner-result-link { margin-top: auto; align-self: flex-start; font-size: 12px; min-height: 36px; padding: 0 12px; }
.relocate-rows { display: grid; gap: 10px; }
.relocate-row { background: var(--soft); border-radius: var(--radius); border: 1px solid var(--line); padding: 12px; display: grid; grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1.25fr); gap: 10px; align-items: center; }
.relocate-row .field, .relocate-row .cat-select { min-width: 0; }
.relocate-row label { margin: 0; }
.relocate-row .cat-input { width: 100%; }
.relocate-row .bonus-check { grid-column: 2 / 4; font-size: 12px; font-weight: 400; margin: 0; display: flex; align-items: center; gap: 7px; }

/* 하단, 알림 */
.site-footer { padding: 24px 0 32px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.site-footer strong { font-size: 13px; }
.site-footer p, .footer-meta { margin: 4px 0 0; color: var(--faint); font-size: 12px; line-height: 1.7; }
.footer-meta { display: flex; flex-direction: column; align-items: flex-end; margin: 0; }
.toast { position: fixed; z-index: 10; left: 50%; bottom: 64px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: var(--radius); font-size: 13px; font-weight: 700; box-shadow: 0 10px 24px rgba(0, 0, 0, .2); text-align: center; max-width: calc(100vw - 32px); }
.demo-notice { position: fixed; z-index: 9; left: 50%; bottom: 12px; transform: translateX(-50%); background: var(--accent-soft); border: 1px solid var(--accent); color: var(--accent-ink); padding: 5px 12px; border-radius: 4px; font-size: 12px; text-align: center; max-width: calc(100vw - 24px); }

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .prediction-list, .form-columns, .banner-search-results, .relocate-row { grid-template-columns: 1fr; }
  .form-columns { gap: 0; }
  .stat-grid { grid-template-columns: 1fr; }
  .stat-grid > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .relocate-row .bonus-check { grid-column: auto; }
  .form-actions .button { flex: 1; }
  .banner-result-link { width: 100%; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 32px); }
  .header-caption { display: none; }
  .hero { padding: 36px 0 28px; }
  .hero-description { font-size: 15px; }
  .steps-strip { flex-wrap: wrap; gap: 8px 12px; }
  .step { font-size: 13px; }
  .feature-grid { grid-template-columns: 1fr; }
  .tip-banner { margin: 22px 0 56px; }
  .footer-inner { flex-direction: column; }
  .footer-meta { align-items: flex-start; }
  .screen--detail { padding: 20px 0 72px; }
  .detail-header h1 { font-size: 25px; }
  .panel { padding: 18px 14px; }
  .results-grid { grid-template-columns: 1fr; }
  .seed-actions { flex-wrap: wrap; }
  .seed-actions #seed-cancel { width: 100%; }
  .seed-number-row, .home-seed-panel { align-items: flex-start; flex-direction: column; }
  .seed-number-actions { justify-content: space-between; width: 100%; }
  .ai-connection-row { align-items: stretch; flex-direction: column; }
  .ai-connection-row .button { align-self: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .button.is-busy::before, .ai-status.is-busy::before, .is-loading::before { animation-duration: 2.4s; }
}

.seed-methods { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }

#ask-log { display:grid; gap:12px; max-height:55vh; overflow:auto; }
.ask-bubble { max-width:90%; min-width:0; padding:12px 16px; border:1px solid var(--line); border-radius:var(--radius); overflow-wrap:anywhere; }
.ask-bubble.from-user { justify-self:end; background:var(--accent-soft); }
.ask-bubble.from-ai { justify-self:start; }
.ask-bubble p { white-space:pre-wrap; margin:6px 0; }

/* AI 상담: 이해한 조건, 후보 카드 */
.ask-understood { margin: 10px 0 0; padding: 8px 12px; border-left: 4px solid var(--ink); background: var(--accent-soft); font-size: 13px; line-height: 1.6; }
.ask-cards { display: grid; gap: 8px; margin-top: 12px; }
.ask-cards-head { margin: 0; font-size: 13px; font-weight: 700; }
.ask-card { padding: 10px 12px; border: 1px solid var(--line); border-left-width: 4px; border-radius: var(--radius); background: #fff; color: var(--ink); }
.ask-card.is-rarity-4 { border-left-color: var(--accent); background: #fff; }
.ask-card.is-rarity-5 { border-left-color: var(--ink); background: #fff; color: var(--ink); }
.ask-card-top { display: flex; align-items: center; gap: 10px; }
.ask-card-top .cat-icon { width: 44px; height: 33px; object-fit: contain; flex: none; }
.ask-card-top strong { display: block; font-size: 15px; }
.ask-card-top small { color: var(--muted); font-size: 12px; }
.ask-bubble .ask-card p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; white-space: normal; }
.ask-card-stats { font-variant-numeric: tabular-nums; }
.ask-card-line { color: var(--muted); }
.ask-card-why { font-weight: 700; }
