:root {
    color-scheme: light;
    --bg-top: #0f766e;
    --bg-bottom: #f8fafc;
    --card: rgba(255, 255, 255, 0.92);
    --border: rgba(15, 23, 42, 0.08);
    --text: #0f172a;
    --muted: #475569;
    --accent: #0f766e;
    --accent-strong: #115e59;
    --accent-soft: #ccfbf1;
    --danger: #dc2626;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
    font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.22), transparent 28%),
        linear-gradient(180deg, var(--bg-top) 0%, #14b8a6 24%, var(--bg-bottom) 100%);
}

.capture-shell {
    min-height: 100vh;
    padding: 14px 12px 24px;
}

.capture-card {
    width: min(100%, 680px);
    margin: 0 auto;
    background: var(--card);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 16px;
}

.capture-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.capture-kicker {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.capture-header h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.1;
}

.capture-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.5;
    font-size: 14px;
}

.capture-form {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.capture-label {
    font-weight: 700;
    font-size: 15px;
}

.capture-input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px 14px;
    resize: vertical;
    min-height: 92px;
    max-height: 148px;
    font: inherit;
    color: inherit;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.04);
}

.capture-input:focus {
    outline: 2px solid rgba(15, 118, 110, 0.18);
    border-color: rgba(15, 118, 110, 0.32);
}

.capture-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.primary-button,
.secondary-button,
.ghost-button,
.link-button {
    border: 0;
    font: inherit;
    cursor: pointer;
}

.primary-button,
.secondary-button,
.ghost-button {
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 700;
}

.primary-button {
    background: linear-gradient(135deg, var(--accent) 0%, #14b8a6 100%);
    color: #fff;
}

.secondary-button {
    background: rgba(148, 163, 184, 0.14);
    color: var(--muted);
}

.ghost-button {
    background: transparent;
    color: var(--muted);
    border: 1px solid rgba(148, 163, 184, 0.25);
}

.link-button {
    background: transparent;
    color: var(--accent);
    padding: 0;
    font-weight: 700;
}

.capture-help {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

.capture-panel {
    margin-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding-top: 14px;
}

.capture-footer {
    margin-top: 20px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.capture-footer-status {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 20px;
    color: var(--muted);
    font-size: 12px;
}

.capture-footer-button {
    min-width: 88px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
}

.footer-status-item {
    color: var(--accent-strong);
    font-weight: 600;
}

.footer-status-item.is-muted {
    color: var(--muted);
    font-weight: 500;
}

.footer-status-item.offline {
    color: var(--danger);
}

.footer-status-separator {
    color: rgba(71, 85, 105, 0.5);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.panel-header h2 {
    margin: 0;
    font-size: 15px;
}

.capture-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.capture-item,
.empty-state {
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.14);
    padding: 12px 14px;
}

.capture-item {
    position: relative;
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 12px;
    align-items: start;
}

.capture-item::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 16px;
    bottom: 16px;
    width: 1px;
    background: rgba(20, 184, 166, 0.18);
}

.capture-time {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(240, 253, 250, 0.95);
    color: var(--accent-strong);
    font-size: 11px;
    font-weight: 700;
}

.capture-body {
    min-width: 0;
}

.capture-item p,
.empty-state {
    margin: 0;
    line-height: 1.5;
    font-size: 14px;
}

.capture-item time {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

#recent-list {
    max-height: 46vh;
    overflow-y: auto;
    padding-right: 2px;
}

.capture-item.pending {
    background: rgba(254, 249, 195, 0.58);
    border-color: rgba(234, 179, 8, 0.2);
}

.capture-item.pending .capture-time {
    background: rgba(255, 251, 235, 0.98);
    color: #a16207;
}

@media (max-width: 520px) {
    .capture-shell {
        padding: 10px 10px 20px;
    }

    .capture-card {
        border-radius: 20px;
        padding: 14px;
    }

    .capture-header {
        flex-direction: column;
    }

    .capture-header h1 {
        font-size: 24px;
    }

    .capture-actions {
        flex-direction: column-reverse;
    }

    .capture-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .capture-item {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .capture-item::before {
        display: none;
    }

    .capture-time {
        justify-self: start;
    }

    #recent-list {
        max-height: 50vh;
    }

    .primary-button,
    .secondary-button,
    .ghost-button {
        width: 100%;
    }
}