/* Focused Tier workspace; kept separate from the rest of the site's navigation. */
body.tier-focused {
  height: 100vh !important; height: 100dvh !important;
  padding: 0 !important; overflow: hidden !important;
  --line: rgba(210, 168, 74, .23);
}
body.tier-focused .app {
  display: block !important; width: 100%; min-height: 0 !important;
  height: 100% !important;
}
body.tier-focused .app > .main {
  height: 100vh !important; height: 100dvh !important;
  min-height: 0 !important; width: 100%; padding: 12px 16px !important;
  display: flex; flex-direction: column; gap: 10px !important;
  overflow: hidden !important;
}
.tier-focused .sidebar, .tier-focused .stats,
.tier-focused .tier-deco, .tier-focused .site-top-ornament,
.tier-focused .site-ornament-watermark, .tier-focused .mobile-bottom-nav,
.tier-focused .subtitle, .tier-focused .crumb,
.tier-focused .tier-row > .tools, .tier-focused .dropzone {
  display: none !important;
}
.tier-focused .main > .header {
  display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto !important;
  align-items: center; gap: 20px !important; flex: 0 0 auto;
  min-height: 40px; box-shadow: none; background: transparent;
}
.tier-focused .title {
  font-size: clamp(1.05rem, 1.65vw, 1.4rem) !important;
  line-height: 1.25 !important; letter-spacing: 0; color: var(--text);
}
.tier-focused .title em { color: var(--purple); }
.tier-focused .mobile-site-header {
  position: static !important; display: flex; align-items: center;
  gap: 10px; width: auto; height: 40px; padding: 0;
  border: 0; background: transparent; box-shadow: none; backdrop-filter: none;
}
.tier-focused .mobile-brand {
  display: flex; align-items: center; gap: 6px; text-decoration: none; color: #38290f;
}
.tier-focused .mobile-brand img { width: 32px; height: 36px; object-fit: contain; }
.tier-focused .mobile-brand__copy strong { display: block; font-size: .85rem; }
.tier-focused .mobile-brand__copy span { display: none; }
.tier-focused .mobile-menu-button {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 34px; min-height: 34px; border: 1px solid var(--line);
  border-radius: 9px; background: #fffaf0; color: #74550d; cursor: pointer;
}
.tier-focused .mobile-menu-button .hd-icon { width: 19px; height: 19px; margin: 0; }
.tier-focused .mode-tabs {
  display: flex !important; width: auto; gap: 3px !important; padding: 3px !important;
  border-radius: 11px; box-shadow: none;
}
.tier-focused .mode-tabs a, .tier-focused .mode-tabs button {
  min-height: 32px; padding: 6px 12px !important; font-size: .78rem !important;
}
.tier-focused .app .topbar {
  display: flex !important; flex-wrap: wrap; gap: 8px !important;
  padding: 8px 10px !important; border-radius: 13px !important; flex: 0 0 auto;
  box-shadow: 0 3px 12px rgba(120, 90, 30, .035);
}
.tier-focused .topbar > .searchbox { flex: 1 1 160px; min-width: 130px; max-width: 300px; }
.tier-focused .topbar .select, .tier-focused .topbar .btn,
.tier-focused .topbar .searchbox input {
  min-height: 36px; height: 36px; padding: 7px 10px;
  border-radius: 9px; font-size: .76rem; min-width: 0;
}
.tier-focused .topbar .searchbox input { padding-left: 32px; }
.tier-focused .topbar #seasonFilter { max-width: 215px; }
.tier-focused .topbar .switch { font-size: .74rem; gap: 5px; }
.tier-focused .topbar .slider { width: 34px; height: 20px; }
.tier-focused .topbar .slider:after { width: 14px; height: 14px; }
.tier-focused .topbar .switch input:checked + .slider:after { left: 17px; }
.tier-focused .save-status { min-width: 65px; margin-left: auto; font-size: .71rem; }
.workspace-more { position: relative; }
.workspace-more > summary {
  cursor: pointer; list-style: none; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 9px; font-size: .76rem; font-weight: 800; min-height: 36px;
  display: flex; align-items: center; color: var(--muted); background: #fff;
}
.workspace-more > summary::-webkit-details-marker { display: none; }
.workspace-more > div {
  position: absolute; top: calc(100% + 6px); right: 0; width: 180px; z-index: 20;
  display: grid; gap: 7px; padding: 9px; background: #fffdf6;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 28px #38290f20;
}
.tier-focused .workspace-more .btn { width: 100%; }
.tier-focused .workbench {
  flex: 1 1 0; min-height: 0; display: grid !important;
  grid-template-columns: minmax(0, 1fr) clamp(290px, 26vw, 370px);
  gap: 12px !important; overflow: hidden;
}
.tier-focused .panel {
  min-height: 0; min-width: 0; border-radius: 14px !important;
  background: rgba(255, 255, 255, .86); box-shadow: 0 4px 16px rgba(95, 70, 25, .035);
}
.tier-focused .tier-panel { display: flex; flex-direction: column; }
.tier-focused .panel-head {
  flex: 0 0 auto; height: 39px !important; min-height: 39px;
  padding: 8px 12px !important; font-size: .85rem;
  display: flex; flex-direction: row; align-items: center !important; gap: 12px;
}
.tier-focused .panel-head small { font-size: .7rem; max-width: none; }
.workspace-summary { color: var(--muted); font-size: .73rem; font-weight: 600; white-space: nowrap; }
.workspace-summary b { color: var(--purple); font-size: .82rem; }
.workspace-summary .pending-label { margin-left: 10px; }
.tier-focused .tier-lanes {
  flex: 1 1 auto; min-height: 0; max-height: none !important;
  overflow: auto !important; padding: 9px !important; gap: 8px;
  scrollbar-width: thin; scrollbar-color: #c9b8ed transparent;
}
.tier-focused .tier-row {
  flex: 0 0 auto; min-height: 82px !important; height: auto;
  border-radius: 11px !important; align-items: stretch; overflow: hidden;
}
.tier-focused .tier-head {
  width: 94px !important; flex: 0 0 94px; padding: 8px !important;
  display: flex; flex-direction: row; justify-content: center; gap: 6px !important;
}
.tier-focused .tier-letter { width: auto !important; font-size: 1.65rem !important; }
.tier-focused .tier-info b { font-size: .68rem !important; }
.tier-focused .tier-info span { font-size: .6rem; }
.tier-focused .tier-body {
  min-width: 0; display: flex; flex-wrap: wrap; align-content: center; align-items: center;
  overflow: visible; padding: 7px !important; gap: 7px;
}
.tier-focused .tier-row > .count {
  display: flex; align-items: center; justify-content: center; flex: 0 0 34px;
  min-width: 34px; align-self: stretch; font-size: .68rem;
}
.tier-focused .empty { font-size: .75rem; padding: 9px 0; }
.tier-focused .tcard {
  min-width: 0; width: 190px; max-width: 220px; flex: 0 1 190px;
  height: auto; min-height: 74px; padding: 6px;
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 20px;
  gap: 3px 7px; border-radius: 9px; transform: none;
}
.tier-focused .tcard > img { width: 38px; height: 54px; grid-row: 1 / 3; border-radius: 6px; }
.tier-focused .tcard > div:not(.card-order-actions) { min-width: 0; }
.tier-focused .tcard .name { max-width: none; font-size: .72rem; }
.tier-focused .tcard .meta { font-size: .59rem; }
.tier-focused .tcard .remove { align-self: center; min-height: 23px; height: 23px; }
.tier-focused .card-order-actions { display: flex; grid-column: 2; gap: 5px; }
.tier-focused .order-move {
  width: 28px; height: 23px; min-height: 23px; padding: 0; border: 1px solid var(--line);
  border-radius: 6px; background: #fffaf1; color: #7755bf; cursor: pointer;
}
.tier-focused .order-move:disabled { opacity: .3; cursor: default; }
.tier-focused .tcard.drag-before { box-shadow: -4px 0 0 var(--purple); }
.tier-focused .tcard.drag-after { box-shadow: 4px 0 0 var(--purple); }
.tier-focused .pool-controls { padding: 10px 12px !important; flex: 0 0 auto; }
.tier-focused .pool-title { font-size: .85rem; margin: 0; display: flex; justify-content: space-between; }
.tier-focused .pool-title small { font-size: .72rem; }
.tier-focused .pool-list { flex: 1 1 auto; min-height: 0; padding: 8px; max-height: none !important; }
.tier-focused .pool-item { padding: 7px; gap: 7px; margin-bottom: 7px; border-radius: 10px; }
.tier-focused .pool-item img { width: 44px; height: 59px; border-radius: 6px; }
.tier-focused .pool-item { grid-template-columns: 17px 44px minmax(0, 1fr) auto; }
.tier-focused .pool-name { font-size: .74rem; }
.tier-focused .pool-meta { font-size: .61rem; }
.tier-focused .pool-actions { grid-template-columns: repeat(3, 22px); gap: 3px; }
.tier-focused .pool-actions .assign { min-height: 23px; height: 23px; }
.tier-focused .batch { padding: 8px; }
.tier-focused .tip { display: none; }
.tier-focused .poster-card, .tier-focused .tier-body .poster-card {
  width: 60px !important; height: 84px !important; flex: 0 0 60px !important; border-radius: 7px;
}
.tier-focused .unranked-section {
  display: flex; flex-direction: column; padding: 0 !important; overflow: hidden;
  position: relative !important; inset: auto !important; box-shadow: none;
}
.tier-focused .unranked-head {
  min-height: 39px; flex: 0 0 auto; padding: 8px 11px; flex-wrap: wrap;
  gap: 4px 8px !important; border-bottom: 1px solid var(--line); font-size: .85rem;
}
.tier-focused .unranked-head small { font-size: .7rem; margin: 0 0 0 auto; }
.tier-focused .unranked-grid {
  display: grid !important; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)) !important;
  gap: 8px; align-content: start; align-items: start;
  min-height: 0; max-height: none !important; margin: 0; padding: 10px;
  overflow: auto; scrollbar-width: thin; flex: 1 1 0;
}
.tier-focused .unranked-grid .poster-card {
  width: 100% !important; height: auto !important; aspect-ratio: 5 / 7; min-height: 0;
}
.tier-focused .unranked-empty { grid-column: 1 / -1; }
.tier-focused :is(button, a, summary, input, select):focus-visible {
  outline: 2px solid var(--purple); outline-offset: 2px;
}
/* The same compact navigation drawer is available on desktop and phone. */
.tier-focused .mobile-nav-backdrop {
  display: block; position: fixed; inset: 0; z-index: 970; visibility: hidden;
  opacity: 0; background: #30220550; transition: opacity .15s;
}
.tier-focused .mobile-nav-backdrop.open { visibility: visible; opacity: 1; }
.tier-focused .mobile-nav-drawer {
  display: block; position: fixed; inset: 60px auto auto 16px; width: min(470px, calc(100vw - 32px));
  max-height: calc(100dvh - 80px); overflow: auto; z-index: 980; padding: 16px;
  background: #fffdf5; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 50px #38290f30; visibility: hidden; opacity: 0; transform: translateY(-8px);
}
.tier-focused .mobile-nav-drawer.open { visibility: visible; opacity: 1; transform: none; }
.tier-focused .mobile-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.tier-focused .mobile-drawer-close { width: 34px; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #fff8db; cursor: pointer; }
.tier-focused .mobile-drawer-section + .mobile-drawer-section { margin-top: 14px; }
.tier-focused .mobile-drawer-section h3 { color: #9b7b33; font-size: .7rem; margin: 0 0 7px; }
.tier-focused .mobile-drawer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.tier-focused .mobile-drawer-grid a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 67px; gap: 6px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; font-size: .75rem; font-weight: 700; color: #7e6532; background: white;
}
.tier-focused .mobile-drawer-grid a.active { background: #fff3bc; color: #664400; }
.tier-focused .mobile-drawer-grid .hd-icon { width: 22px; height: 22px; margin: 0; }
@media (max-width: 1100px) and (min-width: 901px) {
  .tier-focused .main > .header { gap: 12px !important; }
  .tier-focused .mobile-brand__copy { display: none; }
  .tier-focused .workbench { grid-template-columns: minmax(0, 1fr) 300px; }
  .tier-focused .tcard { flex-basis: 180px; width: 180px; }
}
@media (max-width: 900px) {
  body.tier-focused .app > .main { padding: 8px !important; gap: 7px !important; }
  .tier-focused .main > .header { grid-template-columns: minmax(0, 1fr) auto !important; gap: 5px 8px !important; }
  .tier-focused .main > .header > div:not(.mode-tabs):not(.mobile-site-header) { grid-column: 1 / -1; grid-row: 2; }
  .tier-focused .mobile-site-header { height: 34px; }
  .tier-focused .mobile-brand img { width: 27px; height: 31px; }
  .tier-focused .mobile-brand__copy strong { font-size: .75rem; }
  .tier-focused .mobile-menu-button { height: 30px; min-height: 30px; width: 30px; }
  .tier-focused .title { font-size: .96rem !important; }
  .tier-focused .mode-tabs a, .tier-focused .mode-tabs button { min-height: 30px; padding: 5px 8px !important; font-size: .69rem !important; }
  .tier-focused .app .topbar { padding: 6px !important; gap: 6px !important; }
  .tier-focused .app .topbar > * { grid-column: auto !important; }
  .tier-focused .topbar > .searchbox { flex: 1 1 120px; min-width: 100px; max-width: none; }
  .tier-focused .topbar #seasonFilter { flex: 1 1 155px; width: auto; max-width: none; }
  .tier-focused .topbar .select, .tier-focused .topbar .btn { width: auto; min-height: 32px; height: 32px; }
  .tier-focused .app .topbar.mobile-tier-controls:not(.mobile-controls-open) > .primary-action,
  .tier-focused .app .topbar.mobile-tier-controls:not(.mobile-controls-open) > .save-status { display: inline-flex !important; }
  .tier-focused .topbar .save-status { align-items: center; min-height: 32px; margin-left: 0; font-size: .66rem; }
  .tier-focused .mobile-tier-filter-toggle {
    width: auto; min-height: 32px; margin-left: auto; padding: 5px 8px; font-size: .68rem;
    gap: 4px; border-radius: 8px;
  }
  .tier-focused .mobile-tier-filter-toggle .hd-icon { width: 16px; height: 16px; }
  .tier-focused .workbench { display: flex !important; flex-direction: column; gap: 7px !important; }
  .tier-focused.tier-workbench-page .mobile-workbench-switcher {
    position: static !important; flex: 0 0 auto; padding: 3px; border-radius: 10px;
    gap: 3px; box-shadow: none;
  }
  .tier-focused .mobile-workbench-switcher button { min-height: 32px; padding: 4px; font-size: .73rem; }
  .tier-focused.tier-workbench-page .workbench > .panel { flex: 1 1 0; height: auto !important; min-height: 0; }
  .tier-focused.tier-browse-page .tier-panel { flex: 1 1 60%; min-height: 0; }
  .tier-focused.tier-browse-page .unranked-section { flex: 0 0 28%; min-height: 130px; }
  .tier-focused .panel-head { padding: 7px 9px !important; min-height: 34px; height: 34px !important; flex-direction: row !important; }
  .tier-focused .panel-head small:not(.workspace-summary) { display: none; }
  .tier-focused .panel-head, .tier-focused .unranked-head { font-size: .76rem; }
  .tier-focused .workspace-summary { font-size: .65rem; }
  .tier-focused .workspace-summary .pending-label { display: none; }
  .tier-focused .tier-lanes { padding: 6px !important; }
  .tier-focused .tier-head {
    width: 56px !important; flex-basis: 56px; flex-direction: column;
    gap: 1px !important; padding: 6px 3px !important;
  }
  .tier-focused .tier-letter { font-size: 1.45rem !important; }
  .tier-focused .tier-info b { font-size: .58rem !important; }
  .tier-focused .tier-info span { display: none; }
  .tier-focused .tier-row > .count { display: none; }
  .tier-focused .tier-body { padding: 6px !important; gap: 6px; }
  .tier-focused .tcard { flex: 1 1 175px; max-width: 260px; width: auto; }
  .tier-focused .order-move { width: 32px; min-height: 26px; height: 26px; }
  .tier-focused .card-order-actions .remove { width: 26px; min-height: 26px; height: 26px; }
  .tier-focused .pool-item { grid-template-columns: 18px 44px minmax(0, 1fr) auto !important; }
  .tier-focused .pool-actions { grid-column: auto !important; display: grid; }
  .tier-focused .unranked-head { min-height: 32px; padding: 6px 9px; flex-wrap: nowrap; }
  .tier-focused .unranked-head small { width: auto; order: 0; font-size: .61rem; }
  .tier-focused .unranked-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)) !important; padding: 7px; gap: 6px; }
  .tier-focused .toast { bottom: 12px !important; padding: 9px 12px; font-size: .8rem; }
}
@media (max-width: 360px) {
  .tier-focused .mobile-brand__copy { display: none; }
  .tier-focused .title { font-size: .86rem !important; }
  .tier-focused .save-status { display: none !important; }
  .tier-focused .app .topbar.mobile-tier-controls:not(.mobile-controls-open) > .save-status { display: none !important; }
  .tier-focused .mobile-tier-filter-label { font-size: 0; }
  .tier-focused .mobile-tier-filter-label:after { content: '筛选'; font-size: .68rem; }
}

/* Keep complete poster rows; a large pool scrolls vertically. */
.tier-focused .unranked-grid {
  grid-template-columns: repeat(auto-fill, 60px) !important;
  grid-auto-rows: 84px; justify-content: space-between; align-content: start;
}
.tier-focused .unranked-grid .poster-card {
  width: 60px !important; height: 84px !important; aspect-ratio: auto; min-height: 84px;
}
.tier-focused .tier-head { align-items: flex-start; padding-top: 15px !important; }
@media (max-width: 900px) {
  .tier-focused .topbar .select, .tier-focused .topbar input { font-size: .75rem !important; }
  .tier-focused.tier-browse-page .tier-panel { order: 0 !important; }
  .tier-focused.tier-browse-page .unranked-section { order: 1 !important; }
  .tier-focused .tier-head { justify-content: flex-start; align-items: center; }
  .tier-focused .unranked-grid { grid-template-columns: repeat(auto-fill, 44px) !important; grid-auto-rows: 62px; }
  .tier-focused .unranked-grid .poster-card { width: 44px !important; height: 62px !important; min-height: 62px; }
}

.tier-focused .tcard { grid-template-columns: 38px minmax(0, 1fr); }
.tier-focused .btn.export::before { display: none; }
@media (max-width: 900px) {
  .tier-focused .app .topbar > a.btn.primary-action { width: auto !important; flex: 0 0 auto; }
  .tier-focused .app .topbar > .primary-action { flex: 0 0 auto; }
}

/* Custom names and explanations replace score bands. */
.tier-focused .tier-row { min-height: 104px !important; }
.tier-focused .tier-head {
  width: 164px !important; flex-basis: 164px; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  gap: 6px !important; padding: 12px 10px !important;
}
.tier-focused .tier-head .tier-letter {
  display: block; font-size: 1.5rem !important; line-height: 1.15; white-space: nowrap;
}
.tier-focused .tier-description {
  display: block; width: 100%; font-size: .68rem; line-height: 1.5;
  font-weight: 500; color: #fff; white-space: normal; overflow-wrap: anywhere;
}
.tier-focused .pool-actions { grid-template-columns: repeat(3, 43px); gap: 4px; }
.tier-focused .pool-actions .assign { width: 43px; min-height: 26px; height: 26px; font-size: .63rem; }
@media (max-width: 900px) {
  .tier-focused .tier-head {
    width: 100px !important; flex-basis: 100px; padding: 9px 7px !important; gap: 5px !important;
  }
  .tier-focused .tier-head .tier-letter { font-size: 1.12rem !important; }
  .tier-focused .tier-description { font-size: .6rem; line-height: 1.45; }
}
