:root {
            --primary: #c4956a;
            --primary-dark: #a87d52;
            --primary-light: #e8d4c0;
            --warm-bg-top: #c9a97a;
            --warm-bg-mid: #e5d3b8;
            --warm-bg-bottom: #faf6f1;
            --card: rgba(255, 255, 255, 0.88);
            --text: #4a3728;
            --text-light: #7a6655;
            --muted: rgba(74, 55, 40, 0.55);
            --danger: #b91c1c;
            --success: #2e7d32;
        }

        * { box-sizing: border-box; }

        body {
            margin: 0;
            font-family: 'Noto Serif SC', 'Songti SC', 'SimSun', 'PingFang SC', -apple-system, sans-serif;
            color: var(--text);
            min-height: 100vh;
            background: linear-gradient(180deg, var(--warm-bg-top) 0%, var(--warm-bg-mid) 35%, var(--warm-bg-bottom) 65%, #ffffff 100%);
            display: flex;
            justify-content: center;
        }

        a { color: inherit; }

        .container {
            width: min(420px, 92vw);
            padding: 18px 0 32px;
            position: relative;
        }

        .topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            color: rgba(255, 255, 255, 0.95);
            padding: 2px 2px 10px;
        }

        .topbar .back {
            appearance: none;
            border: none;
            background: transparent;
            color: rgba(255, 255, 255, 0.95);
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 15px;
            padding: 8px 8px;
            border-radius: 12px;
            cursor: pointer;
        }

        .topbar .back:active { transform: translateY(1px); }

        .lang-select {
            --card: #ffffff;
            --border: rgba(74, 55, 40, 0.10);
            --text: #4a3728;
            display: flex;
            align-items: center;
            gap: 6px;
            background: var(--card);
            border: 1px solid var(--border);
            padding: 6px 12px;
            border-radius: 10px;
            cursor: pointer;
        }

        .lang-select svg { width: 16px; height: 16px; }

        .lang-select select {
            border: none;
            background: transparent;
            color: var(--text);
            font-size: 13px;
            cursor: pointer;
            outline: none;
        }

        .lang-btn {
            --card: #ffffff;
            --border: rgba(74, 55, 40, 0.10);
            --text: #4a3728;
            appearance: none;
            border: 1px solid var(--border);
            background: var(--card);
            color: var(--text);
            padding: 6px 12px;
            border-radius: 10px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            line-height: 1;
        }

        .lang-btn:active { transform: translateY(1px); }
        .lang-btn svg { width: 16px; height: 16px; }
        .lang-label { font-weight: 700; }
        .lang-caret {
            width: 0;
            height: 0;
            border-left: 4px solid transparent;
            border-right: 4px solid transparent;
            border-top: 5px solid rgba(74, 55, 40, 0.6);
            margin-left: 2px;
        }

        .lang-overlay {
            position: fixed;
            inset: 0;
            display: flex;
            align-items: flex-start;
            justify-content: flex-end;
            padding: calc(env(safe-area-inset-top) + 56px) 16px 0;
            background: rgba(15, 23, 42, 0.10);
            backdrop-filter: blur(4px);
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
            z-index: 2100;
        }

        .lang-overlay.show { opacity: 1; pointer-events: auto; }

        .lang-panel {
            width: min(240px, 90vw);
            background: rgba(255, 255, 255, 0.98);
            border: 1px solid rgba(74, 55, 40, 0.12);
            border-radius: 16px;
            box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
            transform: translateY(-10px);
            transition: transform 0.2s ease;
            padding: 8px;
        }

        .lang-overlay.show .lang-panel { transform: translateY(0); }

        .lang-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 4px 6px 6px;
        }

        .lang-title {
            font-size: 13px;
            font-weight: 900;
            color: var(--text);
        }

        .lang-close {
            width: 30px;
            height: 30px;
            border: none;
            background: rgba(74, 55, 40, 0.06);
            border-radius: 10px;
            font-size: 18px;
            color: rgba(74, 55, 40, 0.75);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .lang-close:active { transform: translateY(1px); }

        .lang-list {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .lang-item {
            border: 1px solid rgba(74, 55, 40, 0.08);
            background: rgba(255, 255, 255, 0.82);
            border-radius: 12px;
            padding: 10px 10px;
            font-weight: 800;
            color: rgba(74, 55, 40, 0.9);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .lang-item.active {
            border-color: rgba(196, 149, 106, 0.55);
            box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.12);
        }

        .lang-item.active::after {
            content: "✓";
            color: var(--primary);
            font-weight: 900;
        }

        .hero {
            padding: 8px 8px 16px;
            text-align: center;
            color: rgba(255, 255, 255, 0.98);
        }

        .logo {
            width: 88px;
            height: 88px;
            margin: 10px auto 12px;
            border-radius: 16px;
            background: rgba(255, 255, 255, 0.95);
            border: 2px solid rgba(255, 255, 255, 0.45);
            backdrop-filter: blur(10px);
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 16px 48px rgba(74, 55, 40, 0.22);
            padding: 0;
            overflow: hidden;
        }

        .logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

        .brand-name {
            margin: 10px 0 4px;
            font-size: 26px;
            font-weight: 700;
            letter-spacing: 3px;
            text-shadow: 0 2px 8px rgba(74, 55, 40, 0.15);
        }

        .brand-name-en {
            margin: 0 0 8px;
            font-size: 13px;
            font-weight: 400;
            letter-spacing: 2px;
            opacity: 0.85;
            font-family: 'Georgia', serif;
        }

        h1 {
            margin: 6px 0 2px;
            font-size: 18px;
            font-weight: 500;
            letter-spacing: 0.5px;
            opacity: 0.92;
        }

        .subtitle {
            margin: 0;
            font-size: 13px;
            opacity: 0.8;
        }

        .card {
            background: var(--card);
            border: 1px solid rgba(255, 255, 255, 0.65);
            border-radius: 24px;
            padding: 20px 16px 16px;
            box-shadow: 0 20px 60px rgba(74, 55, 40, 0.12);
            backdrop-filter: blur(12px);
        }

        .segmented {
            display: flex;
            gap: 6px;
            background: rgba(255, 255, 255, 0.95);
            border-radius: 999px;
            padding: 5px;
            border: 1px solid rgba(74, 55, 40, 0.08);
            box-shadow: 0 8px 24px rgba(74, 55, 40, 0.06);
        }

        .segmented button {
            flex: 1;
            border: none;
            background: transparent;
            border-radius: 999px;
            padding: 10px 12px;
            font-weight: 600;
            color: var(--text-light);
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            transition: all 0.2s ease;
        }

        .segmented button.active {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: #fff;
            box-shadow: 0 8px 20px rgba(196, 149, 106, 0.35);
        }

        .segmented svg { width: 18px; height: 18px; }

        .form {
            margin-top: 16px;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .field {
            width: 100%;
            background: rgba(255, 255, 255, 0.95);
            border: 1px solid rgba(74, 55, 40, 0.08);
            border-radius: 14px;
            padding: 0 14px;
            display: flex;
            align-items: center;
            gap: 10px;
            height: 50px;
            transition: border-color 0.2s ease, box-shadow 0.2s ease;
        }

        .fade-row {
            will-change: opacity, transform;
            transition: opacity 0.18s ease, transform 0.18s ease;
        }

        .fade-row.is-fading-in,
        .fade-row.is-fading-out {
            opacity: 0;
            transform: translateY(8px);
        }

        .field:focus-within {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(196, 149, 106, 0.15);
        }

        .field .icon {
            width: 18px;
            height: 18px;
            color: var(--muted);
            flex: 0 0 18px;
        }

        .field input, .field select {
            border: none;
            background: transparent;
            outline: none;
            font-size: 15px;
            color: var(--text);
            width: 100%;
        }

        .field input::placeholder { color: var(--muted); }

        .field-hint {
            margin-top: -8px;
            padding: 0 8px;
            font-size: 12px;
            color: var(--text-light);
            line-height: 1.4;
        }

        .field-hint.is-error { color: var(--danger); }

        .row {
            display: flex;
            gap: 10px;
        }

        .phoneRow {
            padding: 0 12px;
            gap: 8px;
        }

        .phoneRow select {
            width: 134px;
            font-weight: 600;
            color: var(--text);
        }

        .divider {
            width: 1px;
            height: 26px;
            background: rgba(74, 55, 40, 0.12);
            flex: 0 0 1px;
        }

        .iconBtn {
            appearance: none;
            border: none;
            background: transparent;
            cursor: pointer;
            color: var(--muted);
            padding: 8px;
            border-radius: 12px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: color 0.2s ease;
        }

        .iconBtn:hover { color: var(--primary); }
        .iconBtn:active { transform: translateY(1px); }

        .codeBtn {
            flex: 0 0 110px;
            height: 50px;
            border: 2px solid var(--primary);
            border-radius: 14px;
            background: transparent;
            color: var(--primary);
            font-weight: 700;
            font-size: 13px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .codeBtn:hover:not(:disabled) {
            background: var(--primary);
            color: #fff;
        }

        .codeBtn:disabled { opacity: 0.55; cursor: not-allowed; }

        .agree {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 12px;
            color: var(--text-light);
            padding: 4px 4px;
        }

        .agree input {
            margin-top: 2px;
            accent-color: var(--primary);
        }

        .agree a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
        }

        .primaryBtn {
            width: 100%;
            border: none;
            border-radius: 16px;
            padding: 15px 12px;
            font-size: 16px;
            font-weight: 700;
            letter-spacing: 4px;
            color: #fff;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            box-shadow: 0 12px 28px rgba(196, 149, 106, 0.35);
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }

        .primaryBtn:hover:not(:disabled) {
            transform: translateY(-1px);
            box-shadow: 0 16px 36px rgba(196, 149, 106, 0.42);
        }

        .primaryBtn:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

        .primaryBtn:active { transform: translateY(1px); }

        .footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 13px;
            padding: 4px 4px 0;
            color: var(--text-light);
        }

        .footer a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
            transition: opacity 0.2s ease;
        }

        .footer a:hover { opacity: 0.8; }

        .tips {
            margin-top: 4px;
            font-size: 12px;
            color: var(--text-light);
            padding: 6px 4px 0;
            line-height: 1.6;
        }

        .tips strong { color: var(--text); }

        .toast {
            position: fixed;
            top: 18px;
            right: 18px;
            background: var(--text);
            color: #fff;
            padding: 12px 16px;
            border-radius: 12px;
            box-shadow: 0 12px 36px rgba(74, 55, 40, 0.25);
            display: none;
            max-width: min(420px, 92vw);
            font-size: 14px;
        }

        .hidden { display: none !important; }

        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.55);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 18px;
            z-index: 2000;
            backdrop-filter: blur(4px);
        }

        .modal {
            width: min(560px, 92vw);
            max-height: min(78vh, 720px);
            background: rgba(255, 255, 255, 0.96);
            border-radius: 16px;
            box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);
            overflow: hidden;
            border: 1px solid rgba(74, 55, 40, 0.12);
        }

        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 14px 16px;
            border-bottom: 1px solid rgba(74, 55, 40, 0.10);
        }

        .modal-title {
            font-size: 16px;
            font-weight: 800;
            color: var(--text);
        }

        .modal-close {
            border: none;
            background: transparent;
            color: rgba(74, 55, 40, 0.75);
            font-size: 22px;
            line-height: 1;
            cursor: pointer;
            width: 32px;
            height: 32px;
            border-radius: 10px;
            transition: background 0.15s ease, color 0.15s ease;
        }

        .modal-close:hover {
            background: rgba(74, 55, 40, 0.08);
            color: rgba(74, 55, 40, 0.95);
        }

        .modal-body {
            padding: 14px 16px 18px;
            overflow: auto;
            max-height: 70vh;
            color: var(--text);
        }

        .legal-content h4 {
            margin: 14px 0 6px;
            font-size: 14px;
            color: var(--text);
        }

        .legal-content p {
            margin: 0 0 10px;
            color: var(--text-light);
            line-height: 1.7;
        }
