:root {
    --ink: #09145a;
    --text: #09145a;
    --blue: #0b1975;
    --blue-2: #172796;
    --blue-3: #eef2ff;
    --cyan: #78e5d8;
    --cyan-2: #e8fffb;
    --yellow: #ffd21e;
    --ink-strong: #07106f;
    --muted: #65708a;
    --line: #d9e1ef;
    --line-strong: #c8d0e4;
    --page: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f7faff;
    --accent: #14208f;
    --accent-2: #0d7f78;
    --accent-soft: #e9f4ff;
    --mint-soft: #e9fbf5;
    --warn: #ffbd18;
    --shadow: 0 12px 30px rgba(9, 20, 90, .08);
    --shadow-strong: 0 18px 44px rgba(9, 20, 90, .12);
    --radius: 22px;
    --radius-sm: 14px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
    margin: 0;
    min-height: 100%;
    color: var(--text);
    background: var(--page);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.75;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .95);
    border-bottom: 1px solid var(--line);
    overflow: visible;
}
.nav {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    overflow: visible;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--blue);
    font-weight: 900;
    letter-spacing: -.03em;
    white-space: nowrap;
}
.brand-mark {
    min-width: 42px;
    width: 42px;
    height: 38px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border-radius: 12px;
    color: var(--blue);
    background: linear-gradient(135deg, var(--cyan-2), #c9fff6);
    border: 1px solid #bbefe8;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: -.04em;
    text-transform: none;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #364163;
    font-size: 14px;
}
.nav-links a {
    padding: 8px 11px;
    border-radius: 999px;
}
.nav-links a:hover {
    background: #edf2fb;
    color: var(--blue);
}
.nav-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    overflow: visible;
}
.legacy-top-link {
    flex: 0 0 auto;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}
.legacy-top-link:hover {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}
.language-switcher {
    position: relative;
    z-index: 1001;
    flex: 0 0 auto;
    margin: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.language-switcher summary {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--accent);
    font-size: 14px;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
    box-shadow: var(--shadow);
}
.language-switcher summary::-webkit-details-marker {
    display: none;
}
.language-switcher summary::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}
.language-switcher[open] summary::after {
    transform: rotate(180deg);
}
.language-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 1002;
    width: 340px;
    max-height: min(520px, calc(100vh - 110px));
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    overflow: auto;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-strong);
}
.language-menu a {
    min-height: 36px;
    display: flex;
    align-items: center;
    padding: 7px 10px;
    border-radius: 11px;
    color: #364163;
    font-size: 13px;
    font-weight: 800;
}
.language-menu a:hover,
.language-menu a.active {
    background: var(--accent-soft);
    color: var(--accent);
}
.breadcrumb {
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
}
.breadcrumb .container {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
}
.breadcrumb a {
    color: var(--accent);
}
.breadcrumb [aria-current="page"] {
    color: var(--text);
    font-weight: 700;
}
.top-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), #2837a8);
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(20, 32, 143, .22);
    white-space: nowrap;
}

.app-shell { min-height: calc(100vh - 170px); padding: 38px 0 64px; }
.app-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 32px;
    align-items: start;
}
.app-content { min-width: 0; }
.app-grid-wide { grid-template-columns: minmax(0, 1fr); }
.app-content > .section { padding: 0; }
.app-content .container { width: 100%; margin: 0; }
.app-sidebar { position: sticky; top: 104px; display: grid; gap: 18px; }

.section { padding: 40px 0; }
.tool-hero {
    margin-bottom: 26px;
    padding: 0 0 8px;
}
.tool-hero h2,
.section-title h2,
h1 {
    margin: 0;
    max-width: 880px;
    color: var(--accent);
    font-size: clamp(26px, 2.5vw, 34px);
    line-height: 1.22;
    letter-spacing: 0;
    font-weight: 900;
}
.tool-hero h2 span { font-size: .46em; letter-spacing: 0; color: #59647d; }
.tool-hero p,
.section-title p,
.meta {
    max-width: 850px;
    margin: 18px 0 0;
    color: #3f4860;
    font-size: 16px;
}

.tool-card,
.option-card,
.card,
.static-page p,
.static-page table,
.dict-info,
.preview {
    border: 1px solid rgba(226, 231, 241, .95);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
}
.option-card,
.card,
.preview { padding: 28px; margin-bottom: 24px; }
.post-list {
    display: grid;
    gap: 18px;
}
.post-card {
    border: 1px solid rgba(226, 231, 241, .95);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.post-card:hover {
    transform: translateY(-2px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-strong);
}
.post-card > a {
    display: block;
    padding: 26px 28px;
}
.post-card-content {
    padding: 26px 28px;
}
.post-card h3 {
    margin: 0;
    color: var(--accent);
    font-size: 20px;
    line-height: 1.35;
    letter-spacing: 0;
}
.post-title-link:hover {
    color: var(--accent-2);
}
.post-card p {
    margin: 12px 0 0;
    color: #3f4860;
}
.post-card .go {
    display: inline-flex;
    margin-top: 14px;
    color: var(--accent);
    font-weight: 900;
}
.post-card-with-media {
    display: grid;
    grid-template-columns: minmax(260px, 430px) minmax(0, 1fr);
    align-items: stretch;
}
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.post-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--mint-soft);
    color: var(--accent-2);
    font-size: 13px;
    font-weight: 800;
}
.post-tags-detail { margin: 16px 0 22px; }
.post-media {
    margin: 0 0 24px;
    overflow: hidden;
    border: 1px solid rgba(226, 231, 241, .95);
    border-radius: var(--radius);
    background: #020617;
    box-shadow: var(--shadow);
}
.post-media iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}
.post-media-link {
    padding: 24px;
    background: rgba(255, 255, 255, .96);
}
.post-card-rich .post-media {
    margin: 0;
    border-width: 0 1px 0 0;
    border-radius: var(--radius) 0 0 var(--radius);
    box-shadow: none;
}
.post-card-rich .post-media iframe {
    aspect-ratio: 16 / 9;
    height: auto;
}
.post-media-list-link {
    border-color: rgba(226, 231, 241, .95);
}
.post-body {
    white-space: normal;
    word-break: break-word;
}
.post-link {
    color: var(--accent);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.option-card h3,
.card h3 {
    margin: 0 0 18px;
    color: var(--accent);
    font-size: 18px;
    line-height: 1.35;
    letter-spacing: 0;
    white-space: nowrap;
}
.side-card h2 {
    margin: 0 0 14px;
    color: var(--accent);
    font-size: 16px;
    line-height: 1.35;
    letter-spacing: 0;
}
.option-card h3::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 10px;
    border-radius: 3px;
    background: var(--accent-2);
    transform: translateY(-2px);
}
.option-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    color: #303a55;
}
.option-card:has(> h3 + .option-row) {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 14px;
}
.option-card:has(> h3 + .option-row) > h3 {
    flex: 0 0 auto;
    margin: 3px 0 0;
}
.option-card:has(> h3 + .option-row) > h3 + .option-row {
    flex: 1 1 0;
    min-width: 0;
}
.option-card:has(> h3 + .option-row) > .paper-size-row,
.option-card:has(> h3 + .option-row) > .form-group {
    flex: 0 0 100%;
}
.option-row > span,
.form-group label {
    display: inline-flex;
    align-items: center;
    color: var(--accent);
    font-weight: 900;
    white-space: nowrap;
}
.option-row > span::before,
.form-group label::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 10px;
    border-radius: 3px;
    background: var(--accent-2);
}
.form-group label:empty {
    display: none;
}
.option-row label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 30px;
    padding: 3px 6px;
    border-radius: 8px;
    background: #f8faff;
    border: 1px solid transparent;
    white-space: nowrap;
}
.option-row label:hover { border-color: var(--line-strong); background: #fff; }
.paper-size-row {
    flex-wrap: nowrap;
    overflow-x: auto;
}

.font-package-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 6px 12px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--accent);
    font-weight: 900;
}
.font-package-link:hover {
    background: var(--accent-soft);
}

.arithmetic-presets button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--accent);
    box-shadow: none;
}
.arithmetic-presets button:hover {
    background: var(--accent-soft);
}
.arithmetic-counts .arithmetic-count-input {
    width: 120px;
    min-height: 38px;
    padding: 7px 12px;
}
.arithmetic-counts button {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--accent);
    box-shadow: none;
}
.arithmetic-counts button:hover {
    background: var(--accent-soft);
}

.option-row label.option-white-label {
    background: #465065;
    border-color: #465065;
    color: #fff;
}
.option-row label.option-white-label span {
    color: #fff !important;
}
.option-row label.option-white-label:hover {
    background: #30394d;
    border-color: #30394d;
}
input[type="radio"], input[type="checkbox"] { accent-color: var(--accent); }
input[type="text"], input[type="password"], select, textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 13px 15px;
    border: 1px solid #cbd3e4;
    border-radius: 13px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
input[type="text"]:focus,
input[type="password"]:focus,
select:focus,
textarea:focus {
    border-color: #6b78ff;
    box-shadow: 0 0 0 4px rgba(20, 32, 143, .08);
}
textarea { min-height: 220px; resize: vertical; }
.form-group { margin-bottom: 18px; }

.custom-font-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}
.custom-font-field label {
    margin: 0;
    white-space: nowrap;
}
.custom-font-field input[type="text"] {
    flex: 1 1 260px;
    min-width: 0;
}

.page-header-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
}
.page-header-field label {
    margin: 0;
    white-space: nowrap;
}
.page-header-field input[type="text"] {
    flex: 1 1 260px;
    min-width: 0;
}
@media (max-width: 560px) {
    .page-header-field,
    .custom-font-field {
        align-items: stretch;
        grid-template-columns: 1fr;
    }
    .page-header-field input[type="text"],
    .custom-font-field input[type="text"] {
        min-width: 0;
        width: 100%;
    }
}

.actions,
.tool-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
    margin-top: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}
.btn,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 25px;
    border: 0;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--ink);
    font-weight: 900;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover,
button:hover,
input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(20, 32, 143, .13);
}
.btn-primary,
button.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #ffbd18, #ff9f0a);
    box-shadow: 0 16px 34px rgba(255, 159, 10, .28);
}
.btn-light { background: #fff; color: var(--accent); border: 1px solid var(--line); }
.tag,
.tool-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 11px;
    border-radius: 999px;
    background: var(--mint-soft);
    color: #087268;
    font-size: 12px;
    font-weight: 900;
}

.side-card {
    padding: 24px;
    border: 1px solid rgba(216, 224, 240, .95);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
}
.side-card-soft {
    background: linear-gradient(180deg, #ffffff 0%, #f3f8ff 100%);
}
.guide-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.guide-intro {
    margin: 0 0 16px;
    color: #4f5a72;
    font-size: 14px;
    line-height: 1.65;
}
.guide-list li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; }
.guide-list span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: var(--accent);
    font-size: 13px;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(20, 32, 143, .18);
}
.guide-list p,
.side-note p { margin: 0; color: #4f5a72; font-size: 14px; }
.guide-more {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    margin-top: 18px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line-strong);
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}
.guide-more:hover {
    background: var(--accent-soft);
}
.related-tools { display: grid; gap: 8px; }
.related-tools a {
    display: grid;
    gap: 2px;
    padding: 11px 13px;
    border-radius: 15px;
    border: 1px solid #e5ebf5;
    background: #fbfdff;
}
.related-tools a:hover {
    border-color: #bfc9ff;
    background: var(--accent-soft);
    color: var(--accent);
}
.related-tools strong { font-size: 14px; color: var(--accent); line-height: 1.35; }
.related-tools span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.side-note {
    background: linear-gradient(135deg, #fff9e8, #f0fbf8);
}

.static-page { color: #27324c; }
.static-page h1,
.static-page h2,
.static-page h4 { color: var(--accent); letter-spacing: 0; }
.static-page h1 {
    margin: 0 0 24px;
    font-size: clamp(26px, 2.5vw, 34px);
    line-height: 1.22;
}
.static-page h2,
.static-page h4 { margin: 30px 0 14px; font-size: 22px; line-height: 1.35; }
.static-page p { padding: 22px 24px; margin: 0 0 16px; }
.static-page a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.language-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}
.language-card {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 22px;
    border: 1px solid rgba(226, 231, 241, .95);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .96);
    box-shadow: var(--shadow);
    text-decoration: none !important;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.language-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-strong);
}
.language-card strong {
    color: var(--accent);
    font-size: 20px;
    line-height: 1.35;
}
.language-card span {
    color: var(--muted);
    font-size: 14px;
}
.language-card em {
    margin-top: auto;
    color: var(--accent-2);
    font-size: 13px;
    font-style: normal;
    font-weight: 900;
}
.language-code {
    justify-self: start;
    min-width: 42px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--mint-soft);
    color: var(--accent-2) !important;
    font-size: 12px !important;
    font-weight: 900;
    text-transform: uppercase;
}

.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tool-card { min-height: 208px; display: flex; flex-direction: column; padding: 23px; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tool-card:hover { transform: translateY(-4px); border-color: #b9c7e3; box-shadow: var(--shadow-strong); }
.tool-card h3 { font-size: 19px; margin: 12px 0 10px; color: var(--accent); }
.tool-card p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 13px; background: var(--mint-soft); color: var(--accent-2); font-weight: 900; font-size: 18px; }
.go { margin-top: auto; color: var(--accent-2); font-size: 13px; font-weight: 900; }

footer {
    padding: 34px 0;
    border-top: 1px solid var(--line);
    background: #fff;
    color: var(--muted);
    font-size: 13px;
}
.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-links a {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.server-location {
    display: inline-block;
    margin-left: 10px;
    color: var(--muted);
    white-space: nowrap;
}

@media (max-width: 1080px) {
    .app-grid { grid-template-columns: 1fr; }
    .app-sidebar { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
    .container { width: min(100% - 28px, 1180px); }
    .nav { padding: 14px 0; }
    .nav-links { display: none; }
    .nav-actions { margin-left: auto; }
    .language-switcher summary { min-height: 34px; padding: 0 12px; font-size: 13px; }
    .language-menu {
        width: min(300px, calc(100vw - 28px));
        max-height: calc(100vh - 100px);
        grid-template-columns: 1fr;
    }
    .app-shell { padding: 28px 0 44px; }
    .app-sidebar { grid-template-columns: 1fr; }
    .post-card-with-media {
        display: block;
    }
    .post-card-rich .post-media {
        border-width: 0 0 1px;
        border-radius: var(--radius) var(--radius) 0 0;
    }
    .option-card, .card, .preview, .side-card { padding: 20px; border-radius: 18px; }
    .tool-hero h2, h1 { font-size: 26px; }
    .static-page h1 { font-size: 26px; margin-bottom: 20px; }
    .static-page h2,
    .static-page h4 { font-size: 20px; }
    .language-grid { grid-template-columns: 1fr; }
    .footer-grid { align-items: flex-start; }
}

/* Keep long tool-form actions reachable without scrolling to the end. */
.tool-hero form {
    padding-bottom: 104px;
}
.tool-actions:not(.compact-actions),
.qr-actions {
    position: fixed;
    left: 50%;
    bottom: 18px;
    z-index: 30;
    width: max-content;
    max-width: calc(100% - 32px);
    margin: 0;
    padding: 8px;
    gap: 10px;
    justify-content: center;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 26px;
    background:
        radial-gradient(circle at 14% 0%, rgba(120, 229, 216, .32), transparent 34%),
        linear-gradient(135deg, rgba(9, 20, 90, .94), rgba(13, 127, 120, .88));
    box-shadow:
        0 22px 60px rgba(9, 20, 90, .28),
        0 8px 18px rgba(13, 127, 120, .16),
        inset 0 1px 0 rgba(255, 255, 255, .2);
    backdrop-filter: blur(18px) saturate(1.22);
    transform: translateX(-50%);
    isolation: isolate;
}
.tool-actions:not(.compact-actions)::before,
.qr-actions::before {
    content: "";
    position: absolute;
    inset: -8px;
    z-index: -1;
    border-radius: 32px;
    background: rgba(255, 255, 255, .16);
    filter: blur(14px);
    pointer-events: none;
}
.tool-actions:not(.compact-actions) button,
.qr-actions button,
.tool-actions:not(.compact-actions) input[type="submit"] {
    min-width: 148px;
    min-height: 46px;
    padding: 0 24px;
    border-radius: 18px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .18);
}
.tool-actions:not(.compact-actions) button:not(.btn-primary),
.qr-actions button:not(.btn-primary),
.tool-actions:not(.compact-actions) input[type="submit"]:not(.btn-primary) {
    color: #fff;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
}
.tool-actions:not(.compact-actions) button[type="submit"],
.tool-actions:not(.compact-actions) input[type="submit"] {
    color: #fff;
    background: linear-gradient(135deg, #ffbd18, #ff9f0a);
    border: 0;
    box-shadow: 0 16px 34px rgba(255, 159, 10, .28);
}
.compact-actions {
    position: static;
}

@supports not ((backdrop-filter: blur(1px))) {
    .tool-actions:not(.compact-actions),
    .qr-actions {
        background: linear-gradient(135deg, #09145a, #0d7f78);
    }
}

@media (min-width: 1081px) {
    .app-grid:not(.app-grid-wide) .tool-actions:not(.compact-actions),
    .app-grid:not(.app-grid-wide) .qr-actions {
        left: calc((100vw - min(1180px, calc(100vw - 40px))) / 2 + (min(1180px, calc(100vw - 40px)) - 392px) / 2);
        max-width: calc(min(1180px, calc(100vw - 40px)) - 392px);
    }
}

@media (max-width: 820px) {
    .tool-hero form {
        padding-bottom: 96px;
    }
    .tool-actions:not(.compact-actions),
    .qr-actions {
        bottom: 12px;
        width: auto;
        min-width: min(360px, calc(100% - 24px));
        max-width: calc(100% - 24px);
        padding: 8px;
        border-radius: 24px;
    }
    .tool-actions:not(.compact-actions) button,
    .qr-actions button,
    .tool-actions:not(.compact-actions) input[type="submit"] {
        flex: 1 1 auto;
        min-width: 0;
        padding: 0 18px;
    }
}

.advanced-config {
    margin: 0 0 24px;
}
.advanced-config > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: #fff;
    color: var(--blue);
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow);
    user-select: none;
}
.advanced-config > summary::after {
    content: "+";
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--blue-3);
    font-size: 16px;
    line-height: 1;
}
.advanced-config[open] > summary {
    margin-bottom: 18px;
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
}
.advanced-config[open] > summary::after {
    content: "-";
    background: rgba(255,255,255,.18);
    color: #fff;
}
.advanced-config .option-card:last-child {
    margin-bottom: 0;
}
