:root{--bg:#09131d;--card:#112732;--card2:#172e36;--border:#35505a;--gold:#f3d48b;--text:#f3f4ed;--muted:#9eb3b5;--green:#73d8ab;--red:#ff929d}
*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"Apple SD Gothic Neo","Malgun Gothic",sans-serif;background:radial-gradient(ellipse at 85% -10%,#294635aa,transparent 44%),radial-gradient(ellipse at 0 90%,#152c4f,transparent 44%),var(--bg);color:var(--text)}a{color:#b6dffc}button,input{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:not-allowed}h1,h2,h3,p{margin-top:0}h1{font-size:clamp(32px,5vw,61px);line-height:1.19;letter-spacing:-.06em}h2{font-size:25px;letter-spacing:-.04em;margin:6px 0}h3{font-size:21px}.gold{color:var(--gold)}.muted,.foot{color:var(--muted)}.eyebrow{color:#b8d0c4;font-weight:850;letter-spacing:.12em;font-size:11px}.app{display:grid;grid-template-columns:260px minmax(0,1fr);max-width:1490px;margin:auto;min-height:100vh}.sidebar{padding:28px 20px;background:#0a1b24dd;border-right:1px solid #304752;position:sticky;top:0;height:100vh;overflow:auto}.brand{text-decoration:none;font-size:19px;font-weight:950;color:var(--gold);display:block;margin-bottom:34px}.side-stat{border-top:1px solid #2b4248;padding:18px 0;display:flex;flex-direction:column;gap:7px}.side-stat span{color:#93adad;font-size:12px}.side-stat strong{font-size:23px;letter-spacing:-.05em;overflow-wrap:anywhere}.side-stat small{color:var(--muted);font-size:11px}.side-link{display:block;text-decoration:none;margin-top:20px;font-size:13px}.foot{font-size:11px;line-height:1.8;margin-top:24px}.sidebar .foot{margin-top:34px}main{padding:29px 35px 65px;min-width:0}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:20px}.clock{border:1px solid #6a6143;background:#243128;padding:13px 19px;border-radius:12px;color:#ffe4a7;font-weight:900;white-space:nowrap}.progress{height:7px;background:#1a3440;border-radius:99px;margin-bottom:22px;overflow:hidden}.progress>div{background:linear-gradient(90deg,#72a397,#ffdb81);height:100%;width:0;transition:width .3s}.status{min-height:20px;color:#9fd9bf;font-size:13px;margin-bottom:10px}.status.error{color:var(--red)}#stage{max-width:1010px;margin:auto}.panel{background:linear-gradient(135deg,#18312f,#10202d);border:1px solid #4b675d;border-radius:23px;padding:clamp(22px,4vw,39px);box-shadow:0 12px 48px #0004}.panel.gold-panel{background:radial-gradient(circle at 80% 20%,#78632655,transparent 50%),linear-gradient(135deg,#193129,#101e2c);border-color:#947640}.lead{color:#c0d0cb;font-size:15px;line-height:1.85;max-width:760px}.big-wealth{font-size:clamp(36px,6vw,74px);font-weight:950;color:var(--gold);letter-spacing:-.07em;overflow-wrap:anywhere;margin:16px 0}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:13px;margin:22px 0}.choice-card{background:#122b35;color:var(--text);border:1px solid #3c5760;border-radius:17px;padding:19px;text-align:left;min-height:145px;display:flex;flex-direction:column;gap:10px;transition:transform .18s,border-color .18s}.choice-card:hover:not(:disabled){transform:translateY(-3px);border-color:#d3b772}.choice-card.selected{border:2px solid var(--gold);background:#283b34}.choice-card strong{font-size:20px;letter-spacing:-.035em}.choice-card small{color:#93b5b0}.choice-card p{color:#bfcac8;font-size:13px;line-height:1.65;margin:0}.actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:22px}.primary-button,.secondary-button,.danger-button{border-radius:12px;padding:13px 18px;font-weight:900;border:1px solid transparent}.primary-button{background:linear-gradient(100deg,#fce2a3,#d8ae62);color:#1d2624}.secondary-button{background:#25414a;border-color:#46636b;color:#eff8f3}.danger-button{background:#3e2c31;border-color:#91525d;color:#ffbdc6}.wide{width:100%}.stat-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(165px,1fr));gap:11px;margin:19px 0}.stat{border:1px solid #36505c;background:#122b34;border-radius:14px;padding:15px}.stat small{display:block;color:#a0b6b9;margin-bottom:7px}.stat strong{font-size:20px;overflow-wrap:anywhere}.notice{padding:15px 18px;background:#26352e;border-left:3px solid #dbba70;color:#c5d3c8;border-radius:3px 12px 12px 3px;font-size:13px;line-height:1.8;margin:17px 0}.slider-box{padding:20px;background:#132d35;border-radius:15px;border:1px solid #3e5a60;margin:19px 0}.slider-box input{width:100%;accent-color:var(--gold);margin:16px 0}.inline-input{background:#102630;color:var(--text);border:1px solid #59716d;border-radius:10px;padding:13px 14px;width:100%;margin-top:7px}.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.tab{background:#223941;border:1px solid #375b60;color:#cbdbd7;border-radius:99px;padding:10px 16px}.tab.active{background:#675632;border-color:#ddc27f;color:#fff0be}.rank-header{display:flex;justify-content:space-between;align-items:center;gap:15px}.my-rank{background:#20352f;border:1px solid #826e45;border-radius:15px;padding:20px;margin-bottom:21px;font-size:16px;font-weight:800}.ranking{max-width:1100px;margin:0 auto}.table-wrap{overflow:auto;border:1px solid #34515a;border-radius:15px}table{width:100%;border-collapse:collapse;min-width:520px}th,td{text-align:left;padding:14px 15px;border-bottom:1px solid #2c4650}th{color:#9fb9b3;background:#1b323b;font-size:12px}td{font-size:13px}tr.mine{background:#45523777}td:last-child,th:last-child{text-align:right;font-weight:850}.badge{color:#f2dfa6;padding:5px 10px;background:#49452d;border-radius:30px;font-size:11px}.quote{font-size:clamp(27px,5vw,46px);font-weight:950;color:#ffe4a5;margin:18px 0}.svg-chart{width:100%;height:230px;display:block;margin:15px 0}.switch{padding:14px 0}.loan-controls{display:grid;gap:9px;grid-template-columns:1fr 1fr}.loan-controls button{font-size:12px;padding:11px}.hidden{display:none!important}
@media(max-width:860px){.app{grid-template-columns:1fr}.sidebar{height:auto;position:static;border-bottom:1px solid var(--border);border-right:0;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.brand{grid-column:1/-1;margin-bottom:0}.sidebar .side-stat{padding:10px 0}.sidebar .side-stat strong{font-size:17px}.sidebar .primary-button,.sidebar .side-link{grid-column:1/-1}.sidebar .foot{display:none}main{padding:23px 16px 60px}}
@media(max-width:500px){.sidebar{grid-template-columns:1fr 1fr}.topbar h2{font-size:18px}.topbar .eyebrow{font-size:9px}.clock{padding:9px;font-size:12px}.rank-header{align-items:flex-start;flex-direction:column}.actions button{width:100%}.cards{grid-template-columns:1fr}.choice-card{min-height:115px}.panel{padding:20px}}

/* Historical explanations shown at every investment result. */
.historical-fact{margin:25px 0 6px;padding:23px;border:1px solid #557166;border-radius:17px;background:linear-gradient(130deg,#243b35,#142631)}
.historical-fact h3{margin:9px 0 12px;color:#ffe0a1}
.historical-fact>p{font-size:15px;line-height:1.9;color:#d8e1d5}
.historical-fact>a{font-weight:800;color:#cfe5ff;font-size:13px}
.historical-fact .foot{font-size:11px;margin:11px 0 0;color:#9fb2ab}
.history-prices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:18px 0}
.history-prices>div{padding:14px;border:1px solid #506c65;border-radius:11px;background:#142b31}
.history-prices small{display:block;color:#9ab9af;margin-bottom:7px;font-size:11px}
.history-prices strong{overflow-wrap:anywhere;font-size:14px}
.positive{color:var(--green)!important}.negative{color:var(--red)!important}

/* Clickable server-sorted leaderboard. */
.rank-hint{font-size:13px;color:#bbcbc3;line-height:1.7;margin:17px 0}
.ranking table{min-width:820px}
.ranking td:last-child,.ranking th:last-child{text-align:center}
.ranking td:nth-child(4),.ranking td:nth-child(5){white-space:nowrap;font-variant-numeric:tabular-nums}
.sort-button{background:transparent;border:0;padding:4px 0;color:#ffe1a2;white-space:nowrap;font-weight:900;font-size:13px}
.sort-button:hover,.sort-button:focus-visible{text-decoration:underline}
.graph-button{font-size:12px;border:1px solid #668078;border-radius:10px;padding:9px 12px;background:#25443e;color:#ecf2df;white-space:nowrap;font-weight:800}
.graph-button:hover{background:#3b6254}
.practice-entry{position:fixed;right:16px;bottom:16px;z-index:18;text-decoration:none;padding:9px 13px;border-radius:99px;border:1px solid #738c77;background:#203b39dd;color:#dceee3;font-size:12px;font-weight:800;box-shadow:0 7px 25px #0007;backdrop-filter:blur(8px)}
.practice-entry:hover{background:#35594d}

/* Yearly history viewer (only public, server-completed game series). */
.graph-overlay{position:fixed;inset:0;z-index:100;background:#02090bdd;display:flex;align-items:center;justify-content:center;padding:18px}
.graph-overlay[hidden]{display:none}
.dialog-open{overflow:hidden}
.graph-dialog{width:min(950px,100%);max-height:92vh;overflow-y:auto;background:linear-gradient(145deg,#18332f,#0c1a28);border:1px solid #668071;border-radius:22px;padding:28px;box-shadow:0 25px 100px #000b}
.graph-close{float:right;background:#24454b;color:#e7f4ed;border:1px solid #607c7c;border-radius:9px;padding:10px 14px;font-weight:850;margin-bottom:14px}
.graph-dialog h2{font-size:clamp(22px,4vw,32px);padding-top:13px;overflow-wrap:anywhere;clear:none}
.graph-surface{padding:10px;background:#112733;border:1px solid #33535b;border-radius:16px}
.graph-extremes{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px;color:#e2d0a3;font-weight:700;font-size:13px;margin-top:17px}
.history-details{border:1px solid #405f61;border-radius:13px;background:#112833;margin-top:20px}
.history-details summary{cursor:pointer;font-weight:850;padding:15px}
.history-scroll{max-height:290px;overflow:auto;padding:0 14px 13px}
.history-scroll table{width:100%;min-width:390px}
.history-scroll td:last-child,.history-scroll th:last-child{text-align:right}
@media(max-width:620px){.history-prices{grid-template-columns:1fr}.graph-dialog{padding:17px}.practice-entry{right:9px;bottom:9px;font-size:10px;padding:8px 10px}.historical-fact{padding:17px}}

/* Viral end-card sharing and personal invitation landing state. */
.share-panel{margin-top:26px;padding:23px;border:1px solid #957942;border-radius:17px;background:linear-gradient(135deg,#26382e,#142a34);box-shadow:0 10px 32px #0002}
.share-panel h3{margin:12px 0;color:#ffe4a0}
.share-panel>p:not(.foot){line-height:1.85;color:#d8e5da;margin-bottom:17px}
.share-mini-stats{display:flex;gap:10px;flex-wrap:wrap}
.share-mini-stats span{display:inline-flex;align-items:center;gap:8px;padding:12px 14px;background:#112b30;border:1px solid #4b665e;border-radius:11px;color:#bcd2ca;font-size:13px}
.share-mini-stats strong{font-size:16px;color:#f5dfa6}
.share-panel .actions{margin-top:18px}
.share-panel .foot{margin:12px 0 0}
.challenge-invite{margin:0 0 22px;padding:22px 25px;background:linear-gradient(125deg,#3e432b,#162d35);border:1px solid #c3a35c;border-radius:17px;box-shadow:0 10px 24px #0003}
.challenge-invite h3{margin:10px 0;color:#ffe1a0}
.challenge-invite p{margin:0 0 16px;line-height:1.8;color:#e0eade}
.challenge-invite strong{color:#ffe0a1;font-size:19px}
.challenge-invite small{color:#b8ccc3}
@media(max-width:500px){.share-panel{padding:17px}.challenge-invite{padding:17px}.share-mini-stats span{width:100%;justify-content:space-between}}
