/* The lantern wheel overlay and the Buy Bonus dialog. Images keep their own ratios:
   the backdrop is cover-fitted, the wheel canvas is sized by script with one scale. */
.lantern-wheel{position:fixed;inset:0;z-index:2147483000;background:#1E1A17;overflow:hidden;color:#F3E6C8}
.lantern-wheel[hidden]{display:none}
.lantern-wheel__backdrop{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%;pointer-events:none}
.lantern-wheel__stage{position:relative;box-sizing:border-box;width:100%;height:100%;display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr);gap:clamp(4px,1.2vmin,12px);
  padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}
.lantern-wheel__title{margin:0;text-align:center;font:700 clamp(17px,3.4vmin,36px)/1.15 Cinzel,Georgia,serif;letter-spacing:.14em;text-transform:uppercase;color:#FFC46B;text-shadow:0 2px 8px rgba(0,0,0,.8)}
.lantern-wheel__disc{position:relative;min-width:0;min-height:0}
/* Out of flow: the canvas is sized from the disc box and can never resize it. */
.lantern-wheel__canvas{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:block}
.lantern-wheel__side{display:grid;justify-items:center;align-content:center;gap:clamp(6px,1.4vmin,14px)}
.lantern-wheel__status{margin:0;min-height:2.7em;max-width:30em;text-align:center;font:600 clamp(14px,2.3vmin,22px)/1.3 Georgia,serif;text-shadow:0 1px 4px #000,0 0 12px rgba(0,0,0,.8)}
.lantern-wheel__spin{position:relative;display:grid;place-items:center;width:clamp(190px,30vmin,320px);aspect-ratio:1405/369;height:auto;padding:0;border:0;background:none;cursor:pointer;color:#F3E6C8;font:700 clamp(17px,2.9vmin,28px)/1 Cinzel,Georgia,serif;letter-spacing:.12em;text-transform:uppercase}
.lantern-wheel__spin .primary-art-svg{position:absolute;inset:0;width:100%;height:100%}
.lantern-wheel__spin .primary-art-label{position:relative;text-shadow:0 1px 3px #000}
.lantern-wheel__spin:disabled{cursor:default;opacity:.55}
.lantern-wheel__spin:focus-visible{outline:3px solid #FFC46B;outline-offset:4px;border-radius:12px}
.lantern-wheel[data-state="spinning"] .lantern-wheel__spin,.lantern-wheel[data-state="landed"] .lantern-wheel__spin{visibility:hidden}
/* Short landscape: the wheel takes the height, the prize and SPIN sit beside it. */
@media (orientation:landscape) and (max-height:560px){
  .lantern-wheel__stage{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr) minmax(170px,32vw)}
  .lantern-wheel__title{grid-column:1/-1}
  .lantern-wheel__disc{grid-row:2;grid-column:1}
  .lantern-wheel__side{grid-row:2;grid-column:2}
  .lantern-wheel__spin{width:clamp(160px,26vw,260px)}
}
/* Wide screens: SPIN and the prize beside the wheel keep it as large as the height allows. */
@media (orientation:landscape) and (min-height:561px) and (min-aspect-ratio:4/3){
  .lantern-wheel__stage{grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr) minmax(220px,24vw)}
  .lantern-wheel__title{grid-column:1/-1}
  .lantern-wheel__disc{grid-row:2;grid-column:1}
  .lantern-wheel__side{grid-row:2;grid-column:2;justify-items:start}
  .lantern-wheel__status{text-align:left}
}
html.lantern-wheel-open,html.lantern-wheel-open body{overflow:hidden}

/* Buy Bonus dialog */
.lantern-buy{border:0;padding:0;background:transparent;color:#F3E6C8;max-width:min(92vw,460px);width:100%}
.lantern-buy::backdrop{background:rgba(10,8,6,.72)}
.lantern-buy__card{box-sizing:border-box;margin:0;padding:clamp(16px,3vmin,26px);border-radius:16px;background:#12302b;border:2px solid #D9A441;box-shadow:0 18px 50px rgba(0,0,0,.6);text-align:center;font:500 16px/1.4 Georgia,serif}
.lantern-buy__title{margin:0 0 6px;font:700 clamp(20px,3.2vmin,28px)/1.15 Cinzel,Georgia,serif;letter-spacing:.1em;text-transform:uppercase;color:#FFC46B}
.lantern-buy__offer{margin:8px 0;font-size:clamp(16px,2.4vmin,19px)}
.lantern-buy__price{margin:10px 0;font:700 clamp(22px,4vmin,32px)/1.1 Georgia,serif;color:#FFC46B}
.lantern-buy__note{margin:6px 0 0;font-size:14px;opacity:.9}
.lantern-buy__refusal{margin:10px 0 0;padding:8px 10px;border-radius:8px;background:rgba(163,50,42,.35);border:1px solid #A3322A;font-size:15px}
.lantern-buy__refusal[hidden]{display:none}
.lantern-buy__actions{display:flex;gap:12px;justify-content:center;margin-top:16px;flex-wrap:wrap}
.lantern-buy__actions button{min-width:128px;min-height:46px;padding:0 18px;border-radius:999px;font:700 16px/1 Cinzel,Georgia,serif;letter-spacing:.12em;cursor:pointer}
.lantern-buy__cancel{background:transparent;color:#F3E6C8;border:2px solid #A8C9A0}
.lantern-buy__confirm{background:#A3322A;color:#F3E6C8;border:2px solid #D9A441}
.lantern-buy__confirm:disabled{opacity:.5;cursor:default}
[data-capped="true"]{color:#FFC46B}
.lantern-wheel[data-state="landed"] .lantern-wheel__status{color:#FFC46B;font:700 clamp(18px,3.4vmin,34px)/1.25 Cinzel,Georgia,serif;letter-spacing:.04em}
/* The bet inside the Buy window: the game's own ladder, stepped with - and +. */
.lantern-buy__bet{display:flex;align-items:center;justify-content:center;gap:10px;margin:12px 0 2px}
.lantern-buy__bet-label{font:700 14px/1 Cinzel,Georgia,serif;letter-spacing:.14em;text-transform:uppercase;color:#A8C9A0}
.lantern-buy__step{display:grid;place-items:center;min-width:44px;min-height:44px;padding:0;border-radius:50%;border:2px solid #D9A441;background:#0b201d;color:#F3E6C8;font:700 24px/1 Georgia,serif;cursor:pointer}
.lantern-buy__step:disabled{opacity:.4;cursor:default}
.lantern-buy__step:focus-visible,.lantern-buy__actions button:focus-visible{outline:3px solid #FFC46B;outline-offset:2px}
.lantern-buy__bet-value{min-width:4.6em;text-align:center;font:700 clamp(20px,3.6vmin,28px)/1.1 Georgia,serif;color:#F3E6C8;font-variant-numeric:tabular-nums}
.lantern-buy{max-height:calc(100vh - 16px);overflow:auto}
@media (max-height:440px){
  .lantern-buy__card{padding:10px 16px}
  .lantern-buy__title{font-size:18px;margin-bottom:2px}
  .lantern-buy__offer{margin:2px 0;font-size:15px}
  .lantern-buy__bet{margin:4px 0 0}
  .lantern-buy__price{margin:4px 0;font-size:20px}
  .lantern-buy__note{margin:2px 0 0;font-size:13px}
  .lantern-buy__refusal{margin-top:4px;padding:4px 8px;font-size:14px}
  .lantern-buy__actions{margin-top:8px}
}
