:root {
    --ink-1: #f6efe2;
    --ink-2: #e7dbc7;
    --paper: rgba(255, 249, 239, 0.88);
    --paper-strong: #fffdf8;
    --line: rgba(123, 97, 69, 0.16);
    --line-strong: rgba(123, 97, 69, 0.26);
    --text-main: #251d16;
    --text-sub: #6f5b49;
    --accent: #cc6a2f;
    --accent-dark: #8e3f1a;
    --accent-soft: rgba(204, 106, 47, 0.1);
    --success: #2b7f62;
    --danger: #ba3c2a;
    --deep: #1d1712;
    --hero-start: #3f261a;
    --hero-end: #b55f2a;
    --shadow-lg: 0 22px 54px rgba(74, 50, 27, 0.12);
    --shadow-md: 0 14px 34px rgba(74, 50, 27, 0.1);
    --shadow-sm: 0 8px 20px rgba(74, 50, 27, 0.06);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--text-main);
    font-family: "Segoe UI Variable Text", "PingFang SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(255, 210, 160, 0.28), transparent 22%),
        linear-gradient(180deg, #f7f0e4 0%, #ece0cd 100%);
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.dashboard-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 12px 12px;
}

.dashboard-app,
.auth-shell {
    position: relative;
    z-index: 1;
    width: min(1480px, calc(100% - 40px));
    margin: 24px auto 42px;
}

.appbar,
.hero-panel,
.control-card,
.board-card,
.stat-card,
.auth-panel {
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

.appbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px 22px;
    background: rgba(255, 252, 247, 0.72);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-sm);
}

.brand-block__eyebrow,
.hero-panel__eyebrow,
.control-card__eyebrow,
.board-card__eyebrow,
.auth-eyebrow {
    display: block;
    margin: 0 0 10px;
    color: var(--text-sub);
    font-size: 12px;
    letter-spacing: 0.28em;
    text-transform: uppercase;
}

.brand-block h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.12;
}

.appbar__actions,
.actions,
.auth-actions,
.quick-links,
.hero-panel__links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff8ef;
    cursor: pointer;
    box-shadow: 0 14px 28px rgba(142, 63, 26, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(142, 63, 26, 0.2);
}

.button--soft {
    border-color: rgba(142, 63, 26, 0.12);
    background: rgba(255, 250, 242, 0.76);
    color: var(--accent-dark);
    box-shadow: none;
}

.button--danger {
    border-color: rgba(186, 60, 42, 0.12);
    background: rgba(186, 60, 42, 0.08);
    color: var(--danger);
    box-shadow: none;
}

.button--block {
    width: 100%;
}

.chip-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(142, 63, 26, 0.14);
    border-radius: 999px;
    background: rgba(255, 249, 240, 0.9);
    color: var(--accent-dark);
    cursor: pointer;
}

.hero-panel {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) 320px;
    gap: 24px;
    margin-top: 18px;
    padding: 32px;
    background:
        radial-gradient(circle at top right, rgba(255, 231, 203, 0.16), transparent 28%),
        linear-gradient(135deg, var(--hero-start) 0%, var(--hero-end) 100%);
    color: #fff7ee;
}

.hero-panel::before,
.hero-panel::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 235, 211, 0.08);
}

.hero-panel::before {
    top: -100px;
    right: -40px;
    width: 260px;
    height: 260px;
}

.hero-panel::after {
    bottom: -90px;
    left: -50px;
    width: 180px;
    height: 180px;
}

.hero-panel__copy,
.hero-panel__side {
    position: relative;
    z-index: 1;
}

.hero-panel__copy h2 {
    margin: 0;
    font-size: clamp(32px, 3vw, 46px);
    line-height: 1.1;
}

.hero-panel__desc {
    margin: 18px 0 0;
    max-width: 760px;
    color: rgba(255, 246, 233, 0.84);
    font-size: 16px;
    line-height: 1.85;
}

.hero-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 248, 238, 0.12);
    border: 1px solid rgba(255, 242, 225, 0.16);
    color: #fff6ea;
}

.hero-panel__side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.identity-card,
.hero-note {
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 248, 237, 0.12);
    border: 1px solid rgba(255, 239, 219, 0.16);
}

.identity-card__label,
.hero-note__title {
    display: block;
    color: rgba(255, 244, 229, 0.68);
    font-size: 13px;
}

.identity-card strong {
    display: block;
    margin-top: 10px;
    font-size: 22px;
}

.identity-card__account,
.hero-note__text {
    display: block;
    margin-top: 8px;
    color: rgba(255, 244, 229, 0.82);
    line-height: 1.7;
}

.stats-ribbon {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.stat-card {
    padding: 22px;
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.86), rgba(250, 241, 228, 0.92));
    box-shadow: var(--shadow-md);
}

.stat-card__label {
    display: block;
    color: var(--text-sub);
    font-size: 14px;
}

.stat-card strong {
    display: block;
    margin-top: 14px;
    font-size: clamp(26px, 2vw, 34px);
    line-height: 1.12;
}

.stat-card__hint {
    display: block;
    margin-top: 10px;
    color: var(--text-sub);
    font-size: 13px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 400px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-top: 20px;
}

.control-column {
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.control-card,
.board-card,
.auth-panel {
    background: linear-gradient(180deg, rgba(255, 253, 249, 0.82), rgba(249, 241, 229, 0.92));
}

.control-card,
.board-card,
.auth-panel {
    padding: 24px;
}

.control-card--guide {
    background:
        radial-gradient(circle at top right, rgba(204, 106, 47, 0.14), transparent 34%),
        linear-gradient(180deg, rgba(255, 253, 249, 0.92), rgba(250, 240, 224, 0.98));
}

.control-card__header,
.board-card__header,
.auth-header {
    margin-bottom: 18px;
}

.control-card__header--split {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.control-card h2,
.board-card h2,
.auth-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
}

.control-card__desc,
.board-card__desc,
.auth-header p,
.summary,
.voice-meta small,
.character-desc {
    margin: 10px 0 0;
    color: var(--text-sub);
    line-height: 1.75;
}

.workflow-list {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding-left: 20px;
    color: var(--text-sub);
}

.quick-links__item {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
}

.preview-card {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 16px;
    border-radius: 22px;
    border: 1px solid rgba(123, 97, 69, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(249, 241, 229, 0.92));
}

.preview-card__media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 92px;
    height: 92px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ecd6bc, #f4e7d0);
    overflow: hidden;
    flex: none;
}

.preview-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-card__placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--accent-dark);
    font-weight: 700;
}

.preview-card__copy {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.preview-card__copy strong {
    font-size: 18px;
}

.preview-card__copy span {
    color: var(--text-sub);
    line-height: 1.7;
}

.content-column {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.board-card--summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.board-card__tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: 340px;
}

.board-tag,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 11px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-size: 12px;
}

.message {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(43, 127, 98, 0.1);
    color: var(--success);
    border: 1px solid rgba(43, 127, 98, 0.14);
}

.message--error {
    background: rgba(186, 60, 42, 0.1);
    color: var(--danger);
    border-color: rgba(186, 60, 42, 0.14);
}

.empty-state {
    padding: 28px;
    border-radius: 22px;
    border: 1px dashed var(--line-strong);
    background: rgba(255, 255, 255, 0.46);
    color: var(--text-sub);
}

.board-card--list {
    min-height: 540px;
}

.data-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.group-block {
    padding: 20px;
    border-radius: 24px;
    border: 1px solid rgba(123, 97, 69, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(250, 244, 234, 0.9));
    box-shadow: var(--shadow-sm);
}

.group-head,
.character-head,
.voice-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.group-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.group-head h3,
.character-head h4 {
    margin: 0;
    font-size: 22px;
}

.character-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.character-item {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(123, 97, 69, 0.1);
    background: rgba(255, 252, 247, 0.9);
}

.avatar-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    flex: none;
}

.character-meta {
    display: flex;
    gap: 14px;
    min-width: 0;
}

.character-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.character-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    object-fit: cover;
    background: linear-gradient(135deg, #e7cda6, #f2dcc0);
    flex: none;
}

.avatar--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent-dark);
}

.voice-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.voice-row {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(123, 97, 69, 0.08);
    background: rgba(255, 255, 255, 0.78);
}

.voice-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent-dark);
    font-weight: 700;
    flex: none;
}

.voice-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.voice-audio {
    width: min(100%, 340px);
    margin-top: 8px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

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

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field span {
    color: var(--text-sub);
    font-size: 14px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(123, 97, 69, 0.12);
    border-radius: 16px;
    background: var(--paper-strong);
    color: var(--text-main);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.field textarea {
    min-height: 110px;
    resize: vertical;
}

.switch-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(123, 97, 69, 0.12);
    background: rgba(255, 251, 245, 0.9);
    color: var(--text-main);
}

.switch-field input {
    width: 18px;
    height: 18px;
    margin: 0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: rgba(204, 106, 47, 0.32);
    box-shadow: 0 0 0 4px rgba(204, 106, 47, 0.08);
}

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 26px 0;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    gap: 20px;
}

.auth-shell--wide {
    grid-template-columns: minmax(0, 1fr) minmax(420px, 1.08fr);
}

.auth-panel--hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(255, 231, 203, 0.16), transparent 28%),
        linear-gradient(135deg, var(--hero-start) 0%, var(--hero-end) 100%);
    color: #fff7ee;
}

.auth-panel--hero::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -60px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255, 239, 219, 0.08);
}

.auth-copy,
.feature-list {
    position: relative;
    z-index: 1;
}

.auth-copy h1 {
    margin: 0;
    font-size: clamp(32px, 3vw, 42px);
    line-height: 1.14;
}

.auth-copy p {
    margin: 16px 0 0;
    color: rgba(255, 244, 229, 0.84);
    line-height: 1.8;
}

.feature-list {
    display: grid;
    gap: 12px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.feature-list li {
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 248, 237, 0.12);
    border: 1px solid rgba(255, 239, 219, 0.16);
    color: rgba(255, 244, 229, 0.86);
}

.auth-header {
    margin-bottom: 18px;
}

.auth-header h2 {
    margin: 0;
    font-size: 24px;
}

.auth-actions--full {
    grid-column: 1 / -1;
}

@media (max-width: 1280px) {
    .stats-ribbon {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 360px minmax(0, 1fr);
    }
}

@media (max-width: 1120px) {
    .dashboard-grid,
    .auth-shell,
    .auth-shell--wide {
        grid-template-columns: 1fr;
    }

    .control-column {
        position: static;
    }
}

@media (max-width: 900px) {
    .appbar,
    .hero-panel,
    .board-card--summary,
    .control-card__header--split,
    .group-head,
    .character-head,
    .voice-row {
        flex-direction: column;
        display: flex;
    }

    .hero-panel {
        grid-template-columns: 1fr;
    }

    .board-card__tags {
        justify-content: flex-start;
        max-width: none;
    }
}

@media (max-width: 640px) {
    .dashboard-app,
    .auth-shell {
        width: min(100% - 20px, 100%);
    }

    .stats-ribbon,
    .form--grid {
        grid-template-columns: 1fr;
    }

    .appbar__actions,
    .actions,
    .auth-actions,
    .quick-links,
    .hero-panel__links {
        width: 100%;
    }

    .appbar__actions .button,
    .actions .button,
    .auth-actions .button {
        width: 100%;
    }

    .voice-audio {
        width: 100%;
    }
}
