/* 테마 사주 주제·추가 입력 — 2026-10-31 구조 정리로 index.html <style> 787~887줄에서 옮김. 파일 번호 순서대로 읽어야 함(뒤 규칙이 앞 규칙을 덮음) */
/* ---- 테마 사주: 주제 바둑판 (2026-10-02) ---- */
.theme-detail-desc{margin:0 0 14px!important}
.theme-report-title{font-weight:700;font-size:1rem;margin:0 0 10px}
    .theme-age-note{margin:-4px 0 12px;font-size:13px;color:var(--muted,#8a8478);}
.theme-link-row{display:flex;flex-wrap:wrap;gap:6px;margin:-2px 0 12px}
.theme-link{all:unset;box-sizing:border-box;cursor:pointer;padding:6px 12px;border-radius:999px;border:1px solid var(--line);background:var(--surface);font-size:.8rem;font-weight:600;color:var(--ink)}
@media (hover:hover){.theme-link:hover{background:var(--bg)}}
.theme-link:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
#theme-form{width:380px;max-width:100%;margin:0 auto}
.theme-me-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 8px;font-size:.88rem}
.theme-edit{all:unset;cursor:pointer;font-size:.8rem;color:var(--muted);text-decoration:underline;text-underline-offset:3px}
.theme-edit[hidden]{display:none}
@media (hover:hover){.theme-edit:hover{color:var(--ink)}}
.theme-me-summary{display:flex;align-items:center;gap:10px;padding:11px 14px;border-radius:14px;background:#fbf9f6;background:color-mix(in srgb,var(--bg) 55%,var(--surface));font-size:.88rem;margin-bottom:12px}
.theme-me-summary[hidden]{display:none}
.theme-me-line{flex:1;min-width:0;word-break:keep-all}
/* 보기용 칸: 입력칸과 같은 모양(폭·둥글기·여백), 바탕만 옅게 */
.ro-field{display:flex;align-items:center;justify-content:center;text-align:center;width:234px;max-width:100%;min-height:44px;padding:11px 14px;box-sizing:border-box;border-radius:14px;background:#fbf9f6;background:color-mix(in srgb,var(--bg) 55%,var(--surface));border:1px dashed var(--line);font-size:.95rem;color:var(--ink)}
#theme-form .field-row[data-ro]{margin-bottom:10px}
.theme-extra{margin:14px 0 0;padding:12px 14px;border-radius:14px;border:1px dashed var(--line);font-size:.85rem}
/* 내 정보 상자를 상대방 정보 상자와 같은 배치로 (2026-10-15) */
.theme-me-box{margin:0;display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px}
.theme-me-box>*{grid-column:1 / -1}
.theme-me-box .theme-me-head{grid-row:1;margin:2px 0;font-size:.9rem}
.theme-me-box .theme-me-summary{display:contents}
.theme-me-box .theme-me-summary[hidden]{display:none!important}
.theme-me-box .theme-me-line{grid-column:1;grid-row:2;font-size:.84rem;color:var(--ink);word-break:keep-all}
.theme-me-box .theme-me-line:empty{display:none}
.theme-me-box .theme-edit-inline{grid-column:2;grid-row:1;align-self:center;z-index:1}
.theme-me-box:not(.is-open) .theme-me-head{margin:2px 0}
#theme-me-fields{margin-top:8px}
.theme-me-box+.theme-extra{margin-top:12px}
.theme-extra p{margin:4px 0 0;color:var(--muted)}
/* 궁합·택일·작명 추가 입력 (2026-10-03) */
#theme-extra,.theme-me-box{border-style:solid} /* 내 정보·상대방 정보 상자 같은 테두리 (2026-10-15) */
.xf-label{margin:12px 0 6px;font-size:.82rem;color:var(--muted)}
.xf-choice{display:flex;flex-wrap:wrap;gap:6px}
.xf-choice .chat-pill{padding:7px 13px}
.xf-inline{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.xf-input{box-sizing:border-box;min-height:38px;padding:7px 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font:inherit;font-size:.9rem;max-width:100%}
.xf-input:focus-visible{outline:2px solid var(--accent);outline-offset:1px}
@media (pointer:coarse){.xf-input{font-size:16px}}
.xf-hint{margin:6px 0 0;font-size:.78rem;color:var(--muted)}
/* 추가 입력도 내 정보 입력칸과 같은 모양 (2026-10-05) */
.xf-title{display:block;margin:2px 0 10px;font-size:.9rem}
/* 궁합 (2026-10-15): 상대방 정보는 처음에 접힌 상태 — 제목 줄만 보이고 [입력하기]로 펼침 */
.xf-head{display:flex;align-items:flex-start;justify-content:space-between} /* 버튼을 제목 줄에 맞춤 (내 정보와 같게) */
.xf-head>.theme-edit{margin-top:4px}
.xf-head>.theme-edit.is-chev{margin-top:0}
.theme-edit.is-chev{text-decoration:none;display:inline-flex;align-items:center;justify-content:center;width:32px;height:28px;margin-right:-6px;color:var(--muted);border-radius:8px}
@media (hover:hover){.theme-edit.is-chev:hover{background:var(--bg);color:var(--ink)}}
.xf-head .xf-title{margin:2px 0}
.xf.xf-closed>:not(.xf-head):not(.fold-note){display:none!important}
/* 꺽쇠로 접을 때 빠진 칸 안내 (2026-10-15) */
.fold-note{margin:2px 0 8px;font-size:.82rem;font-weight:600;color:#d93636}
/* [궁합 보기] 때 빠지거나 잘못된 칸: 빨간 테두리 (2026-10-15) */
/* 2026-10-15: 빠진 칸 테두리는 달력 일요일·지역 도 이름과 같은 분홍빛 빨강 (공통 색 --mark) */
:root{--mark:#e0729a}
#theme-form .is-invalid{box-shadow:0 0 0 2px var(--mark)!important;border-color:var(--mark)!important}
#theme-form .theme-extra.is-invalid{box-shadow:0 0 0 1px var(--mark)!important}
#theme-form .xf-choice.is-invalid{border-radius:12px}
.xf-head-text{display:flex;flex-direction:column;min-width:0}
.xf-sum{font-size:.84rem;color:var(--ink);word-break:keep-all}
.xf:not(.xf-closed) .xf-head{margin-bottom:8px}
.theme-extra .field-row:has(.xf-choice) .field-input{width:234px;flex:0 0 234px}
.theme-extra .field-row.has-xf .field-input{width:234px;flex:0 0 234px} /* iOS 15 보조 */
.theme-extra .xf-choice{width:234px;max-width:100%}
.xf-box{border:none;border-radius:14px;background:var(--bg);min-height:44px;padding:11px 14px;text-align:center;text-align-last:center}
#xf-surname.xf-box{flex:1;min-width:0}
#xf-surname-hanja.xf-box{width:84px}
.theme-extra .field-input.xf-inline{width:234px;flex:0 0 234px;flex-wrap:nowrap}
@container (max-width:330px){.theme-extra .field-row:has(.xf-choice) .field-input,.theme-extra .field-input.xf-inline{width:100%;flex:none}}
:where(.fortune-card.cq-narrow) .theme-extra .field-row.has-xf .field-input,:where(.fortune-card.cq-narrow) .theme-extra .field-input.xf-inline{width:100%;flex:none} /* iOS 15 보조 */
.theme-year-pick .choice-field{margin-top:8px;width:auto;max-width:240px}
.theme-year-pick .choice-btn{padding:9px 14px}
@container (max-width:330px){#theme-form{width:234px}.ro-field{width:100%}}
:where(.fortune-card.cq-narrow) #theme-form{width:234px}:where(.fortune-card.cq-narrow) .ro-field{width:100%} /* iOS 15 보조 */

.theme-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
/* 2026-11-04 묶음 ③: PC도 폰처럼 3열 4행 (예전 600px 이상 4열) */
.theme-card{all:unset;box-sizing:border-box;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-height:92px;padding:14px 6px 12px;border-radius:14px;color:var(--ink);text-align:center;cursor:pointer;transition:background-color .15s ease,transform .12s ease;-webkit-tap-highlight-color:transparent}
@media (hover:hover){.theme-card:hover{background:var(--line)}}
.theme-card:active{transform:scale(.97)}
.theme-card:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.theme-card svg{width:26px;height:26px}
.theme-card span{font-size:.84rem;font-weight:600;line-height:1.3;word-break:keep-all}
.theme-plus{font-size:.72rem;font-weight:700;-webkit-text-stroke:.6px currentColor;paint-order:stroke fill} /* 2026-11-05: 전각 ＋가 가늘어 굵기 설정이 티 나지 않음 → 선을 덧댐 (카드 ＋와 아래 안내 줄 ＋ 모두) */
.theme-card .theme-plus{position:absolute;top:7px;right:9px}
.theme-legend{margin:12px 2px 0;font-size:.75rem;color:var(--muted)}
.theme-grid.is-away,.theme-legend.is-away{display:none}
.theme-detail{animation:slideFromRight .26s ease-out}
.theme-detail.no-anim{animation:none} /* 2026-10-30 2-2 5번: 다른 메뉴에서 돌아올 때는 움직임 없이 보던 주제 화면 그대로 */
.theme-detail-head{display:flex;align-items:center;gap:6px;font-size:1.05rem;margin:0;min-width:0} /* 아이콘과 이름 사이 좁힘 (2026-10-15) · 2026-10-16 꺽쇠 오른쪽 줄로 올림 */
.theme-detail-icon{color:var(--accent)} /* 주제 아이콘에 테마 사주 색(초록) */
/* "< 테마"와 주제 이름(궁합 등)의 글씨 모양을 서로 바꿈 (2026-10-15) */
#theme-back{padding:6px 4px 6px 6px}
#theme-detail-name{font-size:1.05rem;font-weight:700;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.theme-detail-icon svg{width:28px;height:28px;display:block}
.theme-detail-desc{margin:0 0 6px;font-size:.9rem}
.theme-detail-need{margin:0;font-size:.82rem;color:var(--muted)}
/* 2026-11-05 묶음 ②: 오늘 운세 맨 아래 카드 — 신년 운세·궁합으로 */
.rp-more{margin:14px 0 0;padding:12px 14px;border-radius:12px;border:1px solid var(--line);background:var(--surface)}
.rp-more .rp-more-t{margin:0 0 8px;font-size:.84rem;color:var(--muted)}
.rp-more .theme-link-row{margin:0}
