:root {
  --app-footer-height: 54px;
  --app-header-row-height: 50px;
  --app-tab-height: 46px;
  --app-header-height: calc(var(--app-header-row-height) + var(--app-tab-height));
  --motion-fast: 120ms;
  --motion-standard: 180ms;
  --motion-panel: 220ms;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-standard: cubic-bezier(0.22, 0.72, 0.18, 1);
  --surface-canvas: #101216;
  --surface-panel: #131720;
  --surface-raised: #151923;
  --surface-control: #242a35;
  --surface-inset: #0d1016;
  --border-soft: #2b3342;
  --border-strong: #343b49;
  --focus-ring: #3b82f6;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #e5e7eb;
  background: #101216;
  font-synthesis: none;
  height: 100%;
  overflow: hidden;
  scrollbar-color: #4b5568 #101216;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

::-webkit-scrollbar-track {
  background: #101216;
}

::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 2px solid #101216;
  border-radius: 999px;
  background: #4b5568;
}

::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

::-webkit-scrollbar-corner {
  background: #101216;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  background: #101216;
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.ui-button,
.ui-icon-button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface-control);
  color: #eef2ff;
  cursor: pointer;
  font-weight: 750;
  line-height: 1;
  text-decoration: none;
  transition:
    background-color var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out),
    opacity var(--motion-fast) var(--ease-out),
    transform var(--motion-fast) var(--ease-out);
}

.ui-button:hover,
.ui-icon-button:hover {
  background: #2d3543;
}

.ui-button:active,
.ui-icon-button:active {
  transform: scale(0.98);
}

.ui-button:focus-visible,
.ui-icon-button:focus-visible,
.ui-tab:focus-visible,
.ui-action-menu-popover button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.72);
}

.ui-button:disabled,
.ui-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  transform: none;
}

.ui-button--sm {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.ui-button--md {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 14px;
}

.ui-button--lg {
  min-height: 46px;
  padding: 10px 14px;
  font-size: 14px;
}

.ui-button--primary {
  border-color: #16a34a;
  background: #22c55e;
  color: #04130a;
}

.ui-button--primary:hover {
  background: #4ade80;
}

.ui-button--add,
.ui-icon-button--add {
  border-color: #2b3342;
  background: #202633;
  color: #dbeafe;
}

.ui-button--add:hover,
.ui-icon-button--add:hover {
  border-color: var(--focus-ring);
  background: #182033;
}

.ui-button--danger,
.ui-icon-button--danger {
  color: #fecaca;
}

.ui-button--danger:hover,
.ui-icon-button--danger:hover {
  border-color: rgba(239, 68, 68, 0.52);
  background: rgba(127, 29, 29, 0.34);
}

.ui-icon-button {
  width: 42px;
  min-width: 42px;
  min-height: 38px;
  padding: 0;
}

.ui-button-icon,
.ui-button-label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.ui-button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

.ui-tabs {
  position: fixed;
  top: var(--app-header-row-height);
  right: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: var(--app-tab-height);
  overflow-x: auto;
  border-top: 1px solid #242a35;
  border-bottom: 1px solid var(--border-soft);
  background: #181b22;
  scrollbar-width: none;
  margin: 0;
  padding: 0 18px;
}

.ui-tabs::-webkit-scrollbar {
  display: none;
}

.ui-tab {
  appearance: none;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--app-tab-height);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9aa8bd;
  cursor: pointer;
  font-weight: 750;
  margin: 0;
  padding: 10px 12px 12px;
  transition:
    background-color var(--motion-fast) var(--ease-out),
    color var(--motion-fast) var(--ease-out);
  white-space: nowrap;
}

.ui-tab:hover {
  background: #1c212b;
  color: #eef2ff;
}

.ui-tab.is-active {
  color: #eff6ff;
}

.ui-tab.is-active::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--focus-ring);
  box-shadow: 0 -6px 18px rgba(59, 130, 246, 0.34);
  content: "";
}

.ui-status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: #1a202b;
  color: #cbd5e1;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 750;
}

.ui-status-pill--ok {
  border-color: rgba(34, 197, 94, 0.38);
  color: #86efac;
}

.ui-status-pill--warning {
  border-color: rgba(245, 158, 11, 0.46);
  color: #fcd34d;
}

.ui-status-pill--error {
  border-color: rgba(239, 68, 68, 0.46);
  color: #fecaca;
}

.ui-status-pill--checking {
  border-color: rgba(59, 130, 246, 0.46);
  color: #bfdbfe;
}

.ui-field {
  display: grid;
  gap: 7px;
}

.ui-field-label {
  color: #8d99ae;
}

.ui-field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.ui-field input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--surface-inset);
  color: #f8fafc;
  outline: none;
  padding: 9px 11px;
}

.ui-field input:focus {
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 1px var(--focus-ring);
}

.ui-field-help {
  color: #8d99ae;
  font-size: 12px;
}

.ui-field-help.is-error {
  color: #fcd34d;
}

.ui-action-menu {
  position: relative;
  display: flex;
}

.ui-action-menu-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  min-width: 172px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: #171c26;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
  padding: 5px;
  transform-origin: top right;
  animation: ui-popover-in var(--motion-standard) var(--ease-out);
}

.ui-action-menu-popover button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #e5e7eb;
  cursor: pointer;
  font: inherit;
  padding: 7px 9px;
  text-align: left;
}

.ui-action-menu-popover button:hover {
  background: #242a35;
}

.ui-action-menu-popover button.is-danger {
  color: #fecaca;
}

.ui-action-menu-popover button.is-danger:hover {
  background: rgba(127, 29, 29, 0.42);
}

.ui-service-row {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  justify-content: stretch;
  min-height: 56px;
  overflow: visible;
  border: 1px solid var(--border-soft);
  border-radius: 4px;
  background: var(--surface-raised);
  padding: 12px;
}

.ui-service-row > :not(.ui-service-border-glow) {
  position: relative;
  z-index: 1;
}

.ui-service-border-glow {
  position: absolute;
  display: none;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  contain: layout paint;
  pointer-events: none;
  transition: opacity var(--motion-panel) var(--ease-out);
}

.ui-service-row--checking .ui-service-border-glow,
.ui-service-row--working .ui-service-border-glow {
  display: block;
  opacity: 0.78;
}

.ui-service-row--settling .ui-service-border-glow {
  display: block;
  opacity: 0;
  transition-duration: 0.7s;
}

.ui-service-border-glow-segment {
  position: absolute;
  display: block;
  background: #93c5fd;
  box-shadow:
    0 0 8px rgba(96, 165, 250, 0.95),
    0 0 16px rgba(34, 197, 94, 0.36);
  opacity: 0;
}

.ui-service-border-glow-segment.top,
.ui-service-border-glow-segment.bottom {
  width: 108px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #60a5fa 24%, #bbf7d0 54%, transparent);
}

.ui-service-border-glow-segment.right,
.ui-service-border-glow-segment.left {
  width: 2px;
  height: 64px;
  background: linear-gradient(180deg, transparent, #60a5fa 24%, #bbf7d0 54%, transparent);
}

.ui-service-border-glow-segment.top {
  top: 0;
  animation: finder-border-top 1.6s linear infinite;
}

.ui-service-border-glow-segment.right {
  right: 0;
  animation: finder-border-right 1.6s linear infinite;
}

.ui-service-border-glow-segment.bottom {
  bottom: 0;
  animation: finder-border-bottom 1.6s linear infinite;
}

.ui-service-border-glow-segment.left {
  left: 0;
  animation: finder-border-left 1.6s linear infinite;
}

.ui-service-dot {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.ui-service-row--running .ui-service-dot,
.ui-service-row--installed .ui-service-dot {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.ui-service-row--stopped .ui-service-dot,
.ui-service-row--missing .ui-service-dot {
  background: #f59e0b;
}

.ui-service-row--error .ui-service-dot {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.ui-service-row--checking .ui-service-dot {
  border: 2px solid var(--focus-ring);
  border-top-color: transparent;
  background: transparent;
  box-shadow: none;
  animation: spin 0.75s linear infinite;
}

.ui-service-text {
  min-width: 0;
}

.ui-service-text > strong,
.ui-service-text > span {
  display: block;
  overflow-wrap: anywhere;
}

.ui-service-text > span {
  color: #8d99ae;
}

.ui-service-inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.ui-service-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.ui-service-row > .setup-details,
.ui-service-row > .singbox-info-popover,
.ui-service-row > .singbox-workspace,
.ui-service-row > .singbox-install-note {
  grid-column: 1 / -1;
}

.log-raw-detail {
  color: #7d8aa0;
  margin-top: 3px;
}

@keyframes ui-popover-in {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.simple-shell {
  display: block;
  height: 100vh;
  overflow: hidden;
  background: #101216;
  padding: var(--app-header-height) 0 var(--app-footer-height);
}

.simple-panel {
  display: grid;
  align-content: start;
  min-height: 0;
  height: calc(100vh - var(--app-header-height) - var(--app-footer-height));
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #101216;
  box-shadow: none;
  overflow-x: hidden;
  overflow-y: scroll;
  scrollbar-gutter: stable;
  padding: 14px 18px 20px;
}

.simple-header,
.section-head,
.add-toolbar,
.process-add-line,
.app-row,
.route-switch,
.singbox-info-actions,
.panel-tabs,
.server-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.simple-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 40;
  min-height: var(--app-header-row-height);
  margin: 0;
  background: #181b22;
  padding: 7px 14px;
}

.simple-header small,
.simple-field span,
.app-row-main > div > span,
.config-path,
.finder-card span {
  color: #8d99ae;
}

.simple-header h1,
.section-head h2 {
  margin: 0;
  letter-spacing: 0;
}

.simple-header h1 {
  margin-top: 0;
  font-size: 18px;
  line-height: 1.1;
  font-weight: 650;
}

.simple-header .ghost-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 13px;
}

.section-head h2 {
  font-size: 16px;
}

.panel-tabs {
  position: fixed;
  top: var(--app-header-row-height);
  right: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  gap: 0;
  min-height: var(--app-tab-height);
  overflow-x: auto;
  border-top: 1px solid #242a35;
  border-bottom: 1px solid #2b3342;
  background: #181b22;
  scrollbar-width: none;
  margin: 0;
  padding: 0 18px;
}

.panel-tabs::-webkit-scrollbar {
  display: none;
}

.panel-tabs button {
  appearance: none;
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: var(--app-tab-height);
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #9aa8bd;
  font-weight: 750;
  cursor: pointer;
  margin: 0;
  padding: 10px 12px 12px;
  white-space: nowrap;
}

.panel-tabs button:hover {
  background: #1c212b;
  color: #eef2ff;
}

.panel-tabs button.active {
  background: #181b22;
  color: #eff6ff;
  box-shadow: none;
}

.panel-tabs button.active::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: #3b82f6;
  box-shadow: 0 -6px 18px rgba(59, 130, 246, 0.34);
  content: "";
}

.tab-panel-frame {
  min-width: 0;
  will-change: opacity, transform;
}

.tab-panel-frame.swipe-right {
  animation: panel-swipe-right 0.24s cubic-bezier(0.22, 0.72, 0.18, 1);
}

.tab-panel-frame.swipe-left {
  animation: panel-swipe-left 0.24s cubic-bezier(0.22, 0.72, 0.18, 1);
}

.tab-panel {
  display: grid;
  gap: 10px;
}

.panel-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #131720;
  padding: 11px 12px;
}

.panel-section-head span {
  display: block;
  color: #8d99ae;
  font-size: 12px;
}

.panel-section-head h2 {
  margin: 2px 0 0;
  color: #eef2ff;
  font-size: 17px;
  letter-spacing: 0;
}

.panel-section-head > strong {
  min-width: 0;
  color: #bfdbfe;
  font-size: 13px;
  overflow-wrap: anywhere;
  text-align: right;
}

.summary-panel {
  gap: 12px;
}

.summary-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #151923;
  padding: 14px;
}

.summary-hero.ok {
  border-color: rgba(34, 197, 94, 0.44);
}

.summary-hero.warning {
  border-color: rgba(245, 158, 11, 0.48);
}

.summary-hero.error {
  border-color: rgba(239, 68, 68, 0.52);
}

.summary-hero.checking {
  border-color: rgba(59, 130, 246, 0.54);
}

.summary-status-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #64748b;
  margin-top: 5px;
}

.summary-status-dot.ok {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.summary-status-dot.warning {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.summary-status-dot.error {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.summary-status-dot.checking {
  border: 2px solid #3b82f6;
  border-top-color: transparent;
  background: transparent;
  animation: spin 0.75s linear infinite;
}

.summary-hero span,
.summary-card-label {
  color: #8d99ae;
  font-size: 12px;
  font-weight: 700;
}

.summary-hero strong {
  display: block;
  color: #f8fafc;
  font-size: 22px;
  line-height: 1.15;
  margin-top: 2px;
}

.summary-hero p {
  color: #b6c2d4;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.summary-readout,
.summary-draft {
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #131720;
  padding: 13px 14px;
}

.summary-readout-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.summary-readout-head span,
.summary-draft span {
  display: block;
  color: #8d99ae;
  font-size: 12px;
  font-weight: 700;
}

.summary-readout-head strong,
.summary-draft strong {
  display: block;
  color: #f8fafc;
  font-size: 18px;
  line-height: 1.2;
  margin-top: 2px;
}

.summary-pill {
  flex: 0 0 auto;
  border: 1px solid #2b3342;
  border-radius: 999px;
  background: #1a202b;
  padding: 5px 9px;
}

.summary-pill.ok {
  border-color: rgba(34, 197, 94, 0.38);
  color: #86efac;
}

.summary-pill.warning {
  border-color: rgba(245, 158, 11, 0.46);
  color: #fcd34d;
}

.summary-lines {
  display: grid;
  gap: 0;
  margin: 12px 0 0;
}

.summary-lines.compact {
  margin-top: 10px;
}

.summary-lines div {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 12px;
  border-top: 1px solid #242b38;
  padding: 9px 0;
}

.summary-lines dt,
.summary-lines dd {
  margin: 0;
}

.summary-lines dt {
  color: #8d99ae;
  font-size: 12px;
  font-weight: 750;
}

.summary-lines dd {
  color: #dbe4f0;
  overflow-wrap: anywhere;
}

.summary-draft {
  display: grid;
  gap: 8px;
}

.summary-draft.ok {
  border-color: rgba(34, 197, 94, 0.34);
}

.summary-draft.warning {
  border-color: rgba(245, 158, 11, 0.48);
  background: rgba(120, 53, 15, 0.16);
}

.summary-draft p {
  color: #b6c2d4;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.summary-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.summary-actions button {
  min-height: 34px;
  border: 1px solid #343b49;
  border-radius: 4px;
  background: #242a35;
  color: #eef2ff;
  padding: 7px 10px;
  cursor: pointer;
}

.summary-actions button:hover {
  background: #2d3543;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.summary-card {
  display: grid;
  gap: 5px;
  align-content: start;
  min-height: 104px;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #131720;
  color: #dbeafe;
  padding: 11px 12px;
  text-align: left;
}

button.summary-card {
  cursor: pointer;
}

button.summary-card:hover {
  border-color: #3b82f6;
  background: #172033;
}

.summary-card.ok {
  border-color: rgba(34, 197, 94, 0.36);
}

.summary-card.warning {
  border-color: rgba(245, 158, 11, 0.42);
}

.summary-card.error {
  border-color: rgba(239, 68, 68, 0.42);
}

.summary-card.checking {
  border-color: rgba(59, 130, 246, 0.42);
}

.summary-card strong,
.summary-card span {
  overflow-wrap: anywhere;
}

.summary-card strong {
  color: #f8fafc;
  font-size: 15px;
  line-height: 1.25;
}

.summary-card > span:not(.summary-card-label) {
  color: #9aa8bd;
  font-size: 13px;
}

.summary-card.readout {
  cursor: default;
}

.ghost-button,
.add-toolbar button,
.process-add-line button,
.app-row button,
.open-config-button,
.service-button,
.service-menu-button,
.subscription-line button,
.route-switch button,
.singbox-info-actions button,
.server-row {
  min-height: 36px;
  border: 1px solid #343b49;
  border-radius: 4px;
  background: #242a35;
  color: #eef2ff;
  padding: 8px 12px;
  cursor: pointer;
}

.ghost-button:hover,
.add-toolbar button:hover,
.process-add-line button:hover,
.app-row button:hover,
.open-config-button:hover,
.service-button:hover,
.service-menu-button:hover,
.subscription-line button:hover,
.route-switch button:hover,
.singbox-info-actions button:hover,
.server-row:hover {
  background: #2d3543;
}

.finder-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  justify-content: stretch;
  min-height: 56px;
  overflow: visible;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #151923;
  padding: 12px;
}

.singbox-card {
  margin-top: 10px;
}

.finder-card .finder-border-glow {
  position: absolute;
  display: none;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  opacity: 0;
  contain: layout paint;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.finder-card > :not(.finder-border-glow) {
  position: relative;
  z-index: 1;
}

.finder-card.checking .finder-border-glow,
.finder-card.working .finder-border-glow {
  display: block;
  opacity: 1;
}

.finder-card.checking .finder-border-glow {
  opacity: 0.78;
}

.finder-card.settling .finder-border-glow {
  display: block;
  opacity: 0;
  transition-duration: 0.7s;
}

.finder-border-glow-segment {
  position: absolute;
  display: block;
  background: #93c5fd;
  box-shadow:
    0 0 8px rgba(96, 165, 250, 0.95),
    0 0 16px rgba(34, 197, 94, 0.36);
  opacity: 0;
}

.finder-border-glow-segment.top,
.finder-border-glow-segment.bottom {
  width: 108px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #60a5fa 24%, #bbf7d0 54%, transparent);
}

.finder-border-glow-segment.right,
.finder-border-glow-segment.left {
  width: 2px;
  height: 64px;
  background: linear-gradient(180deg, transparent, #60a5fa 24%, #bbf7d0 54%, transparent);
}

.finder-border-glow-segment.top {
  top: 0;
  animation: finder-border-top 1.6s linear infinite;
}

.finder-border-glow-segment.right {
  right: 0;
  animation: finder-border-right 1.6s linear infinite;
}

.finder-border-glow-segment.bottom {
  bottom: 0;
  animation: finder-border-bottom 1.6s linear infinite;
}

.finder-border-glow-segment.left {
  left: 0;
  animation: finder-border-left 1.6s linear infinite;
}

.finder-text,
.app-row > div,
.app-row-main > div {
  min-width: 0;
}

.finder-text > strong,
.finder-text > span,
.app-row-main strong,
.app-row-main > div > span {
  display: block;
  overflow-wrap: anywhere;
}

.finder-text > strong {
  max-width: 520px;
}

.finder-text > span {
  max-width: 760px;
}

.finder-card .subscription-icon,
.finder-card .server-icon {
  display: grid;
}

.status-light {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #ef4444;
}

.finder-card.found .status-light {
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.12);
}

.finder-card.missing .status-light {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

.finder-card.checking .status-light {
  border: 2px solid #3b82f6;
  border-top-color: transparent;
  background: transparent;
  box-shadow: none;
  animation: spin 0.75s linear infinite;
}

.setup-toggle {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  width: fit-content;
  min-height: 0;
  border: 0;
  background: transparent;
  color: #93c5fd;
  padding: 4px 0 0;
  text-align: left;
  cursor: pointer;
}

.setup-toggle:hover {
  color: #bfdbfe;
}

.setup-toggle .ui-button-label > span {
  display: inline-block;
  border: 1px solid #343b49;
  border-radius: 4px;
  background: #1b202b;
  color: #cbd5e1;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 700;
}

.setup-strip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #111720;
  padding: 7px 10px;
}

.setup-strip-title {
  color: #8d99ae;
  font-size: 12px;
  font-weight: 800;
}

.setup-strip-items {
  display: flex;
  gap: 7px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.setup-strip-item {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 7px;
  align-items: center;
  min-height: 28px;
  border: 1px solid #2b3342;
  border-radius: 999px;
  background: #151b25;
  color: #dbeafe;
  padding: 5px 9px;
}

.setup-strip-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.11);
}

.setup-strip-item.installed .setup-strip-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.11);
}

.setup-strip-item strong {
  font-size: 12px;
  white-space: nowrap;
}

.setup-strip-item span:not(.setup-strip-dot) {
  color: #9aa8bd;
  font-size: 12px;
  white-space: nowrap;
}

.setup-details {
  display: grid;
  grid-column: 2 / -1;
  gap: 6px;
  border-top: 1px solid #2b3342;
  margin-top: 2px;
  padding-top: 10px;
}

.setup-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-height: 34px;
  border: 1px solid #263040;
  border-radius: 4px;
  background: #111720;
  padding: 8px 9px;
}

.setup-state-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
  margin-top: 5px;
}

.setup-item.installed .setup-state-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.12);
}

.setup-item strong,
.setup-item span {
  display: block;
  overflow-wrap: anywhere;
}

.setup-item span {
  color: #9aa8bd;
  font-size: 13px;
}

.service-actions {
  position: relative;
  display: flex;
  gap: 6px;
  align-items: center;
}

.service-button {
  min-width: 102px;
  white-space: nowrap;
}

.service-button.stop {
  color: #fecaca;
}

.service-button.install {
  border-color: #166534;
  background: #14532d;
  color: #dcfce7;
  font-weight: 700;
}

.service-button.install:hover {
  background: #166534;
}

.service-menu {
  position: relative;
  display: flex;
}

.service-menu-button {
  display: grid;
  place-items: center;
  width: 42px;
  padding: 0;
}

.service-menu-button svg {
  display: block;
}

.service-menu-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 6;
  min-width: 172px;
  border: 1px solid #343b49;
  border-radius: 4px;
  background: #171c26;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
  padding: 5px;
}

.service-menu-popover button {
  width: 100%;
  min-height: 34px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #fecaca;
  text-align: left;
  padding: 7px 9px;
  cursor: pointer;
}

.service-menu-popover button:hover {
  background: rgba(127, 29, 29, 0.42);
}

.route-panel {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #151923;
  padding: 10px;
}

.external-proxy-card {
  display: grid;
  gap: 9px;
}

.proxy-check-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 8px;
  align-items: stretch;
}

.proxy-check-state,
.route-preview {
  display: grid;
  gap: 3px;
  min-height: 46px;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #111720;
  padding: 9px 11px;
}

.proxy-check-state.ok {
  border-color: rgba(34, 197, 94, 0.42);
}

.proxy-check-state.warning {
  border-color: rgba(245, 158, 11, 0.42);
}

.proxy-check-state.error {
  border-color: rgba(239, 68, 68, 0.42);
}

.proxy-check-state strong,
.route-preview strong {
  color: #eef2ff;
  overflow-wrap: anywhere;
}

.proxy-check-state span,
.route-preview span {
  color: #8d99ae;
  overflow-wrap: anywhere;
}

.route-preview {
  margin-top: 2px;
}

.simple-field {
  display: grid;
  gap: 7px;
  margin: 14px 0;
}

.route-proxy-field {
  margin: 0;
}

.simple-field input,
.process-add-line input,
.subscription-line input {
  min-height: 42px;
  width: 100%;
  border: 1px solid #343b49;
  border-radius: 4px;
  background: #0d1016;
  color: #f8fafc;
  outline: none;
  padding: 9px 11px;
}

.simple-field input:focus,
.process-add-line input:focus,
.subscription-line input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f6;
}

.singbox-workspace {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  border-top: 1px solid #2b3342;
  margin-top: 2px;
  padding-top: 10px;
}

.singbox-inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.info-toggle {
  display: grid;
  place-items: center;
  width: 28px;
  height: 24px;
  border: 1px solid #263040;
  border-radius: 4px;
  background: #111720;
  color: #bfdbfe;
  cursor: pointer;
}

.info-toggle:hover {
  background: #1d2735;
}

.info-toggle svg {
  display: block;
}

.singbox-info-popover {
  position: relative;
  z-index: 8;
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  width: 100%;
  border: 1px solid #343b49;
  border-radius: 4px;
  background: #111720;
  box-shadow: none;
  padding: 12px;
}

.singbox-info-grid {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 7px 10px;
  align-items: start;
}

.singbox-info-grid span {
  color: #8d99ae;
  font-size: 12px;
}

.singbox-info-grid strong {
  min-width: 0;
  color: #dbeafe;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.singbox-info-actions {
  justify-content: flex-start;
  gap: 7px;
}

.singbox-info-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  color: #dbeafe;
  font-weight: 700;
}

.singbox-info-actions button svg {
  display: block;
}

.route-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.route-switch button {
  min-height: 38px;
  width: 100%;
  color: #cbd5e1;
  font-weight: 700;
}

.route-switch button.active {
  border-color: #2563eb;
  background: #1d4ed8;
  color: #eff6ff;
}

.route-switch .ui-button--primary {
  border-color: #2563eb;
  background: #1d4ed8;
  color: #eff6ff;
}

.subscription-line {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 112px 42px;
  gap: 7px;
  align-items: center;
}

.subscription-icon,
.server-icon {
  display: grid;
  place-items: center;
  color: #bfdbfe;
}

.subscription-icon {
  width: 38px;
  height: 42px;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #0d1016;
}

.subscription-line button {
  min-height: 42px;
  white-space: nowrap;
}

.subscription-line .icon-command {
  display: grid;
  place-items: center;
  width: 42px;
  padding: 0;
  color: #fecaca;
}

.server-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.server-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  align-items: center;
  justify-content: stretch;
  gap: 7px;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  text-align: left;
  padding: 7px 9px;
}

.server-row.selected {
  border-color: #2563eb;
  background: #17213a;
}

.server-row.ok {
  border-color: rgba(34, 197, 94, 0.42);
}

.server-row.error {
  border-color: rgba(239, 68, 68, 0.42);
}

.server-select-button,
.server-ping-button {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

.server-select-button {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  text-align: left;
}

.server-ping-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 28px;
  border: 1px solid #263040;
  border-radius: 4px;
  color: #bfdbfe;
}

.server-ping-button:hover {
  background: #1d2735;
}

.server-select-dot {
  width: 10px;
  height: 10px;
  border: 1px solid #64748b;
  border-radius: 999px;
  background: #0d1016;
}

.server-row.selected .server-select-dot {
  border-color: #93c5fd;
  background: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.16);
}

.server-row strong {
  min-width: 0;
  overflow: hidden;
  color: #dbeafe;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-ping-badge {
  flex: 0 0 auto;
  border: 1px solid #263040;
  border-radius: 4px;
  color: #bfdbfe;
  padding: 2px 5px;
  font-size: 11px;
  font-weight: 800;
}

.singbox-install-note {
  display: grid;
  grid-column: 1 / -1;
  gap: 3px;
  border-top: 1px solid #2b3342;
  color: #9aa8bd;
  margin-top: 2px;
  padding-top: 10px;
}

.singbox-install-note strong {
  color: #e5e7eb;
}

.apply-state {
  display: grid;
  gap: 3px;
  margin-top: 14px;
  border: 1px solid rgba(245, 158, 11, 0.48);
  border-radius: 4px;
  background: rgba(120, 53, 15, 0.2);
  color: #fcd34d;
  padding: 10px 12px;
}

.apply-state span {
  color: #d6b875;
  overflow-wrap: anywhere;
}

.apps-section {
  display: grid;
  gap: 9px;
  margin-top: 8px;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #10141c;
  padding: 12px;
}

.apps-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 520px);
  gap: 12px;
  align-items: center;
  min-height: 48px;
}

.apps-title {
  min-height: 48px;
  align-items: center;
  justify-content: flex-start;
}

.apps-config-actions {
  display: grid;
  gap: 8px;
  align-items: center;
}

.apps-config-actions .apply-state {
  margin: 0;
}

.apps-config-actions .command-row {
  grid-template-columns: minmax(0, 1fr) 118px;
  margin-top: 0;
}

.apps-config-actions .apply-button,
.apps-config-actions .open-config-button {
  height: 48px;
  min-height: 48px;
}

.apps-config-actions .config-path {
  margin: 0;
  color: #8d99ae;
}

.section-head span {
  min-width: 28px;
  height: 30px;
  border: 1px solid #343b49;
  border-radius: 4px;
  background: #1b202b;
  color: #dbeafe;
  padding: 0 9px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  line-height: 28px;
}

.add-toolbar {
  justify-content: flex-end;
  padding: 0;
}

.add-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 44px;
  height: 38px;
  border-color: #2b3342;
  background: #202633;
  color: #dbeafe;
  line-height: 0;
  padding: 0;
}

.add-tile svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
  transform: translate(0.5px, 0.5px);
}

.add-tile:hover {
  border-color: #3b82f6;
  background: #182033;
}

.add-tile[data-tooltip]::before,
.add-tile[data-tooltip]::after {
  position: absolute;
  left: 50%;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 90ms ease, transform 120ms ease;
  transition-delay: 55ms;
}

.add-tile[data-tooltip]::before {
  bottom: calc(100% + 3px);
  width: 8px;
  height: 8px;
  background: #0d1118;
  border-right: 1px solid #334155;
  border-bottom: 1px solid #334155;
  content: "";
  transform: translate(-50%, 2px) rotate(45deg);
}

.add-tile[data-tooltip]::after {
  bottom: calc(100% + 8px);
  border: 1px solid #334155;
  border-radius: 4px;
  background: #0d1118;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.34);
  color: #e5e7eb;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  padding: 7px 8px;
  transform: translate(-50%, 4px);
  white-space: nowrap;
}

.add-tile[data-tooltip]:hover::before,
.add-tile[data-tooltip]:hover::after,
.add-tile[data-tooltip]:focus-visible::before,
.add-tile[data-tooltip]:focus-visible::after {
  opacity: 1;
}

.add-tile[data-tooltip]:hover::before,
.add-tile[data-tooltip]:focus-visible::before {
  transform: translate(-50%, 0) rotate(45deg);
}

.add-tile[data-tooltip]:hover::after,
.add-tile[data-tooltip]:focus-visible::after {
  transform: translate(-50%, 0);
}

.add-tile[aria-pressed="true"] {
  border-color: #3b82f6;
  background: #1e3a8a;
}

.tile-loading {
  color: #dbeafe;
  font-weight: 800;
  animation: pulse 1s ease-in-out infinite;
}

.app-add-skeleton {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 58px;
  border: 1px dashed #334155;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.08), transparent),
    #121722;
  background-size: 220% 100%;
  color: #94a3b8;
  padding: 9px 12px;
}

.app-add-main {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.app-add-main strong,
.app-add-main span {
  display: block;
}

.app-add-main strong {
  color: #cbd5e1;
}

.app-add-main span {
  color: #7d8aa0;
  font-size: 13px;
}

.process-add-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 88px;
}

.process-add-line button {
  border-color: #166534;
  background: #14532d;
  font-weight: 700;
}

.process-add-line .process-cancel-button {
  border-color: #343b49;
  background: #242a35;
  color: #cbd5e1;
  font-weight: 600;
}

.process-add-line button:hover {
  background: #166534;
}

.process-add-line .process-cancel-button:hover {
  background: #2d3543;
}

.app-list {
  display: grid;
  gap: 6px;
  margin-top: 1px;
}

.app-row-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-row .item-icon,
.app-add-main .item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  align-self: center;
  width: 34px;
  height: 34px;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #0d1016;
  color: #dbeafe;
  line-height: 0;
}

.app-add-main .app-add-icon {
  color: #64748b;
}

.app-row .item-icon svg,
.app-add-main .item-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: 0 0 auto;
}

.app-row,
.empty-state {
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #131720;
  padding: 10px 12px;
}

.app-row button {
  color: #fecaca;
}

.empty-state {
  color: #8d99ae;
  min-height: 48px;
}

.list-skeleton {
  display: grid;
  gap: 8px;
}

.list-skeleton span {
  min-height: 56px;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.12), transparent),
    #131720;
  background-size: 220% 100%;
  animation: shimmer 1.15s linear infinite;
}

.command-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 8px;
  margin-top: 14px;
}

.command-row .ui-button,
.proxy-check-line .ui-button,
.subscription-line .ui-button {
  width: 100%;
}

.apps-config-actions .ui-button {
  height: 48px;
  min-height: 48px;
}

.apply-button {
  min-height: 46px;
  width: 100%;
  border: 1px solid #16a34a;
  border-radius: 4px;
  background: #22c55e;
  color: #04130a;
  font-weight: 800;
  cursor: pointer;
}

.apply-button:hover {
  background: #4ade80;
}

.open-config-button {
  min-height: 46px;
  width: 100%;
}

.config-path {
  margin: 10px 0 0;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.log-dock {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: var(--app-footer-height);
  border-top: 1px solid #2b3342;
  background: #151923;
  box-shadow: none;
  margin: 0;
  padding: 8px 14px;
}

.log-dock.error {
  border-top-color: rgba(239, 68, 68, 0.58);
}

.log-dock.success {
  border-top-color: rgba(34, 197, 94, 0.58);
}

.log-dock.info {
  border-top-color: rgba(59, 130, 246, 0.58);
}

.log-current {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: baseline;
  padding: 0 8px;
  transition: opacity 180ms ease, transform 180ms ease;
}

.log-current.hidden {
  color: #8d99ae;
  opacity: 0.72;
}

.log-current.visible {
  opacity: 1;
}

.log-current strong,
.log-current span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.log-current strong {
  flex: 0 1 auto;
  min-width: 0;
}

.log-current span {
  min-width: 0;
}

.log-muted {
  color: #8d99ae;
}

.log-toggle {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 32px;
  border: 1px solid #343b49;
  border-radius: 4px;
  background: #242a35;
  color: #eef2ff;
  padding: 6px 10px;
  cursor: pointer;
}

.log-toggle:hover {
  background: #2d3543;
}

.log-toggle .log-count {
  min-width: 22px;
  border-radius: 4px;
  background: #1b202b;
  color: #dbeafe;
  padding: 2px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}

.log-history {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  display: grid;
  grid-column: 1 / -1;
  gap: 6px;
  max-height: 230px;
  overflow: auto;
  border: 1px solid #2b3342;
  border-bottom: 0;
  background: #151923;
  padding: 7px 14px;
}

.log-history-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #2b3342;
  border-radius: 4px;
  background: #0d1016;
  padding: 8px;
}

.log-history-row.error {
  border-color: rgba(239, 68, 68, 0.42);
}

.log-history-row.success {
  border-color: rgba(34, 197, 94, 0.36);
}

.log-history-row.info {
  border-color: rgba(59, 130, 246, 0.36);
}

.log-history-row time {
  color: #8d99ae;
  font-size: 12px;
}

.log-history-row strong,
.log-history-row span {
  display: block;
  overflow-wrap: anywhere;
}

.log-history-row span {
  color: #b6c2d4;
}

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

@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}

@keyframes finder-border-top {
  0% {
    left: -116px;
    opacity: 0;
  }

  4%,
  23% {
    opacity: 1;
  }

  25%,
  100% {
    left: calc(100% + 8px);
    opacity: 0;
  }
}

@keyframes finder-border-right {
  0%,
  25% {
    top: -72px;
    opacity: 0;
  }

  29%,
  48% {
    opacity: 1;
  }

  50%,
  100% {
    top: calc(100% + 8px);
    opacity: 0;
  }
}

@keyframes finder-border-bottom {
  0%,
  50% {
    right: -116px;
    opacity: 0;
  }

  54%,
  73% {
    opacity: 1;
  }

  75%,
  100% {
    right: calc(100% + 8px);
    opacity: 0;
  }
}

@keyframes finder-border-left {
  0%,
  75% {
    bottom: -72px;
    opacity: 0;
  }

  79%,
  98% {
    opacity: 1;
  }

  100% {
    bottom: calc(100% + 8px);
    opacity: 0;
  }
}

@keyframes shimmer {
  from {
    background-position: 220% 0;
  }

  to {
    background-position: -220% 0;
  }
}

@keyframes panel-swipe-right {
  from {
    opacity: 0;
    transform: translateX(34px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes panel-swipe-left {
  from {
    opacity: 0;
    transform: translateX(-34px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tab-panel-frame,
  .tab-panel,
  .finder-card .finder-border-glow,
  .finder-border-glow-segment,
  .status-light,
  .summary-status-dot.checking,
  .list-skeleton span,
  .tile-loading {
    animation: none;
    transition: none;
  }
}

@media (max-width: 680px) {
  .simple-shell {
    padding: var(--app-header-height) 0 var(--app-footer-height);
  }

  .simple-panel {
    height: calc(100vh - var(--app-header-height) - var(--app-footer-height));
    padding: 12px 12px 16px;
  }

  .app-row {
    align-items: stretch;
    flex-direction: column;
  }

  .simple-header {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin: 0;
    padding: 7px 10px;
  }

  .simple-header h1 {
    font-size: 16px;
  }

  .simple-header .ghost-button {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .panel-tabs {
    gap: 1px;
    padding: 0 10px;
  }

  .ui-tabs {
    gap: 1px;
    padding: 0 10px;
  }

  .panel-tabs button {
    flex: 1 0 110px;
    min-height: var(--app-tab-height);
    padding: 8px 10px 9px;
    font-size: 13px;
  }

  .ui-tab {
    flex: 1 0 110px;
    min-height: var(--app-tab-height);
    padding: 8px 10px 9px;
    font-size: 13px;
  }

  .panel-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .panel-section-head > strong {
    text-align: left;
  }

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

  .summary-readout-head {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-pill {
    width: fit-content;
  }

  .summary-lines div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

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

  .setup-strip {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .apps-header {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .apps-title {
    min-height: 34px;
  }

  .apps-config-actions .command-row {
    grid-template-columns: 1fr;
  }

  .app-add-skeleton {
    grid-template-columns: 1fr;
  }

  .proxy-check-line {
    grid-template-columns: 1fr;
  }

  .add-toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .add-tile {
    width: 100%;
  }

  .process-add-line {
    grid-template-columns: 1fr;
  }

  .subscription-line {
    grid-template-columns: 38px minmax(0, 1fr) 42px;
  }

  .subscription-line input {
    grid-column: 2 / 4;
  }

  .subscription-line button:not(.icon-command) {
    grid-column: 1 / 3;
  }

  .subscription-line .icon-command {
    grid-column: 3;
    width: 42px;
  }

  .finder-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ui-service-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .service-actions {
    grid-column: 1 / -1;
  }

  .ui-service-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    width: 100%;
  }

  .ui-service-actions > .ui-button {
    width: 100%;
  }

  .ui-service-actions > .ui-button:only-child {
    grid-column: 1 / -1;
  }

  .setup-strip-items {
    flex-wrap: wrap;
    overflow: visible;
  }

  .setup-details {
    grid-column: 1 / -1;
  }

  .service-button {
    flex: 1;
  }

  .singbox-info-popover {
    width: auto;
  }

  .singbox-info-grid {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .server-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .command-row {
    grid-template-columns: 1fr;
  }

  .log-dock {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0;
    padding: 7px 10px;
  }

  .log-current {
    align-items: baseline;
    flex-direction: row;
    gap: 8px;
    padding: 0 4px;
  }

  .log-current strong {
    white-space: nowrap;
  }

  .log-current span:not(.log-muted) {
    display: none;
  }

  .log-history {
    max-height: 220px;
    padding: 7px 10px;
  }

  .log-history-row {
    grid-template-columns: 1fr;
  }
}
