.search-form {
  min-width: 0;
  min-height: 56px;
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: 0 1px 2px color-mix(in srgb, var(--text) 5%, transparent);
  transition: border-color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast);
}

.search-form:hover {
  border-color: color-mix(in srgb, var(--accent) 32%, var(--line-strong));
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-accent));
}

.search-form:focus-within {
  border-color: var(--accent-focus);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-focus) 15%, transparent), 0 4px 12px color-mix(in srgb, var(--accent) 10%, transparent);
}

.search-field {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  padding-left: 12px;
}

.search-icon { width: 21px; height: 21px; color: var(--accent); }
.search-form input { width: 100%; min-width: 0; border: 0; outline: 0; padding: 14px 12px 14px 0; color: var(--text); background: transparent; }
.search-form input:focus-visible { outline: 0 !important; }
.search-form input::placeholder { color: var(--subtle); opacity: 1; }

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 9px 15px;
  color: var(--text);
  background: var(--surface);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--motion-fast), background var(--motion-fast), border-color var(--motion-fast), transform var(--motion-fast);
}

.button:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); color: var(--accent); background: var(--surface-accent); }
.button:active { transform: translateY(1px); }
.button.primary { border-color: var(--accent); color: var(--accent-contrast); background: var(--accent); }
.button.primary:hover { border-color: var(--accent-hover); color: var(--accent-contrast); background: var(--accent-hover); }
.button.secondary { background: transparent; }
.button > .icon { width: 16px; height: 16px; }
.button-arrow { transition: transform var(--motion-fast) var(--ease-out); }
.button:hover .button-arrow { transform: translateX(2px); }

.search-submit { min-width: 112px; margin: 0; border: 0; border-radius: 10px; }
.search-submit:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 18%, transparent); }
.button-loading { display: none; align-items: center; gap: 8px; }
.search-pending .search-submit .button-label, .search-pending .search-submit > .button-arrow { display: none; }
.search-pending .search-submit .button-loading { display: inline-flex; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

.tab {
  min-height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 9px 13px;
  color: var(--muted);
  background: transparent;
  font-size: 14px;
  font-weight: 680;
  cursor: pointer;
  transition: color var(--motion-fast), background var(--motion-fast), border-color var(--motion-fast);
}

.tab:hover { color: var(--text); background: var(--surface-muted); }
.tab.active { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); color: var(--text-strong); background: var(--surface-accent); }

.flat-list { min-width: 0; background: transparent; }

.index-row {
  min-width: 0;
  display: grid;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  transition: color var(--motion-fast), background var(--motion-fast);
}

.index-row:last-child { border-bottom: 0; }
.index-row:hover { color: var(--text-strong); background: var(--surface-muted); }

.resource-row { min-height: 66px; grid-template-columns: 42px minmax(0, 1fr) 20px; gap: 12px; padding: 10px 14px; }
.drive-badge { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-muted); }
.drive-badge img { width: 28px; height: 28px; object-fit: contain; }
.row-content { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.row-title { min-width: 0; overflow-wrap: anywhere; font-size: 14px; font-weight: 680; line-height: 1.45; }
.row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 14px; color: var(--muted); font-size: 12px; }
.row-meta span { display: inline-flex; align-items: center; gap: 5px; }
.row-meta .icon { width: 15px; height: 15px; }
.rank-row { min-height: 58px; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 10px; padding: 8px 14px; }
.rank-number { min-width: 15px; color: var(--subtle); font-size: 12px; font-weight: 720; font-variant-numeric: tabular-nums; }
.flat-list > .index-row:nth-child(-n+3) .rank-number { color: var(--accent); font-weight: 800; }
.search-cue { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; }

.trend-rich-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.trend-row { min-width: 0; min-height: 100px; display: grid; grid-template-columns: 58px minmax(0, 1fr); align-items: center; gap: 12px; border-radius: 12px; padding: 10px; color: var(--text); background: color-mix(in srgb, var(--surface) 72%, var(--surface-muted)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--line) 58%, transparent); transition: color var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast); }
.trend-row:hover { color: var(--text-strong); background: color-mix(in srgb, var(--surface-muted) 88%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent); }
.trend-row:focus-visible { color: var(--text-strong); background: color-mix(in srgb, var(--surface-muted) 82%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent); outline: 2px solid var(--accent-focus); outline-offset: -2px; }
.trend-cover, .trend-cover-placeholder { width: 58px; height: 76px; border-radius: 8px; background: var(--surface-muted); }
.trend-cover { object-fit: cover; }
.trend-cover-placeholder { display: grid; place-items: center; color: var(--accent); }
.trend-cover-placeholder .icon { width: 22px; height: 22px; }
.trend-content { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.trend-heading { min-width: 0; display: flex; align-items: center; gap: 6px; }
.trend-rank { min-width: 15px; color: var(--accent); font-size: 12px; font-weight: 780; font-variant-numeric: tabular-nums; }
.trend-desc { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.trend-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--subtle); font-size: 11px; }
.trend-meta span { display: inline-flex; align-items: center; gap: 4px; }
.trend-meta .icon { width: 13px; height: 13px; }
.trend-tabs { overflow-x: auto; scrollbar-width: none; }
.trend-tabs::-webkit-scrollbar { display: none; }
.trend-tabs .tab { flex: 0 0 auto; padding-inline: 9px; }
.trend-tabs img { width: 18px; height: 18px; object-fit: contain; }
.trend-compact-panel { border: 0; border-radius: 0; }

.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section-title { display: flex; align-items: center; gap: 11px; }
.section-title h2 { margin: 0; color: var(--text-strong); font-size: 21px; line-height: 1.25; letter-spacing: -0.025em; }
.section-title p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.latest-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; color: var(--accent); background: var(--surface-accent); }
.latest-icon { object-fit: cover; }

.status-line {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 8px 12px;
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-muted);
  font-size: 13px;
}

.status-line strong { color: var(--text-strong); }
.status-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: var(--accent); background: var(--surface); }
.status-track { height: 3px; min-width: 70px; flex: 1; margin-left: auto; overflow: hidden; border-radius: 4px; background: var(--line); }
.sse-status.is-loading .status-track::after { content: ""; display: block; width: 36%; height: 100%; border-radius: 4px; background: var(--accent); animation: rail-load 1.3s ease-in-out infinite; }
.sse-status.is-error { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, var(--surface)); }

.el-overlay { background: rgb(10 16 28 / 62%) !important; backdrop-filter: blur(6px); }
.el-dialog { border: 0 !important; border-radius: var(--radius-lg) !important; background: var(--surface) !important; box-shadow: var(--shadow-float) !important; }
.el-dialog__headerbtn { top: 12px !important; right: 12px !important; }
.el-textarea__inner { min-height: 120px !important; border-radius: 10px !important; color: var(--text) !important; background: var(--surface-muted) !important; box-shadow: inset 0 0 0 1px var(--line) !important; }
.dialog-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.dialog-heading h2 { margin: 0; font-size: 20px; }
.dialog-heading p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.dialog-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 11px; color: var(--accent); background: var(--surface-accent); }
.dialog-code { display: block; width: 220px; margin: auto; border-radius: 10px; }
.feedback-form > .button { width: 100%; margin-top: 14px; }
.resource-dialog { width: min(92vw, 540px) !important; }
.resource-dialog-body { text-align: center; }
.dialog-state, .dialog-success { display: flex; align-items: center; flex-direction: column; padding: 10px 0 18px; }
.resource-loader { position: relative; width: 112px; height: 112px; display: grid; place-items: center; margin: 6px 0 18px; border-radius: 50%; background: var(--surface-accent); }
.resource-loader::after { content: ""; position: absolute; inset: 10px; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin 1.1s linear infinite; }
.resource-loader img { width: 48px; height: 48px; object-fit: contain; }
.resource-loader i { display: none; }
.loading-phases { width: min(100%, 280px); margin: 0 auto 8px; color: var(--muted); font-size: 13px; }
.loading-phases span { display: none; }
.loading-phases span:first-child { display: block; }
.dialog-result-icon { position: relative; width: 80px; height: 80px; display: grid; place-items: center; border-radius: 22px; margin-bottom: 14px; background: var(--surface-accent); }
.dialog-result-icon img { width: 44px; height: 44px; }
.dialog-result-icon .icon { position: absolute; right: -4px; bottom: -4px; width: 26px; height: 26px; border: 3px solid var(--surface); border-radius: 50%; padding: 4px; color: #fff; background: var(--success); }
.qrcode { display: grid; place-items: center; min-height: 130px; }
.dialog-title { max-width: 420px; margin: 8px auto; font-weight: 700; overflow-wrap: anywhere; }
.resource-url { max-width: 100%; display: flex; align-items: center; gap: 7px; border-radius: 10px; padding: 11px; color: var(--accent); background: var(--surface-muted); }
.resource-url span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statement { display: flex; gap: 9px; border-top: 1px solid var(--line); padding-top: 15px; color: var(--muted); text-align: left; font-size: 12px; }
.statement p { margin-bottom: 4px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rail-load { from { transform: translateX(-110%); } to { transform: translateX(290%); } }
