/* Shared layout for the quiz start and player entry screens. */
.mainsection.quiz-entry-layout {
    box-sizing: border-box;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: clamp(18px, 4vw, 40px) clamp(12px, 4vw, 24px);
}
.quiz-entry-layout #instContainer,
.quiz-entry-layout .userfriend-ins-scoreboard {
    box-sizing: border-box;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
    padding: clamp(16px, 4vw, 28px);
}
.quiz-entry-layout #instContainer > .logo img {
    display: block;
    width: auto;
    max-width: min(100%, 160px);
    max-height: 128px;
    margin: 0 auto;
    object-fit: contain;
}
.quiz-entry-layout #instContainer > .homeheading {
    margin: 0;
    padding: 16px 0;
    font-size: clamp(22px, 4vw, 34px);
    overflow-wrap: anywhere;
}
.quiz-entry-layout #instContainer .instructions-section {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: clamp(10px, 3vw, 16px);
}
.quiz-entry-layout #instContainer .inst-cta { margin: 0; }
.quiz-entry-layout .userfriend-ins-scoreboard { margin-top: 18px; }
.quiz-entry-layout .friendboard-heading {
    padding: 0 0 14px;
    font-size: clamp(20px, 4vw, 28px);
    overflow-wrap: anywhere;
}

.quiz-entry-layout #instContainer { border: 1px solid #000; }

.quiz-entry-layout #instContainer > .quiz-start-title {
    color: #0b2f6b;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(1.5rem, 1.05rem + 2vw, 2.5rem);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.025em;
    text-wrap: balance;
    padding-block: 18px 20px;
}

.quiz-entry-layout #play_page_form {
    --quiz-control-height: 40px;
    display: grid;
    gap: 12px;
}
.quiz-entry-layout #play_page_form .play-ins-input > input {
    box-sizing: border-box;
    display: block;
    height: var(--quiz-control-height);
    margin: 0;
}
.quiz-entry-layout #play_page_form > .startbtn {
    box-sizing: border-box;
    height: var(--quiz-control-height) !important;
    margin: 0;
    padding: 0 12px !important;
    font-size: 18px !important;
}
.quiz-entry-layout #play_page_form > .startbtn img {
    height: 22px !important;
}

/* Friendboard table layout, shared by entry, owner and result screens. */
.userfriend-ins-scoreboard:has(> .scoreboardsec) {
    box-sizing: border-box;
    border-radius: 18px;
    padding: clamp(14px, 3vw, 22px);
}
.quiz-entry-layout .userfriend-ins-scoreboard:has(> .scoreboardsec) {
    border: 1px solid #150523;
}
.userfriend-ins-scoreboard .friendboard-heading {
    padding: 0 0 14px;
    margin: 0;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.userfriend-ins-scoreboard .scoreboardsec {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
}
.userfriend-ins-scoreboard > .scoreboardsec {
    padding: 0;
    border-width: 1px;
}
.userfriend-ins-scoreboard .scoreboardsec .table-heading {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(21, 5, 35, .16);
}
.userfriend-ins-scoreboard .scoreboardsec ul {
    margin: 0;
    padding: 0;
}
.userfriend-ins-scoreboard .scoreboardsec ul li {
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 8px 14px;
    border-radius: 0;
    box-shadow: none;
    gap: 12px;
}
.userfriend-ins-scoreboard .scoreboardsec ul li + li {
    border-top: 1px solid rgba(21, 5, 35, .12);
}
.userfriend-ins-scoreboard .scoreboardsec ul li .player-row {
    gap: 12px;
    min-width: 0;
}
.userfriend-ins-scoreboard .scoreboardsec ul li .player-name {
    min-width: 0;
    overflow-wrap: anywhere;
}
.userfriend-ins-scoreboard .scoreboardsec ul li .player-score { flex-shrink: 0; }
.userfriend-ins-scoreboard .scoreboardsec ul li::before,
.userfriend-ins-scoreboard .scoreboardsec ul li::after,
.userfriend-ins-scoreboard .noscoreboardsec::before,
.userfriend-ins-scoreboard .noscoreboardsec::after { display: none; }
.userfriend-ins-scoreboard .noscoreboardsec {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(76px, 18vw, 108px);
    margin: 0;
    padding: 14px;
    line-height: 1.35;
    text-align: center;
}

.quiz-entry-layout #instContainer > .quiz-user-title {
    font-size: clamp(.875rem, .68rem + 1.05vw, 1.375rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-wrap: nowrap;
}

/* Submit loader card for the final question and challenge. */
.process {
    box-sizing: border-box;
    width: min(100%, 440px);
    margin: 28px auto;
    padding: clamp(18px, 5vw, 26px);
}
.process .processing_container {
    min-height: clamp(190px, 44vw, 245px);
    margin: 0 auto 8px;
}
.process .processing_container .loader {
    display: block;
    flex: 0 0 auto;
    width: clamp(132px, 34vw, 168px);
    height: auto;
    max-width: 100%;
    transform: translateX(18px);
    transform-origin: center;
}
.process .processing_container .loader circle {
    stroke-width: 9;
    stroke-linecap: round;
}
.process h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}
.process h3 {
    margin: 14px 0 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
}
@media (max-width: 480px) {
    .process { width: min(calc(100% - 22px), 440px); margin-block: 24px; }
    .process .processing_container { min-height: 230px; }
    .process .processing_container .loader { width: 150px; transform: translateX(20px); }
    .process h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    .process .processing_container .loader circle { animation: none; }
}



/* Question and challenge share the same card and answer grid. */
.qa-page .quiz-question-card {
    background: transparent;
    box-shadow: none;
    padding-inline: 0;
}
.qa-page .quiz-question-card::before,
.qa-page .quiz-question-card::after,
.qa-page .quiz-question-card > .logo-name { display: none; }
.qa-page .quiz-question-card .quiz-wrapper {
    position: relative;
    width: calc(100% - 24px);
    margin-inline: auto;
    box-sizing: border-box;
    background: #efefef;
    border: 1px solid #000;
    border-radius: 24px;
    padding: 62px 26px 26px;
    box-shadow: none;
}
.qa-page .quiz-question-card .countdown {
    position: absolute;
    top: -20px;
    left: 36px;
    margin: 0;
    z-index: 5;
}
.qa-page .quiz-question-card .countdown ul { margin: 0; padding: 0; }
.qa-page .quiz-question-card .countdown li { display: none; }
.qa-page .quiz-question-card .countdown li.active {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    min-width: 190px;
    white-space: nowrap;
    box-sizing: border-box;
    height: 58px;
    margin: 0;
    padding: 0 12px;
    border-radius: 12px;
    box-shadow: none;
    color: #fff;
    font-size: 20px;
    font-weight: 800;
}
.qa-page .quiz-question-card .countdown li.active::before {
    content: "Question";
    margin-right: .35em;
}
.qa-page .quiz-question-card .countdown li.active::after { content: "/" attr(data-total); }
.qa-page .quiz-question-card .skipBtnWrapper {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 5;
    margin: 0;
    padding: 0;
}
.qa-page .quiz-question-card #skipBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 12px 16px;
    background: #052c65;
    color: #fff;
    border-radius: 0 23px 0 14px;
    box-shadow: none;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}
.qa-page .quiz-question-card #skipBtn::before,
.qa-page .quiz-question-card #skipBtn::after { display: none; }
.qa-page .quiz-question-card #skipBtn:hover { background: #0b2f6b; }
.qa-page .quiz-question-card .question-text {
    margin: 8px 0 22px;
    padding: 10px 14px;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    background: #f5f5f5;
    color: #3d3d3d;
    text-align: left;
    font-size: clamp(17px, 3vw, 30px);
    font-weight: 600;
    line-height: 1.25;
    overflow-wrap: anywhere;
}
.qa-page .quiz-question-card .question-wrapper .row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}
.qa-page .quiz-question-card .question-wrapper .qns {
    display: flex;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 0;
    margin: 0 !important;
}
.qa-page .quiz-question-card .custom-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    min-height: clamp(165px, 30vw, 275px);
    overflow: hidden;
    border: 2px solid #052c65;
    border-radius: 12px;
    background: #ececec;
    box-shadow: none;
}
.qa-page .quiz-question-card .custom-card .q-img {
    display: grid;
    flex: 1 0 auto;
    place-items: center;
    padding: 8px;
}
.qa-page .quiz-question-card .custom-card .q-img img {
    width: min(100%, clamp(82px, 22vw, 150px));
    height: auto;
    aspect-ratio: 1;
    padding: 0;
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
}
.qa-page .quiz-question-card .custom-card .custom-card-body {
    margin-top: auto;
    padding: 4px 8px 8px;
    border-radius: 0;
    background: transparent !important;
}
.qa-page .quiz-question-card .custom-card .question-option {
    display: grid;
    place-items: center;
    min-height: 44px;
    margin: 0;
    padding: 6px;
    border: 1px solid #cfd8dc;
    border-radius: 10px;
    background: #fff;
    color: #3f3f3f;
    font-size: clamp(14px, 2.7vw, 24px);
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}
.qa-page .quiz-question-card .custom-card.active { background: #dbeafe; }
.qa-page .quiz-question-card .custom-card.right { border-color: #24a455; background: #e9fbea; }
.qa-page .quiz-question-card .custom-card.wrong { border-color: #d64560; background: #fdeff3; }
@media (max-width: 767px) {
    .container.qa-page {
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        padding-inline: 16px;
    }
    .qa-page > .row { margin-inline: 0; }
    .qa-page .quiz-question-card .quiz-wrapper {
        width: 100%;
        border-radius: 18px;
        padding: 46px 12px 14px;
    }
    .qa-page .quiz-question-card .countdown { top: 5px; left: 12px; }
    .qa-page .quiz-question-card .countdown li.active { min-width: 0; height: 32px; font-size: 14px; }
    .qa-page .quiz-question-card #skipBtn { padding: 9px; font-size: 12px; border-radius: 0 17px 0 12px; }
    .qa-page .quiz-question-card .question-text { margin-bottom: 14px; }
    .qa-page .quiz-question-card .question-wrapper .row { gap: 8px; }
}
