* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(82, 157, 255, 0.25), transparent 35%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.18), transparent 30%),
        #f4f7fb;
    color: #10233d;
}

.page {
    max-width: 1080px;
    margin: 0 auto;
    padding: 48px 20px 80px;
    display: grid;
    gap: 24px;
}

.panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(16, 35, 61, 0.08);
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 22px 60px rgba(12, 30, 66, 0.08);
    backdrop-filter: blur(14px);
}

.hero h1,
.mailbox-state h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
}

.eyebrow {
    margin: 0 0 8px;
    color: #3b82f6;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.description {
    max-width: 760px;
    color: #48617c;
    line-height: 1.7;
}

.actions,
.mailbox-row,
.section-title,
.message-header {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

button {
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.22);
}

button:hover {
    filter: brightness(1.05);
}

.hint,
.expires-at,
.meta-label,
#poll-status {
    color: #5b728d;
    font-size: 14px;
}

.mailbox-card,
.message-card {
    margin-top: 20px;
    padding: 20px;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid rgba(37, 99, 235, 0.12);
}

label,
.body-block h3 {
    display: block;
    margin-bottom: 10px;
    font-weight: 700;
}

input {
    flex: 1;
    min-width: 240px;
    border-radius: 14px;
    border: 1px solid rgba(16, 35, 61, 0.14);
    background: white;
    padding: 14px 16px;
    font-size: 15px;
}

.empty-state {
    margin-top: 18px;
    padding: 22px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.07), rgba(147, 197, 253, 0.18));
    color: #1e3a5f;
}

.message-body {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 20px;
}

.body-block {
    padding: 16px;
    border-radius: 16px;
    background: white;
    border: 1px solid rgba(16, 35, 61, 0.08);
}

pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    color: #1e2f47;
}

iframe {
    width: 100%;
    min-height: 280px;
    border: 1px solid rgba(16, 35, 61, 0.1);
    border-radius: 12px;
    background: #fff;
}

.hidden {
    display: none;
}

@media (max-width: 640px) {
    .panel {
        padding: 20px;
    }
}
