:root {
    --bg: #eef3f8;
    --bg-2: #f8fbff;
    --panel: rgba(255, 255, 255, 0.96);
    --panel-soft: #f5f8fd;
    --line: #d7e0ec;
    --line-strong: #c5d1e1;
    --text: #18212f;
    --text-muted: #627086;
    --nav-bg: #171a20;
    --nav-panel: #1f2430;
    --primary: #2554ff;
    --primary-soft: rgba(37, 84, 255, 0.10);
    --accent: #7b5cff;
    --shadow-lg: 0 22px 60px rgba(17, 24, 39, 0.14);
    --shadow-md: 0 14px 34px rgba(17, 24, 39, 0.08);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --max-width: 1180px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
body {
    font-family: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(123, 92, 255, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(37, 84, 255, 0.08), transparent 24%),
        linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 48%, #edf2f7 100%);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
textarea { resize: vertical; }

.site-shell { min-height: 100vh; }
.page-main,
.site-footer {
    width: min(calc(100% - 32px), var(--max-width));
    margin: 0 auto;
}
.page-main { padding: 28px 0 40px; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(23, 26, 32, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
}
.topbar__inner {
    width: min(calc(100% - 32px), calc(var(--max-width) + 80px));
    margin: 0 auto;
    min-height: 74px;
    display: grid;
    grid-template-columns: minmax(220px, auto) minmax(0, 1fr) minmax(180px, 240px);
    align-items: center;
    gap: 16px 18px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #fff;
}
.brand__mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #2a3350, #2554ff, #7b5cff);
    box-shadow: 0 10px 28px rgba(37, 84, 255, 0.24);
    flex: 0 0 auto;
}
.brand__text {
    display: block;
    min-width: 0;
    font-size: clamp(1rem, 2vw, 1.14rem);
    letter-spacing: -0.04em;
    line-height: 1.1;
    white-space: nowrap;
}

.gnb {
    display: flex;
    align-items: stretch;
    gap: 0;
    min-width: 0;
    height: 74px;
}
.gnb-link,
.gnb-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 74px;
    padding: 0 18px;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,0.86);
    font-size: 0.96rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}
.gnb-link:hover,
.gnb-trigger:hover,
.gnb-item.is-open .gnb-trigger {
    background: rgba(255,255,255,0.04);
    color: #fff;
}
.gnb-item {
    position: relative;
    display: flex;
    align-items: stretch;
    flex: 0 0 auto;
}
.gnb-item--home .gnb-link { width: 100%; }
.gnb-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    width: min(360px, calc(100vw - 32px));
    display: none;
    border-radius: 16px;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.gnb-item.is-open .gnb-dropdown { display: block; }
.gnb-dropdown__inner {
    max-height: min(72vh, 560px);
    overflow: auto;
    padding: 10px 0;
}
.gnb-dropdown__link {
    display: block;
    padding: 10px 18px;
    transition: background 0.16s ease;
}
.gnb-dropdown__link:hover { background: var(--panel-soft); }
.gnb-dropdown__link strong {
    display: block;
    font-size: 0.98rem;
    color: var(--text);
    letter-spacing: -0.03em;
}
.gnb-dropdown__link span {
    display: block;
    margin-top: 2px;
    color: var(--text-muted);
    font-size: 0.87rem;
}

.global-search-wrap { position: relative; }
.global-search {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.08);
    color: #fff;
    outline: none;
}
.global-search::placeholder { color: rgba(255,255,255,0.55); }
.global-search:focus {
    border-color: rgba(122, 151, 255, 0.7);
    background: rgba(255,255,255,0.12);
}
.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    display: none;
    padding: 8px;
    max-height: 420px;
    overflow: auto;
    border-radius: 16px;
    background: rgba(255,255,255,0.98);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}
.search-dropdown.is-open { display: block; }
.search-result-item {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
}
.search-result-item:hover { background: var(--panel-soft); }
.search-result-item strong {
    display: block;
    font-size: 0.96rem;
    color: var(--text);
}
.search-result-item span {
    display: block;
    color: var(--text-muted);
    font-size: 0.86rem;
}

.hero,
.section,
.tool-panel,
.site-footer__inner {
    background: var(--panel);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(215, 224, 236, 0.96);
    box-shadow: var(--shadow-md);
}
.hero,
.section,
.tool-panel { padding: 28px; }
.hero {
    position: relative;
    overflow: hidden;
    padding: 38px 32px;
}
.hero::after {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 84, 255, 0.14), transparent 68%);
}
.hero__content { position: relative; z-index: 1; }
.hero__content--single { max-width: 760px; }
.hero h1,
.tool-header h1 {
    margin: 0;
    line-height: 1.06;
    letter-spacing: -0.05em;
}
.hero h1 { font-size: clamp(2rem, 4vw, 3.15rem); }
.hero p,
.tool-header p,
.section-head p,
.footer-note,
.helper-text,
.tool-tip,
.result-note,
.link-card p,
.bmi-range-note { color: var(--text-muted); }
.hero p {
    margin: 14px 0 0;
    font-size: 1.02rem;
}

.section,
.tool-panel { margin-top: 24px; }
.section--soft { background: rgba(248, 251, 255, 0.98); }
.section--compact-gap { margin-top: 18px; }
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.section-head.compact { margin-bottom: 14px; }
.section-head h2,
.result-panel h2,
.result-panel h3 { margin: 0; line-height: 1.18; letter-spacing: -0.04em; }
.section-head h2 { font-size: 1.28rem; }
.section-head p { margin: 6px 0 0; }

.tool-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.tool-grid--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-card {
    display: block;
    padding: 22px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(246,250,255,0.98) 100%);
    border: 1px solid rgba(215, 224, 236, 0.96);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(37, 84, 255, 0.24);
}
.tool-card--mini { padding: 18px; }
.tool-card__icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37,84,255,0.12), rgba(123,92,255,0.12));
    color: var(--text);
    font-weight: 800;
}
.tool-card h3 {
    margin: 16px 0 8px;
    font-size: 1.04rem;
    letter-spacing: -0.03em;
}
.tool-card p {
    margin: 0;
    min-height: 46px;
    color: var(--text-muted);
    font-size: 0.94rem;
}
.tool-card__meta { display: none; }

.tool-header { margin-bottom: 22px; }
.tool-header h1 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
.tool-header p { margin: 10px 0 0; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}
.form-grid.single { grid-template-columns: 1fr; }
.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 22px;
}
.inline-fields,
.check-row,
.copy-row,
.actions,
.result-actions,
.badge-row,
.token-list,
.link-list,
.pill-row,
.recent-tools,
.status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.inline-fields .field { flex: 1 1 180px; }
.field { display: grid; gap: 8px; }
.field label { font-weight: 700; font-size: 0.94rem; }
.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: rgba(255,255,255,0.96);
    outline: none;
    color: var(--text);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: rgba(37, 84, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(37, 84, 255, 0.10);
}
.field textarea { min-height: 180px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 48px;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: linear-gradient(135deg, #1d2940, #2951e3);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.btn:hover { opacity: 0.96; }
.btn.secondary {
    background: rgba(255,255,255,0.96);
    color: var(--text);
    border-color: var(--line-strong);
}
.btn.soft {
    background: var(--primary-soft);
    color: var(--text);
    border-color: rgba(37,84,255,0.14);
}
.btn.tiny {
    min-width: 0;
    min-height: 40px;
    padding: 8px 12px;
    font-size: 0.88rem;
}

.result-panel,
.preview-card,
.canvas-stage,
.frame-preview,
.output-box,
.code-box,
.table-wrap,
.link-card,
.bmi-meter,
.bmi-scale {
    border-radius: 18px;
    border: 1px solid rgba(215, 224, 236, 0.96);
    background: rgba(255,255,255,0.92);
}
.result-panel { margin-top: 22px; padding: 20px; }
.preview-card,
.canvas-stage,
.frame-preview {
    display: grid;
    place-items: center;
    min-height: 260px;
    padding: 20px;
    border-style: dashed;
    overflow: auto;
}
.preview-card canvas,
.preview-card img,
.preview-card svg,
.canvas-stage canvas,
.frame-preview iframe { max-width: 100%; height: auto; }
.frame-preview iframe {
    width: 100%;
    min-height: 420px;
    border: 0;
    background: #fff;
}
.output-box {
    min-height: 160px;
    padding: 14px 16px;
    white-space: pre-wrap;
    word-break: break-word;
}
.code-box {
    padding: 14px 16px;
    white-space: pre-wrap;
    overflow: auto;
    background: #111827;
    color: #e5eefc;
}
.table-wrap { overflow: auto; }
.result-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
}
.result-table th,
.result-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(215, 224, 236, 0.96);
    text-align: left;
    vertical-align: top;
}
.result-table th {
    background: rgba(246, 249, 255, 0.96);
    font-weight: 800;
}
.result-table tr:last-child td { border-bottom: 0; }
.notice {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #eef4ff;
    color: #23408d;
    border: 1px solid #c8d7ff;
}
.notice.error { background: #fff2f1; color: #b42318; border-color: #f8b4ad; }
.notice.success { background: #ecfdf3; color: #117a65; border-color: #a6f4c5; }
.notice.warning { background: #fff7ed; color: #b54708; border-color: #facc8a; }
.hidden { display: none !important; }

.link-list { display: grid; gap: 12px; }
.link-card { padding: 16px; }
.link-card h3 { margin: 0 0 6px; font-size: 1rem; }
.recent-tools a {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(215,224,236,0.96);
}
.recent-tools.empty { color: var(--text-muted); }

.adfit-group,
.adfit-center-wrap { margin-top: 24px; }
.adfit-center-wrap {
    display: flex;
    justify-content: center;
}
.adfit-center-wrap--home-gap { margin-top: 22px; }
.adfit-center-wrap--bottom-gap { margin-top: 24px; }
.adfit-center-wrap--wide .adfit-slot { width: 100%; }
.adfit-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.92);
    border: 1px dashed rgba(144, 164, 195, 0.9);
    overflow: hidden;
}
.adfit-slot--wide { max-width: 780px; min-height: 118px; }
.adfit-slot--rectangle { width: 100%; max-width: 332px; min-height: 282px; }

.floating-ad-layer { pointer-events: none; }
.floating-ad,
.floating-ad-mobile { display: none; }
.floating-ad {
    position: fixed;
    top: 132px;
    z-index: 18;
    pointer-events: auto;
}
.floating-ad--left {
    left: max(16px, calc((100vw - var(--max-width)) / 2 - 190px));
}
.floating-ad--right {
    right: max(16px, calc((100vw - var(--max-width)) / 2 - 190px));
}
.floating-ad--vertical {
    width: 160px;
    min-height: 600px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(215, 224, 236, 0.96);
    background: rgba(255,255,255,0.96);
    box-shadow: var(--shadow-md);
}
.floating-ad-mobile {
    position: sticky;
    bottom: 0;
    z-index: 22;
    padding-top: 10px;
    justify-content: center;
    pointer-events: auto;
}
.floating-ad-mobile .kakao_ad_area {
    display: block;
    width: 320px;
    height: 100px;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}

.site-footer { padding: 0 0 34px; }
.site-footer__inner { padding: 18px 22px; }
.site-footer__inner p { margin: 0; }


.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}
.check-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(215,224,236,0.96);
    background: rgba(255,255,255,0.92);
    font-weight: 600;
}
.check-grid input { width: auto; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.stat-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(246,249,255,0.98);
    border: 1px solid rgba(215,224,236,0.96);
}
.stat-card strong {
    display: block;
    font-size: 1.3rem;
    letter-spacing: -0.04em;
}
.stat-card span {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.preview-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    min-height: 160px;
}
.preview-gallery--barcode { grid-template-columns: 1fr; }
.preview-gallery__item {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(215,224,236,0.96);
    background: rgba(255,255,255,0.96);
    display: grid;
    gap: 10px;
    justify-items: center;
}
.preview-gallery__item img {
    max-width: 100%;
    height: auto;
    display: block;
}
.preview-gallery__item--barcode { justify-items: stretch; }
.preview-gallery__frame {
    width: 100%;
    min-height: 180px;
    display: grid;
    place-items: center;
    padding: 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px dashed rgba(144,164,195,0.9);
    overflow: auto;
}
.preview-gallery__frame--barcode { min-height: 150px; }
.preview-gallery__frame svg { max-width: 100%; height: auto; }
.preview-gallery__meta {
    width: 100%;
    text-align: center;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
    word-break: break-word;
}
.empty-state {
    min-height: 120px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    border: 1px dashed rgba(144,164,195,0.9);
    color: var(--text-muted);
    background: rgba(255,255,255,0.86);
}

.lotto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.lotto-card {
    padding: 18px;
    border-radius: 18px;
    background: rgba(246,249,255,0.98);
    border: 1px solid rgba(215,224,236,0.96);
}
.lotto-card strong { display:block; margin-bottom: 10px; }
.lotto-balls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.lotto-ball {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37,84,255,0.16), rgba(123,92,255,0.16));
    font-weight: 800;
}
.lotto-ball--bonus {
    background: linear-gradient(135deg, rgba(255,167,38,0.22), rgba(255,107,87,0.18));
}
.lotto-plus { font-style: normal; font-weight: 800; color: var(--text-muted); }

.bmi-display {
    display: grid;
    gap: 18px;
}
.bmi-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.bmi-kpi {
    padding: 16px;
    border-radius: 16px;
    background: rgba(246, 249, 255, 0.98);
    border: 1px solid rgba(215, 224, 236, 0.96);
}
.bmi-kpi strong {
    display: block;
    font-size: 1.28rem;
    letter-spacing: -0.04em;
}
.bmi-kpi span {
    display: block;
    margin-top: 4px;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.bmi-meter {
    padding: 18px;
}
.bmi-meter__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.bmi-meter__value {
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}
.bmi-bar {
    position: relative;
    height: 18px;
    border-radius: 999px;
    background: linear-gradient(90deg, #69b7ff 0 30%, #25b26b 30% 57%, #ffbb33 57% 70%, #ff6b57 70% 100%);
    overflow: hidden;
}
.bmi-bar__marker {
    position: absolute;
    top: 50%;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #111827;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.24);
    transform: translate(-50%, -50%);
}
.bmi-scale {
    margin-top: 12px;
    padding: 12px 14px;
}
.bmi-scale__labels {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    font-size: 0.84rem;
    color: var(--text-muted);
}
.bmi-scale__labels strong {
    display: block;
    color: var(--text);
    font-size: 0.88rem;
}
.bmi-range-note {
    margin: 10px 0 0;
    font-size: 0.86rem;
}

.table-thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(215,224,236,0.96);
    background: #fff;
}
.result-table input[type="text"],
.result-table input[type="time"],
.result-table input[type="number"] {
    width: 100%;
    min-width: 110px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: rgba(255,255,255,0.96);
}

@media (min-width: 1480px) {
    .floating-ad { display: block; }
    body { overflow-x: hidden; }
}

@media (max-width: 1260px) {
    .tool-grid,
    .tool-grid--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .topbar__inner {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
        padding: 12px 0;
    }
    .gnb {
        overflow-x: auto;
        padding-bottom: 2px;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .gnb::-webkit-scrollbar { display: none; }
    .gnb-link,
    .gnb-trigger {
        min-height: 52px;
        padding: 0 16px;
        border-radius: 12px;
        white-space: nowrap;
    }
    .gnb-dropdown {
        position: absolute;
        left: 0;
        top: calc(100% + 8px);
        width: min(320px, calc(100vw - 32px));
    }
}

@media (max-width: 980px) {
    .page-main,
    .site-footer { width: min(calc(100% - 24px), var(--max-width)); }
    .hero,
    .section,
    .tool-panel,
    .site-footer__inner { padding: 22px; }
    .tool-grid,
    .tool-grid--compact,
    .form-grid,
    .two-column,
    .bmi-kpis,
    .stats-grid,
    .check-grid { grid-template-columns: 1fr; }
    .adfit-slot--wide { max-width: 100%; }
    .brand__text { white-space: normal; }
}

@media (max-width: 767px) {
    .topbar__inner { width: min(calc(100% - 20px), calc(var(--max-width) + 80px)); }
    .page-main { padding-top: 18px; }
    .hero h1 { font-size: 1.9rem; }
    .section-head { align-items: flex-start; }
    .tool-card p { min-height: 0; }
    .actions { flex-direction: column; }
    .btn { width: 100%; }
    .adfit-center-wrap--wide { display: none; }
    .floating-ad-mobile { display: flex; }
    .gnb-dropdown {
        position: fixed;
        left: 10px;
        right: 10px;
        width: auto;
        top: 128px;
        max-height: calc(100vh - 140px);
    }
}


.tool-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.preview-grid,.list-grid,.cards-grid,.compare-grid{display:grid;gap:14px}.preview-grid{grid-template-columns:repeat(auto-fill,minmax(180px,1fr))}.cards-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}.compare-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.code-box,pre.output-box{padding:16px;border-radius:16px;background:#10151d;color:#e8eefb;overflow:auto;border:1px solid #243041}.output-box{white-space:pre-wrap}.small-note{font-size:.88rem;color:var(--text-muted)}.stat-table{width:100%;border-collapse:collapse}.stat-table th,.stat-table td{padding:10px 12px;border-bottom:1px solid var(--line);text-align:left}.pill{display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:var(--primary-soft);color:var(--primary);font-weight:700;font-size:.85rem}.progress-bar{height:14px;border-radius:999px;background:#e8eef7;overflow:hidden}.progress-bar>span{display:block;height:100%;background:linear-gradient(90deg,var(--primary),var(--accent))}.drop-zone{padding:22px;border:2px dashed var(--line-strong);border-radius:18px;background:var(--panel-soft);text-align:center}.drop-zone.is-drag{border-color:var(--primary);background:#eef3ff}.table-wrap{overflow:auto}.toolbar-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin-bottom:12px}.result-highlight{font-size:1.35rem;font-weight:800;letter-spacing:-.04em}@media (max-width: 900px){.compare-grid{grid-template-columns:1fr}}


.form-grid--spellcheck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.field--span-2 {
    grid-column: span 2;
}
.spell-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-top: 20px;
}
.spell-card {
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,248,253,0.96));
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}
.spell-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.spell-card__head h2 {
    margin: 0;
    font-size: 1.06rem;
    letter-spacing: -0.03em;
}
.pill--pending { background: rgba(37, 84, 255, 0.1); color: var(--primary); }
.pill--muted { background: rgba(98, 112, 134, 0.12); color: var(--text-muted); }
.pill--success { background: rgba(20, 164, 83, 0.12); color: #11814b; }
.spell-results {
    display: grid;
    gap: 12px;
    max-height: 680px;
    overflow: auto;
}
.spell-result-item {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: #fff;
}
.spell-result-item__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.spell-result-item__top strong {
    display: block;
    font-size: 0.96rem;
    line-height: 1.45;
}
.spell-result-item__top p {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}
.spell-result-item__meta {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.spell-result-item__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.spell-result-item__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}
.chip-btn,
.text-btn {
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--text);
    border-radius: 999px;
    padding: 7px 12px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.chip-btn:hover,
.text-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(37, 84, 255, 0.05);
}
.chip-btn.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
@media (max-width: 980px) {
    .spell-layout,
    .form-grid--spellcheck {
        grid-template-columns: 1fr;
    }
    .field--span-2 {
        grid-column: auto;
    }
}


.spellcheck-page .helper-text{margin-top:8px}
.spell-top-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.spell-actionbar{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 14px}
.spell-actionbar .btn{min-width:140px}
.spell-status-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin:8px 0 18px}
.spell-status-card{border:1px solid var(--line);background:#fff;border-radius:16px;padding:14px 16px;box-shadow:0 8px 20px rgba(17,24,39,.04)}
.spell-status-card span{display:block;color:var(--text-muted);font-size:.85rem;margin-bottom:6px}
.spell-status-card strong{display:block;font-size:1.25rem;letter-spacing:-.04em}
.spell-preview{min-height:240px;white-space:pre-wrap;line-height:1.8;background:#fff;border:1px solid var(--line);border-radius:14px;padding:16px;overflow:auto}
.spell-preview.empty{display:flex;align-items:center;justify-content:center;color:var(--text-muted);background:var(--panel-soft)}
.spell-preview__before{display:inline-block;background:rgba(239,68,68,.12);color:#c03b3b;padding:1px 5px;border-radius:7px;text-decoration:line-through;margin:0 4px}
.spell-preview__after{display:inline-block;background:rgba(20,164,83,.12);color:#11814b;padding:1px 5px;border-radius:7px;margin:0 4px}
.spell-preview__arrow{color:var(--text-muted);font-weight:700}
.spell-card--results{margin-top:18px}
.spell-result-item__main{flex:1}
.spell-token-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.spell-token{display:inline-flex;align-items:center;min-height:34px;padding:6px 10px;border-radius:10px;font-weight:700;font-size:.92rem}
.spell-token--from{background:rgba(239,68,68,.12);color:#b63131}
.spell-token--to{background:rgba(20,164,83,.12);color:#11814b}
.spell-token-arrow{color:var(--text-muted);font-weight:700}
.spell-result-item__quick{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.btn-sm{padding:9px 12px;font-size:.9rem;min-width:auto}
.chip-btn,.text-btn{min-height:36px;font-weight:600}
.chip-btn{border-radius:10px}
.spell-results.empty{display:flex;align-items:center;justify-content:center;min-height:150px;background:var(--panel-soft);border:1px dashed var(--line-strong);border-radius:14px;color:var(--text-muted)}
#spellOutput{background:#fff}
@media (max-width:980px){.spell-top-grid,.spell-status-grid,.spell-layout{grid-template-columns:1fr}.spell-actionbar .btn{flex:1 1 calc(50% - 10px);min-width:0}}
@media (max-width:640px){.spell-actionbar .btn{width:100%;flex:1 1 100%}.spell-token-row{align-items:flex-start}}


.dict-page .tool-actions{display:flex;gap:10px;flex-wrap:wrap}
.form-grid--dict{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.dict-setup-panel code{display:inline-block;padding:4px 8px;border-radius:8px;background:rgba(37,84,255,.08);color:var(--primary)}
.dict-chip-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
.dict-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(320px,.9fr);gap:18px;margin-top:20px}
.dict-results.empty,.dict-detail.empty{display:flex;align-items:center;justify-content:center;min-height:180px;background:var(--panel-soft);border:1px dashed var(--line-strong);border-radius:16px;color:var(--text-muted);padding:20px;text-align:center}
.dict-results{display:flex;flex-direction:column;gap:14px}
.dict-result-card{border:1px solid var(--line);border-radius:16px;padding:16px;background:#fff;box-shadow:0 8px 20px rgba(17,24,39,.04)}
.dict-result-card__head{display:flex;flex-direction:column;gap:10px}
.dict-result-card h3,.dict-detail__head h3{margin:0;font-size:1.2rem;letter-spacing:-.04em}
.dict-result-card h3 sup,.dict-detail__head h3 sup{font-size:.7rem;color:var(--text-muted);margin-left:4px}
.dict-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.dict-meta__text{color:var(--text-muted);font-size:.9rem}
.dict-badge{display:inline-flex;align-items:center;min-height:28px;padding:0 10px;border-radius:999px;background:rgba(37,84,255,.1);color:var(--primary);font-weight:700;font-size:.84rem}
.dict-badge--soft{background:rgba(17,24,39,.06);color:var(--text)}
.dict-badge--line{background:#fff;border:1px solid var(--line);color:var(--text-muted)}
.dict-def-list{margin:14px 0 0;padding-left:20px;color:var(--text);line-height:1.75}
.dict-def-list li+li{margin-top:8px}
.dict-result-card__actions,.dict-detail__footer{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}
.dict-detail{display:flex;flex-direction:column;gap:18px}
.dict-detail__head{display:flex;flex-direction:column;gap:10px}
.dict-pron{margin:0;color:var(--text-muted)}
.dict-section{padding-top:2px}
.dict-section h4{margin:0 0 10px;font-size:1rem;letter-spacing:-.03em}
.dict-list,.dict-tag-list,.dict-category-list{margin:0;padding-left:18px;line-height:1.75;color:var(--text)}
.dict-tag-list li,.dict-category-list li{display:flex;gap:8px;flex-wrap:wrap;align-items:flex-start}
.dict-inline-ref{color:var(--text-muted);font-size:.9rem}
.recent-chip{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line-strong);background:#fff;color:var(--text);border-radius:999px;padding:8px 12px;cursor:pointer;transition:all .15s ease}
.recent-chip:hover{border-color:var(--primary);color:var(--primary);background:rgba(37,84,255,.05)}
@media (max-width:1100px){.form-grid--dict{grid-template-columns:repeat(2,minmax(0,1fr))}.dict-layout{grid-template-columns:1fr}}
@media (max-width:640px){.form-grid--dict{grid-template-columns:1fr}.dict-result-card__actions .btn-sm,.dict-detail__footer .btn-sm{width:100%;justify-content:center}}
