/* Community pages: account, configuration library, players, announcements and password reset. Admin console lives in admin.css. */

.page { padding-bottom: 8px; }
.page-notice { margin-bottom: 16px; }
.page-retry { margin: -4px 0 18px; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes beat { 50% { opacity: .3; } }
@keyframes ring-pulse { from { transform: scale(1); opacity: .6; } to { transform: scale(1.7); opacity: 0; } }

/* Tile with a white glyph, used for page illustrations. */
.mail-art, .reset-art, .gate-art, .dropzone-art, .validation-art, .row-icon, .passkey-icon { display: grid; place-items: center; flex-shrink: 0; }
.mail-art, .reset-art, .gate-art { width: 60px; height: 60px; border-radius: 18px; background: var(--brand-gradient); color: #fff; box-shadow: 0 14px 30px -14px rgb(106 63 210 / .7); animation: brand-flow 9s linear infinite; }
.mail-art svg, .reset-art svg { width: 28px; height: 28px; }
.gate-art::after { content: ""; width: 28px; height: 28px; background: #fff; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10' rx='2.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3M12 14.5v2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='10.5' width='15' height='10' rx='2.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3M12 14.5v2'/%3E%3C/svg%3E") center / contain no-repeat; }
.gate[data-state="error"] .gate-art { background: var(--surface-3); box-shadow: none; animation: none; }
.gate[data-state="error"] .gate-art::after { background: var(--ink-3); }

.gate { display: grid; justify-items: center; gap: 10px; margin-bottom: 24px; padding: 48px 24px; text-align: center; animation: view-in .4s var(--ease-out); }
.gate h2 { margin-top: 6px; font-size: 1.45rem; }
.gate .form-actions { justify-content: center; margin-top: 8px; }

/* Pixel grass block and treasure chest, drawn with gradients. */
.setup-art { width: 60px; height: 60px; background: linear-gradient(90deg, transparent 25%, rgb(0 0 0 / .08) 25% 50%, transparent 50% 75%, rgb(0 0 0 / .06) 75%) 0 0 / 30px 15px, linear-gradient(#7ccf52 0 30%, #5fae3c 30% 38%, #8b5d3b 38%); box-shadow: inset -6px -6px 0 rgb(0 0 0 / .14), inset 6px 0 0 rgb(255 255 255 / .1); image-rendering: pixelated; }
.empty-chest { width: 64px; height: 54px; margin-bottom: 4px; border-radius: 3px; background: linear-gradient(#cfd2d6, #cfd2d6) 28px 18px / 8px 12px no-repeat, linear-gradient(#2f1c0c, #2f1c0c) 0 21px / 64px 4px no-repeat, linear-gradient(#b5752f, #a4672a) 4px 4px / 56px 17px no-repeat, linear-gradient(#93591f, #7f4b19) 4px 25px / 56px 25px no-repeat, #2f1c0c; box-shadow: 0 12px 20px -12px rgb(0 0 0 / .45); }
:root[data-theme="dark"] .empty-chest { filter: brightness(.85); }

/* ---------- Page hero & tabs ---------- */
.page-hero { position: relative; isolation: isolate; padding-top: clamp(28px, 4.5vw, 48px); background: linear-gradient(180deg, var(--bg-tint), var(--bg)); border-bottom: 1px solid var(--line); overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(ellipse 50% 90% at 95% 0%, #000, transparent 70%); mask-image: radial-gradient(ellipse 50% 90% at 95% 0%, #000, transparent 70%); }
.page-hero::after { content: ""; position: absolute; z-index: -1; right: -80px; top: -140px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--violet) 14%, transparent), transparent 65%); }
.page-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding-bottom: 24px; }
.page-hero h1 { font-size: clamp(2rem, 4.4vw, 2.9rem); font-weight: 800; letter-spacing: -.045em; }
.page-hero p { margin-top: 8px; color: var(--ink-3); font-size: 1rem; }
.hero-docs { display: inline-block; margin-top: 8px; font-size: .9rem; }
.page-hero .btn[aria-current] { box-shadow: 0 0 0 4px var(--accent-ring); }
.tabs { display: flex; gap: 2px; margin-bottom: -1px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; padding: 12px 16px 14px; font-weight: 650; font-size: .92rem; color: var(--ink-3); white-space: nowrap; transition: color .2s; }
.tabs a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2.5px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform .3s var(--ease-out); }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { color: var(--ink); }
.tabs a[aria-current]::after { transform: none; }
.library-body { padding-top: 28px; }
.list-title { font-size: 1.3rem; letter-spacing: -.02em; }

/* ---------- Library toolbar ---------- */
.library-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 18px; }
.search { display: flex; align-items: center; gap: 10px; flex: 1 1 380px; min-width: 0; height: 52px; padding: 0 6px 0 16px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .2s, box-shadow .2s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-ring); }
.search > svg { color: var(--ink-3); }
.search-input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: none; background: none; font-size: 1rem; }
.search-input::placeholder { color: color-mix(in srgb, var(--ink-3) 80%, transparent); }
.search .btn { min-height: 40px; border-radius: 12px; }
.library-controls:empty { display: none; }
.select-row { display: flex; gap: 10px; }
.select-row .select { width: 168px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-row .chip { flex-shrink: 0; }
.result-count { margin: 20px 0 12px; font-size: .84rem; font-weight: 650; color: var(--ink-3); }

/* ---------- Config cards ---------- */
.config-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 16px; }
.config-grid[aria-busy="true"] > .config-card:not(.config-card-skeleton) { opacity: .55; transition: opacity .2s; }
.config-grid > .empty { grid-column: 1 / -1; padding-block: 64px; border: 1.5px dashed var(--line-2); border-radius: 22px; }
/* Swipe Row (phones): a public card slides left over 收藏 and 下载; elsewhere the wrapper is not there at all. */
.swipe-row { display: contents; }
.swipe-actions { display: none; }
@media (max-width: 640px) {
  .swipe-row { position: relative; display: block; overflow: hidden; border-radius: 20px; }
  .swipe-actions { position: absolute; inset: 1px 1px 1px auto; display: flex; border-radius: 0 19px 19px 0; overflow: hidden; }
  .swipe-actions button { display: grid; place-items: center; align-content: center; gap: 4px; width: 75px; border: 0; color: #fff; font-size: .78rem; font-weight: 750; }
  .swipe-actions svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .swipe-fav { background: var(--violet); }
  .swipe-dl { background: var(--accent); color: var(--accent-ink) !important; }
  .swipe-actions button.is-done svg { animation: swipe-pop .45s var(--spring); }
  .swipe-row > .config-card { touch-action: pan-y; transition: translate .5s var(--spring), border-color .25s, box-shadow .25s; }
  .swipe-row:not(.is-open) .swipe-actions { visibility: hidden; transition: visibility 0s .5s; }
  .swipe-row.is-open .swipe-actions, .swipe-row:has(> .config-card[style*="translate:"]) .swipe-actions { visibility: visible; transition: none; }
}
@keyframes swipe-pop { 40% { scale: 1.35; } }
/* Bounce Cards: the empty 我的配置 / 我的收藏 fans out three blank cards; the hovered one stands up. */
.bounce-stack { position: relative; display: block; width: 300px; max-width: 100%; height: 150px; margin-bottom: 6px; }
.bounce-card { --x: 0px; --r: 0deg; --lift: 0px; --push: 0px; position: absolute; left: calc(50% - 52px); top: 14px; width: 104px; height: 126px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-md); transform: translateX(calc(var(--x) + var(--push))) translateY(var(--lift)) rotate(var(--r)); transition: transform .55s var(--spring); }
.bounce-card:nth-child(1) { --x: -78px; --r: -12deg; }
.bounce-card:nth-child(3) { --x: 78px; --r: 12deg; }
.bounce-card i { display: block; height: 8px; margin-top: 8px; border-radius: 4px; background: var(--surface-3); }
.bounce-card i:first-child { width: 60%; height: 14px; margin-top: 0; background: color-mix(in srgb, var(--accent) 45%, var(--surface-3)); }
.bounce-card:nth-child(1) i:first-child { background: color-mix(in srgb, var(--violet) 45%, var(--surface-3)); }
.bounce-card:nth-child(3) i:first-child { background: color-mix(in srgb, var(--supporter) 45%, var(--surface-3)); }
.bounce-card i:nth-child(3) { width: 72%; }
.bounce-card b { position: absolute; left: 10px; bottom: 10px; display: flex; gap: 4px; }
.bounce-card b::before, .bounce-card b::after { content: ""; width: 16px; height: 16px; border-radius: 6px; background: var(--surface-2); }
.bounce-card.is-hover { --r: 0deg; --lift: -12px; z-index: 2; }
.config-card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); transition: border-color .25s, box-shadow .25s; animation: view-in .45s var(--ease-out) both; }
.config-card:nth-child(2) { animation-delay: .04s; } .config-card:nth-child(3) { animation-delay: .08s; } .config-card:nth-child(4) { animation-delay: .12s; } .config-card:nth-child(5) { animation-delay: .16s; } .config-card:nth-child(n+6) { animation-delay: .2s; }
.config-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-md); }
.config-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.config-card-top .tag-list:empty + .badge { margin-left: auto; }
.config-card-title { font-size: 1.12rem; line-height: 1.38; letter-spacing: -.012em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.config-card-title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.config-card-title a:focus-visible { outline: none; }
.config-card:has(.config-card-title a:focus-visible) { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.config-card :is(.tag, .config-author-link, button) { position: relative; z-index: 1; }
.config-card-desc { color: var(--ink-2); font-size: .9rem; line-height: 1.65; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.config-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: auto; padding-top: 4px; font-size: .8rem; color: var(--ink-3); }
.meta-chip { padding: 1px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-family: var(--font-mono); font-size: .72rem; }
.config-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.config-card-foot:empty { display: none; }
.config-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.config-card-foot:has(.config-card-actions) { flex-direction: column; align-items: stretch; }
.config-card-foot:has(.config-card-actions) .config-card-actions { padding-top: 10px; border-top: 1px dashed var(--line); }
.config-card-foot:has(.config-card-actions) .config-reactions:only-child, .config-card-foot .config-card-actions:only-child { padding-top: 0; border-top: 0; }
.config-download { flex-shrink: 0; margin-left: auto; }
.config-author-link { display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; font-weight: 650; color: var(--ink-2); transition: color .2s; }
.config-author-link .author-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.config-author-link .supporter-badge { margin-left: -2px; }
.config-author-link:hover { color: var(--accent-text); }
.config-card-skeleton { pointer-events: none; animation: none; gap: 12px; }
.skeleton-short { width: 34%; height: 22px; } .skeleton-title { width: 72%; height: 24px; } .skeleton-line { width: 100%; height: 12px; } .skeleton-line + .skeleton-line { width: 78%; } .skeleton-meta { width: 52%; height: 14px; margin-top: 18px; }

.config-reactions { display: flex; gap: 6px; }
.reaction { display: inline-flex; align-items: center; gap: 6px; height: 34px; white-space: nowrap; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .8rem; font-weight: 650; font-variant-numeric: tabular-nums; transition: color .2s, border-color .2s, background-color .2s, scale .2s; }
.reaction svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; transition: fill .2s; }
.reaction:hover:not(:disabled) { border-color: var(--line-2); color: var(--ink); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .reaction:hover:not(:disabled) { scale: 1.03; } }
.reaction[aria-pressed="true"]:first-child { color: #e5484d; border-color: color-mix(in srgb, #e5484d 35%, var(--line)); background: color-mix(in srgb, #e5484d 8%, var(--surface)); }
.reaction[aria-pressed="true"]:last-child { color: #c98a06; border-color: color-mix(in srgb, #e8a91b 45%, var(--line)); background: color-mix(in srgb, #e8a91b 10%, var(--surface)); }
:root[data-theme="dark"] .reaction[aria-pressed="true"]:last-child { color: #ffcf5c; }
.reaction[aria-pressed="true"] svg { fill: currentColor; animation: pop-in .45s var(--ease-out); }

.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 30px; font-size: .875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* Tag picker (checkbox chips, max three) */
.tag-picker { min-width: 0; margin: 0; padding: 0; border: 0; }
.tag-picker legend { margin-bottom: 9px; padding: 0; font-size: .84rem; font-weight: 650; color: var(--ink-2); }
.tag-picker-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-choice { position: relative; display: inline-flex; }
.tag-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tag-choice input:disabled { cursor: not-allowed; }
.tag-choice span { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: .84rem; font-weight: 600; color: var(--ink-2); transition: background-color .2s, border-color .2s, color .2s, opacity .2s; }
.tag-choice span::before { content: ""; width: 15px; height: 15px; border-radius: 5px; border: 1.5px solid var(--line-2); background: var(--surface) center / 11px no-repeat; transition: background-color .2s, border-color .2s; }
.tag-choice:hover input:not(:disabled) + span { border-color: color-mix(in srgb, var(--violet) 35%, var(--line-2)); }
.tag-choice input:checked + span { background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 40%, transparent); color: var(--violet-text); }
.tag-choice input:checked + span::before { border-color: var(--violet); background-color: var(--violet); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.tag-choice input:focus-visible + span { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.tag-choice input:disabled + span { opacity: .45; }

/* ---------- Auth (guest) ---------- */
.account-container { padding-top: 28px; }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 470px); min-height: min(680px, calc(100svh - var(--header-height) - 72px)); border-radius: 30px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); animation: view-in .5s var(--ease-out); }
.auth-visual { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; padding: clamp(28px, 4vw, 44px); color: #fff; background: linear-gradient(180deg, rgb(8 16 12 / .05) 25%, rgb(8 16 12 / .78)), url("../background.png") 40% center / cover; }
.auth-visual::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 50% at 0% 100%, rgb(63 196 119 / .35), transparent), radial-gradient(60% 50% at 100% 100%, rgb(106 63 210 / .3), transparent); }
.auth-visual-mark { width: 60px; height: 60px; border-radius: 18px; margin-bottom: auto; }
.auth-visual-mark img { width: 38px; height: 38px; }
.auth-visual-title { font-family: var(--font-display); font-size: clamp(1.9rem, 3vw, 2.6rem); font-weight: 800; line-height: 1.18; letter-spacing: -.035em; text-shadow: 0 2px 20px rgb(0 0 0 / .3); }
.auth-visual-sub { color: rgb(255 255 255 / .75); font-size: .88rem; font-weight: 650; letter-spacing: .05em; }
.auth-card { display: flex; flex-direction: column; justify-content: center; gap: 22px; min-width: 0; padding: clamp(28px, 5vw, 56px); }
.auth-card h1 { font-size: 2rem; letter-spacing: -.04em; }
.auth-card h1:focus { outline: none; }
.auth-card .form { animation: view-in .35s var(--ease-out); }
.auth-switch { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 14px; padding-top: 4px; font-size: .9rem; color: var(--ink-3); }
.auth[data-view="login"] .auth-switch::before { content: "还没有账号？"; margin-right: -10px; }
.auth[data-view="register"] .auth-switch::before { content: "已有账号？"; margin-right: -10px; }
/* These prompts live in CSS, so each site language set by i18n.js gets its own wording here. */
:root:lang(zh-TW) .auth[data-view="login"] .auth-switch::before { content: "還沒有帳號？"; }
:root:lang(zh-TW) .auth[data-view="register"] .auth-switch::before { content: "已有帳號？"; }
:root:lang(en) .auth[data-view="login"] .auth-switch::before { content: "No account yet?"; }
:root:lang(en) .auth[data-view="register"] .auth-switch::before { content: "Have an account?"; }
:root:lang(ja) .auth[data-view="login"] .auth-switch::before { content: "アカウントをお持ちでない方は"; }
:root:lang(ja) .auth[data-view="register"] .auth-switch::before { content: "アカウントをお持ちの方は"; }
.passkey-login { display: grid; gap: 16px; }
.check { display: inline-flex; align-items: center; gap: 9px; width: fit-content; font-size: .9rem; color: var(--ink-2); cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: inherit; }
.passkey-button::before { content: ""; width: 20px; height: 20px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8.5' cy='8' r='4'/%3E%3Cpath d='M3.5 20.5v-1a5 5 0 0 1 5-5h1.2M16.5 11.5a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6ZM16.5 17v4l1.5-1.2'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8.5' cy='8' r='4'/%3E%3Cpath d='M3.5 20.5v-1a5 5 0 0 1 5-5h1.2M16.5 11.5a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6ZM16.5 17v4l1.5-1.2'/%3E%3C/svg%3E") center / contain no-repeat; }
.challenge { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.challenge:empty { display: none; }
.challenge iframe { max-width: 100%; }

.account-loading { display: grid; justify-items: center; gap: 16px; padding: 120px 20px; color: var(--ink-3); text-align: center; }
.account-loading[data-state="error"] :is(.lattice, .lattice-clock) { display: none; }
.mail-action { display: grid; justify-items: center; gap: 18px; max-width: 440px; margin: 40px auto; padding: 40px 32px; text-align: center; animation: pop-in .5s var(--ease-out); }
.mail-action h1 { font-size: 1.6rem; }
.mail-action .form { width: 100%; }
.mail-action .notice { text-align: left; }

/* ---------- Account (signed in) ---------- */
.account { display: grid; grid-template-columns: 284px minmax(0, 1fr); gap: 28px; align-items: start; animation: view-in .45s var(--ease-out); }
.account-side { position: sticky; top: calc(var(--header-height) + 24px); display: grid; gap: 14px; padding: 16px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.account-identity { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 4px 16px; border-bottom: 1px solid var(--line); }
.account-avatar .player-avatar { width: 56px; height: 56px; border-radius: 16px; font-size: 1.35rem; }
.account-identity-text { display: grid; min-width: 0; flex: 1; }
.account-name { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 1.05rem; }
.account-name > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity-text > span { font-size: .8rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-identity .badge { position: absolute; top: 0; right: 0; }
.account-nav { display: grid; gap: 4px; }
.account-nav :is(button, a) { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 14px; border: 0; border-radius: 13px; background: none; color: var(--ink-2); font-weight: 650; font-size: .92rem; text-align: left; white-space: nowrap; transition: background-color .2s, color .2s; }
.account-nav :is(button:not(:disabled), a):hover { background: var(--surface-2); color: var(--ink); }
/* 我的披风 opens its own page, so it carries the same chevron as the cape card instead of a section state. */
.account-nav .nav-go { width: 16px; height: 16px; margin-left: auto; color: var(--ink-3); transition: translate .3s var(--ease-out); }
.account-nav a:hover .nav-go { translate: 3px 0; }
.account-nav button[aria-current] { background: var(--accent-soft); color: var(--accent-text); }
.account-nav button:disabled { opacity: .55; cursor: not-allowed; }
.nav-dot { width: 8px; height: 8px; margin-left: auto; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
.account-side-links { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 12px 8px 2px; border-top: 1px solid var(--line); font-size: .84rem; }
.account-side-links a { color: var(--ink-3); transition: color .2s; }
.account-side-links a:hover { color: var(--accent-text); }
.account-main { min-width: 0; }
.account-view { display: grid; gap: 16px; animation: view-in .35s var(--ease-out); }
.account-view h2 { font-size: 1.6rem; letter-spacing: -.035em; margin-bottom: 2px; }
.account-view h2:focus { outline: none; }
#minecraft-panel { display: grid; gap: 16px; }
.settings-card { padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.settings-row, .settings-card-head { display: flex; align-items: center; gap: 14px; }
.settings-card-head h3 { font-size: 1.02rem; }
.row-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); }
.row-text { flex: 1; min-width: 0; }
.row-text p { overflow-wrap: anywhere; }
.row-text .muted { font-size: .85rem; }
.row-label { font-size: .78rem; font-weight: 700; color: var(--ink-3); }
.row-label + p { font-weight: 650; }
.row-extra { display: grid; gap: 10px; justify-items: start; margin-top: 16px; padding-left: 58px; }
.row-extra:not(:has(> :not([hidden]))) { display: none; }
.disclosure .summary-main { display: inline-flex; align-items: center; gap: 12px; }
.disclosure .summary-main svg { color: var(--ink-3); }
.disclosure > summary { min-height: 58px; padding-inline: 20px; border-radius: inherit; }
.disclosure { border-radius: 18px; box-shadow: var(--shadow-sm); }
.disclosure-body { padding: 2px 20px 20px; }
.disclosure-body > .muted { margin-bottom: 14px; font-size: .875rem; }
#security-forgot-slot .btn { width: auto; min-height: 44px; font-size: .9375rem; border-radius: var(--radius); }
.danger-zone { border-color: color-mix(in srgb, var(--danger) 24%, var(--line)); }
.danger-zone > summary { color: var(--danger-text); }

.setup-card { display: grid; justify-items: center; gap: 16px; padding: 44px 24px; border-radius: 22px; border: 1.5px dashed var(--line-2); background: var(--surface); text-align: center; color: var(--ink-2); font-weight: 600; }
.identity-card { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: 22px; background: linear-gradient(120deg, var(--accent-soft), var(--violet-soft)); border: 1px solid var(--line); animation: pop-in .6s var(--ease-out); }
.identity-avatar .player-avatar { width: 76px; height: 76px; border-radius: 20px; }
.identity-text { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.identity-text strong { font-family: var(--font-display); font-size: 1.45rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.identity-text code { font-size: .74rem; color: var(--ink-3); overflow-wrap: anywhere; }

.link-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.link-steps li { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); font-size: .875rem; font-weight: 600; line-height: 1.55; color: var(--ink-2); }
.step-index { display: grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: .78rem; font-weight: 800; font-family: var(--font-mono); transition: background-color .3s, color .3s; }
.code-panel { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px 18px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); overflow: hidden; animation: pop-in .5s var(--ease-out); }
.code-panel::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--brand-gradient); animation: brand-flow 6s linear infinite; }
.code-ring { width: 60px; height: 60px; }
.code-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke-width: 5; }
.ring-track { stroke: var(--surface-3); }
.ring-bar { stroke: var(--accent); stroke-linecap: round; transition: stroke-dashoffset 1s linear, stroke .3s; }
.code-panel[data-expired="true"] .ring-bar { stroke: var(--danger); }
.code-body { min-width: 0; }
#link-code { display: block; font-family: var(--font-mono); font-size: clamp(1.35rem, 3vw, 1.9rem); font-weight: 700; letter-spacing: .14em; color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.code-panel[data-expired="true"] #link-code { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 2px; }
#link-expiry { font-size: .8rem; color: var(--ink-3); }
.poll-status { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--ink-2); }
.poll-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; animation: beat 1.4s ease-in-out infinite; }
.code-panel[data-expired="true"] .poll-status::before { background: var(--ink-3); animation: none; }

.passkey-list { display: grid; gap: 8px; margin-top: 16px; }
.passkey-list:empty { display: none; }
.passkey-item { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--surface-2); animation: view-in .3s var(--ease-out); }
.passkey-icon { width: 36px; height: 36px; border-radius: 11px; background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow-xs); }
.passkey-icon::before { content: ""; width: 18px; height: 18px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2.5' width='12' height='19' rx='3'/%3E%3Cpath d='M10.5 18.5h3'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2.5' width='12' height='19' rx='3'/%3E%3Cpath d='M10.5 18.5h3'/%3E%3C/svg%3E") center / contain no-repeat; }
.passkey-item-info { display: grid; flex: 1; min-width: 0; }
.passkey-item-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.passkey-item-info span { font-size: .8rem; }
.passkey-remove { color: var(--danger-text); }
.passkey-note, #passkey-status, #passkey-retry { margin-top: 14px; }
.passkey-note { font-size: .875rem; }
#passkey-dialog[data-mode="delete"] #passkey-submit { --btn-bg: var(--danger); --btn-fg: #fff; box-shadow: none; }
.passkey-waiting { display: grid; justify-items: center; gap: 14px; padding: 22px 0 6px; text-align: center; }
.passkey-orb { position: relative; display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }
.passkey-orb::before { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 3px solid color-mix(in srgb, var(--accent) 18%, transparent); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.passkey-orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent); animation: ring-pulse 1.8s ease-out infinite; }
.passkey-orb svg { width: 36px; height: 36px; }
#passkey-waiting-label { font-weight: 650; }
.passkey-waiting[data-state="idle"] .passkey-orb::before, .passkey-waiting[data-state="idle"] .passkey-orb::after { display: none; }
.passkey-waiting-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.passkey-mail { display: grid; gap: 18px; }
#passkey-register-challenge, #passkey-delete-challenge { display: contents; }
#passkey-code-hint[data-kind="warning"] { color: var(--warning-text); }

/* ---------- Publish ---------- */
.publish-form { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.publish-main { display: grid; gap: 20px; min-width: 0; }
.publish-step { padding: 24px; border-radius: 22px; }
.step-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.step-head h2 { font-size: 1.08rem; }
.step-meta { margin-left: auto; font-size: .74rem; color: var(--ink-3); font-family: var(--font-mono); text-align: right; }
.publish-side { position: sticky; top: calc(var(--header-height) + 20px); min-width: 0; }
.dropzone { position: relative; display: grid; justify-items: center; gap: 12px; padding: 34px 20px; border: 2px dashed var(--line-2); border-radius: 18px; background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .2s, background-color .2s, scale .25s var(--ease-out); }
.dropzone:hover, .dropzone[data-dragging="true"] { border-color: var(--accent); background: var(--accent-soft); }
.dropzone[data-dragging="true"] { scale: 1.015; }
.dropzone:focus-within { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.dropzone-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.dropzone-art { width: 56px; height: 56px; border-radius: 16px; background: var(--surface); color: var(--accent-text); box-shadow: var(--shadow-sm); transition: transform .3s var(--ease-out); }
.dropzone:hover .dropzone-art, .dropzone[data-dragging="true"] .dropzone-art { transform: translateY(-3px); }
.dropzone-art svg { width: 26px; height: 26px; }
.dropzone-text strong { display: block; font-size: 1rem; }
.dropzone-text span { font-size: .8rem; color: var(--ink-3); }
.dropzone-file { display: none; align-items: center; gap: 10px; max-width: 100%; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: left; }
.dropzone-file svg { color: var(--accent-text); }
.dropzone-file > span { display: grid; min-width: 0; }
.dropzone-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone-file span span { font-size: .75rem; color: var(--ink-3); }
.dropzone[data-filled="true"] .dropzone-file { display: flex; }
.dropzone[data-filled="true"] .dropzone-text { display: none; }
.publish-json-input { margin-top: 14px; box-shadow: none; }
.json-size { font-size: .74rem; color: var(--ink-3); font-family: var(--font-mono); }
.json-size[data-over="true"] { color: var(--danger-text); }
.input-json[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.validation-placeholder { display: grid; justify-items: center; gap: 12px; padding: 10px 6px 4px; text-align: center; color: var(--ink-3); font-size: .85rem; }
.validation-art { width: 52px; height: 52px; border-radius: 16px; background: var(--surface-2); }
.validation-art::before { content: ""; width: 24px; height: 24px; background: var(--ink-3); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4.5 6v5.5c0 4.6 3.1 8.4 7.5 9.5 4.4-1.1 7.5-4.9 7.5-9.5V6L12 3Z'/%3E%3Cpath d='m9 12 2.2 2.2L15.5 10'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4.5 6v5.5c0 4.6 3.1 8.4 7.5 9.5 4.4-1.1 7.5-4.9 7.5-9.5V6L12 3Z'/%3E%3Cpath d='m9 12 2.2 2.2L15.5 10'/%3E%3C/svg%3E") center / contain no-repeat; }
.validation-results { display: grid; gap: 12px; animation: pop-in .45s var(--ease-out); }
.validation-ok { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-text); }
.validation-ok strong { display: block; color: var(--ink); font-size: .9rem; }
.validation-ok span { font-size: .76rem; font-family: var(--font-mono); }
.validation-results .disclosure { box-shadow: none; border-radius: 14px; }
.validation-results .disclosure > summary { min-height: 48px; padding-inline: 14px; font-size: .875rem; }
.validation-results .disclosure-body { padding: 0 10px 10px; }
.warning-list { display: grid; gap: 8px; }
.warning-list li { position: relative; padding: 10px 12px 10px 36px; border-radius: 12px; background: var(--warning-soft); color: var(--warning-text); font-size: .84rem; line-height: 1.55; overflow-wrap: anywhere; }
.warning-list li::before { content: ""; position: absolute; left: 12px; top: 12px; width: 15px; height: 15px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.3 2.7 17.6a2 2 0 0 0 1.7 3h15.2a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9.5v4M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 4.3 2.7 17.6a2 2 0 0 0 1.7 3h15.2a2 2 0 0 0 1.7-3L13.7 4.3a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9.5v4M12 17h.01'/%3E%3C/svg%3E") center / contain no-repeat; }
.publish-actions { display: grid; gap: 10px; margin-top: 18px; }
#publish-form-status { margin-top: 12px; }

/* ---------- Detail ---------- */
.detail-container { padding-top: 26px; }
.breadcrumb { display: flex; align-items: center; gap: 10px; min-width: 0; margin-bottom: 22px; font-size: .875rem; color: var(--ink-3); }
.breadcrumb a { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; font-weight: 650; color: var(--ink-2); transition: color .2s; }
.breadcrumb a:hover { color: var(--accent-text); }
.breadcrumb svg.icon { width: 16px; height: 16px; }
.breadcrumb > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 90px 0; color: var(--ink-3); }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; animation: view-in .45s var(--ease-out); }
.detail-main { display: grid; gap: 18px; min-width: 0; }
.detail-main h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.12; overflow-wrap: anywhere; }
.detail-byline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.detail-body, .detail-warnings { padding: 24px; border-radius: 22px; }
.detail-body h2, .detail-warnings h2 { margin-bottom: 12px; font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--ink-3); }
.detail-description { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; }
.detail-side { position: sticky; top: calc(var(--header-height) + 24px); min-width: 0; }
.detail-panel { display: grid; gap: 16px; padding: 22px; border-radius: 24px; }
.detail-meta { border-top: 1px solid var(--line); }
.detail-meta > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .875rem; }
.detail-meta dt { color: var(--ink-3); flex-shrink: 0; }
.detail-meta dd { min-width: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.detail-meta dd .config-author-link { justify-content: flex-end; }
.detail-import { font-size: .8rem; color: var(--ink-3); }
.detail-report { display: inline-flex; align-items: center; gap: 6px; justify-self: start; font-size: .84rem; }
.detail-report svg.icon { width: 16px; height: 16px; }

/* ---------- Supporter status (account) ---------- */
.supporter-card { position: relative; isolation: isolate; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 18px 22px; padding: 22px; border-radius: 22px; overflow: hidden; border: 1.5px solid transparent; background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(var(--brand-angle), #ff4f9a, #9b4dff, #ff4f9a) border-box; box-shadow: 0 18px 40px -26px rgb(214 47 120 / .55), var(--shadow-sm); animation: pop-in .6s var(--ease-out), brand-flow 10s linear infinite; }
.supporter-card::before, .supporter-card::after { content: ""; position: absolute; z-index: -1; width: 280px; height: 280px; border-radius: 50%; pointer-events: none; }
.supporter-card::before { top: -150px; right: -90px; background: radial-gradient(circle, rgb(255 79 154 / .2), transparent 66%); }
.supporter-card::after { bottom: -170px; left: -110px; background: radial-gradient(circle, rgb(155 77 255 / .16), transparent 66%); }
.supporter-card[data-active="false"] { background: linear-gradient(var(--surface), var(--surface)) padding-box, linear-gradient(var(--line-2), var(--line-2)) border-box; box-shadow: var(--shadow-sm); animation: pop-in .6s var(--ease-out); }
.supporter-card[data-active="false"]::before, .supporter-card[data-active="false"]::after { opacity: .35; filter: grayscale(1); }
.supporter-emblem { position: relative; display: grid; place-items: center; width: 84px; height: 84px; font-size: 3rem; line-height: 1; }
.supporter-emblem::before { content: ""; position: absolute; inset: 6px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, rgb(255 79 154 / .38), rgb(155 77 255 / .14) 55%, transparent 72%); filter: blur(6px); animation: supporter-glow 3.2s ease-in-out infinite; }
.supporter-emblem img { width: 64px; height: 64px; animation: supporter-float 4.5s ease-in-out infinite; filter: drop-shadow(0 8px 12px rgb(194 48 122 / .35)); }
.supporter-card[data-active="false"] .supporter-emblem img { filter: grayscale(.85); opacity: .55; animation: none; }
.supporter-card[data-active="false"] .supporter-emblem::before { animation: none; opacity: .25; }
@keyframes supporter-float { 0%, 100% { translate: 0 0; rotate: -3deg; } 50% { translate: 0 -5px; rotate: 3deg; } }
@keyframes supporter-glow { 0%, 100% { scale: .9; opacity: .75; } 50% { scale: 1.12; opacity: 1; } }
.supporter-copy { display: grid; gap: 12px; min-width: 0; }
.supporter-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.supporter-title-row h3 { font-size: 1.2rem; letter-spacing: -.02em; }
.supporter-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.supporter-facts > div { display: grid; gap: 2px; min-width: 0; padding: 10px 14px; border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 82%, transparent); }
.supporter-facts dt { font-size: .74rem; color: var(--ink-3); }
.supporter-facts dd { font-size: .92rem; font-weight: 700; overflow-wrap: anywhere; }
.supporter-hint { font-size: .84rem; font-weight: 600; color: var(--warning-text); }
.supporter-retry { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.supporter-retry .notice { flex: 1 1 220px; margin: 0; }
.supporter-cape-link { justify-self: start; font-size: .88rem; }
.supporter-market { display: grid; gap: 14px; margin-top: 26px; }
.supporter-market-head h3 { font-size: 1.08rem; letter-spacing: -.01em; }
.supporter-market-head p { margin-top: 4px; color: var(--ink-3); font-size: .86rem; line-height: 1.6; }
.supporter-code { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.supporter-code-label { color: var(--ink-2); font-size: .9rem; font-weight: 650; }
.supporter-code-value { font-family: var(--font-mono); font-size: 1.02rem; font-weight: 800; letter-spacing: .06em; color: var(--supporter); }
.supporter-code-hint { flex: 1 1 220px; color: var(--ink-3); font-size: .84rem; line-height: 1.6; }
.supporter-orders-box { display: grid; gap: 8px; }
.supporter-orders-box h4 { font-size: .82rem; font-weight: 700; color: var(--ink-3); }
.supporter-orders { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.supporter-order { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.supporter-order-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.supporter-order-head strong { font-size: .92rem; }
.supporter-order-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--ink-3); }
.supporter-order-meta code { font-size: .76rem; overflow-wrap: anywhere; }
.supporter-order-hint { font-size: .82rem; color: var(--warning-text); }
.supporter-order[data-state="APPLIED"] .supporter-order-hint, .supporter-order[data-state="PENDING"] .supporter-order-hint { color: var(--ink-3); }
.supporter-orders-empty { font-size: .86rem; }

/* ---------- 兑换与订单 (account) ---------- */
/* The code field (shared with the sponsor page, styled in ui.css) comes first; the sponsor code, the afdian orders and
   the redemption history follow, the two lists side by side when there is room. */
.code-card { display: grid; gap: 16px; padding: 22px; border-radius: 22px; border: 1px solid var(--line); background: radial-gradient(90% 120% at 100% 0%, color-mix(in srgb, var(--violet) 7%, transparent), transparent 60%), var(--surface); box-shadow: var(--shadow-sm); }
.code-card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.code-card-head h3 { flex: 1 1 auto; font-size: 1.08rem; letter-spacing: -.01em; }
.redeem-card-icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; color: #fff; background: var(--brand-gradient); box-shadow: 0 10px 22px -12px rgb(106 63 210 / .7); animation: brand-flow 10s linear infinite; }
.redeem-card-icon svg.icon { width: 22px; height: 22px; }
.code-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; gap: 16px 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.code-lists:not(:has(> :not([hidden]))) { display: none; }
.redeem-records-box { display: grid; gap: 8px; min-width: 0; }
.redeem-records-box h4 { font-size: .82rem; font-weight: 700; color: var(--ink-3); }
.redeem-records { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.redeem-record { display: grid; gap: 5px; padding: 12px 14px 12px 16px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--supporter); }
.redeem-record[data-product^="CAPE"] { box-shadow: inset 3px 0 0 var(--violet); }
.redeem-record-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.redeem-record-head strong { font-size: .92rem; }
.redeem-record-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; color: var(--ink-3); }
.redeem-record-meta code { font-size: .74rem; overflow-wrap: anywhere; }
.redeem-record-until { font-size: .82rem; font-weight: 600; color: var(--ink-2); }
.redeem-records-empty { font-size: .86rem; }
.redeem-pager { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: .82rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) {
  .code-card { padding: 18px; border-radius: 18px; }
}

/* ---------- Cape library entry ---------- */
.cape-entry { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .25s, box-shadow .25s; }
.cape-entry:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow-md); }
.cape-entry > svg.icon { margin-left: auto; color: var(--ink-3); transition: translate .3s var(--ease-out); }
.cape-entry:hover > svg.icon { translate: 3px 0; }
.cape-entry-art { position: relative; width: 25px; height: 40px; flex-shrink: 0; transform-origin: 50% 0; background: linear-gradient(90deg, rgb(255 255 255 / .28) 0 3px, transparent 3px calc(100% - 3px), rgb(0 0 0 / .18) calc(100% - 3px)), linear-gradient(var(--brand-angle), var(--accent), var(--violet)); box-shadow: 0 8px 14px -8px color-mix(in srgb, var(--violet) 80%, transparent); animation: brand-flow 9s linear infinite; }
.cape-entry-art::before { content: ""; position: absolute; left: 7px; right: 7px; top: 9px; height: 9px; background: rgb(255 255 255 / .55); box-shadow: 0 13px 0 -2px rgb(255 255 255 / .3); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .cape-entry:hover .cape-entry-art { animation: brand-flow 9s linear infinite, entry-sway 1.2s ease-in-out; } }
@keyframes entry-sway { 0%, 100% { rotate: 0deg; } 30% { rotate: 9deg; } 65% { rotate: -6deg; } }
.cape-entry-text { display: grid; line-height: 1.35; }
.cape-entry-text strong { font-size: 1rem; }
.cape-entry-text span { font-size: .8rem; color: var(--ink-3); }
.cape-entry-text span:empty { display: none; }

/* ---------- Player ---------- */
.player-hero { padding-top: 24px; background: linear-gradient(180deg, var(--bg-tint), var(--bg)); }
.player-banner { position: relative; isolation: isolate; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 22px; padding: 0 28px 26px; border-radius: 28px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-md); animation: view-in .45s var(--ease-out); }
.player-banner::before { content: ""; position: absolute; inset: 0 0 auto; height: 86px; z-index: -1; background: linear-gradient(90deg, rgb(255 255 255 / .1) 1px, transparent 1px) 0 0 / 16px 16px, linear-gradient(rgb(255 255 255 / .1) 1px, transparent 1px) 0 0 / 16px 16px, var(--brand-gradient); animation: brand-flow 12s linear infinite; }
.player-identity { display: flex; align-items: flex-end; gap: 20px; min-width: 0; padding-top: 34px; }
.player-identity .player-avatar { width: 112px; height: 112px; border-radius: 28px; border: 4px solid var(--surface); font-size: 2.6rem; }
.player-text { min-width: 0; padding-top: 58px; padding-bottom: 4px; }
.player-text h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -.035em; overflow-wrap: anywhere; }
.player-text h1 .supporter-badge { width: .8em; height: .8em; margin-left: .2em; vertical-align: -.02em; animation: supporter-arrive .9s var(--ease-out) both; }
.player-text h1 .supporter-badge img { filter: drop-shadow(0 4px 10px rgb(255 79 154 / .45)); }
.player-text h1 .supporter-badge::after { font-size: .8rem; letter-spacing: 0; }
@keyframes supporter-arrive { 0% { opacity: 0; scale: .3; rotate: -18deg; } 60% { opacity: 1; scale: 1.15; rotate: 6deg; } 100% { scale: 1; rotate: 0deg; } }
/* A supporter's banner strip turns pink to violet; it follows the server badge, so it changes with it. */
.player-banner:has(.player-text .supporter-badge)::before { background: linear-gradient(90deg, rgb(255 255 255 / .12) 1px, transparent 1px) 0 0 / 16px 16px, linear-gradient(rgb(255 255 255 / .12) 1px, transparent 1px) 0 0 / 16px 16px, linear-gradient(var(--brand-angle), #ff5fa4, #b45cff 55%, #6a3fd2); }
.player-bio { margin-top: 6px; max-width: 46em; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.player-stats { display: flex; gap: 10px; }
.player-stats > div { display: flex; flex-direction: column-reverse; align-items: center; min-width: 92px; padding: 12px 14px; border-radius: 16px; background: var(--surface-2); }
.player-stats dd { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.3; }
.player-stats dt { font-size: .75rem; color: var(--ink-3); }
/* The player's skin and worn cape stand at the right of the banner, head up in the gradient band, feet on a lit grid floor. */
.player-banner[data-look="true"] { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "identity look" "stats look"; align-items: end; column-gap: 24px; row-gap: 20px; }
.player-banner[data-look="true"] .player-identity { grid-area: identity; }
.player-banner[data-look="true"] .player-stats { grid-area: stats; justify-self: start; }
.player-look { --cape-glow: color-mix(in srgb, var(--violet) 55%, var(--accent)); grid-area: look; position: relative; isolation: isolate; align-self: stretch; height: 384px; margin: 0 -12px -26px 0; }
.player-look .player-model { --u: 9px; }
.player-look::before { content: ""; position: absolute; inset: 22% -6% 0; z-index: -1; background: radial-gradient(48% 56% at 50% 46%, color-mix(in srgb, var(--cape-glow) 38%, transparent), transparent 72%); transition: background .6s; }
.player-look::after { content: ""; position: absolute; inset: 66% -30% 0; z-index: -1; background-image: linear-gradient(to right, var(--line-2) 1px, transparent 1px), linear-gradient(to bottom, var(--line-2) 1px, transparent 1px); background-size: 24px 24px; transform: perspective(260px) rotateX(58deg); transform-origin: 50% 0; -webkit-mask-image: radial-gradient(52% 90% at 50% 0%, #000, transparent); mask-image: radial-gradient(52% 90% at 50% 0%, #000, transparent); }
.player-look-stage { position: absolute; inset: 0 0 50px; }
.player-look[data-state="loading"] .cape-side { background-color: var(--surface-3); animation: face-pulse 1.4s ease-in-out infinite; }
.player-look-caption { position: absolute; left: 50%; bottom: 18px; translate: -50% 0; display: inline-flex; align-items: center; gap: 7px; max-width: calc(100% - 16px); padding: 7px 14px 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 82%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: var(--shadow-sm); font-size: .82rem; font-weight: 650; color: var(--ink-2); white-space: nowrap; }
.player-look-caption span { overflow: hidden; text-overflow: ellipsis; }
.player-look-caption svg.icon { flex-shrink: 0; width: 17px; height: 17px; color: var(--cape-glow); }
.player-look[data-state="loading"] .player-look-caption span { animation: face-pulse 1.4s ease-in-out infinite; }
.player-look[data-state="error"] .player-look-caption { color: var(--ink-3); }
.player-look[data-state="error"] .player-look-caption svg.icon { color: var(--ink-3); }
.player-page .library-body { padding-top: 32px; }
.player-page .list-title + #config-list-content .result-count { margin-top: 6px; }

/* ---------- Announcements ---------- */
/* Pixel written book, used for empty and missing states. */
.empty-book { position: relative; width: 52px; height: 60px; margin-bottom: 6px; background: linear-gradient(#f3e7c4, #f3e7c4) 42px 4px / 6px 52px no-repeat, linear-gradient(#d9a53a, #d9a53a) 10px 22px / 28px 4px no-repeat, linear-gradient(#d9a53a, #d9a53a) 10px 30px / 20px 4px no-repeat, linear-gradient(#5a3218, #5a3218) 4px 0 / 6px 60px no-repeat, linear-gradient(#7d4826, #6c3d1f) 4px 0 / 40px 60px no-repeat; box-shadow: 0 12px 20px -12px rgb(0 0 0 / .45); image-rendering: pixelated; }
.empty-book::after { content: ""; position: absolute; right: 12px; top: -6px; width: 6px; height: 22px; background: linear-gradient(#e5484d 0 75%, transparent 75%), linear-gradient(90deg, #e5484d 50%, transparent 50%) 0 100% / 6px 6px no-repeat; }
:root[data-theme="dark"] .empty-book { filter: brightness(.88); }
.news-empty { padding-block: 72px; border: 1.5px dashed var(--line-2); border-radius: 22px; max-width: 880px; }

.news-feed { display: grid; gap: 12px; max-width: 880px; }
.news-entry { animation: view-in .4s var(--ease-out) both; }
.news-entry:nth-child(2) { animation-delay: .04s; } .news-entry:nth-child(3) { animation-delay: .08s; } .news-entry:nth-child(n+4) { animation-delay: .12s; }
.news-card { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 18px 22px 18px 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); overflow: hidden; transition: border-color .25s, box-shadow .25s; }
.news-card:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-md); }
.news-card:focus-visible { outline-offset: 2px; border-radius: 22px; }
.news-entry[data-pinned] .news-card { border-color: color-mix(in srgb, var(--gold) 38%, var(--line)); background: linear-gradient(100deg, color-mix(in srgb, var(--gold) 9%, var(--surface)), var(--surface) 46%); }
.news-entry[data-pinned] .news-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: repeating-linear-gradient(180deg, var(--gold) 0 10px, color-mix(in srgb, var(--gold) 55%, #fff) 10px 20px); }
.news-stamp { display: grid; justify-items: center; align-content: center; gap: 4px; height: 84px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-variant-numeric: tabular-nums; }
.news-stamp-day { font-family: var(--font-display); font-size: 2.05rem; font-weight: 800; line-height: 1; letter-spacing: -.05em; }
.news-stamp-month { font-size: .7rem; font-weight: 650; color: var(--ink-3); white-space: nowrap; }
.news-card-body { display: grid; gap: 6px; justify-items: start; min-width: 0; }
.news-card-title { font-size: 1.16rem; line-height: 1.4; letter-spacing: -.015em; overflow-wrap: anywhere; }
.news-card-summary { color: var(--ink-2); font-size: .9rem; line-height: 1.65; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card-go { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); color: var(--ink-3); transition: color .2s, background-color .2s, translate .3s var(--ease-out); }
.news-card:hover .news-card-go { color: var(--accent-ink); background: var(--accent); translate: 3px 0; }
/* With a cover, the arrow moves onto its bottom corner. */
.news-card:has(> .news-cover) { grid-template-columns: 84px minmax(0, 1fr) 216px; padding-right: 18px; }
.news-card > .news-cover { grid-column: 3; grid-row: 1; aspect-ratio: 16 / 9; border-radius: 14px; }
.news-card > .news-cover ~ .news-card-go { grid-column: 3; grid-row: 1; align-self: end; justify-self: end; z-index: 1; width: 34px; height: 34px; margin: 8px; border-radius: 10px; background: rgb(9 16 12 / .5); color: #fff; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .16); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.news-card:hover > .news-cover ~ .news-card-go { translate: 0; }
.news-entry[data-pinned] .news-card::before { z-index: 2; }

.news-detail-container { width: min(820px, 100% - 48px); padding-top: 26px; }
.news-article { animation: view-in .45s var(--ease-out); }
.news-article-head { display: grid; gap: 12px; justify-items: start; }
.news-article h1 { font-size: clamp(2rem, 4.6vw, 3rem); font-weight: 800; letter-spacing: -.045em; line-height: 1.15; overflow-wrap: anywhere; }
.news-article-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--ink-3); font-size: .875rem; }
/* For visitors reading another language: Community's AI translation (violet, like other machine-made marks) with a way to
   the Chinese original and back, or a grey note when the original shows because there is no translation yet. */
.news-translation { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 5px 13px 5px 9px; border-radius: 99px; background: var(--violet-soft); color: var(--violet-text); font-size: .8rem; font-weight: 650; line-height: 1.45; animation: view-in .35s var(--ease-out); }
.news-translation .icon { flex: none; width: 15px; height: 15px; }
.news-translation:not([data-state="translated"]) { background: var(--surface-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
.news-translation-toggle { margin-left: 2px; padding: 0 0 0 10px; border: 0; border-left: 1px solid color-mix(in srgb, currentColor 30%, transparent); background: none; color: inherit; font: inherit; font-weight: 750; text-underline-offset: 3px; cursor: pointer; }
.news-translation-toggle:hover { text-decoration: underline; }
.news-translation:not([data-state="translated"]) .news-translation-toggle { color: var(--accent-text); }
.news-lead { position: relative; margin-top: 26px; padding: 4px 0 4px 22px; color: var(--ink-2); font-size: 1.08rem; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.news-lead::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 4px; background: var(--brand-gradient); animation: brand-flow 9s linear infinite; }
.news-body { margin-top: 26px; padding: clamp(22px, 4vw, 34px); border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); font-size: 1rem; line-height: 1.95; white-space: pre-wrap; overflow-wrap: anywhere; }
.news-article-foot { margin-top: 26px; }

.news-missing { display: grid; justify-items: center; gap: 12px; padding: 56px 24px; text-align: center; animation: view-in .4s var(--ease-out); }
.news-missing h1 { font-size: 1.5rem; }
.news-missing .btn { margin-top: 8px; }
/* Categories: a chip row over the list, and a small tag on each card and article ("未分类" in grey). */
.news-categories { max-width: 880px; margin-bottom: 18px; }
/* Gooey Nav: one dark blob sits under the chosen chip and flows to the next, throwing off droplets (announcements.js). */
.news-categories.is-gooey { position: relative; isolation: isolate; }
.goo-defs { position: absolute; width: 0; height: 0; }
.goo-layer { position: absolute; left: 0; top: 0; bottom: 0; z-index: 0; width: 100%; pointer-events: none; filter: url("#soar-goo"); }
.goo-blob, .goo-dot { position: absolute; border-radius: 999px; background: var(--ink); }
.goo-blob { transition: left .5s var(--spring), top .5s var(--spring), width .5s var(--spring); }
.news-categories.is-gooey .chip { z-index: 1; }
.news-categories.is-gooey .chip:not([aria-pressed="true"]) { background: color-mix(in srgb, var(--surface) 55%, transparent); }
.news-categories.is-gooey .chip[aria-pressed="true"] { background: transparent; border-color: transparent; box-shadow: none; transition: color .25s .1s, border-color .25s; }
/* Shiny Text: a glint keeps sweeping across 置顶. */
.shiny-pin { position: relative; overflow: hidden; }
.shiny-pin > span { background: linear-gradient(110deg, var(--warning-text) 36%, #fff3c4 50%, var(--warning-text) 64%) 0 0 / 230% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shiny-pin 2.8s linear infinite; }
:root[data-theme="dark"] .shiny-pin > span { background-image: linear-gradient(110deg, var(--warning-text) 36%, #fffbe8 50%, var(--warning-text) 64%); }
.shiny-pin::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 40%, rgb(255 255 255 / .55) 50%, transparent 60%) 0 0 / 230% 100%; animation: shiny-pin 2.8s linear infinite; mix-blend-mode: soft-light; pointer-events: none; }
@keyframes shiny-pin { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .shiny-pin > span { background: none; color: inherit; } .shiny-pin::after { content: none; } }
/* Rotating Text: the highlighted word under the announcements title rolls to the next one every few seconds. */
.rotator { position: relative; display: inline-flex; vertical-align: bottom; height: 1.7em; margin: 0 .3em; padding: 0 .45em; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 750; line-height: 1.7em; overflow: hidden; transition: width .45s var(--spring); }
.rot-word { display: inline-flex; white-space: pre; }
.rot-word.is-leaving { position: absolute; left: .45em; top: 0; }
.rot-ch { display: inline-block; }
/* Animated Content: body blocks wait out of sight until they scroll into view, then float up. */
.news-body > .float-wait { opacity: 0; }
.news-card-tags, .news-article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.news-article-tags:not(:has(> :not([hidden]))) { display: none; }
.news-category { display: inline-flex; align-items: center; gap: 6px; min-height: 22px; padding: 1px 10px; border-radius: 99px; background: color-mix(in srgb, var(--accent) 13%, var(--surface)); color: var(--accent-text); font-size: .72rem; font-weight: 700; letter-spacing: .02em; line-height: 1.4; overflow-wrap: anywhere; }
.news-category::before { content: ""; flex: none; width: 6px; height: 6px; rotate: 45deg; background: currentColor; }
.news-category[data-empty] { background: var(--surface-2); color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); }
a.news-category { transition: background-color .2s, color .2s; }
a.news-category:hover { background: var(--accent); color: var(--accent-ink); }
a.news-category[data-empty]:hover { background: var(--surface-3); color: var(--ink); }
@media (max-width: 560px) {
  .news-categories { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 6px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
  .news-categories::-webkit-scrollbar { display: none; }
  .news-card { grid-template-columns: 60px minmax(0, 1fr); gap: 14px; padding: 14px 16px 14px 14px; border-radius: 18px; }
  .news-stamp { height: 64px; border-radius: 14px; }
  .news-stamp-day { font-size: 1.5rem; }
  .news-stamp-month { font-size: .62rem; }
  .news-card-go { display: none; }
  /* The cover becomes a band across the top of the card, the date and the text below it. */
  .news-card:has(> .news-cover) { grid-template-columns: 60px minmax(0, 1fr); grid-template-areas: "cover cover" "stamp body"; padding: 0 16px 14px 14px; }
  .news-card > .news-cover { grid-area: cover; aspect-ratio: 2.4; margin: 0 -16px 0 -14px; border-radius: 0; }
  .news-card:has(> .news-cover) .news-stamp { grid-area: stamp; }
  .news-card:has(> .news-cover) .news-card-body { grid-area: body; }
  .news-card > .news-cover ~ .news-card-go { display: grid; grid-area: cover; margin: 0 -6px 10px 0; }
  .news-card-title { font-size: 1.02rem; }
  .news-body { border-radius: 18px; }
  /* A narrow image keeps a readable size on a phone. */
  .ann-figure { width: max(var(--ann-figure-width, 100%), 60%); }
}

/* ---------- Reset password ---------- */
.reset-page { display: grid; place-items: center; min-height: calc(100svh - var(--header-height) - 64px); padding: 40px 16px; background: radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent), radial-gradient(50% 40% at 100% 100%, color-mix(in srgb, var(--violet) 10%, transparent), transparent); }
.reset-card { display: grid; gap: 20px; width: min(440px, 100%); padding: clamp(26px, 5vw, 38px); border-radius: 26px; box-shadow: var(--shadow-lg); animation: pop-in .5s var(--ease-out); }
.reset-card h1 { font-size: 1.75rem; letter-spacing: -.035em; }
.reset-note { font-size: .8rem; color: var(--ink-3); text-align: center; }
.reset-recovery { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.reset-footer { padding: 18px; text-align: center; color: var(--ink-3); font-size: .8rem; }

/* ---------- Private backups ---------- */
.backup-toolbar { align-items: stretch; }
.backup-quota { display: grid; grid-template-columns: auto auto; align-items: center; gap: 5px 14px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.quota-count { grid-row: span 2; display: flex; align-items: baseline; gap: 5px; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.quota-count strong { font-size: 1.55rem; letter-spacing: -.05em; }
.quota-count > span { color: var(--ink-3); font-size: .9rem; }
/* Inventory slots: sunken grey cells, filled ones raised like an item block. */
.quota-slots { display: grid; grid-template-columns: repeat(10, 11px); gap: 3px; }
.quota-slots span { height: 11px; background: var(--surface-3); box-shadow: inset 1.5px 1.5px 0 rgb(0 0 0 / .16), inset -1.5px -1.5px 0 rgb(255 255 255 / .55); }
:root[data-theme="dark"] .quota-slots span { box-shadow: inset 1.5px 1.5px 0 rgb(0 0 0 / .45), inset -1.5px -1.5px 0 rgb(255 255 255 / .06); }
.quota-slots span[data-filled="true"] { background: var(--accent); box-shadow: inset -2px -2px 0 rgb(0 0 0 / .2), inset 2px 2px 0 rgb(255 255 255 / .4); animation: pop-in .4s var(--ease-out) both; }
.backup-quota[data-full="true"] .quota-slots span[data-filled="true"] { background: #e8a91b; }
.quota-slots span[data-over="true"] { background: var(--danger); }
.quota-detail { font-size: .72rem; color: var(--ink-3); font-family: var(--font-mono); white-space: nowrap; }
.backup-quota[data-full="true"] .quota-detail { color: var(--warning-text); font-family: inherit; font-weight: 650; }

.backup-list { display: grid; gap: 10px; }
.backup-list > .empty { padding-block: 64px; border: 1.5px dashed var(--line-2); border-radius: 22px; }
.backup-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-sm); transition: border-color .25s, box-shadow .25s; animation: view-in .4s var(--ease-out) both; }
.backup-row:nth-child(2) { animation-delay: .03s; } .backup-row:nth-child(3) { animation-delay: .06s; } .backup-row:nth-child(n+4) { animation-delay: .09s; }
.backup-row:hover { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: var(--shadow-md); }
.backup-row-skeleton { pointer-events: none; animation: none; }
.backup-row-skeleton .backup-body { display: grid; gap: 10px; }
.backup-art-skeleton { width: 40px; height: 40px; border-radius: 6px; }
/* Pixel ender chest; its lock glows on hover. */
.backup-art { width: 40px; height: 40px; flex-shrink: 0; border-radius: 3px; background: linear-gradient(#57e3b0, #57e3b0) 17px 12px / 6px 9px no-repeat, linear-gradient(#0b1414, #0b1414) 0 15px / 40px 3px no-repeat, linear-gradient(#2a4141, #1d2f2f) 3px 3px / 34px 12px no-repeat, linear-gradient(#1d2f2f, #142222) 3px 18px / 34px 19px no-repeat, #0b1414; box-shadow: 0 10px 18px -10px rgb(0 0 0 / .55); transition: filter .3s; }
.backup-row:hover .backup-art { filter: drop-shadow(0 0 7px rgb(87 227 176 / .55)); }
.backup-body { min-width: 0; }
.backup-title { font-size: 1.02rem; line-height: 1.4; letter-spacing: -.01em; overflow-wrap: anywhere; }
.backup-desc { margin-top: 2px; color: var(--ink-2); font-size: .86rem; line-height: 1.6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.backup-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 7px; font-size: .78rem; color: var(--ink-3); }
.backup-meta .badge { height: 22px; cursor: help; }
.backup-actions { display: flex; align-items: center; gap: 8px; }
.backup-actions .btn-icon { width: 36px; min-height: 36px; }

.backup-modal { width: min(560px, calc(100% - 32px)); }
.backup-kicker { font-size: .75rem; font-weight: 700; letter-spacing: .06em; color: var(--accent-text); }
.backup-modal .modal-head h2 { margin-top: 2px; }
.backup-dropzone { padding: 24px 16px; }
.backup-json-input { box-shadow: none; }
.backup-scope { font-size: .78rem; line-height: 1.6; color: var(--ink-3); }
.backup-preview { gap: 10px; }

@media (max-width: 760px) {
  .backup-row { grid-template-columns: auto minmax(0, 1fr); gap: 12px 14px; padding: 16px; }
  .backup-actions { grid-column: 1 / -1; flex-wrap: wrap; padding-top: 12px; border-top: 1px dashed var(--line); }
  .backup-desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}
@media (max-width: 680px) {
  .backup-quota { grid-template-columns: auto 1fr; }
  .quota-slots { grid-template-columns: repeat(20, minmax(0, 11px)); }
  .quota-count { grid-row: auto; }
  .quota-detail { grid-column: 1 / -1; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .publish-form, .detail { grid-template-columns: 1fr; }
  .publish-side, .detail-side { position: static; }
  .detail { gap: 18px; }
}
@media (max-width: 980px) {
  .account { grid-template-columns: 1fr; gap: 18px; }
  .account-side { position: static; padding: 12px; }
  .account-identity { padding: 4px 4px 12px; }
  .account-nav { display: flex; overflow-x: auto; scrollbar-width: none; gap: 6px; }
  .account-nav::-webkit-scrollbar { display: none; }
  .account-nav :is(button, a) { width: auto; flex-shrink: 0; min-height: 42px; }
  .account-side-links { display: none; }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-visual { min-height: 150px; padding: 22px 24px; flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .auth-visual-mark { width: 46px; height: 46px; border-radius: 14px; margin: 0; order: 2; }
  .auth-visual-mark img { width: 30px; height: 30px; }
  .auth-visual-title { font-size: 1.5rem; }
  .auth-visual-title br { display: none; }
  .auth-visual-sub { display: none; }
  .player-banner[data-look="true"] { grid-template-columns: minmax(0, 1fr) 230px; column-gap: 12px; }
  .player-look { height: 300px; }
  .player-look .player-model { --u: 6.5px; }
}
@media (max-width: 680px) {
  .link-steps { grid-template-columns: 1fr; }
  .code-panel { grid-template-columns: auto minmax(0, 1fr); }
  .code-panel > .btn { grid-column: 1 / -1; justify-self: start; }
  .page-hero-row { flex-wrap: wrap; align-items: flex-start; }
  .library-toolbar { flex-direction: column; align-items: stretch; }
  .search { flex-basis: auto; }
  .select-row .select { width: auto; flex: 1; }
  .library-filters .chip-row { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -16px; padding: 2px 16px 6px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); mask-image: linear-gradient(90deg, transparent, #000 16px, #000 calc(100% - 16px), transparent); }
  .library-filters .chip-row::-webkit-scrollbar { display: none; }
  .player-banner { padding: 0 18px 20px; }
  .player-identity { flex-direction: column; align-items: flex-start; gap: 12px; }
  .player-text { padding-top: 0; }
  .player-stats { width: 100%; }
  .player-stats > div { flex: 1; min-width: 0; }
  /* On a phone the model stands between the name and the numbers, across the whole banner. */
  .player-banner[data-look="true"] { grid-template-columns: minmax(0, 1fr); grid-template-areas: "identity" "look" "stats"; row-gap: 4px; }
  .player-banner[data-look="true"] .player-stats { justify-self: stretch; margin-top: 8px; }
  .player-look { height: 290px; margin: 0 -18px; }
  .player-look .player-model { --u: 6.5px; }
}
@media (max-width: 560px) {
  .account-container { padding-top: 16px; }
  .auth { border-radius: 22px; }
  .auth-card { padding: 26px 20px 30px; }
  .settings-card, .publish-step, .detail-body, .detail-warnings, .detail-panel { padding: 18px; border-radius: 18px; }
  .row-extra { padding-left: 0; }
  .identity-card { padding: 18px; gap: 14px; }
  .identity-avatar .player-avatar { width: 60px; height: 60px; border-radius: 16px; }
  .supporter-card { grid-template-columns: 1fr; justify-items: start; gap: 10px; padding: 18px; }
  .supporter-emblem { width: 68px; height: 68px; }
  .supporter-emblem img { width: 52px; height: 52px; }
  .supporter-copy { width: 100%; }
  .supporter-facts { grid-template-columns: 1fr; }
  .code-panel { padding: 18px; }
  .config-card { padding: 18px; }
  .mail-action { padding: 32px 22px; }
  .account-nav :is(button, a) svg { display: none; }
  /* The entries fit as a two-column grid instead of a row that hides the last ones off screen; when an odd number is
     shown, the last one takes the whole row. */
  .account-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .account-nav :is(button, a) { width: 100%; justify-content: center; padding-inline: 8px; }
  .account-nav > :nth-last-child(1 of :not([hidden])):nth-child(odd of :not([hidden])) { grid-column: 1 / -1; }
}

/* ---------- Account overview (account-overview.js) ---------- */
/* A bento of four columns: the hero and recent configs take two rows, the rest two columns, packed densely so a tile
   that is left out leaves no hole. */
.ov-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-flow: row dense; gap: 14px; }
.ov-tile { position: relative; isolation: isolate; display: flex; flex-direction: column; gap: 12px; min-width: 0; grid-column: span 2; padding: 18px 20px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.ov-tile.is-entering { animation: view-in .45s var(--ease-out) both; animation-delay: calc(var(--n, 0) * 45ms); }
.ov-tile[data-tile="hero"].has-look, .ov-tile[data-tile="recent"] { grid-row: span 2; }
.ov-skeleton { min-height: 150px; background: linear-gradient(100deg, transparent 30%, var(--chip-shine) 50%, transparent 70%) 0 0 / 300% 100% no-repeat, var(--surface); animation: chip-shine 1.4s linear infinite; }
.ov-skeleton.is-tall { grid-row: span 2; min-height: 320px; }
.ov-head { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .86rem; font-weight: 750; }
.ov-head > svg.icon { width: 17px; height: 17px; color: var(--ink-3); }
.ov-more { margin-left: auto; padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ov-more:hover { text-decoration: underline; }
.ov-note { color: var(--ink-3); font-size: .8rem; line-height: 1.5; }
.ov-empty, .ov-pitch { color: var(--ink-2); font-size: .88rem; line-height: 1.6; }
/* Magic Bento: a border glow and a faint wash near the pointer. Their position is set on these leaves, never the tile. */
.ov-glow { position: absolute; inset: -1px; z-index: 3; padding: 1.5px; border-radius: inherit; pointer-events: none; opacity: var(--ga, 0); background: radial-gradient(240px circle at var(--gx, -999px) var(--gy, -999px), color-mix(in srgb, var(--accent) 90%, var(--violet)), transparent 65%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.ov-wash { position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none; opacity: calc(var(--ga, 0) * .6); background: radial-gradient(300px circle at var(--gx, -999px) var(--gy, -999px), color-mix(in srgb, var(--accent) 9%, transparent), transparent 70%); }
/* Hero ("Tilted Card"): the text on the left, the 3D model with the worn cape on the right. */
.ov-hero { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; gap: 0 8px; overflow: hidden; padding: 22px 22px 20px; background: radial-gradient(70% 80% at 85% 70%, color-mix(in srgb, var(--cape-glow, var(--violet)) 22%, transparent), transparent 70%), linear-gradient(160deg, var(--surface) 30%, var(--bg-tint)); transition: transform .6s var(--ease-out); }
.ov-hero.has-look { grid-template-columns: minmax(0, 1fr) 190px; }
.ov-hero.is-tilting { transition: none; }
.ovh-text { position: relative; z-index: 2; grid-column: 1; align-self: start; display: grid; gap: 6px; }
.ovh-hello { color: var(--ink-3); font-size: .92rem; font-weight: 650; }
.ovh-name { display: flex; align-items: center; min-width: 0; overflow-wrap: anywhere; font-size: clamp(1.7rem, 3.2vw, 2.2rem); line-height: 1.1; letter-spacing: -.04em; }
.ovh-name .supporter-badge { margin-left: 8px; }
.ovh-bio { max-width: 34ch; color: var(--ink-2); font-size: .9rem; line-height: 1.55; }
.ovh-bio:empty { display: none; }
.ov-hero:not(.has-look) .ovh-bio { max-width: 56ch; }
.ovh-bio.is-missing { color: var(--ink-3); }
.ovh-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.ovh-actions { position: relative; z-index: 2; grid-column: 1 / -1; grid-row: 2; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.ov-hero .player-look { grid-area: auto; grid-column: 2; grid-row: 1; height: auto; min-height: 300px; margin: -6px -14px -6px 0; }
.ov-hero .player-look .player-model { --u: 6.6px; }
.ov-hero .player-look-stage { inset: 6px 0 42px; }
.ov-hero .player-look-caption { bottom: 6px; font-size: .74rem; }
.ovh-sheen { position: absolute; inset: 0; z-index: 4; pointer-events: none; opacity: 0; background: radial-gradient(320px circle at var(--sx, 50%) var(--sy, 0%), rgb(255 255 255 / .55), transparent 60%); mix-blend-mode: soft-light; transition: opacity .35s; }
.ov-hero.is-tilting .ovh-sheen { opacity: 1; }
/* The numbers on the player page. */
.ov-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; }
.ov-stats a { display: grid; gap: 2px; padding: 4px 12px; border-left: 1px solid var(--line); }
.ov-stats a:first-child { padding-left: 0; border-left: 0; }
.ov-stats dd { margin: 0; font-family: var(--font-display); font-size: 2rem; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; font-variant-numeric: tabular-nums; transition: color .2s; }
.ov-stats dt { color: var(--ink-3); font-size: .78rem; font-weight: 650; }
.ov-stats a:hover dd { color: var(--accent-text); }
/* Checklist with its progress ring; the ticks pop in one after another the first time. */
.ov-todo-top { display: flex; align-items: center; gap: 14px; }
.ov-todo-top p { color: var(--ink-2); font-size: .88rem; line-height: 1.5; }
.ov-todo-top strong { display: block; color: var(--ink); font-size: 1rem; }
.ov-ring { position: relative; flex-shrink: 0; width: 62px; height: 62px; }
.ov-ring svg { width: 62px; height: 62px; rotate: -90deg; }
.ov-ring circle { fill: none; stroke-width: 6; }
.ov-ring .ring-bar { stroke-dasharray: 169.6; transition: stroke-dashoffset 1.1s var(--ease-out); }
.ov-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: .9rem; font-variant-numeric: tabular-nums; }
.todo-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.todo-list li { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 8px; border-radius: 10px; font-size: .88rem; }
.todo-list li:hover { background: var(--surface-2); }
.todo-dot { display: grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; border-radius: 99px; border: 1.8px solid var(--line-2); }
.todo-dot svg.icon { width: 13px; height: 13px; stroke-width: 3; opacity: 0; }
.todo-list li.is-done { color: var(--ink-3); }
.todo-list li.is-done .todo-dot { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.todo-list li.is-done .todo-dot svg.icon { opacity: 1; }
.ov-todo.is-ticking li.is-done .todo-dot { animation: tick-pop .5s var(--spring) both; animation-delay: calc(var(--i) * 90ms + 300ms); }
@keyframes tick-pop { from { scale: .3; } }
/* This week by day. */
.week-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.week-sum strong { font-family: var(--font-display); font-size: 1.7rem; letter-spacing: -.035em; }
.streak { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px 2px 6px; border-radius: 99px; background: color-mix(in srgb, var(--gold) 18%, var(--surface)); color: var(--warning-text); font-size: .76rem; font-weight: 750; }
.streak svg.icon { width: 14px; height: 14px; }
.week-bars { display: grid; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 8px; height: 112px; padding-top: 6px; }
.week-bars > div { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; text-align: center; }
.week-bars i { align-self: end; display: block; height: var(--h); min-height: 4px; border-radius: 6px 6px 3px 3px; background: color-mix(in srgb, var(--accent) 45%, var(--surface-3)); transform-origin: bottom; transition: transform .8s var(--ease-out); transition-delay: calc(var(--i) * 60ms); }
.week-bars .is-today i { background: var(--accent); }
.week-bars .is-future i { height: 4px; background: none; border: 1.5px dashed var(--line-2); }
.week-bars span { color: var(--ink-3); font-size: .72rem; font-weight: 700; white-space: nowrap; }
.week-bars .is-today span { color: var(--accent-text); }
.ov-week.is-waiting .week-bars i { transform: scaleY(0); }
/* Recent configs. */
.recent-list { display: grid; gap: 4px; }
.recent-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; border-radius: 13px; background: var(--surface-2); transition: background-color .2s, translate .3s var(--ease-out); }
.recent-list a:hover { background: var(--accent-soft); translate: 3px 0; }
.recent-list b { overflow: hidden; font-size: .92rem; white-space: nowrap; text-overflow: ellipsis; }
.recent-list .meta { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; color: var(--ink-3); font-size: .76rem; }
.recent-list .meta .tag { height: 20px; padding: 0 7px; font-size: .72rem; }
.recent-list .meta .badge { height: 20px; }
.recent-list .nums { grid-column: 2; grid-row: 1 / span 2; align-self: center; display: flex; gap: 10px; color: var(--ink-3); font-size: .78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.recent-list .nums span { display: inline-flex; align-items: center; gap: 3px; }
.recent-list .nums svg.icon { width: 14px; height: 14px; }
.recent-foot { display: flex; gap: 10px; margin-top: auto; }
/* Supporter, with "Star Border": two blurred lights run along the top and bottom edges while it is active. */
.ov-supp { overflow: hidden; }
.ov-supp.is-off { background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--supporter-soft) 70%, var(--surface))); }
.ov-supp.is-star { border-color: transparent; }
.ov-supp.is-star::before { content: ""; position: absolute; inset: 2px; z-index: -1; border-radius: 20px; background: var(--surface); }
.star-light { position: absolute; z-index: -2; width: 300%; height: 50%; border-radius: 50%; opacity: .75; pointer-events: none; background: radial-gradient(circle, var(--supporter), transparent 14%); }
.star-light.is-b { bottom: -12px; right: -250%; animation: star-bottom 5s linear infinite alternate; }
.star-light.is-t { top: -10px; left: -250%; animation: star-top 5s linear infinite alternate; }
@keyframes star-bottom { from { transform: translateX(0); opacity: 1; } to { transform: translateX(-100%); opacity: 0; } }
@keyframes star-top { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }
.supp-big { display: flex; align-items: baseline; gap: 6px; }
.supp-big strong { font-family: var(--font-display); font-size: 2rem; letter-spacing: -.04em; line-height: 1; }
.supp-big small { color: var(--ink-3); font-size: .9rem; font-weight: 700; }
.supp-slots { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--ink-3); font-size: .8rem; font-weight: 650; }
.supp-slots i { width: 18px; height: 24px; border-radius: 5px; border: 1.5px dashed var(--line-2); }
.supp-slots i.is-used { border: 0; background: var(--supporter-gradient); }
/* Security and favourites. */
.sec-rows { display: grid; gap: 8px; }
.sec-rows div { display: flex; align-items: center; gap: 10px; font-size: .88rem; }
.sec-rows svg.icon { width: 17px; height: 17px; color: var(--ink-3); }
.sec-rows .badge { margin-left: auto; height: 22px; }
.fav-list { display: grid; gap: 6px; }
.fav-list a { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink-2); font-size: .86rem; font-weight: 650; }
.fav-list a:hover { color: var(--accent-text); }
.fav-list a::before { content: ""; flex-shrink: 0; width: 6px; height: 6px; border-radius: 2px; background: var(--gold); }
.fav-list a span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ---------- Account preferences (account-prefs.js) ---------- */
.view-lede { margin: -4px 0 4px; color: var(--ink-3); font-size: .9rem; }
.pref-card { display: grid; gap: 14px; }
.pref-card h3 { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.pref-card h3 svg.icon { width: 18px; height: 18px; color: var(--ink-3); }
.pref-card .muted { color: var(--ink-3); font-size: .84rem; }
.pref-block { display: grid; gap: 10px; }
.theme-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.theme-tile { display: grid; gap: 8px; padding: 8px 8px 10px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; transition: border-color .2s, translate .3s var(--spring); }
.theme-tile:hover { translate: 0 -2px; border-color: var(--line-2); }
.theme-tile[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); color: var(--ink); }
.mini-page { --mp-bg: #f4f7f2; --mp-bar: #fff; --mp-line: #dfe7dd; position: relative; overflow: hidden; height: 74px; border-radius: 10px; background: var(--mp-bg); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .06); }
.mini-page.is-dark { --mp-bg: #0b110e; --mp-bar: #17211c; --mp-line: #26332c; }
.mini-page i { position: absolute; inset: 0 0 auto; height: 16px; background: var(--mp-bar); }
.mini-page b { position: absolute; left: 10px; top: 26px; width: 44%; height: 8px; border-radius: 4px; background: #2bc26a; }
.mini-page s { position: absolute; left: 10px; right: 10px; top: 42px; height: 22px; border-radius: 6px; background: var(--mp-line); }
.mini-page.is-auto::after { content: ""; position: absolute; z-index: 3; inset: 0; clip-path: polygon(64% 0, 100% 0, 100% 100%, 36% 100%); background: linear-gradient(#17211c 0 0) 0 0 / 100% 16px no-repeat, linear-gradient(#2bc26a 0 0) 10px 26px / 44% 8px no-repeat, linear-gradient(#26332c 0 0) 10px 42px / calc(100% - 20px) 22px no-repeat, #0b110e; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 11px; background: linear-gradient(135deg, var(--a), var(--b)); box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08); cursor: pointer; transition: scale .3s var(--spring); }
.swatch:hover { scale: 1.08; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.lang-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lang-grid .lang-option { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink-2); font-size: .88rem; font-weight: 700; }
.lang-grid .lang-option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.lang-grid .lang-flag { flex-shrink: 0; width: 22px; height: 16px; border-radius: 3px; background-size: cover; background-position: center; box-shadow: 0 0 0 1px rgb(0 0 0 / .08); }
.seg { justify-self: start; display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 13px; background: var(--surface-2); }
.seg button { height: 34px; padding: 0 14px; border: 0; border-radius: 10px; background: none; color: var(--ink-3); font: inherit; font-size: .84rem; font-weight: 700; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-xs); }
.pref-switch { display: flex; align-items: center; gap: 14px; }
.pref-switch > div { flex: 1; display: grid; gap: 6px; }
.pref-switch label { cursor: pointer; }
@media (max-width: 1040px) {
  .ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-tile[data-tile="recent"] { grid-row: auto; }
  .lang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .ov-grid { grid-template-columns: minmax(0, 1fr); }
  .ov-tile, .ov-tile[data-tile="hero"] { grid-column: auto; grid-row: auto; }
  .ov-hero.has-look { grid-template-columns: minmax(0, 1fr) 128px; padding: 18px; }
  .ov-hero .player-look { min-height: 220px; margin: -8px -10px -14px 0; }
  .ov-hero .player-look .player-model { --u: 5px; }
  .ov-hero .player-look-caption { display: none; }
  .ov-stats dd { font-size: 1.6rem; }
  .theme-tiles { gap: 8px; }
}
@media (prefers-reduced-motion: reduce) { .star-light { animation: none; } .ov-week.is-waiting .week-bars i { transform: none; } }

/* ---------- Page effects ---------- */
/* Vanilla takes on React Bits components, drawn by the page scripts; with reduced motion they hold still. */
/* Rubber Segment: one underline for the library tabs stretches across to the tab chosen (shell.js). */
.tabs.rubber { position: relative; }
.tabs.rubber a::after { display: none; }
.rubber-thumb { position: absolute; left: 0; bottom: 0; width: 0; height: 3px; border-radius: 3px; background: var(--accent); pointer-events: none; }
/* Text Type: example searches type themselves out over an empty search box. */
.search:has(> .type-ghost) { position: relative; }
.search.is-typing .search-input::placeholder { color: transparent; }
.type-ghost { position: absolute; top: 50%; display: flex; align-items: center; max-width: calc(100% - 140px); overflow: hidden; color: color-mix(in srgb, var(--ink-3) 85%, transparent); font-size: 1rem; white-space: nowrap; translate: 0 -50%; pointer-events: none; }
.type-ghost[hidden] { display: none; }
.type-caret { flex-shrink: 0; width: 2px; height: 1.15em; margin-left: 2px; border-radius: 1px; background: var(--accent); animation: caret 1s steps(1) infinite; }
/* Pulse Heart: the reaction icon contracts, flips colour and springs back; the count rolls over. */
.config-reactions.is-pulse .reaction { position: relative; overflow: visible; }
.config-reactions.is-pulse .reaction[aria-pressed="true"] svg { animation: none; }
.config-reactions.is-pulse .reaction > span { line-height: 1.3; }
.pulse-ring { position: absolute; left: 20px; top: 50%; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; pointer-events: none; }
.num-roll { display: inline-block; height: 1.3em; line-height: 1.3; overflow: hidden; vertical-align: top; }
.num-strip { display: flex; flex-direction: column; }
.num-strip > span { display: block; height: 1.3em; }
/* Line Sidebar (shell.js): the account navigation's items lean aside near the pointer. */
.account-nav.line-nav > :is(button, a) { translate: calc(var(--near, 0) * 12px) 0; transition: translate .25s var(--ease-out), background-color .2s, color .2s; }
.account-nav.line-nav > [style*="--near"]:not([aria-current]) { color: color-mix(in srgb, var(--ink) calc(var(--near, 0) * 100%), var(--ink-2)); }
/* Flying Button: thrusters under 下载 JSON; a click lifts it off on a plume of smoke. */
.fly-wrap { position: relative; }
.fly-ship { position: relative; z-index: 1; }
.fly-jets { position: absolute; left: 50%; bottom: -9px; z-index: -1; display: flex; gap: 120px; opacity: 0; translate: -50% 0; transition: opacity .2s; pointer-events: none; }
.fly-jets i { width: 10px; height: 14px; border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; background: radial-gradient(circle at 50% 30%, #fff6c8, #ffb648 45%, #ff6a2c 75%, transparent 78%); transform-origin: top; animation: jet .09s ease-in-out infinite alternate; }
.fly-wrap:hover:not(:has(:disabled)) .fly-jets, .fly-wrap.is-flying .fly-jets { opacity: 1; }
.fly-wrap.is-flying .fly-jets i { scale: 1.3 2.3; }
@keyframes jet { to { transform: scaleY(.7) scaleX(.85); } }
.fly-puff { position: absolute; bottom: -10px; z-index: 0; border-radius: 50%; background: radial-gradient(circle at 40% 38%, var(--surface), color-mix(in srgb, var(--ink-3) 30%, var(--surface-3)) 62%, transparent 72%); pointer-events: none; }
/* Fuse Button: 撤下 acts on the card at once; 撤销 rides on a fuse that burns for five seconds. */
.config-card.is-pulled :is(.config-card-title, .config-card-desc, .config-card-meta, .config-card-top .tag-list) { opacity: .5; transition: opacity .3s; }
.config-card.is-gone { opacity: .25; scale: .96; filter: grayscale(1); transition: opacity .3s, filter .3s, scale .4s var(--ease-out); }
.fuse-btn { position: relative; overflow: visible; }
.fuse-btn.is-lit, .fuse-btn.is-lit:hover:not(:disabled) { --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-border: var(--line-2); }
.fuse-line { position: absolute; left: 8px; bottom: 4px; width: calc(100% - 16px); height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--line-2), #ffb648); }
.fuse-btn:not(.is-lit) .fuse-line { display: none; }
/* Shredder: a deleted backup slides into a shredder under it and falls out as paper strips. */
.shred-unit { position: relative; z-index: 5; height: 34px; list-style: none; }
.shredder { position: relative; height: 34px; border-radius: 12px; background: linear-gradient(#2b332e, #161b18); box-shadow: 0 10px 22px -12px rgb(0 0 0 / .7), inset 0 1px 0 rgb(255 255 255 / .12); }
.shredder::before { content: ""; position: absolute; left: 16px; right: 40px; top: 13px; height: 7px; border-radius: 4px; background: #050806; box-shadow: inset 0 2px 3px rgb(0 0 0 / .9); }
.shredder::after { content: ""; position: absolute; right: 14px; top: 12px; width: 9px; height: 9px; border-radius: 50%; background: #3c463f; transition: background-color .2s, box-shadow .2s; }
.shredder.is-on { animation: shredder-hum .07s linear infinite alternate; }
.shredder.is-on::after { background: #56e39a; box-shadow: 0 0 10px #56e39a; }
@keyframes shredder-hum { to { translate: .6px 0; } }
.shred-bin { position: absolute; left: 8px; right: 8px; top: 100%; height: 120px; overflow: hidden; pointer-events: none; }
.shred-strip { position: absolute; top: 0; margin: 0; animation: none; pointer-events: none; }
.backup-row.is-shredding { position: relative; z-index: 4; animation: none; }
/* Stepper: a finished step's number turns into a tick; the first unfinished one is ringed. */
.publish-step .step-index { position: relative; transition: background-color .3s, color .3s, box-shadow .3s; }
.publish-step.is-done .step-index { background: var(--accent); color: var(--accent-ink); }
.publish-step.is-current .step-index { box-shadow: 0 0 0 5px var(--accent-ring); }
.publish-step.is-done .step-index b { display: none; }
.step-check { display: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.publish-step.is-done .step-check { display: block; animation: draw-check .4s .1s var(--ease-out) forwards; }
@keyframes draw-check { to { stroke-dashoffset: 0; } }
/* Status Mark: a dashed ring → a spinning arc while the server checks → a full ring with a tick. */
.status-mark { width: 52px; height: 52px; flex-shrink: 0; overflow: visible; }
.validation-ok .status-mark { width: 30px; height: 30px; margin: -3px 0; }
.sm-track { fill: none; stroke: var(--line-2); stroke-width: 3; stroke-dasharray: 2.5 5.5; transition: stroke .3s; }
.sm-arc { fill: none; stroke: var(--accent); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 0 100; opacity: 0; transform-origin: 26px 26px; transform: rotate(-90deg); transition: stroke-dasharray .45s var(--ease-out); }
.sm-check { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .45s .3s var(--ease-out); }
.status-box:not([data-state="idle"]) .sm-arc { opacity: 1; }
.status-box[data-state="run"] .sm-arc { stroke-dasharray: 26 100; animation: sm-spin .8s linear infinite; }
.status-box[data-state="run"] .sm-track { stroke: var(--surface-3); stroke-dasharray: none; }
.status-box[data-state="done"] .sm-arc { stroke-dasharray: 100 100; }
.status-box[data-state="done"] .sm-track { stroke: transparent; }
.status-box[data-state="done"] .sm-check { stroke-dashoffset: 0; }
.status-box[data-state="done"] .status-mark { animation: sm-pop .5s .25s var(--spring); }
@keyframes sm-spin { from { transform: rotate(-90deg); } to { transform: rotate(270deg); } }
@keyframes sm-pop { 40% { scale: 1.14; } }
.validation-placeholder .status-running, .validation-placeholder[data-state="run"] .status-idle { display: none; }
.validation-placeholder[data-state="run"] .status-running { display: block; }
/* Folder Float: the folder opens while a file is dragged in (or the zone is hovered or focused) and its contents float up. */
.float-folder { position: relative; width: 80px; height: 60px; margin-top: 64px; }
.ff-back { position: absolute; inset: 0; border-radius: 4px 12px 12px 12px; background: color-mix(in srgb, var(--accent) 72%, #0a3a1e); }
.ff-back::before { content: ""; position: absolute; left: 0; top: -9px; width: 34px; height: 12px; border-radius: 6px 8px 0 0; background: inherit; }
.ff-front { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 48px; border-radius: 9px; background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 82%, #0a3a1e)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .35); transform-origin: bottom; transition: transform .5s var(--spring); }
.ff-note { --x: -58px; --y: -48px; --r: -9deg; --dl: 0s; position: absolute; left: 50%; top: 12px; z-index: 1; padding: 6px 10px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-md), inset 0 0 0 1px var(--line); color: var(--ink); font: 750 .72rem/1 var(--font-mono); white-space: nowrap; opacity: 0; transform: translate(-50%, 0) scale(.5); transition: transform .6s var(--spring), opacity .25s; transition-delay: var(--dl); }
.ff-note:nth-child(3) { --x: 0px; --y: -70px; --r: 3deg; --dl: .06s; }
.ff-note:nth-child(4) { --x: 58px; --y: -44px; --r: 8deg; --dl: .12s; }
.dropzone:is(:hover, :focus-within, [data-dragging="true"]) .ff-front { transform: perspective(260px) rotateX(-42deg); }
.dropzone:is(:hover, :focus-within, [data-dragging="true"]) .ff-note { opacity: 1; transform: translate(calc(-50% + var(--x)), var(--y)) rotate(var(--r)); animation: ff-bob 2.6s ease-in-out infinite alternate; animation-delay: calc(var(--dl) + .6s); }
@keyframes ff-bob { to { top: 4px; } }
/* Split-Flap Text: the announcement dates flip into place. */
.flap { display: inline-flex; }
.flap-c { position: relative; display: inline-block; min-width: .64em; margin: 0 1px; padding: 1px .04em 0; border-radius: 7px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line), 0 2px 0 var(--line); text-align: center; }
.flap-c::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: color-mix(in srgb, var(--ink) 16%, transparent); }
/* Split Text: an announcement title's characters spring up one after another. */
.split-ch { display: inline-block; white-space: pre; }
.split-word { display: inline-block; white-space: nowrap; }
/* Lanyard: the member card swings from a strap beside the entitlement (account.js). */
.supporter-card.has-lanyard { align-items: start; }
.supporter-card.has-lanyard .supporter-emblem { display: none; }
.lanyard { position: relative; width: 190px; height: 300px; margin: -22px 0 -22px -4px; touch-action: none; }
.lanyard-pin { position: absolute; left: 50%; top: 9px; z-index: 3; width: 22px; height: 10px; border-radius: 5px; background: linear-gradient(#cfd6d2, #8b958f); box-shadow: 0 2px 4px rgb(0 0 0 / .25); translate: -50% 0; }
.lanyard-rig { position: absolute; left: 50%; top: 14px; width: 0; transform-origin: 0 0; }
.lanyard-strap { position: absolute; left: -7px; top: 0; width: 14px; height: 64px; border-radius: 3px; background: repeating-linear-gradient(180deg, rgb(255 255 255 / .16) 0 2px, transparent 2px 9px), linear-gradient(90deg, #d93f86, #ff5fa4 40%, #b45cff); box-shadow: 0 2px 6px rgb(0 0 0 / .18); }
.pass-card { position: absolute; left: -76px; top: 60px; display: grid; justify-items: center; align-content: start; gap: 6px; width: 152px; height: 212px; padding: 28px 12px 14px; border-radius: 16px; background: linear-gradient(160deg, #ff6fae, #b45cff 58%, #6a3fd2); color: #fff; box-shadow: 0 24px 40px -18px rgb(80 20 90 / .65), inset 0 1px 0 rgb(255 255 255 / .35); text-align: center; transform-origin: 76px 0; cursor: grab; touch-action: none; user-select: none; }
.pass-card:active { cursor: grabbing; }
.pass-card::before { content: ""; position: absolute; inset: 7px; border-radius: 11px; border: 1px solid rgb(255 255 255 / .28); pointer-events: none; }
.supporter-card[data-active="false"] .pass-card { filter: grayscale(.75); }
.pass-clip { position: absolute; top: -6px; left: 50%; width: 28px; height: 15px; border-radius: 6px; background: linear-gradient(#e7ece9, #a7b0ab); box-shadow: 0 2px 4px rgb(0 0 0 / .3); translate: -50% 0; }
.pass-clip::after { content: ""; position: absolute; left: 50%; top: 20px; width: 30px; height: 6px; border-radius: 3px; background: rgb(0 0 0 / .22); translate: -50% 0; }
.pass-brand { font-family: var(--font-display); font-size: .66rem; font-weight: 800; letter-spacing: .12em; opacity: .85; }
.pass-avatar .player-avatar { width: 58px; height: 58px; border-radius: 15px; border: 3px solid rgb(255 255 255 / .85); box-shadow: 0 10px 18px -8px rgb(0 0 0 / .5); }
.pass-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: 1.05rem; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.pass-card .badge { background: rgb(255 255 255 / .2); color: #fff; }
.pass-until { margin-top: auto; font-size: .66rem; line-height: 1.4; opacity: .88; }
/* Profile Card: the player banner leans toward the pointer under a holographic sheen. */
.holo-sheen { position: absolute; inset: 0; z-index: 2; border-radius: inherit; background: radial-gradient(420px circle at var(--px, 50%) var(--py, 50%), rgb(255 255 255 / .3), transparent 60%), linear-gradient(115deg, transparent 22%, rgb(255 95 164 / .16) 36%, rgb(110 190 255 / .16) 47%, rgb(255 222 110 / .14) 58%, transparent 72%) var(--px, 50%) var(--py, 50%) / 260% 260%; opacity: 0; transition: opacity .35s; pointer-events: none; }
.player-banner { transition: transform .6s var(--spring); }
.player-banner.is-tilting .holo-sheen { opacity: 1; }
.player-identity .player-avatar { transition: translate .4s var(--ease-out); }
:root[data-theme="dark"] .holo-sheen { mix-blend-mode: soft-light; }
/* Sticker Peel: a supporter's banner carries a sticker whose corner lifts on hover and peels when dragged. */
@property --peel { syntax: "<length>"; inherits: true; initial-value: 0px; }
.sticker { --peel: 0px; position: absolute; top: 16px; right: 22px; z-index: 3; width: 72px; height: 72px; rotate: -6deg; transition: --peel .5s var(--spring); cursor: grab; touch-action: none; }
.player-banner[data-look="true"] > .sticker { right: calc(300px + 44px); }
.sticker:hover { --peel: 22px; }
.sticker.is-dragging { transition: none; cursor: grabbing; }
.sticker-face { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 1px; border: 4px solid #fff; border-radius: 20px; background: radial-gradient(circle at 30% 25%, #ffd1e6, #ff6fae 55%, #d93f86); box-shadow: 0 8px 18px -8px rgb(60 0 40 / .55); clip-path: polygon(-20px -20px, calc(100% + 20px) -20px, calc(100% + 20px) calc(100% - var(--peel)), calc(100% - var(--peel)) calc(100% + 20px), -20px calc(100% + 20px)); }
.sticker-face img { width: 30px; height: 30px; filter: drop-shadow(0 2px 3px rgb(120 0 60 / .4)); }
.sticker-face b { color: #fff; font-size: .62rem; font-weight: 800; text-shadow: 0 1px 2px rgb(120 0 60 / .45); }
.sticker-flap-wrap { position: absolute; right: 0; bottom: 0; width: var(--peel); height: var(--peel); filter: drop-shadow(-3px -3px 4px rgb(60 0 40 / .35)); pointer-events: none; }
.sticker-flap { position: absolute; inset: 0; clip-path: polygon(0 0, 100% 0, 0 100%); background: linear-gradient(135deg, #fff 35%, #e3dde3); }
/* Pixel Transition: the sidebar face blinks through an 8×8 grid into the whole skin, front on (account.js). */
.px-avatar canvas.px-body { position: absolute; left: calc(50% - 14px); top: 0; width: 28px; height: 100%; image-rendering: pixelated; visibility: hidden; }
.px-avatar.is-flipped { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 22%, var(--surface-2)), var(--surface-2)); }
.px-avatar.is-flipped > :is(img, .avatar-fallback) { visibility: hidden; }
.px-avatar.is-flipped canvas.px-body { visibility: visible; }
.px-grid { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); pointer-events: none; }
.px-grid i { background: var(--accent); opacity: 0; }
/* Slosh Gauge: one glass per animated cape slot, filled to the days it has left (account.js). */
.slosh-row { display: grid; grid-template-columns: repeat(3, minmax(0, 76px)); gap: 14px; margin-top: 14px; }
.slosh { display: grid; justify-items: center; gap: 6px; margin: 0; text-align: center; }
.slosh svg { width: 46px; height: 86px; overflow: visible; }
.slosh-glass { fill: none; stroke: var(--line-2); stroke-width: 2; }
.slosh-bg { fill: var(--surface-2); }
.slosh[data-empty] .slosh-glass { stroke-dasharray: 5 5; }
.slosh figcaption { display: grid; gap: 1px; }
.slosh figcaption strong { font-size: .92rem; font-variant-numeric: tabular-nums; }
.slosh figcaption span { color: var(--ink-3); font-size: .72rem; line-height: 1.35; }
.slosh[data-low] figcaption strong { color: var(--warning-text); }
.slosh[data-empty] figcaption strong { color: var(--ink-3); }
/* Paper Crumple: a copy of the deleted Passkey row is creased into a ball and tossed (passkeys.js). */
.crumple-ghost { position: fixed; z-index: 70; margin: 0; overflow: hidden; pointer-events: none; transform-origin: 0 0; box-shadow: var(--shadow-md); animation: none; }
.crumple-ghost .crease { position: absolute; inset: 0; background: repeating-linear-gradient(32deg, transparent 0 7px, rgb(0 0 0 / .1) 7px 8px, rgb(255 255 255 / .5) 8px 9px), repeating-linear-gradient(-48deg, transparent 0 11px, rgb(0 0 0 / .08) 11px 12px, rgb(255 255 255 / .4) 12px 13px); opacity: 0; }
/* Status Mark in a save button: spin, then a tick or a cross (shell.js saving()). */
.save-btn { gap: 0; }
.save-btn .status-mark { width: 0; height: 18px; margin: 0; opacity: 0; transition: width .25s var(--ease-out), margin .25s var(--ease-out), opacity .2s; }
.save-btn:not([data-state="idle"]) .status-mark { width: 18px; margin-right: 8px; opacity: 1; }
.save-btn .sm-track { stroke: color-mix(in srgb, currentColor 30%, transparent); stroke-dasharray: none; }
.save-btn .sm-arc, .save-btn .sm-check, .save-btn .sm-cross { stroke: currentColor; stroke-width: 5; }
.save-btn .sm-cross { fill: none; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset .4s .25s var(--ease-out); }
.save-btn[data-state="run"]:disabled { opacity: 1; cursor: progress; }
.save-btn[data-state="fail"] { --btn-bg: var(--danger); --btn-fg: #fff; --btn-border: transparent; animation: save-shake .45s .3s; }
.save-btn[data-state="fail"] .sm-arc { stroke-dasharray: 100 100; }
.save-btn[data-state="fail"] .sm-track { stroke: transparent; }
.save-btn[data-state="fail"] .sm-cross { stroke-dashoffset: 0; }
@keyframes save-shake { 20%, 60% { translate: -5px 0; } 40%, 80% { translate: 5px 0; } }
/* Squish Switch: 记住我 is a switch; its thumb stretches on the way and squashes as it lands (account.js). */
.squish-check { position: relative; }
.squish-check input { position: absolute; left: 0; top: 50%; width: 46px; height: 28px; margin: 0; translate: 0 -50%; opacity: 0; }
.squish { position: relative; flex-shrink: 0; width: 46px; height: 28px; border-radius: 99px; background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--line-2); transition: background-color .3s, box-shadow .3s; }
.squish-thumb { position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 99px; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / .25); transition: translate .5s var(--spring); }
.squish-check input:checked + .squish { background: var(--accent); box-shadow: none; }
.squish-check input:checked + .squish .squish-thumb { translate: 18px 0; }
.squish-check input:focus-visible + .squish { outline: 3px solid var(--accent-ring); outline-offset: 2px; }
.squish-check input:disabled + .squish { opacity: .5; }
@media (max-width: 960px) { .player-banner[data-look="true"] > .sticker { right: calc(230px + 30px); } }
@media (max-width: 560px) {
  .lanyard { width: 100%; height: 300px; margin: -10px 0 0; }
  .sticker { top: 12px; right: 14px; width: 58px; height: 58px; }
  .player-banner[data-look="true"] > .sticker { right: 14px; }
  .sticker-face img { width: 24px; height: 24px; }
  .sticker-face b { font-size: .56rem; }
  .float-folder { margin-top: 56px; }
}

/* ---------- Players found by a library search (configs.js) ---------- */
.player-hits { display: grid; gap: 10px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(120deg, var(--surface), color-mix(in srgb, var(--accent-soft) 60%, var(--surface))); }
.hits-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hits-label { color: var(--ink-2); font-size: .84rem; font-weight: 750; }
.hits-head .link { color: var(--accent-text); font-size: .82rem; font-weight: 700; }
.hits-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.hit { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 13px; background: var(--surface); box-shadow: var(--shadow-xs); transition: translate .3s var(--spring), box-shadow .2s; }
.hit:hover { translate: 0 -2px; box-shadow: var(--shadow-sm); }
.hit .player-avatar { width: 36px; height: 36px; border-radius: 10px; font-size: .9rem; }
.hit-text { display: grid; min-width: 0; }
.hit-text strong { display: flex; align-items: center; overflow: hidden; font-size: .9rem; white-space: nowrap; text-overflow: ellipsis; }
.hit-text strong .supporter-badge { flex-shrink: 0; margin-left: 4px; }
.hit-text span { color: var(--ink-3); font-size: .74rem; }

/* ---------- 主页设置: social accounts, modes, pin and the live preview (account-profile.js) ---------- */
#public-profile-panel.has-preview { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.profile-extra { display: grid; gap: 18px; }
.extra-group { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.extra-group legend { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 4px; padding: 0; color: var(--ink); font-size: .9rem; font-weight: 750; }
.extra-group legend small { color: var(--ink-3); font-size: .78rem; font-weight: 600; }
.extra-group .muted { margin-top: -4px; color: var(--ink-3); font-size: .82rem; }
.link-fields { display: grid; gap: 8px; }
.link-field { --brand: var(--ink-2); display: grid; grid-template-columns: 34px 78px minmax(0, 1fr); align-items: center; gap: 10px; }
.link-field[data-platform="bilibili"] { --brand: #00a1d6; }
.link-field[data-platform="youtube"] { --brand: #ff0033; }
.link-field[data-platform="github"] { --brand: var(--ink); }
.link-field[data-platform="discord"] { --brand: #5865f2; }
.link-field[data-platform="qq"] { --brand: #12b7f5; }
.link-field-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--brand) 12%, var(--surface)); color: var(--brand); }
.link-field-icon svg.icon { width: 18px; height: 18px; }
.link-field-icon svg.is-fill { fill: currentColor; stroke: none; }
.link-field-name { color: var(--ink-2); font-size: .86rem; font-weight: 700; }
.link-field .input:invalid:not(:placeholder-shown) { border-color: var(--danger); }
.mode-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.mode-pick { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px 0 8px; border: 1.5px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; transition: border-color .2s, background-color .2s, color .2s, translate .3s var(--spring); }
.mode-pick:hover:not(:disabled) { translate: 0 -2px; border-color: var(--line-2); }
.mode-pick:disabled { opacity: .45; cursor: not-allowed; }
.mode-order { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 99px; background: var(--surface-3); font-size: .72rem; font-variant-numeric: tabular-nums; }
.mode-pick[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.mode-pick[aria-pressed="true"] .mode-order { background: var(--accent); color: var(--accent-ink); }
.profile-preview { position: sticky; top: calc(var(--header-height) + 24px); display: grid; gap: 8px; }
.pp-label { color: var(--ink-3); font-size: .76rem; font-weight: 800; letter-spacing: .04em; }
.pp-card { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(120% 70% at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 60%), linear-gradient(160deg, var(--surface), var(--bg-tint)); box-shadow: var(--shadow-sm); }
.pp-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pp-head .player-avatar { width: 52px; height: 52px; border-radius: 14px; }
.pp-name { overflow: hidden; font-size: 1.2rem; letter-spacing: -.02em; white-space: nowrap; text-overflow: ellipsis; }
.pp-bio { color: var(--ink-2); font-size: .86rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.pp-bio.is-missing { color: var(--ink-3); }
.pp-card .player-links { gap: 5px; }
.pp-card .player-link { height: 28px; padding: 0 10px 0 8px; font-size: .74rem; }
.pp-modes { display: flex; flex-wrap: wrap; gap: 5px; }
.pp-modes .tag.is-main { box-shadow: 0 0 0 2px var(--violet-text); }
.pp-pin { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); font-size: .84rem; }
.pp-pin b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pp-pin-label { flex-shrink: 0; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--gold) 22%, var(--surface)); color: var(--warning-text); font-size: .7rem; font-weight: 800; }
/* 隐私 */
.privacy-card { display: grid; gap: 4px; }
.privacy-row { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.privacy-row + .privacy-row { border-top: 1px solid var(--line); }
.privacy-row > div { flex: 1; display: grid; gap: 4px; }
.privacy-row h3 { font-size: .98rem; }
.privacy-row h3 label { cursor: pointer; }
.privacy-row .muted { color: var(--ink-3); font-size: .84rem; line-height: 1.55; }
.privacy-card[aria-busy="true"] .squish { opacity: .5; }
/* 登录设备 */
.devices { display: grid; gap: 12px; }
.devices-head h3 { font-size: 1rem; }
.devices-head .muted { margin-top: 4px; color: var(--ink-3); font-size: .84rem; }
.device-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.device-list[aria-busy="true"]:empty { min-height: 60px; border-radius: 14px; background: linear-gradient(100deg, transparent 30%, var(--chip-shine) 50%, transparent 70%) 0 0 / 300% 100% no-repeat, var(--surface-2); animation: chip-shine 1.4s linear infinite; }
.device { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); transition: opacity .25s, translate .25s var(--ease-out); }
.device.is-leaving { opacity: 0; translate: 16px 0; }
.device-icon { display: grid; place-items: center; flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; background: var(--surface); color: var(--ink-2); box-shadow: var(--shadow-xs); }
.device-icon svg.icon { width: 19px; height: 19px; }
.device-text { flex: 1; display: grid; gap: 2px; min-width: 0; }
.device-text strong { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .92rem; }
.device-text small { color: var(--ink-3); font-size: .78rem; }
.device-current { height: 20px; background: var(--accent-soft); color: var(--accent-text); }
.device-remembered { padding: 1px 7px; border-radius: 99px; background: var(--surface-3); color: var(--ink-3); font-size: .7rem; font-weight: 700; }
.device-empty { padding: 12px; color: var(--ink-3); font-size: .86rem; }
@media (max-width: 1040px) { #public-profile-panel.has-preview { grid-template-columns: minmax(0, 1fr); } .profile-preview { position: static; order: -1; } }
@media (max-width: 680px) { .link-field { grid-template-columns: 34px minmax(0, 1fr); } .link-field-name { display: none; } }

/* ---------- Social accounts (library.profileLinks): the player banner and the 主页设置 preview ---------- */
.player-links { display: flex; flex-wrap: wrap; gap: 6px; }
.player-link { --brand: var(--ink-2); display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 9px; border: 1px solid var(--line); border-radius: 99px; background: color-mix(in srgb, var(--surface) 82%, transparent); color: var(--ink-2); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: color .2s, border-color .2s, translate .3s var(--spring); }
.player-link:hover, .player-link:focus-visible { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); color: var(--brand); translate: 0 -2px; }
.player-link svg.icon { width: 16px; height: 16px; color: var(--brand); }
.player-link svg.is-fill { fill: currentColor; stroke: none; }
.player-link svg.is-stroke { stroke-width: 2.2; }
.player-link[data-platform="bilibili"] { --brand: #00a1d6; }
.player-link[data-platform="youtube"] { --brand: #ff0033; }
.player-link[data-platform="github"] { --brand: var(--ink); }
.player-link[data-platform="discord"] { --brand: #5865f2; }
.player-link[data-platform="qq"] { --brand: #12b7f5; }
