:root {
  --bg: #f6f5f1; --card: #ffffff; --ink: #1d232b; --sub: #5d6773; --line: #e3e0d8;
  --accent: #2c5d8f; --good: #2f8a57; --bad: #c0473a; --warn: #c98a1b;
  --winter: #4a7bd0; --spring: #3fa66b; --summer: #e0962b; --autumn: #c0573a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.55 -apple-system, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", sans-serif; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; background: #1f2a36; color: #fff; gap: 12px; flex-wrap: wrap; }
.brand { font-size: 18px; font-weight: 700; }
.brand small { font-weight: 400; font-size: 12px; opacity: .7; margin-left: 8px; }
.status { font-size: 12px; opacity: .8; }
.tabs { display: flex; gap: 2px; padding: 0 16px; background: #26323f; overflow-x: auto; }
.tabs button { background: none; border: 0; color: #c9d3de; padding: 11px 15px; font-size: 14px; cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: #fff; border-bottom-color: #f0b44c; font-weight: 600; }
main { max-width: 1280px; margin: 0 auto; padding: 18px 16px 40px; }
.tab { display: none; } .tab.on { display: block; }
.foot { text-align: center; color: var(--sub); font-size: 12px; padding: 20px; }
h2 { font-size: 17px; margin: 0 0 10px; } h3 { font-size: 15px; margin: 0 0 8px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.card.tight { padding: 12px; }
.muted { color: var(--sub); } .small { font-size: 12px; }
.good { color: var(--good); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.hero { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; color: #fff; border: 0; }
.hero .big { font-size: 56px; line-height: 1; }
.hero .name { font-size: 30px; font-weight: 800; }
.hero .meta { opacity: .9; font-size: 13px; }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; background: #eef1f4; color: var(--ink); margin: 1px 2px; white-space: nowrap; }
.pill.s-winter { background: #e3ecfb; color: #2c55a0; } .pill.s-spring { background: #e0f3e7; color: #23784a; }
.pill.s-summer { background: #fcefd8; color: #9a6210; } .pill.s-autumn { background: #f8e2dc; color: #973a22; }
.bar { height: 8px; background: #e9e6df; border-radius: 99px; overflow: hidden; } .bar > i { display: block; height: 100%; background: var(--accent); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-weight: 600; color: var(--sub); background: #faf9f6; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.sel td { background: #fff8e6; }
tbody tr:hover td { background: #fbfaf7; }
.matrix td.cur { background: #fff4d6; font-weight: 600; } .matrix td.nxt { background: #eef6ff; }
.check { list-style: none; padding: 0; margin: 0; } .check li { padding: 4px 0; }
.check li::before { content: "○ "; color: #aaa; } .check li.on::before { content: "● "; color: var(--good); }
button, .btn { background: var(--accent); color: #fff; border: 0; border-radius: 8px; padding: 7px 13px; font-size: 13px; cursor: pointer; }
button.ghost { background: #eef1f4; color: var(--ink); } button.danger { background: #f3e1de; color: var(--bad); }
button.sm { padding: 3px 8px; font-size: 12px; }
input, select, textarea { font: inherit; padding: 6px 8px; border: 1px solid #cfcbc1; border-radius: 7px; background: #fff; }
input[type=number] { width: 110px; } input.w60 { width: 60px; } input.w80 { width: 80px; } input.w140 { width: 140px; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 5px; background: #eef1f4; margin-left: 4px; }
.tag.lev { background: #fde8e4; color: #a33; } .tag.kr { background: #e8f0fb; color: #2c5d8f; } .tag.core { background: #e4f4ea; color: #23784a; }
.verdict { padding: 10px 12px; border-radius: 9px; font-weight: 600; }
.verdict.ok { background: #e4f4ea; color: #1f6b40; } .verdict.mid { background: #fdf2dc; color: #8a5a0b; } .verdict.no { background: #f9e3df; color: #9b2f22; }
.scroll { max-height: 520px; overflow: auto; }
.chartbox { position: relative; height: 260px; } .chartbox.tall { height: 360px; }
.note { background: #fbf6e8; border-left: 4px solid #e0b24c; padding: 10px 12px; border-radius: 6px; font-size: 13px; }
.diag { display: flex; justify-content: space-between; align-items: baseline; }
.diag .v { font-size: 22px; font-weight: 700; }
.section-title { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 10px; }
.arrow-up { color: var(--good); } .arrow-down { color: var(--bad); }
@media (max-width: 640px) { .g2 { grid-template-columns: 1fr; } .hero .big { font-size: 42px; } }

/* ---------- 2차 보강: 쉬운 설명·위젯 ---------- */
input.w100 { width: 100px; }
.toggle { background: #34465a; color: #fff; border: 1px solid #4b5f75; }
.toggle.off { background: transparent; color: #c9d3de; }
.top .row { gap: 12px; }
.tip { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid #9fb3c8; color: var(--accent); font-size: 11px; font-weight: 700; cursor: help; vertical-align: middle; margin-left: 2px; line-height: 1; user-select: none; background: #fff; font-style: normal; }
.tip:hover, .tip:focus { background: var(--accent); color: #fff; border-color: var(--accent); outline: none; }
.hero .tip, .hero-home .tip { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.7); }
#tipLayer { display: none; position: fixed; z-index: 1000; max-width: 320px; background: #1f2a36; color: #f3f5f7; padding: 10px 12px; border-radius: 9px; font-size: 12.5px; line-height: 1.55; box-shadow: 0 6px 24px rgba(0,0,0,.25); pointer-events: none; }
#tipLayer b { display: block; margin-bottom: 3px; color: #f0b44c; }
.easy { display: flex; gap: 8px; align-items: flex-start; background: #eef5fc; border: 1px solid #d6e6f5; color: #23415e; border-radius: 9px; padding: 9px 11px; margin-top: 10px; font-size: 13px; line-height: 1.6; }
.easy .easy-ico { flex: none; }
.ez { color: #2f5f8c; }
.stars { letter-spacing: 1px; color: #c0573a; font-size: 11px; white-space: nowrap; } .stars .off { color: #dcd8cf; }
.dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: #cfcbc1; margin-right: 4px; vertical-align: middle; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); flex: none; }
.dot.good { background: #2f8a57; } .dot.bad { background: #c0473a; } .dot.mid { background: #e0b24c; } .dot.na { background: #d8d4ca; }
.sbar { position: relative; display: inline-block; width: 70px; height: 8px; background: #efece5; border-radius: 4px; vertical-align: middle; overflow: hidden; }
.sbar::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: #a9a59b; }
.sbar i { position: absolute; top: 0; bottom: 0; } .sbar i.pos { background: #3fa66b; } .sbar i.neg { background: #c0573a; }
.lights { display: grid; gap: 8px; } .light-item { display: flex; gap: 8px; align-items: flex-start; }
.light-item .dot { width: 18px; height: 18px; margin-top: 2px; }
.biglight { display: inline-flex; flex-direction: column; gap: 4px; background: #2b3540; padding: 6px; border-radius: 10px; flex: none; }
.biglight i { width: 16px; height: 16px; border-radius: 50%; background: #4a5561; display: block; }
.biglight.red .r { background: #e5533f; box-shadow: 0 0 8px #e5533f; } .biglight.yellow .y { background: #f2c14e; box-shadow: 0 0 8px #f2c14e; } .biglight.green .g { background: #3fbf6f; box-shadow: 0 0 8px #3fbf6f; }
.thermo .scale { position: relative; height: 12px; border-radius: 6px; background: linear-gradient(90deg, #4a7bd0 0%, #5aa0c8 20%, #2f8a57 36%, #2f8a57 50%, #e0962b 64%, #e0962b 78%, #c0473a 100%); }
.thermo .scale i { position: absolute; top: -5px; width: 4px; height: 22px; margin-left: -2px; background: #1d232b; border-radius: 2px; box-shadow: 0 0 0 2px #fff; }
.thermo .ticks { display: flex; justify-content: space-between; font-size: 10px; color: var(--sub); margin-top: 3px; }
.zone { padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.kpis2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hero-home { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; color: #fff; border-radius: 14px; padding: 20px 22px; }
.hero-home .big { font-size: 64px; line-height: 1; }
.hero-home .hh-main { flex: 1; min-width: 260px; }
.hero-home .name { font-size: 32px; font-weight: 800; margin: 2px 0; }
.hero-home .lead { font-size: 15px; opacity: .96; }
.hero-home .meta { font-size: 13px; opacity: .92; }
.hero-home .hh-side { min-width: 200px; background: rgba(255,255,255,.14); border-radius: 10px; padding: 10px 12px; }
.bar.light { background: rgba(255,255,255,.3); margin: 6px 0; } .bar.light > i { background: #fff; }
.card.mini { border-top: 4px solid #cfcbc1; } .card.mini.good { border-top-color: var(--good); } .card.mini.bad { border-top-color: var(--bad); } .card.mini.mid { border-top-color: var(--warn); }
.mini-big { font-size: 24px; font-weight: 800; margin: 6px 0 2px; min-height: 30px; }
.mini-big .dot { width: 20px; height: 20px; }
a.go { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; } a.go:hover { text-decoration: underline; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; gap: 8px; padding: 7px 8px; border-radius: 8px; margin-bottom: 4px; font-size: 13px; background: #faf9f6; }
.todo li .ti { flex: none; width: 18px; text-align: center; font-weight: 700; }
.todo li.ok { background: #eef7f1; } .todo li.ok .ti { color: var(--good); }
.todo li.warn { background: #fdf4e3; } .todo li.warn .ti { color: var(--warn); }
.todo li.bad { background: #fbe9e6; } .todo li.bad .ti { color: var(--bad); }
.ring { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; }
.ring-tile { flex: 1; min-width: 170px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: 10px; padding: 10px; background: #fff; }
.ring-tile.cur { background: #fff8e6; box-shadow: 0 0 0 2px var(--c); } .ring-tile.nxt { border-style: dashed; border-left-style: solid; }
.ring-tile .rt-e { font-size: 28px; line-height: 1; }
.ring-arrow { align-self: center; color: var(--sub); font-size: 18px; }
.banner { border: 1px solid; border-left-width: 6px; border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; }
.banner.bad { background: #fbe9e6; border-color: var(--bad); color: #6b1f16; }
.kpi { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fcfbf8; }
.kpi.good { border-left: 4px solid var(--good); } .kpi.warn, .kpi.mid { border-left: 4px solid var(--warn); } .kpi.bad { border-left: 4px solid var(--bad); }
.kpi-v { font-size: 22px; font-weight: 800; margin: 2px 0; }
.kpi-v .small { font-weight: 500; }
.spark { display: block; width: 100%; margin-top: 4px; }
.ccard { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fff; display: grid; gap: 3px; }
.tight-grid { gap: 10px; }
.flow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 6px 0; }
.flow-step { background: #2c5d8f; color: #fff; padding: 3px 9px; border-radius: 99px; font-size: 12px; }
.flow-arrow { color: var(--sub); font-size: 12px; }
.season-card.is-cur { background: #fffaf0; } .season-card.is-nxt { background: #f5f9ff; }
.tight-list { margin: 6px 0; padding-left: 18px; } .tight-list li { margin: 2px 0; }
.steps { margin: 0; padding-left: 20px; } .steps li { margin: 6px 0; font-size: 13px; }
.cautions { margin: 4px 0 0; padding-left: 0; list-style: none; } .cautions li { padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13px; }
.tag.fut { background: #f3ecdc; color: #8a5a0b; }
.chartbox.short { height: 190px; }
.check li.warnon::before { content: "● "; color: var(--warn); }
.check label { cursor: pointer; }
table.stocks th.grp { text-align: center; background: #f3f1ea; }
table.stocks td { white-space: nowrap; }
table.stocks td.small { white-space: normal; min-width: 210px; }
details summary { cursor: pointer; color: var(--accent); }
.verdict.ok, .verdict.mid, .verdict.no { line-height: 1.45; }
@media (max-width: 640px) { .hero-home .big { font-size: 46px; } .hero-home .name { font-size: 26px; } .kpis2 { grid-template-columns: 1fr; } .ring-arrow { display: none; } }
.nowrap { white-space: nowrap; }
table.news { min-width: 560px; }
.grid > * { min-width: 0; }
@media (max-width: 640px) {
  .card { overflow-x: auto; }
  .tabs button { padding: 10px 11px; font-size: 13px; }
  .brand small { display: block; margin: 2px 0 0; }
}
.pmi-box { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fcfbf8; }

/* ---------- 가족 휴대폰(PWA)·클라우드 모드 ---------- */
.top { padding-top: max(14px, env(safe-area-inset-top)); padding-left: max(22px, env(safe-area-inset-left)); padding-right: max(22px, env(safe-area-inset-right)); }
.tabs { position: sticky; top: 0; z-index: 50; }
main { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
#loginLayer { position: fixed; inset: 0; z-index: 900; background: rgba(31,42,54,.92); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.login-card { background: #fff; border-radius: 16px; padding: 22px; width: 100%; max-width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.login-card h2 { margin: 6px 0 8px; }
.login-logo { font-size: 42px; }
.login-card form { display: grid; gap: 10px; margin-top: 10px; }
.login-card label { display: grid; gap: 4px; font-size: 13px; color: var(--sub); }
.login-card input[type=email], .login-card input[type=password] { width: 100%; font-size: 16px; padding: 10px 12px; }
.login-card button[type=submit] { padding: 11px; font-size: 15px; }
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px; } /* 아이폰 입력 시 화면 확대 방지 */
  .top { padding: max(10px, env(safe-area-inset-top)) 14px 10px; }
  .brand { font-size: 16px; } .brand small { display: none; }
  .status { font-size: 11px; }
  main { padding: 12px 12px max(40px, env(safe-area-inset-bottom)); }
  .card { padding: 13px; }
  .hero-home { padding: 16px; } .hero-home .hh-side { min-width: 0; width: 100%; }
}
