:root {
    --page-bg: #f7f8fb;
    --panel-bg: #ffffff;
    --panel-soft: #f0f3f8;
    --text: #172033;
    --muted: #667085;
    --border: #d8dee9;
    --primary: #155eef;
    --primary-hover: #004eeb;
    --danger: #d92d20;
    --success: #027a48;
    --shadow: 0 16px 40px rgba(23, 32, 51, 0.08);
    --radius: 8px;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background: var(--page-bg);
    display: flex;
    flex-direction: column;
}

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

a:hover {
    color: var(--primary-hover);
}

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

main {
    flex: 1;
}

.site-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    transition: background 180ms ease, border-color 180ms ease, backdrop-filter 180ms ease;
}

.navbar {
    max-width: 1120px;
    margin: 0 auto;
    min-height: 64px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.logo {
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    transition: color 180ms ease;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.nav-actions a {
    transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}

.nav-button,
.primary-button,
.secondary-button,
.danger-button,
.ghost-button {
    min-height: 40px;
    border: 0;
    border-radius: var(--radius);
    padding: 10px 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
}

.primary-button,
.nav-button {
    color: #ffffff;
    background: var(--primary);
}

.primary-button:hover,
.nav-button:hover {
    color: #ffffff;
    background: var(--primary-hover);
}

.secondary-button {
    color: var(--text);
    background: var(--panel-soft);
}

.danger-button {
    color: #ffffff;
    background: var(--danger);
}

.ghost-button {
    color: var(--primary);
    background: transparent;
    border: 1px solid var(--border);
}

.large {
    min-height: 48px;
    padding: 12px 20px;
}

/* ===== HOMEPAGE: WORLD CUP HERO ===== */
.wc-hero {
    --wc-gold: #f8c84b;
    --wc-gold-bright: #ffe994;
    --wc-green-deep: #06180e;
    --wc-green: #0d3a27;
    --wc-green-soft: #1f6a45;
    --wc-ink: #06110c;
    --wc-white-soft: rgba(255, 255, 255, 0.78);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 640px;
    padding: 140px 20px 80px;
    color: #ffffff;
    background:
        radial-gradient(circle at 50% 106%, rgba(248, 200, 75, 0.20) 0, rgba(248, 200, 75, 0.08) 18%, transparent 42%),
        radial-gradient(ellipse at 18% 28%, rgba(44, 172, 111, 0.26) 0, transparent 42%),
        radial-gradient(ellipse at 82% 18%, rgba(255, 216, 92, 0.18) 0, transparent 36%),
        linear-gradient(138deg, #06140c 0%, #0b2a1d 34%, #09291f 58%, #07130d 100%);
}

.wc-hero::before,
.wc-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.wc-hero::before {
    z-index: -2;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(ellipse at center, #000 0%, transparent 72%);
}

.wc-hero::after {
    z-index: -1;
    background:
        linear-gradient(180deg, rgba(6, 17, 12, 0.18) 0%, transparent 28%, rgba(6, 17, 12, 0.54) 100%),
        radial-gradient(ellipse at 50% 0%, transparent 0%, rgba(0, 0, 0, 0.26) 76%);
}

.wc-hero-bg,
.wc-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.wc-hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 68%, rgba(255, 255, 255, 0.09) 0 1px, transparent 2px),
        radial-gradient(circle at 63% 35%, rgba(255, 255, 255, 0.08) 0 1px, transparent 2px);
    background-size: 128px 128px, 176px 176px;
    opacity: 0.55;
}

.particle {
    position: absolute;
    display: grid;
    place-items: center;
    width: 1em;
    height: 1em;
    color: rgba(255, 234, 163, 0.76);
    opacity: 0.14;
    text-shadow: 0 0 18px rgba(248, 200, 75, 0.38);
    animation: wc-particle-drift var(--duration, 22s) ease-in-out infinite;
    animation-delay: var(--delay, 0s);
}

.p1 { top: 16%; left: 8%; font-size: 32px; --duration: 24s; --delay: -1s; }
.p2 { top: 14%; left: 55%; font-size: 18px; --duration: 18s; --delay: -7s; }
.p3 { top: 63%; left: 15%; font-size: 20px; --duration: 27s; --delay: -12s; }
.p4 { top: 34%; left: 85%; font-size: 22px; --duration: 20s; --delay: -4s; }
.p5 { top: 78%; left: 44%; font-size: 16px; --duration: 25s; --delay: -16s; }
.p6 { top: 58%; left: 92%; font-size: 36px; --duration: 30s; --delay: -10s; }
.p7 { top: 86%; left: 72%; font-size: 15px; --duration: 19s; --delay: -3s; }
.p8 { top: 26%; left: 28%; font-size: 14px; --duration: 23s; --delay: -14s; }
.p9 { top: 72%; left: 57%; font-size: 24px; --duration: 28s; --delay: -6s; }
.p10 { top: 47%; left: 4%; font-size: 18px; --duration: 21s; --delay: -18s; }

@keyframes wc-particle-drift {
    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg) scale(0.92);
        opacity: 0.08;
    }
    32% {
        transform: translate3d(18px, -34px, 0) rotate(54deg) scale(1.08);
        opacity: 0.2;
    }
    66% {
        transform: translate3d(-12px, -18px, 0) rotate(126deg) scale(0.98);
        opacity: 0.12;
    }
}

.wc-hero-shell {
    width: min(1180px, 100%);
    min-height: 452px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.88fr);
    align-items: center;
    gap: 44px;
    position: relative;
    z-index: 1;
}

.wc-hero-content {
    max-width: 620px;
}

.wc-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 16px;
    border: 1px solid rgba(255, 225, 125, 0.36);
    border-radius: 999px;
    margin-bottom: 22px;
    color: var(--wc-gold-bright);
    background: rgba(255, 221, 102, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 16px 34px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 800;
}

.wc-title {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.wc-title-line {
    color: #ffffff;
    font-size: 62px;
    font-weight: 900;
    line-height: 1.04;
    letter-spacing: 0;
    text-wrap: balance;
    text-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.wc-title-line.accent {
    color: var(--wc-gold-bright);
    background: linear-gradient(105deg, #fff4af 0%, #f8c84b 38%, #e59b22 68%, #ffe68a 100%);
    background-size: 160% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 16px 26px rgba(248, 200, 75, 0.18));
}

.wc-subtitle {
    max-width: 520px;
    margin: 22px 0 30px;
    color: var(--wc-white-soft);
    font-size: 18px;
    line-height: 1.75;
}

.wc-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.wc-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 54px;
    padding: 15px 30px;
    border: 1px solid rgba(255, 244, 188, 0.72);
    border-radius: 12px;
    color: #1c1607;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 48%),
        linear-gradient(135deg, #fff0a6 0%, #f8c84b 36%, #d98b18 100%);
    box-shadow: 0 16px 34px rgba(248, 200, 75, 0.28), 0 4px 10px rgba(0, 0, 0, 0.18);
    font-size: 18px;
    font-weight: 900;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.wc-cta::after {
    content: "";
    position: absolute;
    inset: -7px;
    z-index: -1;
    border-radius: 16px;
    background: radial-gradient(circle, rgba(248, 200, 75, 0.38), transparent 66%);
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 180ms ease, transform 180ms ease;
}

.wc-cta:hover,
.wc-cta:focus-visible {
    color: #1c1607;
    transform: translateY(-2px);
    filter: saturate(1.06);
    box-shadow: 0 20px 48px rgba(248, 200, 75, 0.42), 0 8px 18px rgba(0, 0, 0, 0.22);
}

.wc-cta:hover::after,
.wc-cta:focus-visible::after {
    opacity: 1;
    transform: scale(1);
    animation: wc-cta-glow 1.7s ease-in-out infinite;
}

.wc-cta-arrow {
    font-size: 20px;
    line-height: 1;
    transition: transform 180ms ease;
}

.wc-cta:hover .wc-cta-arrow,
.wc-cta:focus-visible .wc-cta-arrow {
    transform: translateX(4px);
}

.wc-cta.secondary {
    min-height: 48px;
    border-color: rgba(202, 142, 32, 0.22);
    color: #7b4c05;
    background: #fff9e8;
    box-shadow: 0 10px 28px rgba(108, 67, 4, 0.08);
}

.wc-cta.secondary:hover,
.wc-cta.secondary:focus-visible {
    color: #5d3904;
    box-shadow: 0 14px 34px rgba(108, 67, 4, 0.12);
}

@keyframes wc-cta-glow {
    0%, 100% { opacity: 0.56; transform: scale(0.98); }
    50% { opacity: 0.95; transform: scale(1.03); }
}

.wc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 38px;
}

.wc-meta-item {
    min-width: 104px;
    padding: 11px 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.055);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.wc-meta-num {
    display: block;
    color: var(--wc-gold-bright);
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.wc-meta-label {
    display: block;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    font-weight: 700;
}

.wc-hero-visual {
    position: relative;
    min-height: 430px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-visual-orbit {
    position: absolute;
    width: min(390px, 92%);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 223, 127, 0.16);
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(255, 232, 148, 0.16), transparent 56%),
        conic-gradient(from 120deg, transparent, rgba(255, 233, 148, 0.26), transparent 34%, rgba(37, 169, 104, 0.24), transparent 72%);
    box-shadow: 0 0 90px rgba(28, 138, 82, 0.18), inset 0 0 70px rgba(0, 0, 0, 0.24);
    opacity: 0.86;
    animation: wc-orbit 18s linear infinite;
}

@keyframes wc-orbit {
    to { transform: rotate(360deg); }
}

.wc-trophy {
    position: relative;
    z-index: 2;
    width: 190px;
    transform: translateX(-34px) translateY(-8px);
    filter: drop-shadow(0 28px 40px rgba(0, 0, 0, 0.34)) drop-shadow(0 0 34px rgba(248, 200, 75, 0.24));
}

.wc-trophy svg {
    display: block;
    width: 100%;
    height: auto;
}

.wc-hero-photo {
    position: absolute;
    right: -20px;
    bottom: 0;
    width: 58%;
    height: 110%;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.wc-hero-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 35% 40%;
    /* Desaturate + darken → shift toward hero's dark green palette */
    filter: saturate(0.15) brightness(0.68) contrast(1.08);
    /* Radial mask — feather into background on ALL sides */
    mask-image: radial-gradient(
        ellipse 62% 72% at 38% 52%,
        rgba(0,0,0,1)     18%,
        rgba(0,0,0,0.88)   38%,
        rgba(0,0,0,0.45)   62%,
        rgba(0,0,0,0.1)    82%,
        transparent         100%
    );
    -webkit-mask-image: radial-gradient(
        ellipse 62% 72% at 38% 52%,
        rgba(0,0,0,1)     18%,
        rgba(0,0,0,0.88)   38%,
        rgba(0,0,0,0.45)   62%,
        rgba(0,0,0,0.1)    82%,
        transparent         100%
    );
}

/* Green tint overlay — blends photo into hero background */
.wc-hero-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 58% 68% at 40% 48%,
        transparent              24%,
        rgba(13, 58, 39, 0.18)  42%,
        rgba(9, 41, 31, 0.45)   62%,
        rgba(6, 17, 12, 0.82)   84%,
        rgba(6, 17, 12, 1)      100%
    );
    pointer-events: none;
}

.wc-visual-ground {
    position: absolute;
    left: 14%;
    right: 9%;
    bottom: 56px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.36), transparent 66%);
    filter: blur(2px);
}

/* ===== HOMEPAGE: INTRO CARDS ===== */
.wc-intro {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0 42px;
}

.wc-intro-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.wc-intro-card {
    min-height: 206px;
    padding: 26px;
    border: 1px solid rgba(20, 37, 29, 0.08);
    border-radius: 8px;
    background:
        linear-gradient(180deg, #ffffff, #fbfcf8),
        radial-gradient(circle at top right, rgba(248, 200, 75, 0.12), transparent 45%);
    box-shadow: 0 16px 38px rgba(23, 32, 51, 0.06);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.wc-intro-card:hover {
    transform: translateY(-3px);
    border-color: rgba(202, 142, 32, 0.24);
    box-shadow: 0 22px 48px rgba(23, 32, 51, 0.09);
}

.wc-intro-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    margin-bottom: 18px;
    background: #f5f8ee;
    box-shadow: inset 0 0 0 1px rgba(31, 106, 69, 0.08);
    font-size: 27px;
}

.wc-intro-card h3 {
    margin: 0 0 9px;
    color: #172033;
    font-size: 18px;
    line-height: 1.35;
}

.wc-intro-card p {
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.75;
}

.wc-intro-cta {
    display: flex;
    justify-content: center;
    margin-top: 34px;
}

/* ===== HOMEPAGE: SECONDARY SITES ===== */
.my-sites {
    width: min(700px, calc(100% - 40px));
    margin: 0 auto;
    padding: 10px 0 68px;
}

.my-sites-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.my-sites-divider::before,
.my-sites-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e7ebf0;
}

.my-sites-divider span {
    color: #98a2b3;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.my-sites-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.my-sites-grid.single {
    grid-template-columns: minmax(0, 360px);
    justify-content: center;
}

.my-site-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 14px 15px;
    border: 1px solid #eef1f5;
    border-radius: 8px;
    color: #475467;
    background: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.my-site-card:hover {
    color: #344054;
    border-color: #d9dee7;
    background: #ffffff;
    transform: translateY(-1px);
}

.my-site-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #f4f6f8;
    font-size: 20px;
}

.my-site-card strong {
    display: block;
    color: #344054;
    font-size: 14px;
    line-height: 1.35;
}

.my-site-card small {
    display: block;
    margin-top: 3px;
    color: #98a2b3;
    font-size: 12px;
    line-height: 1.45;
}

.my-sites-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.subtle-link {
    color: #98a2b3;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: color 160ms ease;
}

.subtle-link:hover {
    color: #667085;
}

/* ===== KEEP EXISTING STYLES BELOW ===== */
.auth-panel,
.dashboard-wrap,
.wizard-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 36px 20px 72px;
}

.wizard-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.form-card,
.panel,
.link-row {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
}

.auth-panel {
    max-width: 460px;
}

.auth-panel h1,
.dashboard-wrap h1,
.wizard-wrap h1 {
    margin: 0 0 22px;
}

.wizard-wrap h1 {
    grid-column: 1 / -1;
}

.form-card,
.panel {
    padding: 24px;
}

.form-card {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

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

textarea {
    min-height: 90px;
    resize: vertical;
}

.flash-wrap {
    max-width: 1120px;
    margin: 18px auto 0;
    padding: 0 20px;
}

.flash {
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 10px;
    background: #eef4ff;
    border: 1px solid #b2ccff;
}

.flash-error {
    color: #912018;
    background: #fef3f2;
    border-color: #fecdca;
}

.flash-success {
    color: #05603a;
    background: #ecfdf3;
    border-color: #abefc6;
}

.site-footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    padding: 24px 20px;
    text-align: center;
    background: #ffffff;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.4fr);
    gap: 18px;
    align-items: start;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading h2,
.section-heading p {
    margin: 0;
}

.site-summary {
    display: flex;
    align-items: center;
    gap: 18px;
}

.summary-avatar {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #eef4ff;
    overflow: hidden;
    flex: 0 0 auto;
}

.summary-avatar span {
    font-size: 38px;
}

.summary-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stacked-form,
.add-link-form,
.wizard {
    display: grid;
    gap: 16px;
}

.link-manager {
    margin-top: 18px;
}

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

.category-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.guidance-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #eef4ff;
    border: 1px solid #bdd7ff;
    border-radius: var(--radius);
    padding: 14px 16px;
}

.guidance-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.guidance-box p {
    margin: 0;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

.category-guide {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 4px;
}

.category-guide span {
    font-weight: 600;
    font-size: 14px;
}

.category-guide small {
    color: var(--muted);
    font-size: 12px;
}

.check-pill {
    display: inline-flex;
    width: auto;
    cursor: pointer;
}

.check-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check-pill span {
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #ffffff;
    padding: 8px 12px;
    color: var(--muted);
    font-weight: 700;
}

.check-pill input:checked + span {
    border-color: var(--primary);
    color: var(--primary);
    background: #eef4ff;
}

.link-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.link-row {
    padding: 14px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto auto;
    gap: 14px;
    align-items: start;
}

.link-row.dragging {
    opacity: 0.6;
}

.drag-handle {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--muted);
    cursor: grab;
}

.link-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.link-main a,
.public-link-card small {
    overflow-wrap: anywhere;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-row span,
.limit-text {
    color: var(--muted);
    background: var(--panel-soft);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 13px;
}

.link-edit {
    min-width: 240px;
}

.link-edit summary {
    cursor: pointer;
    color: var(--primary);
    font-weight: 700;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(36px, 1fr));
    gap: 8px;
}

.emoji-grid.compact {
    grid-template-columns: repeat(10, 36px);
}

.emoji-option,
.emoji-radio span {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #ffffff;
    display: grid;
    place-items: center;
    cursor: pointer;
    font-size: 22px;
}

.emoji-option.selected,
.emoji-radio input:checked + span {
    border-color: var(--primary);
    background: #eef4ff;
}

.emoji-radio {
    width: auto;
}

.emoji-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wizard {
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}

.wizard-step {
    display: none;
    gap: 18px;
}

.wizard-step.active {
    display: grid;
}

.step-heading {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.step-heading span {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
}

.step-heading h2,
.field-group h3 {
    margin: 0;
}

.step-subtitle {
    grid-column: 1 / -1;
    margin: -10px 0 4px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
}

.domain-field {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: #ffffff;
}

.domain-field input {
    border: 0;
    border-radius: 0;
}

.domain-field strong {
    padding: 0 14px;
    color: var(--muted);
    white-space: nowrap;
}

.field-status.ok {
    color: var(--success);
}

.field-status.error,
.limit-text {
    color: var(--danger);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.theme-option {
    text-align: left;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #ffffff;
    padding: 14px;
    display: grid;
    gap: 8px;
    cursor: pointer;
}

.theme-option.selected {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px #dbeafe;
}

.theme-swatch {
    width: 100%;
    height: 42px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.theme-swatch-cyberpunk { background: linear-gradient(135deg, #0a0a0f, #00ff88, #ff3df2); }
.theme-swatch-minimal { background: linear-gradient(135deg, #ffffff, #eef4ff); }
.theme-swatch-dark { background: linear-gradient(135deg, #111315, #4ade80); }
.theme-swatch-gradient { background: linear-gradient(135deg, #4c1d95, #f97316); }
.theme-swatch-retro { background: linear-gradient(135deg, #211536, #fff4a3, #00d9ff); }
.theme-swatch-nature { background: linear-gradient(135deg, #eef7ed, #2f855a); }
.theme-swatch-business { background: linear-gradient(135deg, #eef4fb, #0b5cad); }
.theme-swatch-warm { background: linear-gradient(135deg, #fff7ed, #ea580c); }
.theme-swatch-glass { background: linear-gradient(135deg, #e0f2fe, #f5d0fe, #dcfce7); }
.theme-swatch-ink { background: linear-gradient(135deg, #f7f2e8, #1f4d3a); }

.pending-links {
    display: grid;
    gap: 10px;
}

.pending-empty {
    text-align: center;
    padding: 28px 16px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
}

.pending-empty span {
    font-size: 28px;
    display: block;
    margin-bottom: 8px;
    opacity: 0.5;
}

.pending-empty p {
    margin: 0;
    font-size: 14px;
}

.pending-link {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.pending-link div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.pending-link span {
    color: var(--muted);
    overflow-wrap: anywhere;
}

.wizard-actions {
    display: flex;
    justify-content: space-between;
}

.review-box {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--panel-soft);
    padding: 18px;
}

.review-confirm-list {
    display: grid;
    gap: 14px;
}

.review-confirm-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.review-confirm-item .review-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.review-confirm-item strong {
    display: block;
    margin-bottom: 2px;
    color: var(--text);
    font-size: 15px;
}

.review-confirm-item .muted {
    margin: 0;
    font-size: 13px;
}

.review-confirm-item code {
    background: #eef4ff;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--primary);
}

.live-preview {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: var(--panel-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.live-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--panel-soft);
    border-radius: var(--radius) var(--radius) 0 0;
}

.live-preview-header h3 {
    margin: 0;
    font-size: 15px;
    color: var(--text);
}

.live-preview-header span {
    font-size: 18px;
}

.live-preview-body {
    padding: 16px;
}

.live-preview-profile {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.live-preview-avatar {
    width: 56px;
    height: 56px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: var(--panel-soft);
    border: 1px solid var(--border);
    display: grid;
    place-items: center;
    font-size: 28px;
    overflow: hidden;
}

.live-preview-profile strong {
    display: block;
    font-size: 16px;
    color: var(--text);
    margin-bottom: 2px;
}

.live-preview-profile small {
    color: var(--muted);
    font-size: 12px;
}

.live-preview-links {
    display: grid;
    gap: 8px;
}

.preview-empty {
    text-align: center;
    padding: 20px 12px;
    color: var(--muted);
    font-size: 13px;
}

.preview-empty span {
    font-size: 22px;
    display: block;
    margin-bottom: 6px;
    opacity: 0.4;
}

.preview-empty p {
    margin: 0;
}

.preview-link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--panel-soft);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
}

.preview-link-item .preview-link-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.preview-link-item .preview-link-title {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-link-item .preview-link-cats {
    margin-left: auto;
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.public-home {
    color: var(--text-primary);
    background: var(--bg-primary);
    font-family: var(--font);
}

.public-shell {
    width: min(980px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0 36px;
}

.public-profile {
    text-align: center;
    margin-bottom: 36px;
}

.public-avatar {
    width: 92px;
    height: 92px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.emoji-avatar {
    font-size: 46px;
}

.image-avatar {
    object-fit: cover;
}

.public-profile h1 {
    margin: 0;
    font-size: 34px;
    color: var(--text-primary);
}

.public-profile p,
.public-footer,
.public-footer a {
    color: var(--text-secondary);
}

.public-sections {
    display: grid;
    gap: 24px;
}

.public-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

.public-section h2 {
    margin: 0 0 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.public-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.public-link-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text-primary);
    padding: 14px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.public-link-card:hover {
    color: var(--accent);
    border-color: var(--accent);
}

.public-link-card img,
.default-favicon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: grid;
    place-items: center;
}

.public-link-card span {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.public-link-card small {
    color: var(--text-secondary);
}

.empty-public {
    text-align: center;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 28px;
}

.public-footer {
    padding: 24px 16px;
    text-align: center;
}

/* ===== HOMEPAGE NAVBAR ===== */
@supports selector(body:has(.wc-hero)) {
    body:has(.wc-hero) .site-header {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        background: transparent;
        border-bottom-color: rgba(255, 255, 255, 0.10);
        backdrop-filter: none;
    }

    body:has(.wc-hero) .site-header .logo {
        color: #ffffff;
    }

    body:has(.wc-hero) .site-header .nav-actions a {
        color: rgba(255, 255, 255, 0.84);
    }

    body:has(.wc-hero) .site-header .nav-actions a:hover {
        color: #ffffff;
    }

    body:has(.wc-hero) .site-header .nav-button {
        border: 1px solid rgba(255, 225, 125, 0.36);
        color: #ffe994;
        background: rgba(255, 221, 102, 0.13);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    }

    body:has(.wc-hero) .site-header .nav-button:hover {
        color: #1c1607;
        background: #f8c84b;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1040px) {
    .wc-hero {
        min-height: 590px;
        padding-bottom: 60px;
    }

    .wc-hero-shell {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
        gap: 26px;
    }

    .wc-title-line {
        font-size: 52px;
    }

    .wc-trophy {
        width: 166px;
        transform: translateX(-24px) translateY(-4px);
    }

    .wc-hero-photo {
        right: 0;
        width: 50%;
        height: 100%;
    }
}

@media (max-width: 900px) {
    .wizard-wrap {
        grid-template-columns: 1fr;
    }

    .wizard-wrap h1 {
        grid-column: auto;
    }

    .live-preview {
        position: static;
        max-height: none;
    }
}

@media (max-width: 820px) {
    .wc-hero {
        min-height: auto;
        padding: 112px 20px 54px;
    }

    .wc-hero-shell {
        min-height: 0;
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .wc-hero-content {
        max-width: 640px;
    }

    .wc-title-line {
        font-size: 43px;
    }

    .wc-subtitle {
        max-width: 560px;
        font-size: 17px;
    }

    .wc-hero-visual {
        min-height: 270px;
        justify-content: flex-start;
        padding-left: 8%;
    }

    .wc-visual-orbit {
        width: 280px;
    }

    .wc-trophy {
        width: 142px;
        transform: translateX(12px) translateY(0);
    }

    .wc-hero-photo {
        right: 0;
        width: 100%;
        height: 60%;
        bottom: 0;
    }

    .wc-visual-ground {
        left: 6%;
        right: 22%;
        bottom: 34px;
    }

    .wc-intro {
        padding-top: 46px;
    }

    .wc-intro-grid,
    .my-sites-grid {
        grid-template-columns: 1fr;
    }

    .wc-intro-card {
        min-height: auto;
    }

    .dashboard-grid,
    .builder-grid,
    .link-row {
        grid-template-columns: 1fr;
    }

    .link-edit {
        min-width: 0;
    }
}

@media (max-width: 620px) {
    .wc-hero {
        padding-top: 128px;
    }

    .wc-badge {
        font-size: 13px;
    }

    .wc-title-line {
        font-size: 35px;
    }

    .wc-hero-visual {
        display: none;
    }

    .wc-meta {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .wc-meta-item {
        min-width: 0;
        padding: 10px;
    }

    .wc-meta-num {
        font-size: 24px;
    }
}

@media (max-width: 560px) {
    .navbar,
    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav-actions,
    .wc-hero-actions {
        width: 100%;
    }

    .nav-actions a,
    .wc-hero-actions a {
        flex: 1;
    }

    .wc-cta {
        width: 100%;
        min-height: 52px;
        padding-inline: 18px;
        font-size: 17px;
    }

    .wc-title-line {
        font-size: 31px;
    }

    .wc-subtitle {
        margin-bottom: 24px;
    }

    .wc-intro,
    .my-sites {
        width: min(100% - 32px, 700px);
    }

    .wc-intro-card {
        padding: 22px;
    }
}

@media (max-width: 390px) {
    .wc-title-line {
        font-size: 28px;
    }

    .wc-meta-label {
        font-size: 12px;
    }

    .my-sites-footer {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .particle,
    .wc-visual-orbit,
    .wc-cta:hover::after,
    .wc-cta:focus-visible::after {
        animation: none;
    }

    .wc-cta,
    .wc-cta::after,
    .wc-cta-arrow,
    .wc-intro-card,
    .my-site-card {
        transition: none;
    }
}
