:root{
  --bg:#F2F4F6; --card:#FFFFFF; --navy:#0E2436; --navy2:#173650; --navy3:#2C4C62;
  --gold:#C9A45C; --gold-ink:#7A5B17; --gold-bg:#F4EBD9;
  --ink:#0E2436; --sub:#5B6672; --line:#E5E8EB; --chip-line:#D5DBE1;
  --up:#D0342C; --down:#2459C9; --green-ink:#1F5A36; --green-bg:#E6F0EA; --blue-bg:#E8EEF4;
  --tabbar-h:64px;
}
*{box-sizing:border-box}
html,body{margin:0;background:#E3E7EB;color:var(--ink);font-family:'Noto Sans KR',system-ui,-apple-system,sans-serif;-webkit-text-size-adjust:100%}
a{color:inherit;text-decoration:none}
button{font-family:inherit;color:inherit}
.shell{max-width:480px;margin:0 auto;min-height:100vh;min-height:100dvh;background:var(--bg);position:relative}
.screen{padding-bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px);min-height:100vh}
.screen.white{background:#fff}
.screen.full{padding-bottom:0}
.tabbar{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:480px;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));background:#fff;border-top:1px solid var(--line);padding:6px 4px calc(6px + env(safe-area-inset-bottom));z-index:20}
.tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:50px;color:var(--sub);font-size:11px;font-weight:500}
.tabbar a.on{color:var(--navy);font-weight:700}
.tabbar svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tabbar.hide{display:none}
.ico{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:0 0 auto}
.ico.sm{width:18px;height:18px}

.top{display:flex;align-items:center;justify-content:space-between;padding:16px 20px 8px}
.top h1{margin:0;font-size:26px;font-weight:900;letter-spacing:-.5px}
.logo{display:flex;align-items:center;gap:6px;font-size:22px;font-weight:900;letter-spacing:-.5px}
.logo i{width:7px;height:7px;border-radius:50%;background:var(--gold);display:inline-block}
.bar{display:flex;align-items:center;gap:4px;padding:10px 12px 8px 6px;position:sticky;top:0;background:inherit;z-index:5}
.bar h1{margin:0;font-size:18px;font-weight:700;flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.iconbtn{width:44px;height:44px;border:0;background:transparent;display:flex;align-items:center;justify-content:center;border-radius:12px;cursor:pointer;flex:0 0 auto}
.iconbtn:active{background:rgba(14,36,54,.06)}

.stack{display:flex;flex-direction:column;gap:12px;padding:4px 16px 16px}
.card{background:var(--card);border-radius:20px;padding:20px}
.card.pad0{padding:20px 0}
.card h2{margin:0;font-size:19px;font-weight:700}
.card .head{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.card .head a{font-size:14px;color:var(--sub);flex:0 0 auto}
.card.pad0 .head{padding:0 20px}
.muted{color:var(--sub)}
.small{font-size:13px}
.searchpill{display:flex;align-items:center;gap:10px;height:54px;padding:0 18px;background:#fff;border-radius:16px;color:var(--sub);font-size:16px}
.big{font-size:28px;font-weight:900;letter-spacing:-.6px}

.row{display:flex;align-items:center;gap:12px;padding:13px 0;min-height:48px;border-bottom:1px solid var(--bg)}
.row:last-child{border-bottom:0}
.row .main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.row .t{font-size:16px;font-weight:700;line-height:1.4;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.row .s{font-size:13px;color:var(--sub)}
.row .r{font-size:16px;font-weight:700;flex:0 0 auto;text-align:right}
.row .av{width:40px;height:40px;border-radius:12px;background:var(--navy);color:#fff;font-size:13px;font-weight:700;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.row .thumb{width:72px;height:72px;border-radius:12px;background:var(--blue-bg) center/cover no-repeat;flex:0 0 auto}

.quick{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));row-gap:14px;padding:20px 8px 14px}
.quick a{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:13px;font-weight:500;text-align:center}
.quick span.i{width:52px;height:52px;border-radius:18px;background:var(--bg);display:flex;align-items:center;justify-content:center}
.quick svg{width:26px;height:26px;fill:none;stroke:var(--navy);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}

.hscroll{display:flex;gap:10px;padding:14px 20px 0;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.hscroll::-webkit-scrollbar{display:none}
.tile{flex:0 0 200px;border-radius:16px;background:var(--bg);padding:14px;display:flex;flex-direction:column;gap:4px}
.tile .t{font-size:15px;font-weight:700;line-height:1.35}
.tile .p{font-size:17px;font-weight:900}
.short{flex:0 0 124px;height:208px;border-radius:16px;background:var(--navy) center/cover no-repeat;padding:12px;display:flex;flex-direction:column;justify-content:space-between;color:#fff;position:relative;overflow:hidden}
.short::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(14,36,54,0) 40%,rgba(14,36,54,.85))}
.short>*{position:relative;z-index:1}
.short .t{font-size:14px;font-weight:700;line-height:1.35;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}
.short span>span:first-child{display:block;font-size:20px;font-weight:900;color:var(--gold);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.badge{align-self:flex-start;font-size:12px;font-weight:700;padding:3px 8px;border-radius:6px;background:var(--blue-bg);color:var(--navy);white-space:nowrap}
.badge.gold{background:var(--gold-bg);color:var(--gold-ink)}
.badge.green{background:var(--green-bg);color:var(--green-ink)}
.badge.gray{background:#EEF0F3;color:#3D4852}

.chips{display:flex;gap:8px;padding:4px 16px 14px;overflow-x:auto;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto;height:36px;padding:0 14px;border-radius:18px;border:1px solid var(--chip-line);background:#fff;font-size:14px;font-weight:700;cursor:pointer}
.chip.on{border-color:var(--navy);background:var(--navy);color:#fff}

.searchbox{flex:1;display:flex;align-items:center;gap:8px;height:46px;padding:0 14px;background:var(--bg);border-radius:14px}
.searchbox input{flex:1;min-width:0;border:0;background:transparent;font:inherit;font-size:16px;font-weight:700;color:var(--ink);outline:none}
.sect{padding:0 20px}
.sect h2{margin:16px 0 2px;font-size:15px;font-weight:700;color:var(--sub);display:flex;justify-content:space-between}
.divider{height:8px;background:var(--bg);margin:8px 0}

.dbi{background:var(--navy);color:#fff;border-radius:20px;padding:22px 20px;display:flex;flex-direction:column;gap:4px}
.dbi .k{font-size:14px;color:#C9D3DB}
.dbi .v{font-size:32px;font-weight:900}
.dbi .c{font-size:15px;font-weight:700;color:var(--gold)}

.cta{display:flex;align-items:center;justify-content:center;height:54px;border-radius:14px;background:var(--navy);color:#fff;font-size:16px;font-weight:700;border:0;cursor:pointer;width:100%}
.cta.light{background:var(--blue-bg);color:var(--navy)}
.ctabar{position:sticky;bottom:0;display:flex;gap:8px;padding:12px 16px calc(16px + env(safe-area-inset-bottom));background:#fff;border-top:1px solid var(--line)}

.grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.fact{background:var(--bg);border-radius:14px;padding:14px}
.fact .k{font-size:13px;color:var(--sub)}
.fact .v{font-size:17px;font-weight:700}
.tabs{display:flex;padding:0 12px;border-bottom:1px solid var(--line);overflow-x:auto;scrollbar-width:none;position:sticky;top:62px;background:#fff;z-index:4}
.tabs button{flex:1 0 auto;height:48px;padding:0 10px;border:0;background:transparent;font-size:15px;font-weight:500;color:var(--sub);cursor:pointer}
.tabs button.on{font-weight:700;color:var(--navy);box-shadow:inset 0 -2px 0 var(--navy)}

.viewer{position:fixed;inset:0;display:flex;flex-direction:column;background:#fff;z-index:30;max-width:480px;margin:0 auto}
.viewer .bar{background:#fff;border-bottom:1px solid var(--line)}
.viewer iframe{flex:1;width:100%;border:0;background:#fff}
.viewer.withtabs{bottom:calc(var(--tabbar-h) + env(safe-area-inset-bottom))}

.skel{background:linear-gradient(90deg,#EEF0F3 25%,#F6F7F9 50%,#EEF0F3 75%);background-size:200% 100%;animation:sk 1.2s infinite;border-radius:12px}
@keyframes sk{0%{background-position:200% 0}100%{background-position:-200% 0}}
.empty{padding:28px 16px;text-align:center;color:var(--sub);font-size:14px}
.foot{margin:4px 0 0;text-align:center;font-size:12px;color:var(--sub)}
.listcard{background:#fff;border-radius:20px;padding:8px 20px}
.listcard h2{margin:12px 0 4px;font-size:14px;font-weight:700;color:var(--sub)}
.listcard a,.listcard .li{display:flex;align-items:center;justify-content:space-between;min-height:52px;font-size:16px;font-weight:500;gap:10px}
.listcard .li .d{font-size:13px;color:var(--sub);font-weight:400}
.mode{font-size:12px;font-weight:700;flex:0 0 auto}
.mode.in{color:var(--green-ink)}.mode.full{color:var(--gold-ink)}
.up{color:var(--up)}.down{color:var(--down)}
.toast{position:fixed;left:50%;bottom:calc(var(--tabbar-h) + 24px);transform:translateX(-50%);background:rgba(14,36,54,.92);color:#fff;padding:10px 16px;border-radius:12px;font-size:14px;z-index:50}
@media (min-width:481px){.shell{box-shadow:0 0 0 1px #D5DBE1}}
.loadwrap{height:3px;overflow:hidden;background:transparent;position:relative;flex:0 0 3px}
.loadwrap .loadbar{position:absolute;top:0;left:-40%;width:40%;height:3px;background:var(--gold);animation:lb 1s ease-in-out infinite}
.loadwrap.done{visibility:hidden}
@keyframes lb{0%{left:-40%}100%{left:100%}}
.viewer .bar{border-bottom:0}
