/* source: assets/archive.css lines 1698-2365 */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    z-index: 10;
    position: relative;
    min-width: 0;
}

.top-bar {
    position: relative;
    height: 56px;
    flex-shrink: 0;
    background: var(--sidebar);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    font-size: 0.82em;
    color: var(--text-muted);
    z-index: 15;
}

.top-bar-left,
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.top-bar-left {
    flex: 1;
    padding-right: 96px;
}

.top-bar-right {
    flex-shrink: 0;
    padding-left: 88px;
}

.topbar-action-btn {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--soft-btn-bg);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.82em;
    line-height: 1;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.topbar-action-btn:hover,
.topbar-action-btn:focus-visible {
    color: var(--accent);
    border-color: rgba(211, 99, 58, 0.36);
    background: var(--soft-btn-hover);
}

.topbar-static-btn {
    display: inline-flex;
}

.topbar-static-btn[hidden] {
    display: none !important;
}

.topbar-tabs-btn {
    gap: 0;
    min-width: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
}

:root[data-theme="light"] .topbar-tabs-btn {
    background: rgba(255, 255, 255, 0.82);
    color: #b85b3f;
    border-color: rgba(184, 91, 63, 0.18);
    box-shadow: 0 8px 20px rgba(121, 87, 66, 0.08);
}

:root[data-theme="light"] .topbar-tabs-btn.is-active {
    background: rgba(255, 244, 236, 0.96);
    color: #b85b3f;
    border-color: rgba(184, 91, 63, 0.24);
}

.topbar-tabs-btn.is-active {
    color: var(--accent);
    border-color: rgba(211, 99, 58, 0.36);
    background: var(--soft-btn-hover);
}

.topbar-tabs-label {
    font-size: 0.8em;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1;
}

.topbar-tabs-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(211, 99, 58, 0.14);
    color: var(--text);
    font-size: 0.72em;
    font-weight: 700;
    line-height: 1;
}

.topbar-tabs-btn svg,
.frame-tabs-overflow-toggle svg,
.frame-tab-close svg,
.frame-tabs-overflow-close svg {
    width: 18px;
    height: 18px;
    display: block;
    flex-shrink: 0;
}

.frame-tabs-shell {
    display: none;
    position: relative;
    flex-shrink: 0;
    background: var(--sidebar);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 14;
}

.frame-tabs-shell[hidden] {
    display: none !important;
}

.frame-tabs-shell.is-visible {
    display: block;
}

.frame-tabs-row {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 10px 14px;
}

.frame-tabs-track {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
}

.frame-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 0 1 180px;
    max-width: 220px;
    padding: 3px;
    border-radius: 16px;
    border: 1px solid rgba(211, 99, 58, 0.12);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.frame-tab.is-active {
    border-color: rgba(211, 99, 58, 0.28);
    background: rgba(211, 99, 58, 0.12);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.frame-tab.is-dragging {
    opacity: 0.72;
    transform: scale(0.985);
}

.frame-tab.drop-before,
.frame-tab.drop-after {
    position: relative;
}

.frame-tab.drop-before::before,
.frame-tab.drop-after::after {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(211, 99, 58, 0.22), rgba(211, 99, 58, 0.96), rgba(211, 99, 58, 0.22));
    box-shadow: 0 0 0 1px rgba(211, 99, 58, 0.18), 0 0 10px rgba(211, 99, 58, 0.2);
    pointer-events: none;
}

.frame-tab.drop-before::before {
    left: -5px;
}

.frame-tab.drop-after::after {
    right: -5px;
}

.frame-tab-main,
.frame-tab-close,
.frame-tab-pin,
.frame-tabs-overflow-toggle,
.frame-tabs-overflow-main,
.frame-tabs-overflow-close {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

.frame-tab-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 13px;
    color: var(--text-muted);
    text-align: left;
    transition: background 0.18s ease, color 0.18s ease;
}

.frame-tab-main:hover,
.frame-tab-main:focus-visible,
.frame-tab.is-active .frame-tab-main {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    outline: none;
}

.frame-tab-icon,
.frame-tabs-overflow-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.frame-tab-icon img,
.frame-tab-icon svg,
.frame-tabs-overflow-icon img,
.frame-tabs-overflow-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    display: block;
}

.frame-tab-title,
.frame-tabs-overflow-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.84rem;
    line-height: 1.2;
}

.frame-tab-close,
.frame-tab-pin,
.frame-tabs-overflow-close {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-muted);
    transition: background 0.18s ease, color 0.18s ease;
}

.frame-tab-pin {
    --pin-icon-size: 15px; /* 您可以在这里随时调整图钉SVG的大小 */
}

.frame-tab-pin svg {
    width: var(--pin-icon-size);
    height: var(--pin-icon-size);
}

.frame-tab:not(.is-pinned) .frame-tab-pin {
    display: none;
}

.frame-tab:hover .frame-tab-pin {
    display: inline-flex;
}

.frame-tab-close:hover,
.frame-tab-close:focus-visible,
.frame-tabs-overflow-close:hover,
.frame-tabs-overflow-close:focus-visible {
    background: rgba(217, 56, 30, 0.12);
    color: #d9381e;
    outline: none;
}

.frame-tab-pin:hover,
.frame-tab-pin:focus-visible {
    background: rgba(217, 56, 30, 0.12);
    color: var(--text);
    outline: none;
}

.frame-tab.is-pinned {
    position: relative;
    /* 不再强制缩减宽度，保持与常规书签完全一致 */
}

/* 置顶状态下的标题底部横线标记 */
.frame-tab.is-pinned::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: #d3633a;
    pointer-events: none;
    opacity: 0.9;
}

/* 置顶后默认隐藏图钉图标（靠下方短横线识别即可） */
.frame-tab.is-pinned .frame-tab-pin {
    display: none;
    color: #d3633a;
}

/* 置顶后鼠标悬浮，再次呼出图钉图标以供取消固定 */
.frame-tab.is-pinned:hover .frame-tab-pin {
    display: inline-flex;
}


.frame-tabs-overflow-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-shrink: 0;
    min-width: 42px;
    height: 42px;
    padding: 0 10px;
    border-radius: 12px;
    border: 1px solid rgba(211, 99, 58, 0.16);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.frame-tabs-overflow-toggle[hidden] {
    display: none !important;
}

.frame-tabs-overflow-toggle:hover,
.frame-tabs-overflow-toggle:focus-visible,
.frame-tabs-overflow-toggle.is-open {
    background: rgba(211, 99, 58, 0.1);
    border-color: rgba(211, 99, 58, 0.28);
    color: var(--accent);
    box-shadow: 0 14px 28px rgba(211, 99, 58, 0.16);
    outline: none;
}

.frame-tabs-overflow-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(211, 99, 58, 0.14);
    color: var(--text);
    font-size: 0.72em;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 0 0 1px rgba(211, 99, 58, 0.12);
    transition: transform 0.22s ease, background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.frame-tabs-overflow-toggle svg {
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.frame-tabs-overflow-toggle.is-open svg {
    transform: rotate(180deg);
}

.frame-tabs-overflow-toggle.is-open .frame-tabs-overflow-count {
    transform: scale(1.08);
    background: rgba(211, 99, 58, 0.24);
    color: var(--accent);
    box-shadow: 0 0 0 1px rgba(211, 99, 58, 0.18), 0 0 14px rgba(211, 99, 58, 0.14);
}

/* UI Style: Stacked */
.frame-tabs-overflow-toggle.style-stacked {
    position: relative;
    padding: 0;
    min-width: 0 !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    justify-content: center;
    gap: 0;
}
.frame-tabs-overflow-toggle.style-stacked .frame-tabs-overflow-count {
    position: absolute;
    top: -4px;
    right: -6px;
    background: rgba(211, 99, 58, 0.9);
    color: #fff;
    min-width: 0 !important;
    width: 18px;
    height: 18px;
    font-size: 0.65em;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: none;
}
.frame-tabs-overflow-toggle.style-stacked.is-open .frame-tabs-overflow-count {
    transform: scale(1.1);
    background: #d35400;
}
.frame-tabs-overflow-toggle.style-stacked.is-open svg { transform: none; }

/* UI Style: Avatars */
.frame-tabs-overflow-toggle.style-avatars {
    padding: 4px 10px;
    gap: 6px;
}
.overflow-avatars {
    display: flex;
    align-items: center;
}
.overflow-avatar-item {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--soft-btn-bg);
    margin-right: -6px;
    background: #fff;
    object-fit: cover;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.overflow-avatar-item:last-child {
    margin-right: 0;
}
.frame-tabs-overflow-toggle.style-avatars .frame-tabs-overflow-count {
    background: transparent;
    padding: 0;
    min-width: 0;
    height: auto;
    border-radius: 0;
    font-weight: 500;
    box-shadow: none;
}

/* UI Style: Pill */
@keyframes pillBreathe {
    0% { box-shadow: 0 0 0 0 rgba(211, 99, 58, 0.6); background: var(--soft-btn-bg); }
    50% { box-shadow: 0 0 0 8px rgba(211, 99, 58, 0); background: rgba(211, 99, 58, 0.15); }
    100% { box-shadow: 0 0 0 0 rgba(211, 99, 58, 0); background: var(--soft-btn-bg); }
}
.frame-tabs-overflow-toggle.style-pill {
    padding: 4px;
    border-radius: 999px;
    min-width: 0 !important;
    width: 38px;
    height: 38px;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    animation: pillBreathe 2s infinite;
}
.frame-tabs-overflow-toggle.style-pill .frame-tabs-overflow-count {
    background: transparent;
    padding: 0;
    min-width: 0;
    height: auto;
    border-radius: 0;
    font-size: 0.9em;
    box-shadow: none;
}
.frame-tabs-overflow-toggle.style-pill:hover,
.frame-tabs-overflow-toggle.style-pill.is-open {
    background: var(--soft-btn-hover);
    animation: none;
}

/* UI Style: Kebab */
.frame-tabs-overflow-toggle.style-kebab {
    position: relative;
    padding: 0;
    gap: 0;
    min-width: 0 !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    justify-content: center;
}
.frame-tabs-overflow-toggle.style-kebab .frame-tabs-overflow-count {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 0 !important;
    width: 18px;
    height: 18px;
    font-size: 0.65em;
    padding: 0 !important;
    background: rgba(211, 99, 58, 0.9);
    color: #fff;
    box-shadow: none;
    border-radius: 50% !important;
    display: flex;
    justify-content: center;
    align-items: center;
}
.frame-tabs-overflow-toggle.style-kebab.is-open svg {
    transform: rotate(90deg);
}

.frame-tabs-overflow-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 14px;
    width: min(320px, calc(100vw - 24px));
    max-height: min(62vh, 420px);
    overflow: auto;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid rgba(211, 99, 58, 0.2);
    background: linear-gradient(180deg, rgba(24, 19, 14, 0.96), rgba(14, 10, 8, 0.98));
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.24);
    z-index: 35;
    opacity: 0;
    transform: translateY(12px) scale(0.96);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.frame-tabs-overflow-panel::-webkit-scrollbar {
    width: 5px;
}
.frame-tabs-overflow-panel::-webkit-scrollbar-track {
    background: transparent;
    margin: 12px 0;
}
.frame-tabs-overflow-panel::-webkit-scrollbar-thumb {
    background-color: var(--border);
    border-radius: 4px;
}
.frame-tabs-overflow-panel::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent);
}

.frame-tabs-overflow-backdrop {
    position: fixed;
    inset: 0;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    z-index: 13;
    opacity: 0;
    pointer-events: none;
}

.frame-tabs-overflow-backdrop[hidden] {
    display: none !important;
}

.frame-tabs-overflow-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

:root[data-theme="light"] .frame-tab {
    background: rgba(255, 255, 255, 0.42);
    border-color: rgba(184, 91, 63, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.52);
}

:root[data-theme="light"] .frame-tab.is-active {
    background: rgba(184, 91, 63, 0.12);
    border-color: rgba(184, 91, 63, 0.24);
}

:root[data-theme="light"] .frame-tab-main:hover,
:root[data-theme="light"] .frame-tab-main:focus-visible,
:root[data-theme="light"] .frame-tab.is-active .frame-tab-main {
    background: rgba(255, 255, 255, 0.62);
}

:root[data-theme="light"] .frame-tabs-overflow-toggle {
    background: rgba(255, 255, 255, 0.54);
    border-color: rgba(184, 91, 63, 0.16);
}

:root[data-theme="light"] .frame-tabs-overflow-panel {
    border-color: rgba(184, 91, 63, 0.18);
    background: linear-gradient(180deg, rgba(255, 249, 243, 0.98), rgba(245, 234, 223, 0.98));
    box-shadow: 0 20px 48px rgba(121, 87, 66, 0.14);
}

.frame-tabs-overflow-panel[hidden] {
    display: none !important;
}

.frame-tabs-overflow-panel.is-open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.frame-tabs-overflow-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 4px;
    border-radius: 14px;
}

.frame-tabs-overflow-item + .frame-tabs-overflow-item {
    margin-top: 4px;
}

.frame-tabs-overflow-item.is-active {
    background: rgba(211, 99, 58, 0.12);
}

.frame-tabs-overflow-main {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    color: var(--text);
    text-align: left;
    transition: background 0.18s ease, color 0.18s ease;
}

.frame-tabs-overflow-main:hover,
.frame-tabs-overflow-main:focus-visible {
    background: rgba(255, 255, 255, 0.05);
    outline: none;
}

.top-bar-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

body.page-app.standalone-app .top-bar-center {
    top: calc(50% + (env(safe-area-inset-top, 0px) / 2));
}

.refresh-circle-btn {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    border: 1px solid rgba(211, 99, 58, 0.34);
    background: linear-gradient(135deg, #d3633a 0%, #b85b3f 100%);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(211, 99, 58, 0.34);
}

.refresh-circle-btn svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: -6px 0 -6px -10px;
    background: none;
    border: none;
    border-radius: 12px;
    color: var(--accent);
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}

.hamburger:hover,
.hamburger:focus-visible {
    background: rgba(211, 99, 58, 0.08);
    transform: translateY(-1px);
    outline: none;
}

.url-display {
    display: inline-flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    gap: 0;
    overflow: hidden;
}

.url-display-primary,
.url-display-secondary {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-display-primary {
    color: var(--text);
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.url-display-secondary {
    display: none !important;
    color: var(--text-muted);
    font-size: 0.88em;
    white-space: nowrap;
}

.save-indicator {
    min-width: 0;
    max-width: 180px;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.save-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

.data-warning {
    margin: 14px 16px 0;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(217, 56, 30, 0.28);
    background: rgba(217, 56, 30, 0.08);
    color: #ffb09b;
    line-height: 1.75;
    font-size: 0.88em;
}

#frame-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 20% 20%, rgba(211, 99, 58, 0.12), transparent 28%),
        radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.05), transparent 18%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 32%),
        var(--bg);
}

:root[data-theme="light"] #frame-container {
    background:
        radial-gradient(circle at 20% 18%, rgba(184, 91, 63, 0.12), transparent 28%),
        radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.42), transparent 20%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0) 34%),
        var(--bg);
}

.app-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    z-index: -1;
}

.app-frame.active-frame {
    opacity: 1;
    visibility: visible;
    z-index: 10;
}

body.frame-tabs-overflow-active .app-frame {
    pointer-events: none;
}

body.frame-tabs-overflow-active .app-frame.active-frame {
    filter: blur(5px);
    opacity: 0.6 !important;
    pointer-events: none;
}

.welcome-msg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 4vw, 44px);
    overflow: hidden;
    z-index: 1;
}

.welcome-panel {
    position: relative;
    z-index: 2;
    width: min(1120px, 100%);
    padding: clamp(28px, 3.4vw, 42px);
    border-radius: 28px;
    border: 1px solid rgba(211, 99, 58, 0.18);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
        rgba(17, 12, 9, 0.6);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08),
        0 10px 24px rgba(6, 4, 3, 0.08),
        0 22px 54px rgba(6, 4, 3, 0.14),
        0 44px 120px rgba(0, 0, 0, 0.18),
        0 88px 220px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 -1px 0 rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    isolation: isolate;
    transform: translateZ(0);
    will-change: transform;
}

.welcome-panel::after {
    content: "";
    position: absolute;
    left: 7%;
    right: 7%;
    bottom: -30px;
    height: 64px;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.12) 42%, transparent 78%);
    filter: blur(26px);
    opacity: 0.82;
    z-index: -1;
    pointer-events: none;
    transform: translateZ(0);
}

@media (min-resolution: 1.5dppx) {
    .welcome-panel {
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.1),
            0 12px 28px rgba(6, 4, 3, 0.07),
            0 28px 68px rgba(6, 4, 3, 0.13),
            0 56px 148px rgba(0, 0, 0, 0.16),
            0 104px 240px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.1),
            inset 0 -1px 0 rgba(255, 255, 255, 0.04);
    }

    .welcome-panel::after {
        filter: blur(30px);
        opacity: 0.88;
    }
}

.welcome-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(211, 99, 58, 0.2);
    background: rgba(211, 99, 58, 0.08);
    color: #f0c3ae;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin: 0 auto 18px;
}

.welcome-title {
    color: var(--text);
    font-family: "SF Pro Rounded", "Segoe UI Variable Display", ui-rounded, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.015em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    margin-bottom: 14px;
    text-wrap: balance;
}

.welcome-detail {
    color: var(--text-muted);
    font-size: clamp(0.98rem, 1.5vw, 1.12rem);
    line-height: 1.8;
   font-weight: 600;
    max-width: 38rem;
    margin-inline: auto;
}

.welcome-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
    width: min(680px, 100%);
    justify-content: center;
}

.welcome-dashboard {
    width: 100%;
    margin-top: 24px;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 18px;
    align-items: stretch;
}

.welcome-session-tools {
    width: min(630px, 100%);
    margin-top: 22px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    text-align: left;
}

.welcome-dashboard .welcome-session-tools {
    width: 100%;
    margin-top: 0;
    height: 100%;
}

.welcome-session-card {
    grid-column: span 5;
}

.welcome-stats-tools,
.welcome-health-tools {
    grid-column: span 7;
}

.welcome-system-tools {
    grid-column: span 5;
}

.welcome-stats-metrics {
    margin-top: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 10px;
    justify-content: stretch;
}

.welcome-stats-metrics .welcome-stats-metric {
    min-width: 0;
    width: 100%;
    padding: 10px 12px;
    border-radius: 16px;
    overflow: hidden;
}

.welcome-stats-metric strong {
    font-size: 1.08rem;
}

.welcome-stats-metric em {
    font-size: 0.74rem;
    line-height: 1.45;
    letter-spacing: 0.05em;
}

.welcome-stats-top {
    margin-top: 16px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.08);
}

.welcome-stats-tools .welcome-session-head {
    margin-bottom: 16px;
}

.welcome-stats-top-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.welcome-stats-top-head strong {
    color: var(--text);
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.welcome-stats-top-head span {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.6;
    text-align: right;
}

.welcome-stats-top-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.welcome-stats-top-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.welcome-stats-top-copy,
.welcome-stats-top-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.welcome-stats-top-meta {
    justify-content: flex-start;
    min-width: 0;
    flex: 1;
}

.welcome-stats-top-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(211, 99, 58, 0.14);
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    box-shadow: 0 0 0 1px rgba(211, 99, 58, 0.12);
}

.welcome-stats-top-label {
    min-width: 0;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.welcome-stats-top-value {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    flex: none;
}

.welcome-stats-top-bar {
    position: relative;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.04);
}

.welcome-stats-top-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(211, 99, 58, 0.92), rgba(243, 176, 144, 0.96));
    box-shadow: 0 0 16px rgba(211, 99, 58, 0.24);
    transition: width 0.24s ease;
}

.welcome-stats-empty {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    text-align: center;
    font-size: 0.84rem;
    line-height: 1.7;
}

.welcome-session-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.welcome-session-head strong {
    color: var(--text);
    font-size: 1rem;
    letter-spacing: 0.02em;
}

.welcome-session-head span {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
    text-align: right;
}

.welcome-system-tools {
    display: flex;
    flex-direction: column;
}

.welcome-system-tools .welcome-session-head,
.welcome-health-tools .welcome-session-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
}

.welcome-system-tools .welcome-session-head span,
.welcome-health-tools .welcome-session-head span {
    text-align: left;
    max-width: none;
}

.welcome-system-tools .welcome-session-actions {
    margin-bottom: 0;
}

.welcome-session-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }

.welcome-session-btn {
    min-width: 0;
    width: 100%;
}

.welcome-session-toggle {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.welcome-session-toggle input {
    margin-top: 3px;
    accent-color: var(--accent);
}

.welcome-session-toggle-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.welcome-session-toggle-copy strong {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 700;
}

.welcome-session-toggle-copy span {
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.bookmark-health-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.bookmark-health-progress {
    margin-top: 16px;
}

.bookmark-health-progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.bookmark-health-progress-meta strong {
    color: var(--text);
    font-size: 0.9rem;
}

.bookmark-health-progress-meta span {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.bookmark-health-progress-track {
    position: relative;
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
}

.bookmark-health-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(211, 99, 58, 0.92), rgba(243, 176, 144, 0.96));
    box-shadow: 0 0 18px rgba(211, 99, 58, 0.3);
    transition: width 0.24s ease;
}

.bookmark-health-results {
    margin-top: 16px;
}

.bookmark-health-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.bookmark-health-results-head span {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.6;
}

.bookmark-health-collapse-btn,
.bookmark-health-item-action {
    border: 1px solid rgba(211, 99, 58, 0.2);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.bookmark-health-collapse-btn {
    flex: none;
    min-height: 34px;
    padding: 0 14px;
    font-size: 0.8rem;
    font-weight: 600;
}

.bookmark-health-collapse-btn:hover,
.bookmark-health-collapse-btn:focus-visible,
.bookmark-health-item-action:hover,
.bookmark-health-item-action:focus-visible {
    background: rgba(211, 99, 58, 0.14);
    border-color: rgba(211, 99, 58, 0.38);
    color: var(--accent);
    transform: translateY(-1px);
    outline: none;
}

.bookmark-health-empty {
    padding: 16px 18px;
    border-radius: 16px;
    border: 1px dashed rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    text-align: center;
    font-size: 0.84rem;
    line-height: 1.7;
}

@media (max-width: 1120px) {
    .welcome-panel {
        width: min(920px, 100%);
    }

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

    .welcome-session-card,
    .welcome-stats-tools,
    .welcome-health-tools,
    .welcome-system-tools {
        grid-column: auto;
    }
}

@media (max-width: 860px) {
    .welcome-panel {
        width: min(760px, 100%);
    }

    .welcome-dashboard {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .welcome-stats-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.bookmark-health-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
}

.bookmark-health-item {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.bookmark-health-item.is-ok {
    border-color: rgba(34, 197, 94, 0.22);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.03));
}

.bookmark-health-item.is-redirect {
    border-color: rgba(234, 179, 8, 0.24);
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.12), rgba(234, 179, 8, 0.03));
}

.bookmark-health-item.is-error {
    border-color: rgba(220, 38, 38, 0.24);
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.12), rgba(220, 38, 38, 0.03));
}

.bookmark-health-item.is-ignored {
    opacity: 0.72;
    filter: saturate(0.8);
}

.bookmark-health-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.bookmark-health-copy {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bookmark-health-title {
    display: block;
    color: var(--text);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.5;
    word-break: break-word;
}

.bookmark-health-url {
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.6;
    word-break: break-all;
    text-decoration: none;
}

.bookmark-health-url:hover,
.bookmark-health-url:focus-visible {
    color: var(--accent);
    outline: none;
}

.bookmark-health-badge {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.bookmark-health-badge.is-ok {
    color: #b9f7cf;
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.22);
}

.bookmark-health-badge.is-redirect {
    color: #ffe08b;
    background: rgba(234, 179, 8, 0.16);
    border-color: rgba(234, 179, 8, 0.22);
}

.bookmark-health-badge.is-error {
    color: #ffc0c0;
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(220, 38, 38, 0.22);
}

.bookmark-health-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.bookmark-health-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.12);
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.bookmark-health-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.bookmark-health-inline-state {
    color: var(--text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.bookmark-health-item-action {
    min-height: 34px;
    padding: 0 14px;
    font-size: 0.78rem;
    font-weight: 600;
}

.bookmark-health-item-action.is-restored {
    border-color: rgba(34, 197, 94, 0.28);
}

.welcome-metric {
    min-width: 152px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.welcome-metric strong {
    display: block;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.welcome-metric em {
    display: block;
    color: var(--text-muted);
    font-style: normal;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.welcome-halo,
.welcome-grid,
.welcome-orbit {
    position: absolute;
    pointer-events: none;
}

.welcome-halo {
    border-radius: 50%;
    filter: blur(10px);
    opacity: 0.8;
}

.welcome-halo-a {
    width: 420px;
    height: 420px;
    left: -120px;
    top: -70px;
    background: radial-gradient(circle, rgba(211, 99, 58, 0.18), transparent 68%);
    animation: welcomeFloatA 12s ease-in-out infinite;
}

.welcome-halo-b {
    width: 360px;
    height: 360px;
    right: -100px;
    bottom: -110px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
    animation: welcomeFloatB 14s ease-in-out infinite;
}

.welcome-grid {
    inset: 7%;
    border-radius: 32px;
    border: 1px solid rgba(211, 99, 58, 0.08);
    background-image:
        linear-gradient(rgba(211, 99, 58, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(211, 99, 58, 0.08) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.95), transparent 82%);
    opacity: 0.32;
    animation: welcomeGridShift 18s linear infinite;
}

.welcome-orbit {
    width: min(52vw, 560px);
    aspect-ratio: 1;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.9;
}

.welcome-orbit-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(211, 99, 58, 0.16);
}

.welcome-orbit-ring-a {
    transform: scale(1);
}

.welcome-orbit-ring-b {
    inset: 13%;
    border-color: rgba(255, 255, 255, 0.08);
}

.welcome-orbit-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f3b090, #d3633a);
    box-shadow: 0 0 20px rgba(211, 99, 58, 0.45);
}

.welcome-orbit-dot-a {
    top: 12%;
    left: 18%;
    animation: welcomeOrbitA 8.5s linear infinite;
}

.welcome-orbit-dot-b {
    right: 12%;
    bottom: 18%;
    animation: welcomeOrbitB 11s linear infinite;
}

:root[data-theme="light"] .welcome-panel {
    border-color: rgba(184, 91, 63, 0.14);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 247, 238, 0.92)),
        rgba(255, 245, 233, 0.82);
    box-shadow:
        0 6px 14px rgba(121, 87, 66, 0.05),
        0 18px 38px rgba(121, 87, 66, 0.09),
        0 42px 90px rgba(121, 87, 66, 0.11),
        0 88px 148px rgba(121, 87, 66, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

:root[data-theme="light"] .welcome-panel::after {
    background: radial-gradient(circle at center, rgba(121, 87, 66, 0.2), transparent 74%);
    opacity: 0.75;
}

:root[data-theme="light"] .welcome-badge {
    border-color: rgba(184, 91, 63, 0.16);
    background: rgba(184, 91, 63, 0.08);
    color: #b85b3f;
}

:root[data-theme="light"] .welcome-metric {
    border-color: rgba(184, 91, 63, 0.08);
    background: rgba(255, 255, 255, 0.54);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] .welcome-session-tools {
    border-color: rgba(184, 91, 63, 0.12);
    background: rgba(255, 255, 255, 0.6);
}

:root[data-theme="light"] .welcome-stats-top {
    border-color: rgba(184, 91, 63, 0.12);
    background: rgba(255, 255, 255, 0.68);
}

:root[data-theme="light"] .welcome-stats-top-rank {
    background: rgba(184, 91, 63, 0.12);
    box-shadow: 0 0 0 1px rgba(184, 91, 63, 0.12);
}

:root[data-theme="light"] .welcome-stats-empty {
    border-color: rgba(184, 91, 63, 0.12);
    background: rgba(255, 255, 255, 0.66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] .welcome-session-toggle {
    border-color: rgba(184, 91, 63, 0.1);
    background: rgba(255, 255, 255, 0.68);
}

:root[data-theme="light"] .bookmark-health-progress-track {
    border-color: rgba(184, 91, 63, 0.12);
    background: rgba(184, 91, 63, 0.08);
}

:root[data-theme="light"] .bookmark-health-collapse-btn,
:root[data-theme="light"] .bookmark-health-item-action {
    border-color: rgba(184, 91, 63, 0.16);
    background: rgba(255, 255, 255, 0.7);
}

:root[data-theme="light"] .bookmark-health-empty,
:root[data-theme="light"] .bookmark-health-item {
    border-color: rgba(184, 91, 63, 0.12);
    background: rgba(255, 255, 255, 0.66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

:root[data-theme="light"] .bookmark-health-item.is-ok {
    border-color: rgba(34, 197, 94, 0.18);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.1), rgba(255, 255, 255, 0.92));
}

:root[data-theme="light"] .bookmark-health-item.is-redirect {
    border-color: rgba(234, 179, 8, 0.2);
    background: linear-gradient(180deg, rgba(234, 179, 8, 0.12), rgba(255, 255, 255, 0.92));
}

:root[data-theme="light"] .bookmark-health-item.is-error {
    border-color: rgba(220, 38, 38, 0.18);
    background: linear-gradient(180deg, rgba(220, 38, 38, 0.1), rgba(255, 255, 255, 0.92));
}

:root[data-theme="light"] .bookmark-health-badge.is-ok {
    color: #15803d;
    background: rgba(34, 197, 94, 0.14);
}

:root[data-theme="light"] .bookmark-health-badge.is-redirect {
    color: #a16207;
    background: rgba(234, 179, 8, 0.14);
}

:root[data-theme="light"] .bookmark-health-badge.is-error {
    color: #b91c1c;
    background: rgba(220, 38, 38, 0.12);
}

:root[data-theme="light"] .bookmark-health-meta span {
    border-color: rgba(184, 91, 63, 0.1);
    background: rgba(255, 255, 255, 0.76);
}

:root[data-theme="light"] .welcome-grid {
    border-color: rgba(184, 91, 63, 0.06);
    background-image:
        linear-gradient(rgba(184, 91, 63, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(184, 91, 63, 0.06) 1px, transparent 1px);
    opacity: 0.4;
}

:root[data-theme="light"] .welcome-halo-a {
    background: radial-gradient(circle, rgba(184, 91, 63, 0.18), transparent 68%);
}

:root[data-theme="light"] .welcome-halo-b {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.38), transparent 70%);
}

:root[data-theme="light"] .welcome-orbit-ring {
    border-color: rgba(184, 91, 63, 0.14);
}

:root[data-theme="light"] .welcome-orbit-ring-b {
    border-color: rgba(184, 91, 63, 0.08);
}

@keyframes welcomeFloatA {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(24px, 18px, 0) scale(1.08);
    }
}

@keyframes welcomeFloatB {
    0%,
    100% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(-18px, -20px, 0) scale(1.06);
    }
}

@keyframes welcomeGridShift {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(34px, 17px, 0);
    }
}

@keyframes welcomeOrbitA {
    0% {
        transform: rotate(0deg) translateX(140px) rotate(0deg);
    }

    100% {
        transform: rotate(360deg) translateX(140px) rotate(-360deg);
    }
}

@keyframes welcomeOrbitB {
    0% {
        transform: rotate(0deg) translateX(-110px) rotate(0deg);
    }

    100% {
        transform: rotate(-360deg) translateX(-110px) rotate(360deg);
    }
}

@media (max-width: 768px) {
    .topbar-tabs-btn {
        position: fixed;
        left: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        z-index: 16;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        inline-size: 38px !important;
        block-size: 38px !important;
        width: 38px !important;
        min-width: 38px !important;
        max-width: 38px !important;
        height: 38px !important;
        min-height: 38px !important;
        max-height: 38px !important;
        flex: 0 0 38px;
        padding: 0 !important;
        gap: 0;
        border-radius: 50% !important;
        overflow: hidden;
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.16);
    }

    .topbar-tabs-btn svg {
        width: 16px;
        height: 16px;
    }

    .topbar-tabs-count {
        display: none;
    }

    :root[data-theme="light"] .topbar-tabs-btn {
        background: rgba(255, 251, 247, 0.96);
        color: #b85b3f;
        border-color: rgba(184, 91, 63, 0.2);
        box-shadow: 0 14px 30px rgba(121, 87, 66, 0.12);
    }

    body.page-app.sidebar-menu-open .topbar-tabs-btn {
        opacity: 0;
        pointer-events: none;
    }

    .frame-tabs-shell.is-visible {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        border-bottom: none;
        border-top: 1px solid var(--border);
        box-shadow: 0 -14px 30px rgba(0, 0, 0, 0.2);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .main-content.has-bottom-frame-tabs {
        padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    }

    .frame-tabs-row {
        gap: 8px;
        padding: 8px 10px 8px 64px;
    }

    .frame-tab {
        flex-basis: 132px;
        max-width: none;
    }

    .frame-tab-main {
        gap: 8px;
        padding: 8px 10px;
    }

    .frame-tab-title,
    .frame-tabs-overflow-title {
        font-size: 0.8rem;
    }

    .frame-tab-close,
    .frame-tabs-overflow-close {
        width: 26px;
        height: 26px;
    }

    .frame-tab-close {
        display: none !important;
    }

    .frame-tab-main {
        padding-right: 12px;
    }

    .frame-tab-pin,
    .frame-tab.is-pinned::after,
    .frame-tab.is-pinned .frame-tab-pin,
    .frame-tab.is-pinned:hover .frame-tab-pin {
        display: none !important;
    }

    .frame-tabs-overflow-toggle {
        min-width: 38px;
        height: 38px;
        padding: 0 8px;
    }

    .frame-tabs-overflow-panel {
        top: auto;
        right: 10px;
        left: auto;
        bottom: calc(100% + 8px);
        width: min(280px, calc(100vw - 20px));
        max-height: min(60vh, calc(100vh - 120px));
        padding: 18px 14px 20px;
        border-radius: 20px;
        transform: translate(14px, 10px) scale(0.96);
        transform-origin: bottom right;
    }

    .frame-tabs-overflow-panel.is-open {
        transform: translate(0, 0) scale(1);
    }
}
