:root {
  color-scheme: light;
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  font-weight: 600;
  color: #163441;
  background: #0b1e28;
  font-synthesis: none;
  --ink: #163441;
  --deep: #102f3a;
  --cream: #fff1ca;
  --gold: #ffe197;
  --teal: #57d4c1;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
  background: #0b1e28;
}
body { position: fixed; inset: 0; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 4px solid #54e6cd; outline-offset: 4px; }
button:active:not(:disabled) { translate: 0 2px; }

.stage {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 1600px;
  height: 900px;
  transform: translate(-50%, -50%) scale(var(--scale, 1));
  transform-origin: center center;
  overflow: hidden;
  isolation: isolate;
  background: #1b5058 var(--scene) center / contain no-repeat;
  font-size: 25px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

[data-screen="title"] { --scene: url("../assets/JY_FIN_SCREEN_title_v02.png"); }
[data-screen="map"] { --scene: url("../assets/JY_FIN_SCREEN_map_v02.png"); }
[data-screen="quiz"] { --scene: url("../assets/JY_FIN_SCREEN_quiz_v02.png"); }
[data-screen="exchange"] { --scene: url("../assets/JY_FIN_SCREEN_exchange_v02.png"); }
[data-screen="event"] { --scene: url("../assets/JY_FIN_SCREEN_event_v02.png"); }
[data-screen="portfolio"] { --scene: url("../assets/JY_FIN_SCREEN_portfolio_v02.png"); }
[data-screen="result"] { --scene: url("../assets/JY_FIN_SCREEN_result_v02.png"); }

.scroll-area { overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #487c7c #f0dfb9; }
.action { min-height: 58px; padding: 9px 23px 13px; border-radius: 26px; font-size: 30px; font-weight: 900; white-space: nowrap; }
.painted { position: absolute; background: transparent; color: #412308; text-shadow: 0 1px 1px #fff3ad; }
.painted:hover { background: #fff5ce36; box-shadow: 0 0 25px #ffef9090; }
.primary, .secondary { background: center / 100% 100% no-repeat; }
.primary { background-image: url("../assets/JY_FIN_BTN_primary_v02.png"); color: #42260c; }
.secondary { background-image: url("../assets/JY_FIN_BTN_secondary_v02.png"); color: #073939; }
.primary:hover, .secondary:hover { filter: brightness(1.1); }
.subject-icon { width: 50px; height: 50px; object-fit: contain; flex: 0 0 auto; }

.title-sign { position: absolute; inset: 213px 490px auto; text-align: center; line-height: 1.2; }
.brand { color: #80511c; letter-spacing: .28em; padding-left: .28em; font-size: 24px; font-weight: 900; }
.title-sign h1 { margin: 2px 0 1px; color: #173f47; font-size: 88px; letter-spacing: .11em; padding-left: .11em; font-weight: 900; text-shadow: 0 3px #fff5d1; }
.title-subtitle { color: #594423; font-size: 29px; letter-spacing: .05em; }
.title-start { left: 583px; top: 575px; width: 424px; height: 121px; font-size: 44px; letter-spacing: .12em; padding-left: 28px; }
.title-notice { position: absolute; top: 743px; left: 453px; width: 694px; padding: 13px 20px 15px; border: 1px solid #f7d48a99; border-radius: 23px; background: #122f37ed; color: #fff2d2; text-align: center; box-shadow: 0 8px 24px #0a283744; }
.title-notice p + p { color: var(--gold); margin-top: 3px; }

.hud {
  position: absolute;
  left: 63px;
  right: 63px;
  top: 38px;
  height: 76px;
  display: grid;
  grid-template-columns: 1.25fr 1.2fr 1.15fr .88fr;
  align-items: center;
  border: 1px solid #baded365;
  border-radius: 33px;
  background: linear-gradient(180deg, #174b57f5, #12333ff7);
  color: #fff4d4;
  box-shadow: inset 0 1px #aee4d94a, 0 4px 8px #102a3640;
}
.hud > div { padding: 0 21px; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.hud > div + div { border-left: 1px solid #a4d4cf5c; }
.hud span { font-size: 23px; color: #c3e2df; white-space: nowrap; }
.hud strong { font-size: 31px; white-space: nowrap; }
.hud-stage { padding-left: 31px !important; }
.hud-stage strong { color: var(--gold); }
.hud-stat:last-child { padding-right: 30px; }

.map-brief { position: absolute; top: 385px; left: 1207px; width: 300px; color: #fff3cb; text-align: center; }
.map-brief h1 { font-size: 34px; color: var(--gold); text-shadow: 0 3px #0b2635; }
.map-brief dl { display: grid; gap: 18px; margin: 22px auto 0; width: 250px; }
.map-brief dl div { height: 45px; padding: 0 17px 0 39px; display: flex; align-items: center; justify-content: space-between; }
.map-brief dd { font-weight: 900; }
.map-start { left: 1210px; top: 662px; width: 285px; height: 82px; font-size: 28px; padding-inline: 0; }

.quiz-clock { position: absolute; top: 82px; left: 142px; width: 210px; height: 210px; text-align: center; color: #fff1b6; filter: drop-shadow(0 5px 7px #112e3d6b); }
.quiz-clock img { position: absolute; inset: 0; width: 100%; height: 100%; }
.quiz-clock::before { content: ""; position: absolute; z-index: 1; inset: 41px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #2d535c, #17323d 75%); }
.quiz-clock span { position: relative; z-index: 2; display: block; }
#clock-number { margin-top: 56px; font-size: 67px; line-height: 1; font-weight: 900; }
.quiz-clock .clock-unit { font-size: 23px; }
.quiz-clock.urgent { color: #ffc89d; }
.quiz-meta { position: absolute; top: 122px; left: 510px; width: 967px; height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.quiz-subject { display: flex; align-items: center; gap: 7px; color: #083a3e; }
.quiz-subject strong { font-size: 26px; font-weight: 900; }
.quiz-meta p { display: flex; gap: 23px; align-items: center; align-self: start; margin-top: 4px; padding: 3px 12px; border-radius: 13px; background: #183943; color: #fff0c4; }
.quiz-meta p span { color: #b8ede5; }
.question-box { position: absolute; left: 517px; top: 190px; width: 948px; height: 177px; padding: 5px 14px 7px 5px; display: flex; flex-direction: column; justify-content: safe center; gap: 9px; }
.material { font-size: 28px; line-height: 1.4; color: #36474b; white-space: pre-wrap; overflow-wrap: anywhere; }
.question-stem { font-size: 34px; font-weight: 900; line-height: 1.25; white-space: pre-wrap; overflow-wrap: anywhere; }
.choices { position: absolute; top: 430px; left: 499px; width: 986px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 34px; row-gap: 38px; }
.choice { display: flex; align-items: center; text-align: left; position: relative; height: 115px; padding: 10px 30px 13px 23px; border-radius: 23px; gap: 19px; background: transparent; font-size: 25px; }
.choice:not(:disabled):hover { background: #fff4a95c; box-shadow: inset 0 0 0 3px #e4b049; }
.choice-letter { flex: 0 0 50px; text-align: center; color: #fff; font-weight: 900; text-shadow: 0 2px 3px #163441; }
.choice-text { min-width: 0; line-height: 1.2; overflow-wrap: anywhere; }
.choice.correct, .choice.wrong { background: #e4f5c999; box-shadow: inset 0 0 0 4px #40895c; }
.choice.wrong { background: #ffd5cdae; box-shadow: inset 0 0 0 4px #aa4e4b; }
.option-mark { position: absolute; top: -11px; right: 8px; padding: 1px 8px; border-radius: 8px; background: #326b48; color: #fff; font-size: 17px; }
.wrong .option-mark { background: #923d3d; }
.quiz-status { position: absolute; top: 706px; left: 477px; width: 1035px; min-height: 46px; display: flex; align-items: center; justify-content: center; gap: 27px; padding: 2px 12px; background: #183b47; border-radius: 12px; color: #e0f0ed; font-size: 22px; }
.quiz-status span + span { color: var(--gold); }
.feedback { position: absolute; left: 449px; top: 755px; width: 1091px; height: 125px; display: grid; grid-template-columns: 1fr 215px; align-items: center; gap: 15px; padding: 9px 17px 10px 21px; border-radius: 19px; background: #103742; border: 2px solid #9ac3ac; color: #fff2d1; box-shadow: 0 5px 16px #0b263666; }
.feedback h2 { font-size: 25px; color: #ffd2b0; }
.feedback.success h2 { color: #a2f4d2; }
.feedback h2 span { display: inline-block; margin-left: 14px; font-size: 19px; padding: 0 9px; color: #16333e; border-radius: 10px; background: #ffe6a6; }
.feedback-explanation { max-height: 62px; margin-top: 2px; padding-right: 5px; font-size: 21px; line-height: 1.35; }
.feedback .action { font-size: 26px; height: 72px; }

.shop-heading { position: absolute; top: 164px; left: 390px; width: 820px; text-align: center; }
.shop-heading h1 { color: #263e42; font-size: 37px; font-weight: 900; line-height: 1.3; }
.shop-heading p { display: inline-block; margin-top: 13px; padding: 4px 18px; border-radius: 18px; background: #123b46eb; color: #ffebc5; font-size: 23px; }
.shop-grid { position: absolute; top: 303px; left: 178px; width: 1247px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 77px; }
.shop-column { --accent: #ffe29a; --row: #153844f5; min-width: 0; }
.shop-column.car { --accent: #ffc1a6; --row: #422e43f5; }
.shop-column.stock { --accent: #a9efe1; --row: #113a46f5; }
.shop-column > header { height: 94px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border-radius: 24px 24px 9px 9px; background: linear-gradient(100deg, #123441fa, #153844ed); color: var(--accent); }
.shop-column.car > header { background: linear-gradient(100deg, #523447fa, #382b39ed); }
.shop-column img { width: 77px; height: 77px; object-fit: contain; }
.shop-column h2 { font-size: 34px; font-weight: 900; line-height: 1.1; }
.shop-column header p { color: #fff0d4; font-size: 19px; margin-top: 4px; }
.shop-items { display: grid; gap: 3px; margin-top: 4px; }
.shop-collection { margin-top: 41px; min-height: 145px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(180deg, #2c263600, #313b4b 38%, #253c4b 90%); color: #fff1d8; font-size: 21px; }
.shop-item { display: flex; justify-content: space-between; align-items: center; gap: 5px; min-height: 58px; padding: 3px 7px 4px 10px; border-radius: 9px; background: var(--row); border: 1px solid #a8d6cd54; color: #fff4dc; }
.item-copy { min-width: 0; }
.item-copy h3 { font-size: 23px; line-height: 1.12; font-weight: 900; white-space: nowrap; }
.item-copy small { padding-left: 7px; color: var(--accent); font-size: 15px; font-weight: 700; }
.item-copy p { margin-top: 2px; font-size: 17px; line-height: 1.2; white-space: nowrap; }
.item-copy p span { color: var(--accent); }
.buy { flex: 0 0 auto; padding: 6px 7px; min-width: 80px; max-width: 105px; min-height: 37px; border-radius: 8px; background: var(--accent); color: #173739; font-size: 17px; line-height: 1.13; font-weight: 900; }
.buy:hover:not(:disabled) { box-shadow: 0 0 14px var(--accent); }
.buy:disabled { background: #18313e; color: #d0e0df; border: 1px solid #66878d; font-size: 15px; max-width: 120px; }
.buy:disabled span { display: block; white-space: nowrap; }
.shop-wallet { position: absolute; top: 768px; left: 178px; right: 176px; padding: 5px 8px; border-radius: 16px; background: #132f3aeF; }
.voucher-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.voucher-list li { min-width: 0; display: flex; align-items: center; gap: 7px; }
.voucher-list strong { margin-left: auto; font-weight: 900; }
.shop-wallet .voucher-list { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.shop-wallet .voucher-list li { border-radius: 10px; padding: 1px 6px; color: #ffefcf; background: #28525d; font-size: 17px; white-space: nowrap; gap: 2px; }
.shop-wallet .subject-icon { width: 26px; height: 26px; }
.shop-wallet strong { color: var(--gold); }
.shop-end { position: absolute; left: 182px; right: 175px; top: 814px; height: 69px; display: grid; grid-template-columns: 1fr 360px; gap: 15px; align-items: center; }
.shop-end .action { height: 67px; }
.receipt { width: fit-content; max-width: 100%; padding: 5px 12px; border-radius: 9px; background: #123740ed; color: #bff2dd; font-size: 21px; }
.receipt:empty { visibility: hidden; }

.event-kicker { position: absolute; top: 151px; left: 465px; width: 665px; text-align: center; color: #fff0c5; font-size: 28px; }
.event-copy { position: absolute; top: 274px; left: 393px; width: 469px; min-height: 253px; padding: 24px 27px; border: 1px solid #f7dc9d99; border-radius: 19px; background: linear-gradient(135deg, #142f40f8, #173e4aeb); color: #fff3d8; box-shadow: 0 8px 19px #122a4080; }
.event-copy h1 { font-size: 48px; line-height: 1.18; font-weight: 900; color: var(--gold); }
.event-copy p { font-size: 28px; line-height: 1.5; margin-top: 12px; text-wrap: pretty; }
.event-effects { position: absolute; top: 610px; left: 408px; width: 784px; display: flex; justify-content: center; align-items: center; gap: 14px; }
.event-effects div { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 61px; min-width: 235px; padding: 7px 18px; border: 1px solid #b99257; border-radius: 14px; background: #fff0c9; font-size: 26px; white-space: nowrap; }
.event-effects strong { font-size: 33px; }
.event-effects .up { color: #1a6856; }
.event-effects .down { color: #9e4030; }
.event-next { top: 704px; left: 585px; width: 430px; height: 84px; font-size: 36px; }

.portfolio-main { position: absolute; top: 196px; left: 84px; width: 814px; }
.portfolio-main > h1 { padding-left: 64px; height: 65px; display: flex; align-items: center; gap: 24px; color: #3d2623; font-size: 37px; font-weight: 900; text-shadow: 0 1px #f8c898; }
.portfolio-main > h1 span { font-size: 22px; font-weight: 700; }
.asset-body { height: 510px; display: flex; flex-direction: column; padding: 15px 16px 10px; border-radius: 16px; background: #fff0c9; box-shadow: inset 0 0 0 1px #be9360; }
.allocation-label { display: flex; justify-content: space-between; font-size: 27px; font-weight: 900; }
.allocation-label strong { font-size: 32px; line-height: 1.2; }
.allocation-bar { height: 23px; display: flex; overflow: hidden; border-radius: 20px; background: #d6c4a3; margin-top: 8px; }
.allocation-bar .cash, .allocation-key .cash { background: #277d7d; }
.allocation-bar .land, .allocation-key .land { background: #a16b23; }
.allocation-bar .stock, .allocation-key .stock { background: #6e539a; }
.allocation-key { display: flex; flex-wrap: wrap; gap: 17px; justify-content: space-between; margin-top: 6px; }
.allocation-key li { display: flex; align-items: center; gap: 7px; font-size: 20px; white-space: nowrap; }
.allocation-key i { width: 15px; height: 15px; border-radius: 5px; }
.holdings { flex: 1; min-height: 0; margin: 11px 0 4px; padding: 0 4px 0 0; }
.holding-group { padding: 5px 11px 6px; border-radius: 10px; border: 1px solid #d2b17a; background: #fff6db; }
.holding-group + .holding-group { margin-top: 5px; }
.holding-group h2, .holding-group li { display: flex; justify-content: space-between; gap: 14px; }
.holding-group h2 { color: #1e5059; font-size: 24px; line-height: 1.2; }
.holding-group li, .holding-group p { font-size: 19px; line-height: 1.35; }
.holding-group li { border-top: 1px solid #e6d2a9; margin-top: 3px; padding-top: 2px; }
.holding-group small { margin-left: 9px; font-size: 17px; color: #395d64; }
.collection-note { font-size: 17px; color: #4d4a36; }
.portfolio-vouchers { position: absolute; top: 196px; left: 1016px; width: 493px; }
.portfolio-vouchers h2 { padding-left: 56px; height: 66px; display: flex; align-items: center; color: #073737; font-size: 35px; font-weight: 900; }
.portfolio-vouchers .voucher-list { margin-top: 20px; padding: 11px 11px 36px; border: 1px solid #6ea9a2; background: #153546f4; border-radius: 20px; }
.portfolio-vouchers .voucher-list li { min-height: 114px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 60px 29px; gap: 0; padding: 6px 8px; color: #1d4047; background: #fff1cf; border: 1px solid #c9a36e; border-radius: 13px; }
.portfolio-vouchers .subject-icon { width: 59px; height: 59px; }
.portfolio-vouchers li span { grid-column: 1 / -1; grid-row: 2; font-size: 21px; }
.portfolio-vouchers li strong { grid-column: 2; grid-row: 1; font-size: 33px; }
.portfolio-next { top: 720px; left: 1080px; width: 352px; height: 58px; font-size: 28px; }

.result-heading { position: absolute; left: 480px; right: 480px; top: 29px; text-align: center; }
.result-heading h1 { color: #193c42; font-size: 51px; font-weight: 900; line-height: 1.18; text-shadow: 0 2px 2px #fff2b8; }
.result-heading p { display: inline-block; margin-top: 3px; padding: 1px 15px; border-radius: 14px; background: #163c46ed; color: #fff2cf; font-size: 22px; }
.result-card { position: absolute; top: 437px; left: 384px; width: 827px; height: 227px; padding: 0 31px; }
.result-top { display: flex; align-items: center; justify-content: space-between; }
.total-score { display: flex; align-items: baseline; gap: 6px; color: #144b56; font-size: 27px; }
.total-score strong { font-size: 69px; font-weight: 900; line-height: 1; }
.result-return { display: flex; align-items: center; gap: 10px; color: #394a45; font-size: 22px; }
.result-return strong { color: #145b51; font-size: 35px; }
.result-columns { display: grid; grid-template-columns: 7fr 4fr; gap: 16px; margin: 5px 0 7px; }
.result-columns h2 { font-size: 25px; }
.result-columns h2 strong { color: #175d58; }
.result-columns p { margin-top: 3px; font-size: 17px; white-space: nowrap; }
.result-meter { position: absolute; top: 137px; left: 48px; right: 47px; height: 72px; display: grid; grid-template-columns: 7fr 3fr; gap: 5px; padding: 8px 11px 34px; border-radius: 26px; border: 2px solid #3a666a; background: #153944; box-shadow: inset 0 1px #b5dec882; }
.result-meter > div { overflow: hidden; border-radius: 9px; background: #46646a; }
.result-meter i { display: block; height: 100%; background: #6dddd0; }
.result-meter > div + div i { background: #ffc765; }
.result-note { position: absolute; top: 177px; left: 52px; right: 51px; text-align: center; color: #fff0ca; font-size: 17px; }
.result-again { top: 725px; left: 601px; width: 397px; height: 83px; font-size: 37px; }
