body.s33-cinema-open { overflow: hidden; }
.s33-cinema, .s33-cinema * { box-sizing: border-box; letter-spacing: 0; }
.s33-cinema [hidden] { display: none !important; }
.s33-cinema {
    --gold: #f8d587; --ink: #17151d; --muted: #a9a6b7;
    position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    color: #f7f4ef; font-family: inherit; isolation: isolate;
    animation: s33-cinema-in .24s ease-out both;
}
.s33-cinema__mask { position: absolute; inset: 0; background: #08070de8; backdrop-filter: blur(9px); z-index: -1; }
.s33-cinema__dialog {
    position: relative; width: min(660px, 100%); max-height: 100%; overflow: auto;
    scrollbar-width: thin; overscroll-behavior: contain; border: 1px solid #b8a48266;
    border-radius: 8px; background: #17151d;
    box-shadow: 0 25px 90px #0009, inset 0 1px #fff2;
    animation: s33-cinema-arrive .42s cubic-bezier(.16, 1, .3, 1) both;
}
.s33-cinema__header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 26px 14px; }
.s33-cinema__eyebrow { display: flex; gap: 8px; align-items: center; color: var(--gold); font-size: 11px; font-weight: 800; }
.s33-cinema__eyebrow:before { content: ''; width: 20px; height: 1px; background: currentColor; }
.s33-cinema__header h3 { color: #fff5dd; font-size: 24px; line-height: 1.35; font-weight: 800; margin: 5px 0 0; }
.s33-cinema button { font-family: inherit; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.s33-cinema button:focus-visible, .s33-cinema [tabindex]:focus-visible { outline: 2px solid #80d9d1; outline-offset: 3px; }
.s33-cinema__close { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; color: #c4bfd0; background: #ffffff08; border: 1px solid #ffffff16; border-radius: 50%; }
.s33-cinema__close:hover { background: #ffffff13; color: white; }
.s33-cinema__close svg { width: 20px; height: 20px; }
.s33-cinema__meta { display: flex; justify-content: center; align-items: center; gap: 12px; color: #b3b1c3; font-size: 12px; margin-bottom: 14px; }
.s33-cinema__meta b { color: #8dddd5; padding-left: 12px; border-left: 1px solid #ffffff26; font-variant-numeric: tabular-nums; }
.s33-cinema-board {
    --columns: 6; --rows: 5; --gap: 7px;
    position: relative; display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
    grid-template-rows: repeat(var(--rows), minmax(0, 1fr)); gap: var(--gap);
    width: min(540px, calc(100% - 40px), calc((100svh - 258px) * 1.2));
    min-width: 250px; aspect-ratio: 6 / 5; margin: 0 auto; isolation: isolate;
}
.s33-cinema-cell {
    --prize: #bac6dc; position: relative; display: grid; place-items: center; min-width: 0; min-height: 0;
    border: 1px solid #ffffff12; border-radius: 6px; background: #24212d;
    isolation: isolate; transition: background-color .12s, border-color .12s;
}
.s33-cinema-cell.is-core, .s33-cinema-reward.is-core { --prize: #ffd07b; }
.s33-cinema-cell.is-rare, .s33-cinema-reward.is-rare { --prize: #dcadff; }
.s33-cinema-cell.is-fine, .s33-cinema-reward.is-fine { --prize: #89d4e7; }
.s33-cinema-cell:before { content: ''; position: absolute; left: 28%; right: 28%; bottom: 0; height: 2px; background: var(--prize); opacity: .6; }
.s33-cinema-cell:after { content: ''; position: absolute; inset: -1px; border: 2px solid #ffe5a9; border-radius: 6px; background: #ffe3a013; box-shadow: 0 0 16px #f9c862a6, inset 0 0 14px #ffd06b38; opacity: 0; pointer-events: none; }
.s33-cinema-cell img { width: 76%; height: 76%; object-fit: contain; pointer-events: none; filter: drop-shadow(0 3px 3px #0008); }
.s33-cinema-cell__grade { position: absolute; top: 4px; left: 5px; color: var(--prize); font-size: 9px; font-weight: 800; line-height: 1; text-shadow: 0 1px 3px #000; z-index: 2; }
.s33-cinema-cell__quantity { position: absolute; bottom: 4px; right: 5px; color: #fff6e7; font-size: 10px; font-weight: 800; line-height: 1; text-shadow: 0 1px 3px #000, 0 0 4px #000; z-index: 2; }
.s33-cinema-cell.is-active { border-color: #ffe4a9; background: #665034; z-index: 3; }
.s33-cinema-cell.is-active:after { opacity: 1; }
.s33-cinema-cell.is-trail { background: #4b3b2c; border-color: #a38753; }
.s33-cinema-cell.is-trail:after { opacity: .28; }
.s33-cinema-cell.is-tail { background: #342b2a; border-color: #68563e; }
.s33-cinema-cell.is-winner { animation: s33-cinema-win .68s ease-out both; }
.s33-cinema-cell.is-winner:after { animation: s33-cinema-prize-flash .8s ease-out both; }
.s33-cinema-center {
    grid-area: 2 / 2 / -2 / -2; position: relative; min-height: 0; display: flex; flex-direction: column;
    align-items: center; justify-content: center; text-align: center; padding: 10px; overflow: hidden;
}
.s33-cinema-center__art { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; width: 95%; height: 52%; max-height: 165px; gap: 0; margin: 5px 0 9px; }
.s33-cinema-center__art img { width: 150%; max-width: none; height: 100%; object-fit: contain; justify-self: center; filter: drop-shadow(0 5px 5px #000a); }
.s33-cinema-center__art img:nth-child(2), .s33-cinema-center__art img:nth-child(3) { z-index: 1; transform: translateY(-7px); }
.s33-cinema-center__eyebrow { color: #92dcd5; font-size: 11px; margin-bottom: 6px; }
.s33-cinema-center h4 { color: #fff0ce; font-size: 22px; line-height: 1.35; margin: 0; font-weight: 800; }
.s33-cinema-center__ornament { width: 58px; height: 1px; background: #cfac71; margin-top: 12px; opacity: .6; }
.s33-cinema-center__winner { width: 46%; height: 46%; object-fit: contain; margin: 8px; animation: s33-cinema-award .5s cubic-bezier(.16, 1, .3, 1) both; filter: drop-shadow(0 0 16px #ffd37366); }
.s33-cinema-center__grade { font-size: 15px; font-weight: 800; color: var(--gold); }
.s33-cinema-center__name { color: #ffedc6; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.s33-cinema-center__quantity { color: #bcb4a7; font-size: 13px; margin-top: 5px; }
.s33-cinema__status { padding: 16px 20px 12px; min-height: 70px; text-align: center; }
.s33-cinema__status strong { color: #ffe5b2; display: block; font-size: 16px; font-weight: 800; }
.s33-cinema__status span { color: var(--muted); display: block; font-size: 12px; line-height: 1.5; margin-top: 5px; overflow-wrap: anywhere; }
.s33-cinema__footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 26px 16px; border-top: 1px solid #ffffff10; }
.s33-cinema__footer>span { font-size: 11px; color: #9a96a5; line-height: 1.5; }
.s33-cinema__skip, .s33-cinema__all { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; border: 0; background: transparent; color: #c8c4d2; font-size: 12px; white-space: nowrap; }
.s33-cinema__skip svg { width: 16px; height: 16px; }
.s33-cinema-reveal { display: flex; flex-direction: column; max-height: calc(100svh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); }
.s33-cinema-reveal>.s33-cinema__header, .s33-cinema-reveal>.s33-cinema__footer, .s33-cinema-reveal__progress { flex-shrink: 0; }
.s33-cinema-reveal__header { border-bottom: 1px solid #ffffff14; }
.s33-cinema-reveal__sub { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.s33-cinema-reveal__progress { display: flex; justify-content: space-between; align-items: center; padding: 10px 26px; color: #aaa5b4; font-size: 12px; font-variant-numeric: tabular-nums; }
.s33-cinema-reveal__progress strong { color: #84d8d0; }
.s33-cinema-rewards { display: grid; flex: 0 1 auto; min-height: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: max-content; align-content: start; gap: 9px; padding: 4px 26px 24px; max-height: min(480px, calc(100svh - 280px)); overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.s33-cinema-rewards[data-count="1"] { grid-template-columns: minmax(0, 200px); justify-content: center; padding-top: 22px; padding-bottom: 30px; }
.s33-cinema-rewards[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 170px)); justify-content: center; }
.s33-cinema-reward { --prize: #bac6dc; position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 12px 8px; border: 1px solid #ffffff12; border-radius: 6px; background: #23202b; opacity: 0; transform: translateY(10px) scale(.88); overflow: hidden; }
.s33-cinema-reward.is-visible { animation: s33-cinema-award .42s cubic-bezier(.16, 1, .3, 1) both; }
.s33-cinema-reward:after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 25%, #fff4 50%, transparent 75%); transform: translateX(-130%); pointer-events: none; }
.s33-cinema-reward.is-visible:after { animation: s33-cinema-sheen .6s .06s ease-out both; }
.s33-cinema-reward.is-core { border-color: #c5a46866; background: #322923; }
.s33-cinema-reward.is-rare { border-color: #ab85be44; }
.s33-cinema-reward img { display: block; flex-shrink: 0; width: 72px; height: 72px; object-fit: contain; margin: 6px 0; filter: drop-shadow(0 4px 7px #0008); }
.s33-cinema-reward__grade { color: var(--prize); font-size: 11px; line-height: 1.3; }
.s33-cinema-reward__name { font-size: 12px; line-height: 1.45; font-weight: 700; color: #f9f3e9; text-align: center; overflow-wrap: anywhere; max-width: 100%; }
.s33-cinema-reward__quantity { font-size: 12px; line-height: 1.5; color: #d6c4a3; margin-top: 4px; }
.s33-cinema-rewards[data-count="1"] img { width: 116px; height: 116px; }
.s33-cinema-rewards[data-count="1"] .s33-cinema-reward__name { font-size: 16px; }
.s33-cinema__done { border: 1px solid #f0d191; background: #edce91; color: #2c2319; border-radius: 6px; min-height: 44px; min-width: 104px; padding: 10px 20px; font-size: 13px; font-weight: 800; }
.s33-cinema__done:hover { background: #ffe4ae; }
.s33-cinema[data-phase="failed"] .s33-cinema-cell, .s33-cinema[data-phase="uncertain"] .s33-cinema-cell { opacity: .45; }
.s33-cinema[data-phase="failed"] .s33-cinema-cell:after, .s33-cinema[data-phase="uncertain"] .s33-cinema-cell:after { opacity: 0; }
.s33-cinema[data-phase="landed"] .s33-cinema-center { animation: s33-cinema-in .25s ease-out; }
.is-lottery-cinema .s33-slot-machine { display: none; }
.is-lottery-cinema .s33-lottery-stage { display: block; }
.is-lottery-cinema .s33-lottery-stage__copy { padding: 0 0 18px; }
.is-lottery-cinema .s33-lottery-stage__copy>span { display: none; }
.is-lottery-cinema .s33-lottery-stage__copy h3 { font-size: 24px; line-height: 1.4; letter-spacing: 0; }
.is-lottery-cinema .s33-lottery-panel { background: transparent; border: 0; box-shadow: none; padding: 0; }
.is-lottery-cinema .s33-lottery-offers { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.is-lottery-cinema .s33-lottery-offers article { border-radius: 6px; min-width: 0; }
.is-lottery-cinema .s33-lottery-offers button { min-height: 44px; white-space: normal; }
.is-lottery-cinema .s33-lottery-offers strong { font-size: 16px; overflow-wrap: anywhere; }
.is-lottery-cinema [data-s33-lottery-result] { display: none; }
@keyframes s33-cinema-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes s33-cinema-arrive { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes s33-cinema-award { from { opacity: 0; transform: translateY(12px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes s33-cinema-sheen { to { transform: translateX(130%); } }
@keyframes s33-cinema-win { 40% { transform: scale(1.09); } to { transform: scale(1); } }
@keyframes s33-cinema-prize-flash { 25% { background: #fff7cf7a; box-shadow: 0 0 35px #f6ce75; } to { background: #ffe3a013; } }
@media (max-width: 600px) {
    .s33-cinema { padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); }
    .s33-cinema__dialog { width: min(430px, 100%); }
    .s33-cinema__header { padding: 16px 16px 10px; gap: 10px; }
    .s33-cinema__header h3 { font-size: 21px; }
    .s33-cinema__meta { margin-bottom: 12px; }
    .s33-cinema-board { --gap: 5px; width: min(calc(100% - 24px), calc((100svh - 250px) * .8333)); min-width: 235px; aspect-ratio: 5 / 6; }
    .s33-cinema-cell__grade { font-size: 8px; top: 3px; left: 3px; }
    .s33-cinema-cell__quantity { font-size: 9px; bottom: 3px; right: 3px; }
    .s33-cinema-center { padding: 6px; }
    .s33-cinema-center h4 { font-size: 18px; }
    .s33-cinema-center__art { height: 45%; }
    .s33-cinema-center__name { font-size: 14px; }
    .s33-cinema-center__eyebrow { font-size: 10px; }
    .s33-cinema__status { padding: 13px 14px 8px; min-height: 62px; }
    .s33-cinema__footer { padding: 8px 16px 12px; }
    .s33-cinema-reveal__progress { padding: 6px 16px; }
    .s33-cinema-rewards { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 4px 14px 20px; gap: 6px; max-height: calc(100svh - 250px); }
    .s33-cinema-reward { padding: 10px 5px; }
    .s33-cinema-reward img { width: 60px; height: 60px; }
    .s33-cinema-reward__name { font-size: 11px; }
    .is-lottery-cinema .s33-lottery-offers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .is-lottery-cinema .s33-lottery-offers article:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .is-lottery-cinema .s33-lottery-stage__copy h3 { font-size: 22px; }
}
@media (max-height: 520px) and (orientation: landscape) {
    .s33-cinema__dialog { width: min(760px, 100%); }
    .s33-cinema-draw { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(170px, .8fr); align-items: center; }
    .s33-cinema-draw .s33-cinema__header { grid-column: 2; grid-row: 1; padding: 18px 18px 2px; }
    .s33-cinema-draw .s33-cinema__meta { grid-column: 2; grid-row: 2; padding: 0 18px; justify-content: flex-start; margin: 0; }
    .s33-cinema-board { grid-column: 1; grid-row: 1 / span 4; width: min(calc(100% - 28px), calc((100svh - 50px) * 1.2)); min-width: 210px; margin: 16px auto; }
    .s33-cinema-draw .s33-cinema__status { grid-column: 2; grid-row: 3; padding: 14px 18px; text-align: left; }
    .s33-cinema-draw .s33-cinema__footer { grid-column: 2; grid-row: 4; padding: 8px 18px; }
    .s33-cinema-rewards { max-height: calc(100svh - 205px); }
}
@media (prefers-reduced-motion:reduce) {
    .s33-cinema, .s33-cinema *, .s33-cinema *:after { animation: none !important; transition: none !important; }
    .s33-cinema-reward.is-visible { opacity: 1; transform: none; }
}
