        :root {
            --gold: #ffc84a;
            --cream: #fff4c9;
            --line: rgba(255, 215, 114, .62);
        }

        * { box-sizing: border-box; }

        html { background: #360509; }

        body {
            margin: 0;
            color: var(--cream);
            font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
            background: #250408;
            min-height: 100vh;
        }

        .screen {
            position: relative;
            min-height: 100svh;
            max-width: 520px;
            margin: auto;
            overflow: hidden;
            padding: env(safe-area-inset-top) 18px calc(22px + env(safe-area-inset-bottom));
            isolation: isolate;
            background: radial-gradient(circle at 50% 5%, #c64115 0, #850b0d 32%, #45050a 78%);
        }

        .screen:before {
            content: "";
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(47, 0, 0, .08), rgba(58, 0, 5, .84)), url('golddrakon.webp') center top/cover no-repeat;
            z-index: -2;
            filter: saturate(1.08);
        }

        .screen:after {
            content: "";
            position: absolute;
            inset: 0;
            z-index: -1;
            background: radial-gradient(ellipse 85% 30% at 50% 18%, transparent 0, rgba(48, 0, 0, .05) 58%, rgba(34, 0, 5, .54) 100%);
        }

        .top-balls {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            z-index: 0;
            pointer-events: none;
            height: 0;
        }
        .ball {
            position: absolute;
            top: 0;
            width: 92px;
            transform-origin: 50% 0%;
            will-change: transform;
            filter: drop-shadow(0 8px 10px rgba(0,0,0,.4));
        }
        .ball img {
            width: 100%;
            display: block;
        }
        .ball:before {
            content: "";
            position: absolute;
            top: -18px;
            left: 50%;
            width: 1px;
            height: 18px;
            background: linear-gradient(#d9b25a, #7a4a0a);
            transform: translateX(-50%);
        }
        .ball--left {
            left: 14px;
            animation: sway 2.9s ease-in-out infinite;
        }
        .ball--right {
            right: 14px;
            animation: sway 3.4s ease-in-out infinite reverse;
        }
        .ball--left img {
            transform: scaleX(-1);
        }
        @keyframes sway {
            0% { transform: rotate(-6deg); }
            50% { transform: rotate(6deg); }
            100% { transform: rotate(-6deg); }
        }
        @media (max-width: 380px) {
            .ball { width: 48px; }
            .ball--left { left: 6px; }
            .ball--right { right: 6px; }
        }

        .top {
            height: 66px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            position: relative;
            z-index: 2;
        }

        .brand {
            display: flex;
            gap: 10px;
            align-items: center;
            font-weight: 900;
            letter-spacing: .5px;
            text-transform: uppercase;
            text-shadow: 0 2px 10px #420000;
        }

        .brand b {
            display: block;
            color: #ffd25e;
            font-size: 16px;
            line-height: 1;
        }

        .brand span {
            font-size: 10px;
            letter-spacing: 2.1px;
            color: #fff0b2;
        }

        .coin {
            display: flex;
            align-items: center;
            gap: 8px;
            border: 1px solid var(--line);
            padding: 8px 11px;
            border-radius: 999px;
            background: rgba(78, 6, 5, .70);
            font-size: 13px;
            font-weight: 800;
            box-shadow: inset 0 1px rgba(255, 255, 255, .16);
        }

        .coin i {
            font-style: normal;
            color: #7e2603;
            background: linear-gradient(#fff19a, #f7a518);
            border-radius: 50%;
            width: 22px;
            height: 22px;
            display: grid;
            place-items: center;
            border: 1px solid #ffe983;
        }

        .hero {
            text-align: center;
            padding-top: 20px;
            position: relative;
            z-index: 2;
        }

        .tag {
            display: inline-flex;
            gap: 6px;
            align-items: center;
            padding: 7px 12px;
            border: 1px solid var(--line);
            border-radius: 999px;
            background: rgba(83, 8, 6, .62);
            font-size: 11px;
            font-weight: 800;
            letter-spacing: .8px;
            text-transform: uppercase;
            color: #ffe699;
        }

        .hero h1 {
            font-family: Georgia, "Times New Roman", serif;
            font-size: clamp(36px, 10vw, 54px);
            line-height: .93;
            margin: 13px auto 9px;
            color: #fff1a8;
            letter-spacing: -1.5px;
            text-shadow: 0 2px 0 #9d4306, 0 0 26px #ff9c19;
        }

        .hero p {
            margin: 0 auto;
            max-width: 330px;
            line-height: 1.42;
            color: #ffefc0;
            font-size: 15px;
            text-shadow: 0 2px 7px #470000;
        }

        .form-card {
            position: relative;
            isolation: isolate;
            margin: clamp(210px, 38vh, 350px) auto 0;
            max-width: 470px;
            min-height: 474px;
            padding: 58px 83px 24px;
            border-radius: 26px;
            overflow: hidden;
            filter: drop-shadow(0 18px 30px rgba(21, 0, 0, .5));
            z-index: 2;
        }

        .form-card:before {
            content: "";
            position: absolute;
            z-index: -2;
            inset: 0;
            background: url('fon_forms.webp') center center/100% 100% no-repeat;
        }

        .form-card:after {
            content: "";
            position: absolute;
            z-index: -1;
            inset: 13px 18px;
            border-radius: 18px;
            background: linear-gradient(180deg, rgba(64, 1, 7, .10), rgba(34, 0, 4, .16));
            pointer-events: none;
        }

        .form-card h2 {
            position: relative;
            font-size: 21px;
            text-align: center;
            margin: 7px 0 5px;
            color: #fff0ad;
            text-shadow: 0 2px 6px #480000;
        }

        .form-card h2:before {
            content: "✦";
            position: absolute;
            top: -28px;
            left: 50%;
            transform: translateX(-50%);
            color: #ffe491;
            font-size: 25px;
            text-shadow: 0 0 18px #ffb21a;
        }

        .form-card .small {
            text-align: center;
            color: #f9d38c;
            font-size: 12px;
            margin: 0 0 13px;
            text-shadow: 0 1px 4px #490000;
        }

        .field {
            display: block;
            margin: 8px 0;
        }

        .field span {
            display: block;
            font-size: 11px;
            font-weight: 800;
            color: #ffe8a2;
            margin: 0 0 5px 4px;
            letter-spacing: .3px;
            text-shadow: 0 1px 3px #420000;
        }

        .field input {
            width: 100%;
            border: 1px solid #ffde8b;
            border-radius: 12px;
            background: rgba(43, 0, 4, .88);
            color: #fff4c8;
            padding: 12px 14px;
            font: 600 14px/1 inherit;
            outline: none;
            box-shadow: inset 0 2px 8px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.12);
        }

        .field input::placeholder { color: #e9c38d; }

        .field.password {
            position: relative;
        }

        .field.password input {
            padding-right: 40px;
        }

        .field.password button {
            position: absolute;
            right: 6px;
            top: 50%;
            transform: translateY(-50%);
            margin-top: 9px;
            border: 0;
            background: transparent;
            color: #ffd670;
            padding: 6px;
            cursor: pointer;
            font-size: 16px;
        }

        .check {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            margin: 9px 0 11px;
            font-size: 11px;
            color: #f2ce92;
            line-height: 1.32;
            text-shadow: 0 1px 3px #420000;
        }

        .check input {
            appearance: none;
            flex: 0 0 18px;
            width: 18px;
            height: 18px;
            margin: 0;
            border: 1px solid #ffe58c;
            border-radius: 5px;
            background: rgba(59, 0, 4, .82);
            box-shadow: inset 0 1px 4px rgba(0, 0, 0, .45);
        }

        .check input:checked { background: linear-gradient(#fff0a0, #f6a41f); }

        .check input:checked:after {
            content: "✓";
            display: block;
            text-align: center;
            color: #6f1d05;
            font-weight: 900;
            font-size: 15px;
            line-height: 16px;
        }

        .check a, .login a, .legal a {
            color: #ffe68f;
            font-weight: 800;
            text-decoration: none;
            border-bottom: 1px dotted rgba(255, 230, 143, .65);
            cursor: pointer;
        }

        .cta {
            border: 1px solid #fff0a6;
            border-radius: 14px;
            width: 100%;
            padding: 12px;
            cursor: pointer;
            font: 900 15px/1 inherit;
            color: #681804;
            letter-spacing: .15px;
            text-transform: uppercase;
            background: linear-gradient(180deg, #fff4aa, #ffcf50 42%, #e78016);
            box-shadow: inset 0 2px rgba(255, 255, 255, .7), 0 4px 0 #8e2b08, 0 0 19px rgba(255, 181, 30, .53);
            transition: transform .15s, filter .15s;
        }

        .cta:hover { filter: brightness(1.08); }

        .cta:active {
            transform: translateY(3px);
            box-shadow: inset 0 2px rgba(255, 255, 255, .7), 0 1px 0 #8e2b08;
        }

        .login {
            text-align: center;
            margin: 13px 0 0;
            font-size: 12px;
            color: #f0cb8d;
            text-shadow: 0 1px 3px #420000;
        }

        .legal {
            text-align: center;
            color: #ddb571;
            font-size: 10px;
            line-height: 1.35;
            margin: 12px 4px 0;
            text-shadow: 0 1px 3px #420000;
        }

        .flash {
            text-align: center;
            margin-top: 9px;
            padding: 9px;
            border-radius: 10px;
            background: #aa3500;
            color: #fff8ce;
            font-size: 12px;
            font-weight: 700;
        }

        /* Modal styling */
        .modal {
            display: none;
            position: fixed;
            inset: 0;
            z-index: 100;
            background: rgba(30, 2, 4, 0.85);
            backdrop-filter: blur(4px);
            padding: 20px;
            align-items: center;
            justify-content: center;
        }
        .modal.active {
            display: flex;
        }
        .modal-content {
            background: linear-gradient(180deg, #4a080d, #2b0407);
            border: 1px solid var(--line);
            border-radius: 20px;
            max-width: 480px;
            width: 100%;
            max-height: 80vh;
            display: flex;
            flex-direction: column;
            padding: 24px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.6);
        }
        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 14px;
            border-bottom: 1px solid rgba(255, 215, 114, 0.2);
            padding-bottom: 10px;
        }
        .modal-header h3 {
            margin: 0;
            color: #fff1a8;
            font-family: Georgia, serif;
            font-size: 18px;
        }
        .modal-close {
            background: transparent;
            border: none;
            color: var(--cream);
            font-size: 20px;
            cursor: pointer;
            padding: 0;
            line-height: 1;
        }
        .modal-body {
            overflow-y: auto;
            font-size: 13px;
            line-height: 1.5;
            color: #fceecb;
            margin-bottom: 16px;
            padding-right: 4px;
        }

        @media (max-height: 760px) {
            .hero { padding-top: 8px; }
            .form-card { margin-top: 175px; }
            .hero h1 { font-size: 38px; }
            .top { height: 55px; }
        }

        @media (min-width: 521px) {
            .screen { box-shadow: 0 0 80px rgba(255, 107, 18, .2); }
        }