/* Priori Incantatem: two wands joined by a golden beam that shows every voice. */

.pr-stage {
    position: relative;
    width: min(100%, 1100px);
    height: clamp(96px, 17vw, 190px);
    margin: 6px auto 4px;
}

.pr-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.pr-stage .wand {
    position: absolute;
    top: 50%;
    width: clamp(110px, 31%, 360px);
    height: auto;
    transform: translateY(-50%);
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.6));
    pointer-events: none;
    user-select: none;
}

.pr-stage .wand.left { left: 0; }

.pr-stage .wand.right { right: 0; transform: translateY(-50%) scaleX(-1); }

.beam-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    text-align: center;
    font-family: var(--caps);
    font-size: clamp(12px, 1.2vw, 16px);
    letter-spacing: 0.06em;
    color: var(--gold-1);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
    min-height: 1.2em;
}

.pr-code { font-size: 22px; letter-spacing: 0.2em; padding: 6px 16px; cursor: pointer; border: 0; }

.pr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }

.pr-brand { font-family: var(--title); font-weight: 700; font-size: clamp(22px, 2.6vw, 34px); }

.pr-head-tools { gap: 8px; }

.pr-status { text-align: center; font-size: 19px; color: var(--gold-1); margin: 4px 0 14px; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9); }

.pr-sides { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 14px; }

.pr-side { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }

.pr-side .section { margin: 0; justify-content: center; }

.side-caster { border-color: rgba(255, 210, 122, 0.7); box-shadow: 0 0 28px rgba(255, 196, 90, 0.18); }

.pr-list { display: flex; flex-direction: column; gap: 8px; min-height: 44px; }

.pr-player {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(233, 199, 102, 0.22);
}

.pr-player img { width: 26px; height: 32px; object-fit: contain; flex: none; }

.pr-player .pr-name { flex: 1 1 auto; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pr-player .pr-score { color: var(--gold-2); font-family: var(--caps); font-size: 14px; }

.pr-player .pr-tick { color: var(--ink-dim); font-weight: 700; }

.pr-player.ready { border-color: rgba(126, 224, 143, 0.75); box-shadow: 0 0 14px rgba(126, 224, 143, 0.25); }

.pr-player.ready .pr-tick { color: #7ee08f; }

.pr-player.me { background: rgba(233, 199, 102, 0.14); }

.pr-player.away { opacity: 0.45; }

.pr-ready { display: block; margin: 16px auto; min-width: min(100%, 320px); }

.pr-lower { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.pr-lower .section { margin: 0; }

.pr-cup { display: flex; flex-direction: column; gap: 6px; }

.pr-cup-row { display: flex; align-items: center; gap: 10px; font-size: 18px; }

.pr-cup-row img { width: 30px; height: 36px; object-fit: contain; }

.pr-cup-row .pr-cup-name { flex: 1 1 auto; }

.pr-cup-row b { font-family: var(--caps); color: var(--gold-1); font-size: 20px; }

.pr-houses-pick { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.pr-house {
    width: 62px;
    height: 70px;
    padding: 6px;
    border-radius: 14px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    opacity: 0.55;
    transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.pr-house img { width: 100%; height: 100%; object-fit: contain; }

.pr-house.on { opacity: 1; border-color: var(--gold-1); transform: scale(1.06); box-shadow: 0 0 18px rgba(233, 199, 102, 0.4); }

.pr-houses-pick.small .pr-house { width: 40px; height: 46px; padding: 4px; border-radius: 10px; }

.pr-myhouse { gap: 8px; align-items: center; }

.pr-secret-small { font-family: var(--title); font-size: 22px; }

.pr-top { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; min-height: 34px; }

.pr-timer {
    font-family: var(--caps);
    font-weight: 700;
    font-size: 26px;
    letter-spacing: 0.08em;
    color: var(--gold-1);
    padding: 2px 16px;
    border-radius: 999px;
    border: 1px solid var(--panel-border);
    background: rgba(12, 17, 42, 0.7);
}

.pr-timer.low { color: #ffb3a3; border-color: #ff7a63; animation: pr-pulse 1s ease-in-out infinite; }

@keyframes pr-pulse { 50% { box-shadow: 0 0 18px rgba(255, 110, 90, 0.6); } }

.pr-hints { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.pr-hint-chip { padding: 4px 12px; border-radius: 999px; background: rgba(159, 192, 255, 0.16); border: 1px solid rgba(159, 192, 255, 0.5); font-size: 15px; }

.pr-title { text-align: center; font-family: var(--title); font-size: clamp(26px, 3.4vw, 46px); margin: 6px 0 2px; line-height: 1.1; }

.pr-hint { text-align: center; color: var(--ink-dim); margin: 0 auto 12px; max-width: 640px; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85); }

#round > .panel { max-width: 720px; margin: 0 auto 14px; }

.pr-buttons { justify-content: center; gap: 10px; }

.pr-listen { margin-bottom: 12px; }

.btn.recording { background: linear-gradient(180deg, #ff8f7a, #d9452d); color: #fff; box-shadow: 0 0 22px rgba(255, 90, 60, 0.6); animation: pr-pulse 1s ease-in-out infinite; }

.pr-guess-form .field { flex: 1 1 auto; min-width: 0; }

/* The same choice buttons as Sonorus Reverso's. */
.choice { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; }

.choice button
{
    min-width: 46px;
    height: 46px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--panel-border);
    background: rgba(10, 14, 34, 0.6);
    color: var(--gold-2);
    font-family: var(--caps);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}

.choice button.on { background: linear-gradient(180deg, #fff0b3, #e0b54f); color: #2a1a05; border-color: #f8e3a0; }

.choice button:disabled { opacity: 0.45; cursor: default; }

.choice .label { margin: 0 6px 0 0; }

.pr-parts-choice { justify-content: center; flex-wrap: wrap; }

.pr-part-tabs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

.pr-part-tabs button {
    font: inherit;
    font-family: var(--caps);
    font-size: 14px;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--panel-border);
    background: rgba(12, 17, 42, 0.8);
    color: var(--ink);
    cursor: pointer;
}

.pr-part-tabs button.on { border-color: var(--gold-1); box-shadow: 0 0 0 1px var(--gold-1); color: var(--gold-1); }

.pr-part-tabs button.done::after { content: ' ✓'; color: #8fe39c; }

.pr-part-hint { text-align: center; }

#giveUpBtn { align-self: center; }

#giveUpBtn.on { border-color: #ffb3a3; color: #ffb3a3; }

.pr-judge-title { text-align: center; }

.link-btn { background: none; border: 0; padding: 0; color: var(--gold-2); text-decoration: underline; cursor: pointer; font: inherit; align-self: center; }

.pr-reveal { text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }

.pr-secret { font-family: var(--title); font-weight: 700; font-size: clamp(30px, 5vw, 60px); line-height: 1.1; }

.pr-winner { font-size: 20px; color: var(--gold-1); }

.pr-feed { max-height: 42vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }

.pr-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); }

.pr-who { display: inline-flex; align-items: center; gap: 6px; }

.pr-who img { width: 20px; height: 24px; object-fit: contain; }

.pr-guess-text { font-size: 18px; color: var(--ink); }

.pr-item.guess.right { background: rgba(126, 224, 143, 0.16); }

.pr-item.guess.close { background: rgba(255, 210, 122, 0.12); }

.pr-item.guess.wrong .pr-guess-text { color: var(--ink-dim); text-decoration: line-through; text-decoration-color: rgba(255, 150, 130, 0.6); }

.pr-verdict { font-family: var(--caps); font-size: 13px; padding: 2px 10px; border-radius: 999px; }

.pr-verdict.right { background: #7ee08f; color: #0b2a12; }

.pr-verdict.close { background: var(--gold-2); color: #2e2010; }

.pr-verdict.wrong { background: rgba(255, 150, 130, 0.25); color: #ffd0c6; }

.pr-item-tools { margin-left: auto; display: inline-flex; gap: 6px; }

.pr-mini {
    font: inherit;
    font-size: 14px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--panel-border);
    background: rgba(12, 17, 42, 0.8);
    color: var(--gold-1);
    cursor: pointer;
}

.pr-mini.right { color: #7ee08f; border-color: rgba(126, 224, 143, 0.6); }

.pr-mini.close { color: var(--gold-2); }

.pr-mini.wrong { color: #ffb3a3; border-color: rgba(255, 150, 130, 0.5); }

.pr-react {
    position: sticky;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 12px auto 0;
    padding: 6px 10px;
    width: fit-content;
    border-radius: 999px;
    background: rgba(12, 17, 42, 0.85);
    border: 1px solid var(--panel-border);
    z-index: 5;
}

.pr-emoji { font-size: 24px; background: none; border: 0; cursor: pointer; padding: 2px 4px; transition: transform 0.15s ease; }

.pr-emoji:active { transform: scale(1.3); }

.pr-flying { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }

.pr-fly { position: absolute; bottom: 70px; display: flex; flex-direction: column; align-items: center; animation: pr-fly 2.6s ease-out forwards; }

.pr-fly-emoji { font-size: 40px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5)); }

.pr-fly-name { font-size: 12px; color: var(--gold-1); text-shadow: 0 1px 3px #000; }

@keyframes pr-fly {
    0% { transform: translateY(0) scale(0.6); opacity: 0; }
    12% { transform: translateY(-30px) scale(1.1); opacity: 1; }
    100% { transform: translateY(-55vh) scale(0.9); opacity: 0; }
}

.pr-qr { width: min(240px, 70vw); margin: 0 auto; }

.pr-link { font-family: monospace; font-size: 15px; word-break: break-all; color: var(--gold-1); }

@media (max-width: 760px) {
    .pr-sides, .pr-lower { grid-template-columns: 1fr; }
    .pr-stage .wand { width: 33%; }
    .pr-item-tools { margin-left: 0; }
    /* On a phone the bar would sit over the buttons: it waits at the end of the page. */
    .pr-react { gap: 4px; position: static; }
    .pr-emoji { font-size: 22px; }
}
