/* 경제담다 홈 - 홈페이지 콘텐츠 스타일 (숏코드 출력 영역) */
.ekd-home{
  --ekd-bg:#ffffff; --ekd-surface:#ffffff; --ekd-surface-2:#f3f6fb; --ekd-tint:#eaf1fb;
  --ekd-fg:#111826; --ekd-muted:#5c6678; --ekd-faint:#8b94a6; --ekd-line:#e1e7f0;
  --ekd-accent:#1d4ed8; --ekd-accent-soft:#e7eefc; --ekd-up:#e02424; --ekd-down:#2563eb;
  --ekd-radius:12px;
  font-family:'IBM Plex Sans KR','Apple SD Gothic Neo',system-ui,sans-serif;
  color:var(--ekd-fg); line-height:1.6;
}
.ekd-home *{box-sizing:border-box}
.ekd-home a{color:inherit;text-decoration:none}
.ekd-home h2,.ekd-home h3,.ekd-home h4{margin:0;letter-spacing:-.01em;font-weight:800}
.ekd-wrap{max-width:1180px;margin:0 auto;padding:30px 20px}
.ekd-home section{padding:0}
.ekd-up{color:var(--ekd-up)} .ekd-down{color:var(--ekd-down)} .ekd-flat{color:var(--ekd-faint)}

.ekd-shead{display:flex;align-items:baseline;gap:12px;margin-bottom:18px}
.ekd-shead h2{font-size:21px}
.ekd-shead .ekd-rule{height:1px;background:var(--ekd-line);flex:1}
.ekd-shead .ekd-more,.ekd-shead .ekd-date{font-size:12.5px;color:var(--ekd-muted);font-weight:600}

.ekd-imgph{background:var(--ekd-surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46' fill='none' stroke='%239aa6ba' stroke-width='1.5'%3E%3Crect x='6' y='10' width='34' height='26' rx='3'/%3E%3Ccircle cx='16' cy='19' r='3'/%3E%3Cpath d='M11 36l9-9 6 6 5-5 8 8'/%3E%3C/svg%3E") center/46px no-repeat;border:1px solid var(--ekd-line)}
.ekd-cat{font-size:11.5px;font-weight:700;color:var(--ekd-accent)}
.ekd-empty{color:var(--ekd-faint);font-size:13px;padding:10px 0}

/* 오늘의 경제 */
.ekd-today{background:var(--ekd-tint);border-top:1px solid var(--ekd-line);border-bottom:1px solid var(--ekd-line)}
.ekd-today-grid{display:grid;grid-template-columns:1fr;gap:22px}
@media(min-width:860px){.ekd-today-grid{grid-template-columns:1.25fr 1fr}}
.ekd-feature{min-width:0;display:block}
.ekd-feature .ekd-imgph{aspect-ratio:16/8;border-radius:var(--ekd-radius);width:100%;margin-bottom:14px}
.ekd-feature .ekd-cat{display:block;margin-bottom:7px}
.ekd-feature h3{font-size:24px;line-height:1.3;margin-bottom:9px}
.ekd-feature p{font-size:14px;color:var(--ekd-muted);margin:0 0 12px}
.ekd-readmore{font-size:13px;font-weight:600;color:var(--ekd-accent)}
.ekd-newslist{display:flex;flex-direction:column;gap:1px;background:var(--ekd-line);border:1px solid var(--ekd-line);border-radius:var(--ekd-radius);overflow:hidden;align-self:start}
.ekd-ni{display:flex;gap:13px;padding:13px 15px;background:var(--ekd-surface);min-width:0}
.ekd-ni:hover{background:var(--ekd-surface-2)}
.ekd-ni .ekd-th{width:62px;height:52px;border-radius:8px;flex-shrink:0;background-size:30px}
.ekd-ni .ekd-th[style*="url"]{background-size:cover}
.ekd-tx{min-width:0}
.ekd-ni .ekd-cat{font-size:11px}
.ekd-ni h4{font-size:14px;font-weight:600;line-height:1.35;margin:2px 0 3px}
.ekd-dsc{font-size:11.5px;color:var(--ekd-faint);line-height:1.4;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}

/* 주요 콘텐츠 */
.ekd-content-grid{display:grid;grid-template-columns:1fr;gap:20px}
@media(min-width:620px){.ekd-content-grid{grid-template-columns:1fr 1fr}}
@media(min-width:920px){.ekd-content-grid{grid-template-columns:repeat(3,1fr)}}
.ekd-ccard{min-width:0;display:flex;flex-direction:column}
.ekd-ccard .ekd-imgph{aspect-ratio:16/9;border-radius:10px;width:100%;margin-bottom:12px}
.ekd-ccard .ekd-cat{margin-bottom:6px}
.ekd-ccard h3{font-size:16px;font-weight:700;line-height:1.4;margin-bottom:6px}
.ekd-ccard p{font-size:13px;color:var(--ekd-muted);margin:0}
.ekd-ccard:hover h3{color:var(--ekd-accent)}

/* 인기 / 숫자 / 광고 */
.ekd-triple{display:grid;grid-template-columns:1fr;gap:18px}
@media(min-width:720px){.ekd-triple{grid-template-columns:1fr 1fr}}
@media(min-width:1000px){.ekd-triple{grid-template-columns:1.1fr 1.1fr 1fr}}
.ekd-box{background:var(--ekd-surface);border:1px solid var(--ekd-line);border-radius:var(--ekd-radius);padding:18px;min-width:0}
.ekd-box>h3{font-size:16px;margin-bottom:14px}
.ekd-rank{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:11px}
.ekd-rank li{display:flex;gap:11px;align-items:baseline;font-size:13.5px;min-width:0}
.ekd-rank .ekd-n{font-family:monospace;font-weight:700;color:var(--ekd-accent);width:14px;flex-shrink:0}
.ekd-rank li:hover .ekd-t{color:var(--ekd-accent)}
.ekd-nums{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.ekd-ncell{background:var(--ekd-surface-2);border-radius:9px;padding:12px}
.ekd-ncell .ekd-lab{font-family:monospace;font-size:10px;letter-spacing:.08em;color:var(--ekd-faint);margin-bottom:6px}
.ekd-ncell .ekd-v{font-weight:700;font-size:19px;line-height:1.1}
.ekd-ncell .ekd-c{font-size:11px;font-weight:600;margin-top:4px}
.ekd-note{font-size:11.5px;color:var(--ekd-faint);margin-top:11px}
.ekd-video-box{min-width:0}
.ekd-adbox{border:1.5px dashed var(--ekd-line);border-radius:var(--ekd-radius);display:grid;place-items:center;text-align:center;color:var(--ekd-faint);min-height:160px;padding:18px}
.ekd-adbox .ekd-t1{font-family:monospace;font-size:10px;letter-spacing:.14em;margin-bottom:6px}
.ekd-adbox .ekd-t2{font-size:13px;font-weight:600}
.ekd-video-player{position:relative;width:100%;aspect-ratio:16 / 9;background:#000;border-radius:9px;overflow:hidden}
.ekd-video-player iframe{position:absolute;inset:0;display:block;width:100%;height:100%;border:0}
.ekd-home .ekd-video-link{display:inline-block;margin-top:12px;font-size:12.5px;font-weight:600;color:#1976D2}

/* 경제도구 */
.ekd-tools{display:grid;grid-template-columns:1fr;gap:14px}
@media(min-width:720px){.ekd-tools{grid-template-columns:repeat(3,1fr)}}
.ekd-tool{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--ekd-surface);border:1px solid var(--ekd-line);border-radius:var(--ekd-radius);padding:18px 20px;cursor:pointer;font-family:inherit;font-size:16px;font-weight:700;color:var(--ekd-fg);width:100%;text-align:left}
.ekd-tool:hover{border-color:var(--ekd-accent);background:var(--ekd-accent-soft);color:var(--ekd-accent)}
.ekd-tool .ekd-arr{font-size:18px;color:var(--ekd-muted)}
.ekd-tool:hover .ekd-arr{color:var(--ekd-accent)}

/* 경제상식 / 라이프 */
.ekd-two{display:grid;grid-template-columns:1fr;gap:28px}
@media(min-width:720px){.ekd-two{grid-template-columns:1fr 1fr}}
.ekd-links{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.ekd-links li{border-top:1px solid var(--ekd-line)}
.ekd-links li:first-child{border-top:0}
.ekd-links a{display:flex;gap:9px;align-items:baseline;padding:13px 2px;font-size:14px;font-weight:500}
.ekd-links a:hover{color:var(--ekd-accent)}
.ekd-links a::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--ekd-accent);flex-shrink:0;transform:translateY(-3px)}

/* 12띠 운세 */
.ekd-zodiac{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
@media(min-width:520px){.ekd-zodiac{grid-template-columns:repeat(3,1fr)}}
@media(min-width:860px){.ekd-zodiac{grid-template-columns:repeat(6,1fr)}}
.ekd-zbtn{background:var(--ekd-surface);border:1px solid var(--ekd-line);border-radius:10px;padding:16px 8px;font-family:inherit;font-size:14px;font-weight:600;color:var(--ekd-fg);cursor:pointer}
.ekd-zbtn:hover{border-color:var(--ekd-accent);background:var(--ekd-accent-soft);color:var(--ekd-accent)}

/* 모달 */
.ekd-modal[hidden]{display:none!important}
.ekd-panel[hidden]{display:none!important}
.ekd-modal{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;padding:16px}
.ekd-modal-bg{position:absolute;inset:0;background:rgba(10,14,22,.55)}
.ekd-modal-box{position:relative;background:#fff;border:1px solid var(--ekd-line);border-radius:16px;width:100%;max-width:640px;max-height:88vh;overflow:auto;padding:22px;font-family:'IBM Plex Sans KR','Apple SD Gothic Neo',system-ui,sans-serif;color:var(--ekd-fg)}
.ekd-modal-x{position:absolute;top:14px;right:14px;border:1px solid var(--ekd-line);background:#fff;color:var(--ekd-muted);width:32px;height:32px;border-radius:8px;cursor:pointer;font-size:14px}
.ekd-mtitle{font-size:19px;font-weight:800;margin-bottom:16px;padding-right:36px}
.ekd-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:16px}
.ekd-tab{font-family:inherit;font-weight:600;font-size:13.5px;padding:8px 14px;border-radius:9px;border:1px solid var(--ekd-line);background:#fff;color:var(--ekd-muted);cursor:pointer}
.ekd-tab[aria-selected="true"]{background:var(--ekd-accent);border-color:var(--ekd-accent);color:#fff}
.ekd-seg{display:flex;gap:6px;margin-bottom:14px}
.ekd-seg button{flex:1;font-family:inherit;font-weight:600;font-size:13px;padding:8px;border-radius:8px;border:1px solid var(--ekd-line);background:#f7f9fc;color:var(--ekd-muted);cursor:pointer}
.ekd-seg button[aria-pressed="true"]{border-color:var(--ekd-accent);background:var(--ekd-accent-soft);color:var(--ekd-accent)}
.ekd-field{margin-bottom:12px}
.ekd-field>label{display:block;font-size:12.5px;font-weight:600;color:var(--ekd-muted);margin-bottom:6px}
.ekd-in{display:flex;align-items:center;border:1px solid var(--ekd-line);border-radius:9px;background:#f7f9fc;overflow:hidden}
.ekd-in:focus-within{border-color:var(--ekd-accent)}
.ekd-in input,.ekd-in select{flex:1;min-width:0;border:0;background:transparent;color:var(--ekd-fg);font-family:monospace;font-weight:500;font-size:15px;padding:10px 12px;outline:none;text-align:right}
.ekd-in select{font-family:inherit;text-align:left}
.ekd-in .ekd-unit{font-size:12.5px;color:var(--ekd-muted);padding-right:12px;white-space:nowrap}
.ekd-result{background:var(--ekd-surface-2);border-radius:11px;padding:16px;margin-top:14px}
.ekd-big-lab{font-size:12.5px;color:var(--ekd-muted);font-weight:600}
.ekd-big{font-family:monospace;font-weight:700;font-size:24px;letter-spacing:-.02em;color:var(--ekd-accent);line-height:1.2;word-break:keep-all;margin-top:2px}
.ekd-rrow{display:flex;justify-content:space-between;gap:12px;font-size:13px;padding-top:11px;margin-top:11px;border-top:1px dashed var(--ekd-line)}
.ekd-rrow .ekd-k{color:var(--ekd-muted);font-weight:600}
.ekd-rrow .ekd-vv{font-family:monospace;font-weight:500;text-align:right}
.ekd-fort .ekd-emoji{font-size:40px;text-align:center;margin-bottom:6px}
.ekd-zname{text-align:center;font-weight:800;font-size:18px;margin-bottom:12px}
.ekd-fscore{display:flex;justify-content:center;align-items:center;gap:8px;margin-bottom:12px}
.ekd-flabel{font-size:12.5px;color:var(--ekd-muted);font-weight:600}
.ekd-stars{font-size:16px;letter-spacing:2px;color:var(--ekd-up)}
.ekd-fhead{text-align:center;font-weight:800;font-size:16px;margin-bottom:7px}
.ekd-fort p{text-align:center;font-size:13.5px;color:var(--ekd-muted);margin:0 0 14px;line-height:1.6}
.ekd-fdis{font-size:10.5px;color:var(--ekd-faint);text-align:center}

/* 오늘의 경제 자동 전환: 메인 영역에만 적용 */
.ekd-carousel { min-width: 0; }
.ekd-carousel .ekd-feature .ekd-imgph { aspect-ratio: 500 / 310; }
.ekd-carousel-controls { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; font-size:12px; color:var(--ekd-muted); }
.ekd-carousel-controls > span { margin-right:auto; }
.ekd-carousel-controls button { background:#fff; color:#123B66; border:1px solid #E5E7EB; border-radius:6px; padding:6px 10px; font-size:12px; line-height:1.5; cursor:pointer; }
.ekd-carousel-controls button:hover { background:#F3F8FC; }
.ekd-carousel-controls button:focus-visible { outline:2px solid #1976D2; outline-offset:2px; }
