* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-family: var(--font-body); font-size: 15px; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; display: flex; flex-direction: column; width: 264px; padding: 21px 16px 14px; color: var(--sidebar-ink); background: var(--sidebar); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-family: var(--font-display); font-size: 19px; font-weight: 900; letter-spacing: .04em; }
.brand img { width: 41px; height: 41px; }
.brand b { color: #a99eff; }
.profile-chip { display: flex; align-items: center; gap: 10px; margin: 24px 2px 17px; padding: 10px; border: 1px solid #ffffff12; border-radius: 12px; background: #ffffff08; }
.profile-chip > span:nth-child(2) { display: grid; flex: 1; gap: 2px; min-width: 0; }
.profile-chip strong { overflow: hidden; color: #fff; text-overflow: ellipsis; }
.profile-chip small { color: var(--sidebar-muted); font-size: 11px; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px #79e1c0aa; }
.sidebar-scroll { flex: 1; overflow: auto; scrollbar-color: #454361 transparent; scrollbar-width: thin; }
.side-section { margin: 9px 0 20px; }
.side-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 7px; color: var(--sidebar-muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.tiny-add { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 7px; color: #b6adff; font-size: 19px; line-height: 1; }
.tiny-add:hover { background: #ffffff17; color: white; }
.space-label { display: flex; align-items: center; gap: 7px; margin: 8px 7px 3px; color: #fff; font-size: 12px; font-weight: 800; }
.space-gem { color: var(--yellow); }
.side-link { display: flex; min-width: 0; align-items: center; gap: 9px; margin: 2px 0; padding: 8px 9px; border: 0; border-radius: 8px; color: #bcb9d6; background: transparent; text-align: left; font-size: 13px; transition: background .15s, color .15s; }
.side-link:hover, .side-link.selected { color: #fff; background: #ffffff13; }
.side-link.selected { box-shadow: inset 3px 0 #a89cff; }
.hash { color: #a69ce2; font-size: 16px; font-weight: 800; }
.chat-avatar { display: grid; flex: 0 0 23px; width: 23px; height: 23px; place-items: center; border-radius: 8px; color: #352a60; background: var(--mint); font-size: 11px; font-weight: 900; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.group-mark { margin-left: auto; color: var(--pink); font-size: 10px; }
.side-empty { padding: 0 9px; color: #7f7c9e; font-size: 11px; line-height: 1.5; }
.sidebar-bottom { padding-top: 8px; border-top: 1px solid #ffffff14; }
.sidebar-bottom form { margin: 0; }
.logout-link { width: 100%; }
.safe-note { display: flex; align-items: center; gap: 7px; margin: 12px 8px 0; color: #8e8baa; font-size: 10px; }
.safe-note span { color: var(--pink); }
.main-panel { display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 100vh; margin-left: 264px; background: #f7f6fb; }
.toast { position: fixed; top: 16px; right: 20px; z-index: 40; max-width: min(440px, calc(100vw - 32px)); padding: 12px 17px; border: 1px solid #b5ead4; border-radius: 12px; color: #215843; background: #edfff7; box-shadow: var(--soft-shadow); }
.toast.error { border-color: #ffc9ce; color: #8d3144; background: #fff0f1; }
.mobile-topbar, .mobile-menu { display: none; }

/* Shared form controls */
label { display: grid; gap: 6px; color: #4b4969; font-size: 12px; font-weight: 800; }
input, textarea, select { width: 100%; padding: 12px 13px; border: 1px solid #dfdbea; border-radius: 11px; outline: 0; color: var(--ink); background: #fff; }
textarea { min-height: 60px; resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #9386ef; box-shadow: 0 0 0 3px #9386ef2a; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: fit-content; padding: 11px 15px; border: 0; border-radius: 10px; font-weight: 800; }
.primary { color: white; background: var(--purple); box-shadow: 0 5px 12px #7662e933; }
.primary:hover, .send-button:hover { background: var(--purple-dark); transform: translateY(-1px); }
.secondary { color: #594bb8; background: #f0edff; }
.link-button { padding: 4px; color: #594bb8; background: transparent; }
.danger-text { color: var(--danger); }
.notice { margin: 12px 0; padding: 11px 13px; border-radius: 10px; color: #245c46; background: #e6fbf1; line-height: 1.5; overflow-wrap: anywhere; }
.notice.error { color: #8d3144; background: #fff0f1; }

/* Space and channel pages */
.channel-header { position: relative; overflow: hidden; padding: 27px 38px 23px; border-bottom: 1px solid var(--line); background: linear-gradient(110deg, #fff 20%, #faf6ff 100%); }
.channel-header::after { position: absolute; right: 8%; bottom: -96px; width: 240px; height: 180px; border: 1px solid #c8bdfb66; border-radius: 50%; content: ""; transform: rotate(-24deg); }
.crumb, .page-kicker { color: #8c82bd; font-size: 10px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.crumb { display: flex; align-items: center; gap: 7px; }
.crumb b { color: #c1badc; }
.channel-header h1 { position: relative; z-index: 1; margin: 14px 0 3px; font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); letter-spacing: -.04em; }
.channel-header > p { position: relative; z-index: 1; margin: 0; color: var(--muted); font-size: 13px; }
.heading-hash { margin-right: 7px; color: #b9b0e8; }
.header-stars { position: absolute; top: 25px; right: 45px; z-index: 1; color: #d3a9ed; font-size: 22px; letter-spacing: 12px; }
.channel-maker { position: absolute; top: 22px; right: 36px; z-index: 3; }
.channel-maker summary { width: fit-content; margin-left: auto; padding: 8px 11px; border: 1px solid #e8e2f5; border-radius: 9px; color: #6858bd; background: #fff; cursor: pointer; font-size: 10px; font-weight: 900; }
.channel-maker[open] summary { margin-bottom: 8px; }
.channel-maker form { display: grid; width: min(290px, calc(100vw - 48px)); gap: 9px; padding: 12px; border: 1px solid #e8e2f5; border-radius: 12px; background: #fff; box-shadow: var(--soft-shadow); }
.channel-maker label { font-size: 10px; }
.channel-maker input { padding: 8px; font-size: 12px; }
.channel-maker .primary { padding: 8px 10px; font-size: 11px; }
.chat-stage { display: flex; flex: 1; flex-direction: column; min-height: calc(100vh - 163px); }
.message-list { flex: 1; padding: 18px 36px 22px; }
.message-row { position: relative; display: flex; gap: 12px; max-width: 980px; margin: 0 auto; padding: 13px 10px; border-radius: 13px; }
.message-row:hover { background: #fff; }
.avatar { display: grid; flex: 0 0 37px; width: 37px; height: 37px; place-items: center; border-radius: 13px; color: #46366f; background: var(--yellow); font-weight: 900; }
.avatar-color-1 { color: #355856; background: #9cebd4; }
.avatar-color-2 { color: #4d3b88; background: #d4caff; }
.avatar-color-3 { color: #794868; background: #ffc1df; }
.avatar-color-4 { color: #73522d; background: #ffe295; }
.avatar-color-5 { color: #3e5a84; background: #b9dcff; }
.message-body { min-width: 0; }
.message-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.message-meta strong { color: #34304e; font-size: 13px; }
time { color: #a09db1; font-size: 10px; }
.message-body p, .review-message > p { margin: 4px 0 0; color: #4d4a65; line-height: 1.65; overflow-wrap: anywhere; }
.message-tools { position: absolute; top: 8px; right: 8px; display: none; margin: 0; }
.message-row:hover .message-tools, .message-tools:focus-within { display: block; }
.message-tools button { padding: 4px 8px; border: 1px solid #ece8f4; color: #9a5171; background: white; }
.message-deleted { opacity: .8; }
.removed-copy { color: #a29db1 !important; font-style: italic; }
.empty-chat { max-width: 400px; margin: 70px auto; text-align: center; }
.empty-emoji { font-size: 42px; }
.empty-chat h2 { margin: 10px 0 4px; }
.empty-chat p { margin: 0; color: var(--muted); }
.composer-wrap { position: sticky; bottom: 0; padding: 12px 36px 22px; background: linear-gradient(transparent, #f7f6fb 22%); }
.message-composer { position: relative; max-width: 1000px; margin: 0 auto; padding: 13px 15px 10px; border: 1px solid #e6e1ef; border-radius: 17px; background: white; box-shadow: 0 10px 28px #4438770c; }
.message-composer textarea { min-height: 53px; padding: 5px 3px; border: 0; box-shadow: none; resize: vertical; }
.composer-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 7px; border-top: 1px solid #f0edf5; color: #a09db1; font-size: 10px; }
.send-button { padding: 8px 13px; color: white; background: var(--purple); transition: .15s; }
.send-button b { font-size: 17px; }
.privacy-note { width: fit-content; max-width: calc(100% - 48px); margin: 15px 24px 0; padding: 9px 12px; border: 1px solid #e6e0fd; border-radius: 10px; color: #70699a; background: #f0edff; font-size: 11px; }
.privacy-note span { margin-right: 4px; }
.dm-header { background: linear-gradient(110deg, #fff 20%, #fff5fa 100%); }
.dm-title-avatar { display: inline-grid; width: 35px; height: 35px; margin-right: 9px; place-items: center; vertical-align: 4px; border-radius: 12px; color: #62465d; background: #ffc4df; font-size: 17px; }

/* Plain content cards */
.content-narrow, .content-wide { width: min(100% - 48px, 850px); margin: 34px auto 60px; }
.content-narrow { max-width: 680px; }
.content-wide { max-width: 1100px; }
.content-narrow h1, .content-wide h1, .welcome-card h1 { margin: 8px 0; font-family: var(--font-display); font-size: clamp(28px, 4vw, 42px); letter-spacing: -.045em; }
.content-narrow h1 span, .content-wide h1 span { color: var(--purple); }
.subtitle { margin: 0 0 22px; color: var(--muted); line-height: 1.6; }
.paper-card { position: relative; overflow: hidden; padding: 22px; border: 1px solid #ece8f4; border-radius: var(--card-radius); background: var(--paper); box-shadow: var(--soft-shadow); }
.paper-card > p { color: #77738d; line-height: 1.6; }
.paper-card form { display: grid; gap: 14px; }
.form-hint, .small-note { color: var(--muted); font-size: 11px; line-height: 1.6; }
.optional { display: inline; color: var(--muted); font-size: 10px; font-weight: 500; }
.back-link { display: inline-block; margin: 12px 0; color: #6656c1; font-size: 12px; font-weight: 800; }
.card-doodle { position: absolute; top: 15px; right: 18px; width: 52px; opacity: .8; }
.welcome-card { max-width: 560px; margin: auto; padding: 60px 30px; text-align: center; }
.welcome-card img { width: min(200px, 45vw); }
.welcome-card p:last-child { color: var(--muted); }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; margin-top: 25px; }
.admin-grid h2, .role-guide h2 { margin: 6px 0; font-size: 18px; }
.admin-grid .paper-card > p { margin: 5px 0 17px; font-size: 12px; }
.card-icon { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 13px; font-size: 19px; }
.card-icon.purple { color: #604dca; background: #edeaff; }
.card-icon.mint { color: #32735e; background: #ddf8ef; }
.crew-list, .invite-list { margin: 12px 0 0; padding: 0; list-style: none; }
.crew-list li, .invite-list li { display: flex; align-items: center; gap: 9px; padding: 10px 0; border-top: 1px solid #f0edf5; }
.crew-person { display: grid; flex: 1; gap: 3px; min-width: 0; }
.crew-person strong { overflow: hidden; text-overflow: ellipsis; }
.crew-person small, .invite-list small { color: var(--muted); font-size: 10px; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.site-url-card { margin-top: 17px; }
.site-url-card form { max-width: 620px; }
.site-url-card code { padding: 2px 4px; border-radius: 4px; color: #5c4ba7; background: #f0edff; }
.crew-list .avatar { flex-basis: 31px; width: 31px; height: 31px; border-radius: 11px; }
.crew-list form { display: flex; align-items: center; gap: 4px; margin: 0; }
.crew-actions { display: grid; justify-items: end; gap: 4px; }
.inactive-member { opacity: .62; }
.crew-list select { width: 100px; padding: 7px; font-size: 11px; }
.tiny-save { padding: 7px; color: #5a4bb5; background: #f0edff; font-size: 10px; }
.role-badge { display: inline-block; padding: 4px 7px; border-radius: 6px; color: #656080; background: #eeedf4; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.mod-badge { color: #557148; background: #edf5d9; }
.admin-badge { color: #80577f; background: #fae7f6; }
.pending-card { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 17px; }
.pending-card h2 { margin: 4px 0 0; }
.pending-card > p { margin: 0; }
.invite-list { flex: 1; max-width: 480px; }
.invite-list li { justify-content: space-between; gap: 12px; }
.role-guide { margin-top: 17px; }
.role-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.role-columns p { color: #77738d; font-size: 11px; line-height: 1.7; }
.small-note { margin: 10px 0 0; }
.settings-link { display: flex; gap: 10px; margin-top: 18px; color: #6858c4; font-size: 12px; font-weight: 800; }


/* Solo games */
.games-page [hidden] { display: none !important; }
.game-cards, .leaderboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.game-card { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.game-card .game-icon { display: grid; width: 48px; height: 48px; margin-bottom: 12px; place-items: center; border-radius: 16px; background: #eeeaff; font-size: 25px; }
.math-card .game-icon { background: #e4f8ef; }
.spelling-card .game-icon { background: #fff0f8; }
.daily-card .game-icon { background: #fff5d8; }
.game-tag { color: #9189b4; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.game-card h2, .leaderboard-card h2 { margin: 6px 0; font-size: 19px; }
.game-card > p { margin: 5px 0 14px; font-size: 12px; }
.game-card button { margin-top: auto; }
.game-card button:disabled { cursor: not-allowed; opacity: .7; }
.game-card .personal-best { margin: 13px 0 0; color: #88839e; font-size: 10px; }
.personal-best strong { color: #5b4db2; }
.game-card .speech-note { margin: 8px 0 0; color: #77738d; font-size: 10px; }
.streak-chip { margin: 1px 0 14px; padding: 8px 10px; border-radius: 9px; color: #72521f; background: #fff4d8; font-size: 11px; }
.streak-chip span { color: #9c8b6a; }
.daily-card { border-color: #f0dfab; background: linear-gradient(145deg, #fffefb, #fffbef); }
.leaderboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 18px; }
.leaderboard-card { min-width: 0; }
.leaderboard-card .page-kicker { margin-bottom: 5px; }
.leaderboard-card ol { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.leaderboard-card li { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px; border-radius: 9px; background: #f8f6fd; }
.leaderboard-card .leaderboard-empty { color: var(--muted); font-size: 12px; }
.leader-rank { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border-radius: 8px; color: #5b4db2; background: #e9e5ff; font-size: 10px; font-weight: 900; }
.leaderboard-card li strong { overflow: hidden; flex: 1; text-overflow: ellipsis; }
.leader-score { color: #5b4db2; font-size: 12px; font-weight: 900; }
.leaderboard-card > p { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.game-play { display: grid; gap: 15px; margin-top: 18px; scroll-margin-top: 18px; }
.game-play-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.game-play-top h2 { margin: 5px 0 0; font-size: 22px; }
.game-timer { padding: 8px 12px; border-radius: 10px; color: #594bb8; background: #f0edff; font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.game-progress { height: 8px; overflow: hidden; border-radius: 8px; background: #eeeaf6; }
.game-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--purple), #b195ff); transition: width .2s ease; }
.game-question { margin: 5px 0 0; color: #393652; font-size: clamp(20px, 4vw, 29px); font-weight: 900; text-align: center; }
.game-speak { margin: 0 auto; }
.game-play form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 10px; max-width: 620px; width: 100%; margin: 0 auto; }
.game-play form label { font-size: 11px; }
.game-play .game-result { padding: 15px; border-radius: 12px; background: #f4f1ff; text-align: center; }
.answer-feedback { min-height: 18px; margin: -5px 0 0; color: #77738d; font-size: 12px; font-weight: 800; text-align: center; }
.answer-feedback.correct { color: #26734f; }
.answer-feedback.incorrect { color: #956125; }
.game-result h3 { margin: 0 0 5px; color: #5143a3; font-size: 20px; }
.game-result p { margin: 5px 0 0; color: #625e78; font-size: 12px; line-height: 1.6; }
.game-return { margin: 0 auto; }
.game-play .notice { margin: 0; }

/* Admin message observatory */
.review-count { margin: 15px 0; padding: 12px 15px; border-radius: 12px; color: #5c4ba7; background: #eeeaff; font-size: 12px; font-weight: 800; }
.review-count span { color: #c2963a; }
.review-feed { display: grid; gap: 11px; }
.review-message { padding: 16px 18px; }
.review-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.context-pill { max-width: 80%; overflow: hidden; padding: 5px 8px; border-radius: 7px; color: #6d5bbc; background: #f1eeff; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.removed-tag { padding: 3px 6px; border-radius: 5px; color: #9f5664; background: #fff0f1; font-size: 9px; font-weight: 900; }
.review-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 9px; }
.review-actions > .message-tools { position: relative; inset: auto; display: block; }
.review-actions > .moderate-tools > form { top: 35px; }
.review-actions a { color: #6959bf; font-size: 11px; font-weight: 800; }
.review-actions form { margin: 0; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 15px; margin: 22px 0; color: var(--muted); font-size: 11px; }
.pagination .button { padding: 9px 12px; }
.review-thread { display: grid; gap: 10px; margin-top: 20px; }
.review-thread .review-message { border-bottom: 1px solid var(--line); box-shadow: none; }
.moderate-tools { position: relative; }
.moderate-tools > summary { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid #ece8f4; border-radius: 8px; color: #9a5171; background: #fff; cursor: pointer; list-style: none; }
.moderate-tools > summary::-webkit-details-marker { display: none; }
.moderate-tools[open] > summary { color: #fff; background: var(--purple); }
.moderate-tools > form { position: absolute; top: 35px; right: 0; z-index: 15; display: grid; width: min(290px, calc(100vw - 36px)); gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--soft-shadow); }
.moderate-tools label { font-size: 10px; }
.moderate-tools textarea { padding: 8px; font-size: 11px; }
.moderate-tools .primary { padding: 8px 10px; font-size: 11px; }
.reason-list { display: grid; gap: 7px; margin: 0; padding: 9px; border: 1px solid #eeeaf5; border-radius: 9px; }
.reason-list legend { padding: 0 4px; color: #4b4969; font-size: 10px; font-weight: 900; }
.reason-list label { display: flex; align-items: center; gap: 7px; color: #5c5872; font-size: 10px; font-weight: 600; }
.reason-list input[type="radio"] { width: auto; margin: 0; accent-color: var(--purple); }
.user-suggestions, .mention-suggestions { position: absolute; z-index: 25; display: grid; width: 100%; max-height: 220px; overflow: auto; padding: 5px; border: 1px solid #e8e2f5; border-radius: 12px; background: #fff; box-shadow: 0 12px 30px #29214c22; }
.user-suggestions { top: calc(100% - 1px); left: 0; }
.mention-suggestions { right: 12px; bottom: 76px; left: 12px; width: auto; }
.user-suggestions[hidden], .mention-suggestions[hidden] { display: none; }
label:has([data-user-lookup]) { position: relative; }
.suggestion-option { display: flex; width: 100%; align-items: center; justify-content: flex-start; gap: 9px; padding: 8px; border-radius: 8px; color: var(--ink); background: transparent; text-align: left; font-size: 12px; }
.suggestion-option:hover, .suggestion-option.suggestion-active { background: #f0edff; }
.suggestion-avatar { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border-radius: 9px; color: #493c91; background: #e2dcff; font-size: 11px; font-weight: 900; }
.suggestion-empty { padding: 10px; color: var(--muted); font-size: 11px; }
.alert-badge { display: grid; min-width: 20px; height: 20px; margin-left: auto; padding: 0 5px; place-items: center; border-radius: 10px; color: #34284d; background: var(--pink); font-size: 10px; }
.alert-list { display: grid; gap: 10px; }
.alert-card { display: flex; align-items: center; gap: 13px; padding: 16px; }
.alert-card.alert-unread { border-color: #d9d1ff; background: #fff; box-shadow: 0 7px 22px #5949b414; }
.alert-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 13px; color: #6654c1; background: #eeeaff; font-weight: 900; }
.alert-copy { flex: 1; min-width: 0; }
.alert-kind { display: flex; align-items: center; gap: 7px; color: #9087b9; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.alert-copy p { margin: 4px 0; color: #4d4a65; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--purple); }
.mark-all-form { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.mark-all-form button, .alert-card button { padding: 9px 11px; font-size: 10px; }

/* Login and invite */
.auth-screen { display: grid; min-height: 100vh; place-items: center; overflow: hidden; padding: 35px 20px; background: radial-gradient(ellipse at 18% 18%, #dcd5ff 0, transparent 34%), radial-gradient(ellipse at 84% 82%, #c7f5e8 0, transparent 30%), #f8f6ff; }
.auth-card { position: relative; width: min(100%, 430px); padding: 31px 36px; border: 1px solid #fff; border-radius: 27px; background: #fffefb; box-shadow: 0 28px 80px #493b8b21; }
.auth-art { position: relative; display: grid; height: 145px; place-items: center; }
.auth-art img { position: relative; z-index: 1; width: 145px; animation: float 4s ease-in-out infinite; }
.orbit { position: absolute; width: 176px; height: 60px; border: 1px solid #d5cafa; border-radius: 50%; transform: rotate(-18deg); }
.orbit-two { width: 198px; height: 76px; border-color: #f6bfdc; transform: rotate(27deg); }
.spark { position: absolute; color: #e4a948; font-size: 22px; font-style: normal; }
.spark-one { top: 17px; right: 57px; }
.spark-two { bottom: 16px; left: 61px; color: #e57bb7; }
.eyebrow { margin: 12px 0 7px; color: #8d7dc5; font-size: 9px; font-weight: 900; letter-spacing: .15em; text-align: center; }
.auth-card h1 { margin: 5px 0 9px; font-family: var(--font-display); font-size: 35px; letter-spacing: -.05em; text-align: center; }
.auth-card h1 span { color: var(--purple); }
.auth-copy { margin: 0 auto 20px; color: var(--muted); font-size: 12px; line-height: 1.65; text-align: center; }
.auth-card form { display: grid; gap: 13px; }
.auth-card label { text-align: left; }
.wide-button { width: 100%; margin-top: 4px; padding: 13px 16px; }
.wide-button span { font-size: 18px; }
.auth-foot { margin: 18px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.signup-card { padding-top: 18px; }
.small-art { height: 90px; }
.small-art img { width: 95px; }

@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-7px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 760px) {
    .mobile-topbar { position: sticky; top: 0; z-index: 30; display: flex; height: 59px; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid #ffffff18; background: var(--sidebar); }
    .mobile-topbar .brand { font-size: 16px; }
    .mobile-topbar .brand img { width: 35px; height: 35px; }
    .mobile-menu { display: grid; width: 38px; height: 38px; place-items: center; padding: 0; color: #fff; background: #ffffff16; }
    .sidebar { top: 59px; width: min(84vw, 290px); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 18px 0 38px #19172d25; }
    body.nav-open .sidebar { transform: translateX(0); }
    .desktop-brand { display: none; }
    .profile-chip { margin-top: 2px; }
    .main-panel { min-height: calc(100vh - 59px); margin-left: 0; }
    .channel-header { padding: 22px 20px 19px; }
    .header-stars { right: 17px; font-size: 17px; }
    .channel-maker { top: auto; right: 14px; bottom: 14px; }
    .message-list { padding: 13px 10px 18px; }
    .composer-wrap { padding: 10px 10px 14px; }
    .content-narrow, .content-wide { width: min(100% - 28px, 850px); margin-top: 24px; }
    .admin-grid { grid-template-columns: 1fr; }
    .game-cards { grid-template-columns: 1fr; }
    .leaderboard-grid { grid-template-columns: 1fr; }
    .game-card { min-height: 0; }
    .game-play form { grid-template-columns: 1fr; }
    .game-play form button { width: 100%; }
    .pending-card { align-items: flex-start; flex-direction: column; }
    .invite-list { width: 100%; }
    .message-composer { padding: 11px 12px 9px; }
    .message-composer textarea { min-height: 48px; }
    .send-button { min-height: 40px; }
    .message-tools { display: block; opacity: .8; }
}
@media (max-width: 480px) {
    .auth-card { padding: 25px 22px; }
    .channel-header h1 { font-size: 28px; }
    .role-columns { grid-template-columns: 1fr; gap: 2px; }
    .paper-card { padding: 17px; border-radius: 16px; }
    .crew-list li { flex-wrap: wrap; }
    .crew-list li > form { margin-left: 39px; }
    .settings-link { flex-wrap: wrap; }
    .alert-card { align-items: flex-start; flex-wrap: wrap; }
    .alert-copy { flex-basis: calc(100% - 52px); }
    .alert-card > form { margin-left: 51px; }
    .review-topline { align-items: flex-start; flex-direction: column; gap: 6px; }
    .review-actions { align-items: flex-start; flex-direction: column; }
    .message-meta { gap: 5px; }
    .channel-maker[open] { right: 10px; }
    .privacy-note { margin-inline: 10px; max-width: calc(100% - 20px); }
}
