/* หน้าโหวตผู้ถือป้าย — แกลเลอรีแบบ iris */
.vote-hero { position: relative; overflow: hidden; color: #fff; text-align: center; padding: 8.5rem 0 4rem; background: radial-gradient(900px 420px at 50% 0, #1b3a8a 0, #0a1f4d 55%, #011A41 100%); }
.vote-hero .vote-particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vote-hero h1 { font-weight: 800; font-size: clamp(1.9rem, 5vw, 3rem); margin: .6rem 0 .4rem; text-shadow: 0 0 28px rgba(255, 61, 154, .55); }
.vote-hero p { color: #c9d6ff; max-width: 620px; margin: 0 auto; }
.vote-body { background: #f3f6ff; padding: 2rem 0 4rem; min-height: 50vh; }
.vote-tabs { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-bottom: 1rem; }
.vote-tabs a { padding: .5rem 1.2rem; border-radius: 999px; background: #fff; color: #0a1f4d; font-weight: 700; border: 1px solid #dbe2f5; text-decoration: none; transition: .2s; }
.vote-tabs a:hover { border-color: #ff3d9a; }
.vote-tabs a.on { background: linear-gradient(135deg, #ff3d9a, #E93C05); color: #fff; border-color: transparent; box-shadow: 0 0 18px rgba(255, 61, 154, .5); }
.vote-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.1rem; align-items: center; justify-content: center; margin-bottom: 1.2rem; color: #4a5a7a; font-size: .92rem; }
.vote-state { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; border-radius: 999px; padding: .2rem .8rem; background: #fff; }
.vote-state .dot { width: 9px; height: 9px; border-radius: 50%; background: #999; }
.vote-state.is-open { color: #11693a; } .vote-state.is-open .dot { background: #1fc26b; box-shadow: 0 0 10px #1fc26b; }
.vote-state.is-closed { color: #b3261e; } .vote-state.is-closed .dot { background: #e5484d; }

.iris { position: relative; display: flex; gap: .6rem; height: clamp(460px, 74vh, 660px); padding: .6rem; border-radius: 28px; background: linear-gradient(160deg, #0a1f4d, #011A41); box-shadow: 0 30px 60px -30px rgba(1, 26, 65, .8); }
.iris-p { position: relative; flex: 1 1 0; min-width: 0; border-radius: 20px; overflow: hidden; cursor: pointer; background: #12285e; outline: none; transition: flex-grow .65s cubic-bezier(.2, .8, .2, 1), box-shadow .4s; }
.iris-p.on { flex-grow: 5; box-shadow: 0 0 0 2px #ff3d9a, 0 0 32px rgba(255, 61, 154, .55); }
.iris-p:focus-visible { box-shadow: 0 0 0 3px #fff; }
.iris-p.picked { box-shadow: 0 0 0 3px #ffd34d, 0 0 36px rgba(255, 211, 77, .6); }
.iris-img { position: absolute; inset: 0; background: #1a3374 50% 12% / cover no-repeat; display: grid; place-items: center; color: rgba(255, 255, 255, .35); font-size: 4rem; clip-path: circle(30% at 50% 26%); transform: scale(1.08); transition: clip-path .75s cubic-bezier(.2, .8, .2, 1), transform .9s cubic-bezier(.2, .8, .2, 1), filter .5s; filter: saturate(.7) brightness(.8); }
.iris-p.on .iris-img { clip-path: circle(85% at 50% 50%); transform: scale(1); filter: none; }
.iris-p::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgba(1, 10, 30, .92)); opacity: 0; transition: opacity .5s; pointer-events: none; }
.iris-p.on::after { opacity: 1; }
.iris-no { position: absolute; top: .7rem; left: .7rem; z-index: 2; min-width: 28px; height: 28px; padding: 0 .4rem; border-radius: 999px; display: grid; place-items: center; font-weight: 800; font-size: .85rem; color: #fff; background: rgba(255, 61, 154, .9); box-shadow: 0 0 12px rgba(255, 61, 154, .7); }
.iris-check { position: absolute; top: .7rem; right: .7rem; z-index: 2; background: #1fc26b; color: #fff; border-radius: 999px; padding: .15rem .7rem; font-size: .8rem; font-weight: 700; }
.iris-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 1rem 1.1rem 1.1rem; color: #fff; display: grid; gap: .15rem; opacity: 0; transform: translateY(14px); transition: opacity .45s .15s, transform .45s .15s; }
.iris-p.on .iris-cap { opacity: 1; transform: none; }
.iris-cap b { font-size: 1.35rem; font-weight: 800; }
.iris-cap span { color: #ffd0e6; font-weight: 600; }
.iris-cap small { color: #c9d6ff; }
.iris-cap em { font-style: normal; color: #e6ecff; font-size: .9rem; margin-top: .2rem; }
.iris-res { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .22); overflow: hidden; margin-top: .4rem; }
.iris-res i { display: block; height: 100%; background: linear-gradient(90deg, #355EFC, #ff3d9a); }
.iris-glow { position: absolute; left: 0; bottom: -2px; width: 220px; height: 70px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 61, 154, .75), transparent); filter: blur(10px); transform: translateX(calc(var(--gx, 50%) - 110px)); transition: transform .65s cubic-bezier(.2, .8, .2, 1); pointer-events: none; }
.iris-bar { height: 5px; margin: 14px auto 0; width: min(92%, 760px); border-radius: 999px; background: linear-gradient(90deg, transparent, #ff3d9a, #ff9ccc, #ff3d9a, transparent); box-shadow: 0 0 22px 4px rgba(255, 61, 154, .6); animation: irisPulse 3s ease-in-out infinite; }
@keyframes irisPulse { 50% { opacity: .55; } }

.vote-actions { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; align-items: center; margin-top: 1.4rem; }
.vote-pick { font-weight: 700; color: #0a1f4d; }
.vote-btn { background: linear-gradient(135deg, #ff3d9a, #E93C05); color: #fff; font-weight: 800; border: 0; border-radius: 999px; padding: .7rem 2rem; box-shadow: 0 10px 26px -8px rgba(255, 61, 154, .8); transition: transform .2s, box-shadow .2s; }
.vote-btn:hover:not(:disabled) { transform: translateY(-2px); color: #fff; box-shadow: 0 16px 34px -8px rgba(255, 61, 154, .9); }
.vote-btn:disabled { opacity: .5; box-shadow: none; }
.vote-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); opacity: 0; z-index: 2000; background: #0a1f4d; color: #fff; padding: .8rem 1.4rem; border-radius: 14px; border-left: 5px solid #1fc26b; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, .6); transition: .35s; pointer-events: none; max-width: 90vw; }
.vote-toast.bad { border-left-color: #e5484d; }
.vote-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 767px) {
    .vote-hero { padding-top: 7rem; }
    /* มือถือ: การ์ดแนวตั้ง 2 คอลัมน์ เห็นหน้าผู้เข้าชิงครบ */
    .iris { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; height: auto; min-height: 0; padding: .6rem; border-radius: 22px; }
    .iris-p { flex: none; aspect-ratio: 3 / 4; border-radius: 16px; transition: box-shadow .3s; }
    .iris-p:last-of-type:nth-of-type(odd) { grid-column: 1 / -1; aspect-ratio: 4 / 3.4; }
    .iris-img, .iris-p.on .iris-img { clip-path: none; transform: none; filter: none; background-position: 50% 14%; }
    .iris-p::after { opacity: 1; }
    .iris-cap, .iris-p.on .iris-cap { opacity: 1; transform: none; padding: .7rem .8rem .8rem; }
    .iris-cap b { font-size: 1.05rem; }
    .iris-cap span, .iris-cap small, .iris-cap em { font-size: .78rem; }
    .iris-cap em { display: none; }
    .iris-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .iris-p, .iris-img, .iris-cap, .iris-glow { transition: none; }
    .iris-bar { animation: none; }
}

/* ช่องกรอกรหัสโหวตนักเรียน */
.vote-code { display: inline-flex; align-items: center; gap: .55rem; padding: .35rem .5rem .35rem 1rem; border-radius: 999px; background: #fff; border: 2px solid #ffd0e6; box-shadow: 0 10px 24px -14px rgba(255, 61, 154, .7); }
.vote-code i { color: #ff3d9a; }
.vote-code input { border: 0; outline: 0; background: transparent; font-weight: 700; letter-spacing: .08em; min-width: 11rem; padding: .35rem .2rem; text-transform: uppercase; }
.vote-code:focus-within { border-color: #ff3d9a; box-shadow: 0 0 0 4px rgba(255, 61, 154, .18); }

.vote-id { width: 100%; max-width: 30rem; margin: .4rem auto 0; padding: .9rem 1rem; border-radius: 1.2rem; background: #fff; border: 2px solid #ffd0e6; box-shadow: 0 10px 24px -14px rgba(255, 61, 154, .7); display: grid; gap: .55rem; }
.vote-id-t { font-weight: 800; color: #c2185b; font-size: .92rem; }
.vote-id-t i { margin-right: .35rem; }
.vote-id input, .vote-id select { width: 100%; border: 1.5px solid #f3c1d9; border-radius: .7rem; padding: .55rem .7rem; font-weight: 700; background: #fff; outline: 0; }
.vote-id input { letter-spacing: .25em; text-align: center; font-size: 1.1rem; }
.vote-id input:focus, .vote-id select:focus { border-color: #ff3d9a; box-shadow: 0 0 0 4px rgba(255, 61, 154, .15); }
.vote-dob { display: grid; grid-template-columns: 1fr 1.3fr 1.3fr; gap: .45rem; }
