:root {
    color-scheme: light;
    font-family: system-ui, "Microsoft YaHei", sans-serif;
    color: #18334a;
    background: #f2f6fa;
    --accent: #087f8c;
    --muted: #5d7388;
    --border: #dbe6ed;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
}

main {
    width: min(100% - 32px, 960px);
    margin: 40px auto;
}

.heading, .section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.heading {
    margin-bottom: 24px;
}

.heading span {
    color: var(--accent);
    font-size: .9rem;
    overflow-wrap: anywhere;
}

h1 {
    font-size: clamp(1.55rem, 4vw, 2rem);
    margin: 0 0 8px;
}

h2 {
    font-size: 1.1rem;
    margin: 0 0 14px;
}

.section-heading h2 {
    margin-bottom: 0;
}

p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.5;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 14px;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.inline, .stack {
    display: flex;
    gap: 10px;
}

.inline {
    align-items: end;
}

.stack {
    flex-direction: column;
}

label {
    display: grid;
    gap: 6px;
    flex: 1;
    min-width: 0;
    font-size: .9rem;
}

input, select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f8fafc;
    color: inherit;
    font: inherit;
}

button {
    border: 0;
    min-height: 40px;
    border-radius: 8px;
    padding: 8px 14px;
    background: var(--accent);
    color: white;
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
}

button.secondary {
    background: #e8f4f4;
    color: #075d65;
}

button:disabled {
    opacity: .48;
    cursor: default;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.items {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

.items li {
    border-top: 1px solid var(--border);
    padding: 10px 0;
    overflow-wrap: anywhere;
}

.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.actions {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}

.meta, .compact {
    color: var(--muted);
    font-size: .86rem;
}

.meta {
    margin-top: 4px;
}

.join {
    border-color: #9acdd0;
}

#message[data-error="true"] {
    color: #9c2934;
}

@media (max-width: 620px) {
    main {
        margin: 20px auto;
    }

    .grid {
        display: block;
    }

    .heading {
        align-items: start;
        flex-direction: column;
    }

    .card {
        padding: 16px;
    }
}
