input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button, input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
#game-toast { position: fixed; z-index: 10000; left: 50%; top: 44%; transform: translate(-50%,-50%) translateY(5px); max-width: min(80vw,500px); padding: 13px 25px; border: 1px solid #ffe397; border-radius: 12px; background: #18301af2; color: #fff3bd; font: 15px/1.6 'Microsoft YaHei',sans-serif; text-align: center; box-shadow: 0 5px 25px #0007; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .12s,transform .12s,visibility .12s; }
#game-toast[data-visible="true"] { opacity: 1; visibility: visible; transform: translate(-50%,-50%); }
.settings-dialog { box-sizing: border-box; width: 460px; max-width: 95vw; max-height: 90vh; overflow-y: auto; border: 2px solid #ebd48d; border-radius: 14px; padding: 20px 24px; color: #fff1c9; background: linear-gradient(#243d47,#10242d); font: 14px/1.6 'Microsoft YaHei',sans-serif; box-shadow: 0 15px 70px #000a; user-select: none; }
.settings-dialog::backdrop { background: #0008; }
.settings-dialog h2 { display: flex; justify-content: space-between; align-items: center; margin: 0 0 12px; font-size: 20px; }
.settings-dialog h3 { margin: 16px 0 8px; padding-top: 10px; border-top: 1px solid #e3d39c45; font-size: 15px; color: #eedd9f; }
.settings-dialog .settings-row { display: flex; align-items: center; gap: 12px; margin: 9px 0; }
.settings-dialog .settings-row > label { width: 72px; flex: none; }
.settings-dialog input:not([type=checkbox]):not([type=range]), .settings-dialog select { flex: 1; min-width: 0; padding: 8px; border: 1px solid #9db6b7; border-radius: 5px; color: #18333b; background: #fff8e5; font: inherit; user-select: text; }
.settings-dialog button { cursor: pointer; border: 1px solid #ebcf8b; border-radius: 6px; padding: 6px 14px; color: #fff4cc; background: linear-gradient(#3486a5,#195573); font: inherit; }
.settings-dialog .settings-close { width: 30px; height: 30px; padding: 0; border: none; background: transparent; font-size: 24px; }
.settings-dialog .settings-note { color: #b7c8c4; font-size: 12px; margin: 5px 0; }
.avatar-options { display: grid; grid-template-columns: repeat(5,1fr); gap: 7px; padding: 4px 0 10px; }
.avatar-options button { position: relative; padding: 3px; border: 2px solid transparent; background: #0d2028; border-radius: 10px; }
.avatar-options img { display: block; width: 100%; aspect-ratio: 1; border-radius: 7px; pointer-events: none; }
.avatar-options button[aria-pressed="true"] { border-color: #ffe378; box-shadow: 0 0 8px #ffd43a80; }
.avatar-options button[aria-pressed="true"]::after { content: '✓'; position: absolute; bottom: 0; right: 2px; border-radius: 50%; background: #ffe378; width: 17px; height: 17px; color: #4b390a; font: bold 13px/17px Arial; }
.profile-current-avatar { width: 34px; height: 34px; border: 1px solid #e7d494; border-radius: 50%; vertical-align: middle; margin-right: 5px; }
.settings-dialog button:focus-visible, .avatar-options button:focus-visible { outline: 2px solid #fff1aa; outline-offset: 2px; }
.room-return-link { display: block; padding: 10px 18px; margin-top: 20px; border-radius: 7px; color: #513510; background: #efcf80; text-align: center; text-decoration: none; font-weight: 600; }

/* Admin workspace: scoped so the game keeps its own visual style. */
.admin-app, .admin-auth { --admin-ink: #203c34; --admin-muted: #7a8983; --admin-green: #23785a; --admin-line: #e5ebe7; margin: 0; color: var(--admin-ink); background: #f4f7f5; font: 14px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif; -webkit-tap-highlight-color: transparent; }
.admin-app *, .admin-auth * { box-sizing: border-box; }
.admin-app [hidden], .admin-auth [hidden] { display: none !important; }
.admin-app button, .admin-app input, .admin-app select, .admin-auth button, .admin-auth input { font: inherit; }
.admin-app button, .admin-auth button { cursor: pointer; border: 0; }
.admin-app button:disabled, .admin-auth button:disabled { cursor: wait; opacity: .55; }
.admin-app a, .admin-auth a { color: inherit; text-decoration: none; }
.admin-app button:focus-visible, .admin-app a:focus-visible, .admin-auth a:focus-visible { outline: 3px solid #8cccb3; outline-offset: 3px; }
.admin-app input, .admin-app select, .admin-auth input { min-width: 0; max-width: 100%; border: 1px solid #dce5df; border-radius: 10px; background: #fff; color: var(--admin-ink); padding: 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
.admin-app input:focus, .admin-app select:focus, .admin-auth input:focus { border-color: #388e6e; box-shadow: 0 0 0 3px #388e6e15; }
.admin-app input::placeholder, .admin-auth input::placeholder { color: #9aa7a1; }
.admin-app h1, .admin-app h2, .admin-app p, .admin-auth h1, .admin-auth p { margin: 0; }
.admin-app svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.admin-app .admin-symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; width: 224px; z-index: 20; display: flex; flex-direction: column; padding: 34px 20px 24px; color: #d5e3dc; background: #153f35; }
.admin-brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: #fff !important; font-size: 19px; font-weight: 650; letter-spacing: .5px; }
.brand-mark { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 14px; background: #d9edb4; color: #254f3f; }
.brand-mark svg { width: 27px; height: 27px; fill: currentColor; stroke: none; }
.admin-brand small { display: block; margin-top: 1px; color: #97b4a6; font-size: 11px; font-weight: 400; letter-spacing: 2px; }
.admin-app .nav-caption { margin: 48px 14px 14px; color: #86a99a; font-size: 11px; letter-spacing: 2px; }
.admin-nav { display: grid; gap: 10px; }
.admin-nav button { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 18px; border-radius: 12px; background: transparent; color: #aec7ba; text-align: left; font-size: 14px; }
.admin-nav button:hover { background: #ffffff0a; }
.admin-nav button[aria-current="page"] { color: #e4f3c4; background: #ffffff12; box-shadow: inset 3px 0 #cce69d; font-weight: 600; }
.sidebar-account { display: flex; align-items: center; gap: 12px; margin-top: auto; padding: 20px 8px 0; border-top: 1px solid #ffffff16; min-width: 0; }
.admin-avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #ffffff23; border-radius: 50%; color: #d4e9c0; background: #ffffff10; font-size: 12px; font-weight: 600; letter-spacing: .5px; }
.sidebar-account > div { min-width: 0; }
.sidebar-account strong { display: block; overflow-wrap: anywhere; color: #e3eee7; font-size: 12px; font-weight: 500; }
.sidebar-account small { display: block; color: #90b3a1; font-size: 11px; }
.sidebar-account i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #cce69d; vertical-align: middle; }
.admin-workspace { margin-left: 224px; min-height: 100dvh; }
.admin-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; max-width: 1320px; margin: auto; padding: 30px 44px 18px; }
.header-eyebrow { color: #557468; font-size: 11px; letter-spacing: .5px; }
.header-eyebrow span { color: #9aa9a1; }
.admin-header h1 { margin-top: 7px; color: #183c2f; font-size: 26px; font-weight: 650; letter-spacing: -.7px; }
.return-game { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border: 1px solid #dce6df; border-radius: 10px; background: #fff; font-size: 12px; }
.return-game svg { width: 16px; height: 16px; }
.admin-main { max-width: 1320px; margin: auto; padding: 0 44px 40px; }
.admin-app .page-description { margin-bottom: 26px; color: var(--admin-muted); font-size: 13px; }
.admin-banner { margin-bottom: 16px !important; padding: 12px 16px; border-radius: 10px; background: #fff0ec; color: #ac493b; }
.player-overview { position: relative; display: flex; align-items: center; justify-content: space-between; overflow: hidden; padding: 26px 30px; border-radius: 18px; background: #244f40; color: #f6ffed; }
.overview-label { color: #bed2c2; font-size: 12px; }
.player-overview p { display: flex; align-items: baseline; gap: 10px; margin: 7px 0 14px; }
.player-overview strong { font-size: 42px; font-weight: 550; line-height: 1.15; letter-spacing: -2px; font-variant-numeric: tabular-nums; }
.player-overview p > span { color: #a8c5b1; font-size: 12px; }
.overview-tags { display: flex; gap: 8px; }
.overview-tags span { padding: 3px 8px; border: 1px solid #b5d2ba25; border-radius: 5px; color: #d2e5d1; font-size: 10px; }
.admin-app .overview-art { width: 130px; height: 130px; margin: -15px 10px -15px 0; color: #aac7a4; opacity: .26; stroke-width: .8; transform: rotate(-9deg); }
.players-toolbar { display: flex; gap: 10px; margin: 24px 0; }
.player-sort { display: flex; align-items: center; gap: 8px; min-width: 0; }
.player-sort > span { color: #87998c; font-size: 11px; flex: none; }
.admin-app .player-sort select { padding: 12px 10px; border-radius: 12px; color: #56735f; font-size: 12px; }
.player-detail { min-width: 0; }
.player-created { display: block; margin-top: 4px; color: #8fa095; font-size: 10px; font-weight: 400; overflow-wrap: anywhere; }
.delete-user-button { display: block; margin: 9px 0 0 auto; padding: 5px 9px; border: 1px solid #efd9d3 !important; border-radius: 6px; color: #b15b50; background: #fff9f7; font-size: 11px !important; }
.delete-user-button:hover { border-color: #c5594c !important; background: #fff0eb; color: #a4372c; }
.player-pagination { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 18px; color: #819687; font-size: 11px; }
.player-pagination > div { display: flex; align-items: center; gap: 12px; }
.player-pagination button { min-height: 40px; padding: 8px 12px; border: 1px solid #dfe8df !important; border-radius: 9px; color: #41674f; background: #fff; font-size: 12px; }
.player-pagination button:disabled { cursor: default; opacity: .4; }
#player-page-number { min-width: 36px; text-align: center; }
.admin-app #delete-user-dialog { width: 440px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; border: 1px solid #f1dbd4; border-radius: 20px; padding: 28px; color: #68443d; background: #fffdfb; box-shadow: 0 24px 100px #311a2040; }
#delete-user-dialog::backdrop { background: #2b191988; backdrop-filter: blur(3px); }
#delete-user-dialog h2 { margin: 7px 0 18px; color: #8d392e; font-size: 22px; }
.delete-user-target { padding: 14px; margin-bottom: 14px !important; border: 1px solid #f0dad3; border-radius: 10px; background: #fff1ec; color: #a53d31; font-size: 18px; font-weight: 600; overflow-wrap: anywhere; }
#delete-user-note { margin-bottom: 22px; color: #a27f72; font-size: 12px; line-height: 1.9; }
#delete-admin-password { display: block; width: 100%; }
#delete-user-final-note, #delete-user-error { margin-top: 16px; padding: 12px; border-radius: 8px; color: #af4134; background: #fff0e9; font-size: 12px; line-height: 1.8; }
.delete-user-actions { display: grid; grid-template-columns: 1fr 1.7fr; gap: 10px; margin-top: 24px; }
.delete-user-actions button { min-height: 44px; padding: 11px 8px; border-radius: 9px; background: #f0f2ed; color: #70836f; font-size: 12px; font-weight: 600; }
.delete-user-actions #delete-user-submit { background: #b7473a; color: #fff; }
.player-search { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; padding: 0 14px; border: 1px solid #e1e9e3; border-radius: 12px; background: #fff; color: #8c9d92; }
.player-search svg { width: 18px; height: 18px; }
.admin-app .player-search input { flex: 1; width: 100%; padding: 12px 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; font-size: 13px; }
.refresh-players { display: grid; place-items: center; flex: none; width: 46px; border: 1px solid #e1e9e3 !important; border-radius: 12px; background: #fff; color: #64816f; }
.refresh-players svg { width: 19px; height: 19px; }
.list-caption { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.list-caption h2 { font-size: 15px; font-weight: 600; }
.list-caption > span { color: #8b9a92; font-size: 11px; }
.players-surface { border: 1px solid var(--admin-line); border-radius: 14px; background: #fff; overflow: hidden; }
.admin-app table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.admin-app th { padding: 15px 18px; background: #fafcfb; color: #91a096; text-align: left; font-size: 11px; font-weight: 500; }
.admin-app th:first-child { width: 23%; }
.admin-app th:nth-child(2) { width: 20%; }
.admin-app td { padding: 20px 18px; border-top: 1px solid #edf1ee; vertical-align: middle; }
.player-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.player-avatar { display: grid; place-items: center; width: 35px; height: 35px; flex: none; border: 1px solid #e1e9df; border-radius: 11px; background: #f1f6ed; color: #718b5f; font-size: 13px; font-weight: 600; }
.player-name { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 550; }
.user-balance { overflow-wrap: anywhere; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.balance-controls { --balance-accent: #77877d; display: grid; grid-template-columns: 134px minmax(76px, 1fr) auto auto; align-items: center; gap: 6px; padding: 7px; border: 1px solid #e7ece8; border-radius: 10px; background: #f7f9f7; }
.balance-controls[data-action="add"] { --balance-accent: #247c51; background: #edf8f0; border-color: #cbe6d2; }
.balance-controls[data-action="subtract"] { --balance-accent: #c34740; background: #fff0ee; border-color: #f1d3ce; }
.admin-app .balance-action, .admin-app .balance-amount { width: 100%; padding: 9px 7px; border-radius: 6px; font-size: 11px; }
.admin-app .balance-action { color: var(--balance-accent); border-color: #d7e2d9; font-weight: 550; }
.balance-action option { color: #77877d; background: #fff; }
.balance-action option[value="add"] { color: #247c51; background: #edf8f0; }
.balance-action option[value="subtract"] { color: #c34740; background: #fff0ee; }
.balance-controls > span { color: #8c9a91; font-size: 10px; }
.balance-submit { padding: 10px 12px; border-radius: 7px; background: var(--balance-accent); color: #fff; white-space: nowrap; font-size: 11px !important; font-weight: 600; }
.admin-app .players-empty { padding: 48px 15px; color: var(--admin-muted); text-align: center; }
.admin-app .view-note { margin-top: 18px; color: #93a097; font-size: 11px; }
.config-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .88fr); align-items: start; gap: 20px; }
.config-basics { display: grid; gap: 20px; min-width: 0; }
.admin-card { padding: 26px; border: 1px solid var(--admin-line); border-radius: 16px; background: #fff; min-width: 0; }
.card-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.card-icon { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: #edf5e9; color: #5f8b52; font-size: 23px; }
.card-icon.amber { background: #fff4e4; color: #b98b37; }
.admin-card h2 { font-size: 16px; font-weight: 600; }
.card-heading p, .weights-card summary p { margin-top: 3px; color: #96a198; font-size: 11px; }
.current-limit { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px !important; padding: 12px 14px; border-radius: 9px; background: #f1f7ed; color: #6f8b60; font-size: 11px; }
.current-limit strong { color: #537e3c; font-size: 14px; overflow-wrap: anywhere; }
.field-label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 500; }
.input-with-unit { display: flex; align-items: center; gap: 12px; border: 1px solid #dce5df; border-radius: 10px; padding-right: 16px; background: #fcfdfc; }
.admin-app .input-with-unit input { flex: 1; width: 100%; padding: 14px; border: none; background: transparent; box-shadow: none; font-size: 20px; font-weight: 550; }
.input-with-unit:focus-within { border-color: #388e6e; box-shadow: 0 0 0 3px #388e6e15; }
.input-with-unit > span { flex: none; font-size: 12px; color: #8b9a90; }
.admin-app .field-note { margin-top: 12px; color: #8e9a92; font-size: 11px; line-height: 1.8; }
.weights-card summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; cursor: pointer; }
.weights-card summary::-webkit-details-marker { display: none; }
.details-chevron { color: #7d9285; font-size: 22px; transition: transform .15s; }
.weights-card[open] .details-chevron { transform: rotate(180deg); }
.combo-weights-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }
.config-switch { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 6px; margin-bottom: 18px; border: 1px solid #e1e7e2; border-radius: 14px; background: #eaf0eb; }
.config-switch button { display: flex; justify-content: center; align-items: center; gap: 7px; min-height: 46px; padding: 9px 12px; border-radius: 10px; color: #7b8b80; background: transparent; font-weight: 500; }
.config-switch button[aria-selected="true"] { color: #344b40; background: #fff; box-shadow: 0 2px 7px #183a2510; }
.config-switch button i { width: 7px; height: 7px; border-radius: 50%; background: #a85c34; flex: none; }
.config-switch button[data-config-scope="low"] i { background: #328268; }
#config-tab-high[aria-selected="true"] { color: #9b4b2a; background: #fff7ee; }
#config-tab-low[aria-selected="true"] { color: #226a50; background: #f0f9ef; }
.config-context { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 20px; }
.config-context > span { flex: none; padding: 4px 10px; border-radius: 6px; color: #64796b; background: #e7eee8; font-size: 11px; }
.config-context p { color: #8c9b91; font-size: 11px; }
#view-config { --config-accent: #4e6657; --config-tint: #eff3ef; }
#view-config[data-scope="high"] { --config-accent: #a25831; --config-tint: #fff3e7; }
#view-config[data-scope="low"] { --config-accent: #287c5e; --config-tint: #edf7ef; }
#view-config .primary-button { background: var(--config-accent); }
#view-config .card-icon, #view-config .current-limit, #view-config .config-context > span { color: var(--config-accent); background: var(--config-tint); }
#view-config .current-limit strong { color: var(--config-accent); }
#config-general { max-width: 650px; }
.combo-item { min-width: 0; }
.combo-item label { display: block; margin-bottom: 5px; color: #65816f; font-size: 11px; }
.admin-app .combo-item input { width: 100%; padding: 10px 8px; border-radius: 7px; font-size: 12px; }
.config-savebar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 18px 0; }
.config-savebar p { color: #8b9a90; font-size: 11px; }
.primary-button { padding: 13px 24px; border-radius: 10px; background: #23785a; color: #fff; font-weight: 600; }
.primary-button:hover { background: #1c654b; }
.account-view { max-width: 620px; }
.account-summary { display: flex; align-items: center; gap: 18px; padding: 12px 2px 30px; }
.account-summary .admin-avatar { width: 64px; height: 64px; border: 1px solid #cbdac7; background: #e5efdd; color: #638054; font-size: 20px; }
.account-summary > div { min-width: 0; }
.account-summary p { color: #8c9a91; font-size: 11px; }
.account-summary strong { display: block; margin: 3px 0 6px; overflow-wrap: anywhere; font-size: 20px; font-weight: 600; }
.account-badge { padding: 2px 7px; border-radius: 4px; background: #e6efe4; color: #709264; font-size: 10px; }
.credentials-form { display: grid; gap: 20px; }
.credentials-form label { display: block; color: #61776b; font-size: 12px; }
.credentials-form input { display: block; width: 100%; margin-top: 8px; }
.admin-app .credentials-form .field-note { margin: 0; }
.logout-button { width: 100%; margin-top: 20px; padding: 14px; border: 1px solid #e8d8d2 !important; border-radius: 12px; background: transparent; color: #b26e61; }
.admin-app #balance-confirm-dialog { width: 420px; max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 28px; border: none; border-radius: 22px; color: #284638; box-shadow: 0 24px 100px #071e2340; }
#balance-confirm-dialog::backdrop { background: #102c2a88; backdrop-filter: blur(3px); }
.confirm-kicker { font-size: 11px; color: #94a399; }
.admin-app #balance-confirm-dialog h2 { margin: 6px 0 24px; font-size: 23px; font-weight: 600; }
.confirm-details { margin: 0; padding: 0; }
.confirm-details > div { display: flex; justify-content: space-between; gap: 20px; margin: 16px 0; }
.confirm-details dt { color: #94a198; font-size: 12px; flex: none; }
.confirm-details dd { margin: 0; text-align: right; overflow-wrap: anywhere; font-size: 13px; }
.confirm-details .confirm-amount-row { display: block; padding: 20px; margin-top: 24px; border-radius: 12px; background: #f4f7f3; }
.confirm-amount-row dd { text-align: left; margin-top: 6px; }
#balance-confirm-amount { font-size: 28px; font-weight: 600; letter-spacing: -.5px; }
.confirm-amount-row small { margin-left: 8px; color: #94a198; font-size: 11px; }
#balance-confirm-dialog[data-action="add"] { --balance-accent: #247c51; }
#balance-confirm-dialog[data-action="subtract"] { --balance-accent: #c34740; }
#balance-confirm-action, #balance-confirm-amount { color: var(--balance-accent); }
.admin-app #balance-confirm-note { color: #94a198; font-size: 11px; margin-top: 18px; }
.admin-app #balance-confirm-error { margin-top: 12px; padding: 10px; border-radius: 7px; background: #fff0ed; color: #b34339; font-size: 12px; }
.balance-confirm-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: 10px; margin-top: 26px; }
.balance-confirm-actions button { padding: 13px; border-radius: 10px; background: #eff3ef; color: #6b7e70; font-weight: 600; }
.balance-confirm-actions .btn-add { background: #247c51; color: #fff; }
.balance-confirm-actions .btn-sub { background: #c34740; color: #fff; }
.admin-app #game-toast, .admin-auth #game-toast { padding: 12px 20px; border: none; border-radius: 12px; background: #193e35f2; color: #f2faef; font: 13px/1.7 -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif; }
.admin-auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: #eaf0e9; }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; width: min(900px, 100%); min-height: 570px; border: 1px solid #e1e9dd; border-radius: 26px; overflow: hidden; background: #fff; box-shadow: 0 20px 80px #17392a0a; }
.auth-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 42px; background: #1d493a; color: #f3f9ed; }
.auth-brand-panel .brand-mark { width: 46px; height: 46px; margin-bottom: 18px; }
.auth-brand-panel .brand-mark svg { width: 30px; height: 30px; }
.auth-brand-panel h1 { font-size: 28px; font-weight: 600; }
.auth-brand-panel p { margin-top: 8px; color: #a4c0ab; font-size: 12px; letter-spacing: 2px; }
.auth-brand-art { position: absolute; width: 290px; height: 290px; right: -50px; bottom: 10px; opacity: .08; fill: #e1f3c6; transform: rotate(-16deg); }
.auth-brand-panel small { position: relative; color: #8cae98; font-size: 11px; }
.auth-form { padding: 56px 42px 40px; align-self: center; }
.auth-form h2 { margin: 0 0 8px; font-size: 25px; font-weight: 600; }
.auth-form > p { color: #94a198; font-size: 12px; margin-bottom: 28px; }
.auth-form label { display: block; margin-top: 20px; color: #68816f; font-size: 12px; }
.auth-form input { display: block; width: 100%; margin-top: 8px; }
.auth-form .primary-button { width: 100%; margin-top: 20px; }
.auth-form .auth-back { display: block; margin-top: 24px; color: #94a198; text-align: center; font-size: 12px; }
.auth-form .error { min-height: 18px; margin: 12px 0 0; color: #bc5144; font-size: 12px; }
@media (max-width: 1279px) {
  .admin-app table, .admin-app tbody { display: block; }
  .admin-app thead { display: none; }
  .admin-app tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 20px; border-top: 1px solid var(--admin-line); gap: 16px; }
  .admin-app tr:first-child { border-top: 0; }
  .admin-app td { display: block; padding: 0; border: 0; min-width: 0; }
  .admin-app td:last-child { grid-column: 1 / -1; }
  .admin-app .user-balance { text-align: right; font-size: 15px; }
  .admin-app .user-balance::before { content: '金币余额'; display: block; margin-bottom: 1px; color: #97a399; font-size: 10px; font-weight: 400; }
  .balance-controls { grid-template-columns: 150px minmax(76px, 1fr) auto auto; }
  .config-layout { grid-template-columns: minmax(0, 1fr); }
  .config-basics { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .admin-card { padding: 22px; }
}
@media (max-width: 1000px) {
  .admin-sidebar { width: 190px; padding-inline: 14px; }
  .admin-workspace { margin-left: 190px; }
  .admin-brand { gap: 10px; font-size: 17px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 11px; }
  .admin-header { padding: 28px 28px 18px; }
  .admin-main { padding-inline: 28px; }
  .config-basics { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .admin-workspace { margin: 0; }
  .admin-sidebar { position: fixed; inset: auto 0 0; width: 100%; padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #e1e9e2; background: #fffffff5; backdrop-filter: blur(18px); color: #8d9e92; }
  .admin-sidebar .admin-brand, .nav-caption, .sidebar-account { display: none; }
  .admin-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .admin-nav button { flex-direction: column; justify-content: center; gap: 3px; padding: 7px 4px; border-radius: 12px; color: #7c9082; font-size: 11px; line-height: 1.5; }
  .admin-nav button[aria-current="page"] { color: #297552; background: #edf4e9; box-shadow: none; }
  .admin-nav svg { width: 21px; height: 21px; }
  .admin-header { padding: calc(22px + env(safe-area-inset-top)) 22px 13px; }
  .admin-header h1 { font-size: 25px; margin-top: 5px; }
  .return-game { padding: 8px 10px; gap: 6px; background: #fff9; font-size: 11px; }
  .admin-main { padding: 0 20px calc(110px + env(safe-area-inset-bottom)); }
  .admin-app .page-description { margin-bottom: 22px; font-size: 12px; }
  .player-overview { padding: 22px 24px; border-radius: 16px; }
  .player-overview strong { font-size: 38px; }
  .admin-app .overview-art { width: 100px; height: 100px; margin-right: -2px; }
  .players-toolbar { margin: 20px 0; }
  .players-toolbar { flex-wrap: wrap; }
  .player-search { flex-basis: calc(100% - 60px); }
  .player-sort { order: 3; width: 100%; }
  .admin-app .player-sort select { flex: 1; min-height: 44px; font-size: 14px; }
  .player-pagination { flex-direction: column; gap: 10px; }
  .player-pagination > div { width: 100%; justify-content: space-between; }
  #delete-admin-password { font-size: 16px; }
  .list-caption { margin-bottom: 12px; }
  .list-caption h2 { font-size: 14px; }
  .players-surface { border: 0; border-radius: 0; background: transparent; overflow: visible; }
  .admin-app tbody { display: grid; gap: 14px; }
  .admin-app tr, .admin-app tr:first-child { padding: 17px; gap: 16px 12px; border: 1px solid #e3ebe3; border-radius: 14px; background: #fff; }
  .player-name { font-size: 13px; }
  .player-avatar { width: 32px; height: 32px; border-radius: 10px; }
  .player-identity { gap: 8px; }
  .balance-controls { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 9px; }
  .admin-app .balance-action { grid-column: 1 / -1; padding: 10px; font-size: 12px; }
  .admin-app .balance-amount { padding: 10px 8px; font-size: 16px; }
  .balance-submit { min-height: 42px; padding: 10px 13px; font-size: 12px !important; }
  .admin-app .view-note { line-height: 1.8; text-align: center; }
  .config-layout, .config-basics { gap: 16px; }
  .admin-card { padding: 20px; border-radius: 15px; }
  .card-heading { margin-bottom: 22px; }
  .admin-card h2 { font-size: 15px; }
  .admin-card .field-note { font-size: 12px; }
  .field-label, .credentials-form label { font-size: 13px; }
  .current-limit { padding: 12px; }
  .current-limit strong { font-size: 13px; }
  .combo-weights-grid { gap: 12px 10px; }
  .config-switch { gap: 3px; padding: 4px; margin-top: 4px; }
  .config-switch button { padding: 10px 3px; font-size: 12px; gap: 5px; min-height: 44px; }
  .config-savebar { position: sticky; bottom: calc(86px + env(safe-area-inset-bottom)); margin-top: 18px; padding: 12px 0; background: #f4f7f5f2; backdrop-filter: blur(10px); }
  .config-savebar p { display: none; }
  .config-savebar button { width: 100%; }
  .account-summary { padding: 4px 0 24px; }
  .credentials-form { gap: 18px; }
  .admin-app .credentials-form input, .admin-auth input { font-size: 16px; }
  .admin-app #balance-confirm-dialog { border-radius: 20px; padding: 24px; }
  .admin-auth { padding: 24px 20px; }
  .auth-layout { display: block; width: min(420px, 100%); min-height: 0; border-radius: 22px; }
  .auth-brand-panel { display: block; padding: 28px; }
  .auth-brand-panel .brand-mark { margin-bottom: 12px; width: 38px; height: 38px; border-radius: 12px; }
  .auth-brand-panel h1 { font-size: 22px; }
  .auth-brand-panel small { display: none; }
  .auth-brand-art { width: 190px; height: 190px; right: -8px; bottom: -40px; }
  .auth-form { padding: 26px 28px 28px; }
  .auth-form h2 { font-size: 22px; }
  .auth-form > p { margin-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) { .admin-app *, .admin-auth * { transition: none !important; } }
