:root {
    font-family: Arial, Helvetica, sans-serif;
    color: #2d281f;
    background: #f5c900;
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.34), transparent 42rem),
        #f5c900;
}

button, textarea { font: inherit; }

.page-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.welcome-card {
    width: min(760px, 100%);
    padding: clamp(24px, 5vw, 48px);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 70px rgba(72, 54, 0, 0.22);
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.welcome-label {
    margin: 14px 0 4px;
    font-size: 1rem;
}

h1 {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: clamp(2.1rem, 7vw, 4rem);
    line-height: 1;
}

.room-header {
    display: flex;
    justify-content: space-between;
    gap: 28px;
    align-items: flex-end;
    margin-bottom: 26px;
}

.seminar-title {
    max-width: 290px;
    margin: 0;
    text-align: right;
    font-weight: 700;
    line-height: 1.45;
}

.role-badge,
.message-meta span {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #f5c900;
    font-size: 0.76rem;
    font-weight: 700;
}

.chat {
    overflow: hidden;
    border: 1px solid rgba(45, 40, 31, 0.14);
    border-radius: 20px;
    background: #fffdf4;
}

.message-list {
    height: min(48vh, 460px);
    min-height: 280px;
    overflow-y: auto;
    padding: 20px;
}

.empty-state {
    margin: 90px auto;
    text-align: center;
    opacity: 0.6;
}

.message {
    width: fit-content;
    max-width: 82%;
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 16px 16px 16px 4px;
    background: #ece8dc;
}

.message--own {
    margin-left: auto;
    border-radius: 16px 16px 4px 16px;
    background: #fff0a3;
}

.message--organizer {
    border: 2px solid #d4ad00;
}

.message-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.8rem;
}

.message-meta span {
    margin: 0;
    padding: 2px 6px;
}

.message-meta time { opacity: 0.6; }

.message-body-wrap {
    min-width: 0;
}

.message-body {
    max-height: 13.2em;
    margin: 0;
    overflow: hidden;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

.message--expanded .message-body {
    max-height: none;
}

.message-toggle {
    display: inline-block;
    width: auto;
    margin-top: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #5f4d00;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: underline;
    cursor: pointer;
}

.message-toggle[hidden] {
    display: none;
}

.message-form {
    padding: 18px;
    border-top: 1px solid rgba(45, 40, 31, 0.12);
    background: #ffffff;
}

.message-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

.message-form textarea {
    width: 100%;
    resize: vertical;
    min-height: 86px;
    padding: 12px;
    border: 1px solid rgba(45, 40, 31, 0.25);
    border-radius: 12px;
    outline: none;
}

.message-form textarea:focus {
    border-color: #9a7d00;
    box-shadow: 0 0 0 3px rgba(245, 201, 0, 0.24);
}

.input-meta {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
}

.character-counter {
    font-size: 0.82rem;
    opacity: 0.65;
}

.character-counter--warning {
    color: #9a6500;
    font-weight: 700;
    opacity: 1;
}

.character-counter--limit {
    color: #a62d24;
}

.form-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    margin-top: 10px;
}

.form-status {
    margin: 0;
    font-size: 0.88rem;
}

button {
    flex: 0 0 auto;
    padding: 11px 16px;
    border: 0;
    border-radius: 12px;
    background: #2d281f;
    color: white;
    font-weight: 700;
    cursor: pointer;
}

button:disabled {
    cursor: wait;
    opacity: 0.55;
}

.intro {
    margin: 28px 0;
    font-size: clamp(1.08rem, 2vw, 1.28rem);
    line-height: 1.65;
}

.status-box {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 20px;
    border: 1px solid rgba(45, 40, 31, 0.13);
    border-radius: 18px;
    background: #fff9dc;
}

.status-box--warning { background: #fff1e8; }

.status-box p {
    margin: 6px 0 0;
    line-height: 1.5;
}

.status-dot {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin-top: 5px;
    border-radius: 999px;
    background: #2f8f57;
    box-shadow: 0 0 0 5px rgba(47, 143, 87, 0.14);
}

.status-dot--warning {
    background: #b85f2d;
    box-shadow: 0 0 0 5px rgba(184, 95, 45, 0.14);
}

.footer-note {
    margin: 20px 0 0;
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.72;
}

@media (max-width: 620px) {
    body {
        overflow: hidden;
    }

    .page-shell {
        min-height: 100dvh;
        height: 100dvh;
        padding: 8px;
        place-items: stretch;
    }

    .welcome-card {
        display: flex;
        min-height: 0;
        height: calc(100dvh - 16px);
        flex-direction: column;
        padding: 18px 14px 12px;
        border-radius: 20px;
        overflow: hidden;
    }

    .eyebrow {
        flex: 0 0 auto;
        margin-bottom: 6px;
    }

    .room-header {
        display: block;
        flex: 0 0 auto;
        margin-bottom: 14px;
    }

    .welcome-label {
        margin-top: 8px;
    }

    h1 {
        font-size: clamp(2.2rem, 13vw, 3.4rem);
    }

    .seminar-title {
        max-width: none;
        margin-top: 12px;
        text-align: left;
        line-height: 1.3;
    }

    .chat {
        display: flex;
        min-height: 0;
        flex: 1 1 auto;
        flex-direction: column;
    }

    .message-list {
        min-height: 0;
        height: auto;
        flex: 1 1 auto;
        padding: 14px;
        overscroll-behavior: contain;
    }

    .message {
        max-width: 92%;
    }

    .message-body {
        max-height: 10.15em;
    }

    .message--expanded .message-body {
        max-height: none;
    }

    .message-form {
        flex: 0 0 auto;
        padding: 12px;
    }

    .message-form label {
        margin-bottom: 6px;
    }

    .message-form textarea {
        min-height: 58px;
        max-height: 110px;
        padding: 10px;
    }

    .input-meta {
        margin-top: 3px;
    }

    .form-footer {
        align-items: stretch;
        flex-direction: column;
        gap: 6px;
        margin-top: 6px;
    }

    .form-footer button {
        width: 100%;
        padding: 10px 14px;
    }

    .message-toggle {
        width: auto;
    }

    .footer-note {
        display: none;
    }
}


.seminar-notice {
    margin-bottom: 18px;
    padding: 16px 18px;
    border: 2px solid #d4ad00;
    border-radius: 16px;
    background: #fff3b5;
}

.seminar-notice__label {
    margin-bottom: 7px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.seminar-notice p {
    margin: 0;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.5;
}

@media (max-width: 620px) {
    .seminar-notice {
        flex: 0 0 auto;
        margin-bottom: 10px;
        padding: 12px 14px;
        max-height: 20vh;
        overflow-y: auto;
    }
}


.push-panel {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
    padding: 15px 17px;
    border: 1px solid rgba(45, 40, 31, 0.14);
    border-radius: 16px;
    background: #eef8f0;
}

.push-panel[hidden] {
    display: none;
}

.push-panel strong {
    display: block;
    margin-bottom: 5px;
}

.push-panel p {
    margin: 0;
    line-height: 1.45;
}

.push-panel button {
    flex: 0 0 auto;
}

.push-help {
    margin-top: 8px !important;
    font-size: 0.88rem;
    font-weight: 700;
}

@media (max-width: 620px) {
    .push-panel {
        display: block;
        flex: 0 0 auto;
        margin-bottom: 10px;
        padding: 12px 14px;
        max-height: 24vh;
        overflow-y: auto;
    }

    .push-panel button {
        width: 100%;
        margin-top: 10px;
        padding: 9px 12px;
    }
}
