:root {
    color-scheme: light;
    --ink: #1d1d1f;
    --muted: #60605c;
    --line: #dfd4bf;
    --paper: #f7f1e6;
    --surface: #ffffff;
    --accent: #a72420;
    --accent-dark: #741916;
    --gold: #c79a45;
    --jade: #236455;
    --ink-soft: #27231f;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(199, 154, 69, 0.16), transparent 34rem),
        linear-gradient(180deg, #fffaf1 0%, var(--paper) 48%, #fff 100%);
    color: var(--ink);
    font-family: Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

a {
    color: inherit;
}

.site-header {
    min-height: 72px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.brand {
    color: var(--accent);
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: 0;
}

.navbar .nav-link {
    color: var(--muted);
    font-weight: 600;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--accent);
}

.btn-huatuan {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--accent-dark);
    --bs-btn-hover-border-color: var(--accent-dark);
    --bs-btn-focus-shadow-rgb: 167, 36, 32;
}

.site-main {
    min-height: calc(100vh - 70px);
}

.hero-carousel {
    background: var(--ink-soft);
}

.hero-slide {
    min-height: 64vh;
    color: #fff;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(22, 19, 15, 0.82), rgba(22, 19, 15, 0.3)),
        var(--hero-image) center/cover;
}

.hero-slide-heritage {
    --hero-image: url("https://images.unsplash.com/photo-1510332981392-36692ea3a195?auto=format&fit=crop&w=1800&q=80");
}

.hero-slide-clan {
    --hero-image: url("https://images.unsplash.com/photo-1528360983277-13d401cdc186?auto=format&fit=crop&w=1800&q=80");
}

.hero-slide-business {
    --hero-image: url("https://images.unsplash.com/photo-1518911710364-17ec553bde5d?auto=format&fit=crop&w=1800&q=80");
}

.hero-copy {
    position: relative;
    z-index: 1;
    display: flex;
    min-height: 64vh;
    flex-direction: column;
    justify-content: center;
    max-width: 720px;
    padding-block: clamp(72px, 12vw, 140px);
}

.eyebrow {
    margin: 0 0 12px;
    color: #f4d28a;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 16px;
    font-size: clamp(2.2rem, 7vw, 5rem);
    line-height: 1;
}

.hero-copy p:not(.eyebrow) {
    max-width: 580px;
    font-size: 1.15rem;
    line-height: 1.65;
}

.hero-copy .btn {
    align-self: flex-start;
    margin-top: 8px;
}

.feature-link {
    min-height: 180px;
    padding: 28px;
    background: var(--surface);
    border: 1px solid rgba(116, 25, 22, 0.12);
    border-radius: 8px;
    color: var(--ink);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.feature-link:hover,
.feature-link:focus {
    border-color: rgba(167, 36, 32, 0.32);
    box-shadow: 0 14px 40px rgba(54, 38, 20, 0.08);
    color: var(--ink);
    transform: translateY(-2px);
}

.feature-link strong {
    display: block;
    color: var(--accent-dark);
    font-size: 1.25rem;
}

.feature-link small {
    display: block;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.6;
}

.feature-kicker {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--jade);
    font-weight: 700;
}

.page-heading,
.auth-shell {
    padding-block: clamp(48px, 9vw, 92px);
}

.content-panel,
.auth-panel {
    padding: clamp(24px, 5vw, 42px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 251, 244, 0.96)),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 48px rgba(54, 38, 20, 0.08);
}

.content-panel h1,
.auth-panel h1 {
    margin-bottom: 16px;
    color: var(--ink-soft);
    font-size: clamp(2rem, 5vw, 3.25rem);
}

.admin-shell {
    min-height: calc(100vh - 72px);
}

.admin-title {
    margin: 0;
    color: var(--ink-soft);
    font-size: clamp(2rem, 5vw, 3.25rem);
}

.metric-card,
.admin-panel {
    height: 100%;
    padding: 24px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 14px 40px rgba(54, 38, 20, 0.06);
}

.metric-card span {
    display: block;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: capitalize;
}

.metric-card strong {
    display: block;
    margin-top: 10px;
    color: var(--accent-dark);
    font-size: 2.2rem;
    line-height: 1;
}

.admin-panel h2 {
    color: var(--ink-soft);
    font-size: 1.2rem;
}

.module-list .list-group-item {
    border-color: var(--line);
    color: var(--ink);
    font-weight: 600;
}

.module-list .list-group-item:hover,
.module-list .list-group-item:focus {
    background: #fff7e8;
    color: var(--accent-dark);
}

.admin-table {
    margin-bottom: 0;
}

.admin-table thead th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.admin-table td,
.admin-table th {
    border-color: var(--line);
}

.admin-table .btn {
    margin-block: 2px;
}

.avatar-sm {
    display: inline-grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-empty,
.member-photo-empty {
    background: #fff0d5;
    color: var(--accent-dark);
    font-weight: 800;
}

.profile-preview {
    width: 128px;
    height: 128px;
    border: 1px solid var(--line);
    border-radius: 8px;
    object-fit: cover;
}

.member-hero {
    padding-block: clamp(48px, 9vw, 96px);
    color: #fff;
    background:
        linear-gradient(90deg, rgba(31, 25, 18, 0.86), rgba(31, 25, 18, 0.42)),
        url("https://images.unsplash.com/photo-1528360983277-13d401cdc186?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.member-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
}

.member-code {
    color: #f4d28a;
    font-weight: 700;
}

.member-photo-lg {
    display: grid;
    width: clamp(120px, 18vw, 180px);
    height: clamp(120px, 18vw, 180px);
    place-items: center;
    border: 4px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
    font-size: 4rem;
    object-fit: cover;
}

.profile-intro {
    color: var(--muted);
    line-height: 1.8;
}

.qr-thumb-link {
    display: inline-flex;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.qr-thumb {
    width: 72px;
    height: 72px;
}

.qr-card {
    display: grid;
    justify-items: center;
    gap: 14px;
    text-align: center;
}

.qr-profile {
    width: min(220px, 100%);
    height: auto;
    padding: 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.form-control {
    border-color: var(--line);
    border-radius: 6px;
    padding: 0.75rem 0.875rem;
}

.form-control:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.25rem rgba(199, 154, 69, 0.2);
}

.form-label {
    color: var(--muted);
    font-weight: 700;
}

.carousel-indicators [data-bs-target] {
    width: 34px;
    height: 4px;
    border-radius: 999px;
}

@media (max-width: 640px) {
    .hero-slide,
    .hero-copy {
        min-height: 68vh;
    }
}
