﻿body.forum-mode {
    background: var(--riom-background);
    color: var(--riom-text);
    overflow: hidden; /* ONE SCREEN RULE */
    width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: 0;
}

.forum-layout {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    width: 100vw;
    padding: clamp(16px, 2vw, 40px);
    box-sizing: border-box;
}

.forum-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 10vh;
    max-height: 12vh;
    margin-bottom: 2vh;
}
.f-logo { max-height: clamp(40px, 6vh, 72px); }
.f-brand { font-size: clamp(1.2rem, 3vh, 2rem); font-weight: 700; color: var(--riom-primary); }

.forum-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    height: 70vh;
    overflow: hidden;
}

.f-waiting {
    color: var(--riom-text-muted);
    font-size: clamp(1.5rem, 4vh, 2.5rem);
}

.f-active {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.f-activity-type {
    font-size: clamp(1rem, 2vh, 1.5rem);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--riom-text-muted);
    margin-bottom: 1vh;
}

.f-question {
    font-size: clamp(32px, 5vh, 72px);
    color: var(--riom-primary);
    line-height: 1.2;
    margin-bottom: 2vh;
    max-width: 85vw;
    margin-inline: auto;
    text-align: center;
    max-height: 38vh;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}

.f-instructions {
    font-size: clamp(16px, 1.6vw, 28px);
    color: var(--riom-text);
    margin-bottom: 2vh;
    max-width: 85vw;
}

.f-timer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2vh;
}

.f-timer {
    font-size: clamp(56px, 8vh, 108px);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--riom-primary);
    line-height: 1;
}

.f-rule {
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 700;
    color: var(--riom-text-muted);
    background: rgba(0,0,0,0.05);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    margin-top: 1vh;
}

.f-findings-area {
    width: 100%;
    margin-top: 1vh;
    padding-top: 1vh;
    border-top: 2px dashed var(--riom-border);
    flex: 1;
    overflow-y: auto;
    max-height: 30vh;
}

.f-board {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.f-board .post-it {
    width: clamp(200px, 15vw, 300px);
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    text-align: left;
    box-shadow: var(--shadow-md);
}

.f-closing-area {
    margin-top: 2vh;
}
.f-closing-msg {
    font-size: clamp(1.5rem, 3vh, 2.5rem);
    color: var(--riom-primary);
    line-height: 1.4;
}

.forum-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    height: 15vh;
    max-height: 18vh;
    margin-top: auto;
}

.f-progress {
    font-size: clamp(1rem, 2vh, 1.5rem);
    color: var(--riom-text-muted);
}

.f-actions {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: clamp(0.75rem, 1.5vh, 1rem);
    color: var(--riom-text-muted);
    font-weight: 600;
}

.qr-container img, .qr-container svg {
    width: clamp(90px, 12vh, 150px);
    height: auto;
}

.hidden { display: none !important; }

/* Fullscreen mode hides actions */
:fullscreen .f-actions .btn {
    display: none;
}

/* Height-specific Media Queries */
@media (max-height: 800px) {
    .f-question { font-size: clamp(28px, 4.5vh, 54px); }
    .f-timer { font-size: clamp(48px, 7vh, 80px); }
    .forum-header { margin-bottom: 1vh; }
}

@media (max-height: 720px) {
    .f-question { font-size: clamp(24px, 4vh, 48px); margin-bottom: 1vh; }
    .f-instructions { margin-bottom: 1vh; }
    .f-timer-container { margin-bottom: 1vh; }
    .forum-footer { height: 18vh; }
    .qr-container img, .qr-container svg { width: clamp(80px, 10vh, 110px); }
}
