* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { min-height: 100svh; overflow: hidden; color: #fff3cf; background: #160909; font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif; }
button, input { font: inherit; }
.lobby { position: relative; display: grid; min-height: 100svh; place-items: center; isolation: isolate; background-image: linear-gradient(180deg, rgba(20,5,8,.22), transparent 30%, transparent 64%, rgba(14,4,7,.35)), url("/lobby-background.png"); background-position: center; background-size: cover; animation: appear 1.1s ease both; }
.lobby::after { position: absolute; z-index: -1; inset: 0; content: ""; background: radial-gradient(ellipse at 50% 68%, transparent 10%, rgba(13,3,6,.14) 72%, rgba(12,3,5,.36)); pointer-events: none; }
.topbar { position: absolute; z-index: 1; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: clamp(18px, 3vw, 34px) clamp(20px, 5vw, 64px); }
.wordmark { color: #ffe8b4; text-decoration: none; font-size: clamp(13px, 1.5vw, 17px); letter-spacing: .12em; text-shadow: 0 2px 16px #18070a; }
.wordmark span { margin-right: 8px; color: #ffd878; font-size: 22px; filter: drop-shadow(0 0 8px rgba(255,193,72,.65)); }
.account-area { display: flex; align-items: center; gap: 14px; }
.user-label { color: #ffe8b4; font-size: 14px; letter-spacing: .08em; text-shadow: 0 2px 12px #160609; }
.top-button { min-width: 94px; padding: 10px 20px; border: 1px solid rgba(255,217,141,.76); border-radius: 999px; color: #fff0ca; background: rgba(30,8,11,.56); box-shadow: inset 0 0 16px rgba(237,167,59,.08), 0 5px 24px rgba(0,0,0,.22); cursor: pointer; letter-spacing: .14em; transition: background .2s, box-shadow .2s, transform .2s; }
.top-button:hover { background: rgba(99,35,26,.72); box-shadow: 0 0 22px rgba(255,195,88,.28); transform: translateY(-1px); }
.brand { width: min(90vw, 560px); margin-top: -4vh; text-align: center; text-shadow: 0 2px 18px #160609, 0 0 32px rgba(255,183,63,.38); animation: rise 1.2s .15s ease both; }
.hero-crown { display: block; margin-bottom: 8px; color: #ffd878; font-size: clamp(26px, 3vw, 38px); filter: drop-shadow(0 0 12px rgba(255,193,72,.85)); }
h1 { margin: 0; font-size: clamp(27px, 4.1vw, 48px); font-weight: 500; letter-spacing: .38em; padding-left: .38em; }
.rule { width: 150px; height: 1px; margin: 18px auto 14px; background: linear-gradient(90deg, transparent, #f1bd61, transparent); opacity: .88; }
.brand p { margin: 0; color: rgba(255,235,197,.78); font-size: clamp(12px, 1.4vw, 15px); letter-spacing: .34em; padding-left: .34em; }
.bottom-mark { position: absolute; bottom: clamp(18px, 3.5vh, 34px); left: 50%; transform: translateX(-50%); color: rgba(255,231,187,.72); font: 10px/1.5 Arial, sans-serif; letter-spacing: .32em; text-transform: uppercase; white-space: nowrap; text-shadow: 0 2px 12px #1b0709; }
.dialog { position: fixed; width: min(92vw, 420px); max-width: 420px; padding: 32px; overflow: visible; border: 1px solid rgba(255,211,121,.54); border-radius: 20px; color: #fff3cf; background: linear-gradient(155deg, rgba(43,12,17,.97), rgba(17,8,11,.98)); box-shadow: 0 24px 90px rgba(0,0,0,.64), 0 0 48px rgba(238,166,54,.14); }
.dialog::backdrop { background: rgba(10,3,5,.68); backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 12px; right: 16px; width: 34px; height: 34px; border: 0; color: #ead5ad; background: transparent; font: 28px/1 Arial, sans-serif; cursor: pointer; }
.dialog-crown { display: block; margin-bottom: 8px; color: #ffd878; text-align: center; font-size: 29px; filter: drop-shadow(0 0 10px rgba(255,193,72,.65)); }
.dialog h2 { margin: 0; color: #fff0c7; text-align: center; font-size: 25px; font-weight: 500; letter-spacing: .18em; }
.dialog-intro { margin: 10px 0 22px; color: #d8c19c; text-align: center; font-size: 13px; line-height: 1.7; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 22px; padding: 4px; border: 1px solid rgba(239,190,105,.23); border-radius: 12px; background: rgba(0,0,0,.18); }
.mode-switch button { padding: 9px; border: 0; border-radius: 9px; color: #d6bf9a; background: transparent; cursor: pointer; letter-spacing: .12em; }
.mode-switch button[aria-selected="true"] { color: #31170e; background: linear-gradient(135deg, #f5d487, #c68a38); box-shadow: 0 3px 12px rgba(224,155,57,.22); }
.dialog form { display: grid; gap: 9px; }
.dialog label { margin-top: 6px; color: #f5dfb6; font-size: 13px; letter-spacing: .08em; }
.dialog input { width: 100%; padding: 13px 14px; border: 1px solid rgba(241,197,127,.28); border-radius: 10px; outline: none; color: #fff7e5; background: rgba(6,4,6,.55); font-family: Arial, "Noto Sans TC", sans-serif; font-size: 15px; }
.dialog input::placeholder { color: rgba(216,193,156,.53); font-size: 12px; }
.dialog input:focus { border-color: #e8be6d; box-shadow: 0 0 0 3px rgba(232,190,109,.13); }
.form-message { min-height: 20px; margin: 2px 0 0; color: #f0c77c; font-size: 12px; line-height: 1.6; }
.form-message.error { color: #ffaaa1; }
.gold-button { margin-top: 3px; padding: 13px 18px; border: 0; border-radius: 11px; color: #2c160c; background: linear-gradient(135deg, #ffe5a0, #c18a3c); box-shadow: 0 7px 24px rgba(218,150,53,.22); cursor: pointer; font-weight: 700; letter-spacing: .14em; transition: filter .2s, transform .2s; }
.gold-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.gold-button:disabled { opacity: .62; cursor: wait; transform: none; }
.privacy-note { margin: 18px 0 0; color: rgba(224,203,171,.55); text-align: center; font-size: 11px; }
.nickname-dialog form { margin-top: 22px; }
.toast { position: fixed; z-index: 5; left: 50%; bottom: 34px; transform: translate(-50%, 12px); padding: 12px 20px; border: 1px solid rgba(255,217,141,.42); border-radius: 999px; color: #ffefca; background: rgba(29,10,13,.92); box-shadow: 0 12px 40px rgba(0,0,0,.38); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; white-space: nowrap; font-size: 13px; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@keyframes appear { from { opacity: 0 } to { opacity: 1 } }
@keyframes rise { from { opacity: 0; translate: 0 -8px } to { opacity: 1; translate: 0 0 } }
@media (max-width: 640px) { .lobby { background-position: 50% center; } .topbar { align-items: flex-start; padding: 19px 16px; } .wordmark { margin-top: 8px; font-size: 12px; } .account-area { gap: 8px; } .user-label { display: none; } .top-button { min-width: 76px; padding: 9px 14px; font-size: 13px; } .brand { margin-top: -2vh; } h1 { letter-spacing: .25em; padding-left: .25em; } .dialog { padding: 28px 23px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
