:root {
    --page-bg: #f5f5f5;
    --surface: #ffffff;
    --surface-soft: #fafafa;
    --text-primary: #111827;
    --text-muted: #6b7280;
    --line-color: #e5e7eb;
    --accent: #4b5563;
    --accent-hover: #374151;
    --action: #111827;
    --action-hover: #000000;
    --action-active: #000000;
    --action-shadow: rgba(17, 24, 39, 0.08);
}
body {
    background: var(--page-bg);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.navbar-clean {
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--line-color);
}
.navbar-clean .navbar-brand,
.navbar-clean .nav-link {
    color: var(--text-primary);
}
.navbar-clean .nav-link {
    font-weight: 500;
}
.navbar-clean .nav-link.active,
.navbar-clean .nav-link:hover {
    color: var(--action);
}
.page-main {
    flex: 1 0 auto;
    padding-top: 4.8rem;
    padding-bottom: 2rem;
}
.page-main.compact {
    padding-top: 4.8rem;
}
.page-shell {
    margin-top: 4.6rem;
    padding-bottom: 2rem;
    flex: 1 0 auto;
}
.hero-card,
.section-card,
.tool-card,
.info-card,
.step-card,
.card {
    background: #ffffff;
    border: 1px solid var(--line-color) !important;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04) !important;
}
.hero-card,
.section-card,
.tool-card,
.info-card,
.step-card {
    border-radius: 14px;
}
.hero-card {
    overflow: hidden;
}
.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--action);
    font-size: 0.86rem;
    font-weight: 600;
}
.hero-title {
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}
.hero-text,
.section-muted,
.step-card p,
.tool-meta,
.helper-text,
.footer-note,
.list-note,
.faq-answer,
.feature-list li,
.step-list li,
.map-list li,
.support-list li {
    color: var(--text-muted);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}
.stat-tile {
    border: 1px solid var(--line-color);
    border-radius: 18px;
    padding: 1rem;
    background: var(--surface);
}
.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
}
.section-card,
.info-card,
.step-card,
.tool-card {
    padding: 1rem;
}
.tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}
.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}
.tool-card {
    height: 100%;
}
.tool-card-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 96px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tool-card-link:hover,
.tool-card-link:focus,
.tool-card-link:focus-visible {
    color: var(--text-primary);
    border-color: #cfd4dc !important;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08) !important;
    transform: translateY(-1px);
    text-decoration: none;
    outline: none;
}
.tool-card-title {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.4;
    flex: 1 1 auto;
    min-width: 0;
}
.tool-icon,
.page-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f3f4f6;
    color: var(--text-primary);
    font-size: 1.1rem;
}
.tool-badges,
.quick-links,
.support-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tool-chip,
.link-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #dbe3ef;
    background: #f8fbff;
    color: #1f2937;
    font-size: 0.86rem;
    text-decoration: none;
}
.tool-chip:hover,
.link-chip:hover {
    color: var(--action);
    border-color: #bfd3ff;
    text-decoration: none;
}
.tool-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1rem;
}
.detail-grid {
    display: grid;
    gap: 1rem;
}
.section-box {
    border: 1px solid var(--line-color);
    border-radius: 10px;
    background: var(--surface);
    padding: 0.85rem;
    height: 100%;
}
.section-box p,
.section-box li,
.step-item p {
    color: var(--text-muted);
}
.info-list,
.step-list,
.map-list,
.support-list,
.feature-list {
    margin: 0;
    padding-left: 1.1rem;
}
.faq-item + .faq-item {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line-color);
}
.faq-question {
    font-weight: 700;
    margin-bottom: 0.4rem;
}
.step-item {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}
.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    flex: 0 0 32px;
}
.step-item h3,
.section-box h2 {
    margin-bottom: 0.4rem;
}
.site-list a,
.page-link {
    color: var(--text-primary);
    text-decoration: none;
}
.site-list a:hover,
.page-link:hover {
    color: var(--text-primary);
}
.list-group-item {
    background: #fff;
}
.list-group-item:hover {
    background: #f9fafb;
}
.format-link-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.format-link-list a {
    display: inline-flex;
    align-items: center;
    padding: 0.48rem 0.78rem;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid var(--line-color);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
}
.format-link-list a:hover {
    background: #f3f4f6;
    border-color: #c7cdd4;
    color: var(--text-primary);
}
.format-link-list a.is-hidden {
    display: none;
}
.format-search-empty {
    margin-top: 1rem;
    color: var(--text-muted);
}
.search-bar {
    margin-bottom: 1rem;
}
.search-input-wrap {
    position: relative;
}
.search-input-wrap .bi-search {
    position: absolute;
    top: 50%;
    left: 0.95rem;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}
.search-bar .form-control {
    border-color: #d1d5db;
    border-radius: 999px;
    padding-left: 2.5rem;
}
.search-bar .form-control:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 0.2rem rgba(17, 24, 39, 0.08);
}
.search-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.table-soft {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: #fafafa;
    --bs-table-color: var(--text-primary);
    margin-bottom: 0;
}
.table-soft th,
.table-soft td {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-color: var(--line-color);
}
.empty-404 {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
}
.footer-links a,
.footer-muted-link {
    color: var(--text-primary);
    text-decoration: none;
}
.footer-links a:hover,
.footer-muted-link:hover {
    color: var(--action);
    text-decoration: none;
}
.bi {
    line-height: 1;
    vertical-align: -0.125em;
}
.card-header {
    background: transparent !important;
    border-bottom-color: var(--line-color) !important;
}
.card-footer {
    background: transparent !important;
    border-top-color: var(--line-color) !important;
}
.card-header-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.upload-area {
    border: 1px dashed #cfd4dc;
    border-radius: 12px;
    padding: 0.85rem;
    min-height: 96px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
}
.upload-area:hover {
    border-color: #9ca3af;
    background-color: #f9fafb;
}
.upload-area-inner {
    width: 100%;
}
.upload-icon {
    font-size: 1.5rem;
    color: var(--text-primary);
}
.action-btn,
.btn-dark {
    background-color: var(--action) !important;
    border-color: var(--action) !important;
    color: #fff !important;
    box-shadow: none;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}
.action-btn:hover,
.btn-dark:hover {
    background-color: var(--action-hover) !important;
    border-color: var(--action-hover) !important;
    color: #fff !important;
    box-shadow: none;
}
.action-btn:focus,
.action-btn:focus-visible,
.btn-dark:focus,
.btn-dark:focus-visible {
    background-color: var(--action-hover) !important;
    border-color: var(--action-hover) !important;
    color: #fff !important;
    box-shadow: 0 0 0 0.2rem rgba(17, 24, 39, 0.12);
}
.action-btn:active,
.action-btn.active,
.btn-dark:active,
.btn-dark.active,
.show > .btn-dark.dropdown-toggle {
    background-color: var(--action-active) !important;
    border-color: var(--action-active) !important;
    color: #fff !important;
    box-shadow: none !important;
}
.form-label {
    font-weight: 600;
    color: var(--text-primary);
}
.form-select,
.btn-outline-secondary,
.form-check-input,
.list-group-item {
    border-color: #d1d5db;
}
.form-select:focus,
.btn-outline-secondary:focus,
.form-check-input:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 0.2rem rgba(17, 24, 39, 0.08);
}
.btn-outline-secondary {
    color: var(--text-primary);
    background: #fff;
}
.btn-outline-secondary:hover {
    color: var(--text-primary);
    background: #f3f4f6;
    border-color: #d1d5db;
}
.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}
.file-input-hidden {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}
.file-preview-card {
    border: 1px solid var(--line-color);
    border-radius: 12px;
    background: var(--surface);
    padding: 0.6rem 0.7rem;
    overflow: hidden;
}
.file-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}
.file-preview-head > div {
    min-width: 0;
}
.file-preview-head .btn {
    flex-shrink: 0;
    padding: 0.22rem 0.42rem;
    line-height: 1.1;
    white-space: nowrap;
}
.file-preview-name {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-preview-meta,
.result-file-meta {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.file-preview-meta {
    margin-top: 0.1rem;
}
.file-list {
    display: grid;
    gap: 0.5rem;
    max-height: 240px;
    overflow-y: auto;
}
.file-list-item {
    border: 1px solid var(--line-color);
    border-radius: 10px;
    background: #fff;
    padding: 0.55rem 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.file-list-item.is-processing {
    background: #eff6ff;
    border-color: #bfdbfe;
}
.file-list-item.is-success {
    background: #ecfdf5;
    border-color: #bbf7d0;
}
.file-list-item.is-failed {
    background: #fef2f2;
    border-color: #fecaca;
}
.file-list-name {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.file-list-thumb {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    border: 1px solid #dbe3ee;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    overflow: hidden;
    flex: 0 0 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: zoom-in;
    appearance: none;
    -webkit-appearance: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.file-list-thumb:hover,
.file-list-thumb:focus {
    border-color: #93c5fd;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
    transform: translateY(-1px);
    outline: none;
}
.file-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.file-list-thumb-icon {
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1;
}
.file-list-body {
    min-width: 0;
    flex: 1 1 auto;
}
.file-list-meta {
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.45;
}
.file-list-side-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    flex: 0 0 auto;
    align-self: center;
    justify-content: flex-end;
}
.file-list-side-actions .btn {
    padding: 0.2rem 0.62rem;
    line-height: 1.25;
    border-radius: 999px;
    white-space: nowrap;
}
.result-box {
    border: 1px solid var(--line-color);
    border-radius: 14px;
    background: var(--surface);
    padding: 0.8rem;
    overflow: hidden;
}
.result-file-name {
    display: block;
    max-width: 100%;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.result-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.55rem;
}
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding-top: 0.1rem;
}
.progress-track {
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(90deg, #eceff3 0%, #e5e7eb 100%);
}
#progressBar {
    background-color: var(--accent) !important;
    transition: width 0.28s ease;
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.2) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0.2) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}
.progress-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.5;
    min-height: 1.4rem;
}
.promo-tip .alert {
    padding: 0.6rem 0.8rem;
    font-size: 0.88rem;
}
.card-foot-ad {
    font-size: 0.9rem;
}
.card-foot-ad a {
    text-decoration: none;
}
.card-foot-ad a:hover {
    text-decoration: underline;
}
.component-state .card-body,
.component-state.card-body {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.component-state-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
}
.component-state-text {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.component-action {
    margin-top: 1rem;
}
.page-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(209, 213, 219, 0.9), transparent);
    margin: 1rem 0 1.5rem;
}
@media (max-width: 991.98px) {
    .hero-stats {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 576px) {
    .page-main {
        padding-top: 5rem;
    }
    .tool-grid {
        gap: 0.75rem;
    }
    .tool-card-link {
        min-height: 88px;
        padding: 0.9rem;
    }
    .tool-card-title {
        font-size: 0.92rem;
    }
    .format-link-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .format-link-list a {
        width: 100%;
        min-width: 0;
        justify-content: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .hero-actions {
        flex-direction: column;
    }
    .hero-actions .btn {
        width: 100%;
    }
    .file-preview-head {
        align-items: center;
    }
    .file-list-item {
        flex-wrap: wrap;
        align-items: flex-start;
    }
    .file-list-side-actions {
        width: 100%;
        margin-left: 0;
        padding-left: 3.25rem;
        justify-content: flex-start;
    }
}
.file-list-thumb.is-doc {
    cursor: default;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    border-color: #bfdbfe;
}
.file-list-thumb.is-doc .file-list-thumb-icon {
    color: #2563eb;
    font-size: 1.15rem;
}
.text-preview-shell {
    padding: 12px;
    background: #f8fafc;
}
.text-preview-toolbar {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}
.text-preview-box {
    max-height: calc(80vh - 120px);
    overflow: auto;
    border: 1px solid var(--line-color);
    border-radius: 12px;
    background: #ffffff;
    padding: 1rem;
    color: var(--text-primary);
    line-height: 1.75;
    word-break: break-word;
}
.code-preview-box {
    max-height: calc(82vh - 124px);
    overflow: auto;
    margin: 0;
    border: 1px solid var(--line-color);
    border-radius: 12px;
    background: #0f172a;
    padding: 1rem;
    color: #e2e8f0;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.88rem;
}
.doc-render-stage {
    position: fixed;
    left: -100000px;
    top: 0;
    width: 1400px;
    opacity: 0;
    pointer-events: none;
    z-index: -1;
}
.doc-render-stage .docx-wrapper {
    padding: 18px;
    background: #f3f4f6;
}
.doc-render-stage .docx-wrapper > section.docx,
.doc-render-stage section.docx {
    box-shadow: none !important;
}
.card-foot-ad [data-sponsor-note] {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-muted);
}
@media (min-width: 768px) {
    .tool-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (min-width: 1200px) {
    .tool-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
@media (max-width: 576px) {
    .doc-render-stage {
        width: 1080px;
    }
    .text-preview-box {
        max-height: calc(76vh - 120px);
    }
    .code-preview-box {
        max-height: calc(78vh - 124px);
    }
}

.min-w-0 {
    min-width: 0;
}
.file-list-thumb.is-gallery {
    cursor: default;
    background: linear-gradient(180deg, #fefce8 0%, #fef3c7 100%);
    border-color: #fcd34d;
}
.file-list-thumb.is-gallery .file-list-thumb-icon {
    color: #b45309;
    font-size: 1.12rem;
}
.extract-preview-shell {
    padding: 12px;
    background: #f8fafc;
}
.extract-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.extract-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.8rem;
    max-height: calc(82vh - 146px);
    overflow: auto;
}
.extract-preview-card {
    border: 1px solid var(--line-color);
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}
.extract-preview-figure {
    aspect-ratio: 4 / 3;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    padding: 0.75rem;
}
.extract-preview-figure img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
}
.extract-preview-meta {
    padding: 0.75rem;
}
.extract-preview-name {
    display: block;
    font-weight: 600;
    font-size: 0.82rem;
    line-height: 1.35;
    word-break: break-word;
}
.extract-preview-size {
    display: block;
    margin-top: 0.25rem;
    color: var(--text-muted);
    font-size: 0.76rem;
}
@media (max-width: 576px) {
    .extract-preview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-height: calc(78vh - 140px);
    }
    .extract-preview-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }
}


.text-tool-shell {
    display: grid;
    gap: 1rem;
}
.mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.mode-switch .btn.is-active {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.12);
}
.example-chips,
.action-row,
.option-row,
.mini-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.converter-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--text-primary);
}
.helper-inline {
    color: var(--text-muted);
    font-size: 0.84rem;
    font-weight: 400;
}
.editor-textarea {
    width: 100%;
    min-height: 320px;
    border: 1px solid var(--line-color);
    border-radius: 16px;
    background: #ffffff;
    padding: 1rem;
    line-height: 1.72;
    resize: vertical;
    color: var(--text-primary);
}
.editor-textarea:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 0.2rem rgba(17, 24, 39, 0.08);
    outline: none;
}
.result-textarea {
    background: #f9fafb;
}
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.72rem;
    border-radius: 999px;
    border: 1px solid var(--line-color);
    background: #ffffff;
    color: var(--text-muted);
    font-size: 0.84rem;
}
.stat-pill strong {
    color: var(--text-primary);
    font-weight: 700;
}
.sample-chip {
    border-radius: 999px;
}
.section-box code {
    color: #1d4ed8;
    background: #eff6ff;
    padding: 0.1rem 0.36rem;
    border-radius: 6px;
}
.compact-tool-shell {
    display: grid;
    gap: 0.75rem;
}
.compact-field {
    display: grid;
    gap: 0.4rem;
}
.compact-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
}
.compact-hint {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 400;
}
.compact-input,
.compact-result-box {
    width: 100%;
    border: 1px solid var(--line-color);
    border-radius: 10px;
    background: #ffffff;
    padding: 0.7rem 0.8rem;
    color: var(--text-primary);
}
.compact-input {
    min-height: 150px;
    line-height: 1.6;
    resize: vertical;
}
.compact-input:focus {
    border-color: #9ca3af;
    box-shadow: 0 0 0 0.2rem rgba(17, 24, 39, 0.08);
    outline: none;
}
.compact-input.single-line {
    min-height: 0;
    height: 2.75rem;
    resize: none;
    font-size: 0.96rem;
    font-weight: 500;
    line-height: 1.4;
}
.compact-input-row {
    position: relative;
}
.compact-input-row .compact-input {
    padding-right: 3rem;
}
.compact-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}
.compact-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
    padding: 0.34rem 0.62rem;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #ffffff;
    color: var(--text-primary);
    font-size: 0.84rem;
}
.compact-radio input {
    margin: 0;
}
.compact-radio:has(input:checked) {
    border-color: #9ca3af;
    background: #f3f4f6;
    color: var(--text-primary);
}
.compact-result-box {
    min-height: 88px;
    background: #fafafa;
    line-height: 1.55;
    resize: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.compact-result-shell {
    position: relative;
}
.compact-result-copy {
    position: absolute;
    top: 0.42rem;
    right: 0.42rem;
    z-index: 3;
    display: flex;
    pointer-events: none;
}
.compact-result-copy .compact-copy-btn {
    pointer-events: auto;
}
.compact-result-panel {
    position: relative;
}
.compact-result-box.has-copy-button {
    padding: 2.2rem 4.05rem 0.8rem 0.8rem;
}
.compact-result-box.is-error {
    border-color: #fecaca;
    background: #fff5f5;
    color: #b91c1c;
}
.compact-result-box.is-copied {
    border-color: #86efac;
    background: #f0fdf4;
    box-shadow: 0 0 0 1px rgba(22, 163, 74, 0.05);
}
.compact-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    height: 1.56rem;
    margin: 0;
    padding: 0 0.46rem;
    border: 1px solid rgba(209, 213, 219, 0.95);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.98);
    color: #475569;
    font-size: 0.68rem;
    line-height: 1;
    white-space: nowrap;
    width: auto;
    max-width: max-content;
    box-shadow: none;
    transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}
.compact-copy-btn .bi {
    font-size: 0.68rem;
}
.compact-copy-btn:hover,
.compact-copy-btn:focus,
.compact-copy-btn:focus-visible {
    border-color: rgba(148, 163, 184, 0.95);
    background: #ffffff;
    color: #1f2937;
    outline: none;
}
.compact-copy-btn.is-copied,
.compact-copy-btn.is-copied:hover,
.compact-copy-btn.is-copied:focus,
.compact-copy-btn.is-copied:focus-visible {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #15803d;
}
.compact-clear-btn {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.compact-input.single-line + .compact-clear-btn {
    top: 50%;
    transform: translateY(-50%);
}
.compact-clear-btn .bi {
    font-size: 0.9rem;
}
.compact-meta {
    color: var(--text-muted);
    font-size: 0.78rem;
}
@media (max-width: 991.98px) {
    .converter-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 576px) {
    .panel-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .editor-textarea {
        min-height: 260px;
    }
    .compact-label {
        align-items: flex-start;
        flex-direction: column;
    }
    .compact-result-box.has-copy-button {
        padding-right: 3.8rem;
    }
}
