/* 자금진단.com Clean Platform v112 UI System - 2026-05-26 */
:root,
html[data-theme="light"]{
  color-scheme: light;
  --jg-bg:#f6f8fc;
  --jg-bg2:#eef4fb;
  --jg-surface:#ffffff;
  --jg-surface2:#f1f5f9;
  --jg-text:#0b1220;
  --jg-muted:#64748b;
  --jg-line:#d8e0ec;
  --jg-primary:#1e5bff;
  --jg-primary2:#0f46d8;
  --jg-accent:#14b8a6;
  --jg-danger:#dc2626;
  --jg-warn:#f59e0b;
  --jg-shadow:0 18px 48px rgba(15,23,42,.10);
  --jg-soft-shadow:0 10px 28px rgba(15,23,42,.07);
}
html[data-theme="dark"]{
  color-scheme: dark;
  --jg-bg:#07111f;
  --jg-bg2:#0b1628;
  --jg-surface:#0f1b2d;
  --jg-surface2:#14243a;
  --jg-text:#f8fafc;
  --jg-muted:#cbd5e1;
  --jg-line:#334155;
  --jg-primary:#4f83ff;
  --jg-primary2:#7aa2ff;
  --jg-accent:#2dd4bf;
  --jg-danger:#fb7185;
  --jg-warn:#fbbf24;
  --jg-shadow:0 18px 48px rgba(0,0,0,.32);
  --jg-soft-shadow:0 10px 28px rgba(0,0,0,.24);
}
html,body{max-width:100%;overflow-x:hidden;}
html[data-theme="dark"] body{background:var(--jg-bg)!important;color:var(--jg-text)!important;}
html[data-theme="dark"] .page,
html[data-theme="dark"] .workspace,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .section,
html[data-theme="dark"] .tool-card,
html[data-theme="dark"] .form-section,
html[data-theme="dark"] .standard-card,
html[data-theme="dark"] .input-quality-card,
html[data-theme="dark"] .desktop-compact-summary,
html[data-theme="dark"] .scenario,
html[data-theme="dark"] .scenario-section,
html[data-theme="dark"] .result-panel,
html[data-theme="dark"] .risk-card,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .analysis-item,
html[data-theme="dark"] .check,
html[data-theme="dark"] .guide-box,
html[data-theme="dark"] .hub-next-links,
html[data-theme="dark"] .prep-docs-panel,
html[data-theme="dark"] .consulting-result-card,
html[data-theme="dark"] .premium-result-panel,
html[data-theme="dark"] details,
html[data-theme="dark"] .choice-card,
html[data-theme="dark"] .sim-box,
html[data-theme="dark"] .main-card,
html[data-theme="dark"] .form-card,
html[data-theme="dark"] .diagnostic-intro-card{
  background:var(--jg-surface)!important;
  color:var(--jg-text)!important;
  border-color:var(--jg-line)!important;
  box-shadow:var(--jg-soft-shadow)!important;
}
html[data-theme="dark"] .standard-card,
html[data-theme="dark"] .form-section,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .analysis-item,
html[data-theme="dark"] .check,
html[data-theme="dark"] .guide-box,
html[data-theme="dark"] .scenario,
html[data-theme="dark"] .input-unit-wrap{
  background:var(--jg-surface2)!important;
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] strong,
html[data-theme="dark"] label,
html[data-theme="dark"] .value,
html[data-theme="dark"] .metric strong,
html[data-theme="dark"] .analysis-item strong{
  color:var(--jg-text)!important;
}
html[data-theme="dark"] p,
html[data-theme="dark"] small,
html[data-theme="dark"] .sub,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .tool-card small,
html[data-theme="dark"] .metric span,
html[data-theme="dark"] .analysis-item span,
html[data-theme="dark"] .field small,
html[data-theme="dark"] .work-head p{
  color:var(--jg-muted)!important;
}
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .search,
html[data-theme="dark"] .jg-search,
html[data-theme="dark"] .field input,
html[data-theme="dark"] .field select{
  background:var(--jg-surface2)!important;
  color:var(--jg-text)!important;
  border-color:var(--jg-line)!important;
}
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder{color:#94a3b8!important;}
html[data-theme="dark"] .unit-suffix{color:var(--jg-text)!important;background:transparent!important;}
html[data-theme="dark"] .btn.secondary,
html[data-theme="dark"] .jg-btn.secondary{background:var(--jg-surface2)!important;color:var(--jg-text)!important;border-color:var(--jg-line)!important;}

/* Hide old conflicting controls. The clean header owns toolbar/menu/theme. */
.global-lang-switch,.lang-switch,.theme-toggle,.floating-toolbar,.jagum-floating-tools,.bauhaus-toolbar,.moon-floating,.dark-floating,
.mobile-calculator-floating,.s102-header,.sprint-toolbar,.favorite-corner,.mobile-calculator-index,
.seo-qa-panel,.ops-qa-panel,.admin-qa-panel,.qa-healthcheck-panel{display:none!important;visibility:hidden!important;pointer-events:none!important;}

/* Desktop utility */
.jg-desktop-utility{display:flex;justify-content:flex-end;align-items:center;max-width:1180px;margin:10px auto 0;padding:0 16px;position:relative;z-index:50;}
@media(max-width:820px){.jg-desktop-utility{display:none!important;}}

/* Clean mobile app shell */
.jg-mobile-shell{display:none;}
@media(max-width: 820px){
  body.jg-mobile-mode{margin:0!important;background:var(--jg-bg)!important;color:var(--jg-text)!important;overflow-x:hidden!important;}
  body.jg-mobile-mode > :not(.jg-mobile-shell):not(.jg-sheet-backdrop):not(script):not(style):not(link):not(noscript){display:none!important;}
  .jg-mobile-shell{display:block;min-height:100vh;background:linear-gradient(180deg,var(--jg-bg) 0%,var(--jg-bg2) 100%);padding:14px 14px 96px;color:var(--jg-text);font-family:-apple-system,BlinkMacSystemFont,'Segoe UI','Noto Sans KR','Apple SD Gothic Neo',sans-serif;letter-spacing:-.025em;}
}
.jg-app-header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:2px 0 14px;min-width:0;}
.jg-brand{font-weight:950;color:var(--jg-text);font-size:1.02rem;white-space:nowrap;text-decoration:none;}
.jg-tools{display:inline-flex;align-items:center;gap:5px;border:1px solid var(--jg-line);background:color-mix(in srgb,var(--jg-surface) 88%,transparent);box-shadow:var(--jg-soft-shadow);border-radius:999px;padding:4px;white-space:nowrap;flex-shrink:0;}
.jg-tools button{appearance:none;border:0;background:transparent;color:var(--jg-text);border-radius:999px;min-width:28px;height:28px;padding:0 7px;font-size:.76rem;font-weight:950;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;line-height:1;}
.jg-tools button:hover,.jg-tools button.is-active{background:var(--jg-surface2);}

.jg-tools{position:relative;}
.jg-lang-menu{position:absolute;right:0;top:calc(100% + 8px);width:176px;display:none;grid-template-columns:1fr;gap:4px;padding:8px;border:1px solid var(--jg-line);border-radius:16px;background:var(--jg-surface);box-shadow:var(--jg-shadow);z-index:100000;color:var(--jg-text);}
.jg-lang-menu.is-open{display:grid!important;visibility:visible!important;pointer-events:auto!important;}
.jg-lang-menu button{width:100%;min-width:0!important;height:36px!important;border-radius:12px!important;padding:0 10px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:9px!important;background:transparent!important;color:var(--jg-text)!important;font-size:.8rem!important;text-align:left!important;}
.jg-lang-menu button b{display:inline-flex;align-items:center;justify-content:center;min-width:32px;height:22px;border-radius:999px;background:var(--jg-surface2);color:var(--jg-text);font-size:.72rem;letter-spacing:.02em;}
.jg-lang-menu button span{font-size:.78rem;color:var(--jg-muted);font-weight:850;}
.jg-lang-menu button:hover,.jg-lang-menu button.is-active{background:var(--jg-surface2)!important;}
.jg-lang-menu button.is-active b{background:var(--jg-primary);color:#fff;}
html[data-theme="dark"] .jg-lang-menu{background:var(--jg-surface)!important;color:var(--jg-text)!important;border-color:var(--jg-line)!important;}
html[data-theme="dark"] .jg-lang-menu button span{color:var(--jg-muted)!important;}
@media(max-width:420px){.jg-lang-menu{right:-42px;width:168px}.jg-lang-menu button{height:38px!important;}}

.jg-hero{position:relative;overflow:hidden;border:1px solid var(--jg-line);border-radius:28px;padding:24px 18px;background:var(--jg-surface);box-shadow:var(--jg-shadow);}
.jg-hero:before{content:"";position:absolute;right:-42px;top:-50px;width:160px;height:160px;border-radius:50%;background:radial-gradient(circle,rgba(79,131,255,.30),rgba(45,212,191,.16),transparent 72%);animation:jgFloat 8s ease-in-out infinite;}
.jg-hero:after{content:"";position:absolute;right:28px;bottom:-36px;width:150px;height:72px;border-radius:999px;background:linear-gradient(135deg,rgba(30,91,255,.18),rgba(20,184,166,.16));transform:rotate(-14deg);}
@keyframes jgFloat{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(-8px,12px,0) scale(1.04)}}
@media(prefers-reduced-motion: reduce){.jg-hero:before{animation:none}}
.jg-hero h1{position:relative;margin:0 0 10px;font-size:clamp(1.72rem,9vw,2.1rem);line-height:1.12;letter-spacing:-.075em;color:var(--jg-text);font-weight:980;word-break:keep-all;overflow-wrap:anywhere;}
.jg-hero p{position:relative;margin:0;color:var(--jg-muted);font-size:.9rem;line-height:1.55;max-width:24rem;word-break:keep-all;overflow-wrap:anywhere;}
.jg-actions{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:18px;}
.jg-btn{border:1px solid var(--jg-line);border-radius:15px;min-height:46px;padding:0 12px;display:flex;align-items:center;justify-content:center;gap:6px;font-weight:950;font-size:.9rem;text-decoration:none;cursor:pointer;min-width:0;}
.jg-btn.primary{background:linear-gradient(135deg,var(--jg-primary),var(--jg-primary2));color:#fff;border-color:transparent;}
.jg-btn.secondary{background:var(--jg-surface2);color:var(--jg-text);}
.jg-section{margin-top:18px;}
.jg-section-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 10px;}
.jg-section h2{margin:0;font-size:1.08rem;color:var(--jg-text);letter-spacing:-.05em;}
.jg-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:9px;}
.jg-card{border:1px solid var(--jg-line);background:var(--jg-surface);border-radius:18px;padding:13px;box-shadow:var(--jg-soft-shadow);min-width:0;overflow:hidden;text-align:left;cursor:pointer;color:var(--jg-text);}
.jg-card .ico{width:34px;height:34px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:var(--jg-surface2);margin-bottom:8px;font-size:1.05rem;}
.jg-card strong{display:block;font-size:.9rem;line-height:1.25;color:var(--jg-text);word-break:keep-all;overflow-wrap:anywhere;}
.jg-card span{display:block;margin-top:3px;color:var(--jg-muted);font-size:.74rem;line-height:1.28;word-break:keep-all;overflow-wrap:anywhere;}
.jg-popular{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;}
.jg-popular-card,.jg-chip{border:1px solid var(--jg-line);background:var(--jg-surface);border-radius:15px;padding:10px 5px;text-align:center;font-size:.78rem;font-weight:950;color:var(--jg-text);box-shadow:var(--jg-soft-shadow);text-decoration:none;min-width:0;white-space:normal;word-break:keep-all;overflow-wrap:anywhere;}
.jg-popular-card span{display:block;margin-bottom:3px;}
.jg-more{border:1px solid var(--jg-line);background:var(--jg-surface);border-radius:18px;box-shadow:var(--jg-soft-shadow);overflow:hidden;}
.jg-more summary{list-style:none;cursor:pointer;padding:14px;font-weight:950;display:flex;align-items:center;justify-content:space-between;color:var(--jg-text);}
.jg-more summary::-webkit-details-marker{display:none;}
.jg-more-list{display:grid;gap:0;border-top:1px solid var(--jg-line);}
.jg-more-list button,.jg-more-list a{border:0;border-bottom:1px solid var(--jg-line);background:transparent;color:var(--jg-text);padding:14px;text-align:left;font-weight:850;text-decoration:none;display:flex;justify-content:space-between;align-items:center;width:100%;}
.jg-more-list button:last-child,.jg-more-list a:last-child{border-bottom:0;}
.jg-bottom-cta{position:fixed;left:14px;right:14px;bottom:14px;z-index:99990;border:0;border-radius:18px;background:linear-gradient(135deg,var(--jg-primary),var(--jg-primary2));box-shadow:0 18px 44px rgba(30,91,255,.28);color:#fff;height:54px;font-weight:950;font-size:.98rem;display:none;align-items:center;justify-content:center;text-decoration:none;}
@media(max-width:820px){body.jg-mobile-mode .jg-bottom-cta{display:flex;}}

/* Calculator index bottom sheet */
.jg-sheet-backdrop{position:fixed;inset:0;background:rgba(2,8,23,.48);z-index:99995;display:none;align-items:flex-end;justify-content:center;padding:0;}
.jg-sheet-backdrop.is-open{display:flex!important;}
.jg-sheet{width:100%;max-width:760px;max-height:88vh;background:var(--jg-surface);color:var(--jg-text);border:1px solid var(--jg-line);border-radius:28px 28px 0 0;box-shadow:0 -18px 60px rgba(0,0,0,.22);padding:16px;overflow:auto;}
@media(min-width:821px){.jg-sheet-backdrop{align-items:center;padding:20px}.jg-sheet{border-radius:28px;max-width:900px;max-height:82vh;}}
.jg-sheet-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px;}
.jg-sheet-title{margin:0;font-size:1.15rem;font-weight:980;color:var(--jg-text);}
.jg-close{border:1px solid var(--jg-line);background:var(--jg-surface2);color:var(--jg-text);width:34px;height:34px;border-radius:999px;cursor:pointer;font-weight:950;}
.jg-search{width:100%;height:44px;border:1px solid var(--jg-line);background:var(--jg-surface2);color:var(--jg-text);border-radius:14px;padding:0 12px;font-weight:700;margin-bottom:12px;}
.jg-category-tabs{display:flex;gap:7px;overflow:auto;padding-bottom:8px;margin-bottom:10px;scrollbar-width:none;}
.jg-category-tabs::-webkit-scrollbar{display:none;}
.jg-category-tabs button{border:1px solid var(--jg-line);background:var(--jg-surface2);color:var(--jg-text);border-radius:999px;padding:9px 12px;font-size:.8rem;font-weight:950;white-space:nowrap;cursor:pointer;}
.jg-category-tabs button.is-active{background:var(--jg-primary);border-color:var(--jg-primary);color:#fff;}
.jg-calc-list{display:grid;grid-template-columns:1fr;gap:9px;}
@media(min-width:680px){.jg-calc-list{grid-template-columns:1fr 1fr;}}
.jg-calc-card{display:grid;grid-template-columns:38px 1fr auto;gap:10px;align-items:center;border:1px solid var(--jg-line);border-radius:17px;background:var(--jg-surface);color:var(--jg-text);padding:11px;text-decoration:none;box-shadow:var(--jg-soft-shadow);min-width:0;}
.jg-calc-card .ico{width:38px;height:38px;border-radius:13px;display:flex;align-items:center;justify-content:center;background:var(--jg-surface2);font-size:1.05rem;}
.jg-calc-card .body{min-width:0;display:block;}
.jg-calc-card strong{display:block;color:var(--jg-text);font-size:.88rem;line-height:1.25;word-break:keep-all;overflow-wrap:anywhere;}
.jg-calc-card small{display:block;color:var(--jg-muted);font-size:.72rem;line-height:1.25;margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.jg-calc-card .tags{display:flex;gap:4px;flex-wrap:wrap;margin-top:5px;}
.jg-calc-card .tags span{font-size:.65rem;padding:3px 6px;border-radius:999px;background:var(--jg-surface2);color:var(--jg-muted);font-weight:850;}
.jg-calc-card .go{font-size:.78rem;color:var(--jg-primary);font-weight:950;white-space:nowrap;}
.jg-empty{border:1px dashed var(--jg-line);border-radius:16px;padding:20px;text-align:center;color:var(--jg-muted);}

/* Detail upgrade panel */
.jg-detail-panel{margin:14px 18px 0;border:1px solid var(--jg-line);background:var(--jg-surface);border-radius:18px;overflow:hidden;color:var(--jg-text);}
.jg-detail-panel summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px;font-weight:950;color:var(--jg-text);}
.jg-detail-panel summary::-webkit-details-marker{display:none;}
.jg-detail-panel summary span{font-size:.74rem;color:var(--jg-muted);font-weight:800;}
.jg-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;border-top:1px solid var(--jg-line);padding:12px;}
.jg-detail-grid div{background:var(--jg-surface2);border:1px solid var(--jg-line);border-radius:14px;padding:10px;}
.jg-detail-grid strong{display:block;font-size:.82rem;color:var(--jg-text);}
.jg-detail-grid p{margin:5px 0 0;color:var(--jg-muted);font-size:.72rem;line-height:1.45;word-break:keep-all;overflow-wrap:anywhere;}
@media(max-width:720px){.jg-detail-grid{grid-template-columns:1fr}.jg-detail-panel{margin:12px 12px 0}}

/* Keep legacy pages stable but prevent mobile overflows */
img,svg,canvas,video,iframe{max-width:100%;}
button,a,input,select,textarea,.tool-card,.choice-card,.field,.input-unit-wrap{min-width:0;}
.quick-row,.filter-row,.category-tabs,.tabs,.chip-row{max-width:100%;overflow-x:auto;scrollbar-width:none;}
.quick-row::-webkit-scrollbar,.filter-row::-webkit-scrollbar,.category-tabs::-webkit-scrollbar,.tabs::-webkit-scrollbar,.chip-row::-webkit-scrollbar{display:none;}
.tool-card small,.tool-card h3,.field label,.field small,.choice-card strong,.choice-card span{word-break:keep-all;overflow-wrap:anywhere;}
@media(max-width:820px){.main-nav,.site-nav,.desktop-nav,.nav-links,.premium-home .top-row,.top-row .lang-switch{display:none!important;}}
