:root {
  --ink: #171717;
  --muted: #747474;
  --line: rgba(16, 16, 16, 0.12);
  --panel: rgba(248, 248, 246, 0.84);
  --panel-solid: #f7f7f5;
  --accent: #171717;
  --coral: #c75b4b;
  --gold: #b88929;
  --shadow: 0 30px 90px rgba(18, 18, 18, 0.2);
}

* {
  box-sizing: border-box;
}

[v-cloak] {
  display: none;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 18% 16%, rgba(199, 91, 75, 0.16), transparent 26%),
    radial-gradient(circle at 84% 22%, rgba(35, 35, 35, 0.12), transparent 28%),
    linear-gradient(135deg, #f2f0ec 0%, #dbddd9 48%, #f7f4ef 100%);
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.desktop-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 34px;
}

.mac-window {
  position: relative;
  width: min(1180px, 100%);
  height: min(820px, calc(100vh - 68px));
  display: grid;
  grid-template-rows: 58px 1fr;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.3);
}

.titlebar {
  display: grid;
  grid-template-columns: 126px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(252, 253, 251, 0.64);
}

.traffic {
  display: flex;
  gap: 8px;
}

.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.red { background: #ff5f57; }
.amber { background: #ffbd2e; }
.green { background: #28c840; }

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  justify-self: center;
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, #262626, #0f0f0f);
  font-weight: 800;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  border-radius: 10px;
  background: rgba(40, 46, 48, 0.08);
}

.tabs button {
  min-width: 62px;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--muted);
  background: transparent;
}

.tabs button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 4px 18px rgba(28, 35, 33, 0.12);
}

.content {
  min-width: 0;
  min-height: 0;
  padding: 28px;
  overflow: hidden;
}

.search-view {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 18px;
}

.searchbar {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 12px;
}

.searchbar input,
.login-panel input,
.admin-section textarea,
.limit-editor input {
  border: 1px solid var(--line);
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.searchbar input {
  height: 54px;
  padding: 0 20px;
  border-radius: 14px;
}

.searchbar input:focus,
.login-panel input:focus,
.admin-section textarea:focus,
.limit-editor input:focus {
  border-color: rgba(20, 20, 20, 0.34);
  box-shadow: 0 0 0 4px rgba(18, 18, 18, 0.08);
}

.searchbar button,
.admin-footer button,
.login-panel button {
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 14px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: linear-gradient(180deg, #5a5a5d 0%, #2b2b2e 100%);
  box-shadow: 0 1px 1px rgba(255, 255, 255, 0.4) inset, 0 8px 18px rgba(20, 20, 22, 0.18);
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.searchbar button:hover,
.admin-footer button:hover,
.login-panel button:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 1px rgba(255, 255, 255, 0.4) inset, 0 12px 24px rgba(20, 20, 22, 0.22);
}

.searchbar button:active,
.admin-footer button:active,
.login-panel button:active {
  transform: translateY(0);
  box-shadow: 0 1px 1px rgba(255, 255, 255, 0.3) inset, 0 4px 12px rgba(20, 20, 22, 0.2);
}

.searchbar button.is-loading {
  color: var(--ink);
  background: linear-gradient(180deg, #ffffff 0%, #f0f0ee 100%);
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 6px 16px rgba(20, 20, 22, 0.12);
}

.searchbar button:disabled,
.admin-footer button:disabled {
  cursor: default;
  opacity: 0.5;
  box-shadow: none;
  transform: none;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(20, 20, 22, 0.18);
  border-top-color: rgba(20, 20, 22, 0.75);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.mini-loader {
  position: relative;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 7px;
  background: linear-gradient(180deg, #fff 0%, #f0f0ee 100%);
  box-shadow: inset 0 0 0 1px rgba(20, 20, 22, 0.1);
}

.mini-loader::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2px solid rgba(216, 95, 77, 0.22);
  border-top-color: #d85f4d;
  border-right-color: #2f3033;
  animation: spin 0.8s linear infinite;
}

.stats-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.stats-row span {
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.6);
}

.filter-strip {
  min-width: 0;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.filter-strip::-webkit-scrollbar {
  display: none;
}

.filter-strip button {
  min-width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.54);
}

.filter-strip button.active {
  color: var(--ink);
  border-color: rgba(20, 20, 20, 0.34);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(18, 18, 18, 0.1);
}

.filter-strip img,
.cloud-grid img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.results-panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 4px;
  contain: layout paint;
}

.results-panel > .empty-state {
  height: 100%;
  min-height: 360px;
}

.results-panel > .empty-state.loading-state {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 92px;
}

.results-panel > .empty-state.loading-state .loader-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.result-card {
  min-width: 0;
  max-height: 118px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: center;
  transition: opacity 0.24s ease, transform 0.24s ease, max-height 0.34s cubic-bezier(0.22, 1, 0.36, 1), margin 0.34s cubic-bezier(0.22, 1, 0.36, 1), padding 0.34s cubic-bezier(0.22, 1, 0.36, 1), border-width 0.34s ease;
  will-change: opacity, transform, max-height;
}

.result-card.removing {
  max-height: 0;
  margin: -4px 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  opacity: 0;
  transform: translate3d(12px, -4px, 0) scale(0.985);
  pointer-events: none;
  overflow: hidden;
}

.disk-icon {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.result-main {
  min-width: 0;
}

.result-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
}

.result-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
}

.result-card h2 span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.validity {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 7px;
  font-size: 12px;
  color: #fff;
  background: #8a9298;
}

.validity.valid { background: var(--accent); }
.validity.invalid { background: var(--coral); }
.validity.checking { background: var(--gold); }

.card-actions {
  display: flex;
  gap: 8px;
  min-width: 104px;
}

.card-actions button,
.section-head button {
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--ink);
  background: rgba(40, 46, 48, 0.08);
}

.card-actions .primary-action {
  min-width: 92px;
  color: #fff;
  background: linear-gradient(180deg, #4f5155 0%, #222326 100%);
  box-shadow: 0 8px 18px rgba(20, 20, 22, 0.16);
}

.card-actions .primary-action:disabled {
  cursor: default;
  opacity: 0.72;
}

.resource-toast {
  position: absolute;
  left: 50%;
  top: 50%;
  bottom: auto;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 210px;
  justify-content: center;
  padding: 14px 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 18px;
  color: var(--ink);
  background: rgba(252, 252, 250, 0.94);
  box-shadow: 0 18px 48px rgba(18, 18, 18, 0.22);
  backdrop-filter: blur(18px) saturate(1.4);
  transform: translate(-50%, -50%);
}

.toast-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2f8f4e;
  font-size: 13px;
  font-weight: 800;
}

.empty-state {
  min-height: 260px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: var(--muted);
}

.empty-state strong {
  color: var(--ink);
  font-size: 20px;
}

.title-tabs.mode-tabs {
  width: max-content;
  min-width: 0;
  display: inline-flex;
  flex: 0 0 auto;
  justify-self: end;
  padding: 5px;
  border-radius: 12px;
  background: rgba(40, 46, 48, 0.08);
}

.title-tabs.mode-tabs button {
  min-width: 54px;
  height: 30px;
  padding: 0 12px;
}

.title-tabs.mode-tabs button.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 4px 12px rgba(25, 25, 25, 0.08);
}

.ranking-home {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
}

.ranking-tabs {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.ranking-categories {
  min-width: 0;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.ranking-categories::-webkit-scrollbar {
  display: none;
}

.ranking-categories button,
.ranking-refresh {
  min-width: max-content;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
}

.ranking-categories button.active {
  color: #fff;
  background: linear-gradient(180deg, #f07c64 0%, #d85f4d 100%);
  box-shadow: 0 8px 18px rgba(216, 95, 77, 0.22);
}

.ranking-refresh {
  background: rgba(40, 46, 48, 0.08);
}

.ranking-refresh:disabled {
  cursor: default;
  opacity: 0.56;
}

.ranking-error {
  color: var(--coral);
  font-size: 13px;
}

.ranking-board {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding-right: 4px;
}

.ranking-panel {
  min-width: 0;
  align-self: start;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.ranking-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.08);
}

.ranking-panel header div {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.ranking-panel header strong {
  font-size: 16px;
}

.ranking-panel header span,
.ranking-copy small {
  color: var(--muted);
  font-size: 12px;
}

.ranking-item-card {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 30px 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.ranking-item-card:hover .ranking-copy strong {
  color: var(--coral);
}

.ranking-number {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  background: rgba(40, 46, 48, 0.06);
  font-size: 13px;
  font-weight: 700;
}

.ranking-number.top {
  color: #fff;
  background: linear-gradient(180deg, #f07c64 0%, #d85f4d 100%);
}

.ranking-item-card img {
  width: 42px;
  height: 58px;
  border-radius: 6px;
  object-fit: cover;
  background: #ececea;
}

.ranking-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.ranking-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  transition: color 0.2s ease;
}

.ranking-value {
  color: var(--muted);
  font-size: 13px;
}

.movie-dialog-mask {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 22, 0.28);
  backdrop-filter: blur(8px);
}

.movie-dialog {
  position: relative;
  width: min(640px, 100%);
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(252, 252, 250, 0.96);
  box-shadow: 0 24px 70px rgba(18, 18, 18, 0.28);
}

.movie-dialog > img {
  width: 160px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  object-fit: cover;
  background: #ececea;
}

.movie-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(40, 46, 48, 0.08);
  font-size: 22px;
  line-height: 1;
}

.movie-detail {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 24px;
}

.movie-rank {
  width: max-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(180deg, #f07c64 0%, #d85f4d 100%);
  font-size: 12px;
}

.movie-detail h2 {
  margin: 0;
  font-size: 24px;
}

.movie-meta,
.movie-desc {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.movie-desc {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

.movie-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.movie-actions button {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(180deg, #4f5155 0%, #222326 100%);
}

.movie-actions .ghost-btn {
  color: var(--ink);
  background: rgba(40, 46, 48, 0.08);
}

.resource-dialog-mask {
  position: absolute;
  inset: 0;
  z-index: 31;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 20, 22, 0.24);
  backdrop-filter: blur(8px);
}

.resource-dialog {
  position: relative;
  width: min(740px, 100%);
  max-height: min(560px, calc(100vh - 88px));
  display: grid;
  grid-template-rows: auto auto auto minmax(0, auto) auto;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  background: rgba(252, 252, 250, 0.97);
  box-shadow: 0 24px 70px rgba(18, 18, 18, 0.28);
}

.resource-dialog header {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-right: 34px;
}

.resource-dialog header div {
  min-width: 0;
}

.resource-dialog footer > span {
  color: var(--muted);
  font-size: 12px;
}

.resource-dialog h2 {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 22px;
  line-height: 1.25;
}

.resource-path {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}

.resource-path::-webkit-scrollbar {
  display: none;
}

.resource-path button {
  position: relative;
  min-width: max-content;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}

.resource-path button:not(:last-child) {
  margin-right: 18px;
}

.resource-path button:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-top: 2px solid rgba(20, 20, 22, 0.28);
  border-right: 2px solid rgba(20, 20, 22, 0.28);
  transform: translateY(-50%) rotate(45deg);
}

.resource-path button.active {
  color: var(--ink);
  background: rgba(40, 46, 48, 0.08);
  font-weight: 700;
}

.resource-file-list {
  min-height: 0;
  max-height: min(330px, calc(100vh - 300px));
  overflow-y: auto;
  display: grid;
  align-content: start;
  border: 1px solid rgba(16, 16, 16, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.44);
}

.resource-file-row {
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.07);
  color: var(--ink);
  text-align: left;
  background: rgba(255, 255, 255, 0.52);
}

.resource-file-row:last-child {
  border-bottom: 0;
}

.resource-file-row.folder {
  background: rgba(255, 255, 255, 0.76);
}

.resource-file-row:disabled {
  cursor: default;
}

.resource-file-row > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.resource-file-row small {
  color: var(--muted);
  font-size: 12px;
}

.resource-kind-icon {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: transparent;
}

.resource-kind-icon img {
  width: 34px;
  height: 34px;
  display: block;
}

.resource-loading,
.resource-empty {
  min-height: 230px;
}

.resource-loading {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  color: var(--ink);
}

.resource-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid rgba(16, 16, 16, 0.08);
}

.resource-dialog footer div {
  display: flex;
  gap: 10px;
}

.resource-dialog footer button {
  min-width: 96px;
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  color: var(--ink);
  background: rgba(40, 46, 48, 0.08);
  font-weight: 600;
}

.resource-dialog footer .primary-action {
  color: #fff;
  background: linear-gradient(180deg, #4f5155 0%, #222326 100%);
  box-shadow: 0 8px 18px rgba(20, 20, 22, 0.16);
}

.media-ranking {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.media-filter-card,
.media-list-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 30px rgba(25, 25, 25, 0.04);
}

.media-filter-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}

.media-filter-card h2 {
  margin: 0 0 2px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.08);
  font-size: 16px;
}

.media-filter-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.media-filter-row > span {
  padding-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.media-filter-row > div {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.media-filter-row button,
.media-rank-tabs button {
  min-width: max-content;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(40, 46, 48, 0.06);
  font-size: 13px;
}

.media-filter-row button.active,
.media-rank-tabs button.active {
  color: #fff;
  background: linear-gradient(180deg, #f07c64 0%, #d85f4d 100%);
  box-shadow: 0 8px 18px rgba(216, 95, 77, 0.2);
}

.media-list-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
  overflow: hidden;
}

.media-list-card > header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.08);
}

.media-rank-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.media-list-card > header > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
}

.media-poster-grid {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  align-content: start;
  gap: 16px 14px;
  padding-right: 4px;
}

.media-poster-card {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.media-poster-cover {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  aspect-ratio: 2 / 3;
  background: #ececea;
}

.media-poster-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.media-poster-rank,
.media-poster-score {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
}

.media-poster-rank {
  top: 8px;
  left: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f07c64 0%, #d85f4d 100%);
}

.media-poster-score {
  right: 8px;
  bottom: 8px;
  min-width: 54px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(216, 95, 77, 0.9);
  font-size: 12px;
}

.media-poster-card strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.media-poster-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.media-empty {
  min-height: 180px;
}

.loading-state {
  min-height: 220px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  color: var(--muted);
  text-align: center;
}

.loading-state strong {
  color: var(--ink);
  font-size: 18px;
}

.loading-state small {
  color: var(--muted);
  font-size: 13px;
}

.loader-mark {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
}

.loader-mark::before,
.loader-mark::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px solid rgba(216, 95, 77, 0.15);
  animation: loaderPulse 1.6s ease-out infinite;
}

.loader-mark::after {
  animation-delay: 0.45s;
}

.loader-mark > span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 4px solid rgba(216, 95, 77, 0.18);
  border-top-color: #d85f4d;
  border-right-color: #2f3033;
  animation: spin 0.8s linear infinite;
}

@keyframes loaderPulse {
  0% {
    opacity: 0.9;
    transform: scale(0.82);
  }
  100% {
    opacity: 0;
    transform: scale(1.18);
  }
}

.admin-view {
  min-height: 0;
}

.login-panel {
  width: min(360px, 100%);
  margin: 86px auto;
  display: grid;
  gap: 12px;
}

.login-panel h1,
.admin-section h1 {
  margin: 0;
  font-size: 20px;
}

.login-panel input {
  height: 48px;
  padding: 0 14px;
  border-radius: 12px;
}

.login-panel p {
  margin: 0;
  color: var(--coral);
}

.admin-grid {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  grid-template-rows: 1fr auto 1fr auto;
  gap: 14px;
}

.admin-section {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.6);
}

.section-head,
.admin-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.check-list,
.cloud-grid {
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 8px;
}

.check-list {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.check-list label,
.cloud-grid label {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
}

.check-list span,
.cloud-grid span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-section textarea {
  width: 100%;
  min-height: 0;
  resize: none;
  padding: 12px;
  border-radius: 12px;
  line-height: 1.55;
}

.limit-editor {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.limit-editor input {
  width: 108px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
}

.cloud-grid {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.admin-footer {
  grid-column: 1 / -1;
  padding-top: 2px;
  color: var(--muted);
}

.admin-footer button {
  width: 140px;
}

.admin-view {
  min-height: 0;
  overflow: hidden;
}

.admin-layout {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 16px;
  position: relative;
}

.admin-sidebar,
.admin-main {
  min-height: 0;
  display: grid;
  align-content: stretch;
  gap: 14px;
}

.admin-sidebar {
  grid-template-rows: auto minmax(0, 1fr);
}

.title-tabs {
  min-width: 220px;
  justify-self: end;
}

.title-tabs button {
  height: 30px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
}

.title-tabs button.active {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 12px rgba(25, 25, 25, 0.08);
}

.admin-main {
  grid-template-rows: minmax(0, 1fr);
  overflow: hidden;
}

.admin-pane {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
  display: grid;
  gap: 14px;
}

.admin-pane-drive {
  grid-template-rows: auto minmax(360px, 1fr) auto;
}

.admin-pane-search {
  grid-template-rows: minmax(170px, 0.8fr) minmax(170px, 0.8fr) minmax(210px, 0.9fr) minmax(170px, 0.75fr);
  padding-bottom: 2px;
}

.account-card,
.drive-panel,
.admin-hero,
.file-manager,
.settings-board > .admin-section,
.cloud-filter-section,
.slim-section {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 8px 30px rgba(25, 25, 25, 0.04);
}

.account-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}

.account-card span,
.eyebrow,
.file-toolbar span,
.drive-item small,
.settings-form span,
.switch-row span {
  color: var(--muted);
  font-size: 12px;
}

.account-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #6d82ff, #2d4ce8);
  font-weight: 800;
}

.account-card div:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.drive-panel,
.slim-section,
.file-manager,
.cloud-filter-section {
  min-height: 0;
  padding: 14px;
}

.drive-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.section-head.compact h1 {
  font-size: 18px;
}

.switch-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.drive-list {
  min-height: 0;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  margin-top: 12px;
}

.drive-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.drive-item img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.drive-item.active {
  background: rgba(45, 76, 232, 0.1);
  box-shadow: inset 0 0 0 1px rgba(45, 76, 232, 0.16);
}

.drive-item.disabled {
  cursor: default;
  opacity: 0.48;
}

.compact-list {
  grid-template-columns: 1fr;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
}

.admin-hero h1 {
  margin: 4px 0;
  font-size: 24px;
}

.admin-hero p {
  margin: 0;
  color: var(--muted);
}

.capacity-meter {
  width: min(360px, 100%);
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(20, 20, 22, 0.08);
  box-shadow: inset 0 1px 2px rgba(20, 20, 22, 0.08);
}

.capacity-meter span {
  display: block;
  height: 100%;
  min-width: 4px;
  border-radius: inherit;
  background: linear-gradient(90deg, #6d82ff 0%, #2f63ff 62%, #171717 100%);
}

.hero-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-actions button,
.file-toolbar button {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 11px;
  color: var(--ink);
  background: rgba(40, 46, 48, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
  font-size: 17px;
  line-height: 1;
}

.icon-actions button:hover,
.file-toolbar button:hover {
  background: rgba(40, 46, 48, 0.13);
}

.file-manager {
  min-height: 320px;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 10px;
  overflow: hidden;
}

.file-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.path-bar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.path-bar::-webkit-scrollbar {
  display: none;
}

.path-bar button {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(40, 46, 48, 0.06);
}

.path-bar button::after {
  content: "›";
  margin-left: 8px;
  color: rgba(20, 20, 22, 0.32);
}

.path-bar button:last-child {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
}

.path-bar button:last-child::after {
  content: "";
  margin: 0;
}

.error-line {
  margin: 0;
  color: var(--coral);
  font-size: 13px;
}

.file-table {
  grid-row: 4;
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(16, 16, 16, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.4);
}

.file-row {
  min-height: 50px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 92px;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border-bottom: 1px solid rgba(16, 16, 16, 0.07);
  background: rgba(255, 255, 255, 0.5);
}

.file-row.folder {
  background: rgba(255, 255, 255, 0.68);
}

.file-row:last-child {
  border-bottom: 0;
}

.file-head {
  min-height: 38px;
  position: sticky;
  top: 0;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
  background: rgba(244, 244, 242, 0.96);
  backdrop-filter: blur(10px);
}

.file-name,
.file-open {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-open {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
}

.file-open:disabled {
  cursor: default;
}

.file-row.folder .file-open {
  cursor: pointer;
}

.file-kind-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(180deg, #fafafa 0%, #e7e9ee 100%);
  box-shadow: inset 0 0 0 1px rgba(16, 16, 16, 0.08);
}

.file-kind-icon::before,
.file-kind-icon::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.file-kind-icon.folder {
  background: linear-gradient(180deg, #f5c860 0%, #e7a93f 100%);
}

.file-kind-icon.folder::before {
  width: 14px;
  height: 6px;
  left: 4px;
  top: 5px;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(180deg, #f8d17f 0%, #ebb64e 100%);
}

.file-kind-icon.folder::after {
  inset: 10px 4px 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ffd46e 0%, #f0b341 100%);
}

.file-kind-icon.file::before,
.file-kind-icon.doc::before,
.file-kind-icon.archive::before,
.file-kind-icon.image::before,
.file-kind-icon.video::before {
  inset: 5px 7px 5px 7px;
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(16, 16, 16, 0.1);
}

.file-kind-icon.file::after,
.file-kind-icon.doc::after,
.file-kind-icon.archive::after,
.file-kind-icon.image::after,
.file-kind-icon.video::after {
  width: 9px;
  height: 9px;
  right: 4px;
  top: 4px;
  border-radius: 0 4px 0 4px;
  background: rgba(16, 16, 16, 0.08);
}

.file-kind-icon.doc::before {
  background: linear-gradient(180deg, #ffffff 0%, #f2f5fb 100%);
}

.file-kind-icon.doc::after {
  background: linear-gradient(180deg, #7aa3ff 0%, #4d73e6 100%);
}

.file-kind-icon.image::before {
  background: linear-gradient(180deg, #ffffff 0%, #eef8f3 100%);
}

.file-kind-icon.image::after {
  background: linear-gradient(180deg, #57b9a3 0%, #2e8c77 100%);
}

.file-kind-icon.archive::before {
  background: linear-gradient(180deg, #fef6e6 0%, #f7e3b3 100%);
}

.file-kind-icon.archive::after {
  background: linear-gradient(180deg, #c58a2a 0%, #9a671f 100%);
}

.file-kind-icon.video::before {
  background: linear-gradient(180deg, #f1f4ff 0%, #dfe5ff 100%);
}

.file-kind-icon.video::after {
  top: 11px;
  right: 9px;
  width: 0;
  height: 0;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 7px solid #4d63d8;
  border-radius: 0;
  background: transparent;
}

.file-row.folder .file-kind-icon {
  box-shadow: inset 0 0 0 1px rgba(174, 117, 0, 0.15);
}

.file-empty {
  grid-row: 4;
  min-height: 160px;
}

.settings-board {
  min-height: 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
}

.settings-board.single-board {
  grid-template-columns: 1fr;
}

.settings-board .admin-section {
  min-height: 0;
  padding: 14px;
}

.settings-form {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.settings-form.two-col {
  grid-template-columns: 128px 1fr;
}

.settings-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.settings-form .field-wide {
  grid-column: 1 / -1;
}

.settings-form input,
.settings-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  outline: none;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.84);
}

.settings-form input {
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
}

.settings-form textarea {
  min-height: 74px;
  resize: none;
  padding: 10px;
  border-radius: 10px;
}

.transfer-config-card textarea {
  min-height: 86px;
}

.cloud-filter-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.docked-footer {
  grid-column: 1 / -1;
  padding: 0;
}

/* 管理页重构覆盖 */
.admin-view {
  padding: 18px;
}

.admin-layout {
  gap: 14px;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 58px;
}

.admin-main {
  min-height: 0;
  overflow: hidden;
}

.admin-pane {
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.admin-pane-drive {
  grid-template-rows: auto minmax(300px, 1fr) auto;
}

.admin-pane-search {
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
}

.search-card {
  min-height: 0;
  padding: 16px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.plugin-card,
.channels-card {
  min-height: 220px;
}

.cloud-filter-section {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.limit-card {
  grid-column: 1;
}

.check-list,
.cloud-grid {
  min-height: 0;
  overflow: auto;
  align-content: start;
  gap: 8px;
}

.channels-card textarea {
  min-height: 0;
  height: 100%;
}

.admin-hero,
.file-manager,
.transfer-config-card,
.search-card,
.docked-footer {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 16, 16, 0.1);
}

.hero-actions.icon-actions,
.row-actions.icon-actions {
  justify-content: flex-end;
}

.icon-actions button,
.file-toolbar button {
  width: auto;
  min-width: 54px;
  height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.file-manager {
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
}

.file-toolbar {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.file-toolbar > div:first-child {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.path-bar {
  justify-content: flex-end;
}

.file-table,
.file-empty {
  grid-row: 3;
}

.file-row {
  grid-template-columns: minmax(0, 1fr) 92px 124px;
  min-height: 52px;
}

.file-head {
  min-height: 40px;
}

.file-type-label {
  color: var(--muted);
  font-size: 13px;
}

.file-kind-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.file-kind-icon.folder {
  background: linear-gradient(180deg, #ffdb7a 0%, #f0ad3f 100%);
}

.file-kind-icon.video::before,
.file-kind-icon.image::before,
.file-kind-icon.doc::before,
.file-kind-icon.archive::before,
.file-kind-icon.file::before {
  inset: 6px 8px;
  border-radius: 5px;
}

.transfer-config-card {
  min-height: 0;
  padding: 16px;
}

.transfer-config-card .settings-form {
  grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(110px, 0.7fr));
  align-items: end;
}

.transfer-config-card .settings-form .field-wide {
  grid-column: auto;
}

.transfer-config-card textarea {
  min-height: 58px;
}

.docked-footer {
  align-self: end;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 16px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(25, 25, 25, 0.06);
}

.docked-footer button {
  width: 132px;
  height: 40px;
  border-radius: 12px;
}

@media (max-width: 960px) {
  .admin-layout {
    grid-template-columns: 1fr;
    overflow: auto;
  }

  .admin-sidebar,
  .admin-main {
    overflow: visible;
  }

  .admin-main,
  .admin-sidebar {
    grid-template-rows: none;
  }

  .settings-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  body {
    background: linear-gradient(180deg, #f8f8f6 0%, #e6e6e3 100%);
  }

  .desktop-shell {
    padding: 0;
    place-items: stretch;
  }

  .mac-window {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    grid-template-rows: auto 1fr;
    border: 0;
    border-radius: 0;
    background: rgba(248, 250, 249, 0.96);
    box-shadow: none;
  }

  .titlebar {
    grid-template-columns: 1fr auto;
    justify-items: stretch;
    gap: 10px;
    height: auto;
    padding: 12px 14px;
  }

  .traffic {
    display: none;
  }

  .brand {
    justify-self: start;
  }

  .mode-tabs {
    justify-self: end;
    min-width: 0;
  }

  .tabs {
    width: 100%;
  }

  .tabs button {
    flex: 1;
  }

  .content {
    padding: 16px;
  }

  .searchbar {
    grid-template-columns: 1fr;
  }

  .ranking-home {
    overflow: auto;
  }

  .ranking-tabs {
    align-items: flex-start;
  }

  .ranking-board {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    padding-right: 0;
  }

  .ranking-panel {
    width: 100%;
    max-width: 100%;
    padding: 12px;
  }

  .ranking-panel:not(:first-child) {
    display: none;
  }

  .ranking-panel header {
    padding-bottom: 10px;
  }

  .ranking-item-card {
    display: inline-grid;
  }

  .ranking-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .ranking-panel header,
  .ranking-loading {
    grid-column: 1 / -1;
  }

  .ranking-item-card {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 6px;
    padding: 0;
  }

  .home-ranking .ranking-item-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
  }

  .home-ranking .ranking-item-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    border-radius: 9px;
    grid-row: auto;
    grid-column: auto;
    box-shadow: 0 8px 18px rgba(20, 20, 22, 0.08);
  }

  .home-ranking .ranking-number {
    position: absolute;
    left: 7px;
    top: 7px;
    z-index: 1;
    width: auto;
    height: 24px;
    margin: 0;
    padding: 0 8px;
    border-radius: 7px;
    color: #fff;
    background: linear-gradient(180deg, rgba(240, 124, 100, 0.96) 0%, rgba(216, 95, 77, 0.96) 100%);
    font-size: 12px;
    box-shadow: 0 6px 14px rgba(20, 20, 22, 0.18);
  }

  .home-ranking .ranking-number::before {
    content: "TOP";
  }

  .home-ranking .ranking-copy {
    display: block;
  }

  .home-ranking .ranking-copy strong {
    display: block;
    white-space: normal;
    text-align: center;
    font-size: 14px;
    line-height: 1.25;
    word-break: break-word;
  }

  .home-ranking .ranking-copy small,
  .home-ranking .ranking-value {
    display: none;
  }

  .media-ranking {
    overflow-y: auto;
    grid-template-rows: auto auto;
  }

  .media-filter-card,
  .media-list-card {
    border-radius: 12px;
  }

  .media-filter-card {
    gap: 8px;
    padding: 10px 12px;
  }

  .media-filter-card h2 {
    padding-bottom: 8px;
    font-size: 15px;
  }

  .media-filter-row {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 8px;
  }

  .media-filter-row > span {
    padding-top: 4px;
    font-size: 12px;
  }

  .media-filter-row button,
  .media-rank-tabs button {
    height: 26px;
    padding: 0 10px;
    font-size: 12px;
  }

  .media-filter-row > div {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .media-filter-row > div::-webkit-scrollbar {
    display: none;
  }

  .media-list-card {
    overflow: visible;
    padding: 12px;
  }

  .media-list-card > header {
    align-items: flex-start;
  }

  .media-list-card > header > span {
    font-size: 12px;
  }

  .media-poster-grid {
    overflow: visible;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 10px;
    padding-right: 0;
  }

  .media-poster-card {
    gap: 6px;
  }

  .media-poster-cover {
    width: 100%;
  }

  .media-poster-rank {
    width: auto;
    height: 24px;
    min-width: 28px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
  }

  .media-poster-score {
    display: none;
  }

  .media-poster-card strong {
    white-space: normal;
    text-align: center;
    font-size: 13px;
    line-height: 1.25;
  }

  .media-poster-card small {
    text-align: center;
    font-size: 11px;
  }

  .movie-dialog-mask {
    padding: 14px;
  }

  .movie-dialog {
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: start;
    width: min(380px, 100%);
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
  }

  .movie-dialog > img {
    width: 112px;
    justify-self: start;
    border-radius: 10px;
  }

  .movie-detail {
    padding-right: 0;
  }

  .movie-detail h2 {
    padding-right: 28px;
    font-size: 20px;
    line-height: 1.25;
  }

  .movie-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .movie-desc {
    -webkit-line-clamp: 3;
  }

  .resource-dialog-mask {
    padding: 12px;
  }

  .resource-dialog {
    width: 100%;
    max-height: calc(100vh - 24px);
    min-height: 0;
    grid-template-rows: auto auto auto minmax(0, auto) auto;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
  }

  .resource-dialog h2 {
    font-size: 18px;
  }

  .resource-path {
    padding-bottom: 4px;
  }

  .resource-file-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    min-height: 54px;
  }

  .resource-file-list {
    max-height: min(54vh, 390px);
  }

  .resource-file-row small {
    grid-column: 2;
    margin-top: -5px;
  }

  .resource-kind-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }

  .resource-dialog footer {
    align-items: stretch;
    flex-direction: column;
  }

  .resource-dialog footer div {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .result-card {
    grid-template-columns: 38px minmax(0, 1fr);
    max-height: 164px;
  }

  .card-actions {
    grid-column: 2;
  }

  .card-actions button {
    flex: 1;
  }

  .admin-grid {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    overflow: auto;
  }

  .admin-section:first-child,
  .admin-footer {
    grid-row: auto;
    grid-column: auto;
  }
}
