/* ============================================================
   사주 위젯 v3 — 밤하늘의 먹빛 남색 + 뮤트 골드
   ============================================================ */
@charset "utf-8";

.sw {
    /* 다크 테마 (기본) */
    --bg: linear-gradient(160deg, #0d1024 0%, #171c3a 55%, #101427 100%);
    --solid: #161a33;
    --card: rgba(255, 255, 255, .045);
    --card-b: rgba(255, 255, 255, .10);
    --t1: #edeaf3;
    --t2: #aaa7c0;
    --t3: #767390;
    --gold: #d9b96c;
    --gold-hi: #f0d28a;
    --gold-dim: rgba(217, 185, 108, .12);
    --red: #e07a72;
    --blue: #7aa5dc;
    --violet: #9187d8;
    --mok: #6cbf84;
    --hwa: #e8837b;
    --to: #d9ab5e;
    --geum: #b9c3d2;
    --su: #6fa3e0;
    --r: 18px;
    --r-sm: 12px;
    --serif: 'Noto Serif KR', 'Nanum Myeongjo', NanumMyeongjo, Batang, serif;

    font-family: 'Noto Sans KR', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: var(--r);
    color: var(--t1);
    max-width: 560px;
    margin: 0 auto;
    box-shadow: 0 16px 48px rgba(5, 6, 20, .45);
    overflow: hidden;
    position: relative;
    line-height: 1.55;
    box-sizing: border-box;
}

.sw[data-theme="light"] {
    /* 라이트 테마 — 한지 */
    --bg: linear-gradient(160deg, #faf6ec 0%, #f3ecdc 60%, #f7f2e6 100%);
    --solid: #f7f2e6;
    --card: rgba(66, 50, 20, .045);
    --card-b: rgba(66, 50, 20, .13);
    --t1: #322e3c;
    --t2: #625d70;
    --t3: #918c9e;
    --gold: #a8823c;
    --gold-hi: #8a6a2b;
    --gold-dim: rgba(168, 130, 60, .12);
    --red: #bf4f48;
    --blue: #3c6ea8;
    --violet: #6a5fb8;
    --mok: #2e7d4f;
    --hwa: #bf4540;
    --to: #a9781f;
    --geum: #6f7f92;
    --su: #2c66a8;
    border-color: rgba(66, 50, 20, .10);
    box-shadow: 0 14px 40px rgba(120, 100, 60, .16);
}

.sw *,
.sw *::before,
.sw *::after { box-sizing: border-box }

/* ---------- 오행 색상 ---------- */
.sw .sw__el--mok { color: var(--mok) }
.sw .sw__el--hwa { color: var(--hwa) }
.sw .sw__el--to { color: var(--to) }
.sw .sw__el--geum { color: var(--geum) }
.sw .sw__el--su { color: var(--su) }

/* ---------- 헤더 ---------- */
.sw__hd {
    padding: 30px 24px 20px;
    text-align: center;
    border-bottom: 1px solid var(--card-b);
    background:
        radial-gradient(ellipse 90% 100% at 50% -30%, var(--gold-dim), transparent 70%);
}

.sw__hd-deco {
    font-family: var(--serif);
    font-size: 13px;
    letter-spacing: .55em;
    text-indent: .55em;
    color: var(--gold);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.sw__hd-deco::before,
.sw__hd-deco::after {
    content: "";
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold));
    opacity: .6;
}

.sw__hd-deco::after {
    background: linear-gradient(270deg, transparent, var(--gold));
}

.sw__title {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--t1);
    margin: 0;
}

.sw__sub {
    font-size: 14px;
    color: var(--t2);
    margin: 8px 0 0;
}

/* ---------- 꿈해몽 연결 ---------- */
.sw__ai-bridge {
    margin: 18px 20px 0;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: var(--r-sm);
}

.sw__ai-bridge strong {
    display: block;
    margin-bottom: 4px;
    color: var(--gold);
    font-size: 15px;
}

.sw__ai-bridge p {
    margin: 0;
    color: var(--t2);
    font-size: 13px;
    line-height: 1.6;
}

.sw__ai-bridge-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.sw__ai-bridge-links a {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 14px;
    color: var(--t1);
    background: var(--gold-dim);
    border: 1px solid var(--card-b);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: border-color .2s, color .2s;
}

.sw__ai-bridge-links a:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ---------- 입력 폼 ---------- */
.sw__form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px 20px 24px;
}

.sw__row {
    display: flex;
    gap: 12px;
}

.sw__row--date .sw__field:first-child { flex: 1.3 }

.sw__field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.sw__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--t2);
    letter-spacing: .02em;
}

.sw__hint {
    font-size: 12px;
    color: var(--t3);
    line-height: 1.5;
}

.sw__input,
.sw__select {
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: 10px;
    padding: 11px 12px;
    font-size: 16px;
    color: var(--t1);
    font-family: inherit;
    transition: border-color .2s, background .2s;
    width: 100%;
    outline: none;
}

.sw__input:focus,
.sw__select:focus {
    border-color: var(--gold);
    background: var(--gold-dim);
}

.sw__input--time { max-width: 170px }

.sw__input::-webkit-calendar-picker-indicator { filter: invert(.6) }
.sw[data-theme="light"] .sw__input::-webkit-calendar-picker-indicator { filter: none }

.sw__select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23918da8'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 30px;
}

.sw__select option {
    background: var(--solid);
    color: var(--t1);
}

.sw__toggle {
    display: flex;
    gap: 0;
    border: 1px solid var(--card-b);
    border-radius: 10px;
    overflow: hidden;
    background: var(--card);
}

.sw__toggle button {
    flex: 1;
    padding: 10px 8px;
    background: transparent;
    border: none;
    font-size: 15px;
    color: var(--t2);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: background .2s, color .2s;
}

.sw__toggle button + button { border-left: 1px solid var(--card-b) }

.sw__toggle button.active {
    background: var(--gold-dim);
    color: var(--gold);
}

.sw__check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--t2);
    cursor: pointer;
    user-select: none;
}

.sw__check input {
    accent-color: var(--gold);
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
}

.sw__time-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.sw__err {
    display: none;
    font-size: 13.5px;
    color: var(--red);
    padding: 10px 14px;
    background: rgba(224, 122, 114, .09);
    border-radius: 10px;
    border: 1px solid rgba(224, 122, 114, .28);
}

.sw__err.show { display: block; animation: sw-shake .3s }

@keyframes sw-shake {
    0%, 100% { transform: translateX(0) }
    25% { transform: translateX(-4px) }
    75% { transform: translateX(4px) }
}

.sw__btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--gold-hi), var(--gold));
    border: none;
    border-radius: var(--r-sm);
    font-size: 17px;
    font-weight: 800;
    color: #221a05;
    cursor: pointer;
    font-family: inherit;
    transition: transform .2s, box-shadow .2s;
    letter-spacing: .02em;
    position: relative;
}

.sw[data-theme="light"] .sw__btn { color: #fffaf0 }

.sw__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(217, 185, 108, .3);
}

.sw__btn.loading { color: transparent; pointer-events: none }

.sw__btn.loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, .15);
    border-top-color: rgba(0, 0, 0, .6);
    border-radius: 50%;
    animation: sw-loader .8s linear infinite;
}

@keyframes sw-loader {
    from { transform: translate(-50%, -50%) rotate(0) }
    to { transform: translate(-50%, -50%) rotate(360deg) }
}

.sw__privacy {
    margin: -6px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--t3);
}

/* ---------- 결과 공통 ---------- */
.sw__result {
    display: none;
    flex-direction: column;
    gap: 14px;
    padding: 22px 20px 26px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .45s ease, transform .45s ease;
}

.sw__result.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.sw__profile {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.sw__badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 13px;
    color: var(--t2);
}

.sw__badge--gold {
    color: var(--gold);
    border-color: var(--gold);
    background: var(--gold-dim);
    font-weight: 700;
}

.sw__sec-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 800;
    color: var(--t1);
    margin-top: 6px;
}

.sw__sec-hanja,
.sw__card-hd-hanja {
    font-family: var(--serif);
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    border: 1px solid var(--gold);
    border-radius: 6px;
    padding: 2px 7px;
    letter-spacing: .12em;
    text-indent: .12em;
    opacity: .9;
    flex-shrink: 0;
}

.sw__card {
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: var(--r-sm);
    padding: 18px 16px;
}

.sw__card-hd {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 800;
    color: var(--t1);
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.sw__card-hd-date {
    margin-left: auto;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--t3);
}

.sw__note {
    font-size: 12.5px;
    color: var(--t3);
    line-height: 1.6;
    margin-top: 12px;
}

.sw__note b { color: var(--t2); font-weight: 600 }

/* ---------- 요약 카드 ---------- */
.sw__summary {
    background: linear-gradient(150deg, var(--gold-dim), transparent 75%), var(--card);
    border: 1px solid var(--gold);
    border-radius: var(--r-sm);
    padding: 18px 18px 14px;
}

.sw__summary-hd {
    font-size: 15px;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sw__summary-hd::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--gold), transparent);
    opacity: .4;
}

.sw__summary ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sw__summary li {
    position: relative;
    padding: 0 0 8px 16px;
    font-size: 14.5px;
    color: var(--t1);
    line-height: 1.65;
}

.sw__summary li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 10px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    opacity: .75;
}

.sw__summary b { color: var(--gold-hi) }
.sw[data-theme="light"] .sw__summary b { color: var(--gold-hi) }

/* ---------- 사주 원국 표 ---------- */
.sw__pillars {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.sw__pillar {
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: var(--r-sm);
    padding: 12px 4px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.sw__pillar--day {
    border-color: var(--gold);
    background: linear-gradient(180deg, var(--gold-dim), transparent 70%), var(--card);
}

.sw__p-label {
    font-size: 13px;
    font-weight: 800;
    color: var(--t1);
}

.sw__pillar--day .sw__p-label { color: var(--gold) }

.sw__p-sub {
    font-size: 10.5px;
    color: var(--t3);
    margin-bottom: 4px;
}

.sw__p-ss {
    font-size: 11px;
    color: var(--t2);
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: 999px;
    padding: 1px 8px;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw__p-ss--me {
    color: var(--gold);
    border-color: var(--gold);
    font-weight: 700;
}

.sw__p-hz {
    font-family: var(--serif);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.25;
}

.sw__p-kr {
    font-size: 11.5px;
    color: var(--t2);
    white-space: nowrap;
}

.sw__p-div {
    width: 70%;
    height: 1px;
    background: var(--card-b);
    margin: 5px 0;
}

.sw__p-jj {
    font-family: var(--serif);
    font-size: 11.5px;
    color: var(--t3);
    letter-spacing: 2px;
    margin-top: 4px;
}

.sw__p-stage {
    font-size: 11px;
    color: var(--violet);
    font-weight: 600;
}

.sw__p-unknown {
    font-family: var(--serif);
    font-size: 34px;
    color: var(--t3);
    margin: 24px 0;
}

.sw__legend {
    font-size: 12px;
    color: var(--t3);
    line-height: 1.7;
    margin-top: 8px;
    padding: 10px 12px;
    background: var(--card);
    border-radius: 10px;
}

.sw__legend b { color: var(--t2) }

.sw__legend [class^="sw__el--"],
.sw__legend [class*=" sw__el--"] {
    font-family: var(--serif);
    margin: 0 2px;
    font-weight: 700;
}

/* ---------- 일간 캐릭터 ---------- */
.sw__person-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.sw__person-icon { font-size: 34px }

.sw__person-name {
    font-size: 17px;
    font-weight: 800;
    color: var(--gold);
    font-family: var(--serif);
}

.sw__person-tag {
    font-size: 13px;
    color: var(--t2);
}

.sw__person-desc {
    font-size: 14.5px;
    color: var(--t1);
    line-height: 1.7;
    margin: 0 0 12px;
    opacity: .92;
}

.sw__proscons {
    display: grid;
    gap: 8px;
    font-size: 13.5px;
    color: var(--t2);
    background: var(--card);
    border-radius: 10px;
    padding: 12px 14px;
    line-height: 1.6;
}

.sw__proscons b {
    display: inline-block;
    min-width: 52px;
    color: var(--t1);
    font-weight: 700;
}

.sw__proscons div:first-child b { color: var(--blue) }
.sw__proscons div:last-child b { color: var(--red) }

/* ---------- 오행 밸런스 ---------- */
.sw__oh-rows {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 12px;
}

.sw__oh-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sw__oh-label {
    width: 62px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--t2);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.sw__oh-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.sw__oh-dot--mok { background: var(--mok) }
.sw__oh-dot--hwa { background: var(--hwa) }
.sw__oh-dot--to { background: var(--to) }
.sw__oh-dot--geum { background: var(--geum) }
.sw__oh-dot--su { background: var(--su) }

.sw__oh-track {
    flex: 1;
    height: 16px;
    background: var(--card);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--card-b);
}

.sw__oh-bar {
    height: 100%;
    border-radius: 999px;
    transition: width .8s cubic-bezier(.2, .7, .3, 1);
    min-width: 3px;
    opacity: .85;
}

.sw__oh-bar--mok { background: var(--mok) }
.sw__oh-bar--hwa { background: var(--hwa) }
.sw__oh-bar--to { background: var(--to) }
.sw__oh-bar--geum { background: var(--geum) }
.sw__oh-bar--su { background: var(--su) }

.sw__oh-cnt {
    width: 32px;
    font-size: 13px;
    font-weight: 700;
    color: var(--t2);
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* 신강/신약 미터 */
.sw__str {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px dashed var(--card-b);
}

.sw__str-scale {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--t3);
    margin-bottom: 5px;
}

.sw__str-track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--su), var(--to), var(--hwa));
    opacity: .9;
}

.sw__str-marker {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--t1);
    border: 3px solid var(--solid);
    box-shadow: 0 1px 6px rgba(0, 0, 0, .4);
    transform: translate(-50%, -50%);
}

.sw__str-desc {
    font-size: 13.5px;
    color: var(--t2);
    line-height: 1.65;
    margin-top: 10px;
}

.sw__str-desc b { color: var(--t1) }

/* 부족 오행 보완 */
.sw__remedy { margin-top: 16px }

.sw__remedy-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 8px;
}

.sw__remedy-card {
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 8px;
}

.sw__remedy-name {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 700;
    color: var(--t1);
    margin-bottom: 8px;
}

.sw__remedy-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px 12px;
    font-size: 13px;
    color: var(--t2);
    line-height: 1.55;
}

.sw__remedy-grid b { color: var(--t1); font-weight: 600 }

/* ---------- 오늘의 운세 ---------- */
.sw__today-main {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sw__gauge {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: conic-gradient(var(--gold) calc(var(--p) * 1%), var(--card-b) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sw__gauge-in {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--solid);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    padding-top: 24px;
}

.sw__gauge-in b {
    font-size: 26px;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}

.sw__gauge-in span {
    font-size: 12px;
    color: var(--t3);
}

.sw__today-txt { min-width: 0 }

.sw__today-ss {
    font-size: 13px;
    color: var(--t2);
}

.sw__today-ss b { color: var(--blue) }

.sw__today-title {
    font-size: 16.5px;
    font-weight: 800;
    color: var(--t1);
    margin: 3px 0 5px;
}

.sw__today-txt p {
    margin: 0;
    font-size: 13.5px;
    color: var(--t2);
    line-height: 1.6;
}

.sw__today-rows {
    margin-top: 14px;
    border-top: 1px dashed var(--card-b);
    padding-top: 6px;
}

.sw__today-row {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    font-size: 13.5px;
    line-height: 1.6;
}

.sw__today-row + .sw__today-row { border-top: 1px solid var(--card-b) }

.sw__today-row span {
    flex-shrink: 0;
    width: 52px;
    font-weight: 700;
    color: var(--gold);
    padding-top: 1px;
}

.sw__today-row p { margin: 0; color: var(--t2) }

.sw__today-notes {
    margin-top: 12px;
    background: var(--gold-dim);
    border: 1px solid var(--card-b);
    border-radius: 10px;
    padding: 10px 13px;
    font-size: 13px;
    color: var(--t1);
    line-height: 1.7;
}

.sw__today-notes b { color: var(--gold) }

/* ---------- 행운 코드 ---------- */
.sw__lucky {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.sw__lucky-item {
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: 10px;
    padding: 12px 6px;
    text-align: center;
}

.sw__lucky-label {
    font-size: 11.5px;
    color: var(--t3);
    margin-bottom: 4px;
}

.sw__lucky-val {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--t1);
    line-height: 1.4;
    word-break: keep-all;
}

/* ---------- 아코디언 ---------- */
.sw__acc-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
    padding: 14px 16px;
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: var(--r-sm);
    font-size: 15px;
    font-weight: 700;
    color: var(--t1);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: border-color .2s;
}

.sw__acc-btn:hover { border-color: var(--gold) }

.sw__acc-btn small {
    font-size: 11.5px;
    font-weight: 500;
    color: var(--t3);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sw__arrow {
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--t3);
    border-bottom: 2px solid var(--t3);
    transform: rotate(45deg);
    transition: transform .25s;
    flex-shrink: 0;
    margin-top: -4px;
}

.sw__acc-btn.open .sw__arrow {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.sw__acc {
    display: none;
}

.sw__acc.show {
    display: block;
    animation: sw-fade .35s ease;
}

@keyframes sw-fade {
    from { opacity: 0; transform: translateY(-6px) }
    to { opacity: 1; transform: translateY(0) }
}

.sw__detail-sec {
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: var(--r-sm);
    padding: 16px;
    margin-bottom: 10px;
}

.sw__detail-title {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--t1);
    margin-bottom: 10px;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.sw__detail-title em {
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    color: var(--gold);
    font-family: var(--serif);
}

/* 표 */
.sw__tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    margin-top: 8px;
}

.sw__tbl th,
.sw__tbl td {
    padding: 8px 4px;
    text-align: center;
    color: var(--t1);
    border-bottom: 1px solid var(--card-b);
}

.sw__tbl th {
    color: var(--t3);
    font-weight: 600;
    font-size: 12px;
}

.sw__tbl td:first-child {
    color: var(--t3);
    font-size: 12px;
}

.sw__stage-good b { color: var(--gold) }
.sw__stage-bad b { color: var(--red) }

/* 알약/키밸류 */
.sw__pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.sw__pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    background: var(--card);
    border: 1px solid var(--card-b);
    color: var(--t2);
    white-space: nowrap;
}

.sw__pill--gold { color: var(--gold); border-color: var(--gold); background: var(--gold-dim) }
.sw__pill--hap { color: var(--mok); border-color: var(--mok); background: rgba(108, 191, 132, .1) }
.sw__pill--samhap { color: var(--violet); border-color: var(--violet); background: rgba(145, 135, 216, .1) }
.sw__pill--chung { color: var(--red); border-color: var(--red); background: rgba(224, 122, 114, .1) }
.sw__pill--hyung { color: var(--to); border-color: var(--to); background: rgba(217, 171, 94, .1) }

.sw__kv-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.sw__kv {
    font-size: 13.5px;
    color: var(--t2);
    line-height: 1.65;
}

.sw__kv b { color: var(--t1) }
.sw__kv .sw__pill { margin-right: 6px }

.sw__empty {
    font-size: 13.5px;
    color: var(--t3);
    padding: 8px 0;
}

/* 대운 */
.sw__du-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--card-b) transparent;
}

.sw__du-scroll::-webkit-scrollbar { height: 4px }
.sw__du-scroll::-webkit-scrollbar-thumb { background: var(--card-b); border-radius: 4px }

.sw__du-card {
    flex: 0 0 72px;
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: 10px;
    padding: 9px 4px;
    text-align: center;
}

.sw__du-card.current {
    border-color: var(--gold);
    background: var(--gold-dim);
    box-shadow: 0 0 12px rgba(217, 185, 108, .12);
}

.sw__du-age {
    color: var(--t3);
    font-size: 11.5px;
    margin-bottom: 3px;
}

.sw__du-card.current .sw__du-age { color: var(--gold); font-weight: 700 }

.sw__du-hz {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.sw__du-kr {
    font-size: 12px;
    color: var(--t2);
}

.sw__du-ss {
    margin-top: 4px;
    font-size: 10.5px;
    color: var(--t3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sw__du-now {
    background: var(--gold-dim);
    border: 1px solid var(--gold);
    border-radius: 10px;
    padding: 13px 15px;
    font-size: 13.5px;
    color: var(--t1);
    line-height: 1.7;
}

.sw__du-now-hd {
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 5px;
}

/* 신살 */
.sw__sinsal-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.sw__sinsal {
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: 10px;
    padding: 11px 14px;
}

.sw__sinsal-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--t1);
    margin-bottom: 3px;
}

.sw__sinsal-name em {
    font-style: normal;
    font-size: 11.5px;
    font-weight: 500;
    color: var(--t3);
    margin-left: 4px;
}

.sw__sinsal-desc {
    font-size: 13px;
    color: var(--t2);
    line-height: 1.6;
}

.sw__sinsal-desc b { color: var(--gold) }

/* 용신 */
.sw__ys {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: 10px;
    padding: 14px;
    margin-top: 10px;
}

.sw__ys-icon { font-size: 28px; margin-top: 2px }

.sw__ys-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 5px;
}

.sw__ys-desc {
    font-size: 13.5px;
    color: var(--t2);
    line-height: 1.7;
}

.sw__ys-desc b { color: var(--t1) }

/* 계산 근거 */
.sw__method {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sw__method li {
    position: relative;
    padding: 7px 0 7px 14px;
    font-size: 13px;
    color: var(--t2);
    line-height: 1.7;
}

.sw__method li + li { border-top: 1px dashed var(--card-b) }

.sw__method li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 17px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
    opacity: .6;
}

.sw__method b { color: var(--t1) }

/* ---------- 하단 버튼 ---------- */
.sw__actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.sw__ghost-btn {
    flex: 1;
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--card-b);
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 700;
    color: var(--t2);
    cursor: pointer;
    font-family: inherit;
    transition: border-color .2s, color .2s;
}

.sw__ghost-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.sw__reset {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px dashed var(--card-b);
    border-radius: var(--r-sm);
    font-size: 13.5px;
    color: var(--t3);
    cursor: pointer;
    font-family: inherit;
    transition: border-color .2s, color .2s;
}

.sw__reset:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* ---------- 용어 사전 모달 ---------- */
.sw__dict {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(8, 8, 20, .78);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: sw-fade .25s ease;
}

.sw__dict.show { display: flex }

.sw__dict-inner {
    background: var(--solid);
    border: 1px solid var(--card-b);
    width: 100%;
    max-width: 480px;
    max-height: 82vh;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .5);
}

.sw__dict-hd {
    padding: 16px 20px;
    border-bottom: 1px solid var(--card-b);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sw__dict-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--t1);
}

.sw__dict-close {
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: var(--t3);
    cursor: pointer;
    padding: 0 4px;
}

.sw__dict-close:hover { color: var(--t1) }

.sw__tabs {
    display: flex;
    gap: 6px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--card-b);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--card-b) transparent;
    flex-shrink: 0;
}

.sw__tabs::-webkit-scrollbar { height: 4px }
.sw__tabs::-webkit-scrollbar-thumb { background: var(--card-b); border-radius: 4px }

.sw__tab {
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--card-b);
    color: var(--t2);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all .2s;
}

.sw__tab.active {
    background: var(--gold);
    color: #241b06;
    border-color: var(--gold);
    font-weight: 800;
}

.sw[data-theme="light"] .sw__tab.active { color: #fffaf0 }

.sw__dict-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--card-b) transparent;
}

.sw__dict-list::-webkit-scrollbar { width: 4px }
.sw__dict-list::-webkit-scrollbar-thumb { background: var(--card-b); border-radius: 4px }

.sw__dict-item {
    background: var(--card);
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--card-b);
}

.sw__dict-k {
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 4px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sw__dict-sub {
    font-size: 12px;
    color: var(--t3);
    font-weight: 400;
    margin-left: auto;
    text-align: right;
}

.sw__dict-v {
    font-size: 13.5px;
    color: var(--t1);
    line-height: 1.65;
    opacity: .9;
}

/* ---------- 토스트 ---------- */
.sw__toast {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(16px);
    background: rgba(10, 10, 24, .92);
    color: #f5f2e9;
    padding: 11px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: all .3s ease;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, .12);
}

.sw__toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---------- 반응형 ---------- */
@media (max-width: 480px) {
    .sw__p-hz { font-size: 27px }
    .sw__p-kr { font-size: 10.5px }
    .sw__p-ss { font-size: 10px; padding: 1px 5px }
    .sw__p-jj { font-size: 10px; letter-spacing: 1px }
    .sw__lucky { grid-template-columns: repeat(2, 1fr) }
    .sw__row--date { flex-wrap: wrap }
    .sw__row--date .sw__field:first-child { flex-basis: 100% }
    .sw__today-main { gap: 12px }
    .sw__gauge { width: 80px; height: 80px }
    .sw__gauge-in { width: 62px; height: 62px; padding-top: 20px }
    .sw__gauge-in b { font-size: 22px }
}

@media (max-width: 380px) {
    .sw__remedy-grid { grid-template-columns: 1fr }
    .sw__pillars { gap: 5px }
    .sw__pillar { padding: 10px 2px }
}

@media (max-width: 768px) {
    .sw__input,
    .sw__select { font-size: 16px } /* iOS 자동 줌 방지 */
    .sw__dict-inner { max-height: 90vh }
    .sw__toast { bottom: 110px }
}
