/* Involved Spin Wheel — full-screen display */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; height: 100%; background: #FFFFFF; }

.isw-body {
	font-family: "ISW Lato", Lato, "Helvetica Neue", Arial, sans-serif;
	color: #333333;
	overflow: hidden;
	-webkit-font-smoothing: antialiased;
}

.isw-root {
	--ih-w: min(70vh, 44vw);
	position: relative;
	width: 100%;
	height: 100vh;
	height: 100dvh;
	min-height: 320px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #FFFFFF;
}
.isw-root.isw-idle, .isw-root.isw-idle * { cursor: none !important; }

/* ---------- Top bar ---------- */
.isw-top {
	position: absolute; left: 0; right: 0; top: 0; z-index: 2;
	display: flex; align-items: center; justify-content: space-between; gap: 2vmin;
	padding: 3.5vmin 6vmin 0;
}
.isw-logo img { display: block; height: clamp(32px, 6vmin, 72px); width: auto; }
.isw-logo-text { font-weight: 900; font-size: clamp(16px, 2.6vmin, 28px); color: #0D478A; }
.isw-top-right { display: flex; align-items: center; gap: 2vmin; }
.isw-live {
	display: flex; align-items: center; gap: 1.2vmin;
	font-size: clamp(12px, 1.9vmin, 20px); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #0D478A;
}
.isw-live-dot { width: 1.1vmin; height: 1.1vmin; min-width: 8px; min-height: 8px; border-radius: 50%; background: #C69A40; }
.isw-offline {
	font-size: clamp(11px, 1.6vmin, 17px); font-weight: 700; color: #8A4B00;
	background: #FFF1DC; border: 1px solid #F3C98B; border-radius: 999px; padding: .6vmin 1.6vmin;
}
.isw-offline[hidden] { display: none; }

/* ---------- Main layout ---------- */
.isw-main {
	flex: 1; min-height: 0;
	display: flex; align-items: center; justify-content: center; gap: 7vmin;
	padding: 11vmin 5vmin;
}

.isw-wheel { position: relative; flex: none; width: var(--ih-w); aspect-ratio: 1 / 1; container-type: inline-size; }
.isw-wheel-base, .isw-lights, .isw-rotor { position: absolute; inset: 0; width: 100%; height: 100%; }
.isw-wheel-base { filter: drop-shadow(0 3cqw 4cqw rgba(10, 47, 92, .28)); }
.isw-rotor { will-change: transform; }
.isw-segments { position: absolute; inset: 0; width: 100%; height: 100%; }
.isw-arm { position: absolute; inset: 0; }
.isw-label {
	position: absolute; left: 39%; top: 14.5%; width: 22%;
	text-align: center; white-space: pre-line;
	font-weight: 900; font-size: 3cqw; line-height: 1.1; letter-spacing: .02em; text-transform: uppercase;
}
.isw-lights { pointer-events: none; }
.isw-hub-1, .isw-hub-2 { font-family: "ISW Lato", Lato, sans-serif; font-weight: 900; font-size: 34px; }
.isw-hub-1 { fill: #0D478A; }
.isw-hub-2 { fill: #A87D27; }

.isw-pointer {
	position: absolute; left: 45.4%; top: -5.2%; width: 9.2%; height: 11%;
	overflow: visible; z-index: 1;
	transform-origin: 50% 30%;
	filter: drop-shadow(0 .6cqw .9cqw rgba(10, 47, 92, .35));
}
.isw-pointer.isw-flick { animation: iswFlick .12s ease-out; }
@keyframes iswFlick { 0% { transform: rotate(0); } 40% { transform: rotate(-14deg); } 100% { transform: rotate(0); } }

/* Bulbs */
@keyframes iswBulbOn { 0%, 100% { opacity: 1; } 50% { opacity: .06; } }
.isw-b0 { animation: iswBulbOn 1.5s ease-in-out infinite; }
.isw-b1 { animation: iswBulbOn 1.5s ease-in-out infinite .5s; }
.isw-b2 { animation: iswBulbOn 1.5s ease-in-out infinite 1s; }
.isw-fast .isw-b0 { animation: iswBulbOn .36s linear infinite; }
.isw-fast .isw-b1 { animation: iswBulbOn .36s linear infinite .12s; }
.isw-fast .isw-b2 { animation: iswBulbOn .36s linear infinite .24s; }

/* ---------- Text column ---------- */
.isw-copy {
	flex: none; width: calc(var(--ih-w) * .92); min-width: 0;
	display: flex; flex-direction: column; justify-content: center;
	gap: calc(var(--ih-w) * .055);
}
.isw-copy-top { display: flex; flex-direction: column; gap: calc(var(--ih-w) * .022); }
.isw-eyebrow { font-size: max(11px, calc(var(--ih-w) * .027)); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #A87D27; }
.isw-title { margin: 0; font-weight: 900; font-size: calc(var(--ih-w) * .14); line-height: .95; letter-spacing: -.02em; color: #0D478A; }
.isw-intro { margin: 0; font-size: max(13px, calc(var(--ih-w) * .034)); line-height: 1.45; color: #39434E; }
.isw-btnrow { display: flex; align-items: center; }

@keyframes iswPulse {
	0%, 100% { box-shadow: 0 18px 36px -14px rgba(13, 71, 138, .45), 0 0 0 0 rgba(198, 154, 64, .55); }
	50% { box-shadow: 0 18px 36px -14px rgba(13, 71, 138, .45), 0 0 0 2.2vmin rgba(198, 154, 64, 0); }
}
.isw-spin, .isw-spinning {
	height: max(48px, calc(var(--ih-w) * .115));
	padding: 0 calc(var(--ih-w) * .07);
	border-radius: 999px;
	font-family: inherit; font-weight: 900; letter-spacing: .06em; text-transform: uppercase;
	display: inline-flex; align-items: center;
}
.isw-spin {
	border: none; background: #B08328; color: #FFFFFF; cursor: pointer;
	font-size: max(16px, calc(var(--ih-w) * .042));
	animation: iswPulse 2.4s ease-in-out infinite;
	transition: transform .15s ease, background .15s ease;
}
.isw-spin:hover { transform: translateY(-2px); background: #A07623; }
.isw-spin:focus-visible, .isw-next:focus-visible, .isw-corner-btn:focus-visible, .isw-editor-btn:focus-visible { outline: 4px solid #008FC6; outline-offset: 4px; }
.isw-spinning { border: 3px solid #C69A40; color: #A87D27; font-size: max(15px, calc(var(--ih-w) * .04)); }
.isw-spin[hidden], .isw-spinning[hidden] { display: none; }

.isw-stock { display: flex; flex-direction: column; gap: calc(var(--ih-w) * .018); }
.isw-stock-head { font-size: calc(var(--ih-w) * .022); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #6F7C8A; }
.isw-stock-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--ih-w) * .014); }
.isw-stock-item {
	display: flex; align-items: center; gap: calc(var(--ih-w) * .014);
	padding: calc(var(--ih-w) * .015) calc(var(--ih-w) * .022);
	border-radius: calc(var(--ih-w) * .016);
	background: #FBF7EE; border: 1px solid #F0E3C2;
	font-size: calc(var(--ih-w) * .025); font-weight: 700; color: #0D478A;
}
.isw-stock-dot { width: calc(var(--ih-w) * .016); height: calc(var(--ih-w) * .016); border-radius: 50%; flex: none; box-shadow: 0 0 0 2px #FFFFFF, 0 0 0 3px #BEC6CE; }
.isw-stock-name { flex: 1; min-width: 0; }
.isw-stock-left { font-size: calc(var(--ih-w) * .021); color: #8A6620; white-space: nowrap; }
.isw-stock-left.isw-gone { color: #6F7C8A; }

/* ---------- Footer ---------- */
.isw-foot {
	flex: none; min-height: clamp(40px, 6vmin, 64px);
	background: #0A2F5C; color: #FFFFFF;
	display: flex; align-items: center; justify-content: space-between; gap: 2vmin;
	padding: 1vmin 6vmin;
	font-size: clamp(11px, 1.7vmin, 18px);
}
.isw-terms { color: #E3E9F0; }
.isw-phone { font-weight: 700; letter-spacing: .08em; color: #F0D89E; white-space: nowrap; margin-left: auto; }

/* ---------- Corner buttons (fade away when the mouse isn't moving) ---------- */
.isw-corner {
	position: absolute; right: 2vmin; bottom: calc(clamp(40px, 6vmin, 64px) + 2vmin); z-index: 3;
	display: flex; gap: 8px;
	transition: opacity .3s;
}
.isw-corner-btn {
	border: 1px solid #BEC6CE; background: rgba(255, 255, 255, .92); color: #39434E;
	border-radius: 999px; padding: 8px 14px; font: 700 13px/1 "ISW Lato", Lato, sans-serif; cursor: pointer;
	opacity: .75; transition: opacity .2s, border-color .2s;
}
.isw-corner-btn:hover { opacity: 1; border-color: #0D478A; }
.isw-root.isw-idle .isw-corner { opacity: 0; pointer-events: none; }

/* ---------- Win screen ---------- */
.isw-win {
	position: absolute; inset: 0; z-index: 5;
	background: rgba(255, 255, 255, .75);
	-webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
	display: flex; align-items: center; justify-content: center; padding: 4vmin;
	overflow: hidden;
}
.isw-win[hidden] { display: none; }
@keyframes iswPop { 0% { transform: translateY(24px) scale(.96); opacity: 0; } 100% { transform: none; opacity: 1; } }
.isw-card {
	width: min(960px, 100%);
	padding: 6vmin 7vmin 5.5vmin;
	border-radius: 28px; background: #FFFFFF; border-top: 10px solid #C69A40;
	box-shadow: 0 50px 120px -30px rgba(10, 47, 92, .45);
	color: #0D478A; text-align: center;
	display: flex; flex-direction: column; align-items: center; gap: 2vmin;
	animation: iswPop .45s cubic-bezier(.2, .9, .3, 1) both;
}
.isw-card-eyebrow { font-size: clamp(12px, 2vmin, 22px); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #A87D27; }
.isw-card-title { font-weight: 900; font-size: clamp(36px, 9.6vmin, 104px); line-height: 1; letter-spacing: -.02em; }
.isw-card-msg { margin: 0; font-size: clamp(15px, 2.6vmin, 28px); line-height: 1.45; color: #39434E; max-width: 740px; }
.isw-code {
	display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.8vmin;
	margin-top: .8vmin; padding: 1.5vmin 1.5vmin 1.5vmin 2.8vmin;
	border-radius: 18px; background: #FBF7EE; border: 1px solid #F0E3C2;
}
.isw-code[hidden] { display: none; }
.isw-code-label { font-size: clamp(11px, 1.8vmin, 19px); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #6F5F33; }
.isw-code-value {
	padding: 1.1vmin 2.6vmin; border-radius: 12px; background: #FFFFFF; border: 2px dashed #C69A40;
	font-weight: 900; font-size: clamp(24px, 4.4vmin, 48px); letter-spacing: .08em; color: #0D478A;
}
.isw-next {
	margin-top: 1.5vmin; height: clamp(52px, 7.8vmin, 84px); padding: 0 clamp(28px, 5.2vmin, 56px);
	border: none; border-radius: 999px; background: #0D478A; color: #FFFFFF; cursor: pointer;
	font-family: inherit; font-weight: 900; font-size: clamp(16px, 2.6vmin, 28px); letter-spacing: .06em; text-transform: uppercase;
}

/* Confetti cannons */
.isw-confetti { position: absolute; inset: 0; pointer-events: none; }
.isw-shot { position: absolute; bottom: -3vh; width: 0; height: 0; animation-fill-mode: both; animation-timing-function: linear; }
.isw-shot-l { left: 4%; }
.isw-shot-r { left: 96%; }
@keyframes iswTwirl { 0% { transform: rotate(0deg) rotateY(0deg); } 100% { transform: rotate(540deg) rotateY(1080deg); } }
.isw-bit { position: absolute; left: -.6vmin; top: -1vmin; width: 1.2vmin; height: 2vmin; min-width: 7px; min-height: 11px; border-radius: 2px; animation: iswTwirl linear infinite; }
.isw-bit-dot { width: 1.3vmin; height: 1.3vmin; min-height: 8px; border-radius: 50%; }
.isw-bit-strip { width: .7vmin; height: 2.8vmin; min-width: 4px; min-height: 16px; }
@keyframes iswMuzzle { 0% { transform: scale(.2); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
.isw-muzzle {
	position: absolute; bottom: -14vmin; width: 28vmin; height: 28vmin; border-radius: 50%;
	background: radial-gradient(circle, rgba(240, 216, 158, .9), rgba(240, 216, 158, 0) 65%);
	animation: iswMuzzle .6s ease-out both;
}

/* Arc paths for the cannons: up and out, then gravity. */
@keyframes iswL1 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 32% { transform: translate(16vw, -62vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(23vw, 10vh); opacity: .6; } }
@keyframes iswL2 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 34% { transform: translate(24vw, -80vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(34vw, 10vh); opacity: .6; } }
@keyframes iswL3 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 30% { transform: translate(33vw, -70vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(45vw, 10vh); opacity: .6; } }
@keyframes iswL4 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 36% { transform: translate(40vw, -86vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(54vw, 10vh); opacity: .6; } }
@keyframes iswL5 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 28% { transform: translate(27vw, -56vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(38vw, 10vh); opacity: .6; } }
@keyframes iswL6 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 33% { transform: translate(47vw, -66vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(62vw, 10vh); opacity: .6; } }
@keyframes iswR1 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 32% { transform: translate(-16vw, -62vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(-23vw, 10vh); opacity: .6; } }
@keyframes iswR2 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 34% { transform: translate(-24vw, -80vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(-34vw, 10vh); opacity: .6; } }
@keyframes iswR3 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 30% { transform: translate(-33vw, -70vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(-45vw, 10vh); opacity: .6; } }
@keyframes iswR4 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 36% { transform: translate(-40vw, -86vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(-54vw, 10vh); opacity: .6; } }
@keyframes iswR5 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 28% { transform: translate(-27vw, -56vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(-38vw, 10vh); opacity: .6; } }
@keyframes iswR6 { 0% { transform: translate(0, 0); animation-timing-function: cubic-bezier(.1, .7, .3, 1); } 33% { transform: translate(-47vw, -66vh); animation-timing-function: cubic-bezier(.5, 0, .8, .6); } 100% { transform: translate(-62vw, 10vh); opacity: .6; } }

/* ---------- Locked (not logged in) ---------- */
.isw-locked { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; color: #0D478A; }
.isw-locked h1 { font-weight: 900; font-size: clamp(28px, 5vw, 48px); margin: 0 0 12px; }
.isw-locked p { font-size: 18px; color: #39434E; }
.isw-locked-btn { display: inline-block; margin-top: 8px; padding: 14px 32px; border-radius: 999px; background: #B08328; color: #fff; text-decoration: none; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Screen shapes ---------- */
@media (max-height: 820px) { .isw-stock { display: none; } }
@media (max-aspect-ratio: 4/3) and (orientation: landscape) { .isw-stock { display: none; } }
@media (orientation: portrait) {
	.isw-root { --ih-w: min(84vw, 50vh); }
	.isw-main { flex-direction: column; }
	.isw-copy { width: 86vw; align-items: center; text-align: center; }
	.isw-btnrow { justify-content: center; }
	.isw-stock, .isw-terms { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.isw-b0, .isw-b1, .isw-b2, .isw-spin { animation: none; }
}

/* ---------- Prize draw: names on the wheel ---------- */
/* Each name runs along its segment from the hub out to the rim, like a classic name wheel. */
.isw-name {
	position: absolute; left: 50%; top: 23%;
	width: 31%;
	transform: translate(-50%, -50%) rotate(-90deg);
	text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	font-weight: 900; line-height: 1.15; letter-spacing: .01em;
	padding-right: 1.2%;
}
.isw-name-empty { text-align: center; padding: 0; }
.isw-name-2 { white-space: normal; line-height: 1.05; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.isw-wheel-empty .isw-name { transform: translate(-50%, -50%); top: 26%; width: 50%; white-space: normal; text-align: center; font-size: 3.2cqw; }

.isw-card-title.isw-long { font-size: clamp(30px, 7vmin, 80px); }
.isw-card-title.isw-xlong { font-size: clamp(26px, 5.4vmin, 60px); }
.isw-mode-draw .isw-card-title { overflow-wrap: anywhere; }

/* ---------- Name editor ---------- */
.isw-editor {
	position: absolute; inset: 0; z-index: 6;
	background: rgba(10, 47, 92, .35);
	-webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	display: flex; align-items: center; justify-content: center; padding: 3vmin;
}
.isw-editor[hidden] { display: none; }
.isw-editor-card {
	width: min(640px, 100%); max-height: 100%; overflow: auto;
	background: #FFFFFF; border-radius: 20px; border-top: 8px solid #C69A40;
	box-shadow: 0 40px 100px -30px rgba(10, 47, 92, .5);
	padding: 28px 30px 24px; color: #0D478A;
	animation: iswPop .3s cubic-bezier(.2, .9, .3, 1) both;
}
.isw-editor-card h2 { margin: 0 0 6px; font-size: 28px; font-weight: 900; }
.isw-editor-help { margin: 0 0 14px; color: #39434E; font-size: 16px; line-height: 1.45; }
.isw-editor textarea {
	display: block; width: 100%; min-height: 260px; resize: vertical;
	border: 2px solid #D5DCE4; border-radius: 12px; padding: 12px 14px;
	font: 400 17px/1.6 "ISW Lato", Lato, sans-serif; color: #1E2A38;
}
.isw-editor textarea:focus { outline: none; border-color: #008FC6; }
.isw-editor-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 15px; color: #39434E; }
.isw-editor-count.isw-bad { color: #A12C1B; font-weight: 700; }
.isw-editor-check { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.isw-editor-check input { width: 18px; height: 18px; accent-color: #0D478A; }
.isw-editor-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #FFF1DC; color: #7A4300; font-size: 14px; }
.isw-editor-note[hidden] { display: none; }
.isw-editor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.isw-editor-spacer { flex: 1; }
.isw-editor-btn {
	min-height: 48px; padding: 0 24px; border-radius: 999px; border: none; cursor: pointer;
	background: #0D478A; color: #FFFFFF; font: 900 16px/1 "ISW Lato", Lato, sans-serif; letter-spacing: .04em; text-transform: uppercase;
}
.isw-editor-btn[hidden] { display: none; }
.isw-editor-btn:disabled { opacity: .5; cursor: default; }
.isw-editor-ghost { background: #FFFFFF; color: #0D478A; border: 2px solid #D5DCE4; }
.isw-editor-ghost:hover { border-color: #0D478A; }
