/* =======================================================================
   JACKIE CHAN EDITION · 龍運堂 — IMPERIAL RED × LUMINOUS GOLD
   Intense Chinese red/yellow palette. Player blue & Tie green remain distinct.
   Structural rules from Ruby Extreme stay untouched.
   ======================================================================= */
:root{
  color-scheme:dark;
  --bg:#190406;--panel:#33070b;--panel2:#43090c;--border:#a45b18;
  --text:#fff3df;--muted:#dcbf99;--gold:#ffd322;--gold-bright:#fff27b;--gold-low:#b66d0b;
  --gold-gradient:linear-gradient(108deg,#da8b0a 0%,#ffd020 28%,#fff17a 48%,#e9a012 74%,#ffd53c 100%);
  --cyan:#ffd322;--cyan2:#ffef6f;--pink:#ffc51b;--orange:#ffb60b;
  --red:#ff2845;--blue:#3487ff;--green:#18df8c;
  --shadow:0 22px 70px #000c;--radius:16px;
}
html{scrollbar-color:#d99519 #24060a;scroll-behavior:smooth}
body{color:var(--text)!important;background:linear-gradient(180deg,#770b10 0,#3c050b 210px,#160306 850px,#130204 100%)!important;font-family:Inter,"Segoe UI",system-ui,-apple-system,sans-serif!important}
.sky{background:
  radial-gradient(ellipse 44% 40% at 90% 3%,rgba(255,226,71,.19),transparent 80%),
  radial-gradient(ellipse 50% 45% at 10% -8%,rgba(255,189,30,.14),transparent 80%),
  repeating-linear-gradient(120deg,transparent 0 65px,rgba(247,195,45,.014) 66px 67px,transparent 68px 135px),
  linear-gradient(180deg,#a3050e 0%,#46050c 44%,#140206 100%)!important;opacity:1!important}
.sky::before{background-image:radial-gradient(circle,#ffd73266 .8px,transparent 1px)!important;background-size:51px 51px!important;opacity:.23!important}
.sky::after{content:'龍        福        祥        財';position:fixed;inset:0;display:flex;align-items:flex-start;justify-content:center;padding-top:31vh;font:900 clamp(55px,10vw,155px)/1.5 serif;letter-spacing:5vw;color:#ffc72008;pointer-events:none;white-space:pre;z-index:0}
.roof-line{position:absolute;left:0;right:0;top:0;height:9px;background:repeating-linear-gradient(90deg,#ffdf33 0 23px,#aa070f 23px 32px,#ffdb29 32px 56px,#a10810 56px 64px);box-shadow:0 2px 15px #ffb41455}
.lantern{position:absolute;top:58px;width:76px;height:99px;display:grid;place-items:center;border-radius:40% 40% 43% 43%;border:3px solid #ffdf3c;background:repeating-linear-gradient(90deg,#8b010a 0 8px,#ea0b1e 8px 19px,#bd0014 19px 30px);box-shadow:0 0 25px #e43e1122,0 0 0 1px #7b310e inset;opacity:.82;color:#ffde4f;font:bold 34px/1 "Noto Serif CJK SC",serif;text-shadow:0 2px 12px #ffb322;z-index:0;pointer-events:none}
.lantern::before{content:'';position:absolute;top:-49px;left:50%;width:2px;height:48px;background:#d5a82a}
.lantern::after{content:'';position:absolute;bottom:-31px;left:50%;height:30px;width:2px;background:#ebad1c;box-shadow:5px 3px 0 #eebc3e,-5px 3px 0 #eebc3e}
.lantern-left{left:3%}.lantern-right{right:3%}
.app-shell{position:relative;z-index:1}
.topbar{background:linear-gradient(109deg,#790307e8,#c20b0be2 50%,#670205e8)!important;border:1px solid #eeae2f99!important;border-top:3px solid #ffdf37!important;box-shadow:0 14px 42px #0006,0 0 0 1px #ffca1a1e inset!important}
.top-center,.top-center span,.edition-version{color:#fff2bf!important}
.live-dot{background:#fff12e!important;box-shadow:0 0 14px #fff350!important}
.brand-mark,.modal-mark{border:2px solid #fff04b!important;background:radial-gradient(circle at 30% 18%,#ff3841,#bc0713 60%,#760009)!important;color:#ffeb45!important;box-shadow:inset 0 0 12px #ffed4d38,0 0 27px #ffba222e!important}
.brand-diamond{font:900 29px/1 "Noto Serif CJK SC",serif!important;color:#ffec4d!important;text-shadow:0 2px 10px #8d0a00!important}
.brand-copy .brand-eyebrow{color:#ffdd4b!important;letter-spacing:.2em!important;font-weight:950!important}
.brand-copy strong{color:#fff8e6!important;text-shadow:0 3px 9px #670406}
.brand-copy strong em{font-style:normal!important;color:#ffda27!important}
.brand-copy .edition-mark{color:#ffe36a!important}
.button{transition:transform .15s,box-shadow .15s,background .15s}
.button:hover{transform:translateY(-1px)}
.button-primary{border:1px solid #ffef61!important;color:#5a0b02!important;background:linear-gradient(112deg,#ffb900 0%,#ffec35 43%,#ffc51c 75%,#ffd12b 100%)!important;box-shadow:0 6px 25px #ffa30b55,0 0 1px #fffcaa inset!important;font-weight:950!important}
.button-primary:hover{background:linear-gradient(100deg,#ffe938,#fff380,#ffc924)!important;color:#440500!important}
.button-outline,.button-soft,.button-magenta,.ghost-icon{background:linear-gradient(120deg,#480c0d,#760d0d)!important;border:1px solid #c88735!important;color:#ffe7a8!important}
.button-outline:hover,.button-soft:hover,.button-magenta:hover,.ghost-icon:hover{border-color:#ffde44!important;background:#9b0912!important}
.button-debt,.button-balance{border-color:#e0a42a!important}
.button-observe{border-color:#dfa522!important;background:#542509!important;color:#ffe3a4!important}
#accessSwitchButton{background:#ffdf2d!important;color:#65040c!important;border-color:#fff58f!important;box-shadow:0 3px 12px #edb22c44!important}
.panel,.metric-card,.preset-card,.gold-preset-card,.hero,.main-deck{border-color:#a65a1b88!important}
.panel{background:linear-gradient(150deg,#48080df5,#240508f8 72%,#3a0909ef)!important;box-shadow:0 13px 35px #0006,inset 0 1px 0 #ffcf3421!important}
.section-title,.panel-kicker,.select-caption,.mechanic-label,.metric-label,.preset-eyebrow{color:#ffdf50!important}
.section-num{color:#e9b93f!important}
.kicker-bar,.kicker-bar.magenta,.kicker-bar.pink,.kicker-bar.gold,.kicker-bar.green{background:linear-gradient(90deg,#ffce13,#fff07e)!important;box-shadow:0 0 12px #ffbe18aa!important}
.select-wrap select,.field-label input,.field-label select,.historic-field textarea,.history-textarea{background:#280507!important;color:#fff2d0!important;border:1px solid #ad6b24!important}
.select-wrap select:focus,.field-label input:focus,.field-label select:focus{outline:2px solid #ffd84c!important}
.panel-desc,.micro-note,.select-caption,.muted-small,.metric-foot{color:#e2c3a1!important}
.tag-cyan,.tag-pink,.tag,.tag-gold{background:#5c1910!important;color:#ffe66b!important;border-color:#c38131!important}
.metric-card{background:linear-gradient(140deg,#890d0e,#410608)!important;border-color:#b7762b!important}
.metric-value{color:#fff0be!important}
.hero{background:radial-gradient(ellipse at 55% -25%,#ffe44740,transparent 48%),linear-gradient(135deg,#75030a,#b80c17 46%,#47070c 100%)!important;border:1px solid #ffc43f99!important;box-shadow:0 18px 38px #0008,inset 0 0 50px #e5a91617!important}
.hero-overlay .hero-ring,.hero-radar{border-color:#f9ce4244!important}
.hero-pulse,.hero-category,.hero-index,.state-chip{color:#ffe9ac!important}
.state-chip{background:#741c0caa!important;border:1px solid #e7a635a1!important}
.hero-side{color:#fff1c7!important;text-shadow:0 3px 18px #600607!important}
.hero.side-banker .hero-side,.banker-button{color:#ffe1dd!important}
.hero.side-player .hero-side{color:#d7eaff!important}
.hero-side span,.hero-reason,.hero-translation{color:#ffde91!important}
.hero-stake,.hero-stake-value{color:#ffe842!important}
.banker-button{background:linear-gradient(120deg,#ef142c,#ac001a)!important;border-color:#ff8a8a!important;color:#fff!important}
.player-button{background:linear-gradient(120deg,#347bfa,#103eae)!important;border-color:#7ab2ff!important;color:#fff!important}
.tie-button{background:linear-gradient(120deg,#00b465,#08773e)!important;border-color:#81f4b1!important;color:#fff!important}
.debt-panel:after{color:#f8c1230e!important}
.debt-symbol,.debt-big{color:#ffdf3d!important;text-shadow:0 0 25px #ffdf3d2a!important}
.progress-active{background:linear-gradient(90deg,#fcb400,#ffeb37)!important;box-shadow:0 0 15px #ffd51a90!important}
.step-pill.active{border-color:#ffdb32!important;background:#8f3e0f!important;color:#fff3c2!important}
.step-pill.complete{border-color:#2bbb70!important;color:#91ffd0!important}
.insight-symbol,.insight-panel h3,.auto-score strong{color:#ffeb62!important;text-shadow:0 0 14px #ffda2340!important}
.auto-score{color:#edcfab!important}
.risk-panel{background:linear-gradient(125deg,#7a1709,#35100b)!important;border-color:#d59b2e!important}
.warning-heading,.risk-line strong{color:#ffe442!important}
.risk-panel p{color:#f8d4a8!important}
.site-footer{border-top:1px solid #b67c2b66!important;color:#dbb887!important}
.footer-slash,.footer-dot{color:#ffde36!important}
/* selection modal: paper talisman / gold seals */
.modal{background:linear-gradient(150deg,#4c0709,#250407 64%,#460707)!important;color:#fff3d8!important;border:2px solid #e4aa35!important;box-shadow:0 34px 95px #000d,0 0 32px #f9b52b40!important}
.modal::backdrop{background:#090203dc!important;backdrop-filter:blur(7px)}
.modal-layout,.modal-top,.modal-body{color:#fff4e3!important}
.modal-top{border-bottom:1px solid #efb53755!important}
.preset-card,.gold-preset-card{background:linear-gradient(140deg,#700b0d,#390607)!important;border:1px solid #db9d2a!important}
.preset-section-head strong,.preset-section-head p,.preset-detail-box strong{color:#fff0ce!important}
.preset-section-head p{color:#efccaa!important}
.preset-tile{background:linear-gradient(145deg,#5a0609,#860a10 48%,#370305)!important;border:1px solid #b2781f!important;color:#ffeacf!important;box-shadow:inset 0 1px #e29e2429!important}
.preset-tile:hover{border-color:#ffe252!important;background:linear-gradient(145deg,#7c050e,#ae0a14)!important}
.preset-tile.selected{border:2px solid #ffe82d!important;background:linear-gradient(120deg,#9e0912,#d51a1a 55%,#801004)!important;box-shadow:0 0 0 2px #f7d82d33,0 8px 22px #0005!important}
.preset-tile-icon,.preset-tile-check{color:#ffe73e!important;text-shadow:0 0 16px #ffdc47aa!important}
.preset-tile strong,.preset-tile-capital{color:#fff1cc!important}
.preset-tile-strap{color:#ffdb73!important}.preset-tile small{color:#efc6a4!important}
.preset-detail-box,.preset-suggested{background:#350608!important;border-color:#d6a03677!important;color:#ffdb9c!important}
.preset-risk{background:#77270c!important;border-color:#dcad48!important;color:#ffe969!important}
.preset-risk.is-alert{background:#a00615!important;border-color:#ffdb3b!important;color:#ffec9a!important}
.preset-description{color:#ffe5bc!important}
.preset-custom{background:#3b0908!important;border:1px solid #a76022!important}
.field-label{color:#ffdf76!important}
.rounding-toggle,.historic-field,.strike-recovery-setup{background:#480c0a!important;border-color:#ab6c2d!important}
.rounding-title strong{color:#ffdb72!important}
.form-alert{border-color:#bd8c28!important;background:#623011!important;color:#ffe9c6!important}
.form-error{color:#ffeeb4!important;background:#920b0b!important;border:1px solid #ffc31a!important}
.modal-footer{background:#5d090d!important;border-top:1px solid #d49a2680!important}
/* budget cards & dossier, stronger golden borders */
.access-mode-banner{background:linear-gradient(115deg,#b10c13,#620608)!important;border:1px solid #ffd21a!important}
.access-mode-pill{background:#f8be15!important;border-color:#fff16a!important;color:#6c0008!important}
.access-mode-copy strong,.access-mode-copy small{color:#ffe6af!important}
.budget-rack{background:linear-gradient(135deg,#90080c,#580608)!important;border:1px solid #e8b126!important}
.budget-rack-head strong{color:#fff2a3!important}
.budget-rack-head p{color:#f9d6a5!important}
.budget-tiles{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
.budget-tile{background:linear-gradient(140deg,#9e0b10,#610609)!important;border:1px solid #d89d32!important;color:#fff3d6!important}
.budget-tile:hover{border-color:#ffe53e!important}
.budget-tile.active{border:2px solid #ffe834!important;box-shadow:0 0 0 2px #ffb80029,0 7px 27px #ffb51333!important}
.budget-band,.budget-tile strong,.budget-method{color:#ffec79!important}
.budget-tile small,.budget-note{color:#fce0ac!important}
.setup-method-intel{margin:16px 0 2px;padding:15px;border-radius:14px;background:linear-gradient(125deg,#4f0806,#4a2507);border:1px solid #f1c83f;color:#ffeab6}
.setup-intel-heading{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;color:#ffe753}
.setup-intel-heading span{font-size:10px;font-weight:900;letter-spacing:.13em}.setup-intel-heading strong{font-size:14px;color:#fff4c8}
.setup-intel-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:12px 0}
.setup-intel-stats span{background:#5c0a0c;border:1px solid #ac7726;border-radius:10px;padding:9px;font-size:10px;color:#ffe0a0}
.setup-intel-stats b{display:block;margin-top:4px;color:#fff5d2;font-size:12px}
.setup-method-intel small,.setup-method-intel p{color:#efc895;line-height:1.6;font-size:11px;margin:0}
.combat-intel{background:linear-gradient(130deg,#950c10,#430508)!important;border:1px solid #eab63c!important;color:#fff1c8!important}
.combat-head span,.combat-head strong,.combat-grid strong{color:#ffeb65!important}
.combat-head small,.combat-grid span,.combat-extra{color:#ffe0a7!important}
.combat-grid div,.combat-extra{background:#46090a!important;border-color:#a86f27!important}
.combat-grid strong{font-size:11px!important;overflow-wrap:anywhere}
/* Native modal access top-layer: cannot disappear behind any setup dialog */
.access-gate{position:fixed!important;inset:0!important;width:100vw!important;max-width:100vw!important;height:100dvh!important;max-height:100dvh!important;margin:0!important;padding:16px!important;overflow-y:auto!important;display:none!important;align-items:center!important;justify-content:center!important;border:0!important;background:
  radial-gradient(circle at 50% -15%,#ffde4b49,transparent 41%),
  repeating-linear-gradient(90deg,#a50610 0 5px,#93020b 5px 9px,#ad0712 9px 13px),
  linear-gradient(145deg,#a40912,#520307)!important;color:#fff3d8!important;z-index:2147483600!important}
.access-gate[open]{display:flex!important}
.access-gate::backdrop{background:#060101dd!important;backdrop-filter:blur(8px)}
.access-card{width:min(95vw,495px)!important;margin:auto!important;padding:29px clamp(16px,4vw,33px)!important;border:3px double #fff060!important;border-radius:20px!important;background:linear-gradient(140deg,#cc0c13,#83020b 75%,#6e0007)!important;box-shadow:0 0 0 8px #ffbe1b2b,0 27px 75px #000b,0 0 45px #f6b72a44!important;text-align:center!important}
.access-emblem{font:900 75px/1.1 "Noto Serif CJK SC",serif!important;color:#ffe934!important;text-shadow:0 4px 25px #ffdd29c4!important}
.access-kicker{color:#fff08a!important;letter-spacing:.21em!important;font-weight:950!important;font-size:10px!important}
.access-card h2{color:#fff5ba!important;text-shadow:0 2px 14px #0005;font-size:clamp(23px,3vw,34px)!important}
.access-card p,.access-card small{color:#ffdea8!important}
.access-form input{background:#440006!important;border:2px solid #ffce26!important;color:#fff0b5!important;min-height:56px!important;font-size:20px!important}
.access-form input:focus{outline:2px solid #fff681!important}
.access-form button{min-height:51px;font-size:14px!important}
/* Simulator retained and recolored to same Chinese palette */
.simulator-dialog{background:linear-gradient(145deg,#880713,#240207 70%,#4b040a)!important;border:2px solid #ffc624!important;color:#fff0d5!important}
.simulator-dialog::backdrop{background:#090202e8!important}
.sim-section,.sim-report,.sim-overview,.sim-methodology{background:linear-gradient(135deg,#5b090b,#2f0508)!important;border-color:#a77625!important}
.sim-mark,.sim-section-title>span,.sim-counter-grid>div{background:#a4090f!important;border:1px solid #ddac37!important;color:#ffe35e!important}
.sim-heading h2,.sim-section-title h3,.sim-ranking-header h3,.sim-overview h3,.sim-eyebrow{color:#ffe56c!important}
.sim-heading h2 em,.sim-award-label,.sim-award-value,.sim-top-num{color:#fff16f!important;text-shadow:0 0 15px #b5761b31!important}
.sim-input-panel textarea,.sim-filters input,.sim-filters select,.sim-controls select{background:#310509!important;border-color:#ad752b!important;color:#ffeabd!important}
.sim-award,.sim-result-card,.sim-top-entry,.sim-detail,.sim-detail-metrics>div{background:linear-gradient(140deg,#a60a15,#5c080c)!important;border-color:#b9852d!important;color:#ffdf99!important}
.sim-table thead th{background:#a60915!important;color:#ffe36d!important}
.sim-table td{border-bottom-color:#9d5e2466!important}
.sim-table tbody tr:hover{background:#7e1214!important}
.sim-feedback,.sim-static-settings>span{background:#59110a!important;border-color:#b9842b!important;color:#ffe5bd!important}
.sim-tie{background:linear-gradient(135deg,#0c9b59,#046b42)!important;color:white!important}
.sim-bank{background:linear-gradient(135deg,#df0b26,#960012)!important;color:white!important}
.sim-player{background:linear-gradient(135deg,#246ae8,#163da5)!important;color:white!important}
/* Responsive: keep ceremonial framing readable, no horizontal scroll. */
@media(max-width:1300px){.lantern{opacity:.31;transform:scale(.8);transform-origin:top center}}
@media(max-width:850px){.lantern{display:none}.topbar{border-top-width:2px!important}.setup-intel-stats{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.budget-tiles{grid-template-columns:minmax(0,1fr)}.setup-intel-stats{grid-template-columns:minmax(0,1fr)}.access-card{box-shadow:0 15px 50px #000a!important}.brand-diamond{font-size:22px!important}}
/* Final removal of legacy ruby/magenta surfaces outside the result colors. */
.outcome-button.banker-button,.outcome-button.win-button.banker-button,.outcome-button.lose-button.banker-button{background:linear-gradient(135deg,#f42125,#be0012 76%)!important;border-color:#ffdf8f!important;color:#fff4df!important;box-shadow:0 5px 23px #e6242944!important}
.outcome-button.player-button,.outcome-button.win-button.player-button,.outcome-button.lose-button.player-button{background:linear-gradient(135deg,#277bff,#1241ad 85%)!important;border-color:#83b7ff!important;color:#fff!important;box-shadow:0 5px 20px #2568ed30!important}
.outcome-button.tie-button{background:linear-gradient(125deg,#039e56,#02653f)!important;border-color:#7cffaf!important;color:#ecfff4!important}
.auto-guard-status,.auto-guard-status.suspended,.auto-guard-status.c2-dragon{background:#572609!important;border:1px solid #e4ae31!important;color:#ffe6ac!important}
.auto-score,.auto-score-active{background:#59090a!important;border-color:#97501a!important;color:#ffdc9d!important}
.auto-score strong,.auto-score-active strong{color:#ffe84c!important}
.history-entry{background:#390709!important;border:1px solid #a15c2599!important}
.history-info strong,.history-count,.history-round,.history-delta{color:#ffebce!important}
.history-info span{color:#dcb995!important}
.history-event:not(.B):not(.P):not(.T){background:#740b0c!important;border-color:#d7a12f!important;color:#ffeab7!important}
.mini-status,.mechanic-box,.helper-bar{background:#470a0c!important;border-color:#a96d2d!important;color:#ffe4af!important}
.debt-panel .debt-stats>div,.divider-line{border-color:#b377244a!important}
.road-substats,.history-count{color:#dfbd88!important}
.preset-tile-capital{background:#5a150a!important;border-color:#b8852e!important}
.tag-pink,.tag-cyan,.tag-gold,.trend-tag{color:#ffe16b!important;border-color:#e3af35!important;background:#6a210d!important}
.sim-top-entry,.sim-award,.sim-result-card{color:#fff1c8!important}
