:root {
    --bg: #f4f6fa;
    --card-bg: #ffffff;
    --primary: #3457d5;
    --primary-hover: #2947ba;
    --primary-light: #eef2ff;
    --text: #172033;
    --text-secondary: #667085;
    --border: #e3e7ef;
    --danger: #d92d20;
    --success: #14866d;
    --sidebar: #17243c;
    --sidebar-muted: #9aa8bf;
    --sidebar-border: rgba(255, 255, 255, 0.09);
    --surface-muted: #f8f9fc;
    --shadow-sm: 0 1px 2px rgba(23, 32, 51, 0.04);
    --shadow: 0 16px 40px rgba(23, 32, 51, 0.08);
    --radius-sm: 9px;
    --radius: 14px;
    --radius-lg: 20px;
    --transition: 180ms cubic-bezier(.2, .8, .2, 1);
    --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
}

button,
input,
select,
textarea {
    font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid rgba(52, 87, 213, 0.24);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 20000;
    padding: 10px 14px;
    border-radius: 10px;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    transform: translateY(-160%);
    transition: transform var(--transition);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-shell {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 500;
    display: flex;
    width: 278px;
    flex-direction: column;
    color: #fff;
    background:
        radial-gradient(circle at 10% 2%, rgba(95, 122, 231, 0.2), transparent 27%),
        var(--sidebar);
    border-right: 1px solid rgba(9, 16, 30, 0.15);
}

.sidebar-brand {
    padding: 22px 18px 18px;
    border-bottom: 1px solid var(--sidebar-border);
}

.brand-button {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 12px;
    padding: 0;
    color: #fff;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
}

.brand-button:hover,
.brand-button.active {
    color: #fff;
    background: transparent;
    box-shadow: none;
}

.brand-mark {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    color: #b9c5ff;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
}

.brand-mark svg {
    width: 27px;
    height: 27px;
}

.brand-button strong,
.brand-button small {
    display: block;
}

.brand-button strong {
    color: #fff;
    font-size: 1.02rem;
    letter-spacing: 0.01em;
}

.brand-button small {
    margin-top: 2px;
    color: var(--sidebar-muted);
    font-size: 0.72rem;
    font-weight: 500;
}

.sidebar-scroll {
    flex: 1;
    padding: 18px 14px;
    overflow-y: auto;
}

.sidebar-section-label {
    padding: 0 12px 8px;
    color: #73839d;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sidebar-section-spaced {
    margin-top: 24px;
}

.sidebar-link {
    display: grid;
    width: 100%;
    min-height: 44px;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    color: #c6d0df;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}

.sidebar-link + .sidebar-link {
    margin-top: 3px;
}

.sidebar-link:hover,
.sidebar-link.is-active,
.sidebar-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.085);
}

.sidebar-link.is-active {
    box-shadow: inset 3px 0 #8fa4ff;
}

.sidebar-link-icon {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    font-size: 0.9rem;
    font-weight: 800;
}

.category-dot::before {
    width: 8px;
    height: 8px;
    background: #8fa4ff;
    border-radius: 50%;
    content: "";
}

[data-accent="teal"] .category-dot::before { background: #55c7b1; }
[data-accent="green"] .category-dot::before { background: #7ac98b; }
[data-accent="violet"] .category-dot::before { background: #b399ee; }
[data-accent="orange"] .category-dot::before { background: #edac6b; }

.sidebar-count {
    min-width: 25px;
    padding: 2px 7px;
    color: #8e9db3;
    font-size: 0.68rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.18);
    border-radius: 999px;
}

.privacy-card {
    display: flex;
    gap: 10px;
    margin: 28px 4px 0;
    padding: 14px;
    color: #dae2ec;
    background: rgba(26, 162, 126, 0.1);
    border: 1px solid rgba(93, 211, 177, 0.18);
    border-radius: 14px;
}

.privacy-card-icon {
    display: grid;
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    place-items: center;
    color: #8ce0c8;
    font-size: 0.72rem;
    font-weight: 900;
    background: rgba(93, 211, 177, 0.13);
    border-radius: 50%;
}

.privacy-card strong {
    font-size: 0.76rem;
}

.privacy-card p {
    margin-top: 4px;
    color: #93a3b9;
    font-size: 0.68rem;
    line-height: 1.55;
}

.sidebar-footer {
    padding: 12px 14px 18px;
    border-top: 1px solid var(--sidebar-border);
}

.app-workspace {
    min-height: 100vh;
    margin-left: 278px;
}

.workspace-header {
    position: sticky;
    top: 0;
    z-index: 400;
    display: flex;
    min-height: 74px;
    align-items: center;
    gap: 16px;
    padding: 12px clamp(20px, 3vw, 42px);
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(221, 226, 235, 0.88);
    backdrop-filter: blur(16px);
}

.page-context {
    display: flex;
    flex-direction: column;
}

.page-eyebrow {
    color: #98a2b3;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

#page-title {
    margin-top: 1px;
    color: var(--text);
    font-size: 1rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.header-search-trigger,
.icon-button,
.back-button {
    border: 0;
    cursor: pointer;
}

.header-search-trigger {
    display: flex;
    min-width: 205px;
    align-items: center;
    gap: 9px;
    padding: 9px 10px 9px 13px;
    color: #7b8494;
    background: var(--surface-muted);
    border: 1px solid var(--border);
    border-radius: 11px;
}

.header-search-trigger kbd {
    margin-left: auto;
    padding: 2px 6px;
    color: #98a2b3;
    font-size: 0.65rem;
    background: #fff;
    border: 1px solid #e1e5ec;
    border-radius: 5px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
}

.local-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    color: #267660;
    font-size: 0.72rem;
    font-weight: 750;
    background: #ebf8f3;
    border: 1px solid #cfeee3;
    border-radius: 999px;
    white-space: nowrap;
}

.local-status > span {
    width: 7px;
    height: 7px;
    background: #24a47f;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(36, 164, 127, 0.1);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 650;
    background: transparent;
    border-radius: 8px;
}

.back-button:hover {
    color: var(--primary);
    background: var(--primary-light);
}

.mobile-menu-button {
    display: none;
    width: 40px;
    height: 40px;
    place-items: center;
    padding: 10px;
    background: transparent;
    border-radius: 10px;
}

.mobile-menu-button span {
    display: block;
    width: 19px;
    height: 2px;
    margin: 3px auto;
    background: var(--text);
    border-radius: 2px;
}

.app-content {
    width: min(100%, 1500px);
    min-height: calc(100vh - 130px);
    margin: 0 auto;
    padding: clamp(22px, 3vw, 42px);
}

.home-overview {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 24px;
}

.overview-copy {
    max-width: 690px;
}

.overview-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #557164;
    font-size: 0.65rem;
    font-weight: 850;
    letter-spacing: 0.13em;
}

.overview-kicker > span {
    width: 7px;
    height: 7px;
    background: #2ba27e;
    border-radius: 50%;
}

.overview-copy h1 {
    margin: 8px 0 8px;
    font-size: clamp(1.65rem, 3vw, 2.55rem);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.overview-copy p {
    max-width: 650px;
    color: var(--text-secondary);
    font-size: 0.91rem;
    line-height: 1.75;
}

.overview-stats {
    display: flex;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.overview-stats > div {
    min-width: 90px;
    padding: 13px 16px;
    text-align: center;
}

.overview-stats > div + div {
    border-left: 1px solid var(--border);
}

.overview-stats strong,
.overview-stats span {
    display: block;
}

.overview-stats strong {
    font-size: 1.05rem;
}

.overview-stats span {
    margin-top: 2px;
    color: #8a94a5;
    font-size: 0.65rem;
}

.search-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

.search-field {
    display: flex;
    width: min(100%, 620px);
    height: 49px;
    align-items: center;
    gap: 10px;
    padding: 0 12px 0 16px;
    background: #fff;
    border: 1px solid #dfe4ed;
    border-radius: 13px;
    box-shadow: 0 6px 20px rgba(29, 42, 68, 0.04);
    transition: border var(--transition), box-shadow var(--transition);
}

.search-field:focus-within {
    border-color: #98a9ee;
    box-shadow: 0 0 0 4px rgba(52, 87, 213, 0.08);
}

.search-field > span {
    color: #7c8798;
    font-size: 1.18rem;
}

.search-field input {
    width: 100%;
    min-width: 0;
    color: var(--text);
    background: transparent;
    border: 0;
    outline: 0;
}

.search-field input::placeholder {
    color: #a2aab8;
}

.search-field kbd {
    padding: 3px 7px;
    color: #98a2b3;
    font-size: 0.63rem;
    background: #f8f9fb;
    border: 1px solid #e5e8ee;
    border-radius: 6px;
}

.result-summary {
    color: #8a94a4;
    font-size: 0.75rem;
    white-space: nowrap;
}

body:not(.view-home) .home-overview,
body:not(.view-home) .search-panel,
body:not(.view-home) .empty-search-state {
    display: none;
}

/* The original application header is preserved for behavior compatibility. */
#toolbox-app > .header {
    display: none !important;
}

#toolbox-app .main-container {
    max-width: none;
    margin: 0;
    padding: 0;
}

#toolbox-app #tab-home > .card {
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

#toolbox-app #tab-home > .card > .card-title {
    margin: 0 0 17px;
    padding: 0;
    border: 0;
    font-size: 0.98rem;
}

#toolbox-app #tab-home > .card > .card-title .icon-dot {
    display: none;
}

#toolbox-app #tab-home font[color="red"] {
    color: var(--primary) !important;
}

.tool-category-section {
    margin-bottom: 30px !important;
}

.tool-category-section.is-filtered-out {
    display: none;
}

.tool-category-heading {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between;
    margin-bottom: 12px !important;
    padding: 0 2px;
}

.tool-category-heading > span {
    padding: 0 !important;
    color: #384152;
    font-size: 0.76rem !important;
    font-weight: 750;
    background: transparent !important;
    border-radius: 0 !important;
}

.tool-category-heading > span::before {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 8px;
    vertical-align: 1px;
    background: var(--category-color, #6079dc);
    border-radius: 50%;
    content: "";
}

.tool-category-section[data-category="page-adjustment"] { --category-color: #40a890; }
.tool-category-section[data-category="image-conversion"] { --category-color: #64a776; }
.tool-category-section[data-category="annotation-numbering"] { --category-color: #8c70c8; }
.tool-category-section[data-category="security-metadata"] { --category-color: #ce8649; }

#toolbox-app .card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: 11px;
}

#toolbox-app .tool-card {
    position: relative;
    display: grid;
    min-height: 92px;
    grid-template-columns: 47px 1fr;
    grid-template-rows: auto auto;
    column-gap: 13px;
    align-content: center;
    padding: 15px 38px 15px 15px;
    text-align: left;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-top: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(30, 42, 66, 0.025);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

#toolbox-app .tool-card::after {
    position: absolute;
    top: 50%;
    right: 14px;
    color: #b7bfcc;
    font-size: 1.05rem;
    content: "›";
    transform: translateY(-50%);
    transition: color var(--transition), transform var(--transition);
}

#toolbox-app .tool-card:hover {
    z-index: 1;
    background: #fff;
    border-color: #aebcf0;
    box-shadow: 0 13px 28px rgba(35, 55, 95, 0.09);
    transform: translateY(-2px);
}

#toolbox-app .tool-card:hover::after {
    color: var(--primary);
    transform: translate(2px, -50%);
}

#toolbox-app .tool-card.is-filtered-out {
    display: none;
}

#toolbox-app .tool-icon {
    display: grid;
    width: 46px;
    height: 46px;
    grid-row: 1 / 3;
    align-self: center;
    place-items: center;
    margin: 0;
    font-size: 1.35rem;
    background: color-mix(in srgb, var(--category-color, #6079dc) 10%, white);
    border: 1px solid color-mix(in srgb, var(--category-color, #6079dc) 18%, white);
    border-radius: 12px;
}

#toolbox-app .tool-name {
    align-self: end;
    margin: 0 0 3px;
    color: #242d3e;
    font-size: 0.85rem;
    font-weight: 730;
}

#toolbox-app .tool-desc {
    align-self: start;
    overflow: hidden;
    color: #858e9d;
    font-size: 0.69rem;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#toolbox-app .tab-panel:not(#tab-home) > .card {
    margin: 0;
    padding: clamp(20px, 3vw, 34px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 15px 38px rgba(26, 38, 64, 0.065);
}

#toolbox-app .tab-panel:not(#tab-home) .card-title {
    margin-bottom: 24px;
    padding-bottom: 17px;
    color: #20293a;
    font-size: 1.14rem;
    font-weight: 750;
    border-bottom-color: #edf0f5;
}

#toolbox-app .card-title .icon-dot {
    width: 7px;
    height: 7px;
    background: var(--primary);
    box-shadow: 0 0 0 5px rgba(52, 87, 213, 0.1);
}

#toolbox-app .split-layout {
    gap: clamp(20px, 3vw, 34px);
}

#toolbox-app .split-left,
#toolbox-app .split-right {
    gap: 14px;
}

#toolbox-app .upload-area {
    min-height: 112px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 18px;
    background: #fafbfe;
    border: 1.5px dashed #bdc6d7;
    border-radius: 15px;
}

#toolbox-app .upload-area:hover,
#toolbox-app .upload-area.drag-over {
    background: #f3f5ff;
    border-color: #7f94e3;
}

#toolbox-app .upload-area .primary-text {
    color: #313b4e;
    font-size: 0.86rem;
    font-weight: 700;
}

#toolbox-app .upload-area .secondary-text {
    color: #929bab;
    font-size: 0.7rem;
}

#toolbox-app .usage-note,
#toolbox-app .explanation-box,
#toolbox-app .intro-card {
    padding: 14px 15px;
    color: #687386;
    font-size: 0.74rem;
    line-height: 1.7 !important;
    background: #f8f9fc;
    border: 1px solid #e9ecf2;
    border-radius: 13px;
    box-shadow: none;
}

#toolbox-app .usage-note strong,
#toolbox-app .explanation-box strong {
    color: #384255;
}

#toolbox-app .file-list {
    overflow: hidden;
    border-color: var(--border);
    border-radius: 12px;
}

#toolbox-app .file-item {
    min-height: 48px;
    border-bottom-color: #edf0f5;
}

#toolbox-app .config-input,
#toolbox-app input[type="text"],
#toolbox-app input[type="number"],
#toolbox-app input[type="password"],
#toolbox-app select,
#toolbox-app textarea {
    min-height: 41px;
    color: var(--text);
    background: #fff;
    border: 1px solid #d5dbe5;
    border-radius: 10px;
    outline: none;
    transition: border var(--transition), box-shadow var(--transition);
}

#toolbox-app input:focus,
#toolbox-app select:focus,
#toolbox-app textarea:focus {
    border-color: #8fa0e4;
    box-shadow: 0 0 0 4px rgba(52, 87, 213, 0.08);
}

#toolbox-app input[type="checkbox"],
#toolbox-app input[type="radio"] {
    accent-color: var(--primary);
}

#toolbox-app .btn {
    min-height: 39px;
    justify-content: center;
    padding: 9px 17px;
    color: #3f495b;
    font-size: 0.75rem;
    font-weight: 700;
    background: #fff;
    border: 1px solid #d6dce6;
    border-radius: 10px;
    box-shadow: none;
}

#toolbox-app .btn:hover:not(:disabled) {
    color: var(--primary);
    background: #f8f9ff;
    border-color: #a6b4ea;
}

#toolbox-app .btn-primary {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 7px 16px rgba(52, 87, 213, 0.16);
}

#toolbox-app .btn-primary:hover:not(:disabled) {
    color: #fff;
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

#toolbox-app .btn-danger {
    color: var(--danger);
    border-color: #efb5b0;
}

#toolbox-app .btn-sm {
    min-height: 32px;
    padding: 6px 11px;
    font-size: 0.69rem;
}

#toolbox-app .action-bar {
    min-height: 45px;
    margin-top: 5px;
}

#toolbox-app .progress {
    height: 5px;
    background: #e9ecf2;
}

#toolbox-app .progress-bar {
    background: linear-gradient(90deg, #3457d5, #6682ed);
}

#toolbox-app .preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
}

#toolbox-app .preview-item {
    border-color: var(--border);
    border-radius: 11px;
    box-shadow: 0 4px 13px rgba(30, 42, 66, 0.05);
}

.empty-search-state {
    padding: 64px 20px;
    color: var(--text-secondary);
    text-align: center;
    background: #fff;
    border: 1px dashed #d8dee9;
    border-radius: 18px;
}

.empty-search-state > span {
    display: block;
    margin-bottom: 8px;
    color: #9aa4b3;
    font-size: 2rem;
}

.empty-search-state strong {
    display: block;
    color: var(--text);
}

.empty-search-state p {
    margin: 5px 0 16px;
    font-size: 0.8rem;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px clamp(20px, 3vw, 42px) 26px;
    color: #9aa3b1;
    font-size: 0.66rem;
}

.mobile-bottom-nav {
    display: none;
}

.sidebar-scrim {
    display: none;
}

@media (max-width: 1120px) {
    .app-sidebar {
        width: 248px;
    }

    .app-workspace {
        margin-left: 248px;
    }

    .overview-stats > div {
        min-width: 78px;
        padding-inline: 11px;
    }

    #toolbox-app .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    }
}

@media (max-width: 860px) {
    .app-sidebar {
        width: min(286px, 84vw);
        transform: translateX(-102%);
        transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
    }

    body.sidebar-open {
        overflow: hidden;
    }

    body.sidebar-open .app-sidebar {
        transform: translateX(0);
        box-shadow: 24px 0 55px rgba(8, 17, 33, 0.22);
    }

    .sidebar-scrim {
        position: fixed;
        inset: 0;
        z-index: 450;
        display: block;
        background: rgba(10, 18, 32, 0.42);
        backdrop-filter: blur(2px);
    }

    .sidebar-scrim[hidden] {
        display: none;
    }

    .app-workspace {
        margin-left: 0;
    }

    .mobile-menu-button {
        display: block;
    }

    .workspace-header {
        min-height: 66px;
        padding-inline: 18px;
    }

    .home-overview {
        align-items: flex-start;
        flex-direction: column;
        gap: 20px;
    }

    .overview-stats {
        width: 100%;
    }

    .overview-stats > div {
        flex: 1;
    }

    #toolbox-app .split-layout {
        flex-direction: column;
    }

    #toolbox-app .split-left,
    #toolbox-app .split-right {
        width: 100%;
        max-width: none !important;
        flex-basis: auto !important;
        min-width: 0 !important;
    }
}

@media (max-width: 640px) {
    body {
        padding-bottom: 66px;
    }

    .workspace-header {
        padding: 10px 14px;
    }

    .page-eyebrow,
    .header-search-trigger,
    .local-status {
        display: none;
    }

    #page-title {
        font-size: 0.92rem;
    }

    .back-button {
        margin-left: -3px;
        padding-inline: 7px;
    }

    .app-content {
        padding: 24px 14px;
    }

    .home-overview {
        margin-bottom: 20px;
    }

    .overview-copy h1 {
        font-size: 1.72rem;
    }

    .overview-copy p {
        font-size: 0.82rem;
    }

    .overview-stats strong {
        font-size: 0.96rem;
    }

    .overview-stats > div {
        padding: 10px 7px;
    }

    .search-panel {
        display: block;
        margin-bottom: 23px;
    }

    .search-field {
        width: 100%;
    }

    .result-summary {
        margin-top: 9px;
        text-align: right;
    }

    #toolbox-app .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    #toolbox-app .tool-card {
        display: flex;
        min-height: 128px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        padding: 14px;
    }

    #toolbox-app .tool-icon {
        width: 39px;
        height: 39px;
        margin-bottom: 9px;
        font-size: 1.12rem;
    }

    #toolbox-app .tool-name {
        font-size: 0.79rem;
    }

    #toolbox-app .tool-desc {
        width: 100%;
        font-size: 0.65rem;
    }

    #toolbox-app .tool-card::after {
        display: none;
    }

    #toolbox-app .tab-panel:not(#tab-home) > .card {
        padding: 18px 14px;
        border-radius: 15px;
    }

    #toolbox-app .tab-panel:not(#tab-home) .card-title {
        align-items: flex-start;
        font-size: 1rem;
    }

    #toolbox-app .config-row,
    #toolbox-app .action-bar {
        align-items: stretch;
        flex-direction: column;
    }

    #toolbox-app .action-bar .btn,
    #toolbox-app .config-row .config-input,
    #toolbox-app .config-row select {
        width: 100%;
    }

    #toolbox-app .radio-group {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }

    .site-footer {
        display: none;
    }

    .mobile-bottom-nav {
        position: fixed;
        inset: auto 0 0;
        z-index: 430;
        display: grid;
        height: 66px;
        grid-template-columns: repeat(3, 1fr);
        padding-bottom: env(safe-area-inset-bottom);
        background: rgba(255, 255, 255, 0.94);
        border-top: 1px solid var(--border);
        backdrop-filter: blur(15px);
    }

    .mobile-bottom-nav button {
        display: flex;
        align-items: center;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        padding: 5px;
        color: #7b8596;
        font-size: 0.62rem;
        font-weight: 700;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .mobile-bottom-nav button > span {
        font-size: 1.02rem;
    }

    .mobile-bottom-nav button.active {
        color: var(--primary);
    }
}

@media (max-width: 390px) {
    #toolbox-app .card-grid {
        grid-template-columns: 1fr;
    }

    #toolbox-app .tool-card {
        min-height: 91px;
        display: grid;
        grid-template-columns: 45px 1fr;
        grid-template-rows: auto auto;
    }

    #toolbox-app .tool-icon {
        grid-row: 1 / 3;
        margin: 0;
    }
}

/* 2026 English product refresh */
:root {
    --bg: #f4f5f9;
    --primary: #635bff;
    --primary-hover: #5047e5;
    --primary-light: #eeedff;
    --text: #111425;
    --text-secondary: #687086;
    --border: #e4e6ee;
    --sidebar: #0b1020;
    --surface-muted: #f6f7fa;
    --radius: 16px;
    --radius-lg: 26px;
    --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    background:
        radial-gradient(circle at 82% 4%, rgba(99, 91, 255, 0.09), transparent 26rem),
        linear-gradient(180deg, #f8f8fb 0, var(--bg) 38rem);
}

.app-sidebar {
    width: 292px;
    background:
        radial-gradient(circle at 20% 0, rgba(112, 99, 255, 0.22), transparent 19rem),
        linear-gradient(180deg, #0c1122, #090d19 78%);
    border-right-color: rgba(255, 255, 255, 0.07);
}

.app-workspace {
    margin-left: 292px;
}

.sidebar-brand {
    padding: 26px 20px 22px;
}

.brand-mark {
    color: #dedbff;
    background: linear-gradient(145deg, rgba(131, 119, 255, 0.28), rgba(255, 255, 255, 0.07));
    border-color: rgba(210, 205, 255, 0.2);
    border-radius: 15px;
}

.brand-button strong {
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.sidebar-link {
    min-height: 46px;
    border-radius: 13px;
}

.sidebar-link:hover,
.sidebar-link.is-active,
.sidebar-link.active {
    background: rgba(255, 255, 255, 0.075);
}

.sidebar-link.is-active {
    box-shadow: inset 3px 0 #948cff;
}

.privacy-card {
    background: linear-gradient(145deg, rgba(56, 208, 161, 0.13), rgba(56, 208, 161, 0.05));
    border-color: rgba(105, 235, 194, 0.2);
}

.sidebar-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    padding-top: 10px;
}

.sidebar-footer .sidebar-link:first-child {
    grid-column: 1 / -1;
}

.sidebar-footer .sidebar-link {
    min-height: 38px;
    grid-template-columns: 22px 1fr;
    padding: 6px 9px;
    font-size: 0.74rem;
}

.workspace-header {
    min-height: 78px;
    padding-inline: clamp(24px, 3.3vw, 54px);
    background: rgba(248, 248, 251, 0.82);
    border-bottom-color: rgba(221, 223, 232, 0.72);
    backdrop-filter: blur(22px) saturate(140%);
}

.header-search-trigger {
    min-width: 220px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 7px 22px rgba(25, 27, 52, 0.04);
}

.local-status {
    color: #18735a;
    background: rgba(224, 249, 240, 0.84);
}

.app-content {
    width: min(100%, 1540px);
    padding: clamp(26px, 3.4vw, 54px);
}

.home-overview {
    position: relative;
    min-height: 286px;
    align-items: center;
    margin-bottom: 24px;
    padding: clamp(34px, 5vw, 68px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 82% 8%, rgba(87, 224, 255, 0.28), transparent 18rem),
        radial-gradient(circle at 100% 100%, rgba(154, 128, 255, 0.38), transparent 26rem),
        linear-gradient(135deg, #10162d 0%, #222154 54%, #4338a8 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    box-shadow: 0 28px 70px rgba(26, 25, 68, 0.18);
}

.home-overview::before,
.home-overview::after {
    position: absolute;
    content: "";
    pointer-events: none;
}

.home-overview::before {
    top: -90px;
    right: -35px;
    width: 330px;
    height: 330px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    box-shadow: 0 0 0 55px rgba(255, 255, 255, 0.025), 0 0 0 110px rgba(255, 255, 255, 0.02);
}

.home-overview::after {
    right: 35%;
    bottom: -86px;
    width: 170px;
    height: 170px;
    background: rgba(118, 230, 255, 0.09);
    border-radius: 48px;
    transform: rotate(32deg);
}

.overview-copy,
.overview-stats {
    position: relative;
    z-index: 1;
}

.overview-copy {
    max-width: 760px;
}

.overview-kicker {
    color: #baf6e2;
}

.overview-kicker > span {
    background: #5bf0bc;
    box-shadow: 0 0 0 5px rgba(91, 240, 188, 0.12);
}

.overview-copy h1 {
    max-width: 750px;
    margin: 16px 0 14px;
    font-size: clamp(2.2rem, 4.2vw, 4.25rem);
    font-weight: 760;
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.overview-copy h1 em {
    color: #b7b1ff;
    font-style: normal;
}

.overview-copy p {
    max-width: 660px;
    color: rgba(239, 241, 255, 0.74);
    font-size: 0.98rem;
    line-height: 1.75;
}

.overview-stats {
    align-self: flex-end;
    background: rgba(9, 12, 28, 0.3);
    border-color: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(15px);
}

.overview-stats > div {
    min-width: 105px;
    padding: 17px 18px;
}

.overview-stats > div + div {
    border-left-color: rgba(255, 255, 255, 0.12);
}

.overview-stats strong {
    color: #fff;
    font-size: 1.18rem;
}

.overview-stats span {
    color: rgba(235, 238, 255, 0.58);
}

.search-panel {
    padding: 15px 18px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(222, 224, 234, 0.85);
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(29, 31, 60, 0.07);
    backdrop-filter: blur(14px);
}

.search-field {
    height: 52px;
    background: #f7f7fa;
    border-color: transparent;
    box-shadow: inset 0 0 0 1px #e5e6ed;
}

.search-field:focus-within {
    background: #fff;
    border-color: transparent;
    box-shadow: inset 0 0 0 1px #8f88ff, 0 0 0 4px rgba(99, 91, 255, 0.09);
}

#toolbox-app #tab-home > .card > .card-title {
    color: #8c92a3;
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: 0.03em;
}

.tool-category-section {
    margin-bottom: 38px !important;
}

.tool-category-heading > span {
    color: #292d3d;
    font-size: 0.8rem !important;
    letter-spacing: 0.015em;
}

#toolbox-app .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}

#toolbox-app .tool-card {
    min-height: 112px;
    grid-template-columns: 54px 1fr;
    column-gap: 15px;
    padding: 18px 40px 18px 17px;
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(222, 224, 233, 0.9);
    border-radius: 18px;
    box-shadow: 0 8px 22px rgba(27, 29, 55, 0.045);
    backdrop-filter: blur(10px);
}

#toolbox-app .tool-card:hover {
    border-color: color-mix(in srgb, var(--category-color, #635bff) 48%, white);
    box-shadow: 0 20px 40px rgba(29, 30, 65, 0.11);
    transform: translateY(-4px);
}

#toolbox-app .tool-icon {
    width: 52px;
    height: 52px;
    font-size: 1.45rem;
    border-radius: 15px;
}

#toolbox-app .tool-name {
    color: #181b2b;
    font-size: 0.88rem;
    font-weight: 760;
}

#toolbox-app .tool-desc {
    color: #7e8597;
    font-size: 0.7rem;
}

#toolbox-app .tab-panel:not(#tab-home):not(.legal-panel) > .card {
    padding: clamp(24px, 3.3vw, 44px);
    border-radius: 26px;
    box-shadow: 0 24px 56px rgba(24, 27, 55, 0.075);
}

#toolbox-app .tab-panel:not(#tab-home) .card-title {
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    letter-spacing: -0.025em;
}

#toolbox-app .upload-area {
    min-height: 140px;
    background: linear-gradient(145deg, #fafaff, #f5f4ff);
    border-color: #bbb8e8;
    border-radius: 18px;
}

#toolbox-app .btn-primary {
    background: linear-gradient(135deg, #6e66ff, #5148df);
    border-color: #5f57ef;
    box-shadow: 0 10px 24px rgba(87, 77, 225, 0.22);
}

.legal-panel {
    background: transparent !important;
}

.legal-shell {
    max-width: 1060px;
    margin: 0 auto;
}

.legal-hero {
    position: relative;
    padding: clamp(34px, 6vw, 76px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 90% 10%, rgba(120, 227, 255, 0.24), transparent 22rem),
        linear-gradient(135deg, #11172f, #342c8c);
    border-radius: 30px;
    box-shadow: 0 28px 65px rgba(29, 27, 78, 0.16);
}

.legal-kicker {
    display: block;
    margin-bottom: 14px;
    color: #90efd3;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.legal-hero h1 {
    max-width: 780px;
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.legal-hero p {
    max-width: 720px;
    margin: 22px 0 0;
    color: rgba(239, 240, 255, 0.73);
    font-size: 0.98rem;
    line-height: 1.8;
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.legal-section,
.policy-document > section,
.legal-callout {
    padding: 28px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: 0 12px 32px rgba(27, 29, 56, 0.045);
}

.legal-section > span {
    color: #8f88ff;
    font-size: 0.7rem;
    font-weight: 800;
}

.legal-section h2,
.policy-document > section h2 {
    margin: 20px 0 8px;
    color: #181b2b;
    font-size: 1rem;
    letter-spacing: -0.02em;
}

.legal-section p,
.policy-document > section p,
.legal-callout p {
    margin: 0;
    color: #747b8e;
    font-size: 0.82rem;
    line-height: 1.75;
}

.legal-callout {
    margin-top: 14px;
    background: linear-gradient(135deg, #f0efff, #f7fbff);
    border-color: #dad7ff;
}

.legal-callout strong {
    color: #29235f;
}

.legal-callout p {
    margin: 7px 0 14px;
}

.legal-callout a,
.policy-document a {
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 700;
}

.policy-document > section {
    margin-top: 14px;
    padding: clamp(24px, 4vw, 38px);
}

.policy-document > section h2 {
    margin-top: 0;
    font-size: 1.1rem;
}

.footer-links {
    display: inline-flex;
    gap: 16px;
}

.footer-links .tab-btn {
    padding: 0;
    color: #858c9d;
    font: inherit;
    background: none;
    border: 0;
    box-shadow: none;
}

.footer-links .tab-btn:hover {
    color: var(--primary);
    background: none;
    box-shadow: none;
}

@media (max-width: 1120px) {
    .app-sidebar { width: 256px; }
    .app-workspace { margin-left: 256px; }
    .home-overview { align-items: flex-start; flex-direction: column; }
    .overview-stats { align-self: flex-start; }
}

@media (max-width: 860px) {
    .app-sidebar { width: min(300px, 86vw); }
    .app-workspace { margin-left: 0; }
    .legal-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .home-overview {
        min-height: 0;
        padding: 30px 24px;
        border-radius: 24px;
    }
    .overview-copy h1 { font-size: clamp(2rem, 11vw, 3rem); }
    .overview-stats { width: 100%; }
    .overview-stats > div { min-width: 0; padding: 13px 8px; }
    .search-panel { align-items: stretch; flex-direction: column; padding: 12px; }
    #toolbox-app .card-grid { grid-template-columns: 1fr; }
    .legal-hero { padding: 34px 24px; border-radius: 24px; }
    .site-footer { align-items: center; flex-direction: column; text-align: center; }
}
