
.mobile-header-search-button {
  display: none;
}

@media (max-width: 780px) {
  html {
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    padding: 14px 14px 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .workspace,
  .view-mount {
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
  }

  .workspace-header,
  .panel,
  .notice,
  .config-card,
  .user-card {
    padding: 16px;
  }

  .workspace-title-line {
    align-items: flex-start;
  }

  .workspace-actions {
    justify-content: flex-start;
    margin-left: 0;
  }

  .workspace-actions.has-mobile-header-search {
    width: 100%;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .workspace-actions.has-mobile-header-search .pill,
  .workspace-actions.has-mobile-header-search .session-bar {
    display: none;
  }

  .mobile-header-search-button:not(.hidden) {
    display: inline-flex;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--semi-color-border);
    background: var(--semi-color-bg-1);
    color: var(--semi-color-text-2);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  }

  .mobile-header-search-button.is-active:not(.hidden) {
    border-color: rgba(0, 100, 250, 0.36);
    background: rgba(0, 100, 250, 0.08);
    color: var(--semi-color-primary);
  }

  .mobile-header-clear-button.is-danger:not(.hidden) {
    border-color: rgba(245, 63, 63, 0.24);
    background: rgba(245, 63, 63, 0.07);
    color: var(--semi-color-danger, #f53f3f);
  }

  .mobile-header-search-button:disabled {
    cursor: not-allowed;
    opacity: 0.46;
  }

  .mobile-header-search-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .view-mount[data-view="accounts"] .account-tab-controls > .app-search-trigger,
  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls > .app-search-trigger {
    display: none;
  }

  .view-mount[data-view="transferCenter"] .transfer-mobile-header-tools,
  .view-mount[data-view="archiveOrganize"] .transfer-mobile-header-tools,
  .view-mount[data-view="embyLibraryCoverMaker"] .emby-cover-maker-toolbar {
    display: none;
  }

  .view-mount[data-view="embyLibraryPoster"] .emby-browser-head .emby-search-trigger {
    display: none;
  }

  .view-mount[data-view="embyLibraryPoster"] .emby-browser-shell.is-home .emby-browser-head .tg-discover-controls {
    display: none;
  }

  .view-mount[data-view="embyLibraryCoverMaker"] .emby-cover-maker-library-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .view-mount[data-view="embyLibraryCoverMaker"] .emby-cover-maker-library-tab {
    min-height: 152px;
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
    border-radius: 18px;
  }

  .view-mount[data-view="embyLibraryCoverMaker"] .emby-cover-maker-library-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    flex-basis: auto;
    border-radius: 14px;
  }

  .view-mount[data-view="embyLibraryCoverMaker"] .emby-cover-maker-library-copy {
    gap: 3px;
  }

  .view-mount[data-view="embyLibraryCoverMaker"] .emby-cover-maker-library-copy strong {
    font-size: 14px;
    line-height: 1.25;
  }

  .view-mount[data-view="embyLibraryCoverMaker"] .emby-cover-maker-library-copy span {
    font-size: 12px;
  }

  .view-mount[data-view="archiveOrganize"] .archive-organize-config-panel .panel-head + .archive-organize-config-divider {
    margin-top: 22px;
  }

  .view-mount[data-view="accounts"] .account-tab-controls,
  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls.has-leading-action {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--mobile-page-action-size, 40px);
    align-items: center;
    justify-content: stretch;
    gap: var(--rose-page-action-gap);
  }

  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls.has-leading-action > .app-icon-action-button {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls.has-leading-action > .view-tabs {
    grid-column: 1;
    grid-row: 1;
  }

  .view-mount[data-view="sync"] > .page-toolbar {
    --sync-mobile-add-size: var(--rose-page-action-height);
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--sync-mobile-add-size);
    align-items: center;
    gap: var(--rose-page-action-gap);
    padding: 14px 16px;
  }

  .view-mount[data-view="sync"] > .page-toolbar > .page-toolbar-main {
    display: none;
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline {
    display: contents;
    width: auto;
  }

  .view-mount[data-view="sync"] > .page-toolbar .soft-pills {
    display: none;
  }

  .view-mount[data-view="accounts"] > .page-toolbar,
  .view-mount[data-view="embyUsers"] > .page-toolbar,
  .view-mount[data-view="cookiePool"] > .page-toolbar {
    padding: 14px 16px;
  }

  .view-mount[data-view="cookiePool"] > .page-toolbar {
    --mobile-page-action-size: var(--rose-page-action-height);
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--mobile-page-action-size);
    align-items: center;
    gap: var(--rose-page-action-gap);
  }

  .view-mount[data-view="accounts"] > .page-toolbar > .page-toolbar-main,
  .view-mount[data-view="embyUsers"] > .page-toolbar > .page-toolbar-main,
  .view-mount[data-view="cookiePool"] > .page-toolbar > .page-toolbar-main {
    display: none;
  }

  .view-mount[data-view="accounts"] > .page-toolbar > .toolbar-inline,
  .view-mount[data-view="embyUsers"] > .page-toolbar > .toolbar-inline,
  .view-mount[data-view="cookiePool"] > .page-toolbar > .toolbar-inline {
    width: 100%;
  }

  .view-mount[data-view="cookiePool"] > .page-toolbar > .toolbar-inline,
  .view-mount[data-view="cookiePool"] > .page-toolbar > .toolbar-inline > .toolbar-inline {
    display: contents;
    width: auto;
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .button-accent {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    flex: 0 0 var(--sync-mobile-add-size);
    width: var(--sync-mobile-add-size);
    min-width: var(--sync-mobile-add-size);
    height: var(--sync-mobile-add-size);
    min-height: var(--sync-mobile-add-size);
    padding: 0;
    border-radius: 999px;
    font-size: 0;
    line-height: 0;
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .button-accent::before,
  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .button-accent::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .button-accent::before {
    width: 14px;
    height: 2px;
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .button-accent::after {
    width: 2px;
    height: 14px;
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .view-tabs {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    grid-template-columns: none;
    width: 100%;
    min-height: var(--rose-page-action-height);
    gap: 24px;
    padding: 0;
    overflow-x: auto;
    border: 0;
    border-radius: 0;
    background: transparent;
    scrollbar-width: none;
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .view-tabs::-webkit-scrollbar {
    display: none;
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .view-tabs .view-tab {
    position: relative;
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    min-height: var(--rose-page-action-height);
    padding: 0 2px;
    border-radius: 0;
    background: transparent;
    color: var(--semi-color-text-1);
    font-size: 15px;
    font-weight: 700;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .view-tabs .view-tab::before {
    content: "";
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: var(--sync-tab-icon) center / contain no-repeat;
    mask: var(--sync-tab-icon) center / contain no-repeat;
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .view-tabs .view-tab[data-kind="cloud"] {
    --sync-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M3%207.5A2.5%202.5%200%200%201%205.5%205H10l2%202h6.5A2.5%202.5%200%200%201%2021%209.5v7A2.5%202.5%200%200%201%2018.5%2019h-13A2.5%202.5%200%200%201%203%2016.5z'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .view-tabs .view-tab[data-kind="share"] {
    --sync-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M8%207h10a2%202%200%200%201%202%202v8a2%202%200%200%201-2%202H8a2%202%200%200%201-2-2V9a2%202%200%200%201%202-2Z'/%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M4%2015H3a2%202%200%200%201-2-2V5a2%202%200%200%201%202-2h10a2%202%200%200%201%202%202v1'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .view-tabs .view-tab.active {
    background: transparent;
    color: var(--semi-color-primary);
    box-shadow: none;
  }

  .view-mount[data-view="sync"] > .page-toolbar > .toolbar-inline > .view-tabs .view-tab.active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
  }

  .view-mount[data-view="accounts"] .account-tab-controls {
    --mobile-page-action-size: var(--rose-page-action-height);
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--mobile-page-action-size);
    align-items: center;
    justify-content: stretch;
    gap: var(--rose-page-action-gap);
  }

  .view-mount[data-view="accounts"] .account-tab-controls > .button-accent,
  .view-mount[data-view="cookiePool"] > .page-toolbar .button-accent[data-action="add-cookie-pool-account"] {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    flex: 0 0 var(--mobile-page-action-size);
    width: var(--mobile-page-action-size);
    min-width: var(--mobile-page-action-size);
    height: var(--mobile-page-action-size);
    min-height: var(--mobile-page-action-size);
    padding: 0;
    border-radius: 999px;
    font-size: 0;
    line-height: 0;
  }

  .view-mount[data-view="accounts"] .account-tab-controls > .button-accent::before,
  .view-mount[data-view="accounts"] .account-tab-controls > .button-accent::after,
  .view-mount[data-view="cookiePool"] > .page-toolbar .button-accent[data-action="add-cookie-pool-account"]::before,
  .view-mount[data-view="cookiePool"] > .page-toolbar .button-accent[data-action="add-cookie-pool-account"]::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
  }

  .view-mount[data-view="accounts"] .account-tab-controls > .button-accent::before,
  .view-mount[data-view="cookiePool"] > .page-toolbar .button-accent[data-action="add-cookie-pool-account"]::before {
    width: 14px;
    height: 2px;
  }

  .view-mount[data-view="accounts"] .account-tab-controls > .button-accent::after,
  .view-mount[data-view="cookiePool"] > .page-toolbar .button-accent[data-action="add-cookie-pool-account"]::after {
    width: 2px;
    height: 14px;
  }

  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls {
    --mobile-page-action-size: var(--rose-page-action-height);
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    justify-content: stretch;
    gap: var(--rose-page-action-gap);
  }

  .view-mount[data-view="cookiePool"] .cookie-pool-tab-controls {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: var(--rose-page-action-gap);
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .view-mount[data-view="cookiePool"] .cookie-pool-tab-controls::-webkit-scrollbar {
    display: none;
  }

  .view-mount[data-view="system"] .system-config-tabs {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }

  .view-mount[data-view="accounts"] .account-tab-controls .view-tabs,
  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls .view-tabs,
  .view-mount[data-view="cookie"] > .user-cookie-bind-tab-panel .user-cookie-bind-tabs .view-tabs,
  .view-mount[data-view="cookie"] .page-toolbar .user-cookie-bind-tabs .view-tabs,
  .view-mount[data-view="cookiePool"] .cookie-pool-tabs,
  .view-mount[data-view="cookiePool"] .cookie-pool-window-tabs,
  .view-mount[data-view="system"] .system-config-tab-list,
  .view-mount[data-view="transferCenter"] .transfer-center-tabs,
  .view-mount[data-view="archiveOrganize"] .transfer-center-tabs {
    display: flex;
    grid-template-columns: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: var(--rose-page-action-height);
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    scrollbar-width: none;
  }

  .view-mount[data-view="accounts"] .account-tab-controls .view-tabs,
  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls .view-tabs {
    grid-column: 1;
    grid-row: 1;
  }

  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls.has-leading-action .view-tabs {
    grid-column: 1;
    grid-row: 1;
  }

  .view-mount[data-view="embyUsers"] .admin-emby-summary-tags {
    display: none;
  }

  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls.has-leading-action > .app-icon-action-button {
    flex: 0 0 var(--mobile-page-action-size);
    width: var(--mobile-page-action-size);
    min-width: var(--mobile-page-action-size);
    height: var(--mobile-page-action-size);
    min-height: var(--mobile-page-action-size);
  }

  .view-mount[data-view="accounts"] .account-tab-controls .view-tabs::-webkit-scrollbar,
  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls .view-tabs::-webkit-scrollbar,
  .view-mount[data-view="cookie"] > .user-cookie-bind-tab-panel .user-cookie-bind-tabs .view-tabs::-webkit-scrollbar,
  .view-mount[data-view="cookie"] .page-toolbar .user-cookie-bind-tabs .view-tabs::-webkit-scrollbar,
  .view-mount[data-view="cookiePool"] .cookie-pool-tabs::-webkit-scrollbar,
  .view-mount[data-view="cookiePool"] .cookie-pool-window-tabs::-webkit-scrollbar,
  .view-mount[data-view="system"] .system-config-tab-list::-webkit-scrollbar,
  .view-mount[data-view="transferCenter"] .transfer-center-tabs::-webkit-scrollbar,
  .view-mount[data-view="archiveOrganize"] .transfer-center-tabs::-webkit-scrollbar {
    display: none;
  }

  .view-mount[data-view="accounts"] .account-tab-controls .view-tab,
  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls .view-tab,
  .view-mount[data-view="cookie"] > .user-cookie-bind-tab-panel .user-cookie-bind-tabs .view-tab,
  .view-mount[data-view="cookie"] .page-toolbar .user-cookie-bind-tabs .view-tab,
  .view-mount[data-view="cookiePool"] .cookie-pool-tabs .view-tab,
  .view-mount[data-view="cookiePool"] .cookie-pool-window-tabs .view-tab,
  .view-mount[data-view="system"] .system-config-tab-list .view-tab,
  .view-mount[data-view="transferCenter"] .transfer-center-tab,
  .view-mount[data-view="archiveOrganize"] .transfer-center-tab {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M7%207h10M7%2012h10M7%2017h10'/%3E%3C/svg%3E");
    position: relative;
    flex: 0 0 auto;
    width: auto;
    min-width: max-content;
    min-height: var(--rose-page-action-height);
    height: auto;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--semi-color-text-1);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }

  .view-mount[data-view="system"] .system-config-tab-list .view-tab[data-tab="subscription"] {
    grid-column: auto;
  }

  .view-mount[data-view="accounts"] .account-tab-controls .view-tab::before,
  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls .view-tab::before,
  .view-mount[data-view="cookie"] > .user-cookie-bind-tab-panel .user-cookie-bind-tabs .view-tab::before,
  .view-mount[data-view="cookie"] .page-toolbar .user-cookie-bind-tabs .view-tab::before,
  .view-mount[data-view="cookiePool"] .cookie-pool-tabs .view-tab::before,
  .view-mount[data-view="cookiePool"] .cookie-pool-window-tabs .view-tab::before,
  .view-mount[data-view="system"] .system-config-tab-list .view-tab::before,
  .view-mount[data-view="transferCenter"] .transfer-center-tab::before,
  .view-mount[data-view="archiveOrganize"] .transfer-center-tab::before {
    content: "";
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: var(--mobile-page-tab-icon) center / contain no-repeat;
    mask: var(--mobile-page-tab-icon) center / contain no-repeat;
  }

  .view-mount[data-view="accounts"] .account-tab-controls .view-tab[data-kind="resource"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M3%207a2%202%200%200%201%202-2h4l2%202h8a2%202%200%200%201%202%202v8a2%202%200%200%201-2%202H5a2%202%200%200%201-2-2Z'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="accounts"] .account-tab-controls .view-tab[data-kind="transfer"],
  .view-mount[data-view="transferCenter"] .transfer-center-tab[data-tab="transferHistory"],
  .view-mount[data-view="archiveOrganize"] .transfer-center-tab[data-tab="transferHistory"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M16%203l4%204-4%204M20%207H7a4%204%200%200%200%200%208h1M8%2021l-4-4%204-4M4%2017h13a4%204%200%200%200%200-8h-1'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls .view-tab[data-tab="users"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M20%2021a8%208%200%200%200-16%200M12%2012a4%204%200%201%200%200-8%204%204%200%200%200%200%208Z'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls .view-tab[data-tab="bindings"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M10%2013a5%205%200%200%200%207%200l2-2a5%205%200%200%200-7-7l-1%201M14%2011a5%205%200%200%200-7%200l-2%202a5%205%200%200%200%207%207l1-1'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="cookie"] .user-cookie-bind-tabs .view-tab[data-tab="auto"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.1'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M12%203l1.4%204.1L17.5%208.5l-4.1%201.4L12%2014l-1.4-4.1-4.1-1.4%204.1-1.4ZM19%2014l.8%202.2L22%2017l-2.2.8L19%2020l-.8-2.2L16%2017l2.2-.8ZM5%2015l.8%202.2L8%2018l-2.2.8L5%2021l-.8-2.2L2%2018l2.2-.8Z'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="cookie"] .user-cookie-bind-tabs .view-tab[data-tab="manual"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M8%206h13M8%2012h13M8%2018h13M3%206h.01M3%2012h.01M3%2018h.01'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="cookiePool"] .cookie-pool-tabs .view-tab[data-cookie-pool-tab="list"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M8%206h13M8%2012h13M8%2018h13M3%206h.01M3%2012h.01M3%2018h.01'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="cookiePool"] .cookie-pool-tabs .view-tab[data-cookie-pool-tab="stats"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M4%2019V5M4%2019h16M8%2016v-5M12%2016V8M16%2016v-8'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="cookiePool"] .cookie-pool-window-tabs .view-tab[data-cookie-pool-window] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.1'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M12%208v5l3%202M21%2012a9%209%200%201%201-18%200%209%209%200%200%201%2018%200Z'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="system"] .system-config-tab-list .view-tab[data-tab="core"],
  .view-mount[data-view="transferCenter"] .transfer-center-tab[data-tab="config"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M4%2021v-7M4%2010V3M12%2021v-9M12%208V3M20%2021v-5M20%2012V3M2%2014h4M10%208h4M18%2016h4'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="system"] .system-config-tab-list .view-tab[data-tab="subscription"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.1'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M18%208a6%206%200%200%200-12%200c0%207-3%207-3%209h18c0-2-3-2-3-9M10%2021h4'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="transferCenter"] .transfer-center-tab[data-tab="discover"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.2'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='m21%2021-4.3-4.3M11%2019a8%208%200%201%200%200-16%208%208%200%200%200%200%2016Z'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="transferCenter"] .transfer-center-tab[data-tab="records"],
  .view-mount[data-view="transferCenter"] .transfer-center-tab[data-tab="history"],
  .view-mount[data-view="archiveOrganize"] .transfer-center-tab[data-tab="history"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.1'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M12%208v5l3%202M21%2012a9%209%200%201%201-18%200%209%209%200%200%201%2018%200Z'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="archiveOrganize"] .transfer-center-tab[data-tab="monitor"] {
    --mobile-page-tab-icon: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%3E%3Cpath%20fill='none'%20stroke='black'%20stroke-width='2.1'%20stroke-linecap='round'%20stroke-linejoin='round'%20d='M12%2021a9%209%200%201%200%200-18%209%209%200%200%200%200%2018ZM12%2012h.01M8%2012a4%204%200%200%201%208%200M5%2012a7%207%200%200%201%2014%200'/%3E%3C/svg%3E");
  }

  .view-mount[data-view="accounts"] .account-tab-controls .view-tab.active,
  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls .view-tab.active,
  .view-mount[data-view="cookie"] > .user-cookie-bind-tab-panel .user-cookie-bind-tabs .view-tab.active,
  .view-mount[data-view="cookie"] .page-toolbar .user-cookie-bind-tabs .view-tab.active,
  .view-mount[data-view="cookiePool"] .cookie-pool-tabs .view-tab.active,
  .view-mount[data-view="cookiePool"] .cookie-pool-window-tabs .view-tab.active,
  .view-mount[data-view="system"] .system-config-tab-list .view-tab.active,
  .view-mount[data-view="transferCenter"] .transfer-center-tab.active,
  .view-mount[data-view="archiveOrganize"] .transfer-center-tab.active {
    background: transparent;
    color: var(--semi-color-primary);
    box-shadow: none;
  }

  .view-mount[data-view="accounts"] .account-tab-controls .view-tab.active::after,
  .view-mount[data-view="embyUsers"] .emby-combined-tab-controls .view-tab.active::after,
  .view-mount[data-view="cookie"] > .user-cookie-bind-tab-panel .user-cookie-bind-tabs .view-tab.active::after,
  .view-mount[data-view="cookie"] .page-toolbar .user-cookie-bind-tabs .view-tab.active::after,
  .view-mount[data-view="cookiePool"] .cookie-pool-tabs .view-tab.active::after,
  .view-mount[data-view="cookiePool"] .cookie-pool-window-tabs .view-tab.active::after,
  .view-mount[data-view="system"] .system-config-tab-list .view-tab.active::after,
  .view-mount[data-view="transferCenter"] .transfer-center-tab.active::after,
  .view-mount[data-view="archiveOrganize"] .transfer-center-tab.active::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 4px;
    border-radius: 999px;
    background: currentColor;
  }

  .workspace-footer {
    gap: 8px;
  }

  .workspace-header-bar,
  .page-toolbar,
  .disclaimer-head,
  .disclaimer-actions,
  .detail-modal-foot {
    align-items: stretch;
  }

  .detail-modal-head {
    position: relative;
    display: block;
    padding-right: 72px;
  }

  .detail-modal-actions {
    position: absolute;
    top: 16px;
    right: 16px;
    width: auto;
    max-width: calc(100% - 32px);
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .detail-modal-actions .modal-close-button {
    margin-left: auto;
  }

  .disclaimer-actions button {
    flex: 1 1 auto;
  }

  .log-toolbar-side {
    justify-items: stretch;
  }

  .log-toolbar-side .soft-pills,
  .log-toolbar-side .toolbar-inline {
    width: 100%;
  }

  .toolbar-inline,
  .action-row {
    width: 100%;
  }

  .toolbar-inline > button,
  .action-row button {
    flex: 1 1 auto;
  }

  .users-toolbar-query {
    width: 100%;
    justify-content: flex-start;
  }

  .users-toolbar-actions {
    justify-content: flex-start;
  }

  .sync-item-actions,
  .share-item-actions {
    display: flex;
  }

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

  .tg-notify-grid {
    grid-template-columns: 1fr;
  }

  .list-head {
    display: none;
  }

  .list-item {
    padding: 14px;
  }

  .tg-runtime-log-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .tg-runtime-log-time {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .detail-modal-body {
    padding: 16px;
  }

  .disclaimer-head,
  .disclaimer-body,
  .disclaimer-actions {
    padding-left: 16px;
    padding-right: 16px;
  }

  .detail-modal-foot button {
    flex: 1 1 auto;
  }

  .dock-wrap {
    max-height: min(44vh, 380px);
  }
}

@media (max-width: 1200px) {
  body {
    padding-bottom: 0;
  }

  .workspace {
    padding-bottom: 0;
  }

  .view-mount {
    box-sizing: border-box;
    padding-bottom: var(--mobile-dock-modal-clearance);
    scroll-padding-bottom: var(--mobile-dock-modal-clearance);
  }

  .workspace-footer {
    display: none;
  }

  .mobile-dock {
    inset: auto 0 0;
    height: var(--mobile-dock-modal-clearance);
    overflow: visible;
    background: transparent;
  }

  .mobile-dock.drawer-open {
    inset: 0;
    height: auto;
  }

  .mobile-dock:not(.drawer-open) .mobile-dock-backdrop {
    display: none;
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .workspace-footer {
    position: fixed;
    right: 24px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 1200;
    padding: 0;
    border-top: 0;
    background: transparent;
    box-shadow: none;
  }

  .workspace-footer-meta {
    gap: 12px;
    padding: 0;
  }
}

.shell.unauthenticated {
  grid-template-columns: 1fr;
  gap: 0;
  max-width: none;
}

.shell.unauthenticated .dock-wrap {
  display: none;
}

.shell.unauthenticated .workspace {
  gap: 0;
}

.shell.unauthenticated .workspace-header,
.shell.unauthenticated .workspace-footer {
  display: none;
}

.shell.unauthenticated .view-mount {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-right: 0;
}

.session-bar {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(120, 30, 57, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: var(--semi-color-text-1);
  box-shadow: var(--semi-shadow-soft);
  white-space: nowrap;
}

.auth-shell {
  position: relative;
  width: 100%;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: clamp(48px, 9vh, 92px) clamp(16px, 3vw, 28px);
  isolation: isolate;
  overflow: hidden;
}

.auth-shell::before,
.auth-shell::after {
  display: none;
}

.auth-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 560px);
  display: grid;
  place-items: center;
}

.auth-kicker {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 223, 230, 0.74);
}

.auth-card {
  position: relative;
  width: min(100%, 480px);
  display: grid;
  align-content: start;
  gap: 0;
  margin-inline: auto;
  padding: 28px 22px 18px;
  border-radius: 32px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 211, 191, 0.2), transparent 24%),
    radial-gradient(circle at 78% 82%, rgba(255, 121, 150, 0.14), transparent 28%),
    linear-gradient(145deg, rgba(255, 248, 250, 0.18), rgba(206, 176, 186, 0.14));
  border: 1px solid rgba(255, 236, 241, 0.24);
  box-shadow:
    0 36px 80px rgba(7, 5, 9, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(26px) saturate(1.18);
}

.auth-card::before,
.auth-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.auth-card::before {
  background:
    radial-gradient(circle at top center, rgba(255, 248, 250, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  opacity: 0.9;
}

.auth-card::after {
  inset: 2px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-brand {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 7px;
  max-width: 340px;
  margin: 0 auto;
}

.auth-logo-mark {
  width: clamp(72px, 10vw, 88px);
  aspect-ratio: 1 / 1;
  padding: 7px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(160deg, rgba(133, 23, 49, 0.52), rgba(30, 14, 22, 0.64));
  box-shadow:
    0 18px 36px rgba(12, 7, 11, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.auth-logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  background: #050304;
  filter:
    drop-shadow(0 0 12px rgba(255, 116, 150, 0.16))
    drop-shadow(0 10px 16px rgba(8, 4, 7, 0.18));
}

.auth-title {
  margin: 0;
  font-size: clamp(24px, 3.8vw, 32px);
  line-height: 1.12;
  letter-spacing: 0.02em;
  color: #fff7f8;
}

.auth-subline {
  margin: 0;
  color: rgba(255, 233, 238, 0.82);
  font-size: 10px;
  line-height: 1.45;
}

.auth-runtime {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e8fff1;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(8, 5, 8, 0.18);
  margin-top: 8px;
}

.auth-runtime-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3ddc97;
  box-shadow: 0 0 16px rgba(61, 220, 151, 0.54);
  flex: 0 0 auto;
}

.auth-runtime.warn {
  color: #ffe8bf;
}

.auth-runtime.warn .auth-runtime-dot {
  background: #f7b955;
  box-shadow: 0 0 16px rgba(247, 185, 85, 0.5);
}

.auth-login-shell {
  position: relative;
  z-index: 1;
  width: min(100%, 360px);
  margin: 18px auto 0;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  margin-bottom: 12px;
  border-radius: 18px;
  background: rgba(255, 247, 249, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 12px 22px rgba(17, 9, 13, 0.18);
}

.auth-inline-error {
  margin: 0 0 10px;
  padding: 7px 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 134, 134, 0.22);
  background: rgba(124, 25, 25, 0.24);
  color: #ffd6d6;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 10px 20px rgba(33, 8, 12, 0.18);
}

.auth-switch button {
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 231, 236, 0.72);
  font-weight: 600;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.auth-switch button.active {
  background: linear-gradient(135deg, #ffc37d, #ff9a52);
  color: #36190d;
  box-shadow: 0 12px 24px rgba(255, 160, 86, 0.32);
}

.auth-form-shell {
  display: grid;
  gap: 14px;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-submit {
  width: min(100%, 236px);
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffc37d, #ff9b52);
  color: #381b0d;
  font-size: clamp(16px, 2.2vw, 18px);
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: 0 18px 34px rgba(12, 8, 12, 0.3);
  justify-self: center;
  justify-content: center;
}

.auth-submit:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, #ffcc8e, #ffa962);
  box-shadow: 0 20px 36px rgba(12, 8, 12, 0.34);
}

.auth-form-slot {
  min-height: 124px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.auth-field-stack {
  width: 100%;
}

.auth-field-shell + .auth-field-shell {
  margin-top: 10px;
}

.auth-field-shell {
  position: relative;
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(151, 161, 174, 0.28), rgba(113, 123, 141, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 18px 34px rgba(10, 6, 11, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-field-shell-static {
  cursor: default;
}

.auth-field-shell::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 9px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 201, 141, 0.94), rgba(255, 154, 91, 0.74));
}

.auth-field-shell:focus-within {
  border-color: rgba(255, 214, 181, 0.48);
  box-shadow:
    0 20px 40px rgba(10, 6, 11, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 0 3px rgba(255, 188, 133, 0.12);
}

.auth-field-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: rgba(255, 231, 236, 0.68);
}

.auth-field-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-field-shell input {
  min-width: 0;
  min-height: 58px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff7f8;
  font-size: 13px;
  box-shadow: none;
}

.auth-static-input {
  color: rgba(255, 240, 243, 0.72) !important;
  cursor: default;
}

.auth-field-shell input::placeholder {
  color: rgba(255, 230, 235, 0.38);
}

.auth-field-shell input:focus {
  border: 0;
  box-shadow: none;
}

.auth-footer-separator {
  width: 100%;
  height: 1px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-login-footer {
  margin-top: 10px;
  display: grid;
  gap: 4px;
  justify-items: center;
  text-align: center;
}

.auth-login-footer p {
  margin: 0;
  color: rgba(255, 231, 236, 0.62);
  font-size: 11px;
}

.auth-login-footer-link {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffd59a;
  font-size: 11px;
  font-weight: 700;
  box-shadow: none;
}

.auth-login-footer-link:hover {
  background: transparent;
  color: #ffe0b5;
  box-shadow: none;
  transform: none;
}

.field-static {
  gap: 10px;
}

.field-static-value {
  width: 100%;
  box-sizing: border-box;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--semi-color-border);
  background: #f3f4f6;
  color: var(--semi-color-text-1);
  text-align: left;
  word-break: break-word;
}

.field-static-secret {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  justify-content: flex-start;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 500;
  line-height: 1.45;
  overflow: hidden;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.field-static-secret:hover {
  background: #f6f7fb;
  border-color: #d7e0ee;
  box-shadow: 0 8px 18px rgba(52, 84, 128, 0.08);
}

.field-static-secret:focus-visible {
  outline: none;
  border-color: #8fb7ff;
  box-shadow: 0 0 0 3px rgba(76, 132, 255, 0.16);
}

.field-static-secret-text,
.field-static-secret-hint {
  pointer-events: none;
}

.field-static-secret-text {
  display: block;
  width: 100%;
  padding-right: 92px;
  font-variant-numeric: tabular-nums;
  transition: filter 180ms ease, opacity 180ms ease, text-shadow 180ms ease;
}

.field-static-secret.is-masked .field-static-secret-text {
  filter: blur(7px);
  opacity: 0.92;
  text-shadow: 0 0 10px rgba(71, 85, 105, 0.3);
  user-select: none;
}

.field-static-secret-hint {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #4b6387;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(52, 84, 128, 0.12);
}

.field-static-secret.is-revealed .field-static-secret-hint {
  background: rgba(237, 245, 255, 0.94);
  color: #315ea8;
}

.user-cookie-form {
  grid-template-columns: 1fr;
}

.emby-user-path {
  display: inline-flex;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(246, 247, 249, 0.95);
  color: var(--semi-color-text-1);
  font-size: 12px;
  line-height: 1.5;
  word-break: break-all;
}

@media (max-width: 960px) {
  .auth-shell {
    padding: 40px 10px 52px;
  }

  .auth-shell::before {
    width: 62vw;
    opacity: 0.44;
  }

  .auth-shell::after {
    right: -120px;
    width: min(72vw, 520px);
    opacity: 0.1;
  }

  .auth-stage {
    width: 100%;
  }

  .auth-card {
    width: min(100%, 480px);
    padding: 24px 18px 18px;
  }
}

@media (max-width: 640px) {
  .tg-subscribed-page-toolbar {
    flex-wrap: nowrap;
    align-items: center;
  }

  .tg-subscribed-page-toolbar .tg-subscribed-page-toolbar-main,
  .tg-subscribed-page-toolbar .tg-subscribed-page-toolbar-actions,
  .tg-subscribed-page-toolbar .tg-subscribed-toolbar-pills,
  .tg-subscribed-page-toolbar .tg-subscribed-toolbar-actions {
    width: auto;
  }

  .tg-subscribed-page-toolbar .tg-subscribed-page-toolbar-main {
    min-width: 0;
    flex: 1 1 auto;
  }

  .tg-subscribed-page-toolbar .tg-subscribed-page-toolbar-actions {
    margin-left: auto;
    display: flex;
    flex: 0 0 auto;
    width: auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
  }

  .tg-subscribed-page-toolbar .tg-subscribed-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
  }

  .tg-subscribed-page-toolbar .tg-subscribed-page-toolbar-actions > .tg-subscribed-toolbar-actions {
    width: auto;
  }

  .tg-subscribed-page-toolbar .tg-subscribed-toolbar-actions > button {
    width: auto;
    flex: 0 0 auto;
  }

  .tg-task-target-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tg-task-organize-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .tg-subscribed-card-status-bar {
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: nowrap;
  }

  .tg-subscribed-card-status-row {
    flex: 0 0 auto;
    flex-wrap: nowrap;
  }

  .tg-subscribed-card-status-bar > .tg-match-detail-shell {
    margin-left: auto;
  }

  .tg-subscribed-card-body .tg-poster-card-meta {
    display: none;
  }

  .tg-match-detail-trigger-label-full {
    display: none;
  }

  .tg-match-detail-trigger-label-short {
    display: inline;
  }

  .tg-match-detail-popover {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    width: min(calc(100vw - 24px), 360px);
    max-width: calc(100vw - 24px);
    max-height: min(72vh, 560px);
    overflow-y: auto;
    transform: translate(-50%, -46%) scale(0.97);
    transform-origin: center center;
  }

  .tg-subscribed-card-status-bar > .tg-match-detail-shell .tg-match-detail-popover,
  .tg-subscribed-card-overlay-actions .tg-match-detail-popover {
    top: 50%;
    left: 50%;
    right: auto;
    width: min(calc(100vw - 24px), 360px);
    max-width: calc(100vw - 24px);
  }

  .tg-match-detail-popover::before {
    display: none;
  }

  .tg-match-detail-shell.is-open .tg-match-detail-popover {
    transform: translate(-50%, -50%) scale(1);
  }

  .tg-discover-search-dialog {
    width: min(100vw - 16px, 680px);
    max-height: calc(100vh - var(--mobile-dock-modal-clearance) - 16px);
    border-radius: 22px;
  }

  .tg-discover-search-head {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 14px 12px;
  }

  .tg-discover-search-head .modal-close-button {
    position: absolute;
    top: 14px;
    right: 14px;
  }

  .tg-discover-search-toolbar,
  .tg-discover-search-body,
  .tg-discover-search-foot {
    padding-left: 14px;
    padding-right: 14px;
  }

  .tg-discover-search-result {
    grid-template-columns: 1fr;
  }

  .tg-discover-search-result-media {
    max-width: 124px;
    justify-self: center;
  }

  .tg-discover-search-foot {
    justify-content: flex-start;
  }

  body.auth-screen {
    padding: 14px;
  }

  .auth-shell {
    padding: 28px 0 36px;
  }

  .auth-shell::before {
    width: 78vw;
    clip-path: polygon(0 0, 100% 0, 58% 100%, 0 100%);
  }

  .auth-shell::after {
    top: 18%;
    right: -72px;
    transform: none;
    width: 58vw;
    opacity: 0.08;
  }

  .auth-card {
    border-radius: 28px;
    width: min(100%, 420px);
    padding: 22px 12px 16px;
  }

  .auth-card::after {
    border-radius: 26px;
  }

  .auth-logo-mark {
    width: 72px;
    border-radius: 18px;
  }

  .auth-title {
    font-size: 25px;
  }

  .auth-subline {
    font-size: 10px;
  }

  .auth-login-shell {
    width: 100%;
    margin-top: 14px;
  }

  .auth-form-slot {
    min-height: 118px;
  }

  .auth-field-shell {
    min-height: 56px;
    padding: 0 14px;
  }

  .auth-field-shell input {
    min-height: 56px;
    font-size: 13px;
  }

  .auth-submit {
    width: min(100%, 212px);
    min-height: 46px;
    font-size: 16px;
  }

  .tg-poster-card,
  .tg-subscribed-card {
    padding: 10px;
    border-radius: 16px;
  }

  .tg-subscribed-card-actions > button {
    min-width: 0;
  }

  .tg-poster-card-body strong,
  .tg-subscribed-card-body strong,
  .tg-completed-card-head strong {
    font-size: 15px;
  }

  .tg-task-editor-hero {
    grid-template-columns: 1fr;
  }

  .tg-task-editor-poster {
    max-width: 160px;
  }

  .tg-subscribed-grid,
  .tg-subscribed-grid-completed {
    justify-content: stretch;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tg-subscribed-card-actions > button {
    min-height: 38px;
    padding: 0 6px;
    font-size: 12px;
  }
}

/* Sync Stats Chart */
.chart-panel {
  padding: 24px;
  margin-bottom: 24px;
}

.chart-panel .panel-head {
  margin-bottom: 20px;
  align-items: center;
}

.panel-head-actions {
  display: flex;
  gap: 8px;
}

.chart-panel .panel-head-actions .button-ghost.small {
  min-height: var(--rose-page-action-height, 44px);
  padding: 0 16px;
  border-radius: var(--rose-page-action-button-radius, 12px);
  font-weight: 700;
}

.chart-panel .panel-head-actions .button-ghost.small.active {
  color: var(--semi-color-primary);
  border-color: rgba(0, 100, 250, 0.28);
  background: #e8f3ff;
  box-shadow: 0 8px 18px rgba(0, 100, 250, 0.12);
}

.chart-panel .panel-head-actions .button-ghost.small.active:hover {
  border-color: rgba(0, 87, 219, 0.36);
  background: #dfeeff;
}

.sync-stats-chart {
  width: 100%;
  height: 300px;
  min-height: 200px;
}

@media (max-width: 768px) {
  .view-mount[data-view="sync"] {
    gap: 10px;
  }

  .view-mount[data-view="sync"] .chart-panel {
    margin-bottom: 0;
  }

  .chart-panel {
    padding: 16px;
  }

  .sync-stats-chart {
    height: 240px;
  }
}

@media (max-width: 1200px) {
  .workspace-header {
    position: relative;
    --workspace-mobile-back-x: 18px;
    --workspace-mobile-back-y: 14px;
    --workspace-mobile-back-size: 30px;
    --workspace-mobile-back-gap: 12px;
    --workspace-mobile-action-right: 18px;
    --workspace-mobile-search-size: 40px;
    --workspace-mobile-search-offset-y: -5px;
    --workspace-mobile-back-offset: calc(var(--workspace-mobile-back-size) + var(--workspace-mobile-back-gap));
  }

  .workspace-header:has(.workspace-back-button:not(.hidden)) .workspace-header-bar {
    align-items: center;
    flex-wrap: nowrap;
    min-height: var(--workspace-mobile-back-size);
  }

  .workspace-header:has(.workspace-back-button:not(.hidden)) .workspace-header-main {
    box-sizing: border-box;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    padding-left: var(--workspace-mobile-back-offset);
  }

  .workspace-header:has(.mobile-header-search-button:not(.hidden)) .workspace-header-main {
    padding-right: calc(var(--workspace-mobile-search-size) + var(--workspace-mobile-back-gap));
  }

  .workspace-header:has(.workspace-actions.has-mobile-header-action-group) .workspace-header-main {
    padding-right: calc((var(--workspace-mobile-search-size) * 2) + (var(--workspace-mobile-back-gap) * 2));
  }

  .workspace-header:has(.workspace-back-button:not(.hidden)) .workspace-title {
    width: auto;
    min-width: 0;
  }

  .workspace-header:has(.workspace-back-button:not(.hidden)) .workspace-title-line {
    width: auto;
    min-width: 0;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
  }

  .workspace-header:has(.workspace-back-button:not(.hidden)) .workspace-title h1 {
    min-width: 0;
    max-width: 100%;
    font-size: 30px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .workspace-header:has(.workspace-back-button:not(.hidden)) .workspace-actions {
    flex: 0 0 auto;
    margin-left: 0;
    min-height: 0;
  }

  .workspace-header .workspace-actions.has-mobile-header-search {
    position: static;
    display: flex;
    width: auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .workspace-header .workspace-back-button:not(.hidden) {
    position: absolute;
    top: var(--workspace-mobile-back-y);
    left: var(--workspace-mobile-back-x);
    z-index: 2;
    width: var(--workspace-mobile-back-size);
    min-width: var(--workspace-mobile-back-size);
    height: var(--workspace-mobile-back-size);
    min-height: var(--workspace-mobile-back-size);
    border-radius: 12px;
  }

  .workspace-header .workspace-back-button:not(.hidden) .workspace-back-button-icon,
  .workspace-header .workspace-back-button:not(.hidden) svg {
    width: 16px;
    height: 16px;
  }

  .workspace-header .workspace-back-button:not(.hidden) svg {
    stroke-width: 1.9;
  }

  .workspace-header .mobile-header-search-button:not(.hidden) {
    position: absolute;
    top: calc(var(--workspace-mobile-back-y) + var(--workspace-mobile-search-offset-y));
    right: var(--workspace-mobile-action-right);
    z-index: 3;
    width: var(--workspace-mobile-search-size);
    min-width: var(--workspace-mobile-search-size);
    height: var(--workspace-mobile-search-size);
    min-height: var(--workspace-mobile-search-size);
  }

  .workspace-header .workspace-actions.has-mobile-header-action-group [data-mobile-header-search]:not(.hidden) {
    right: calc(var(--workspace-mobile-action-right) + var(--workspace-mobile-search-size) + 8px);
  }

  .workspace-header .workspace-actions.has-mobile-header-action-group [data-mobile-header-clear]:not(.hidden) {
    right: var(--workspace-mobile-action-right);
  }
}

@media (max-width: 780px) {
  .workspace-header {
    --workspace-mobile-back-x: 16px;
    --workspace-mobile-back-y: 16px;
    --workspace-mobile-action-right: 16px;
  }

  .workspace-header:has(.workspace-back-button:not(.hidden)) .workspace-title .workspace-copy {
    display: none;
  }

  .workspace-header:has(.workspace-back-button:not(.hidden)) .workspace-title h1 {
    font-size: 26px;
  }
}
