/* Admin action palette: one source of truth for existing blue primary controls.
   Public UI keeps its original :root --app-accent values. Semantic GF/DM,
   share/save colors, danger, medals and rainbow skill effects are unchanged. */
body.admin-new-ui {
 --app-accent:#246b82;
 --app-accent-pressed:#19566a;
 --app-accent-soft:#dceff2;
}
body.admin-new-ui.light-mode {
 --app-accent:#236d83;
 --app-accent-pressed:#195568;
 --app-accent-soft:#e4f1f3;
}
/* Admin-only destructive actions: one theme palette for all delete controls.
   Replaces the disparate tag/account/rival styles without touching public UI.
   Geometry (size/spacing) stays owned by each component. */
body.admin-new-ui {
  --admin-delete-bg:#2b1017;
  --admin-delete-border:#7f1d1d;
  --admin-delete-ink:#fca5a5;
}
body.admin-new-ui.light-mode {
  --admin-delete-bg:#fee2e2;
  --admin-delete-border:#ef4444;
  --admin-delete-ink:#b91c1c;
}
body.admin-new-ui :is(
  #btnDeleteAccount,
  #tagSettingsMask .tag-settings-row button[data-delete-tag],
  #rivalManageMask .favorite-user-row > .remove,
  .account-switch-remove,
  #btnDeleteEditingScore,
  .skill-history-delete,
  .admin-board-post-actions button.danger,
  #btnAdminBulkDeleteScores,
  #btnAdminDeleteSelectedUsers,
  #btnAdminMasterMobileDelete,
  .admin-delete,
  .btn-version-delete,
  button.master-row-delete[data-admin-delete-master-row]
) {
  background:var(--admin-delete-bg)!important;
  border:1px solid var(--admin-delete-border)!important;
  color:var(--admin-delete-ink)!important;
  -webkit-text-fill-color:var(--admin-delete-ink)!important;
  border-radius:8px;
  box-shadow:none!important;
}
body.admin-new-ui :is(
  #btnDeleteAccount,
  #tagSettingsMask .tag-settings-row button[data-delete-tag],
  #rivalManageMask .favorite-user-row > .remove,
  .account-switch-remove,
  #btnDeleteEditingScore,
  .skill-history-delete,
  .admin-board-post-actions button.danger,
  #btnAdminBulkDeleteScores,
  #btnAdminDeleteSelectedUsers,
  #btnAdminMasterMobileDelete,
  .admin-delete,
  .btn-version-delete,
  button.master-row-delete[data-admin-delete-master-row]
):not(:disabled):hover {
  filter:brightness(1.08);
}

/* Admin-only unified animation behavior for own and viewed-user cards.
   The generic scroll optimization pauses public animations; admin cards use
   a single running timeline in both screens instead of pausing/restarting
   only when a viewed profile is scrolled. */
body.admin-new-ui.app-scroll-layout.app-scrolling :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) :is(
  .score-rank-sparkle-rainbow,.user-list-row-sparkle-rainbow,
  .skill-box-sparkle-rainbow,.ar-record.skill-row-sparkle-rainbow
){animation-play-state:running!important;}
body.admin-new-ui.app-scroll-layout.app-scrolling :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .skill-box-sparkle-rainbow::before,
body.admin-new-ui.app-scroll-layout.app-scrolling :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .skill-box-sparkle-rainbow::after,
body.admin-new-ui.app-scroll-layout.app-scrolling :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .dc-card:has(.skill-box-sparkle-rainbow)::before,
body.admin-new-ui.app-scroll-layout.app-scrolling :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-record.skill-row-sparkle-rainbow::before,
body.admin-new-ui.app-scroll-layout.app-scrolling :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-record.skill-row-sparkle-rainbow::after
{animation-play-state:running!important;}
/* Admin registered rows: layout only; reuse public UI color, badge, and skill tokens. */
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords){width:100%;max-width:none;display:block;--ar-cols:40px 70px minmax(160px,1fr) 82px 55px 87px 74px 62px 76px 48px}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords).hidden{display:none!important}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-register-view{width:100%;min-width:0}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-record-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:5px}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) :is(.ar-table-head,.ar-record){display:grid;grid-template-columns:var(--ar-cols);align-items:center;column-gap:7px;box-sizing:border-box}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-table-head{padding:9px;margin-bottom:5px;background:#09324f;border:1px solid #1b678a;border-radius:7px;color:#9be9fc;font-size:12px;font-weight:800;text-align:center}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-table-head span{white-space:nowrap;min-width:0}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-table-head span:nth-child(3){text-align:left}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-record{position:relative;padding:7px;min-height:80px;border:2px solid transparent;border-radius:7px;background:linear-gradient(90deg,#112c55,#281531 15%,#0c1728 65%) padding-box,linear-gradient(rgba(255,255,255,var(--admin-border-pulse-alpha)),rgba(255,255,255,var(--admin-border-pulse-alpha))) border-box,var(--admin-song-border-image,linear-gradient(#475569,#475569)) border-box !important;color:#edf8ff;font-size:13px}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-record>*{min-width:0}
/* Light theme: explicit contrast for admin cards. Layout, skill-color border,
   and the shared public sparkle animation remain identical in both themes. */
body.admin-new-ui.light-mode :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-record{
 background:linear-gradient(#f3f4f6,#f3f4f6) padding-box,linear-gradient(rgba(255,255,255,var(--admin-border-pulse-alpha)),rgba(255,255,255,var(--admin-border-pulse-alpha))) border-box,var(--admin-song-border-image,linear-gradient(#475569,#475569)) border-box !important;color:#17243a;
}
body.admin-new-ui.light-mode :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) :is(.ar-song-name,.ar-level,.ar-rate),
body.admin-new-ui.light-mode :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) :is(.ar-level,.ar-rate) strong{
 color:#17243a!important;-webkit-text-fill-color:#17243a;
}
body.admin-new-ui.light-mode :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-no{color:#536780;}
body.admin-new-ui.light-mode :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-table-head{
 background:#e8f3fa;border-color:#83bdd6;color:#184c68;
}


/* Light-mode admin controls: match the existing public light UI instead of
   keeping dark-theme button/input paints. */
body.admin-new-ui.light-mode #searchArea #domSearch,
body.admin-new-ui.light-mode #userListHeaderSlot #userSearch,
body.admin-new-ui.light-mode #boardMainFixed #boardThreadSearch {
  background:#ffffff !important;
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  border-color:#94a3b8 !important;
  box-shadow:0 1px 1px rgba(15,23,42,.06) !important;
}
body.admin-new-ui.light-mode :is(#domSearch,#userSearch,#boardThreadSearch)::placeholder {
  color:#94a3b8 !important;
  -webkit-text-fill-color:#94a3b8 !important;
}
body.admin-new-ui.light-mode #appScreen>.p-header :is(#searchArea,#userListHeaderSlot,#boardMainFixed.board-main-fixed),
body.admin-new-ui.light-mode #boardMainFixed .board-main-toolbar,
body.admin-new-ui.light-mode #userListHeaderSlot .users-toolbar {
  background:transparent !important;
  box-shadow:none !important;
}
body.admin-new-ui.light-mode :is(#searchArea #btnAdminRecordFilters,#userListHeaderSlot #btnAdminUserFilters,.admin-filter-toggle-button),
body.admin-new-ui.light-mode :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-edit button {
  background:#f8fafc !important;
  border-color:#94a3b8 !important;
  color:#1e293b !important;
  -webkit-text-fill-color:#1e293b !important;
}
body.admin-new-ui.light-mode :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-skill,
body.admin-new-ui.light-mode :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-skill .dc-skill-value {
  color:#111827 !important;
  -webkit-text-fill-color:#111827 !important;
  -webkit-text-stroke:0 !important;
  text-shadow:none !important;
}
/* Skill history uses the same light row background and border as #viewUsers.
   Rank colors are owned by score-rank-*; preserve white and rainbow ranks. */
body.admin-new-ui.light-mode #skillHistoryList .skill-history-summary {
  background:var(--app-light-page-bg,#e5e7eb)!important;
  background-image:none!important;
  border-color:#8b98aa!important;
  color:#111827!important;
  box-shadow:none!important;
}
/* Skill history numbers use the same glyph metrics and text-sized gradient
   canvas as the user-list skill values.  Keep this admin-only so the public
   user-list styles and all other score-rank colors remain untouched. */
body.admin-new-ui #skillHistoryList .skill-history-value[class*="score-rank-"] {
  display:inline-block !important;
  width:max-content !important;
  min-width:0 !important;
  max-width:none !important;
  margin:0 !important;
  padding:0 !important;
  line-height:1 !important;
  text-align:right !important;
  font-size:12px !important;
  font-weight:900 !important;
  font-family:"SFMono-Regular","Roboto Mono","Noto Sans Mono",Consolas,monospace !important;
  font-variant-numeric:tabular-nums lining-nums !important;
  font-feature-settings:"tnum" 1,"lnum" 1 !important;
  letter-spacing:0 !important;
  white-space:nowrap !important;
  background-size:100% 100%;
}
/* Match the fine outline used for user-list rank values in light mode. */
body.admin-new-ui.light-mode #skillHistoryList .skill-history-value[class*="score-rank-"] {
  -webkit-text-stroke:.2px rgba(15,23,42,.75) !important;
}
body.admin-new-ui.light-mode .favorite-toggle {
  background:#f8fafc !important;
  color:#334155 !important;
  border:1px solid #cbd5e1 !important;
}
body.admin-new-ui.light-mode .favorite-toggle.active {
  color:#eab308 !important;
  -webkit-text-fill-color:#eab308 !important;
}

/* Admin option badges: one palette for registered/skill cards, user details,
   and song detail comparison/history in both themes. The view/overlay scope
   gives this canonical rule precedence over older shared/public CSS without
   changing the general-user UI. */
body.admin-new-ui :is(#appRoot,#rateCompareMask,#domModal) :is(.opt-badge,.history-option-badge):is(.opt-ran,.opt-ran-plus,.opt-sra,.opt-sra-plus,.opt-bass-mirror) {
  color:var(--admin-option-fg)!important;
  -webkit-text-fill-color:var(--admin-option-fg)!important;
  background:var(--admin-option-bg)!important;
  border:1px solid var(--admin-option-border)!important;
  font-weight:900!important;
}
/* Dark-mode canonical option colors. */
body.admin-new-ui :is(.opt-badge,.history-option-badge).opt-ran {
  --admin-option-fg:#86efac;--admin-option-bg:transparent;--admin-option-border:#15803d;
}
body.admin-new-ui :is(.opt-badge,.history-option-badge).opt-ran-plus {
  --admin-option-fg:#67e8f9;--admin-option-bg:rgba(8,81,103,.24);--admin-option-border:#0369a1;
}
body.admin-new-ui :is(.opt-badge,.history-option-badge).opt-sra {
  --admin-option-fg:#fdba74;--admin-option-bg:transparent;--admin-option-border:#c2410c;
}
body.admin-new-ui :is(.opt-badge,.history-option-badge).opt-sra-plus {
  --admin-option-fg:#fecdd3;--admin-option-bg:rgba(136,19,55,.22);--admin-option-border:#be123c;
}
body.admin-new-ui :is(.opt-badge,.history-option-badge).opt-bass-mirror {
  --admin-option-fg:#c4b5fd;--admin-option-bg:rgba(76,29,149,.28);--admin-option-border:#7c3aed;
}
/* Light-mode canonical option colors; shared by all admin views. */
body.admin-new-ui.light-mode :is(.opt-badge,.history-option-badge).opt-ran {
  --admin-option-fg:#15803d;--admin-option-bg:#ecfdf5;--admin-option-border:#15803d;
}
body.admin-new-ui.light-mode :is(.opt-badge,.history-option-badge).opt-ran-plus {
  --admin-option-fg:#0369a1;--admin-option-bg:#f0f9ff;--admin-option-border:#0369a1;
}
body.admin-new-ui.light-mode :is(.opt-badge,.history-option-badge).opt-sra {
  --admin-option-fg:#c2410c;--admin-option-bg:#fff7ed;--admin-option-border:#c2410c;
}
body.admin-new-ui.light-mode :is(.opt-badge,.history-option-badge).opt-sra-plus {
  --admin-option-fg:#be123c;--admin-option-bg:#fff1f2;--admin-option-border:#be123c;
}
body.admin-new-ui.light-mode :is(.opt-badge,.history-option-badge).opt-bass-mirror {
  --admin-option-fg:#6d28d9;--admin-option-bg:#f5f3ff;--admin-option-border:#7c3aed;
}
/* Light cards already have a skill-colored border; remove the medal drop shadow. */
body.admin-new-ui.light-mode :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-bear-medal {
  filter:none;
}
/* Silver FC has white highlights that disappear against the pale cards.
   Restore a subtle neutral edge only for FC; gold EXC stays unchanged. */
body.admin-new-ui.light-mode :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-bear-medal.ar-fc {
  filter:drop-shadow(0 1px 1px rgba(30,41,59,.72));
}

/* The opaque padding-box protects the existing card fill. The second layer
   brightens only the transparent 2px border during the sparkle cycle; the
   third layer paints the skill gradient. All use native rounded backgrounds,
   avoiding the previous mask / border-image rasterization problems. */
@property --admin-border-pulse-alpha {
 syntax:"<number>";
 inherits:false;
 initial-value:0;
}
@keyframes admin-song-border-pulse {
 0%,100% { --admin-border-pulse-alpha:0; }
 50% { --admin-border-pulse-alpha:.56; }
}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-record.skill-row-sparkle-rainbow {
 animation:admin-song-border-pulse var(--skill-sparkle-cycle,1.6s) ease-in-out infinite;
}
/* Share the proven user-detail compositing treatment with the main app's
   scrolling content (skill targets, registered songs, user list, board, etc.).
   Only the active scroll bodies are promoted: headers, sidebar and each song
   card remain untouched, avoiding unnecessary per-card GPU layers. */
body.admin-new-ui.app-scroll-layout #appScreen:not(.hidden).ui-scroll-frame > .p-container.ui-scroll-body:not(.hidden),
body.admin-new-ui.app-scroll-layout #userDetailPage.user-detail-open.ui-scroll-frame > .user-detail-body.ui-scroll-body:not(.hidden) {
 transform:translateZ(0);
}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-metrics{display:contents}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-no{font-size:12px;color:#84b5d0;text-align:center;font-variant-numeric:tabular-nums}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-art{width:70px;height:70px;display:grid;place-items:center;background:#0b2d49;border-radius:5px;overflow:hidden}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-art img{width:100%;height:100%;display:block;object-fit:cover}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-jacket-missing{font-size:27px;color:#4c88ad}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-title{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;min-width:0;overflow:hidden}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-song-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;flex:0 1 auto;font-weight:800;line-height:1.3}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) :is(.ar-hot,.ar-pending){flex:none;font-size:10px;line-height:1.2;padding:2px 5px;border-radius:3px}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-pending{border:1px solid #b89138;background:#614f22;color:#ffe6a0}
/* Match the existing user-facing dark HOT badge rather than the pale generic .hot-tag. */
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-title .hot-tag.ar-hot{color:#fecaca!important;background:#450a0a!important;border:1px solid #991b1b!important}

body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) :is(.ar-part,.ar-option,.ar-fc-cell){display:flex;align-items:center;justify-content:center;min-width:0}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-part .p-badge{width:max-content!important;min-width:0!important;max-width:max-content!important;flex:none!important;white-space:nowrap!important}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) :is(.ar-hot,.ar-part .p-badge,.ar-option .opt-badge){font-size:10px!important;line-height:1!important;height:19px!important;min-height:19px!important;max-height:19px!important;box-sizing:border-box;border-radius:3px!important;display:inline-flex!important;align-items:center;justify-content:center;padding:0 6px!important;font-weight:900;vertical-align:middle}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) :is(.ar-level,.ar-rate){white-space:nowrap;font-variant-numeric:tabular-nums}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-level{text-align:center}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-rate{display:block;text-align:right;justify-self:stretch;}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) :is(.ar-level,.ar-rate) strong{font-size:inherit}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-mini-label{display:none}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-skill{position:relative;width:65px!important;min-width:65px!important;max-width:65px!important;box-sizing:border-box;overflow:hidden;text-align:center;justify-self:center;padding:5px 0!important;font-weight:850;border-radius:5px;font-variant-numeric:tabular-nums}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-skill>.dc-skill-value{position:relative;z-index:1}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-bear-medal{display:block;width:34px;height:34px;flex:none;filter:drop-shadow(0 1px 3px #0008)}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-edit{display:flex;justify-content:center}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-edit button{width:37px;height:37px;border:1px solid #23618a;background:#0b3357;border-radius:6px;color:white;font-size:22px;cursor:pointer}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .own-registered-records-more{grid-column:1/-1}
/* Same side-band animation as public .dc-card .dc-skill. */
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-skill.skill-box-sparkle-rainbow {
 animation:none!important;filter:none!important;
}
body.admin-new-ui :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-skill.skill-box-sparkle-rainbow::after {
 content:"";display:block;position:absolute;inset:0;pointer-events:none;z-index:2;
 background-image:var(--skill-side-paint),var(--skill-side-paint);
 background-position:left top,right top;background-size:5px 100%,5px 100%;
 background-repeat:no-repeat,no-repeat;
 animation:skill-sparkle-band-pulse var(--skill-sparkle-cycle,1.6s) ease-in-out infinite;
 animation-play-state:running!important;
}

/* Existing admin-only filter interaction; keep this separate from responsive layout. */
body #searchArea #btnAdminRecordFilters{display:none;}
body.admin-new-ui :is(#searchArea #btnAdminRecordFilters,#userListHeaderSlot #btnAdminUserFilters,.admin-filter-toggle-button) {
 border:1px solid #415671;background:#23344a;color:#eaf3ff;cursor:pointer;
}
body.admin-new-ui #searchArea #btnAdminRecordFilters{font-weight:800;}
body.admin-new-ui #searchArea{position:relative;z-index:15;}
body.admin-new-ui #searchArea .record-filter-row{display:none!important;}
/* Filter panels share their surface and positioning rules. Keep their
   different widths and grid columns in the individual definitions below. */
body.admin-new-ui #searchArea.admin-filters-expanded .record-filter-row,
body.admin-new-ui #userListHeaderSlot.admin-user-filters-expanded #userListSortControls {
 position:absolute;top:100%;padding:12px;gap:8px;
 border:1px solid #3c6385;border-radius:8px;
 background:#152438;box-shadow:0 8px 25px #0009;
}
body.admin-new-ui #searchArea.admin-filters-expanded .record-filter-row{
 display:grid!important;z-index:35;right:4px;width:min(590px,calc(100% - 8px));margin-top:2px;
 grid-template-columns:repeat(4,minmax(0,1fr))!important;box-sizing:border-box;
}
body.admin-new-ui #searchArea.admin-filters-expanded .record-filter-row label{min-width:0;}
body.admin-new-ui #searchArea.admin-filters-expanded .record-filter-row select{width:100%;min-width:0;}
body.admin-new-ui :is(#searchArea #btnAdminRecordFilters,#userListHeaderSlot #btnAdminUserFilters,.admin-filter-toggle-button) svg{width:21px;height:21px;display:block;}
@media(max-width:650px){body.admin-new-ui #searchArea.admin-filters-expanded .record-filter-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;}}
body.admin-new-ui :is(#searchArea.admin-filters-expanded #btnAdminRecordFilters,#userListHeaderSlot.admin-user-filters-expanded #btnAdminUserFilters,#songCatalogMask .admin-catalog-filter-toggle[aria-expanded="true"]){border-color:var(--app-accent);background:#254d86;}
body.admin-new-ui #searchArea .admin-bulk-delete-area{margin-top:0;}
body.admin-new-ui #btnHeaderAdd{white-space:nowrap;}


/* Admin user list: compact search with a registered-list-style filter popover. */
body.admin-new-ui #userListHeaderSlot .users-toolbar #userSearch {grid-column:1;}
body #userListHeaderSlot #btnAdminUserFilters {display:none;}
body.admin-new-ui #userListHeaderSlot #btnAdminUserFilters {grid-column:2;}
body.admin-new-ui #userListHeaderSlot #btnAdminUserFilters svg {width:21px;height:21px;}
/* Shared search-region geometry for the three admin tabs. Desktop sidebar
   offsets are owned by the >=1100px header rule, never reset here. */
body.admin-new-ui #appScreen>.p-header :is(#searchArea,#boardMainFixed.board-main-fixed,#userListHeaderSlot) {
  min-width:0;box-sizing:border-box;
  padding:6px 8px 8px!important;
  border:0!important;
  /* Match the workspace: transparent here exposes the tinted sticky header. */
  background:var(--admin-work-surface,#081327)!important;
  background-image:none!important;
}
@media (width < 1100px) {
  body.admin-new-ui #appScreen>.p-header :is(#searchArea,#boardMainFixed.board-main-fixed) {
    margin:0!important;
  }
}
body.admin-new-ui #appScreen>.p-header>#boardMainFixed.board-main-fixed {
  --admin-board-notice-left:0px;--admin-board-notice-right:0px;
}
/* These three fixed search/filter areas are content, not separate tinted panels. */
body.admin-new-ui #appScreen>.p-header :is(#searchArea,#userListHeaderSlot,#boardMainFixed.board-main-fixed),
body.admin-new-ui #userListHeaderSlot .user-list-sticky,
body.admin-new-ui #boardMainFixed .board-main-toolbar {
  background:var(--admin-work-surface,#081327)!important;
  background-image:none!important;box-shadow:none!important;
}
body.admin-new-ui #userListHeaderSlot {position:relative;flex:0 0 auto;}
body.admin-new-ui.app-scroll-layout #userListHeaderSlot:not(.hidden) {display:block;}
body.admin-new-ui #userListHeaderSlot .user-list-sticky {
  position:relative;top:auto;overflow:visible;
  padding:0;margin:0;background:transparent;
}
body.admin-new-ui #userListHeaderSlot #userListSortControls {display:none;}
body.admin-new-ui #userListHeaderSlot.admin-user-filters-expanded #userListSortControls {
  display:grid;right:0;z-index:55;
  width:min(410px,100%);grid-template-columns:repeat(2,minmax(0,1fr));margin:0;
}
body.admin-new-ui #userListHeaderSlot #userListSortControls .user-list-sort-field {
  display:flex;flex-direction:column;gap:5px;width:auto;min-width:0;
}
body.admin-new-ui #userListHeaderSlot #userListSortControls select {
  width:100%;max-width:100%;min-width:0;min-height:39px;
  border:1px solid #415671;border-radius:6px;background:#111827;color:#eaf3ff;
  padding:0 8px;font:inherit;font-size:13px;font-weight:800;
}
body.admin-new-ui #userListHeaderSlot #userListSortControls .user-list-sort-field>span {
  color:#cce4f5;font-size:12px;font-weight:800;
}
/* Light filters share the workspace surface; no grey fill behind the two fields. */
body.admin-new-ui.light-mode #userListHeaderSlot #userListSortControls {
  background:#f8fafc!important;background-image:none!important;
  border-color:#a6bad0!important;
}
body.admin-new-ui.light-mode #userListHeaderSlot #userListSortControls .user-list-sort-field {
  background:transparent!important;background-image:none!important;
}
body.admin-new-ui.light-mode #userListHeaderSlot #userListSortControls .user-list-sort-field>span {
  color:#344c67!important;-webkit-text-fill-color:#344c67!important;
}
body.admin-new-ui.light-mode #userListHeaderSlot #userListSortControls select {
  background:#fff!important;color:#17243a!important;-webkit-text-fill-color:#17243a!important;
  border-color:#9db0c5!important;
}
/* Unified compact toolbar in all three admin tabs. Source of truth for the look. */
body.admin-new-ui #searchArea .record-search-row,
body.admin-new-ui #userListHeaderSlot .users-toolbar,
body.admin-new-ui #boardMainFixed .board-main-toolbar {
  display:grid;align-items:stretch;gap:7px;
  width:100%;max-width:100%;min-width:0;margin:0;box-sizing:border-box;
  padding:0;background:transparent;border:0;box-shadow:none;
}
body.admin-new-ui #searchArea .record-search-row {grid-template-columns:minmax(0,1fr) 42px 42px;}
body.admin-new-ui #userListHeaderSlot .users-toolbar,
body.admin-new-ui #boardMainFixed .board-main-toolbar {grid-template-columns:minmax(0,1fr) 42px;}
body.admin-new-ui #searchArea #domSearch,
body.admin-new-ui #userListHeaderSlot #userSearch,
body.admin-new-ui #boardMainFixed #boardThreadSearch {
  display:block;appearance:none;-webkit-appearance:none;
  width:100%;max-width:100%;min-width:0;height:42px;min-height:42px;max-height:42px;
  padding:0 12px;margin:0;box-sizing:border-box;
  border:1px solid #415671;border-radius:6px;outline:none;
  background:#202b3a;color:#eaf3ff;-webkit-text-fill-color:#eaf3ff;
  font-family:inherit;font-size:14px;font-weight:400;line-height:normal;
  letter-spacing:normal;box-shadow:none;
}
body.admin-new-ui :is(#domSearch,#userSearch,#boardThreadSearch)::placeholder {
  color:#8194ac;-webkit-text-fill-color:#8194ac;opacity:1;
}
body.admin-new-ui #searchArea #btnHeaderAdd,
body.admin-new-ui #searchArea #btnAdminRecordFilters,
body.admin-new-ui #userListHeaderSlot #btnAdminUserFilters,
body.admin-new-ui #boardMainFixed #btnBoardNewThread,
body.admin-new-ui .admin-filter-toggle-button {
  display:inline-flex;align-items:center;justify-content:center;
  grid-column:auto;width:42px;min-width:42px;max-width:42px;
  height:42px;min-height:42px;max-height:42px;flex:0 0 42px;
  padding:0;margin:0;box-sizing:border-box;border-radius:6px;
  border:1px solid #415671;font-family:inherit;font-size:21px;font-weight:800;line-height:1;
}
body.admin-new-ui #boardMainFixed #btnBoardNewThread,
body.admin-new-ui #searchArea #btnHeaderAdd {
  background:var(--app-accent);border-color:var(--app-accent);color:white;-webkit-text-fill-color:white;
}
body.admin-new-ui #boardMainFixed #btnBoardNewThread {white-space:nowrap;}
/* Board toolbar uses shared search geometry; retain its bottom spacing. */
body.admin-new-ui #boardMainFixed .board-main-toolbar {margin-bottom:8px;}
/* Align thread cards with the shared search row: the enclosing .p-container
   already contributes 6px of inline padding, so the board view supplies only
   the remaining 2px (8px total). Keep public UI rules untouched. */
@media (width < 1100px) {
  body.admin-new-ui #appScreen>.p-container>#viewBoard.board-main-view {
    padding-left:2px;
    padding-right:2px;
  }
}
/* Only the notice tracks the thread cards' actual horizontal extent. */
body.admin-new-ui #boardMainFixed .board-main-rule-note {
  display:block;clear:both;box-sizing:border-box;min-width:0;
  width:auto;max-width:none;
  margin:0 var(--admin-board-notice-right,0px) 0 var(--admin-board-notice-left,0px);
}

/* Viewed profiles are read-only. They inherit exactly the same card rules. */
/* The public two-column rule targets all children of the registered list.
   Our own nested HOT/OTHER wrapper must occupy its full width instead. */
body.admin-new-ui.skill-target-columns #userDetailRecords .list-container {
  display:block!important;grid-template-columns:none!important;
}

/* Admin skill-target screen reuses the exact registered card UI. */
body.admin-new-ui :is(#viewSkill,#userDetailSkill,#userDetailRecords) .ar-table-head{display:none!important}
body.admin-new-ui :is(#viewSkill,#userDetailSkill) .sk-section{min-width:0}
body.admin-new-ui :is(#viewSkill,#userDetailSkill) .list-container{display:block;min-width:0}
body.admin-new-ui :is(#viewSkill,#userDetailSkill) .ar-record-grid{grid-template-columns:minmax(0,1fr)!important}

/* Shared visibility. The sidebar is available only in the desktop range. */
.admin-desktop-menu-tree{display:none;}
body.admin-new-ui #appScreen>.p-header{position:sticky;top:0;z-index:100;}
/* OFF-mode constants shared by compact and desktop card grids. */
body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-edit button{font-size:19px;}
body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) :is(.ar-edit,.ar-skill){align-self:center;}
body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-fc-cell{justify-self:center;}

/* Admin OFF mode: a single compact registered-card layout through 1099px.
   The 400px logical width is handled in JS for narrower viewports.
   Keep ON-mode CSS below this block unchanged. */
@media (width < 1100px) {
 body.admin-new-ui #appRoot,body.admin-new-ui #appScreen:not(.hidden){width:100%;max-width:none;min-width:0;box-sizing:border-box;}
 body.admin-new-ui #appScreen>.p-header,body.admin-new-ui #appScreen>.p-container{width:100%;max-width:none;min-width:0;box-sizing:border-box;margin-left:0;}
 body.admin-new-ui #appScreen>.p-header>.admin-desktop-menu-tree{display:none;}
 body.admin-new-ui:not(.skill-target-columns) #viewAllManage .ar-table-head{display:none;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-record{
   grid-template-columns:40px minmax(0,1fr) 67px 32px;
   grid-template-rows:20px 20px;gap:3px 2px;padding:4px;min-height:53px;
 }
 /* In compact OFF rows, remove the empty fourth (edit) track for viewed users. */
 body.admin-new-ui:not(.skill-target-columns) :is(#userDetailSkill,#userDetailRecords) .ar-record.ar-readonly {
   grid-template-columns:40px minmax(0,1fr) 67px;
 }
 body.admin-new-ui:not(.skill-target-columns) :is(#userDetailSkill,#userDetailRecords) .ar-record.ar-readonly .ar-skill {
   justify-self:end;
 }
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-no{display:none;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-art{
   grid-column:1;grid-row:1/3;width:37px;height:37px;align-self:center;
 }
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-title{grid-column:2;grid-row:1;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-song-name{font-size:12px;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-metrics{
   grid-column:2;grid-row:2;display:grid;
   grid-template-columns:48px 28px 48px 24px 49px;gap:2px;align-items:center;min-width:0;
 }
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-part{grid-column:1;justify-content:start;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-level{grid-column:2;text-align:left;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-rate{grid-column:3;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-fc-cell{grid-column:4;min-height:22px;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-option{grid-column:5;justify-content:start;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-bear-medal{width:19px;height:19px;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-skill{grid-column:3;grid-row:1/3;font-size:12px;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-edit{grid-column:4;grid-row:1/3;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-edit button{width:30px;height:30px;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-level strong,
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-rate strong{font-size:10px;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-option .opt-badge,
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-part .p-badge{
   padding:0 3px!important;
 }

}
/* Compact (non-desktop) header uses one shared rule below 1100px.
   The ON/OFF card layouts are still controlled solely by 700px and 1100px. */
@media (width < 1100px) {
 body.admin-new-ui #appScreen:not(.hidden){grid-template-columns:minmax(0,1fr);}
 body.admin-new-ui #appScreen>.p-header>.user-header-row{position:relative;width:100%;left:auto;top:auto;}
 body.admin-new-ui #appScreen>.p-header>.score-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));}
 body.admin-new-ui #appScreen>.p-header>.p-tabs{display:flex;flex-direction:row;width:100%;}
 body.admin-new-ui #appScreen>.p-header #btnMenu{display:flex;}
}

/* Admin HOT/OTHER two-column wrapper and section headers. */
body.admin-new-ui.skill-target-columns #viewSkill:not(.hidden),
body.admin-new-ui.skill-target-columns #userDetailSkill:not(.hidden),
body.admin-new-ui.skill-target-columns :is(#viewAllManage,#userDetailRecords) .admin-records-two-column {
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:8px!important;
 width:100%;max-width:none;min-width:0;align-items:start;box-sizing:border-box;
}
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) :is(
 .sk-section,.admin-records-pane,.list-container,.ar-register-view,.ar-record-grid
) {
 width:100%;max-width:none;min-width:0;box-sizing:border-box;
}
body.admin-new-ui :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) :is(.skill-hot-section,.admin-records-pane.hot)>h2,
body.admin-new-ui :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) :is(.skill-other-section,.admin-records-pane.other)>h2 {
 box-sizing:border-box;width:100%;margin:0 0 6px;padding:7px 9px;
 border-radius:6px;font-size:12px;font-weight:850;line-height:1.3;
 border:1px solid transparent;border-left-width:3px;
}
body.admin-new-ui :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) :is(.skill-hot-section,.admin-records-pane.hot)>h2 {
 color:#fecaca;background:#450a0a;border-color:#991b1b;
}
body.admin-new-ui :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) :is(.skill-other-section,.admin-records-pane.other)>h2 {
 color:#b6ebf5;background:#173447;border-color:#367e9d;
}
/* Ranking switch uses the same semantic HOT / OTHER surfaces as the
   skill-target headings, rather than the former pink and green fills. */
body.admin-new-ui .skill-ranking-tab.active[data-ranking-category="HOT"] {
  background:#450a0a;color:#fecaca;border:1px solid #991b1b;
}
body.admin-new-ui .skill-ranking-tab.active[data-ranking-category="OTHER"] {
  background:#173447;color:#b6ebf5;border:1px solid #367e9d;
}
body.admin-new-ui.light-mode .skill-ranking-tab.active[data-ranking-category="HOT"] {
  background:#fff;color:#7f1d1d;border-color:#b91c1c;
}
body.admin-new-ui.light-mode .skill-ranking-tab.active[data-ranking-category="OTHER"] {
  background:#fff;color:#15556d;border-color:#257a9e;
}
/* Light-theme section headings stay legible on the light page background. */
body.admin-new-ui.light-mode :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) :is(.skill-hot-section,.admin-records-pane.hot)>h2 {
 color:#7f1d1d;background:#ffffff;border-color:#b91c1c;
}
body.admin-new-ui.light-mode :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) :is(.skill-other-section,.admin-records-pane.other)>h2 {
 color:#15556d;background:#ffffff;border-color:#257a9e;
}

/* ON card layout: base shared by all widths. The 700px breakpoint changes
   only the compact card arrangement, not the HTML structure. OFF styles and
   the public UI remain untouched. */
body.admin-new-ui.skill-target-columns #viewAllManage .ar-table-head,
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-no,
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-title .ar-hot,
body.admin-new-ui :is(#viewSkill,#userDetailSkill) .ar-title .ar-hot,
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-mini-label {display:none!important;}
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-record {
 min-width:0;width:100%;overflow:hidden;
}
/* Jacket placement and title width are identical on both sides of 700px. */
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-art {
 grid-column:1;grid-row:1/3;
}
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-title {
 display:block;width:100%;max-width:100%;white-space:nowrap;margin:0;
 text-overflow:ellipsis;
}
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-song-name {
 display:block;max-width:100%;
 overflow-wrap:normal;
}
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-rate strong {
 display:block;width:100%;
}
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-edit button {
 display:grid;place-items:center;box-sizing:border-box;padding:0;line-height:1;
}
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-fc-cell {min-height:0;}
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-option {justify-content:start;}
/* Shared compact/desktop ON-card alignment; breakpoint rules only position the cells. */
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-metrics {width:100%;align-items:center;}
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-edit {justify-self:end;align-self:center;}
/* Width and placement change at 700px; these skill-box constraints do not. */
body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-skill {
 position:absolute;display:flex;align-items:center;justify-content:center;
 padding:0!important;line-height:19px;white-space:nowrap;
 min-width:0!important;
 height:19px!important;min-height:19px!important;max-height:19px!important;
}

/* Compact admin ON cards below 700px. This grid matches the flat card
   markup; do not reintroduce the retired nested metric wrappers. */
@media (width < 700px) {
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-record {
   grid-template-columns:40px minmax(0,1fr) 20px;
   grid-template-rows:20px 20px 20px;
   column-gap:2px;row-gap:2px;min-height:76px;padding:4px;
   -webkit-text-size-adjust:100%;text-size-adjust:100%;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-art {
   width:38px;height:38px;align-self:start;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-metrics {
   grid-column:2/4;grid-row:1/3;display:grid;
   grid-template-columns:41px 32px minmax(0,1fr);
   grid-template-rows:20px 20px;column-gap:3px;row-gap:2px;justify-content:start;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-part {
   position:static;grid-column:1;grid-row:1;justify-content:center;
   justify-self:stretch;min-width:41px;max-width:41px;margin:0;padding:0;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-record .ar-fc-cell {
   /* Match the edit button's right edge and 25px alignment box. */
   position:absolute;top:26px;right:4px;width:25px;height:16px;
   display:flex;align-items:center;justify-content:center;
   padding:0;margin:0;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-bear-medal {width:16px;height:16px;}
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-skill {
   /* Restore the pre-4.40.79 vertical position on narrow ON cards. */
   top:5px;right:4px;
   width:51px!important;max-width:51px!important;
   border-radius:3px;font-size:10px;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-skill .dc-skill-value {
   display:flex;align-items:center;justify-content:center;height:100%;min-width:0;font-size:inherit;line-height:1;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-level {
   position:static;grid-column:1;grid-row:2;justify-self:stretch;
   width:100%;margin:0;text-align:center;font-size:10px;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-rate {
   grid-column:2;grid-row:2;
   min-width:0;padding:0;box-sizing:border-box;
   font-size:10px;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-option {
   position:static;
   grid-column:2;grid-row:1;
   width:32px;min-width:32px;max-width:32px;overflow:hidden;
   margin:0;padding:0;justify-self:start;justify-content:flex-start;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-option .opt-badge {
   width:32px!important;min-width:32px!important;max-width:32px!important;
   margin:0!important;font-size:9px!important;padding:0 1px!important;
   overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-part .p-badge {
   width:41px!important;min-width:41px!important;max-width:41px!important;
   margin:0!important;font-size:9px!important;padding:0 1px!important;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-title {
   grid-column:1/3;grid-row:3;padding:0;line-height:19px;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-song-name {font-size:11px;line-height:19px;}
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage) .ar-record:not(.ar-readonly) .ar-edit {
   position:absolute;bottom:2px;right:4px;width:25px;height:25px;
   display:flex;align-items:center;justify-content:center;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage) .ar-record:not(.ar-readonly) .ar-edit button {
   width:25px;height:25px;font-size:16px;border-radius:5px;
 }

}

/* From 700 CSS px: same two-line desktop/tablet card with a stable
   single-row flex group for part, level, rate, FC and option. */
@media (width >= 700px) {
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-record {
   grid-template-columns:48px minmax(0,1fr) 28px;
   grid-template-rows:24px 24px;column-gap:4px;row-gap:2px;
   min-height:60px;padding:4px 5px;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-art {
   width:45px;height:45px;align-self:center;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-title {
   grid-column:2/4;grid-row:1;padding:0 83px 0 0;
   box-sizing:border-box;align-self:center;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-song-name {
   font-size:12px;line-height:22px;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-metrics {
   grid-column:2;grid-row:2;display:flex;
   justify-content:flex-start;gap:5px;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-part {
   order:1;flex:0 0 auto;justify-content:start;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-level {
   order:2;flex:0 0 auto;text-align:left;font-size:11px;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-rate {
   order:3;flex:0 0 55px;min-width:55px;justify-self:auto;
   box-sizing:border-box;font-size:11px;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-fc-cell {
   order:4;flex:0 0 20px;justify-content:center;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-bear-medal {width:18px;height:18px;}
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-option {
   order:5;flex:0 0 auto;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage) .ar-option .opt-badge {
   display:inline-flex;align-items:center;justify-content:center;
   box-sizing:border-box;height:19px;line-height:1;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-skill {
   top:7px;right:6px;
   width:72px!important;max-width:72px!important;
   font-size:12px;
 }
 /* Desktop FC belongs to the metrics row, between the rate and option.
    Only the edit action occupies the far-right column. */
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage) .ar-record:not(.ar-readonly) .ar-fc-cell {
   position:static;top:auto;right:auto;width:20px;height:auto;
   display:flex;align-items:center;justify-content:center;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage) .ar-record:not(.ar-readonly) .ar-edit {
   position:absolute;bottom:6px;right:4px;width:26px;height:24px;
   display:flex;align-items:center;justify-content:center;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage) .ar-record:not(.ar-readonly) .ar-edit button {
   width:24px;height:24px;font-size:15px;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage) .ar-record:not(.ar-readonly) .ar-skill {
   justify-self:end;
 }
 body.admin-new-ui.skill-target-columns :is(#viewSkill,#viewAllManage,#userDetailSkill,#userDetailRecords) .ar-record .ar-title {
   padding-right:116px;
 }

 /* Read-only cards inherit the common columns and title placement above.
    Only the edit action itself is absent from their markup. */
}
 /* Shared workspace header is generated once for every admin menu.
    No per-screen header geometry, title font or back-button rules. */
 body.admin-new-ui .admin-workspace-header {
   display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;
   gap:12px;min-width:0;margin:0 0 16px;padding:0 0 12px;
   background:transparent;border:0;border-bottom:1px solid #30445c;
   box-sizing:border-box;
 }
 body.admin-new-ui .admin-workspace-title {display:flex;flex-direction:column;min-width:0;gap:4px;}
 body.admin-new-ui .admin-workspace-title > :is(h1,h2,h3,strong) {
   display:block;margin:0;padding:0;color:#f8fafc;
   font-size:19px!important;font-weight:900;line-height:1.4;overflow-wrap:anywhere;
 }
 body.admin-new-ui .admin-workspace-title > :not(h1,h2,h3,strong) {
   margin:0;color:#9fb5ca;font-size:12px;font-weight:700;line-height:1.4;
 }
 body.admin-new-ui .admin-workspace-actions {
   display:flex;flex:0 0 auto;align-items:center;justify-content:flex-end;gap:7px;
 }
 body.admin-new-ui .admin-workspace-actions > :is(button,.menu-context-help) {
   display:inline-flex!important;align-items:center!important;justify-content:center!important;
   flex:none!important;box-sizing:border-box!important;
   width:auto!important;min-width:52px!important;height:36px!important;
   min-height:36px!important;max-height:36px!important;
   margin:0!important;padding:0 11px!important;
   border:1px solid #64748b!important;border-radius:7px!important;
   background:#111827!important;color:#e2e8f0!important;
   -webkit-text-fill-color:#e2e8f0!important;
   font-family:inherit!important;font-size:12px!important;
   font-weight:900!important;line-height:1!important;
   white-space:nowrap!important;box-shadow:none!important;
   text-align:center!important;cursor:pointer;
 }
 body.admin-new-ui.light-mode .admin-workspace-header {border-bottom-color:#cbd5e1;}
 body.admin-new-ui.light-mode .admin-workspace-title > :is(h1,h2,h3,strong) {color:#17243a;}
 body.admin-new-ui.light-mode .admin-workspace-title > :not(h1,h2,h3,strong) {color:#526579;}
 body.admin-new-ui.light-mode .admin-workspace-actions > :is(button,.menu-context-help) {
   background:#f8fafc!important;color:#1e293b!important;
   -webkit-text-fill-color:#1e293b!important;border-color:#94a3b8!important;
 }

/* Admin menu presentation shared across desktop workspace pages and compact
   modal sheets. Placement and dimensions are intentionally NOT shared. */
 body.admin-new-ui .menu-screen-dialog {
   display:flex;flex-direction:column;min-width:0;
   border:1px solid #30445c;background:#081327;
 }
 /* All administrator MENU destinations follow the same compact geometry as
    the MENU list itself. Keep desktop work-area pages and unrelated dialogs untouched. */
  @media (width < 1100px) {
    /* Mobile/tablet administrator MENU: readable entries without changing geometry. */
    body.admin-new-ui #menuMask .app-menu-item {
      font-size:16px;
      line-height:1.4;
    }
    body.admin-new-ui #menuMask .app-menu-group-label {
      font-size:12px;
    }
    body.admin-new-ui :is(
      #menuMask,#mypageModal,#featureSettingsMask,#tagSettingsMask,
      #skillSyncMask,#allScoreSyncMask,#skillShareMask,#skillHistoryMask,
      #skillRankingMask,#officialSkillRankingMask,#rivalManageMask,
      #songCatalogMask,#howToMask,#feedbackMask,#supportMask,#accountSwitchMask,
      #rateCompareMask,#domModal
    ) {
      box-sizing:border-box;
      background:rgba(2,6,23,.72)!important;
      -webkit-backdrop-filter:blur(2px)!important;
      backdrop-filter:blur(2px)!important;
      padding:16px!important;
      align-items:center!important;
      justify-content:center!important;
    }
    body.admin-new-ui.light-mode :is(
      #menuMask,#mypageModal,#featureSettingsMask,#tagSettingsMask,
      #skillSyncMask,#allScoreSyncMask,#skillShareMask,#skillHistoryMask,
      #skillRankingMask,#officialSkillRankingMask,#rivalManageMask,
      #songCatalogMask,#howToMask,#feedbackMask,#supportMask,#accountSwitchMask,
      #rateCompareMask,#domModal
    ) {background:rgba(15,23,42,.25)!important;}
    body.admin-new-ui :is(
      #menuMask > .app-menu-sheet,
      #mypageModal > .mypage-sheet,
      #featureSettingsMask > .menu-screen-dialog,
      #tagSettingsMask > .menu-screen-dialog,
      #skillSyncMask > .menu-screen-dialog,
      #allScoreSyncMask > .menu-screen-dialog,
      #skillShareMask > .menu-screen-dialog,
      #skillHistoryMask > .menu-screen-dialog,
      #skillRankingMask > .menu-screen-dialog,
      #officialSkillRankingMask > .menu-screen-dialog,
      #rivalManageMask > .menu-screen-dialog,
      #songCatalogMask > .menu-screen-dialog,
      #howToMask > .menu-screen-dialog,
      #feedbackMask > .menu-screen-dialog,
      #supportMask > .menu-screen-dialog,
      #accountSwitchMask > .menu-screen-dialog
    ) {
      position:relative!important;
      flex-shrink:1;
      width:100%!important;
      max-width:520px!important;
      max-height:calc(100dvh - 32px)!important;
      margin:0 auto!important;
      padding:16px!important;
      border-radius:14px!important;
      box-sizing:border-box!important;
    }
  }
  @media (max-width:600px) {
    body.admin-new-ui :is(
      #menuMask,#mypageModal,#featureSettingsMask,#tagSettingsMask,
      #skillSyncMask,#allScoreSyncMask,#skillShareMask,#skillHistoryMask,
      #skillRankingMask,#officialSkillRankingMask,#rivalManageMask,
      #songCatalogMask,#howToMask,#feedbackMask,#supportMask,#accountSwitchMask,
      #rateCompareMask,#domModal
    ) {padding:12px!important;}
    body.admin-new-ui :is(
      #menuMask > .app-menu-sheet,
      #mypageModal > .mypage-sheet,
      #featureSettingsMask > .menu-screen-dialog,
      #tagSettingsMask > .menu-screen-dialog,
      #skillSyncMask > .menu-screen-dialog,
      #allScoreSyncMask > .menu-screen-dialog,
      #skillShareMask > .menu-screen-dialog,
      #skillHistoryMask > .menu-screen-dialog,
      #skillRankingMask > .menu-screen-dialog,
      #officialSkillRankingMask > .menu-screen-dialog,
      #rivalManageMask > .menu-screen-dialog,
      #songCatalogMask > .menu-screen-dialog,
      #howToMask > .menu-screen-dialog,
      #feedbackMask > .menu-screen-dialog,
      #supportMask > .menu-screen-dialog,
      #accountSwitchMask > .menu-screen-dialog
    ) {
      max-width:460px!important;
      max-height:calc(100dvh - 24px)!important;
    }
  }
 /* Full content dialogs use the same MENU mask paint above; only the sheet
    geometry remains separate. Alert and delete-confirmation masks are unchanged. */
 @media (width < 1100px) {
   body.admin-new-ui #rateCompareMask > .rate-compare-dialog,
   body.admin-new-ui #domModal > .mdl-sheet {
     width:100%!important;max-width:520px!important;
     box-sizing:border-box!important;margin:0 auto!important;
     border-radius:14px!important;
     max-height:calc(100dvh - 32px)!important;
   }
 }
 @media (max-width:600px) {
   body.admin-new-ui #rateCompareMask > .rate-compare-dialog,
   body.admin-new-ui #domModal > .mdl-sheet {
     max-width:460px!important;max-height:calc(100dvh - 24px)!important;
   }
 }
 @media (min-width:1100px) {
   body.admin-new-ui #rateCompareMask > .rate-compare-dialog,
   body.admin-new-ui #domModal > .mdl-sheet {
     width:100%!important;max-width:520px!important;box-sizing:border-box!important;
   }
 }
 /* Administrator menu text hierarchy: heading > subheading > explanation.
    Do not change dense song-card numerics, badges or public UI. */
 /* Menu form hierarchy: primary page title > field headings > help text.
    app.css and the legacy inline label style must not shrink admin labels. */
 body.admin-new-ui :is(
   #featureSettingsMask .feature-setting-row strong,
   #mypageModal .mypage-sheet label,
   #tagSettingsMask .tag-settings-body label,
   #feedbackMask .feedback-body label
 ) {font-size:16px!important;line-height:1.4;}
 body.admin-new-ui :is(
   #featureSettingsMask .feature-setting-row small,
   #mypageModal .section-note,
   #tagSettingsMask .tag-settings-body > p,
   #feedbackMask .feedback-env-note
 ) {font-size:14px;line-height:1.5;}
 /* The help screen uses the same readable body typography as other admin
    menu descriptions; the old 11px rule was defined in common app.css. */
 body.admin-new-ui #howToMask .howto-body :is(p,li) {
   font-size:14px!important;
   line-height:1.65;
 }
 body.admin-new-ui #howToMask .howto-body section b {font-size:15px;}
 body.admin-new-ui #howToMask .howto-index > strong {font-size:14px;}
 body.admin-new-ui #howToMask .howto-index-links a {font-size:13px;line-height:1.45;}
 /* Shared menu content uses a single panel padding and aligned header. */
 body.admin-new-ui .admin-workspace-panel {padding:16px!important;}
 body.admin-new-ui .admin-workspace-panel > .tag-settings-body {padding:0;overflow:visible;}
 /* Admin menu action buttons have a content-sized width and align right.
    Tabs/segmented selectors, expandable song rows, card editing buttons and
    filter controls deliberately retain their own widths. */
 body.admin-new-ui .admin-workspace-panel :is(
   #btnSaveFeatureSettings,#btnSaveTagSettings,#btnSubmitFeedback,
   #btnExecuteSkillShare,#btnCopyOfficialRankingScript,
   #btnAddTagSetting,#btnAddSwitchAccount,#btnMypageUserSwitch,
   #btnLogout,#btnDeleteAccount,#btnLoadMoreSkillHistory,
   #btnLoadSkillRanking,#btnShowSongCatalog,#btnSaveSongCatalogFavoriteName,
   #btnShareSkillHistory,#btnCopySkillSync,#btnCopyAllScoreSync,
   #btnOpenEamusement,#btnOpenAllScoreSyncEamusement,
   .support-ofuse-button,.official-ranking-import .btn-submit
 ) {
   display:table;box-sizing:border-box;width:max-content!important;
   max-width:100%!important;min-width:0;flex:0 0 auto!important;
   margin-left:auto;padding-left:18px;padding-right:18px;
 }
 /* Links use flex for centered text; action containers are independent of inputs. */
 body.admin-new-ui .admin-workspace-panel .support-ofuse-button {
   display:inline-flex!important;align-items:center;justify-content:center;
   box-sizing:border-box!important;height:36px!important;
   min-height:36px!important;max-height:36px!important;
   line-height:1!important;padding:0 14px!important;
   align-self:flex-end;margin-top:4px!important;
 }
 /* The preview action sits directly on the workspace surface, without a tinted strip. */
 body.admin-new-ui #skillHistoryMask .skill-history-preview-actions {
   display:flex;justify-content:flex-end;align-items:center;
   background:transparent!important;background-image:none!important;
   border:0;box-shadow:none;
   padding:0 0 8px;
 }
 body.admin-new-ui #skillHistoryMask #btnShareSkillHistory {
   display:inline-flex!important;align-items:center;justify-content:center;
   width:max-content!important;max-width:100%;height:36px!important;
   min-height:36px!important;max-height:36px!important;
   padding:0 14px!important;line-height:1!important;
   box-sizing:border-box;margin-left:auto!important;
 }
 /* The two ranking filter toolbars use the normal workspace surface. */
 body.admin-new-ui #skillRankingMask .skill-ranking-head {
   background:transparent!important;background-image:none!important;
 }
 body.admin-new-ui #skillRankingMask .skill-ranking-fixed-controls,
 body.admin-new-ui #officialSkillRankingMask .official-ranking-fixed-controls {
   background:transparent!important;background-image:none!important;
   box-shadow:none;
 }
 /* Shared share/save control layout: two explicit steps rather than
    separate flex groups that wrap unpredictably on compact screens. */
 body.admin-new-ui #skillHistoryUnifiedControls {
   display:grid;grid-template-columns:minmax(0,1fr);gap:10px;
   width:100%;max-width:640px;margin:0 auto 10px;
 }
 body.admin-new-ui #skillHistoryUnifiedControls .skill-history-control-row {
   display:grid;grid-template-columns:76px minmax(0,1fr);
   gap:12px;align-items:center;min-width:0;
   padding:10px 12px;border:1px solid #30445c;
   border-radius:10px;background:rgba(148,163,184,.045);
 }
 body.admin-new-ui #skillHistoryUnifiedControls .skill-history-control-label {
   color:#a8bdd4;font-size:12px;font-weight:900;white-space:nowrap;
 }
 body.admin-new-ui #skillHistoryUnifiedControls :is(.skill-history-unified-select,.skill-history-unified-actions) {
   display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
   gap:8px;width:100%;min-width:0;margin:0;
 }
 body.admin-new-ui #skillHistoryUnifiedControls :is(.skill-history-save-option,.skill-history-unified-action) {
   box-sizing:border-box;width:100%;min-width:0;max-width:none;
   height:36px;min-height:36px;max-height:36px;margin:0;padding:0 6px;
   font-size:12px;line-height:1.2;white-space:nowrap;
 }
 body.admin-new-ui.light-mode #skillHistoryUnifiedControls .skill-history-control-row {
   background:rgba(100,116,139,.045);border-color:#cbd5e1;
 }
 body.admin-new-ui.light-mode #skillHistoryUnifiedControls .skill-history-control-label {color:#475569;}
 /* Muted, readable light-theme actions; retain the three distinct meanings. */
 body.admin-new-ui.light-mode #skillHistoryUnifiedControls .skill-history-unified-actions > :nth-child(1) {
   background:#e4def7!important;border-color:#a99ad8!important;
   color:#4c357b!important;-webkit-text-fill-color:#4c357b!important;
 }
 body.admin-new-ui.light-mode #skillHistoryUnifiedControls .skill-history-unified-actions > :nth-child(2) {
   background:#f3e3d1!important;border-color:#d8ac78!important;
   color:#794717!important;-webkit-text-fill-color:#794717!important;
 }
 body.admin-new-ui.light-mode #skillHistoryUnifiedControls .skill-history-unified-actions > :nth-child(3) {
   background:#d7ede5!important;border-color:#91bda9!important;
   color:#155a46!important;-webkit-text-fill-color:#155a46!important;
 }
 @media (max-width:470px) {
   body.admin-new-ui #skillHistoryUnifiedControls .skill-history-control-row {
     grid-template-columns:minmax(0,1fr);gap:8px;
   }
   body.admin-new-ui #skillHistoryUnifiedControls :is(.skill-history-unified-select,.skill-history-unified-actions) {gap:6px;}
   body.admin-new-ui #skillHistoryUnifiedControls :is(.skill-history-save-option,.skill-history-unified-action) {
     font-size:11px;padding-inline:2px;
   }
 }
 body.admin-new-ui .admin-workspace-panel #btnLoadSkillRanking {
   width:auto!important;padding:0 12px;
   white-space:nowrap;text-align:center;
 }
 /* Administrator-only primary controls. Never change shared/public CSS.
    Existing input geometry stays unchanged; only action buttons get compact widths. */
 body.admin-new-ui :is(
   #btnChangeUsername,#btnChangePassword,#btnSaveXId,
   #btnSaveFeatureSettings,#btnSaveTagSettings,#btnSubmitFeedback,
   #btnAddSwitchAccount,#btnOpenLevelCorrection,
   #btnShowSongCatalog,#btnCopyOfficialRankingScript,
   #btnCopySkillSync,#btnCopyAllScoreSync,#btnOpenEamusement,
   .support-ofuse-button
 ) {
   background:var(--app-accent)!important;
   border-color:var(--app-accent)!important;
   color:#fff!important;-webkit-text-fill-color:#fff!important;
 }
 body.admin-new-ui :is(#btnSaveFeatureSettings,#btnSaveTagSettings,
   #btnSubmitFeedback,#btnCopyOfficialRankingScript,
   .support-ofuse-button) {
   width:max-content!important;min-width:0!important;
   max-width:100%!important;min-height:36px;
   padding:8px 14px!important;margin-left:auto!important;
 }
 body.admin-new-ui :is(.p-tab-btn.active,.p-tab-btn[aria-selected="true"]) {
   background:var(--app-accent)!important;
   border-color:var(--app-accent)!important;
   color:#fff!important;-webkit-text-fill-color:#fff!important;
 }
 body.admin-new-ui #btnMypageUserSwitch {
   background:#0e7490!important;border-color:#155e75!important;
   color:#fff!important;-webkit-text-fill-color:#fff!important;
 }
 /* Tag actions: explicit rows prevent status, add, and save from sharing an
    implicit grid cell. Gap is retained on narrow modal widths. */
 body.admin-new-ui .admin-workspace-panel > .tag-settings-body {
   display:grid;grid-template-columns:minmax(0,1fr) auto auto;
   column-gap:10px;row-gap:12px;align-items:center;
 }
 body.admin-new-ui .admin-workspace-panel .tag-settings-body > p {
   grid-column:1/-1;grid-row:1;margin-bottom:0;
 }
 body.admin-new-ui .admin-workspace-panel .tag-settings-body > .tag-settings-rows {
   grid-column:1/-1;grid-row:2;
 }
 body.admin-new-ui .admin-workspace-panel .tag-settings-body > .tag-settings-status {
   grid-column:1/-1;grid-row:3;margin:0;min-height:0;
 }
 /* Secondary action is deliberately distinct from the primary Save button. */
 body.admin-new-ui .admin-workspace-panel #btnAddTagSetting {
   grid-column:2;grid-row:4;align-self:center;margin:0!important;
   background:#283b50!important;border:1px dashed #7892ac!important;
   color:#dce9f6!important;-webkit-text-fill-color:#dce9f6!important;
   height:36px!important;min-height:36px!important;max-height:36px!important;
   padding:0 16px!important;line-height:1!important;box-sizing:border-box!important;
 }
 body.admin-new-ui.light-mode .admin-workspace-panel #btnAddTagSetting {
   background:#e7eef6!important;border-color:#8ca4b9!important;
   color:#25445f!important;-webkit-text-fill-color:#25445f!important;
 }
 body.admin-new-ui .admin-workspace-panel .tag-settings-actions {
   grid-column:3;grid-row:4;display:flex;align-items:center;
   justify-content:flex-end;gap:10px;margin:0;
 }
 body.admin-new-ui .admin-workspace-panel .tag-settings-actions > #btnCancelTagSettings {display:none;}
 body.admin-new-ui .admin-workspace-panel .tag-settings-actions #btnSaveTagSettings {
   margin:0!important;height:36px!important;min-height:36px!important;
   max-height:36px!important;box-sizing:border-box!important;
   display:inline-flex!important;align-items:center;justify-content:center;
   padding:0 14px!important;line-height:1!important;
 }
/* In-place completion feedback for administrator menu screens.
   The content screen remains mounted after a successful save. */
body.admin-new-ui :is(#featureSettingsStatus,#tagSettingsStatus,#mypageSaveStatus)[data-state="success"] {
  color:#86efac!important;
  -webkit-text-fill-color:#86efac!important;
  font-weight:700;
}
body.admin-new-ui.light-mode :is(#featureSettingsStatus,#tagSettingsStatus,#mypageSaveStatus)[data-state="success"] {
  color:#166534!important;
  -webkit-text-fill-color:#166534!important;
}
body.admin-new-ui #mypageSaveStatus:empty {display:none;}
body.admin-new-ui #mypageSaveStatus:not(:empty) {
  margin-top:12px;
  font-size:14px;
  line-height:1.5;
}

/* Consistent legible help text throughout the admin menus, in both themes.
   Avoid song-card metrics/badges: their fixed layout is intentionally unchanged. */
body.admin-new-ui :is(
  .feature-setting-row small,
  .feature-settings-status,
  .mypage-sheet .section-note,
  .mypage-x-block .section-note,
  .tag-settings-body > p,
  .tag-settings-status,
  .account-switch-note,
  .account-switch-status,
  .feedback-env-note,
  .feedback-history-date,
  .feedback-history-status,
  .skill-sync-note,
  .skill-sync-status,
  .skill-share-note,
  .section-note
) {
  font-size:14px!important;
  line-height:1.55;
}
body.admin-new-ui .feature-setting-row > span {gap:5px;}
body.admin-new-ui .admin-workspace-panel .tag-settings-body > p {font-size:14px;line-height:1.55;}

/* Admin standard text-field geometry: match the registered-song search (42px).
   This belongs to admin only; public fields and specialty controls are untouched. */
body.admin-new-ui { --admin-form-control-height:42px; }
body.admin-new-ui #mypageModal .mypage-name-row {
  display:flex;align-items:center;gap:8px;min-width:0;
}
body.admin-new-ui #mypageModal .mypage-x-block {
  border-top:0;
}
body.admin-new-ui #mypageModal .mypage-name-row > input {
  flex:1 1 auto;min-width:0;padding:0 12px!important;
}
body.admin-new-ui #mypageModal .mypage-name-row > .btn-name-change {
  flex:0 0 auto;padding:0 14px!important;border-radius:6px!important;
}
body.admin-new-ui #tagSettingsMask .tag-settings-row {align-items:center;}
body.admin-new-ui #feedbackMask .feedback-env-grid {gap:12px 10px;align-items:start;margin-top:14px;}
body.admin-new-ui #feedbackMask .feedback-env-grid > * {min-width:0;margin:0!important;}
body.admin-new-ui #feedbackMask .feedback-env-grid label {margin:0 0 7px!important;}
/* Feedback history hierarchy: heading > supporting note > empty state.
   Keep these styles scoped to the admin report dialog and both themes. */
body.admin-new-ui #feedbackMask .feedback-history-head strong {
  font-size:16px;line-height:1.4;font-weight:900;
}
body.admin-new-ui #feedbackMask .feedback-history-head span {
  font-size:12px;line-height:1.45;font-weight:700;
}
body.admin-new-ui #feedbackMask .feedback-history-empty {
  font-size:12px;line-height:1.5;
}

/* One height rule for ordinary admin input and its adjacent action button. */
body.admin-new-ui :is(
  #mypageModal .mypage-name-row > input,
  #mypageModal .mypage-name-row > .btn-name-change,
  #tagSettingsMask .tag-settings-row > input,
  #tagSettingsMask .tag-settings-row > button,
  #tagSettingsMask .tag-settings-rows input,
  #feedbackMask #feedbackDevice,
  #feedbackMask #feedbackBrowser,
  #feedbackMask #feedbackCategory,
  #featureSettingsMask .feature-setting-select,
  #adminBoardEditorMask input:not([type=checkbox]):not([type=radio]):not([type=file]),
  #adminBoardEditorMask select
) {
  height:var(--admin-form-control-height)!important;
  min-height:var(--admin-form-control-height)!important;
  max-height:var(--admin-form-control-height)!important;
  box-sizing:border-box!important;
}
body.admin-new-ui #feedbackMask :is(#feedbackDevice,#feedbackBrowser){padding:0 12px!important;}
/* Keep equal spacing when the optional device/browser pair stacks. */
@media (max-width:420px) {
 body.admin-new-ui #feedbackMask .feedback-env-grid {grid-template-columns:minmax(0,1fr)!important;row-gap:12px;}
}
body.admin-new-ui #feedbackMask .feedback-body > label {margin:14px 0 7px!important;}
body.admin-new-ui #feedbackMask .feedback-body > label:first-child {margin-top:0!important;}
body.admin-new-ui #feedbackMask .feedback-env-note {margin-top:8px;}
body.admin-new-ui #feedbackMask #feedbackStatus:empty {display:none!important;}
body.admin-new-ui #feedbackMask #btnSubmitFeedback {margin-top:10px!important;}

/* New thread editor: compact right-aligned buttons with consistent heights. */
body.admin-new-ui #adminBoardEditorMask .admin-board-editor-actions {
  display:flex!important; align-items:center!important; justify-content:flex-end!important;
  gap:8px!important; margin-top:12px!important; grid-template-columns:none!important;
}
body.admin-new-ui #adminBoardEditorMask .admin-board-editor-actions > button {
  flex:0 0 auto!important; width:auto!important; min-width:96px!important;
  height:40px!important; min-height:40px!important; box-sizing:border-box!important;
  margin:0!important; padding:0 16px!important; border-radius:8px!important;
  font-size:12px!important; line-height:1!important; font-weight:900!important;
}
body.admin-new-ui #adminBoardEditorMask #btnAdminBoardEditorCancel {
  background:#334155!important; color:#fff!important; -webkit-text-fill-color:#fff!important;
  border:1px solid #52627a!important;
}
body.admin-new-ui #adminBoardEditorMask #btnAdminBoardSave {
  background:#246b82!important; color:#fff!important; -webkit-text-fill-color:#fff!important;
  border:1px solid #246b82!important;
}
body.admin-new-ui.light-mode #adminBoardEditorMask #btnAdminBoardEditorCancel {
  background:#e2e8f0!important; color:#1e293b!important; -webkit-text-fill-color:#1e293b!important;
  border-color:#94a3b8!important;
}
body.admin-new-ui.light-mode #adminBoardEditorMask #btnAdminBoardSave {
  background:#236d83!important; border-color:#236d83!important;
}

 /* My Page: exactly one compact action row on admin desktop and modal.
    Order and semantics come from the existing HTML: delete / logout / switch. */
 body.admin-new-ui #mypageModal .mypage-account-actions {
   display:flex!important;flex-flow:row nowrap!important;
   justify-content:flex-end!important;align-items:center!important;
   gap:10px!important;width:100%!important;
   padding:15px 0 0!important;margin:16px 0 0!important;
   border-top:1px solid #334155!important;
 }
 body.admin-new-ui #mypageModal .mypage-account-actions > :is(
   .danger-zone,.mypage-logout-zone,.mypage-user-switch
 ) {
   display:flex!important;flex:0 0 auto!important;
   align-items:center!important;justify-content:center!important;
   width:auto!important;min-width:0!important;
   margin:0!important;padding:0!important;border:0!important;
 }
 body.admin-new-ui #mypageModal .mypage-account-actions > .hidden {display:none!important;}
 body.admin-new-ui #mypageModal .mypage-account-actions :is(
   #btnDeleteAccount,#btnLogout,#btnMypageUserSwitch
 ) {
   display:inline-flex!important;flex:0 0 auto!important;
   align-items:center!important;justify-content:center!important;
   box-sizing:border-box!important;width:auto!important;min-width:0!important;
   max-width:100%!important;height:42px!important;min-height:42px!important;
   padding:0 16px!important;margin:0!important;border-radius:8px!important;
   white-space:nowrap!important;word-break:keep-all;font-size:13px!important;
 }
 body.admin-new-ui #mypageModal #btnMypageUserSwitch,
 body.admin-new-ui.light-mode #mypageModal #btnMypageUserSwitch {
   background:#0e7490!important;border-color:#155e75!important;
   color:#fff!important;-webkit-text-fill-color:#fff!important;
 }
 body.admin-new-ui.light-mode #mypageModal #btnLogout {
   background:#e2e8f0!important;
   border:1px solid #94a3b8!important;
   color:#334155!important;-webkit-text-fill-color:#334155!important;
 }
 body.admin-new-ui.light-mode #mypageModal .mypage-account-actions {border-top-color:#cbd5e1!important;}
 @media (max-width:600px) {
   body.admin-new-ui #mypageModal .mypage-account-actions {gap:6px!important;}
   body.admin-new-ui #mypageModal .mypage-account-actions :is(
     #btnDeleteAccount,#btnLogout,#btnMypageUserSwitch
   ) {font-size:11px!important;padding:0 9px!important;height:38px!important;min-height:38px!important;}
 }
 /* Official ranking GF / DM switch: keep its intrinsic width, left aligned. */
 body.admin-new-ui #officialSkillRankingMask .official-ranking-tabs {
   display:flex;justify-content:flex-start;align-items:center;
   width:max-content;max-width:100%;gap:7px;
 }
 body.admin-new-ui #officialSkillRankingMask .official-ranking-tab {
   flex:0 0 96px;width:96px;min-width:0;max-width:96px;
   height:36px;min-height:36px;box-sizing:border-box;
 }

 /* Three distinct action colors, scoped to the administrator's new UI. */
 body.admin-new-ui #btnUnifiedSkillShare {
   background:#514390;border-color:#403475;color:#fff;
 }
 body.admin-new-ui #btnUnifiedSkillSave {
   background:#855321;border-color:#70451b;color:#fff;
 }
 body.admin-new-ui #btnUnifiedSkillSaveShare {
   background:#17654f;border-color:#11513f;color:#fff;
 }
 body.admin-new-ui .menu-screen-body {min-width:0;}
 body.admin-new-ui.light-mode .menu-screen-dialog {
   border-color:#cbd5e1;background:#f8fafc;
 }
 body.admin-new-ui.light-mode {
   --admin-work-surface:#e5e7eb;
 }

@media (min-width:1100px) {
 body.admin-new-ui {--admin-side-width:290px;--admin-top-height:50px;}
 body.admin-new-ui #appRoot {display:block;width:100%;max-width:none;min-width:0;box-sizing:border-box;}
 body.admin-new-ui #appScreen:not(.hidden) {
   display:grid;grid-template-columns:minmax(0,1fr);
   grid-template-rows:max-content minmax(0,1fr);
   width:100%;max-width:none;min-width:0;box-sizing:border-box;
 }
 body.admin-new-ui #appScreen:not(.hidden)>.p-header,
 body.admin-new-ui #appScreen:not(.hidden)>.p-container {grid-column:1;min-width:0;width:100%;max-width:none;}
 body.admin-new-ui #appScreen:not(.hidden)>.p-header {grid-row:1;}
 body.admin-new-ui #appScreen:not(.hidden)>.p-container {grid-row:2;}

 /* Header positioning and stacking are defined by the shared admin rule. */
 body.admin-new-ui #appScreen>.p-header {
   width:100%;max-width:none;
   min-width:0;margin:0;box-sizing:border-box;background:#101827;
 }
 body.admin-new-ui #appScreen>.p-header::before {display:none;content:none;}
 body.admin-new-ui #appScreen>.p-header>.user-header-row {
   position:relative;top:auto;left:auto;right:auto;display:flex;
   width:100%;height:var(--admin-top-height);min-height:var(--admin-top-height);
   padding:4px 9px;box-sizing:border-box;align-items:center;justify-content:space-between;
   flex-direction:row;border-bottom:1px solid #30425a;background:#101827;
 }
 body.admin-new-ui #appScreen>.p-header>.user-header-row>.header-mode-controls,
 body.admin-new-ui #appScreen>.p-header>.user-header-row>.header-account-controls {
   position:static;display:flex;width:auto;height:auto;align-items:center;
   flex-direction:row;flex-wrap:nowrap;gap:7px;
 }
 body.admin-new-ui #appScreen>.p-header .header-active-version {
   width:auto;max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
 }
 body.admin-new-ui #appScreen>.p-header #btnMenu {display:none;}
 body.admin-new-ui #appScreen>.p-header>.admin-desktop-menu-tree {
   position:fixed;top:var(--admin-top-height);bottom:0;left:0;
   display:block;width:var(--admin-side-width);height:auto;box-sizing:border-box;
   overflow-y:auto;padding:8px 9px 16px;background:#101b2d;
   border-right:1px solid #30425a;z-index:90;
 }
 body.admin-new-ui .admin-desktop-menu-caption {font-size:14px;font-weight:750;color:#dce8f7;padding:5px 2px 9px;}
 body.admin-new-ui .admin-menu-group {margin:3px 0 6px;border:1px solid #405772;border-radius:5px;background:#1c2d42;overflow:hidden;}
 body.admin-new-ui .admin-menu-group>summary {display:list-item;min-height:34px;box-sizing:border-box;padding:8px 7px;color:#e1ecfc;cursor:pointer;font-size:12px;font-weight:800;}
 body.admin-new-ui .admin-menu-group[open]>summary {background:#263e59;border-bottom:1px solid #405772;}
 body.admin-new-ui .admin-menu-tree-item {display:block;width:100%;height:44px;min-height:44px;box-sizing:border-box;padding:0 10px;border:0;border-top:1px solid #30445c;background:transparent;color:#e2eaf5;text-align:left;cursor:pointer;font-size:12px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
 body.admin-new-ui .admin-menu-tree-item:hover {background:#284a75;}
 body.admin-new-ui .admin-menu-tree-item.is-selected,
 body.admin-new-ui .admin-menu-tree-item.is-selected:hover {
   background:#284a75;color:#fff;font-weight:800;
 }
 /* Desktop light theme: the admin sidebar should follow the page theme.
    These are the light counterparts of the sidebar's dark-only rules above. */
 body.admin-new-ui.light-mode #appScreen>.p-header>.admin-desktop-menu-tree {
   background:#e5e7eb;border-right-color:#94a3b8;
 }
 body.admin-new-ui.light-mode .admin-desktop-menu-caption {
   color:#17243a;
 }
 body.admin-new-ui.light-mode .admin-menu-group {
   background:#f8fafc;border-color:#94a3b8;
 }
 body.admin-new-ui.light-mode .admin-menu-group>summary {
   color:#1e293b;
 }
 body.admin-new-ui.light-mode .admin-menu-group[open]>summary {
   background:#dbe4ef;border-bottom-color:#94a3b8;
 }
 body.admin-new-ui.light-mode .admin-menu-tree-item {
   background:transparent;color:#1e293b;border-top-color:#cbd5e1;
 }
 body.admin-new-ui.light-mode .admin-menu-tree-item:hover {
   background:#dbeafe;
 }
 body.admin-new-ui.light-mode .admin-menu-tree-item.is-selected,
 body.admin-new-ui.light-mode .admin-menu-tree-item.is-selected:hover {
   background:#bfdbfe;color:#17243a;font-weight:800;
 }
 body.admin-new-ui.light-mode .admin-desktop-version-area {
   border-top-color:#94a3b8;
 }
 body.admin-new-ui.light-mode .admin-desktop-version-area>label,
 body.admin-new-ui.light-mode .admin-desktop-app-version {
   color:#334155;
 }
 body.admin-new-ui.light-mode .admin-desktop-version-select {
   background:#fff;color:#17243a;border-color:#94a3b8;
 }

 body.admin-new-ui .admin-desktop-version-area {
   display:flex;flex-direction:column;gap:8px;margin-top:16px;padding:12px 5px 10px;
   border-top:1px solid #30445c;min-width:0;
 }
 /* Version metadata shares one dark-mode color and weight; individual size/flow stays distinct. */
 body.admin-new-ui .admin-desktop-version-area>label,
 body.admin-new-ui .admin-desktop-app-version {
   color:#a8c4dc;font-weight:750;font-size:11px;
 }
 body.admin-new-ui .admin-desktop-version-select {
   display:block;width:100%;min-width:0;box-sizing:border-box;
   background:#0f1d30;color:#e1ecfc;border:1px solid #405772;
   border-radius:5px;padding:9px 6px;font:inherit;font-size:12px;
 }
 body.admin-new-ui .admin-desktop-app-version {
   font-family:inherit;line-height:1.4;letter-spacing:normal;overflow-wrap:anywhere;
 }
 body.admin-new-ui #appScreen>.p-header>.score-row,
 body.admin-new-ui #appScreen>.p-header>.p-tabs,
 body.admin-new-ui #appScreen>.p-header>#searchArea,
 body.admin-new-ui #appScreen>.p-header>#boardMainFixed,
 body.admin-new-ui #appScreen>.p-header>#userListHeaderSlot {
   position:relative;top:auto;left:auto;right:auto;
   margin-left:var(--admin-side-width);
   width:calc(100% - var(--admin-side-width));box-sizing:border-box;
 }
 body.admin-new-ui #appScreen>.p-header>#boardMainFixed {max-width:none;overflow-wrap:anywhere;}
 body.admin-new-ui #appScreen>.p-header>#boardMainFixed .board-main-rule-note {max-width:100%;}
 body.admin-new-ui #appScreen>.p-header>.score-row {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));min-height:63px;}
 body.admin-new-ui #appScreen>.p-header>.score-row>.score-cell {width:auto;min-width:0;}
 body.admin-new-ui #appScreen>.p-header>.p-tabs {display:flex;gap:6px;padding:6px 8px;height:auto;}
 body.admin-new-ui #appScreen>.p-header>.p-tabs .p-tab-btn:not(.hidden) {display:flex;flex:1 1 0;width:auto;min-width:0;min-height:40px;align-items:center;justify-content:center;}
 body.admin-new-ui #appScreen>.p-header>#searchArea {max-height:none;overflow:visible;}
 body.admin-new-ui #appScreen>.p-header>#searchArea.admin-filters-expanded .record-filter-row {
   position:absolute;right:8px;left:auto;top:100%;width:min(590px,calc(100vw - var(--admin-side-width) - 24px));
   display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:16px;
   border:1px solid #3d678a;background:#16263c;box-shadow:0 12px 30px #000b;
 }
 /* Match the scroll-frame selector specificity in layout-canonical.css so
    the desktop sidebar inset is not reset to the generic 6px inset. */
 body.admin-new-ui.app-scroll-layout #appScreen:not(.hidden).ui-scroll-frame>.p-container.ui-scroll-body:not(.hidden),
 body.admin-new-ui #appScreen>.p-container {
   display:block;margin-left:0;padding-left:calc(var(--admin-side-width) + 6px);width:100%;
   min-width:0;max-width:none;box-sizing:border-box;
 }
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) {--ar-cols:30px 64px minmax(125px,1fr) 80px 54px 92px 52px 78px 82px 42px;}
 /* Read-only detail cards have no editor. In OFF mode the freed final column
    belongs to the skill value; own-page editable rows retain their grid. */
 body.admin-new-ui:not(.skill-target-columns) :is(#userDetailSkill,#userDetailRecords) {
   --ar-cols:30px 64px minmax(125px,1fr) 80px 54px 92px 52px 78px 82px;
 }
 body.admin-new-ui:not(.skill-target-columns) :is(#userDetailSkill,#userDetailRecords) .ar-record.ar-readonly .ar-skill {
   justify-self:end;
 }
 body.admin-new-ui:not(.skill-target-columns) :is(#userDetailSkill,#userDetailRecords) .ar-register-view.ar-readonly .ar-table-head span:last-child {
   display:none;
 }
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-record,
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-table-head {column-gap:8px;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-record {grid-template-rows:46px;min-height:54px;padding:2px 5px;overflow:hidden;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-no {grid-column:1;grid-row:1;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-art {grid-column:2;grid-row:1;width:44px;height:44px;justify-self:start;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-title {grid-column:3;grid-row:1;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-part {grid-column:4;grid-row:1;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-level {grid-column:5;grid-row:1;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-rate {grid-column:6;grid-row:1;text-align:center;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-fc-cell {grid-column:7;grid-row:1;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-option {grid-column:8;grid-row:1;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-skill {grid-column:9;grid-row:1;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-edit {grid-column:10;grid-row:1;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-bear-medal {width:26px;height:26px;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-edit button {width:32px;height:32px;}
 body.admin-new-ui:not(.skill-target-columns) :is(#viewAllManage,#viewSkill,#userDetailSkill,#userDetailRecords) .ar-table-head {padding:5px 6px;margin-bottom:4px;}

 /* Shared desktop work-area geometry: menu sheets and user detail occupy the
    same space, while scrolling, padding and stacking remain specific to each. */
 body.admin-new-ui :is(
   #mypageModal,#featureSettingsMask,#tagSettingsMask,#skillSyncMask,
   #allScoreSyncMask,#skillShareMask,#skillHistoryMask,
   #skillRankingMask,#officialSkillRankingMask,#rivalManageMask,
   #songCatalogMask,#howToMask,#feedbackMask,#supportMask,
   #accountSwitchMask,#userDetailPage.user-detail-page
 ) {
   position:fixed!important;
   inset:var(--admin-top-height) 0 0 var(--admin-side-width)!important;
   width:auto!important;height:auto!important;max-width:none!important;
   box-sizing:border-box!important;
 }
 /* Desktop menu destinations are work-area pages, not viewport-wide modal sheets. */
 body.admin-new-ui :is(
   #mypageModal,#featureSettingsMask,#tagSettingsMask,#skillSyncMask,
   #allScoreSyncMask,#skillShareMask,#skillHistoryMask,
   #skillRankingMask,#officialSkillRankingMask,#rivalManageMask,
   #songCatalogMask,#howToMask,#feedbackMask,#supportMask,
   #accountSwitchMask
 ) {
   padding:12px!important;margin:0!important;
   align-items:flex-start!important;justify-content:flex-start!important;
   overflow-y:auto!important;overflow-x:hidden!important;
   background:var(--admin-work-surface,#0c1728)!important;
   backdrop-filter:none!important;box-shadow:none!important;
 }
 body.admin-new-ui :is(
   #mypageModal,#featureSettingsMask,#tagSettingsMask,#skillSyncMask,
   #allScoreSyncMask,#skillShareMask,#skillHistoryMask,
   #skillRankingMask,#officialSkillRankingMask,#rivalManageMask,
   #songCatalogMask,#howToMask,#feedbackMask,#supportMask,
   #accountSwitchMask
 ) > :first-child {
   position:relative!important;
   flex:0 0 100%!important;width:100%!important;max-width:none!important;
   height:auto!important;min-height:0!important;max-height:none!important;
   margin:0!important;padding:16px!important;
   border-radius:8px!important;box-shadow:none!important;
   overflow:visible!important;box-sizing:border-box!important;
 }

 /* In the desktop workspace, the mask is the sole vertical scroller.
    Compact modal nested scrollers must not swallow wheel gestures over
    help, catalog, ranking, or the skill-history image preview. Mobile retains
    the original independently scrolling modal body. */
 body.admin-new-ui :is(#howToMask .howto-body,#songCatalogMask .song-catalog-body,#officialSkillRankingMask .official-ranking-body,#skillHistoryMask .skill-history-body) {
   flex:0 0 auto;
   overflow:visible;
   overscroll-behavior:auto;
   scrollbar-gutter:auto;
 }

 body.admin-new-ui.light-mode :is(
   #mypageModal,#featureSettingsMask,#tagSettingsMask,#skillSyncMask,
   #allScoreSyncMask,#skillShareMask,#skillHistoryMask,
   #skillRankingMask,#officialSkillRankingMask,#rivalManageMask,
   #songCatalogMask,#howToMask,#feedbackMask,#supportMask,
   #accountSwitchMask
 ) > :first-child {
   background:#f8fafc!important;color:#17243a!important;
   border-color:#cbd5e1!important;
 }
 /* Viewed profiles use the same right-side workspace, with their own sticky
    name/skill/tab bar. Their existing markup and click handlers stay intact. */
 body.admin-new-ui #userDetailPage.user-detail-page {
   min-height:0!important;overflow:hidden!important;z-index:1100;
 }
 /* Read-only records hide the edit action; OFF-mode layout removes its
    rightmost grid track and ON-mode keeps the existing bottom-right geometry. */
}

/* Viewed-profile header follows the same height / score-row geometry as
   the admin main header. All selectors are admin-only; the scroll panes
   retain the shared layout-canonical.css containment/scroll configuration. */
body.admin-new-ui #userDetailPage .user-detail-sticky {
  min-width:0;box-sizing:border-box;
}
/* Use the same first-row height as the administrator's own header at
   every logical width; below 400px JS scales the 400px-wide layout.
   Viewed profiles remain read-only; public profile CSS is not affected. */
body.admin-new-ui #userDetailPage .user-detail-header {
  height:50px;min-height:50px;max-height:50px;
  box-sizing:border-box;padding:4px 9px;gap:8px;
  align-items:center;
}
body.admin-new-ui #userDetailPage .user-detail-summary {
  min-height:54px;box-sizing:border-box;align-items:stretch;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
body.admin-new-ui #userDetailPage .user-detail-summary > div {
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  padding:4px 3px;min-width:0;box-sizing:border-box;
}
body.admin-new-ui #userDetailPage .user-detail-summary .score-val {
  align-self:center!important;margin:2px auto 0!important;
}
@media (min-width:1100px) {
  body.admin-new-ui #userDetailPage .user-detail-summary {min-height:63px;}
}
/* One compact header through 1099.999px, including fractional viewport
   widths. The PC sidebar owns the layout from 1100px onwards. */
@media (width < 1100px) {
  body.admin-new-ui #appScreen>.p-header>.user-header-row {
    display:flex;flex-wrap:nowrap;align-items:center;gap:8px;
    min-width:0;height:50px;min-height:50px;box-sizing:border-box;
  }
  body.admin-new-ui #appScreen>.p-header>.user-header-row>.header-mode-controls {
    flex:1 1 auto;min-width:0;overflow:hidden;
  }
  body.admin-new-ui #appScreen>.p-header>.user-header-row>.header-account-controls {
    display:flex;flex:0 0 auto;min-width:0;gap:6px;
  }
  body.admin-new-ui #appScreen>.p-header .header-active-version {
    flex:0 1 auto;min-width:0;max-width:clamp(100px,24vw,250px);
    overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  body.admin-new-ui #appScreen>.p-header :is(#btnMenu,#btnRefreshApp) {
    display:inline-flex;align-items:center;justify-content:center;
    flex:0 0 38px;width:38px;min-width:38px;max-width:38px;
    height:38px;min-height:38px;max-height:38px;
    box-sizing:border-box;padding:0;margin:0;
    font-size:21px;line-height:1;
  }
  body.admin-new-ui #appScreen>.p-header #btnAdmin {
    flex:0 0 auto;white-space:nowrap;margin:0;
  }
  body.admin-new-ui #appScreen>.p-header>.user-header-row .header-account-controls :is(#btnMenu,#btnRefreshApp) {
    display:inline-flex!important;flex:0 0 38px!important;
    width:38px!important;min-width:38px!important;max-width:38px!important;
    height:38px!important;min-height:38px!important;max-height:38px!important;
    padding:0!important;box-sizing:border-box!important;
  }
}

/* iPhone Safari user detail: do not create a separate GPU layer here.
   Own header and viewed detail keep the same public sparkle declarations;
   a forced transform on the nested sticky header caused WebKit to repaint
   its filtered text and borders differently from the own header. */
/* Admin catalog/favorites use the same anchored filter popover as user list.
   The existing public form markup is not touched. The panel overlays the
   catalog instead of occupying the entire width or shifting list rows. */
body.admin-new-ui #songCatalogMask .song-catalog-controls {
  display:block;position:relative;flex:none;min-height:52px;
  padding:6px 12px;border-bottom:1px solid #30445c;
  background:transparent;overflow:visible;z-index:30;
}
body.admin-new-ui #songCatalogMask .song-catalog-controls.admin-catalog-favorite-controls {
  min-height:0;height:0;padding:0;border:0;z-index:30;
}
body.admin-new-ui #songCatalogMask .song-catalog-controls.admin-catalog-favorite-controls .admin-catalog-filter-panel {
  top:2px;
}
body.admin-new-ui #songCatalogMask .song-catalog-favorite-name {
  align-items:center;position:relative;flex:none;overflow:visible;z-index:31;
  background:transparent;background-image:none;box-shadow:none;
}
body.admin-new-ui #songCatalogMask .admin-catalog-filter-toggle {
  display:flex;align-items:center;justify-content:center;
  flex:0 0 42px;width:42px;height:42px;min-height:42px;
  border:1px solid #415671;border-radius:7px;
  background:#23344a;color:#eaf3ff;cursor:pointer;
}
body.admin-new-ui #songCatalogMask .song-catalog-controls > .admin-catalog-filter-toggle {
  margin-left:auto;
}
body.admin-new-ui #songCatalogMask .song-catalog-favorite-name > .admin-catalog-filter-toggle {
  height:36px;min-height:36px;flex-basis:40px;width:40px;
  background:#23344a;color:#eaf3ff;border:1px solid #415671;
}
body.admin-new-ui #songCatalogMask .admin-catalog-filter-toggle[aria-expanded="true"] {
  border-color:var(--app-accent);background:#246b82;color:#fff;
}
body.admin-new-ui #songCatalogMask .admin-catalog-filter-panel {
  display:none;position:absolute;top:calc(100% + 2px);right:12px;
  z-index:40;width:min(460px,calc(100% - 24px));box-sizing:border-box;
  grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;
  padding:12px;border:1px solid #3c6385;border-radius:8px;
  background:#152438;box-shadow:0 8px 25px #0009;
}
body.admin-new-ui #songCatalogMask .song-catalog-controls.admin-catalog-filters-open .admin-catalog-filter-panel {
  display:grid;
}
body.admin-new-ui #songCatalogMask .admin-catalog-filter-panel > label {display:block;min-width:0;}
body.admin-new-ui #songCatalogMask .admin-catalog-filter-panel .song-catalog-range {
  display:grid;grid-column:1/-1;
}
body.admin-new-ui #songCatalogMask .admin-catalog-filter-panel .song-catalog-range.hidden {display:none;}
body.admin-new-ui #songCatalogMask .admin-catalog-filter-panel .song-catalog-action-row {
  display:grid;grid-column:1/-1;
}
body.admin-new-ui #songCatalogMask .admin-catalog-filter-panel :is(select,input) {width:100%;min-width:0;}
body.admin-new-ui.light-mode #songCatalogMask .admin-catalog-filter-panel {
  background:#f8fafc;border-color:#94a3b8;box-shadow:0 8px 24px #0f172a30;
}
body.admin-new-ui.light-mode #songCatalogMask .admin-catalog-filter-toggle {
  background:#e2e8f0;color:#17243a;border-color:#94a3b8;
}
body.admin-new-ui.light-mode #songCatalogMask .admin-catalog-filter-toggle[aria-expanded="true"] {
  background:#246b82;color:#fff;border-color:#246b82;
}
@media(max-width:430px){
  body.admin-new-ui #songCatalogMask .admin-catalog-filter-panel {
    right:6px;width:calc(100% - 12px);padding:9px;gap:7px;
  }
}
/* Skill ranking: remove 8-9px microtype on both light and dark admin.
   Keep rows compact and preserve the existing three-column metrics grid. */
body.admin-new-ui #skillRankingMask .skill-ranking-context,
body.admin-new-ui #skillRankingMask .skill-ranking-status,
body.admin-new-ui #skillRankingMask .skill-ranking-sort-wrap {font-size:11px;line-height:1.3;}
body.admin-new-ui #skillRankingMask .skill-ranking-position,
body.admin-new-ui #skillRankingMask .skill-ranking-song {font-size:12px;line-height:1.25;}
body.admin-new-ui #skillRankingMask .skill-ranking-level {font-size:10px;}
body.admin-new-ui #skillRankingMask .skill-ranking-metric small,
body.admin-new-ui #skillRankingMask .skill-ranking-metric em {font-size:10px;line-height:1.2;}
body.admin-new-ui #skillRankingMask .skill-ranking-metric strong {font-size:13px;line-height:1.2;}
body.admin-new-ui #skillRankingMask .skill-ranking-metric {padding-left:5px;padding-right:5px;}
body.admin-new-ui #skillRankingMask .skill-ranking-row .p-badge {font-size:10px;}
/* Light-mode ranking secondary metadata was too pale on white cards. */
body.admin-new-ui.light-mode #skillRankingMask :is(
  .skill-ranking-context,.skill-ranking-status,.skill-ranking-sort-wrap,
  .skill-ranking-position,.skill-ranking-level
) {color:#475569!important;-webkit-text-fill-color:#475569!important;}
body.admin-new-ui.light-mode #skillRankingMask .skill-ranking-metric :is(small,em:not(.skill-ranking-comparison)) {
  color:#475569!important;-webkit-text-fill-color:#475569!important;
}
/* Comparison delta: consistent blue for gains and red for losses in both themes.
   Keep the other ranking metadata neutral. */
body.admin-new-ui #skillRankingMask .skill-ranking-comparison.positive {
  color:#60a5fa!important;-webkit-text-fill-color:#60a5fa!important;
}
body.admin-new-ui #skillRankingMask .skill-ranking-comparison.negative {
  color:#f87171!important;-webkit-text-fill-color:#f87171!important;
}
body.admin-new-ui.light-mode #skillRankingMask .skill-ranking-comparison.positive {
  color:#1d4ed8!important;-webkit-text-fill-color:#1d4ed8!important;
}
body.admin-new-ui.light-mode #skillRankingMask .skill-ranking-comparison.negative {
  color:#b91c1c!important;-webkit-text-fill-color:#b91c1c!important;
}
body.admin-new-ui.light-mode #skillRankingMask .skill-ranking-row .skill-ranking-position {
  color:#325c94!important;-webkit-text-fill-color:#325c94!important;
}
/* Catalog part names: DM / GF Guitar / GF Bass share inherited font and weight. */
body.admin-new-ui #songCatalogMask .song-catalog-detail-table tbody th {
  font-family:inherit;font-size:11px;font-weight:800;line-height:1.25;
  font-style:normal;letter-spacing:normal;
}
body.admin-new-ui #songCatalogMask .song-catalog-row summary {
  grid-template-columns:36px minmax(0,1fr) 16px;
}
body.admin-new-ui #songCatalogMask .song-catalog-row.with-level summary {
  grid-template-columns:36px minmax(0,1fr) 48px 35px 16px;
}
body.admin-new-ui #songCatalogMask .song-catalog-row summary::after {grid-column:3;}
body.admin-new-ui #songCatalogMask .song-catalog-row.with-level summary::after {grid-column:5;}
body.admin-new-ui #songCatalogMask .admin-catalog-jacket {
  display:grid;place-items:center;width:36px;height:36px;
  overflow:hidden;flex:none;border-radius:4px;background:#27374b;color:#9ab6cd;
}
body.admin-new-ui #songCatalogMask .admin-catalog-jacket img {
  display:block;width:100%;height:100%;object-fit:cover;
}
body.admin-new-ui.light-mode #songCatalogMask .admin-catalog-jacket {
  background:#e2e8f0;color:#64748b;
}


/* Admin rival rows: independent user-info and delete surfaces.
   Public rival cards retain the original layout. */
body.admin-new-ui #rivalManageMask {
  --admin-rival-surface:#162235;
  --admin-rival-border:#3a4e67;
  --admin-rival-hover:#223450;
}
body.admin-new-ui.light-mode #rivalManageMask {
  --admin-rival-surface:#edf2f7;
  --admin-rival-border:#b3c3d6;
  --admin-rival-hover:#dce7f2;
}
body.admin-new-ui #rivalManageMask .favorite-user-list {
  display:grid;
  gap:4px;
}
body.admin-new-ui #rivalManageMask .favorite-user-row {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  align-items:stretch!important;
  gap:8px!important;
  min-height:0;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0;
  background:transparent!important;
  box-shadow:none!important;
}
body.admin-new-ui #rivalManageMask .favorite-user-open {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 76px!important;
  grid-template-areas:"name skill"!important;
  align-items:center;
  column-gap:8px;
  min-width:0;
  min-height:36px;
  width:100%;
  margin:0;
  padding:3px 10px;
  background:var(--admin-rival-surface)!important;
  border:1px solid var(--admin-rival-border)!important;
  border-radius:8px;
  box-shadow:none!important;
  text-align:left;
}
body.admin-new-ui #rivalManageMask .favorite-user-open:hover,
body.admin-new-ui #rivalManageMask .favorite-user-open:focus-visible,
body.admin-new-ui #rivalManageMask .favorite-user-open:active {
  background:var(--admin-rival-hover)!important;
}
body.admin-new-ui #rivalManageMask .favorite-user-open .name {
  grid-area:name;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
body.admin-new-ui #rivalManageMask .favorite-user-skill {
  grid-area:skill;
  width:76px!important;
  min-width:76px!important;
  max-width:76px!important;
  justify-self:end!important;
  text-align:right!important;
  white-space:nowrap;
  line-height:1;
}
body.admin-new-ui #rivalManageMask .favorite-user-row > .remove {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:64px;
  min-height:36px;
  margin:0;
  padding:3px 10px;
  align-self:stretch;
  border-radius:8px;
}
body.admin-new-ui.light-mode #rivalManageMask .favorite-user-open,
body.admin-new-ui.light-mode #rivalManageMask .favorite-user-open .name {
  color:#17243a!important;
  -webkit-text-fill-color:#17243a!important;
}
@media(max-width:520px) {
  body.admin-new-ui #rivalManageMask .favorite-user-open {
    grid-template-columns:minmax(0,1fr) 72px!important;
    column-gap:6px;
    padding:5px 8px;
  }
  body.admin-new-ui #rivalManageMask .favorite-user-skill {
    width:72px!important;
    min-width:72px!important;
    max-width:72px!important;
  }
  body.admin-new-ui #rivalManageMask .favorite-user-row > .remove {
    min-width:58px;
    padding:5px 9px;
  }
}

/* v4.40.48: admin score-detail heading/action palette. Public detail stays unchanged. */
/* Rival comparison: rows join without the public 3px vertical margin.
   The own-account row keeps its blue highlight; all other rows share one surface. */
body.admin-new-ui #rateCompareMask .rate-compare-body .rate-row.rate-rival-grid {
  margin-top:0!important;margin-bottom:0!important;
  background:transparent;
}
body.admin-new-ui #rateCompareMask .rate-compare-body .rate-row.rate-rival-grid.self {
  background:rgba(37,99,235,.12);
}
body.admin-new-ui #rateCompareMask .rate-compare-label {
  color:#a9c6d5!important;
  -webkit-text-fill-color:#a9c6d5!important;
}
body.admin-new-ui.light-mode #rateCompareMask .rate-compare-label {
  color:#48667a!important;
  -webkit-text-fill-color:#48667a!important;
}
body.admin-new-ui #rateCompareMask .rate-compare-edit-area:not(.hidden) {
  flex:0 0 auto;
  padding:10px 14px max(12px,env(safe-area-inset-bottom));
  border-top:1px solid #334155;
  justify-content:flex-end;
}
body.admin-new-ui #rateCompareMask .rate-compare-edit-button:not(.hidden) {
  width:auto!important;
  min-width:156px;
  min-height:38px;
  padding:7px 14px;
  border:1px solid #246b82!important;
  border-radius:8px;
  background:#246b82!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  font-size:12px;
  font-weight:900;
}
body.admin-new-ui.light-mode #rateCompareMask .rate-compare-edit-button:not(.hidden) {
  border-color:#236d83!important;
  background:#236d83!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
body.admin-new-ui.light-mode #rateCompareMask .rate-compare-edit-area:not(.hidden) {
  border-top-color:#cbd5e1;
}



/* v4.40.113 — Admin-only: a 400px logical canvas on narrow viewports.
   Individual modal content responds to its own available width, not a second
   global breakpoint that would compete with the 400/700/1100 card rules. */
body.admin-new-ui #skillHistoryList {
  container-type:inline-size;
  min-width:0;
}
body.admin-new-ui #skillHistoryList .skill-history-row {
  min-width:0;
}
body.admin-new-ui #skillHistoryList .skill-history-summary {
  min-width:0;
  overflow:hidden;
}
body.admin-new-ui #skillHistoryList .skill-history-date {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
}
/* A 400px logical viewport must keep the history actions on the same row.
   The dialog's content area is narrower than the viewport, so size the four
   cells by their actual contents instead of switching to a two-row grid.
   Below 400px the existing admin overlay zoom scales this exact layout. */
@container (max-width: 370px) {
  body.admin-new-ui #skillHistoryList .skill-history-row.has-compare {
    grid-template-columns:minmax(0,1fr) repeat(3,minmax(0,39px));
    gap:4px;
  }
  body.admin-new-ui #skillHistoryList .skill-history-row:not(.has-compare) {
    grid-template-columns:minmax(0,1fr) repeat(2,minmax(0,39px));
    gap:4px;
  }
  body.admin-new-ui #skillHistoryList .skill-history-summary {
    grid-column:auto;
    min-width:0;
    padding-inline:5px;
    gap:3px;
    white-space:nowrap;
    font-size:10px;
  }
  body.admin-new-ui #skillHistoryList .skill-history-date {
    min-width:0;
    flex:1 1 auto;
    overflow:hidden;
    text-overflow:ellipsis;
  }
  body.admin-new-ui #skillHistoryList .skill-history-value {
    flex:0 0 auto;
  }
  body.admin-new-ui #skillHistoryList .skill-history-row :is(
    .skill-history-display,.skill-history-compare,.skill-history-delete
  ) {
    box-sizing:border-box;
    min-width:0;
    width:100%;
    padding-inline:1px;
    font-size:10px;
    white-space:nowrap;
  }
}
