:root {
    --brand: #47c1cc;
    --brand-strong: #2fa9b5;
    --brand-soft: #def6f8;
    --brand-soft-2: #edf9fb;
    --bg: #f4fbfc;
    --bg-soft: #ffffff;
    --ink: #24333a;
    --muted: #6f8791;
    --line: #d8edf0;
    --card: #ffffff;
    --radius: 18px;
    --radius-sm: 14px;
    --shadow-soft: 0 10px 24px rgba(71, 193, 204, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Arial Rounded MT Bold", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at 15% 10%, rgba(71, 193, 204, 0.16), transparent 34%),
        radial-gradient(circle at 90% 22%, rgba(255, 201, 122, 0.18), transparent 28%),
        linear-gradient(180deg, #f8feff 0%, #effbfc 100%);
}

body.site-body {
    padding: 14px 14px 92px;
    min-height: 100vh;
    position: relative;
}

body.admin-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 90% 5%, rgba(71, 193, 204, 0.14), transparent 28%),
        linear-gradient(180deg, #f8feff 0%, #eef9fb 100%);
}

.ambient {
    position: fixed;
    border-radius: 999px;
    filter: blur(4px);
    z-index: 0;
    pointer-events: none;
}

.ambient-one {
    width: 160px;
    height: 160px;
    top: 82px;
    right: -50px;
    background: rgba(71, 193, 204, 0.24);
}

.ambient-two {
    width: 210px;
    height: 210px;
    bottom: 90px;
    left: -120px;
    background: rgba(255, 201, 122, 0.2);
}

.mobile-header,
.page-shell,
.bottom-nav,
.admin-shell {
    position: relative;
    z-index: 1;
}

.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px auto 14px;
    max-width: 1120px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.18rem;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
}

.brand::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 0 6px rgba(71, 193, 204, 0.18);
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-strong);
    font-weight: 700;
}

h1,
h2,
h3 {
    margin: 0 0 8px;
    line-height: 1.35;
}

h1 {
    font-size: clamp(1.3rem, 1.6rem + 0.5vw, 2rem);
}

h2 {
    font-size: clamp(1.08rem, 1.1rem + 0.25vw, 1.4rem);
}

h3 {
    font-size: 1rem;
}

p {
    margin: 0 0 10px;
}

.page-shell {
    max-width: 1120px;
    margin: 0 auto;
}

.compact-strip {
    margin-bottom: 12px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg-soft);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
}

.compact-strip__content,
.compact-strip__links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.strip-label,
.muted {
    color: var(--muted);
}

.card,
.hero-card,
.table-card {
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.hero-card,
.card {
    padding: 18px;
    margin-bottom: 14px;
}

.hero-card {
    display: grid;
    gap: 14px;
}

.home-top-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
}

.home-top-card__main {
    min-width: 0;
    flex: 1;
}

.home-top-card__main h2 {
    margin-bottom: 4px;
}

.home-top-card__main p {
    margin-bottom: 0;
}

.home-top-card__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    flex-shrink: 0;
}

.home-top-card__actions--top {
    align-self: flex-start;
}

.home-top-card .hero-actions {
    justify-content: flex-end;
}

.checkbox-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 10px;
}

.checkbox-grid label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.home-top-card .primary-button,
.home-top-card .ghost-button {
    min-height: 40px;
}

.primary-button--small {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.ghost-button--small {
    min-height: 32px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 0.82rem;
}

.game-section-heading {
    position: relative;
    min-height: 40px;
    padding-right: 90px;
    align-items: flex-start;
}

.game-change-btn {
    position: absolute;
    top: 0;
    right: 0;
}

.hero-copy,
.lead,
.article-body,
.card p,
.soft-panel p {
    line-height: 1.65;
}

.hero-panel,
.soft-panel,
.list-card,
.assessment-item,
.countdown-panel,
.countdown-chip {
    border-radius: var(--radius-sm);
    background: var(--brand-soft-2);
    border: 1px solid #ccecef;
}

.hero-panel,
.soft-panel,
.list-card,
.assessment-item,
.countdown-panel {
    padding: 14px;
}

.countdown-panel {
    margin-top: 12px;
    background: linear-gradient(180deg, #f3feff, #e8f8fa);
}

.countdown-chip {
    padding: 10px 12px;
    display: grid;
    gap: 4px;
    min-width: 168px;
}

.countdown-chip strong,
.countdown-panel strong {
    font-size: 1.03rem;
    color: var(--brand-strong);
}

.accent-panel {
    background: linear-gradient(180deg, #e8f8fa 0%, #f7fdfe 100%);
}

.section-heading,
.hero-actions,
.filter-row,
.search-row,
.row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.info-grid,
.card-list,
.mini-stat-grid {
    display: grid;
    gap: 10px;
}

.two-col {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.three-col {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card-list {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.mini-stat-grid {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
}

.mini-stat span,
.soft-panel span {
    display: block;
    color: var(--muted);
    margin-bottom: 6px;
}

.mini-stat strong,
.soft-panel strong,
.legend-item strong {
    font-size: 1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--brand);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 10px;
    margin-bottom: 10px;
}

.badge-soft {
    background: var(--brand-soft);
    color: #1f8691;
}

.primary-button,
.ghost-button,
.bottom-nav a,
a {
    transition: transform 0.16s ease, opacity 0.16s ease, background-color 0.16s ease;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 0 16px;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    font-weight: 700;
}

.primary-button {
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(71, 193, 204, 0.24);
}

.primary-button:hover {
    background: var(--brand-strong);
}

.ghost-button {
    background: #ffffff;
    color: var(--ink);
    border-color: var(--line);
}

.primary-button:hover,
.ghost-button:hover,
.bottom-nav a:hover,
a:hover {
    transform: translateY(-1px);
}

a {
    color: var(--brand-strong);
    text-decoration: none;
}

.form-card {
    max-width: 920px;
}

.narrow-card {
    max-width: 640px;
}

.stack-form {
    display: grid;
    gap: 12px;
}

.two-col-form {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.full-width {
    grid-column: 1 / -1;
}

label {
    display: grid;
    gap: 6px;
    color: #4f6771;
    font-weight: 600;
}

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

input,
select,
textarea {
    width: 100%;
    border-radius: 12px;
    border: 1px solid #cde8ec;
    background: #ffffff;
    padding: 11px 12px;
    color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(71, 193, 204, 0.25);
    border-color: var(--brand);
}

.inline-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-check input {
    width: auto;
}

.assessment-list {
    display: grid;
    gap: 12px;
}

.score-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.score-pill {
    position: relative;
}

.score-pill input {
    position: absolute;
    opacity: 0;
    inset: 0;
}

.score-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #cde8ec;
    font-weight: 700;
}

.score-pill input:checked + span {
    background: var(--brand);
    color: #ffffff;
    border-color: var(--brand);
}

.legend-list {
    display: grid;
    gap: 10px;
}

.split-line {
    padding: 8px 0;
    border-bottom: 1px dashed #cfe9ed;
}

.split-line:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.legend-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f6fcfd;
    border: 1px solid var(--line);
}

.radar-layout {
    display: grid;
    gap: 16px;
    align-items: center;
}

.radar-chart {
    width: 100%;
    max-width: 360px;
    justify-self: center;
}

.article-card {
    max-width: 900px;
}

.article-body {
    white-space: pre-wrap;
}

.flash-stack {
    margin-bottom: 10px;
}

.flash {
    padding: 11px 13px;
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid transparent;
}

.flash-success {
    background: #e6f9ee;
    border-color: #bdeece;
}

.flash-warning {
    background: #fff8e8;
    border-color: #ffe7b1;
}

.flash-danger {
    background: #fff0f0;
    border-color: #ffcfd0;
}

.danger-zone {
    margin-top: 14px;
}

.danger-button {
    color: #c64747;
    border-color: #f2c9c9;
    background: #fff7f7;
}

.danger-button:hover {
    background: #fff0f0;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 10px;
    transform: translateX(-50%);
    width: min(100%, 720px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 8px;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #d2eaee;
    box-shadow: 0 8px 18px rgba(71, 193, 204, 0.16);
}

.bottom-nav a {
    text-align: center;
    padding: 9px 0;
    border-radius: 10px;
    color: #47616a;
    font-weight: 600;
}

.bottom-nav a:hover {
    background: var(--brand-soft);
    color: #1f8791;
}

.bottom-nav a.active {
    background: var(--brand-soft);
    color: #1f8791;
}

.final-card-spacer {
    margin-bottom: 94px;
}

.admin-shell {
    display: grid;
    grid-template-columns: 232px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    display: grid;
    align-content: start;
    gap: 8px;
    padding: 22px 14px;
    background: #f6fcfd;
    border-right: 1px solid #d2eaee;
}

.admin-sidebar a {
    padding: 9px 10px;
    border-radius: 10px;
    color: #3d5861;
}

.admin-sidebar a:hover {
    background: var(--brand-soft);
    color: #1f8791;
}

.admin-main {
    padding: 22px;
}

.admin-header-block {
    margin-bottom: 14px;
}

.table-card {
    overflow: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.data-table th,
.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e1f1f3;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    font-weight: 700;
    color: #4c6871;
    background: #f3fafb;
}

.reveal-card {
    animation: pop-in 0.42s ease both;
}

@keyframes pop-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (min-width: 860px) {
    .hero-card {
        grid-template-columns: 1.24fr 1fr;
        align-items: stretch;
    }

    .radar-layout {
        grid-template-columns: minmax(320px, 420px) 1fr;
    }
}

@media (max-width: 859px) {
    .admin-shell {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        border-right: 0;
        border-bottom: 1px solid #d2eaee;
    }
}

@media (max-width: 640px) {
    body.site-body {
        padding: 12px 12px 96px;
    }

    .home-top-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-top-card__actions,
    .home-top-card .hero-actions {
        justify-content: flex-start;
    }

    .home-top-card__actions--top {
        width: 100%;
    }

    .home-top-card--has-baby {
        position: relative;
        flex-direction: row;
        padding-right: 112px;
    }

    .home-top-card--has-baby .home-top-card__actions--top {
        position: absolute;
        top: 12px;
        right: 12px;
        width: auto;
        justify-content: flex-end;
    }

    .home-top-card--has-baby .primary-button--small {
        min-height: 30px;
        padding: 0 10px;
        font-size: 0.8rem;
    }

    .game-section-heading {
        padding-right: 82px;
    }

    .game-change-btn {
        top: 0;
        right: 0;
    }

    .hero-card,
    .card,
    .table-card {
        padding: 14px;
        border-radius: 16px;
    }

    .bottom-nav {
        width: calc(100% - 14px);
    }

    .bottom-nav a {
        font-size: 0.8rem;
    }
}
