:root {
    --ink: #24191c;
    --muted: #74686d;
    --line: #ded8da;
    --paper: #fdfcfc;
    --wash: #f1eeee;
    --panel: #f8f6f6;
    --accent: #7a1f36;
    --accent-dark: #551426;
    --accent-soft: #f4e7eb;
    --gold: #9a6a2f;
    --danger: #b42318;
    --ok: #236247;
    --shadow: 0 18px 42px rgba(52, 31, 38, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        linear-gradient(180deg, #e9e4e5 0, rgba(241, 238, 238, 0) 340px),
        var(--wash);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--accent-dark);
    text-decoration: none;
}

.topbar {
    align-items: center;
    background: rgba(253, 252, 252, 0.92);
    border-bottom: 1px solid rgba(222, 216, 218, 0.9);
    display: flex;
    justify-content: space-between;
    min-height: 68px;
    padding: 0 36px;
}

.brand {
    align-items: center;
    color: var(--accent-dark);
    display: inline-flex;
    font-size: 21px;
    gap: 10px;
    font-weight: 800;
}

.brand img {
    display: block;
    height: 54px;
    width: auto;
}

.brand span {
    white-space: nowrap;
}

.topbar nav {
    display: flex;
    gap: 8px;
}

.topbar nav a {
    border-radius: 7px;
    color: var(--muted);
    font-weight: 700;
    padding: 8px 10px;
}

.topbar nav a:hover {
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.shell {
    margin: 0 auto;
    max-width: 1240px;
    padding: 42px 20px 54px;
}

.grid {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 300px;
}

.room-shell {
    grid-template-columns: 1fr;
}

.room-shell > .stack:last-child {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel,
.file-card,
.text-card,
.choice-card,
.mini-panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(222, 216, 218, 0.95);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.panel {
    padding: 26px;
}

.panel-heading {
    margin-bottom: 20px;
}

.panel-heading p {
    max-width: 620px;
}

.stack {
    display: grid;
    gap: 18px;
}

.hero {
    margin-bottom: 28px;
    max-width: 780px;
}

.eyebrow,
.section-label {
    color: var(--accent-dark);
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: clamp(36px, 6vw, 62px);
    letter-spacing: 0;
    line-height: 0.98;
    margin: 0 0 14px;
}

.panel h1,
.panel h2 {
    font-size: 24px;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0 0 12px;
}

.hero p,
.panel p,
.mini-panel span {
    color: var(--muted);
    margin: 0;
}

.choice-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
    color: var(--ink);
    display: grid;
    gap: 8px;
    min-height: 178px;
    padding: 24px;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.choice-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.choice-card span {
    color: var(--gold);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.choice-card strong {
    font-size: 26px;
    line-height: 1.05;
}

.choice-card small {
    color: var(--muted);
    font-size: 15px;
}

.form-grid {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
}

label {
    font-weight: 800;
}

.optional {
    color: var(--muted);
    font-weight: 600;
}

input,
textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--ink);
    font: inherit;
    min-height: 46px;
    outline: none;
    padding: 11px 12px;
    width: 100%;
}

input:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(122, 31, 54, 0.13);
}

textarea {
    min-height: 112px;
    resize: vertical;
}

.hint {
    color: var(--muted);
    font-size: 14px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.button,
button {
    align-items: center;
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 7px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 800;
    justify-content: center;
    min-height: 44px;
    padding: 10px 16px;
}

.button:hover,
button:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
}

.button.secondary {
    background: #fff;
    color: var(--accent-dark);
}

.button.secondary:hover {
    background: var(--accent-soft);
}

.button.danger,
button.danger {
    background: #fff;
    border-color: #e3b8b8;
    color: var(--danger);
}

.button.danger:hover,
button.danger:hover {
    background: #fff1f0;
    border-color: var(--danger);
}

.button.small,
button.small {
    min-height: 36px;
    padding: 7px 11px;
}

.ad-slot {
    align-items: center;
    background: repeating-linear-gradient(135deg, #eeeaea 0, #eeeaea 10px, #e4dfe1 10px, #e4dfe1 20px);
    border: 1px dashed #aa9da2;
    border-radius: 8px;
    color: #756970;
    display: flex;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    min-height: 250px;
    padding: 16px;
    text-align: center;
}

.ad-wide {
    min-height: 96px;
}

.mini-panel {
    display: grid;
    gap: 6px;
    padding: 18px;
}

.mini-panel strong {
    font-size: 16px;
}

.alert {
    border-radius: 8px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.alert-error {
    background: #fff1f0;
    color: var(--danger);
}

.alert-success {
    background: #edf9ef;
    color: var(--ok);
}

.room-code {
    background: var(--accent-soft);
    border: 1px solid #d8b9c2;
    border-radius: 8px;
    color: var(--accent-dark);
    display: inline-block;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 3px;
    margin-left: 6px;
    padding: 6px 12px;
}

.divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 22px 0;
}

.files,
.text-list {
    display: grid;
    gap: 12px;
    margin-bottom: 18px;
}

.file-card {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 15px;
}

.workspace-grid {
    align-items: start;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(460px, 1.15fr) minmax(460px, 1fr);
}

.storage-panel,
.contents-panel {
    min-height: 420px;
}

.storage-panel {
    display: grid;
    gap: 18px;
}

.upload-box,
.text-box {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 22px;
}

.upload-box input[type="file"] {
    align-items: center;
    background: #fff;
    border: 1px dashed #b9aeb2;
    cursor: pointer;
    display: flex;
    min-height: 86px;
    padding: 24px;
}

.text-box textarea {
    min-height: 260px;
}

.contents-panel {
    max-width: 100%;
    max-height: 720px;
    min-height: 420px;
    min-width: 420px;
    overflow: auto;
    resize: both;
    width: 100%;
}

.contents-panel::after {
    color: var(--muted);
    content: "Drag the corner to expand";
    display: block;
    font-size: 12px;
    margin-top: 10px;
    text-align: right;
}

.create-panel {
    padding: 30px;
}

.create-panel .form-grid {
    gap: 18px;
}

.text-card {
    padding: 16px;
}

.text-card p {
    color: var(--ink);
    white-space: normal;
    overflow-wrap: anywhere;
}

.content-row {
    align-items: start;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.file-name {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.file-meta {
    color: var(--muted);
    font-size: 14px;
}

.empty {
    background: var(--panel);
    border: 1px dashed var(--line);
    border-radius: 8px;
    color: var(--muted);
    padding: 26px;
    text-align: center;
}

.seo-section {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(222, 216, 218, 0.95);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 18px;
    margin-top: 26px;
    padding: 30px;
}

.seo-section h2 {
    font-size: 30px;
    letter-spacing: 0;
    line-height: 1.1;
    margin: 0 0 10px;
}

.seo-section p {
    color: var(--muted);
    margin: 0;
}

.feature-grid,
.content-columns {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.content-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.feature-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: grid;
    gap: 8px;
    padding: 18px;
}

.feature-card strong {
    color: var(--accent-dark);
    font-size: 17px;
}

.faq-list {
    display: grid;
    gap: 16px;
}

.legal-copy {
    gap: 10px;
}

.legal-copy h2 {
    font-size: 22px;
    margin-top: 12px;
}

.footer {
    display: grid;
    gap: 10px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.footer-links a {
    color: var(--accent-dark);
    font-weight: 700;
}

.footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding: 20px;
    text-align: center;
}

@media (max-width: 860px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 16px 20px;
    }

    .grid,
    .choice-grid,
    .workspace-grid,
    .feature-grid,
    .content-columns {
        grid-template-columns: 1fr;
    }

    .room-shell > .stack:last-child {
        grid-template-columns: 1fr;
    }

    .file-card {
        grid-template-columns: 1fr;
    }

    .content-row {
        grid-template-columns: 1fr;
    }

    .contents-panel {
        min-width: 0;
        resize: vertical;
    }
}
