:root {
    --bg: #eef1f5;
    --card: #ffffff;
    --card-soft: #f8fafc;
    --border: #e2e6ec;
    --line: #d9dee7;
    --text: #18202b;
    --sub: #667085;
    --muted: #8a94a6;
    --red: #c8241f;
    --red-deep: #8f1613;
    --red-soft: #fff3f1;
    --gold: #b9852b;
    --gold-soft: #fff7e8;
    --ink: #182333;
    --radius: 8px;
    --shadow: 0 12px 34px rgba(15, 23, 42, .08);
    --shadow-soft: 0 8px 22px rgba(15, 23, 42, .06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

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

button,
input,
textarea {
    font: inherit;
}

.site-app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid rgba(226, 230, 236, .92);
    box-shadow: 0 8px 24px rgba(15, 23, 42, .05);
    backdrop-filter: blur(16px);
}

.site-app-header-inner {
    max-width: 760px;
    min-height: 64px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.site-app-logo {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-app-logo-box {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: linear-gradient(145deg, #d92d25, #981914);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 18px rgba(200, 36, 31, .18);
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.site-app-logo-box img {
    width: 32px;
    height: 32px;
    display: block;
}

.site-app-logo-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.site-app-logo-text strong {
    font-size: 16px;
    line-height: 1.1;
}

.site-app-logo-text small {
    color: var(--sub);
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-action {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #efc7a0;
    background: #fff9ef;
    color: #965b12;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.create-shell {
    max-width: 760px;
    margin: 0 auto;
    padding: 12px 12px 124px;
}

.notice-card,
.form-card,
.locked-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
}

.premium-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 166px;
    gap: 14px;
    padding: 18px;
    margin-bottom: 12px;
    border-color: #e5dfd3;
    background: #fffdf9;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}

.hero-copy {
    min-width: 0;
}

.hero-eyebrow {
    width: max-content;
    max-width: 100%;
    min-height: 26px;
    padding: 0;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: #8a611f;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
}

.hero-eyebrow svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.premium-hero h1,
.locked-card h2 {
    margin: 0;
    font-size: 22px;
    line-height: 1.22;
}

.premium-hero h1 {
    margin-top: 10px;
    max-width: 520px;
    color: #121a26;
    letter-spacing: .2px;
}

.premium-hero p,
.locked-card p {
    margin: 8px 0 0;
    color: var(--sub);
    font-size: 13px;
    line-height: 1.7;
}

.premium-hero p {
    max-width: 570px;
}

.credential-panel {
    min-height: 148px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid #ded3be;
    background: #1c2533;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.credential-seal {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    margin-bottom: 12px;
    background: #d8b36a;
    color: #321f08;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}

.credential-seal svg {
    width: 36px;
    height: 36px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.credential-panel strong {
    font-size: 16px;
    line-height: 1.2;
}

.credential-panel small {
    margin-top: 4px;
    color: rgba(255, 255, 255, .68);
    font-size: 11px;
}

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

.form-card {
    padding: 15px;
}

.profile-card .form-grid {
    padding: 12px;
    border: 1px solid #ebe3d6;
    border-radius: var(--radius);
    background: #fbf8f1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .72);
}

.profile-card .field input,
.profile-card .field textarea {
    border-color: #d8d0c2;
    background: rgba(255, 255, 255, .92);
}

.section-head {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.section-head > span {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: linear-gradient(145deg, var(--red), var(--red-deep));
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 800;
    flex: 0 0 auto;
    box-shadow: 0 8px 16px rgba(200, 36, 31, .16);
}

.section-head h2 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
}

.section-head p {
    margin: 5px 0 0;
    color: var(--sub);
    font-size: 12px;
    line-height: 1.5;
}

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

.feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.option-card {
    min-height: 70px;
    position: relative;
    display: flex;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.option-card input {
    position: absolute;
    inset: 10px 10px auto auto;
    width: 16px;
    height: 16px;
    accent-color: var(--red);
}

.option-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-right: 24px;
}

.option-main strong {
    font-size: 13px;
    line-height: 1.2;
}

.option-main small {
    color: var(--sub);
    font-size: 11px;
    line-height: 1.45;
}

.theme-grid .option-card {
    min-height: 132px;
    padding: 13px;
}

.theme-grid .option-main {
    min-height: 100%;
}

.theme-grid .option-main strong {
    font-weight: 750;
}

.theme-preview {
    height: 36px;
    margin-top: auto;
    padding: 7px;
    border-radius: 7px;
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 5px;
}

.theme-preview i {
    border-radius: 999px;
    display: block;
}

.theme-preview i:first-child {
    grid-row: 1 / 3;
    border-radius: 6px;
}

.theme-red {
    border-color: #ead8bc;
    background: #fffaf2;
}

.theme-red .option-main strong {
    color: #8f1613;
}

.theme-red .theme-preview {
    background: linear-gradient(135deg, #8f1613, #c8241f);
}

.theme-red .theme-preview i {
    background: rgba(255, 235, 190, .86);
}

.theme-red .theme-preview i:first-child {
    background: #d8b36a;
}

.theme-blue {
    border-color: #d9e8f5;
    background: #f7fbff;
}

.theme-blue .option-main strong {
    color: #235c9c;
}

.theme-blue .theme-preview {
    background: #eaf4ff;
    border: 1px solid #cfe3f6;
}

.theme-blue .theme-preview i {
    background: #8bbbe8;
}

.theme-blue .theme-preview i:first-child {
    background: #ffffff;
    border: 1px solid #bad6ee;
}

.theme-dark {
    border-color: #2f3948;
    background: #1c2533;
}

.theme-dark .option-main strong {
    color: #fff4d8;
}

.theme-dark .option-main small {
    color: rgba(255, 255, 255, .66);
}

.theme-dark input {
    accent-color: var(--gold);
}

.theme-dark .theme-preview {
    background: #101722;
    border: 1px solid rgba(255, 255, 255, .08);
}

.theme-dark .theme-preview i {
    background: rgba(255, 255, 255, .18);
}

.theme-dark .theme-preview i:first-child {
    background: #d8b36a;
}

.option-card:has(input:checked) {
    border-color: #e6bd7f;
    background: #fffaf2;
    box-shadow: 0 8px 18px rgba(185, 133, 43, .10);
}

.theme-red:has(input:checked) {
    border-color: #d8b36a;
    box-shadow: 0 10px 22px rgba(143, 22, 19, .10);
}

.theme-blue:has(input:checked) {
    border-color: #8bbbe8;
    background: #f7fbff;
    box-shadow: 0 10px 22px rgba(35, 92, 156, .10);
}

.theme-dark:has(input:checked) {
    border-color: #d8b36a;
    background: #1c2533;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .16);
}

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

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

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

.field span {
    color: #344054;
    font-size: 12px;
    font-weight: 650;
}

.field input,
.field textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    outline: none;
    font-size: 16px;
}

.field input {
    height: 42px;
    padding: 0 11px;
}

.field textarea {
    resize: vertical;
    min-height: 102px;
    padding: 10px 11px;
    line-height: 1.6;
}

.field input:focus,
.field textarea:focus {
    border-color: #d9ad6c;
    box-shadow: 0 0 0 3px rgba(185, 133, 43, .12);
}

.field-error {
    min-height: 18px;
    margin-top: 8px;
    color: #b42318;
    font-size: 12px;
}

.submit-bar {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.submit-bar {
    position: sticky;
    bottom: 64px;
    z-index: 90;
    margin: 2px -2px 0;
    padding: 10px 2px 10px;
    background: linear-gradient(180deg, rgba(238, 241, 245, 0), rgba(238, 241, 245, .96) 34%);
}

.app-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    width: 100%;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid rgba(229, 231, 235, .95);
    box-shadow: 0 -12px 30px rgba(15, 23, 42, .10);
    backdrop-filter: blur(18px);
}

.app-tabbar-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}

.app-tab {
    min-width: 0;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 4px;
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    transition: background .16s ease, color .16s ease;
}

.app-tab svg {
    width: 23px;
    height: 23px;
    display: block;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.app-tab span {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.app-tab:hover,
.app-tab.active {
    color: #d92d20;
    background: #fff0ed;
}

.btn {
    min-height: 42px;
    padding: 0 17px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
}

.btn.primary {
    background: linear-gradient(135deg, var(--red), var(--red-deep));
    color: #fff;
    box-shadow: 0 10px 22px rgba(200, 36, 31, .18);
}

.btn.secondary {
    background: #fff;
    border-color: var(--border);
    color: var(--text);
}

.locked-card {
    padding: 18px;
}

.locked-card {
    border-color: #ead8bb;
    background: #fffaf2;
}

.hidden {
    display: none !important;
}

@media (hover: hover) {
    .option-card:hover {
        transform: translateY(-1px);
        border-color: #d8c5a8;
        box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
    }
}

@media (max-width: 720px) {
    .premium-hero {
        grid-template-columns: 1fr;
    }

    .credential-panel {
        min-height: auto;
        align-items: center;
        text-align: center;
    }
}

@media (min-width: 721px) {
    .create-shell {
        padding-top: 16px;
        padding-left: 16px;
        padding-right: 16px;
    }
}

@media (max-width: 640px) {
    .site-app-header-inner {
        min-height: 56px;
        padding: calc(env(safe-area-inset-top, 0px) + 8px) 10px 8px;
    }

    .create-shell {
        padding-top: 10px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .premium-hero h1 {
        font-size: 20px;
    }

    .option-grid,
    .feature-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .site-app-logo {
        max-width: calc(100vw - 128px);
    }

    .submit-bar {
        flex-direction: column-reverse;
    }

    .btn {
        width: 100%;
    }
}
