body[data-stage="2"]:not(.practice-mode) .island-background{background:linear-gradient(#21153310,#35223b22),url('assets/mushroom-constellation.png') center/cover no-repeat;filter:none}
body[data-stage="2"]:not(.practice-mode){background:#342c54}
.star-mode .felt>.score-strip,.star-mode .felt>.active-effects,.star-mode .felt>.item-pouch,.star-mode .felt>.grid-wrap,.star-mode .felt>.board-bottom,.star-mode .felt-logo,.star-mode #show-items,.star-mode .bet-panel>.field-label:has(label[for=mine-value]),.star-mode .bet-panel>.stepper,.star-mode .bet-panel>.risk,.star-mode .bet-panel>.bet-divider{display:none}
.star-mode .table-area,.star-mode .table-rail,.star-mode .felt,#star-game{min-width:0;max-width:100%}
body.star-mode .table-rail{padding:7px;border:1px solid #e5cfa5b0;background:linear-gradient(130deg,#b7a1bd,#554265 35%,#a787a9 70%,#dec9ac);box-shadow:0 6px 0 #423451b3,0 18px 60px #180e4070}
body.star-mode .felt{position:relative;padding:17px 24px 22px;overflow:hidden;border:1px solid #e0cba56b;background:radial-gradient(ellipse at 50% 32%,#7d689475,transparent 60%),linear-gradient(145deg,#342b53f5,#211c3bee);color:#f9e8c4}
.star-mode .table-top,.star-mode .table-top #phase-label{color:#d6c6df}.star-mode .table-top .live-dot{background:#f4d396;box-shadow:0 0 9px #ffdf9d}.star-mode .table-top{position:relative;z-index:1}
.star-heading{text-align:center;margin:12px 0 0;position:relative;z-index:1}.star-heading>span{color:#e8d0a3;font-size:25px}.star-heading h2{font-size:28px;font-weight:500;letter-spacing:8px;margin:3px 0 10px;color:#ffedc9;text-shadow:0 0 20px #e6c89050}.star-heading>small{font-size:13px;letter-spacing:2px;color:#cbb8d8}
.star-orbit{height:237px;position:relative;display:grid;place-items:center;margin:-3px 0 -10px}.star-constellation{position:absolute;width:265px;height:265px;overflow:visible;fill:none;stroke:#e5ce9c;stroke-width:.18;opacity:.65;transform:rotate(-12deg)}.star-constellation circle:nth-child(2){stroke-dasharray:.3 2}.star-constellation path{stroke-width:.3}.star-constellation .star-node{fill:#fff3c9;stroke-width:.4;filter:drop-shadow(0 0 2px #ffe4a2)}
.star-reading{position:relative;display:grid;text-align:center;gap:9px;background:radial-gradient(ellipse,#3b2c59ed 20%,#3b2c5900 70%);padding:30px 36px}.star-reading>small{font-size:12px;color:#d0bedc;letter-spacing:3px}.star-reading>strong{font-size:30px;font-weight:500;letter-spacing:5px;color:#ffe6ac;text-shadow:0 0 20px #ebc07360}.star-reading>span{font-size:14px;color:#e8d4b3;min-height:18px;letter-spacing:1px}.orbit-spark{position:absolute;color:#f7d798;font-size:25px;text-shadow:0 0 20px #ffecb0}.spark-a{left:13%;top:29%}.spark-b{right:13%;bottom:22%;font-size:17px}
.star-hand{position:relative;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px;padding:14px 0 9px;isolation:isolate}.star-card{position:relative;min-width:0;height:153px;padding:10px 8px 8px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;border:1px solid #d7c3e1b0;border-radius:34px 34px 13px 13px;background:linear-gradient(155deg,#fbf4ff,#d4c7e8);color:#74608f;box-shadow:0 5px 0 #15102b80,0 0 14px #b497cd20;transition:transform .22s,box-shadow .22s,border-color .22s;cursor:pointer;opacity:1}.star-card:before{content:'';position:absolute;inset:5px;border:1px solid currentColor;opacity:.23;border-radius:29px 29px 9px 9px;pointer-events:none}.star-card>b{align-self:flex-start;font-size:20px;line-height:1;padding-left:4px;font-weight:600}.rune-symbol{font-size:45px;line-height:1.1;text-shadow:0 2px 1px #fff9;filter:drop-shadow(0 3px 5px #72609430)}.rune-stars{font-size:14px;font-style:normal;letter-spacing:3px;opacity:.7}.star-card>small{font-size:12px;letter-spacing:1px;min-height:16px;z-index:1}.star-card.star-suit-1{background:linear-gradient(145deg,#fff3f7,#eabbd1);color:#a45482}.star-card.star-suit-2{background:linear-gradient(145deg,#e8fcff,#a8d7e5);color:#327e98}.star-card.star-suit-3{background:linear-gradient(145deg,#fff8dc,#e9cf95);color:#aa7d2f}.star-card.is-empty{background:linear-gradient(150deg,#65527a,#392e54);color:#dfc799;border-color:#d9c69d6b}.star-card.is-empty .rune-symbol{text-shadow:0 0 20px #e8cc8d55}.star-card:not(:disabled):hover{transform:translateY(-5px);border-color:#fff0c2}.star-card:focus-visible{outline:3px solid #ffe1a2;outline-offset:4px}.star-card.is-held{transform:translateY(-9px);border:2px solid #ffe1a0;box-shadow:0 5px 0 #705536,0 0 23px #f3d28b5c}.star-card.is-held>small{background:#765b3a;color:#fff0bc;border-radius:10px;padding:2px 6px;white-space:nowrap}
.star-hint{font-size:13px;text-align:center;color:#c7b5d3;letter-spacing:1px;margin:15px 0 20px;min-height:18px}.star-controls{display:grid;grid-template-columns:1fr 1.3fr;gap:12px}.star-controls button{display:flex;align-items:center;justify-content:center;gap:13px;padding:13px 7px;border:1px solid #cbb4d18c;border-radius:16px;background:#574366;color:#f2dfef;font-size:14px;letter-spacing:1px;box-shadow:0 3px 0 #17112d}.star-controls button:last-child{background:linear-gradient(120deg,#f5dfb1,#cfb17f);color:#503956;border-color:#f5dfb9}.star-controls button>span{font-size:20px}.star-controls button:disabled{opacity:.4;cursor:default}.star-controls button:not(:disabled):hover{filter:brightness(1.1)}
.star-atlas{margin-top:24px;padding-top:15px;border-top:1px solid #c8adcc40;font-size:13px;color:#c7b5d3}.star-atlas summary{cursor:pointer;display:flex;justify-content:space-between;letter-spacing:2px;color:#e7d6c0;list-style:none}.star-atlas summary>span{font-size:12px;color:#bca7ca;letter-spacing:1px}.star-paytable{display:grid;grid-template-columns:1fr 1fr;gap:5px 14px;margin-top:15px}.star-paytable>div{display:flex;justify-content:space-between;align-items:center;border:1px solid transparent;border-radius:8px;padding:7px 9px;gap:5px}.star-paytable small{display:block;font-size:12px;color:#b9a3c7;margin-top:3px}.star-paytable b{color:#e9cf9c;font-size:15px}.star-paytable .is-current{border-color:#dfc68c88;background:#ffe6ac0f;color:#fff0c7}.star-atlas p{font-size:12px;line-height:1.9;color:#bca8cc;margin:14px 6px 0}
.star-mode .chapter-name h1{color:#fff1dc;text-shadow:0 2px 5px #35203a}.star-mode .chapter-name h1>span:first-child{color:#f0dabd}.star-mode .route{background:#352b4ba6;border:1px solid #cfbad14d;border-radius:18px;padding:16px}.star-mode .route .eyebrow,.star-mode .route li b{color:#efdeed}.star-mode .route li.current b{color:#ffe8b2}.star-mode .companion-card{background:linear-gradient(#f9edfedb,#ead9eac9);border-color:#e8d2e5}.star-mode .topbar{background:#302442df;color:#e9d9ed;border-bottom-color:#c6a8d333}.star-mode .brand,.star-mode .top-location{color:#f1e1ef}.star-mode .top-location .live-dot{background:#e7c5f0}.star-mode .header-right button{background:#eee1ef}.star-mode .bet-panel{background:linear-gradient(150deg,#f4ebf4ed,#d8c8dfed);border-color:#baa4c4;box-shadow:0 5px 0 #79618480,0 16px 28px #29173733}.star-mode .bet-panel .action-button{background:linear-gradient(120deg,#8a6ba5,#604d83);border-color:#d1b7df;color:#fff1d4;box-shadow:0 5px 0 #4a365f}.star-mode .history-section{background:#f4e9f1e8;border-color:#ccb4d0}.star-mode .wallet{background:#f8edf1e6;border-radius:20px}.star-mode .board-message:empty{display:none}
@media(max-width:700px){body.star-mode .felt{padding:13px 13px 19px}.star-heading{margin-top:14px}.star-heading h2{font-size:25px;letter-spacing:6px}.star-heading>small{font-size:12px;letter-spacing:1px}.star-orbit{height:218px;margin-bottom:-8px}.star-constellation{width:240px;height:240px}.star-reading>strong{font-size:27px}.star-hand{gap:6px}.star-card{height:128px;padding:10px 4px 7px;border-radius:27px 27px 10px 10px}.star-card:before{inset:4px;border-radius:23px 23px 7px 7px}.star-card>b{font-size:17px;padding-left:3px}.rune-symbol{font-size:34px}.rune-stars{font-size:12px;letter-spacing:1px}.star-card>small{font-size:11px;letter-spacing:0}.star-card.is-held>small{padding:2px 3px}.star-hint{font-size:12px;margin:13px 0 17px;letter-spacing:0}.star-controls{gap:8px}.star-controls button{font-size:14px;gap:8px;padding:11px 3px}.star-atlas{margin-top:20px}.star-paytable{gap:3px}.star-paytable>div{padding:7px 4px}.star-mode .mobile-dock{background:#e9deedf5;border-color:#bca4cd}.star-mode #mobile-action{background:linear-gradient(130deg,#9273ab,#644e83);color:#fff1cf}.star-mode .chapter-name h1{font-size:25px}.spark-a{left:5%}.spark-b{right:5%}}
.star-mode .history-panel,.star-mode footer{color:#ddcce4;border-color:#cbb3d04d}.star-mode .history-title h2,.star-mode .history-title>span,.star-mode .empty-history,.star-mode footer>span{color:#cfbcd9}.star-mode .history-card{background:#e9dcf0;color:#5c456d;border-color:#bda6cb}.star-mode .brand small{color:#c6afce}.star-mode .floating-sparkles i{color:#f5ddaf}
@media(max-width:700px){.star-orbit{height:175px}.star-constellation{height:205px;width:205px}.star-reading{padding:20px 25px}.star-heading>small{display:none}.star-card{height:121px}}
@media(prefers-reduced-motion:reduce){.star-card{transition:none}}
/* Engraved celestial deck: every rank has its own constellation or court relic. */
.star-card.star-suit-4,.ritual-mini.star-suit-4{--rune-light:#fff8dc;--rune-face:linear-gradient(145deg,#fff4d9,#e8c9e7 48%,#b8dfe5);color:#82558f}.star-suit-4 .rune-corner b{font-size:9px;letter-spacing:.3px}.star-suit-4 .rune-corner i{font-size:16px}.star-suit-4 .rune-joker{filter:drop-shadow(0 0 5px #fff0b9)}
.star-card{--rune-light:#f9f0ff;--rune-face:linear-gradient(150deg,#fff8ff,#d3c2e4);padding:0;background:none!important;border:0!important;box-shadow:none!important;perspective:850px;border-radius:24px 24px 12px 12px;overflow:visible;transition:transform .25s;opacity:1}
.star-card:before{display:none}.star-suit-1{--rune-light:#fff0f5;--rune-face:linear-gradient(145deg,#fff5f6,#ecc5d4)}.star-suit-2{--rune-light:#efffff;--rune-face:linear-gradient(145deg,#f2ffff,#b8dce5)}.star-suit-3{--rune-light:#fff9e7;--rune-face:linear-gradient(145deg,#fffbe9,#ead39e)}
.star-card-turn{position:absolute;inset:0;display:block;transform-style:preserve-3d;border-radius:inherit;transition:filter .3s}.star-card-face,.star-card-back{position:absolute;inset:0;border-radius:inherit;backface-visibility:hidden;-webkit-backface-visibility:hidden;border:1px solid #e2c9e5;background:var(--rune-face);box-shadow:0 5px 0 #16102799,inset 0 0 12px #fff8,0 2px 15px #18102730;display:grid;place-items:center;overflow:hidden}.star-card-face:before{content:'';position:absolute;inset:4px;border:1px solid currentColor;opacity:.35;border-radius:20px 20px 9px 9px}.star-card-back{transform:rotateY(180deg);color:#ead4a4;background:radial-gradient(ellipse at 50% 35%,#80628f,#302547);border-color:#d4b67c;box-shadow:0 4px 0 #171027}.rune-art{width:92%;height:auto;max-height:78%;overflow:visible;filter:drop-shadow(0 2px 1px #fff8)}.rune-thread{stroke:currentColor;stroke-width:.6;fill:none;opacity:.45}.rune-ring{stroke:currentColor;stroke-width:.55;stroke-dasharray:1 3;fill:none;opacity:.7}.rune-vines{fill:none;stroke:currentColor;stroke-width:.65;opacity:.45}.rune-court{fill:currentColor;fill-opacity:.12;stroke:currentColor;stroke-width:1.2;stroke-linejoin:round;stroke-linecap:round}.rune-corner{position:absolute;left:10px;top:8px;display:flex;flex-direction:column;align-items:center;gap:1px;line-height:1;z-index:1}.rune-corner b{font-size:18px;font-weight:600}.rune-corner i{font-size:12px;font-style:normal}.rune-corner-bottom{inset:auto 10px 9px auto;transform:rotate(180deg)}.rune-back-art{height:96%;width:94%;fill:none;stroke:currentColor;stroke-width:.6;opacity:.85}.star-card.is-empty .star-card-face{background:radial-gradient(ellipse at 50% 35%,#6b537f,#302547);color:#e2c997}.star-card.is-empty .rune-corner{display:none}.star-hold-mark{position:absolute;left:50%;bottom:-7px;transform:translateX(-50%);font-size:12px!important;min-height:0!important;line-height:1.5;letter-spacing:0!important;border-radius:12px;white-space:nowrap;background:#443252;color:#dcc5e5;padding:1px 7px;z-index:2;border:1px solid #bda3cb60;transition:background .25s,color .25s,box-shadow .25s}.star-card.is-held .star-card-face{border:2px solid #ffe2a4;box-shadow:0 4px 0 #80663f,0 0 24px #f4ce8955}.star-card.is-held>.star-hold-mark{background:#765b3a;color:#fff0bc;box-shadow:0 0 12px #ffdc9860;padding:2px 7px}.star-animating .star-card{transition:none}.star-card.is-revealing .star-hold-mark{opacity:0}.star-animating .star-constellation{opacity:.38}.star-reading>strong{transition:color .6s,text-shadow .6s}.star-animating .star-reading>strong{color:#ccb9e2;text-shadow:0 0 25px #bba1d6}
/* Constant SVG topology lets paths and stars glide into a new arrangement. */
.live-constellation{--orbit-color:#b9a4d5;transform:none;opacity:.85;stroke:var(--orbit-color);transition:stroke 1.2s,opacity .8s;filter:drop-shadow(0 0 3px #e1c1ff30)}.live-constellation .orbit-ring{stroke-width:.17;transition:stroke 1.2s}.live-constellation .orbit-inner{stroke-dasharray:.3 2;stroke-width:.15;opacity:.65}.orbit-link{fill:none;stroke-width:.38;transition:d 1.15s cubic-bezier(.3,.1,.2,1),opacity 1s,stroke 1.2s}.orbit-node{transition:transform 1.15s cubic-bezier(.3,.1,.2,1),opacity .9s;fill:var(--orbit-color);stroke:var(--orbit-color)}.orbit-node>circle{filter:drop-shadow(0 0 1px #fff4b9)}.orbit-node>path{stroke-width:.25}.orbit-aura{stroke:none;transition:opacity 1.2s}.orbit-stop{transition:stop-color 1.4s}.live-constellation[data-constellation="royal"],.live-constellation[data-constellation="straight-flush"]{filter:drop-shadow(0 0 4px #ffe0a680)}
@media(max-width:700px){.rune-corner{left:6px;top:7px}.rune-corner b{font-size:16px}.rune-corner i{font-size:11px}.rune-corner-bottom{inset:auto 6px 8px auto}.rune-art{width:100%;max-height:72%}.star-hold-mark{font-size:11px!important;padding:1px 4px}.star-card.is-held>.star-hold-mark{padding:2px 4px}.star-card{border-radius:22px 22px 10px 10px}.star-card-face:before{border-radius:18px 18px 7px 7px}}
@media(prefers-reduced-motion:reduce){.orbit-link,.orbit-node,.live-constellation,.orbit-stop,.star-card-turn,.star-hold-mark{transition:none}}

.star-mode .header-right{gap:5px;padding:5px;border:1px solid #c2a8d044;border-radius:25px;background:#201a364a;box-shadow:inset 0 1px 0 #fff3,0 2px 8px #17102c22}
.star-mode .header-right button{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:6px 13px;border:1px solid #cbb6d45c;border-radius:18px;background:linear-gradient(145deg,#65507880,#413354b3);color:#f6e8d0;font-size:14px;line-height:1;font-weight:700;letter-spacing:1px;box-shadow:inset 0 1px 0 #fff1;text-shadow:0 1px 2px #261c3e66;transition:background .25s,color .25s,border-color .25s,box-shadow .25s,transform .16s}
.star-mode .header-right .icon-button{position:relative;min-width:34px;width:34px;height:34px;padding:0;border-radius:50%;font-size:20px;letter-spacing:0;color:#f0dcb0;border-color:#e2c98c80;background:linear-gradient(145deg,#8b72945c,#51436899)}
.star-mode .header-right .icon-button[aria-pressed=true]{box-shadow:inset 0 1px 0 #fff2,0 0 9px #d8bde11f}
.star-mode .header-right .icon-button>span{position:absolute;top:2px;right:4px;color:#f3bdcc;font-size:12px}
.star-mode .header-right .help-button>span{color:#dfb9e4;margin-left:4px;font-size:14px}
.star-mode .header-right button:hover:not(:disabled){background:linear-gradient(145deg,#8a6e9cbd,#665076df);border-color:#ecd4ab;color:#fff4dc;box-shadow:inset 0 1px 0 #fff3,0 0 10px #d6b7e526;transform:translateY(-1px)}
.star-mode .header-right button:active:not(:disabled){transform:translateY(1px);background:#48365e}
.star-mode .header-right button:focus-visible{outline:2px solid #f1d59f;outline-offset:3px}
@media(max-width:700px){.star-mode .header-right{gap:4px;padding:4px;border-radius:20px}.star-mode .header-right button,.star-mode .header-right .help-button#replay{min-height:29px;padding:5px 8px;font-size:12px;letter-spacing:.5px}.star-mode .header-right .icon-button{min-width:29px;width:29px;height:29px;min-height:29px;padding:0;font-size:18px}.star-mode .header-right .help-button>span{margin-left:3px;font-size:13px}}

/* Keep the five star cards and the draw/stand controls on screen on shorter
   desktop windows; the readable font floor otherwise pushes them below the fold. */
@media(min-width:701px) and (max-height:1000px){
  .star-heading{margin-top:8px}
  .star-heading h2{margin-bottom:6px}
  .star-orbit{height:196px;margin-bottom:-14px}
  .star-constellation{width:220px;height:220px}
  .star-hand{padding:9px 0 6px}
  .star-controls button{padding:11px 7px}
}
@media(max-width:700px){
  .star-mode .header-right{gap:3px;padding:4px 3px}
  .star-mode .header-right button{white-space:nowrap;padding:5px 6px}
  .star-mode .header-right .icon-button{min-width:27px;width:27px}
}
