:root {
    color-scheme: dark;
    font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", Inter, system-ui, sans-serif;
    color: #f2eee7;
    background: #141311;
    --gold: #e6c68e;
    --muted: #bab1a5;
    --line: #514638;
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.gateway {
    display: grid;
    grid-template-columns: minmax(0, 1.83fr) minmax(382px, 1fr);
    min-height: 100dvh;
}

.showcase {
    position: relative;
    isolation: isolate;
    display: grid;
    align-content: space-between;
    min-width: 0;
    overflow: hidden;
    padding: max(46px, env(safe-area-inset-top)) clamp(32px, 5.4vw, 104px) max(58px, env(safe-area-inset-bottom));
    background:
        radial-gradient(ellipse at 68% 40%, #695235 0, #3c3023 32%, transparent 70%),
        linear-gradient(155deg, #201d18, #191713 60%, #100f0d);
}

.showcase::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    background: linear-gradient(0deg, #100e0bd9, #100e0b00 29%);
    pointer-events: none;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f3dfbb;
    font: 650 .72rem / 1 Inter, system-ui, sans-serif;
    letter-spacing: .28em;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 37px;
    height: 37px;
    border: 1px solid #bf9e65;
    border-radius: 8px;
    background: #211c1566;
    color: #ebcb8d;
    font: 1.1rem Georgia, serif;
}

.showcase-title {
    position: relative;
    width: fit-content;
    padding-top: 22px;
    color: #fff1d9;
    font-size: clamp(3rem, 6.1vw, 7.7rem);
    font-weight: 800;
    line-height: 1.07;
    letter-spacing: .045em;
    text-shadow: 0 4px 25px #100d08c0;
}
.showcase-title::before {
    content: "";
    position: absolute;
    top: 0;
    left: .05em;
    width: 46px;
    height: 2px;
    background: #b89a66;
}

.card-art {
    position: absolute;
    z-index: -2;
    top: 45%;
    right: 4%;
    width: min(73%, 805px);
    aspect-ratio: 1.22;
    transform: translateY(-50%);
    container-type: inline-size;
}
.card-art-orbit {
    position: absolute;
    inset: 6% 12% 1% 4%;
    border: 1px solid #dfba7b3a;
    border-radius: 3%;
    transform: rotate(-19deg) skewX(11deg) scaleY(.82);
    box-shadow: 0 0 0 32px #c2a57513, 0 0 0 66px #c2a5750b, 0 0 0 98px #c2a57508, inset 0 0 120px #a880461f;
}
.hero-card {
    position: absolute;
    display: grid;
    place-items: center;
    width: 46%;
    aspect-ratio: .73;
    border: 1px solid #be9958;
    border-radius: 6%;
    color: #ecd19f;
    background: linear-gradient(144deg, #4b3b29, #211d17 36%, #12110f 80%);
    box-shadow: 1px 2px #594328, 0 22px 42px #0a0807a8;
}
.hero-card::after {
    content: "";
    position: absolute;
    inset: 6%;
    border: 1px solid #b7986161;
    border-radius: 5%;
    pointer-events: none;
}
.hero-card-back {
    left: 40%;
    top: 2%;
    transform: rotate(22deg);
    background:
        repeating-linear-gradient(56deg, #eed09935 0 1px, transparent 1px 12px),
        repeating-linear-gradient(-56deg, #eed09935 0 1px, transparent 1px 12px),
        linear-gradient(145deg, #a58552, #4b3925 65%, #2c2418);
}
.hero-card-king { left: 26%; top: 8%; transform: rotate(5deg); }
.hero-card-ace {
    left: 13%;
    top: 17%;
    transform: rotate(-14deg);
    border-color: #e4c38d;
    background: linear-gradient(135deg, #d2b27d, #efd6a7 33%, #b38a53 73%, #d4af77);
    color: #2b2117;
}
.hero-card-ace::after { border-color: #4530196b; box-shadow: 0 0 0 3px #ebd0a158; }
.card-suit { font: 26cqw / 1 Georgia, serif; text-shadow: 0 1px #ffefc168; }
.card-corner { position: absolute; left: 10%; top: 9%; font: 4.35cqw / .88 Georgia, serif; text-align: center; }
.card-corner-end { inset: auto 10% 9% auto; transform: rotate(180deg); }

.access {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: max(36px, env(safe-area-inset-top)) max(32px, env(safe-area-inset-right)) max(36px, env(safe-area-inset-bottom));
    border-inline-start: 1px solid #665339;
    background: radial-gradient(ellipse at 48% 12%, #221f1a, #151412 72%);
}
.access-inner { width: min(100%, 368px); }
.access-heading { margin-bottom: 29px; }
.access-heading h2 { font-size: clamp(1.75rem, 2.45vw, 2.5rem); font-weight: 740; line-height: 1.18; }
.access-heading p { margin-top: 10px; color: var(--muted); font-size: .94rem; line-height: 1.45; }

.account-modes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 24px;
    border-block-end: 1px solid var(--line);
}
.account-modes button {
    min-height: 44px;
    margin-bottom: -1px;
    padding: 6px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: .96rem;
    font-weight: 600;
}
.account-modes button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }

#account-form { display: grid; }
#account-form label { margin-bottom: 8px; font-size: .91rem; font-weight: 650; }
#account-form input {
    width: 100%;
    min-height: 50px;
    margin-bottom: 20px;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 7px;
    outline-offset: 2px;
    color: #fff5e6;
    background: #ffffff04;
    font-size: 1rem;
}
#account-form input::placeholder { color: #a99d8e; }
#account-rules, #account-error { margin: -6px 0 14px; color: var(--muted); font-size: .8rem; line-height: 1.45; }
#account-error { color: #ffc29f; }
#account-error:empty { display: none; }
#submit-account {
    position: relative;
    min-height: 50px;
    padding: 9px 34px;
    border: 1px solid #e7cc96;
    border-radius: 7px;
    background: linear-gradient(115deg, #ecd4a6, #cfac72);
    color: #251d13;
    font-size: .98rem;
    font-weight: 740;
}
#submit-account::after {
    content: "";
    position: absolute;
    inset: calc(50% - 4px) 19px auto auto;
    width: 8px;
    height: 8px;
    border-block-start: 1.5px solid;
    border-inline-end: 1.5px solid;
    transform: rotate(45deg);
}
#submit-account:disabled { opacity: .72; }
@media (hover: hover) {
    #submit-account:hover:enabled { background: #f5dbad; }
    .account-modes button:hover:enabled { color: #ffe2ad; }
}

@media (max-width: 1000px) {
    .gateway { grid-template-columns: minmax(0, 1fr) minmax(320px, .85fr); }
    .card-art { top: 43%; right: 0; width: 83%; }
}

@media (max-width: 700px) {
    .gateway { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .showcase {
        min-height: 170px;
        padding: max(23px, env(safe-area-inset-top)) max(26px, env(safe-area-inset-right)) 24px max(26px, env(safe-area-inset-left));
    }
    .brand { gap: 8px; font-size: .65rem; }
    .brand-mark { width: 28px; height: 28px; border-radius: 6px; font-size: .85rem; }
    .showcase-title { padding-top: 11px; font-size: clamp(2rem, 8.1vw, 3.45rem); }
    .showcase-title::before { width: 28px; height: 1px; }
    .card-art { top: 49%; right: 0; width: min(49%, 250px); }
    .access {
        place-items: start center;
        padding: 27px max(25px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(25px, env(safe-area-inset-left));
        border-inline-start: 0;
        border-block-start: 1px solid #665339;
    }
    .access-heading { margin-bottom: 15px; }
    .access-heading p { margin-top: 7px; }
    .account-modes { margin-bottom: 18px; }
}

@media (orientation: landscape) and (min-width: 530px) and (max-height: 540px) {
    .gateway { grid-template-columns: minmax(0, 1fr) minmax(280px, .93fr); grid-template-rows: 1fr; }
    .showcase { padding: max(22px, env(safe-area-inset-top)) 24px max(21px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
    .showcase-title { padding-top: 12px; font-size: clamp(1.85rem, 4.8vw, 3rem); }
    .showcase-title::before { width: 34px; height: 1px; }
    .card-art { top: 46%; right: 0; width: min(71%, 294px, 72dvh); }
    .access { place-items: center; border-block-start: 0; border-inline-start: 1px solid #665339; padding-block: 12px; }
    .access-heading, .account-modes { margin-bottom: 9px; }
    .access-heading h2 { font-size: 1.45rem; }
    .access-heading p { margin-top: 4px; font-size: .8rem; }
    .account-modes button { min-height: 34px; }
    #account-form label { margin-bottom: 4px; }
    #account-form input { min-height: 36px; padding-block: 5px; margin-bottom: 9px; }
    #submit-account { min-height: 36px; padding-block: 5px; }
}

@media (orientation: landscape) and (min-width: 530px) and (max-height: 325px) {
    .access { padding-block: 9px; }
    .access-heading, .account-modes { margin-bottom: 7px; }
    .access-heading h2 { font-size: 1.3rem; }
    .access-heading p { display: none; }
    #account-form input { min-height: 34px; margin-bottom: 7px; }
    #account-rules { order: 1; margin: 5px 0 0; font-size: .73rem; line-height: 1.35; }
}
