:root{--bg:#f4f7f6;--surface:#fff;--surface-soft:#eef6f2;--text:#17332a;--muted:#6c7e77;--primary:#247d5c;--primary-dark:#155840;--line:#dce8e3;--red:#d84f4f;--shadow:0 12px 34px rgba(22,69,53,.09);--radius:22px;--font-scale:1}
*{box-sizing:border-box}html{font-size:calc(16px * var(--font-scale))}body{margin:0;background:var(--bg);color:var(--text);font-family:"Noto Sans KR",sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer}.app-shell{display:flex;min-height:100vh}/* 🔴 사이드바는 position:fixed로 화면 높이에 묶여 있다. overflow가 없으면 메뉴가
   화면보다 길 때 아래쪽(오늘의 운세·글자 크기 조절 등)이 잘린 채 스크롤도 안 된다.
   창이 낮거나 글자 크기를 키우면 바로 밟힌다. overflow-y로 넘칠 때만 스크롤한다. */
.sidebar{position:fixed;inset:0 auto 0 0;width:255px;background:#133d31;color:#fff;padding:28px 18px;display:flex;flex-direction:column;overflow-y:auto;overscroll-behavior:contain;z-index:30}.brand{display:flex;align-items:center;gap:13px;color:#fff;text-decoration:none;padding:0 10px 28px}.brand-mark{display:grid;place-items:center;width:48px;height:48px;border-radius:15px;background:#fff;color:var(--primary-dark);font-size:1.35rem;font-weight:800}.brand strong,.brand small{display:block}.brand small{color:#bcd2c9;font-size:.72rem}.main-nav{display:flex;flex-direction:column;gap:5px}.nav-item{border:0;background:transparent;color:#c9dbd4;text-align:left;padding:13px 14px;border-radius:13px;font-weight:600}.nav-item span{display:inline-block;width:28px}.nav-item:hover,.nav-item.active{background:#fff;color:#174d3b}.sidebar-foot{margin-top:auto;border-top:1px solid rgba(255,255,255,.16);padding:18px 10px 0}.profile-manage-btn{width:100%;border:1px solid rgba(255,255,255,.3);background:#fff;color:#174d3b;padding:10px;border-radius:10px;font-weight:800}.sidebar-foot p{font-size:.8rem;color:#bcd2c9}.font-controls{display:flex;gap:6px}.font-controls button{flex:1;border:1px solid rgba(255,255,255,.25);background:transparent;color:#fff;padding:8px;border-radius:9px}.page-area{margin-left:255px;width:calc(100% - 255px)}.topbar{height:108px;padding:0 34px;display:flex;align-items:center;justify-content:space-between;background:rgba(244,247,246,.92);backdrop-filter:blur(12px);position:sticky;top:0;z-index:20}.eyebrow{margin:0 0 5px;color:var(--primary);font-weight:700;font-size:.82rem}.topbar h1{margin:0;font-size:1.35rem}.top-actions{display:flex;align-items:center;gap:10px}.icon-btn,.mobile-menu{border:1px solid var(--line);background:#fff;width:42px;height:42px;border-radius:12px}.profile-btn{display:flex;align-items:center;gap:8px;border:1px solid var(--line);background:#fff;border-radius:14px;padding:6px 12px}.avatar{display:grid;place-items:center;width:31px;height:31px;border-radius:10px;background:var(--surface-soft);font-weight:800}.mobile-menu{display:none}main{padding:0 34px 50px;max-width:1600px;margin:auto}.view{display:none}.view.active{display:block}.hero{min-height:250px;border-radius:30px;background:linear-gradient(130deg,#246f56,#3f9673);color:#fff;padding:38px 42px;display:flex;justify-content:space-between;overflow:hidden;box-shadow:var(--shadow)}.hero>div:first-child{max-width:700px;z-index:2}.hero-label{display:inline-block;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.16);font-size:.8rem;font-weight:700}.hero h2{font-size:2rem;margin:18px 0 10px}.hero p{color:#deefe8;line-height:1.7}.hero-tags{display:flex;gap:8px;flex-wrap:wrap;margin-top:24px}.hero-tags span{background:#fff;color:#245c49;padding:8px 12px;border-radius:10px;font-weight:700;font-size:.82rem}.hero-visual{position:relative;width:300px}.sun{position:absolute;right:50px;top:35px;width:100px;height:100px;border-radius:50%;background:#ffd277}.cloud{position:absolute;background:#fff;border-radius:40px}.cloud:before,.cloud:after{content:"";position:absolute;background:#fff;border-radius:50%}.cloud-one{width:150px;height:45px;right:75px;bottom:50px}.cloud-one:before{width:62px;height:62px;left:26px;bottom:15px}.cloud-one:after{width:48px;height:48px;right:22px;bottom:12px}.cloud-two{width:90px;height:30px;right:2px;bottom:88px;opacity:.55}.quick-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-top:22px}.quick-card,.panel,.large-card,.news-cards article,.support-list article,.fortune-box,.market-country,.exchange-grid article,.event-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:22px;box-shadow:0 5px 18px rgba(33,79,62,.04)}.card-head,.section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.card-head h3,.section-head h3{margin:4px 0 0}.card-kicker{font-size:.74rem;color:var(--primary);font-weight:800}.text-btn{border:0;background:transparent;color:var(--primary);font-weight:700}.weather-main{display:flex;align-items:center;gap:12px;margin:20px 0}.weather-icon{font-size:2.3rem}.weather-main>strong{font-size:2.25rem}.weather-main div b,.weather-main div small{display:block}.weather-main small{color:var(--muted)}.mini-stats{display:flex;gap:10px;justify-content:space-between;font-size:.75rem;color:var(--muted)}.market-list div{display:grid;grid-template-columns:1fr auto auto;gap:12px;padding:10px 0;border-bottom:1px solid var(--line);align-items:center}.market-list div small{grid-column:1/-1;margin-top:2px;font-size:.72rem;color:var(--muted)}/* 값을 못 가져온 자리는 색을 주지 않는다 — 숫자가 사라진 것이 아니라 없다는 뜻이다. */.rate-unknown{color:var(--muted)}.exchange-grid .rate-note{display:block;margin-top:6px;color:var(--muted);font-size:.72rem}.market-list em,.stock-row em,.market-country em{font-style:normal;font-size:.77rem;font-weight:700}.up{color:#d74848}.down{color:#3275c8}.exercise{display:flex;gap:12px;margin:18px 0}.exercise-icon{min-width:54px;height:54px;display:grid;place-items:center;background:#edf7f2;border-radius:16px;color:var(--primary);font-weight:800}.exercise p,.alert-row p,.news-cards p,.support-list p{font-size:.82rem;line-height:1.65;color:var(--muted)}.primary-btn,.secondary-btn{border:0;border-radius:11px;padding:11px 14px;font-weight:700}.primary-btn{background:var(--primary);color:#fff}.secondary-btn{background:var(--surface-soft);color:var(--primary-dark)}.full{width:100%}.small{padding:8px 11px;font-size:.8rem}.timer-text{text-align:center;color:var(--primary);font-weight:800}.alert-card{background:#fffaf5}.alert-row{display:flex;gap:12px;margin-top:18px}.alert-icon{display:grid;place-items:center;min-width:44px;height:44px;border-radius:50%;background:#fff0df;color:#c76420;font-size:1.3rem;font-weight:800}.content-grid,.detail-grid,.health-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:18px;margin-top:18px}.headline-list{list-style:none;padding:0}.headline-list li{display:flex;gap:14px;padding:14px 0;border-bottom:1px solid var(--line)}.headline-list strong,.headline-list small{display:block}.headline-list small{color:var(--muted)}.progress{font-size:.75rem;color:var(--primary);font-weight:800}.todo-list label{display:flex;gap:10px;padding:12px 0;border-bottom:1px solid var(--line)}.todo-form{display:flex;gap:7px}.todo-form input,.calculator-form input,.modal input,.modal select,textarea,.local-toolbar select{width:100%;border:1px solid var(--line);border-radius:11px;padding:11px 12px;background:#fbfdfc}.todo-form button{border:0;background:var(--primary);color:#fff;border-radius:11px;padding:0 15px}.page-title{padding:24px 4px}.page-title span{color:var(--primary);font-weight:800}.page-title h2{font-size:1.8rem;margin:8px 0}.page-title p{color:var(--muted)}.big-temp{display:flex;align-items:center;gap:18px}.big-temp>span,.big-temp>strong{font-size:4rem}.big-temp div b,.big-temp div small{display:block}.index-list div{display:flex;justify-content:space-between;padding:15px 0;border-bottom:1px solid var(--line)}.good{color:#247d5c}.warn{color:#d68125}.danger{color:#d84f4f}.news-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.news-cards article span,.support-list article>span{display:inline-block;background:var(--surface-soft);color:var(--primary);padding:6px 9px;border-radius:8px;font-size:.72rem;font-weight:800}.check-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.check-grid label{background:var(--surface-soft);padding:14px;border-radius:12px}.plain-list{line-height:2;color:var(--muted)}.finance-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.finance-tab,.region-mode{border:1px solid var(--line);background:#fff;padding:10px 16px;border-radius:999px;font-weight:700}.finance-tab.active,.region-mode.active{background:var(--primary);color:#fff;border-color:var(--primary)}.finance-panel{display:none}.finance-panel.active{display:block}.market-country-grid,.exchange-grid,.event-card-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px}.market-country span,.exchange-grid article span{color:var(--muted);font-size:.78rem}.market-country h3,.exchange-grid h3{margin:8px 0}.market-country strong,.exchange-grid strong{display:block;font-size:1.1rem;margin-bottom:8px}.exchange-grid small{color:var(--muted)}.stock-row{display:grid;grid-template-columns:1.6fr 1fr .8fr 70px;gap:10px;padding:14px 4px;border-bottom:1px solid var(--line);align-items:center}
.stock-search-result{display:grid;gap:8px;margin-top:14px;max-height:320px;overflow-y:auto}
.stock-pick{display:block;width:100%;text-align:left;border:1px solid var(--line);background:#fff;border-radius:12px;padding:12px 14px}
.stock-pick span{display:block;font-weight:700}
.stock-pick small{display:block;margin-top:3px;color:var(--muted);font-size:.78rem}
.stock-pick:disabled{opacity:.55}
/* 🔴 이 목록은 시세를 조회하지 않는다. 자동 갱신되는 것처럼 보이면 낡은 값을 현재가로 믿는다. */
.stock-note{margin:0 0 12px;color:var(--muted);font-size:.8rem;line-height:1.6}
.stock-empty{padding:18px 4px;color:var(--muted)}
.stock-delete{border:1px solid var(--line);background:#fff;color:var(--muted);border-radius:9px;padding:7px 10px;font-size:.8rem}.calculator-form{display:grid;gap:12px}.calculator-form label{display:grid;grid-template-columns:1fr 120px 35px;align-items:center;gap:8px}.calc-result{padding:14px;border-radius:12px;background:var(--surface-soft)}.support-list{display:grid;gap:12px}.support-list article{display:grid;grid-template-columns:70px 1fr auto;gap:18px;align-items:center}.support-list button{border:1px solid var(--primary);background:#fff;color:var(--primary);padding:9px;border-radius:10px}.local-toolbar{display:flex;justify-content:space-between;gap:12px;margin-bottom:18px}.region-toggle{display:flex;gap:8px}.local-toolbar select{max-width:280px}.event-card time{display:inline-block;color:var(--primary);font-weight:800}.event-card small{display:block;color:var(--muted);margin-top:10px}.event-card .event-region{display:inline-block;margin-top:10px;background:var(--surface-soft);padding:5px 8px;border-radius:8px;font-size:.75rem}.scan-result,.storage-notice{margin-top:14px;padding:14px;border-radius:12px;background:var(--surface-soft);color:var(--muted)}textarea{min-height:140px;resize:vertical}.fortune-box{max-width:760px;text-align:center;margin:auto;padding:42px}/* 운세 면책 문구 — 늘 보이는 자리다. 눈에 띄되 운세 본문을 가리지 않게 작고 흐리게. */
.fortune-disclaimer{margin-top:10px;padding:9px 11px;border-radius:10px;background:var(--surface-soft);color:var(--muted);font-size:.78rem;line-height:1.55}
.fortune-symbol{margin:auto;width:88px;height:88px;display:grid;place-items:center;border-radius:50%;background:#efe9ff;color:#7049ad;font-size:2.4rem;font-weight:800}.modal{position:fixed;inset:0;background:rgba(8,25,19,.48);display:none;align-items:center;justify-content:center;z-index:60}.modal.open{display:flex}.modal-card{width:min(430px,92vw);max-height:90vh;overflow:auto;background:#fff;border-radius:20px;padding:24px}.profile-modal-card{width:min(850px,94vw)}.close-btn{border:0;background:transparent;font-size:1.6rem}.profile-layout{display:grid;grid-template-columns:1fr 1fr;gap:22px}.profile-list{display:grid;gap:8px}.profile-item{display:grid;grid-template-columns:1fr auto auto;gap:6px;align-items:center;border:1px solid var(--line);padding:10px;border-radius:12px}.profile-item.active{border-color:var(--primary);background:var(--surface-soft)}.profile-item button{border:0;background:transparent;color:var(--primary);font-weight:700}.profile-item .delete-profile{color:var(--red)}.modal form{display:grid;gap:14px}.modal label{display:grid;gap:6px;font-weight:700}.form-actions{display:flex;justify-content:flex-end;gap:8px}body.high-contrast{--bg:#fff;--surface:#fff;--surface-soft:#f2f2f2;--text:#000;--muted:#333;--primary:#005a34;--line:#777}
@media(max-width:1180px){.quick-grid{grid-template-columns:repeat(2,1fr)}.market-country-grid,.exchange-grid,.event-card-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:820px){.sidebar{transform:translateX(-100%);transition:.25s}.sidebar.open{transform:translateX(0)}.page-area{margin-left:0;width:100%}.mobile-menu{display:block}.topbar{padding:0 18px;height:92px}.topbar h1{font-size:1rem}.profile-btn span:last-child{display:none}main{padding:0 18px 35px}.hero{padding:28px}.hero-visual{display:none}.content-grid,.detail-grid,.health-grid,.profile-layout{grid-template-columns:1fr}.news-cards{grid-template-columns:1fr}.local-toolbar{flex-direction:column}.local-toolbar select{max-width:none}}
@media(max-width:560px){.quick-grid,.market-country-grid,.exchange-grid,.event-card-grid{grid-template-columns:1fr}.hero h2{font-size:1.5rem}.mini-stats{flex-direction:column}.check-grid{grid-template-columns:1fr}.big-temp>span,.big-temp>strong{font-size:2.5rem}}


/* 자체 일정 달력 */
.hidden{display:none!important}
.calendar-preview{margin-top:18px}
.calendar-preview-empty{margin-top:14px;padding:18px;border-radius:14px;background:var(--surface-soft);color:var(--muted)}
.dashboard-upcoming-events{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:14px}
.dashboard-event{border:1px solid var(--line);border-radius:14px;padding:13px;background:#fff}
.dashboard-event time,.agenda-event time{display:block;color:var(--primary);font-size:.76rem;font-weight:800}
.dashboard-event strong{display:block;margin-top:5px}
.calendar-page-title{display:flex;justify-content:space-between;align-items:center;gap:18px}
.calendar-auth-actions{display:flex;gap:8px}
.calendar-setup-notice{margin-bottom:18px;padding:17px 20px;border:1px solid #e6cf9e;background:#fff9e9;border-radius:16px;color:#725b28}
.calendar-setup-notice p{margin:6px 0 0;line-height:1.7}
.calendar-setup-notice code{background:#fff;padding:2px 6px;border-radius:6px}
.calendar-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.65fr);gap:18px}
.calendar-main-card{padding:20px}
.calendar-toolbar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;margin-bottom:18px}
.calendar-toolbar h3{margin:0;text-align:center;font-size:1.25rem}
.calendar-toolbar>button:last-child{justify-self:end}
.calendar-navigation{display:flex;gap:7px;align-items:center}
.calendar-icon-btn{width:39px;height:39px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--text);font-size:1.45rem}
.calendar-weekdays,.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}
.calendar-weekdays{border:1px solid var(--line);border-bottom:0;border-radius:14px 14px 0 0;background:var(--surface-soft)}
.calendar-weekdays span{text-align:center;padding:11px 5px;color:var(--muted);font-size:.8rem;font-weight:800}
.calendar-weekdays span:first-child{color:#d84f4f}.calendar-weekdays span:last-child{color:#3275c8}
.calendar-grid{border-left:1px solid var(--line);border-top:1px solid var(--line)}
.calendar-day{position:relative;min-height:112px;padding:8px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:#fff;overflow:hidden}
.calendar-day:nth-last-child(-n+7):first-child,.calendar-day:last-child{border-radius:0}
.calendar-day.outside{background:#f8faf9;color:#a9b3af}
.calendar-day.today{background:#f0f8f4}
.calendar-day.selected{box-shadow:inset 0 0 0 2px var(--primary)}
.calendar-day-button{display:grid;place-items:center;width:29px;height:29px;border:0;border-radius:50%;background:transparent;color:inherit;font-weight:700}
.calendar-day.today .calendar-day-button{background:var(--primary);color:#fff}
.calendar-day-events{display:grid;gap:4px;margin-top:5px}
.calendar-event-chip{display:block;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border:0;border-radius:6px;padding:4px 6px;background:#e7f3ee;color:#17573f;text-align:left;font-size:.68rem;font-weight:700}
.calendar-more{font-size:.68rem;color:var(--muted);padding-left:5px}
.calendar-agenda-card{min-height:570px}
.calendar-connection-state{padding:5px 9px;border-radius:999px;background:#f1f3f2;color:var(--muted);font-size:.72rem;font-weight:800}
.calendar-connection-state.connected{background:#e4f4ec;color:var(--primary)}
.calendar-agenda{display:grid;gap:9px;margin-top:16px;max-height:650px;overflow:auto}
.agenda-event{border:1px solid var(--line);border-left:4px solid var(--primary);border-radius:12px;padding:12px}
.agenda-event h4{margin:5px 0;font-size:.92rem}
.agenda-event p{margin:3px 0;color:var(--muted);font-size:.78rem}
.calendar-empty-state{text-align:center;padding:45px 12px;color:var(--muted)}
.calendar-empty-state strong{display:block;color:var(--text);margin-bottom:7px}
.calendar-privacy-note{margin-top:18px;padding:18px 20px;border:1px solid var(--line);border-radius:16px;background:#fff}
.calendar-privacy-note p{margin:6px 0 0;color:var(--muted);line-height:1.65}
@media(max-width:1050px){.calendar-layout{grid-template-columns:1fr}.calendar-agenda-card{min-height:auto}.dashboard-upcoming-events{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.calendar-page-title{align-items:flex-start;flex-direction:column}.calendar-toolbar{grid-template-columns:1fr auto}.calendar-toolbar h3{grid-row:1;grid-column:1/-1}.calendar-navigation{grid-row:2}.calendar-toolbar>button:last-child{grid-row:2}.calendar-day{min-height:82px;padding:4px}.calendar-day-button{width:25px;height:25px;font-size:.75rem}.calendar-event-chip{font-size:0;width:8px;height:8px;border-radius:50%;padding:0;margin-left:4px}.calendar-more{display:none}.dashboard-upcoming-events{grid-template-columns:1fr}}


.event-modal-card{width:min(560px,94vw)}
.event-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.all-day-label{display:flex!important;grid-template-columns:none!important;align-items:center;gap:8px}
.all-day-label input{width:auto}
.event-color-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center;padding:12px;border-radius:12px;background:var(--surface-soft)}
.event-color-row>span{font-weight:800;margin-right:5px}
.event-color-row label{display:flex!important;grid-template-columns:none!important;align-items:center;gap:5px;font-size:.85rem}
.event-color-row input{width:auto}
.danger-outline{border:1px solid #d84f4f;background:#fff;color:#d84f4f;border-radius:11px;padding:10px 13px;font-weight:700}
.agenda-event-head{display:flex;justify-content:space-between;gap:10px;align-items:center}
.agenda-category{padding:4px 8px;border-radius:999px;background:var(--surface-soft);font-size:.7rem;font-weight:800}
.agenda-actions{display:flex;justify-content:flex-end;gap:7px;margin-top:12px}
.category-health{border-left-color:#d84f4f!important}
.category-family{border-left-color:#9b62c8!important}
.category-finance{border-left-color:#3275c8!important}
.category-life{border-left-color:#247d5c!important}
.calendar-event-chip.category-health{background:#fff0f0;color:#a93c3c}
.calendar-event-chip.category-family{background:#f4edfb;color:#74449b}
.calendar-event-chip.category-finance{background:#edf4ff;color:#285f9f}
.calendar-event-chip.category-life{background:#e7f3ee;color:#17573f}/* 분류가 없는 일정 — 색을 주지 않는다. 다른 「정보 없음」 자리와 같은 회색이다. */.category-none{background:var(--surface-soft);color:var(--muted)}.category-none.calendar-chip,.calendar-chip.category-none{border-left-color:var(--line)!important}
.dashboard-event{cursor:pointer;border-left:4px solid var(--primary)}
@media(max-width:650px){.event-form-grid{grid-template-columns:1fr}.event-color-row{align-items:flex-start;flex-direction:column}}


/* 관심 영상 */
.video-preview-panel{margin-top:18px}
.dashboard-video-preview{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:16px}
.dashboard-video-card{display:grid;grid-template-columns:110px 1fr;gap:12px;border:1px solid var(--line);border-radius:14px;padding:10px;background:#fff;cursor:pointer}
.dashboard-video-card img{width:110px;height:72px;object-fit:cover;border-radius:10px;background:#e9eeec}
.dashboard-video-card strong{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:.84rem;line-height:1.5}
.dashboard-video-card small{display:block;color:var(--muted);margin-top:5px;font-size:.72rem}
.video-page-title{display:flex;justify-content:space-between;align-items:center;gap:18px}
.video-toolbar{display:flex;justify-content:space-between;gap:14px;align-items:center;margin-bottom:18px}
.video-tabs{display:flex;gap:8px;flex-wrap:wrap}
.video-tab{border:1px solid var(--line);background:#fff;padding:10px 15px;border-radius:999px;font-weight:700}
.video-tab.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.video-search-box{display:flex;gap:7px;min-width:320px}
.video-search-box input{width:100%;border:1px solid var(--line);border-radius:11px;padding:10px 12px;background:#fff}
.video-api-notice{margin-bottom:18px;padding:16px 18px;border:1px solid #e6cf9e;background:#fff9e9;border-radius:16px;color:#725b28}
.video-api-notice p{margin:5px 0 0}.video-api-notice code{background:#fff;padding:2px 6px;border-radius:6px}
.video-panel{display:none}.video-panel.active{display:block}
.video-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-top:18px}
.video-card{position:relative;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;box-shadow:0 5px 18px rgba(33,79,62,.04)}
.video-thumb-wrap{position:relative;aspect-ratio:16/9;background:#e8efec;cursor:pointer}
.video-thumb-wrap img{width:100%;height:100%;object-fit:cover;display:block}
.video-play-icon{position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%);display:grid;place-items:center;width:48px;height:48px;border-radius:50%;background:rgba(20,43,35,.82);color:#fff;font-size:1.15rem}
.video-duration{position:absolute;right:8px;bottom:8px;background:rgba(0,0,0,.72);color:#fff;border-radius:5px;padding:3px 6px;font-size:.68rem}
.video-card-body{padding:14px}
.video-card-body h4{margin:0 0 8px;line-height:1.5;font-size:.94rem;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.video-meta{display:flex;justify-content:space-between;gap:8px;color:var(--muted);font-size:.72rem}
.video-card-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:12px}
.video-card-actions button{border:1px solid var(--line);background:#fff;border-radius:9px;padding:8px;font-size:.75rem;font-weight:700;color:var(--text)}
.video-card-actions button.saved{background:var(--surface-soft);color:var(--primary)}
.video-empty{grid-column:1/-1;text-align:center;padding:45px 20px;border:1px dashed var(--line);border-radius:18px;color:var(--muted);background:#fff}
.interest-chip-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:18px 0}
.interest-chip{position:relative}
.interest-chip input{position:absolute;opacity:0;pointer-events:none}
.interest-chip span{display:block;border:1px solid var(--line);border-radius:12px;padding:13px;text-align:center;background:#fff;font-weight:700}
.interest-chip input:checked+span{background:var(--primary);border-color:var(--primary);color:#fff}
.video-settings-card{width:min(670px,94vw)}
.video-player-card{width:min(900px,95vw)}
.video-player-wrap{position:relative;padding-top:56.25%;background:#000;border-radius:14px;overflow:hidden;margin-top:14px}
.video-player-wrap iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.favorite-channel-layout{display:grid;grid-template-columns:1fr 1.2fr;gap:18px}
.channel-form{display:grid;gap:12px}
.channel-form label{display:grid;gap:6px;font-weight:700}
.favorite-channel-list{display:grid;gap:8px}
.favorite-channel-item{display:grid;grid-template-columns:1fr auto auto;gap:8px;align-items:center;border:1px solid var(--line);border-radius:12px;padding:11px}
.favorite-channel-item small{display:block;color:var(--muted);margin-top:3px}
.favorite-channel-item button{border:0;background:transparent;color:var(--primary);font-weight:700}
.favorite-channel-item .remove-channel{color:var(--red)}
@media(max-width:1200px){.video-grid{grid-template-columns:repeat(3,1fr)}.dashboard-video-preview{grid-template-columns:1fr 1fr}}
@media(max-width:850px){.video-toolbar,.video-page-title{align-items:flex-start;flex-direction:column}.video-search-box{min-width:0;width:100%}.video-grid{grid-template-columns:repeat(2,1fr)}.favorite-channel-layout{grid-template-columns:1fr}}
@media(max-width:560px){.video-grid,.dashboard-video-preview{grid-template-columns:1fr}.interest-chip-grid{grid-template-columns:1fr 1fr}.dashboard-video-card{grid-template-columns:95px 1fr}.dashboard-video-card img{width:95px;height:64px}}


/* 산신령 운세 이미지 */
.fortune-sage{width:210px;height:210px;margin:0 auto 20px;border-radius:50%;overflow:hidden;background:#eaf4ef;box-shadow:0 14px 34px rgba(36,85,65,.16)}
.fortune-sage img{display:block;width:100%;height:100%;object-fit:cover}

/* 전국 행사를 지역별로 묶어서 표시 */
.event-display{width:100%}
.nationwide-event-list{display:grid;gap:24px}
.region-event-section{background:#fff;border:1px solid var(--line);border-radius:20px;padding:20px;box-shadow:0 5px 18px rgba(33,79,62,.04)}
.region-event-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid var(--line)}
.region-event-heading h3{margin:0;font-size:1.15rem}
.region-event-heading span{padding:5px 9px;border-radius:999px;background:var(--surface-soft);color:var(--primary);font-size:.75rem;font-weight:800}
.region-event-section .event-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.region-event-section .event-card{box-shadow:none}
/* 내 지역 섹션은 맨 위에서 한눈에 구분되게 */
.my-region-section{border:2px solid var(--primary);box-shadow:0 8px 24px rgba(33,79,62,.10)}
.my-region-section .region-event-heading span{background:var(--primary);color:#fff}
.event-nationwide-divider{margin:6px 0 0;font-size:1.05rem;color:var(--muted);font-weight:800}
@media(max-width:1050px){.region-event-section .event-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.fortune-sage{width:170px;height:170px}.region-event-section .event-card-grid{grid-template-columns:1fr}.region-event-section{padding:15px}}


/* 메인 날씨·운세 반반 카드 */
.daily-split-card{grid-column:span 1;padding:0!important;overflow:hidden;display:grid;grid-template-columns:1fr 1fr}
.daily-half{padding:18px;min-width:0}
.daily-half+ .daily-half{border-left:1px solid var(--line)}
.compact-weather{display:flex;align-items:center;gap:10px;margin-top:15px}
.compact-weather .weather-icon{font-size:2rem}
.compact-weather strong,.compact-weather b,.compact-weather small{display:block}
.compact-weather strong{font-size:1.75rem;line-height:1}
.compact-weather b{margin-top:5px}
.compact-weather small{margin-top:3px;color:var(--muted);font-size:.7rem;white-space:nowrap}
.fortune-half{background:linear-gradient(145deg,#fff,#f5f0ff)}
.compact-fortune{display:flex;align-items:center;gap:10px;margin-top:13px}
.compact-fortune img{width:66px;height:66px;border-radius:50%;object-fit:cover;object-position:center 24%;flex:0 0 auto;border:2px solid #fff;box-shadow:0 6px 14px rgba(68,52,96,.14)}
.compact-fortune p{margin:0;min-width:0}
.compact-fortune strong,.compact-fortune span{display:block}
.compact-fortune strong{font-size:.78rem;line-height:1.45}
.compact-fortune span{margin-top:4px;color:var(--muted);font-size:.68rem;line-height:1.4}
.fortune-sage{width:260px;height:260px}
.fortune-sage img{object-position:center 22%}
.local-page-title{display:flex;align-items:center;justify-content:space-between;gap:18px}
@media(max-width:1180px){
  .daily-split-card{grid-column:span 2}
}
@media(max-width:700px){
  .daily-split-card{grid-column:span 1;grid-template-columns:1fr}
  .daily-half+ .daily-half{border-left:0;border-top:1px solid var(--line)}
  .local-page-title{align-items:flex-start;flex-direction:column}
}


/* v8: 로고의 50 표시 제거 */
.brand-text-only{padding-left:10px;gap:0}
.brand-text-only strong{font-size:1.38rem}
.brand-text-only small{margin-top:3px}

/* v8: 상단 날씨·운세 좌우 반반 */
.hero.hero-daily-split{
  min-height:300px;
  padding:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  background:transparent;
  box-shadow:var(--shadow);
  border-radius:30px;
}
.hero-weather-panel,
.hero-fortune-panel{
  position:relative;
  min-width:0;
  overflow:hidden;
  padding:38px 42px;
}
.hero-weather-panel{
  background:linear-gradient(130deg,#246f56,#3f9673);
  border-radius:30px 0 0 30px;
}
.hero-fortune-panel{
  display:grid;
  grid-template-columns:minmax(0,1fr) 210px;
  align-items:center;
  gap:24px;
  background:linear-gradient(135deg,#f4efff,#ffffff);
  color:var(--text);
  border-radius:0 30px 30px 0;
}
.hero-weather-panel h2,
.hero-fortune-panel h2{
  position:relative;
  z-index:2;
  margin:18px 0 10px;
  font-size:1.7rem;
  line-height:1.45;
}
.hero-weather-panel p{
  position:relative;
  z-index:2;
  color:#deefe8;
  line-height:1.7;
}
.hero-fortune-panel p{
  color:var(--muted);
  line-height:1.75;
}
.hero-weather-panel .hero-tags{
  position:relative;
  z-index:2;
}
.hero-weather-art{
  position:absolute;
  right:20px;
  top:0;
  width:230px;
  height:100%;
  opacity:.92;
}
.hero-weather-art .sun{
  right:42px;
  top:56px;
  width:82px;
  height:82px;
}
.hero-weather-art .cloud-one{
  right:45px;
  bottom:55px;
  width:132px;
}
.hero-weather-art .cloud-two{
  right:0;
  bottom:92px;
}
.hero-fortune-copy{position:relative;z-index:2}
.hero-fortune-panel .hero-label{
  background:#ece4fb;
  color:#69449b;
}
.hero-fortune-image{
  width:210px;
  height:230px;
  object-fit:cover;
  object-position:center 24%;
  border-radius:26px;
  box-shadow:0 16px 36px rgba(75,55,105,.18);
}
.hero-fortune-button{
  margin-top:16px;
  border:0;
  border-radius:11px;
  padding:11px 15px;
  background:#7049ad;
  color:#fff;
  font-weight:800;
}

/* v8: 아래 날씨 카드는 원래 구성으로 복원 */
.daily-split-card{display:block;grid-column:auto;padding:22px!important}
.daily-half{display:none}

@media(max-width:1180px){
  .hero.hero-daily-split{grid-template-columns:1fr 1fr}
  .hero-fortune-panel{grid-template-columns:minmax(0,1fr) 170px;padding:32px}
  .hero-fortune-image{width:170px;height:205px}
}
@media(max-width:900px){
  .hero.hero-daily-split{grid-template-columns:1fr}
  .hero-weather-panel{border-radius:24px 24px 0 0}
  .hero-fortune-panel{border-radius:0 0 24px 24px}
}
@media(max-width:560px){
  .hero-weather-panel,.hero-fortune-panel{padding:26px}
  .hero-fortune-panel{grid-template-columns:1fr 110px;gap:14px}
  .hero-fortune-image{width:110px;height:145px;border-radius:18px}
  .hero-weather-panel h2,.hero-fortune-panel h2{font-size:1.35rem}
  .hero-weather-art{display:none}
}


/* v9 기능 보완 */
.timer-text{min-height:24px;margin-top:10px}
.news-link{display:grid;grid-template-columns:24px 1fr;gap:14px;width:100%;border:0;background:transparent;color:inherit;text-align:left;padding:0;align-items:start}
.news-link:hover strong,.news-link:focus strong{color:var(--primary);text-decoration:underline}
.news-link>span{color:var(--primary);font-weight:800}
.news-link strong,.news-link small{display:block}
.news-link small{margin-top:4px;color:var(--muted);font-size:.74rem}
#newsCardList article{cursor:pointer;transition:transform .18s ease,box-shadow .18s ease}
#newsCardList article:hover,#newsCardList article:focus{transform:translateY(-2px);box-shadow:var(--shadow);outline:none}
.news-modal-card{width:min(680px,94vw)}
.news-modal-time{color:var(--muted);font-size:.82rem}
.news-modal-summary{line-height:1.9;font-size:1rem;white-space:pre-line}
.news-source-link{text-decoration:none;display:inline-flex;align-items:center}


/* v12 YouTube API 연결 */
.video-title-actions{display:flex;gap:8px}
.video-api-notice{display:flex;justify-content:space-between;align-items:center;gap:16px}
.video-api-notice.connected{border-color:#b9ddcc;background:#eef8f3;color:#245f49}
.api-status-badge{flex:0 0 auto;padding:6px 10px;border-radius:999px;background:#f1e6c8;color:#7a6022;font-size:.75rem;font-weight:800}
.api-status-badge.connected{background:#dcefe5;color:#176244}
.video-refresh-area{display:flex;align-items:center;gap:10px}
.video-refresh-area small{color:var(--muted)}
.youtube-setup-card{width:min(650px,94vw)}
.youtube-setup-card form{display:grid;gap:14px;margin-top:16px}
.youtube-setup-card label{display:grid;gap:6px;font-weight:700}
.show-key-label{display:flex!important;grid-template-columns:none!important;align-items:center;gap:8px}
.show-key-label input{width:auto}
@media(max-width:650px){
  .video-title-actions{width:100%}
  .video-title-actions button{flex:1}
  .video-api-notice{align-items:flex-start;flex-direction:column}
  .video-refresh-area{align-items:flex-end;flex-direction:column}
}


/* v13 YouTube 연결 진단 */
.video-protocol-warning{
  margin-bottom:18px;
  padding:16px 18px;
  border:1px solid #e9b1a8;
  background:#fff1ef;
  border-radius:16px;
  color:#873c32;
}
.video-protocol-warning p{margin:5px 0 0;line-height:1.65}
.video-protocol-warning code{background:#fff;padding:2px 6px;border-radius:6px}
.video-api-notice.error{border-color:#e9b1a8;background:#fff1ef;color:#873c32}
.api-status-badge.error{background:#f8d5d0;color:#9b3529}
.video-error-detail{
  margin-top:16px;
  padding:16px 18px;
  border:1px solid #e9b1a8;
  border-radius:14px;
  background:#fff8f7;
  color:#78362e;
}
.video-error-detail p{margin:6px 0;line-height:1.7}
.video-error-detail small{display:block;color:#8a625d;word-break:break-all}


/* v14 실제 지역행사 API */
.event-api-notice{
  display:flex;justify-content:space-between;align-items:center;gap:16px;
  margin-bottom:16px;padding:16px 18px;border:1px solid #e6cf9e;
  background:#fff9e9;border-radius:16px;color:#725b28
}
.event-api-notice.connected{border-color:#b9ddcc;background:#eef8f3;color:#245f49}
.event-api-notice.error{border-color:#e9b1a8;background:#fff1ef;color:#873c32}
.event-api-notice p{margin:5px 0 0}
.event-control-row{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:18px}
.event-period-info{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.82rem}
.event-period-info strong{color:var(--text)}
.event-error-detail{margin-bottom:18px;padding:16px 18px;border:1px solid #e9b1a8;border-radius:14px;background:#fff8f7;color:#78362e}
.event-error-detail p{margin:6px 0}.event-error-detail small{word-break:break-all;color:#8a625d}
.tour-api-setup-card{width:min(680px,94vw)}
.tour-api-setup-card form{display:grid;gap:14px;margin-top:16px}
.tour-api-setup-card label{display:grid;gap:6px;font-weight:700}
.tour-api-help{padding:13px 15px;background:#f7faf8;border-radius:12px;border:1px solid var(--line)}
.tour-api-help p{margin:5px 0 0;color:var(--muted);line-height:1.65}
.live-event-card{padding:0;overflow:hidden;cursor:pointer}
.event-image-wrap{position:relative;aspect-ratio:16/9;background:linear-gradient(135deg,#dfeee7,#f5faf7);overflow:hidden}
.event-image{width:100%;height:100%;object-fit:cover;display:block}
.event-image-placeholder{position:absolute;inset:0;display:grid;place-items:center;color:var(--primary);font-size:1.4rem;font-weight:800}
.event-card-content{padding:17px}
.live-event-card h3{margin:8px 0;line-height:1.5}
.live-event-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.event-detail-modal-card{width:min(720px,94vw)}
.event-detail-image{width:100%;max-height:330px;object-fit:cover;border-radius:14px;margin:16px 0}
.event-detail-list{display:grid;gap:0;margin:16px 0}
.event-detail-list div{display:grid;grid-template-columns:70px 1fr;padding:12px 0;border-bottom:1px solid var(--line)}
.event-detail-list dt{font-weight:800;color:var(--primary)}
.event-detail-list dd{margin:0;line-height:1.6}
.event-map-link{text-decoration:none;display:inline-flex;align-items:center}
@media(max-width:700px){
  .event-api-notice,.event-control-row{align-items:flex-start;flex-direction:column}
}


/* v15 실제 증시 데이터 */
.finance-page-title{display:flex;justify-content:space-between;align-items:center;gap:18px}
.market-api-notice{
  display:flex;justify-content:space-between;align-items:center;gap:16px;
  padding:16px 18px;margin-bottom:16px;border:1px solid #e6cf9e;
  background:#fff9e9;border-radius:16px;color:#725b28
}
.market-api-notice.connected{border-color:#b9ddcc;background:#eef8f3;color:#245f49}
.market-api-notice.error{border-color:#e9b1a8;background:#fff1ef;color:#873c32}
.market-api-notice p{margin:5px 0 0}
.market-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:20px}
.market-updated{display:flex;gap:8px;align-items:center;color:var(--muted);font-size:.82rem}
.market-updated strong{color:var(--text)}
.market-error-detail{margin-bottom:18px;padding:15px 17px;border:1px solid #e9b1a8;border-radius:14px;background:#fff8f7;color:#78362e}
.market-error-detail p{margin:6px 0;line-height:1.65}
.market-section-heading{display:flex;justify-content:space-between;align-items:end;gap:12px;margin:8px 0 14px}
.market-section-heading h3{margin:4px 0 0}
.market-section-heading small{color:var(--muted)}
.overseas-heading{margin-top:28px}
.domestic-market-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:760px}
.market-country small{display:block;color:var(--muted);font-size:.7rem;margin-top:7px}
.market-disclaimer{margin-top:18px;padding:15px 17px;border:1px solid var(--line);border-radius:14px;background:#fff}
.market-disclaimer p{margin:5px 0 0;color:var(--muted);line-height:1.65}
.market-api-setup-card{width:min(720px,94vw)}
.market-api-setup-card form{display:grid;gap:14px}
.market-api-setup-card label{display:grid;gap:6px;font-weight:700}
.market-setup-intro{margin:14px 0;padding:14px 16px;background:var(--surface-soft);border-radius:13px}
.market-setup-intro p{margin:5px 0}
.market-api-help{display:grid;gap:8px;padding:13px 15px;border:1px solid var(--line);border-radius:12px}
.market-api-help div{display:grid;grid-template-columns:55px 1fr;gap:9px}
.market-api-help span{color:var(--muted);font-size:.82rem}
@media(max-width:700px){
  .finance-page-title,.market-api-notice,.market-toolbar,.market-section-heading{align-items:flex-start;flex-direction:column}
  .finance-page-title>button{width:100%}
  .domestic-market-grid{grid-template-columns:1fr}
}


/* v16 증시 API 버튼 동작 안정화 */
.market-api-open-btn{
  position:relative;
  z-index:5;
  pointer-events:auto!important;
  cursor:pointer;
}
#marketApiSetupModal{
  z-index:10000;
}
#marketApiSetupModal.open{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}
#marketApiSetupModal .modal-card{
  position:relative;
  z-index:10001;
}

.government-page-title,.welfare-api-notice{display:flex;justify-content:space-between;align-items:center;gap:16px}.welfare-api-notice{padding:16px 18px;margin-bottom:16px;border:1px solid #e6cf9e;background:#fff9e9;border-radius:16px;color:#725b28}.welfare-api-notice.connected{border-color:#b9ddcc;background:#eef8f3;color:#245f49}.welfare-api-notice.error{border-color:#e9b1a8;background:#fff1ef;color:#873c32}.welfare-api-notice p{margin:5px 0 0}.welfare-search-bar{display:grid;grid-template-columns:auto 1fr auto auto;gap:10px;align-items:center;margin-bottom:16px}.welfare-age-box{padding:10px 14px;border:1px solid var(--line);border-radius:12px;background:#fff}.welfare-age-box span,.welfare-age-box strong{display:block}.welfare-age-box span{font-size:.7rem;color:var(--muted)}/* 생년월일이 없을 때만 채워지는 사유 줄 — 비어 있으면 자리를 차지하지 않는다. */.welfare-age-box small{display:block;max-width:280px;margin-top:4px;font-size:.68rem;line-height:1.5;color:var(--muted)}.welfare-age-box small:empty{display:none}.welfare-search-bar input[type=search]{padding:12px;border:1px solid var(--line);border-radius:12px}.online-only-label{display:flex;gap:6px;align-items:center;white-space:nowrap}.online-only-label input{width:auto}.welfare-category-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}.welfare-chip{border:1px solid var(--line);background:#fff;border-radius:999px;padding:9px 14px;font-weight:700}.welfare-chip.active{background:var(--primary);color:#fff}.welfare-toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.welfare-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.welfare-card{display:flex;flex-direction:column;min-height:240px;padding:20px;border:1px solid var(--line);border-radius:18px;background:#fff}.welfare-card-head{display:flex;justify-content:space-between}.welfare-dept{color:var(--primary);font-size:.75rem;font-weight:800}.welfare-online{font-size:.7rem;color:var(--muted)}.welfare-card p{flex:1;color:var(--muted);line-height:1.65}.welfare-error-detail{margin-bottom:16px;padding:15px;border:1px solid #e9b1a8;border-radius:14px;background:#fff8f7;color:#78362e}.welfare-api-setup-card,.welfare-detail-modal-card{width:min(720px,94vw)}.welfare-api-setup-card form{display:grid;gap:14px;margin-top:16px}.welfare-api-help{padding:13px;border:1px solid var(--line);border-radius:12px}.welfare-detail-body section{padding:14px 0;border-bottom:1px solid var(--line)}.welfare-detail-body h4{margin:0 0 6px;color:var(--primary)}.welfare-detail-body p{margin:0;line-height:1.7}@media(max-width:900px){.welfare-grid{grid-template-columns:repeat(2,1fr)}.welfare-search-bar{grid-template-columns:1fr 1fr}}@media(max-width:650px){.government-page-title,.welfare-api-notice{align-items:flex-start;flex-direction:column}.welfare-grid,.welfare-search-bar{grid-template-columns:1fr}}


/* v18 건강수첩 */
.health-page-title{display:flex;justify-content:space-between;align-items:center;gap:18px}
.health-summary-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}
.health-summary-card{padding:18px;border:1px solid var(--line);border-radius:18px;background:#fff}
.health-summary-card span,.health-summary-card strong,.health-summary-card small{display:block}
.health-summary-card span{color:var(--primary);font-size:.75rem;font-weight:800}
.health-summary-card strong{margin:10px 0 7px;font-size:1.35rem}
.health-summary-card small{color:var(--muted);line-height:1.5}
.health-summary-card small.normal{color:#177054}.health-summary-card small.caution{color:#9a6a12}.health-summary-card small.warning,.health-summary-card small.danger{color:#b33e32}
/* 판정 근거 줄 — 등급 색을 주지 않는다. 이건 판정이 아니라 출처다. */
.health-summary-card small.status-note{margin-top:6px;color:var(--muted);font-size:.72rem;line-height:1.5}
.health-summary-card small.status-note[hidden]{display:none}
.health-main-layout{display:grid;grid-template-columns:2fr 1fr;gap:18px}
.health-chart-card{min-width:0}
.health-chart-tabs{display:flex;gap:6px}
.health-chart-tab{border:1px solid var(--line);background:#fff;padding:7px 11px;border-radius:999px;font-weight:700}
.health-chart-tab.active{background:var(--primary);color:#fff}
#healthTrendChart{display:block;width:100%;height:360px}
.health-chart-empty{display:grid;place-items:center;height:300px;color:var(--muted)}
.medication-list{display:grid;gap:9px;margin-top:14px}
.medication-item{display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:13px}
.medication-item.done{opacity:.62;background:var(--surface-soft)}
.medication-item time,.medication-item strong,.medication-item small{display:block}.medication-item time{color:var(--primary);font-weight:800}.medication-item small{margin-top:3px;color:var(--muted)}
.med-check,.med-edit{border:0;background:transparent;color:var(--primary);font-weight:800}.med-check{font-size:1.3rem}
.health-bottom-grid{display:grid;grid-template-columns:1.5fr 1fr;gap:18px;margin-top:18px}
.health-record-list{display:grid;gap:7px;margin-top:12px}
.health-record-item{display:grid;grid-template-columns:145px 1fr;gap:4px 12px;width:100%;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff;text-align:left}
.health-record-item time{grid-row:1/3;color:var(--primary);font-weight:700}.health-record-item small{color:var(--muted)}
.health-empty{padding:25px;text-align:center;color:var(--muted);border:1px dashed var(--line);border-radius:13px}
.exercise-mark{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:var(--surface-soft);color:var(--primary);font-size:1.4rem;font-weight:800}
.exercise-guide{line-height:1.8;color:var(--muted)}.full-btn{width:100%;margin-top:14px}
.health-storage-note{margin-top:18px;padding:16px 18px;border:1px solid var(--line);border-radius:15px;background:#fff}.health-storage-note p{margin:5px 0 0;color:var(--muted);line-height:1.65}
.health-record-modal-card,.medication-modal-card{width:min(680px,94vw)}.health-record-modal-card form,.medication-modal-card form{display:grid;gap:14px;margin-top:14px}
.health-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.health-form-grid label,.health-record-modal-card>form>label,.medication-modal-card label{display:grid;gap:6px;font-weight:700}
.weekday-selector{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:12px;border:1px solid var(--line);border-radius:12px}.weekday-selector>span{font-weight:800;margin-right:5px}.weekday-selector label{display:flex!important;align-items:center;gap:3px}.weekday-selector input{width:auto}
@media(max-width:1050px){.health-summary-grid{grid-template-columns:repeat(2,1fr)}.health-main-layout,.health-bottom-grid{grid-template-columns:1fr}}
@media(max-width:650px){.health-page-title{align-items:flex-start;flex-direction:column}.health-page-title>button{width:100%}.health-summary-grid,.health-form-grid{grid-template-columns:1fr}.health-record-item{grid-template-columns:1fr}.health-record-item time{grid-row:auto}}


/* v19 로고 메인 바로가기 */
.brand{cursor:pointer}
.brand:hover strong{text-decoration:underline}

/* v19 상세 운세 */
.fortune-detail-layout{display:grid;grid-template-columns:1.7fr 1fr;gap:18px;margin-bottom:18px}
.fortune-profile-card,.fortune-score-card,.fortune-category-card{
  border:1px solid var(--line);background:#fff;border-radius:22px
}
.fortune-profile-card{display:grid;grid-template-columns:230px 1fr;gap:26px;align-items:center;padding:26px}
.fortune-profile-card img{width:230px;height:230px;object-fit:cover;object-position:center 24%;border-radius:22px}
.fortune-profile-card span{color:#7349aa;font-weight:800}
.fortune-profile-card h3{margin:12px 0;font-size:1.55rem;line-height:1.45}
.fortune-profile-card p{color:var(--muted);line-height:1.8}
.fortune-score-card{display:grid;place-items:center;padding:24px}
.fortune-score-ring{--fortune-score:280deg;width:180px;height:180px;border-radius:50%;display:grid;place-items:center;align-content:center;background:conic-gradient(#7b4bb4 var(--fortune-score),#ece5f5 0);position:relative}
.fortune-score-ring:before{content:"";position:absolute;inset:14px;background:#fff;border-radius:50%}
.fortune-score-ring strong,.fortune-score-ring span{position:relative;z-index:1;display:block;text-align:center}
.fortune-score-ring strong{font-size:2.4rem}.fortune-score-ring span{font-size:.75rem;color:var(--muted)}
.fortune-lucky-info{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;width:100%;margin-top:20px}
.fortune-lucky-info div{padding:10px;text-align:center;background:#faf7fd;border-radius:12px}.fortune-lucky-info span,.fortune-lucky-info strong{display:block}.fortune-lucky-info span{font-size:.68rem;color:var(--muted)}.fortune-lucky-info strong{margin-top:4px}
.fortune-category-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:16px}
.fortune-category-card{display:grid;grid-template-columns:52px 1fr;gap:15px;padding:22px}
.fortune-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:15px;background:#f3ecfa;color:#7248a9;font-size:1.25rem;font-weight:800}
.fortune-category-card small{color:#7349aa;font-weight:800}.fortune-category-card h3{margin:5px 0 9px}.fortune-category-card p{margin:0;color:var(--muted);line-height:1.75}
.fortune-disclaimer{margin-top:16px;padding:14px 16px;border-radius:13px;background:#f7f8f7;color:var(--muted);font-size:.8rem;line-height:1.6}
/* 🔴 이 칸은 운세 화면의 다른 카드와 같은 옷을 입는다 — 기준은 .fortune-profile-card다
   (흰 바탕 · var(--line) 테두리 · 22px 모서리 · 26px 여백/간격, 그림자 없음).
   종전에는 보라~초록 그러데이션 바탕에 보라 테두리와 그림자까지 있어, 같은 화면의
   이웃 카드들과 혼자 달라 보였다. 🔴 타로 카드 그림 자체(.tarot-card-face 이하)는
   건드리지 않는다 — 카드는 카드대로 보여야 한다. */
.tarot-daily-card{display:grid;grid-template-columns:260px minmax(0,1fr);gap:26px;align-items:center;margin-top:18px;padding:26px;background:#fff;border:1px solid var(--line);border-radius:22px}
.tarot-card-stage{width:220px;height:360px;margin:auto;perspective:1000px}
.tarot-card-inner{position:relative;width:100%;height:100%;transition:transform .65s ease;transform-style:preserve-3d}
.tarot-card-stage.revealed .tarot-card-inner{transform:rotateY(180deg)}
.tarot-card-face{position:absolute;inset:0;overflow:hidden;border-radius:18px;backface-visibility:hidden;box-shadow:0 14px 32px rgba(56,35,82,.2)}
.tarot-card-back{display:grid;place-items:center;align-content:center;gap:12px;border:6px double #d7b66c;background:radial-gradient(circle at center,#8d6ab5 0 8%,transparent 9%),repeating-radial-gradient(circle at center,#573b78 0 13px,#654687 14px 27px);color:#fff}
.tarot-card-back:before{content:"";position:absolute;inset:14px;border:1px solid rgba(255,235,178,.72);border-radius:10px}
.tarot-card-back span,.tarot-card-back small{position:relative;z-index:1}.tarot-card-back span{font-size:3.4rem;color:#f4d98f}.tarot-card-back small{font-weight:800;letter-spacing:.16em}
.tarot-card-front{transform:rotateY(180deg);background:#efe5cf}
.tarot-card-front img{width:100%;height:100%;display:block;object-fit:cover}
.tarot-card-copy h3{margin:8px 0 10px;font-size:1.55rem}.tarot-card-copy>p{color:var(--muted);line-height:1.7}.tarot-reveal-btn{margin-top:10px;min-width:180px}
.tarot-reading{margin-top:18px}.tarot-reading>span{color:#7349aa;font-size:.78rem;font-weight:800}.tarot-reading h4{margin:5px 0 2px;font-size:1.35rem}.tarot-reading>p{line-height:1.75;color:var(--muted)}
/* 영문 표기는 이름의 일부가 아니라 곁들이는 정보다 — 작게, 흐리게 둔다. */
.tarot-card-en{margin:0;font-size:.85rem}
/* 열쇠말에 이름표를 단다. 종전에는 굵은 글씨 한 줄만 있어 제목인지 본문인지
   구분되지 않았다. 이름표 색은 「오늘의 실천」과 같게 맞춘다. */
.tarot-keyword{margin-top:14px}.tarot-keyword small{color:#7349aa;font-weight:800}
.tarot-keyword strong{display:block;margin-top:4px;font-size:1.05rem;color:#4f3370}
/* 출처 표시. 운세 안내문(.fortune-disclaimer)과 같은 회색 상자로 둔다 — 경고가
   아니라 안내이므로 눈에 띄는 색을 쓰지 않는다. */
.tarot-source{margin-top:16px;padding:14px 16px;border-radius:13px;background:#f7f8f7;font-size:.8rem;line-height:1.6}
/* 🔴 「오늘의 실천」 상자도 .fortune-disclaimer와 같은 회색 상자로 맞춘다.
   종전의 왼쪽 보라 굵은 줄은 이 화면 어디에도 없던 장식이었다.
   작은 제목만 보라로 남긴다 — .fortune-category-card small과 같은 색이라 그건 일관된다. */
.tarot-action{margin-top:16px;padding:14px 16px;border-radius:13px;background:#f7f8f7}.tarot-action small{color:#7349aa;font-weight:800}.tarot-action p{margin:5px 0 0;color:var(--muted);line-height:1.65}
@media(prefers-reduced-motion:reduce){.tarot-card-inner{transition:none}}

/* v19 뉴스 상세 목록 */
.news-page-title{display:flex;justify-content:space-between;align-items:center;gap:18px}
.news-filter-bar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:15px}
.news-filter{border:1px solid var(--line);background:#fff;padding:8px 14px;border-radius:999px;font-weight:700}
.news-filter.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.news-page-status{display:flex;justify-content:space-between;gap:12px;margin-bottom:14px;color:var(--muted)}
/* 기사가 실시간이 아니라는 사실을 화면에서 밝힌다 — 경고가 아니라 안내라 회색 톤으로 둔다. */
.news-delay-notice{margin:0 0 14px;padding:12px 14px;border-radius:12px;background:var(--surface-soft);color:var(--muted);font-size:.82rem;line-height:1.6}
.news-page-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.news-page-card{padding:20px;border:1px solid var(--line);border-radius:18px;background:#fff;cursor:pointer;transition:.18s}
.news-page-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}
.news-page-card.featured{grid-column:span 2;background:linear-gradient(135deg,#eef8f3,#fff)}
.news-page-card-meta{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:.72rem}
.news-page-card-meta span{color:var(--primary);font-weight:800}
.news-page-card h3{margin:13px 0 9px;line-height:1.5}.news-page-card p{color:var(--muted);line-height:1.7}

/* v19 행사 카드 클릭 */
.event-card{cursor:pointer}
.event-homepage-link{text-decoration:none;display:inline-flex;align-items:center}
@media(max-width:950px){
  .fortune-detail-layout{grid-template-columns:1fr}.fortune-category-grid{grid-template-columns:1fr}
  .news-page-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:650px){
  .fortune-profile-card{grid-template-columns:1fr}.fortune-profile-card img{width:100%;height:250px}
  .tarot-daily-card{grid-template-columns:1fr;padding:22px}.tarot-card-stage{width:190px;height:315px}
  .fortune-lucky-info{grid-template-columns:1fr}
  .news-page-title{align-items:flex-start;flex-direction:column}.news-page-title>button{width:100%}
  .news-page-grid{grid-template-columns:1fr}.news-page-card.featured{grid-column:auto}
}

/* v20 뉴스 필터·새로고침 안정화 */
.news-refresh-message{margin-bottom:14px;padding:12px 14px;border-radius:12px;font-size:.82rem}
.news-refresh-message.success{background:#e9f6ef;color:#176244;border:1px solid #b9ddcc}
.news-refresh-message.warning{background:#fff5e5;color:#805f20;border:1px solid #ead09c}
#refreshNewsBtn:disabled{opacity:.65;cursor:wait}

/* v21 버전 표시 */
.app-version{display:inline-flex;align-items:center;margin-bottom:10px;padding:5px 9px;border-radius:999px;background:rgba(255,255,255,.12);color:#dcebe5;font-size:.7rem;font-weight:800;letter-spacing:.02em}


/* v22 기능 복구 */
.modal[aria-hidden="true"]{display:none!important;pointer-events:none!important}
.modal.open[aria-hidden="false"]{display:flex!important;pointer-events:auto}
body.modal-open{overflow:hidden}
.news-modal-card{width:min(760px,94vw)}
.news-modal-body{margin:18px 0;line-height:1.9;color:var(--text);white-space:pre-line}
.news-body-notice{margin-top:18px;padding:14px;border-radius:12px;background:var(--surface-soft);color:var(--muted);font-size:.85rem}
.video-player-actions{margin-top:14px}
.video-card h4,.video-thumb-wrap{cursor:pointer}
@media(min-width:821px){.sidebar{transform:none!important}.mobile-menu{display:none!important}}

/* v26 화면·API 복구 */
.brand>span{display:flex;align-items:center;min-height:48px}
.operator-api-btn{margin-bottom:8px;background:#dff2e9!important;color:#174d3b!important}
.dashboard-todo-card .todo-list{margin-top:8px}
.dashboard-todo-card .todo-list label{padding:8px 0;font-size:.82rem}/* 할 일 항목 — 글자는 남는 폭을 쓰고, 삭제 버튼은 오른쪽 끝에 둔다. */.todo-list label span{flex:1}.todo-delete{border:1px solid var(--line);background:#fff;color:var(--muted);border-radius:8px;padding:2px 8px;font-size:.72rem}.todo-delete:hover{color:#d84f4f;border-color:#d84f4f}/* 비어 있으면 비어 있다고 적는다 — 예시로 채우지 않는다. */.todo-empty{margin:0;padding:12px 0;color:var(--muted);font-size:.82rem;line-height:1.6}
.dashboard-todo-card .todo-form{margin-top:8px}
.dashboard-news-grid{grid-template-columns:1fr}
.operator-api-modal-card{width:min(760px,94vw)}
.operator-api-modal-card form{grid-template-columns:1fr 1fr;gap:12px 16px}
.operator-api-modal-card .storage-notice,.operator-api-modal-card .show-key-label,.operator-api-modal-card .api-config-priority-note,.operator-api-modal-card .form-actions{grid-column:1/-1}
.api-config-priority-note{padding:10px 12px;border-radius:10px;background:var(--surface-soft);color:var(--muted);font-size:.8rem;line-height:1.6}
@media(max-width:820px){.operator-api-modal-card form{grid-template-columns:1fr}}

/* v27 생활기상 지수 — 값을 못 가져온 항목은 색을 주지 않는다(회색). 「좋음」처럼 보이면 안 된다. */
.index-list b{text-align:right;line-height:1.3}
.index-list b small{display:block;margin-top:3px;font-weight:600;font-size:.72rem;color:var(--muted)}
.index-unknown{color:var(--muted)}

/* 자외선 행동 안내 — 기상청 공표 문구가 길어 값 오른쪽에 붙일 수 없다.
   그 줄만 wrap을 허용해 항목명·값 아래 통줄로 내린다(미세먼지·식중독 줄은 칸이 없어 그대로다). */
.index-row-advice{flex-wrap:wrap}
.index-advice{flex-basis:100%;margin:10px 0 0;font-size:.82rem;line-height:1.65;color:var(--muted);text-align:left}
.index-advice[hidden]{display:none}

/* 예시 데이터임을 카드 안에서 밝히는 표기 — 금융 카드의 「예시값」과 같은 톤(작고 흐린 글씨). */
.welfare-card .sample-mark{display:block;margin-top:9px;color:var(--muted);font-size:.75rem;font-weight:700}

/* 기기 연결(동기화) — PC 화면.
   🔴 QR은 대비가 생명이다. 카드 배경과 그림 바탕을 흰색으로 못 박아,
      고대비 모드나 어두운 배경을 물려받아 판독률이 떨어지는 일을 막는다. */
.device-sync-card{width:min(470px,94vw);text-align:center;display:flex;flex-direction:column}
/* 🔴 낮은 화면에서는 카드가 90vh에 잘려 안쪽 스크롤이 생긴다(1280x720에서 936px 중 648px만
   보였다). 그때 「닫기」·「새 그림 만들기」가 스크롤 아래로 숨는 것이 문제라, 버튼줄을
   바닥에 붙여 둔다. 내용은 스크롤하되 할 수 있는 일은 늘 보인다. */
.device-sync-card .form-actions{position:sticky;bottom:-24px;margin-top:14px;padding:14px 0 12px;background:#fff}
.device-sync-card .form-actions:before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:var(--line)}
.device-sync-card .section-head,.device-sync-card .storage-notice{text-align:left}
.device-sync-qr{display:inline-block;margin:18px auto 4px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:16px;line-height:0}
.device-sync-qr canvas{display:block}
.device-sync-status{margin:12px 0 0;font-weight:700;line-height:1.6}
.device-sync-status.wait{color:var(--primary)}
.device-sync-status.good{color:#247d5c}
.device-sync-status.bad{color:#d84f4f}
.device-sync-help{margin-top:16px;text-align:left;color:var(--muted);font-size:.85rem;line-height:1.75}
.device-sync-help ol{margin:6px 0 0;padding-left:20px}
.device-sync-origin{display:block;margin-top:12px;font-size:.78rem;word-break:break-all}
.device-sync-warn{margin-top:10px;padding:10px 12px;border-radius:10px;background:#fff3e6;color:#8a4b12;font-size:.8rem;line-height:1.6}
.device-sync-caution{margin-top:10px;font-size:.8rem}

/* 휴대폰 쪽 화면 — 「무엇이 보내지는가」를 먼저 보여 준다.
   🔴 확인 문구는 눈에 띄어야 한다. 남이 보낸 그림을 찍었을 때 멈출 마지막 자리다. */
.phone-sync-confirm{background:#fff3e6;color:#8a4b12}
/* 🔴 세로로 늘어놓지 않는다. 항목이 9종이라 두 벌이면 카드가 1,409px이 되어
   정작 누를 버튼이 스크롤 아래로 내려간다(375x812에서 실측). 옆으로 흐르게 둔다. */
.phone-sync-list{list-style:none;margin:16px 0 0;padding:0;text-align:left;display:flex;flex-wrap:wrap;gap:6px}
.phone-sync-list li{display:flex;gap:5px;align-items:baseline;background:var(--surface-soft);border-radius:8px;padding:5px 9px;font-size:.8rem}
.phone-sync-list li span{color:var(--muted)}
.phone-sync-list li strong{font-weight:800}
.phone-sync-list li.none{background:transparent;padding:5px 2px;color:var(--muted)}
.phone-sync-section{margin-top:18px;text-align:left}
.phone-sync-section h4{margin:0 0 4px;font-size:.95rem}
.phone-sync-section .phone-sync-list{margin:0 0 10px}
.phone-sync-section button[disabled]{opacity:.45}

/* PC 잠금 화면.
   🔴 화면 전체를 덮는다. 뒤에 있는 자료가 비쳐 보이면 잠근 의미가 없다. */
.device-lock{position:fixed;inset:0;z-index:200;background:#133d31;display:grid;place-items:center;padding:20px;overflow:auto}
.device-lock[hidden]{display:none}
body.device-locked{overflow:hidden}
body.device-locked .app-shell{display:none}
.device-lock-card{width:min(470px,94vw);max-height:96vh;overflow:auto;background:#fff;border-radius:20px;padding:26px;text-align:center}
.device-lock-card h2{margin:6px 0 10px;font-size:1.35rem}
.device-lock-lead{color:var(--muted);line-height:1.7;font-size:.9rem}
.device-lock-card .device-sync-help{margin-top:14px}
/* 🔴 「새 그림 만들기」는 잠금 화면에서 막혔을 때의 유일한 되돌리기다.
   낮은 화면(1280x720에서 내용 752px vs 보이는 691px)에서 스크롤 아래로 내려가
   안 보였다. 바닥에 붙여 늘 보이게 한다. */
.device-lock-actions{position:sticky;bottom:-26px;margin-top:16px;padding:14px 0 12px;background:#fff}
.device-lock-actions:before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:var(--line)}
