/* رحلة الثروة — Ultimate Polish v165. Loaded last. */
body.ultimate-polish-v165{--u165-gold:#f2ba36;--u165-gold2:#ffe17b;--u165-navy:#051f34;--u165-navy2:#0a3656;--u165-cyan:#42dce8;--u165-green:#53e39a;--u165-red:#ff6d6d}

/* live economy/map identity: compact, never competes with the top HUD */
.economy-pulse165{position:fixed;top:84px;left:50%;transform:translateX(-50%);z-index:58;display:flex;align-items:center;gap:7px;min-width:190px;max-width:320px;padding:5px 10px;border:1px solid #d4a538;border-radius:12px;background:#06253ce8;color:#fff;box-shadow:0 7px 18px #00152255,inset 0 0 0 1px #ffffff12;pointer-events:none;backdrop-filter:blur(8px)}
.economy-pulse165>i{font-style:normal;width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:#0b3858;border:1px solid #d6a63a;font-size:16px}.economy-pulse165>div{min-width:0}.economy-pulse165 small,.economy-pulse165 span{display:block;font-size:7px;color:#a8cfdf;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.economy-pulse165 b{display:block;color:#ffe379;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
body.ultimate-polish-v165 .classic-top-center{z-index:75!important}.ultimate-polish-v165 .hud-players{z-index:64!important}

/* property state should be readable at a glance */
.level-badge165{position:absolute;right:4px;bottom:4px;z-index:15;display:grid;place-items:center;min-width:18px;height:18px;padding:0 4px;border-radius:7px;border:1px solid #fff1a1;background:linear-gradient(180deg,#ffe173,#d99a19);color:#372306;font:900 8px Cairo,sans-serif;box-shadow:0 2px 0 #70480d,0 3px 8px #00192a66}
.tile.path-glow165{filter:brightness(1.22) saturate(1.1);box-shadow:0 0 0 3px #61e8f2aa,0 0 24px #52e3eecc!important;transform:translateZ(9px) scale(1.025)!important}
.tile.path-glow165::after{content:"";position:absolute;inset:-4px;border:2px solid #9af7ff;border-radius:inherit;animation:pathPulse165 .34s ease-out both;pointer-events:none}@keyframes pathPulse165{from{opacity:1;transform:scale(.92)}to{opacity:0;transform:scale(1.15)}}

/* net-worth movement */
.worth-trend165{display:inline-flex!important;width:max-content;align-items:center;gap:3px;margin-top:2px;padding:1px 5px;border-radius:999px;border:1px solid #315f7a;background:#092a43;color:#a6c8d7;font-size:6px!important;line-height:1.4!important}.worth-trend165.up{color:#89f5ba;border-color:#36b87877;background:#0b473655}.worth-trend165.down{color:#ff9a94;border-color:#e85c5c77;background:#54222855}.worth-trend165.flat{opacity:.8}

/* bigger dice response without making the bar wider */
body.dice-energy165 #action .die,body.dice-energy165 #diceCinema130 .die{filter:drop-shadow(0 0 15px #ffe679) brightness(1.12);animation:diceEnergy165 .44s ease-in-out infinite alternate}@keyframes diceEnergy165{to{transform:translateY(-4px) rotate(3deg) scale(1.08)}}
body.double-roll165 #action{box-shadow:0 0 0 2px #ffe46f,0 0 30px #f4b82e88!important}body.double-roll165 #action::before{content:"DOUBLE!";position:absolute;left:50%;top:-32px;transform:translateX(-50%);z-index:8;padding:5px 13px;border-radius:999px;background:linear-gradient(180deg,#fff19a,#e3a51d);color:#422900;font:900 10px Cairo,sans-serif;box-shadow:0 4px 0 #67400c,0 6px 16px #0007;animation:doublePop165 1.1s ease both}@keyframes doublePop165{0%{opacity:0;transform:translate(-50%,15px) scale(.6)}20%,75%{opacity:1;transform:translate(-50%,0) scale(1)}100%{opacity:0;transform:translate(-50%,-10px) scale(.9)}}
body.big-money165 #stage3d{animation:moneyImpact165 .55s ease}@keyframes moneyImpact165{20%{filter:brightness(1.13)}40%{transform:translateX(2px)}55%{transform:translateX(-2px)}100%{filter:none;transform:none}}

/* critical rent moment */
body.critical165::after{content:"";position:fixed;inset:0;z-index:66;pointer-events:none;background:radial-gradient(circle at center,transparent 35%,#8f152733 72%,#3d071566 100%);animation:criticalShade165 .7s ease-in-out infinite alternate}@keyframes criticalShade165{to{opacity:.55}}
body.critical165 .phud.current{box-shadow:0 0 0 2px #ff8b75,0 0 28px #e2475288!important}

/* 3D fortune/event cards */
#popup.card-reveal165>.pop,#popup.card-reveal165>div:first-child{transform-origin:center;animation:cardReveal165 .82s cubic-bezier(.2,.8,.2,1) both;backface-visibility:hidden}@keyframes cardReveal165{0%{opacity:0;transform:perspective(800px) rotateY(-85deg) translateY(24px) scale(.75)}55%{opacity:1;transform:perspective(800px) rotateY(8deg) translateY(-5px) scale(1.04)}100%{transform:perspective(800px) rotateY(0) scale(1)}}

/* richer live auction */
.auction-pop165{min-width:min(520px,88vw)}.auction-kicker165{display:block;color:#5ed9e4;font-weight:900;letter-spacing:.03em}.auction-price165{display:flex;align-items:end;justify-content:space-between;gap:15px;margin:9px 0;padding:9px 12px;border:1px solid #d4a33a;border-radius:12px;background:#082941}.auction-price165 span{color:#a9cddd;font-size:9px}.auction-price165 b{color:#ffe177;font-size:23px}.auction-meter165{height:7px;overflow:hidden;border-radius:99px;background:#0c2130;border:1px solid #31546c;margin:8px 0 10px}.auction-meter165 i{display:block;height:100%;background:linear-gradient(90deg,#2bdce6,#ffe06b,#ff7a68);border-radius:inherit;transition:width .3s ease}.auction-bidders165{display:flex;justify-content:center;gap:7px;flex-wrap:wrap;margin:10px 0}.auction-bidders165 span{display:flex;align-items:center;gap:4px;padding:4px 7px;border:1px solid #345d76;border-radius:999px;background:#092a43;color:#c9e1eb;font-size:7px}.auction-bidders165 img{width:22px;height:22px;border-radius:50%;object-fit:cover}.auction-bidders165 .leader{border-color:#ffd75e;color:#ffe77e;box-shadow:0 0 12px #e9ae2b55}.auction-bidders165 .passed{opacity:.35;filter:grayscale(.8)}.auction-actions165{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px!important}.auction-actions165 button{min-width:0!important;padding-inline:6px!important;font-size:8px!important}.danger165{border-color:#c24d50!important;color:#ffb3b3!important}

/* custom trade composer */
.trade-pop165{min-width:min(560px,90vw)}.trade-bundle165{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px;margin:12px 0}.trade-bundle165>div{padding:10px;border:1px solid #365f77;border-radius:12px;background:#082a44}.trade-bundle165 small{display:block;color:#91b9ca;font-size:7px}.trade-bundle165 b{display:block;color:#ffe178;font-size:11px;margin-top:3px}.trade-bundle165>i{font-style:normal;color:#49dde8;font-size:22px}.trade-field165{display:grid;grid-template-columns:92px 1fr auto;align-items:center;gap:8px;margin:8px 0;color:#a9ccda;font-size:8px;text-align:right}.trade-field165 select,.trade-field165 input[type=range]{width:100%;min-width:0}.trade-field165 select{height:38px;border:1px solid #3d637b;border-radius:10px;background:#0b2d47;color:#fff;padding:0 8px;font:700 9px Cairo,sans-serif}.trade-field165>b{min-width:68px;color:#ffe178;text-align:left;font-size:9px}

/* speech bubble in the match itself */
.speech-layer165{position:fixed;inset:0;z-index:720;pointer-events:none}.speech-bubble165{position:fixed;width:min(190px,44vw);opacity:0;transform:translateY(-8px) scale(.94);transition:.22s ease;padding:7px 9px;border:1px solid #e4b53b;border-radius:13px 13px 13px 4px;background:#06263ff2;color:#fff;box-shadow:0 8px 22px #00111ca6}.speech-bubble165.show{opacity:1;transform:none}.speech-bubble165 b{display:block;color:#ffe170;font-size:8px;margin-bottom:2px}.speech-bubble165 span{display:block;font-size:9px;line-height:1.45;overflow-wrap:anywhere}

/* weekly challenges */
.weekly165{margin-top:18px;padding-top:14px;border-top:1px solid #31566f}.weekly-head165{display:flex;align-items:end;justify-content:space-between;gap:10px;margin-bottom:10px}.weekly-head165 small{color:#54dce7;font-size:8px}.weekly-head165 h3{margin:2px 0 0;color:#ffe174}.weekly-head165>span{font-size:8px;color:#9dc2d3}.weekly-grid165{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.weekly-card165{display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:8px;padding:9px;border:1px solid #385d73;border-radius:13px;background:#092941}.weekly-card165>i{font-style:normal;width:36px;height:36px;display:grid;place-items:center;border-radius:10px;background:#0c3856;border:1px solid #c89b32;font-size:18px}.weekly-card165 b,.weekly-card165 span,.weekly-card165 small{display:block}.weekly-card165 b{color:#fff;font-size:9px}.weekly-card165 span,.weekly-card165 small{color:#9ec1d0;font-size:7px}.weekly-card165 div>div{height:5px;margin:5px 0 2px;overflow:hidden;border-radius:99px;background:#071c2c}.weekly-card165 div>div em{display:block;height:100%;background:linear-gradient(90deg,#2fd8e4,#f4ba35);border-radius:inherit}.weekly-card165 button{min-width:44px;height:31px;border:1px solid #e0ad35;border-radius:9px;background:#17324a;color:#ffe078;font:900 8px Cairo}.weekly-card165.done{border-color:#5fcf91}.weekly-card165.done button:not(:disabled){background:linear-gradient(#ffe27d,#dfa420);color:#3e2707}

/* replay overlay */
.replay-overlay165{display:none;position:fixed;inset:0;z-index:980;background:#001320bc;backdrop-filter:blur(8px);padding:clamp(12px,4vw,44px);align-items:center;justify-content:center}.replay-overlay165.show{display:flex}.replay165{width:min(620px,96vw);max-height:min(720px,86svh);overflow:hidden;border:2px solid #e0ad38;border-radius:20px;background:linear-gradient(180deg,#0a3553,#041b2d);box-shadow:0 25px 80px #000b}.replay165 header{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid #31566d}.replay165 header small{color:#54dce7;font-size:8px}.replay165 h3{margin:2px 0 0;color:#ffe078}.replay165 header button{width:36px;height:36px;border:1px solid #d2a43a;border-radius:10px;background:#0d314b;color:#fff;font-size:20px}.replay-list165{padding:10px;max-height:65svh;overflow:auto}.replay-list165 article{display:grid;grid-template-columns:36px 1fr;gap:8px;align-items:center;padding:8px;margin:6px 0;border:1px solid #31556d;border-radius:12px;background:#08273e}.replay-list165 article>i{font-style:normal;width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#0d3652}.replay-list165 b{display:block;color:#ffe073;font-size:8px}.replay-list165 span{display:block;color:#d7e6ed;font-size:9px;line-height:1.5}.replay-list165 .r-danger{border-color:#be555a}.replay-list165 .r-win{border-color:#e3b33c;box-shadow:inset 0 0 18px #c5982520}.replay-cine-btn165{position:absolute;bottom:26px;left:50%;transform:translateX(-50%);z-index:5;border:1px solid #ffe07b;border-radius:999px;background:linear-gradient(#ffe37f,#e0a31e);color:#3e2604;padding:9px 18px;font:900 10px Cairo;box-shadow:0 4px 0 #6f460d}

/* sound mixer */
.sound-mixer165{position:fixed;right:18px;bottom:92px;z-index:780;width:min(290px,calc(100vw - 36px));padding:11px;border:1px solid #d3a438;border-radius:15px;background:#06243bea;color:#fff;box-shadow:0 15px 40px #00101ca8;backdrop-filter:blur(8px)}.sound-mixer165.hidden{display:none}.sound-mixer165 header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.sound-mixer165 header b{color:#ffe079}.sound-mixer165 header button{width:29px;height:29px;border:1px solid #8a6d33;border-radius:8px;background:#102f48;color:#fff}.sound-mixer165 label{display:grid;gap:6px;font-size:8px;color:#b3d2df}.sound-mixer165 p{font-size:7px;line-height:1.6;color:#8eb1c0;margin:8px 0 0}

/* smoother build rise and ownership */
.tile .skyline,.tile .building,.tile .owned-building{transform-origin:50% 100%;transition:transform .32s cubic-bezier(.2,.8,.2,1),filter .32s}.tile:hover .skyline,.tile:hover .building,.tile:hover .owned-building{filter:brightness(1.08)}

/* mobile/tablet: preserve board real estate */
@media(max-width:1279px){.economy-pulse165{top:62px;min-width:150px;max-width:230px;padding:4px 7px}.economy-pulse165>i{width:25px;height:25px;font-size:13px}.economy-pulse165 small{display:none}.economy-pulse165 b{font-size:7px}.economy-pulse165 span{font-size:6px}.weekly-grid165{grid-template-columns:1fr}.auction-actions165{grid-template-columns:repeat(2,minmax(0,1fr))}.trade-field165{grid-template-columns:72px 1fr}.trade-field165>b{grid-column:2;text-align:right}.replay165{border-radius:15px}}
@media(max-width:760px){.economy-pulse165{top:58px;z-index:60;min-width:132px;max-width:180px;border-radius:9px}.economy-pulse165>i{display:none}.economy-pulse165 b{font-size:6px}.economy-pulse165 span{font-size:5px}.ultimate-polish-v165.reference-v120 .hud-players{top:84px!important}.ultimate-polish-v165.reference-v120 .stage#stage3d{padding-top:135px!important}.worth-trend165{display:none!important}.level-badge165{min-width:14px;height:14px;font-size:6px;right:2px;bottom:2px}.speech-bubble165{width:min(170px,58vw);top:134px!important;font-size:8px}.trade-pop165,.auction-pop165{min-width:0!important;width:100%!important}.trade-bundle165{grid-template-columns:1fr}.trade-bundle165>i{transform:rotate(90deg)}.auction-bidders165{gap:4px}.auction-bidders165 span{padding:3px 5px;font-size:6px}.auction-bidders165 img{width:18px;height:18px}.auction-actions165 button{font-size:7px!important}.weekly-card165{grid-template-columns:32px 1fr auto;padding:7px}.replay-overlay165{padding:6px}.replay-list165{padding:6px}.sound-mixer165{right:6px;bottom:58px;width:calc(100vw - 12px)}}
@media(max-height:650px) and (orientation:landscape){.economy-pulse165{display:none}.replay165{max-height:92svh}.replay-list165{max-height:70svh}}
@media(prefers-reduced-motion:reduce){.tile.path-glow165::after,body.dice-energy165 #action .die,body.double-roll165 #action::before,#popup.card-reveal165>*{animation:none!important}.speech-bubble165{transition:none}}
