:root {
    --dict-primary:       #16685c;
    --dict-primary-dark:  #0f4d44;
    --dict-primary-soft:  #e8f3f0;
    --dict-primary-wash:  #f4faf8;
    --dict-ink:           #17211f;
    --dict-muted:         #65736f;
    --dict-faint:         #8b9995;
    --dict-bg:            #fbfcfb;
    --dict-panel:         #ffffff;
    --dict-panel-soft:    #f6f9f8;
    --dict-border:        #d7e6e2;
    --dict-border-strong: #a8c9c2;
    --dict-warm:          #9a7a3d;
    --dict-focus:         rgba(22, 104, 92, 0.18);
    --dict-shadow:        0 1px 3px rgba(15, 77, 68, 0.06);
    --dict-font:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --dict-serif: "Crimson Text", Georgia, "Times New Roman", serif;
    --dict-mono:  "SF Mono", "Cascadia Mono", "Fira Mono", ui-monospace, "SFMono-Regular", "Consolas", monospace;
}

body.dict-ui {
    background: var(--dict-bg);
    color: var(--dict-ink);
    font-family: var(--dict-font);
    font-size: 15px;
    line-height: 1.62;
    letter-spacing: 0;
}

body.dict-ui * {
    box-sizing: border-box;
}

body.dict-ui a {
    color: var(--dict-primary);
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

body.dict-ui a:hover {
    color: var(--dict-primary-dark);
}

body.dict-ui .uk-section::before {
    content: none !important;
}

body.dict-ui .uk-card {
    border-radius: 8px;
    box-shadow: none;
    transform: none;
}

body.dict-ui .uk-card:hover {
    box-shadow: none;
    transform: none;
}

body.dict-ui .uk-button {
    border-radius: 6px;
    font-family: var(--dict-font);
    font-weight: 650;
    letter-spacing: 0;
    text-transform: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

body.dict-ui .uk-button:hover {
    box-shadow: none;
    transform: none;
}

body.dict-ui .uk-button-primary {
    background: var(--dict-primary);
    border-color: var(--dict-primary);
    color: #ffffff;
}

body.dict-ui .uk-button-primary:hover {
    background: var(--dict-primary-dark);
    border-color: var(--dict-primary-dark);
    color: #ffffff;
}

body.dict-ui .uk-button-default {
    background: #ffffff;
    border-color: var(--dict-border);
    color: var(--dict-ink);
}

body.dict-ui .uk-button-default:hover {
    border-color: var(--dict-border-strong);
    color: var(--dict-primary-dark);
}

body.dict-ui .uk-label,
body.dict-ui .uk-badge {
    background: var(--dict-primary-soft);
    border: 1px solid var(--dict-border);
    border-radius: 4px;
    color: var(--dict-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 2px 8px;
    width: auto;
    height: auto;
    font-family: var(--dict-mono);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.01em;
    text-transform: none;
}

body.dict-ui .uk-breadcrumb {
    color: var(--dict-muted);
    font-family: var(--dict-mono);
    font-size: 0.82rem;
    margin-bottom: 20px;
}

body.dict-ui .uk-breadcrumb > * > * {
    color: var(--dict-muted);
}

body.dict-ui .uk-breadcrumb > :last-child > * {
    color: var(--dict-ink);
}

body.dict-ui .uk-description-list-divider > dt:nth-child(n+2) {
    border-top-color: var(--dict-border);
}

.dict-shell {
    width: min(1120px, calc(100vw - 40px));
    margin-inline: auto;
}

.dict-shell-narrow {
    width: min(860px, calc(100vw - 40px));
    margin-inline: auto;
}

.dict-main {
    background: var(--dict-bg);
    min-height: 72vh;
}

.dict-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(251, 252, 251, 0.94);
    border-bottom: 1px solid var(--dict-border);
    backdrop-filter: blur(12px);
}

.dict-nav-inner {
    width: min(1180px, calc(100vw - 32px));
    min-height: 54px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.dict-brand {
    min-height: 54px;
    gap: 10px;
    color: var(--dict-ink) !important;
    font-weight: 700;
    letter-spacing: 0;
}

.dict-brand img {
    width: min(196px, 48vw);
    height: auto;
    max-height: 34px;
    object-fit: contain;
}

.dict-brand-text {
    color: var(--dict-ink);
    font-size: 1rem;
    line-height: 1.1;
}

.dict-nav .uk-navbar-nav > li > a,
.dict-nav-link {
    min-height: 54px;
    padding: 0 10px;
    color: var(--dict-muted);
    font-family: var(--dict-font);
    font-size: 0.88rem;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.dict-nav .uk-navbar-nav > li > a:hover,
.dict-nav-link:hover {
    color: var(--dict-primary-dark);
}

.dict-dropdown {
    border: 1px solid var(--dict-border);
    border-radius: 6px;
    box-shadow: 0 4px 20px rgba(15, 77, 68, 0.08);
    padding: 16px;
    width: auto !important;
    min-width: 0 !important;
}

.dict-dropdown-title {
    color: var(--dict-muted);
    font-family: var(--dict-mono);
    font-size: 0.68rem;
    font-weight: 700;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.dict-nav-letter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(36px, 1fr));
    gap: 6px;
    width: min(330px, 78vw);
}

.dict-letter-link,
.dict-letter-pill {
    border: 1px solid var(--dict-border);
    border-radius: 4px;
    background: #ffffff;
    color: var(--dict-ink) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 34px;
    padding: 0 8px;
    font-family: var(--dict-mono);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.dict-letter-link:hover,
.dict-letter-pill:hover,
.dict-letter-pill.is-active {
    background: var(--dict-primary);
    border-color: var(--dict-primary);
    color: #ffffff !important;
}

.dict-language-list {
    min-width: 220px;
}

.dict-language-list a {
    align-items: center;
    border-radius: 6px;
    display: flex !important;
    gap: 10px;
    min-height: 38px;
    padding: 7px 9px !important;
    column-gap: 0.6em !important;
}

.dict-language-code {
    border: 1px solid var(--dict-border);
    border-radius: 3px;
    color: var(--dict-primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 30px;
    height: 22px;
    font-family: var(--dict-mono);
    font-size: 0.66rem;
    font-weight: 800;
}

.dict-mobile-toggle {
    min-height: 40px;
    gap: 8px;
}

.dict-mobile-panel {
    background: #ffffff;
    border-right: 1px solid var(--dict-border);
    color: var(--dict-ink);
}

.dict-mobile-panel a {
    color: var(--dict-ink);
}
/* 手机侧边菜单中语言列表链接颜色显式覆盖（防止 UIkit offcanvas 默认白色覆盖） */
.dict-mobile-panel .dict-language-list a {
    color: var(--dict-ink) !important;
}

.dict-mobile-section {
    color: var(--dict-muted);
    font-family: var(--dict-mono);
    font-size: 0.66rem;
    font-weight: 800;
    margin: 20px 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.dict-mobile-letter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.dict-hero {
    border-bottom: 1px solid var(--dict-border);
    padding: 52px 0 42px;
}

.dict-hero-home {
    padding-top: 64px;
}

.dict-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(340px, 0.68fr);
    gap: clamp(28px, 5vw, 72px);
    align-items: start;
}

.dict-eyebrow {
    color: var(--dict-primary-dark);
    display: block;
    font-family: var(--dict-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.dict-hero h1,
.dict-page-head h1,
.dict-entry-title {
    color: var(--dict-ink);
    font-family: var(--dict-font);
    font-size: clamp(1.9rem, 5.5vw, 3.8rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.022em;
    margin: 0;
}

.dict-hero-copy p,
.dict-page-head p,
.dict-lede {
    color: var(--dict-muted);
    font-size: clamp(0.95rem, 2vw, 1.08rem);
    line-height: 1.62;
    margin: 16px 0 0;
    max-width: 560px;
}

.dict-search-panel,
.dict-panel {
    background: var(--dict-panel);
    border: 1px solid var(--dict-border);
    border-radius: 6px;
}

.dict-search-panel {
    padding: clamp(20px, 4vw, 28px);
}

.dict-search-panel .dict-eyebrow {
    margin-bottom: 12px;
}

.dict-search-form {
    margin: 0;
}

.dict-search-input-wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.dict-search-input {
    width: 100%;
    min-height: 54px;
    background: #ffffff;
    border: 1px solid var(--dict-border-strong);
    border-radius: 6px;
    color: var(--dict-ink);
    font: 650 1.05rem/1.2 var(--dict-font);
    letter-spacing: 0;
    padding: 0 16px;
}

.dict-search-input:focus {
    border-color: var(--dict-primary);
    box-shadow: 0 0 0 4px var(--dict-focus);
    outline: none;
}

.dict-search-input::placeholder {
    color: var(--dict-faint);
}

.dict-search-button {
    min-width: 54px;
    min-height: 54px;
    padding-inline: 17px;
}

.dict-search-hint {
    color: var(--dict-muted);
    font-size: 0.9rem;
    margin: 11px 0 0;
}

.dict-band {
    padding: 34px 0;
}



.dict-section-header {
    align-items: end;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 0;
}

.dict-section-header h2,
.dict-panel h2,
.dict-panel h3 {
    color: var(--dict-ink);
    font-family: var(--dict-font);
    font-weight: 760;
    letter-spacing: -0.01em;
    line-height: 1.12;
    margin: 0;
}

.dict-section-header p {
    color: var(--dict-muted);
    margin: 6px 0 0;
}

.dict-letter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
    gap: 8px;
}

/* Sub-anchor quick-nav on letter pages (2-char prefixes) */
.dict-az-nav {
    gap: 6px 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--dict-border);
    margin-bottom: 16px;
}

.dict-az-nav .uk-button {
    min-width: 42px;
    font-family: var(--dict-mono);
    font-size: 0.78rem;
    letter-spacing: 0.04em;
}

.dict-subnav {
    gap: 4px 6px;
}

.dict-group-heading {
    font-family: var(--dict-mono);
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    color: var(--dict-muted);
    text-transform: uppercase;
    margin: 18px 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--dict-border);
}

.dict-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.42fr);
    gap: 18px;
}

.dict-panel {
    padding: clamp(20px, 3vw, 28px);
}

.dict-copy p {
    color: var(--dict-muted);
    margin: 12px 0 0;
}

.dict-stats {
    display: grid;
    gap: 12px;
}

.dict-stat {
    border-top: 1px solid var(--dict-border);
    padding-top: 14px;
}

.dict-stat:first-child {
    border-top: 0;
    padding-top: 0;
}

.dict-stat strong {
    color: var(--dict-primary-dark);
    display: block;
    font-family: var(--dict-mono);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1;
}

.dict-stat span {
    color: var(--dict-muted);
    display: block;
    font-size: 0.9rem;
    margin-top: 4px;
}

.dict-feature-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border: 1px solid var(--dict-border);
    border-radius: 6px;
    overflow: hidden;
}

.dict-feature {
    background: #ffffff;
    padding: 22px 22px 20px;
}

.dict-feature + .dict-feature {
    border-left: 1px solid var(--dict-border);
}

.dict-feature::before {
    content: '';
    display: block;
    width: 24px;
    height: 3px;
    background: var(--dict-primary);
    border-radius: 2px;
    margin-bottom: 14px;
}

.dict-feature h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 7px;
}

.dict-feature p {
    color: var(--dict-muted);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}

.dict-page-head {
    border-bottom: 1px solid var(--dict-border);
    padding: 36px 0 28px;
}

.dict-page-head .uk-breadcrumb {
    margin-bottom: 20px;
}

.dict-page-head h1 {
    font-size: clamp(2rem, 5vw, 3.6rem);
}

.dict-page-search {
    margin-top: 24px;
    max-width: 760px;
}

.dict-toolbar {
    align-items: center;
    color: var(--dict-muted);
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
    font-family: var(--dict-mono);
    font-size: 0.78rem;
}

.dict-toolbar strong {
    color: var(--dict-ink);
}

.dict-list {
    background: #ffffff;
    border: 1px solid var(--dict-border);
    border-radius: 6px;
    overflow: hidden;
}

.dict-word-row {
    color: var(--dict-ink) !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 16px 18px;
    text-decoration: none !important;
}

.dict-word-row + .dict-word-row {
    border-top: 1px solid var(--dict-border);
}

.dict-word-row:hover {
    background: var(--dict-primary-wash);
}

.dict-word {
    color: var(--dict-ink);
    font-family: var(--dict-serif);
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.dict-word-sub {
    color: var(--dict-muted);
    display: block;
    font-family: var(--dict-font);
    font-size: 0.82rem;
    margin-top: 3px;
}

.dict-row-meta {
    align-items: center;
    color: var(--dict-faint);
    display: flex;
    gap: 8px;
    font-family: var(--dict-mono);
    font-size: 0.75rem;
    white-space: nowrap;
}

.dict-row-index {
    color: var(--dict-faint);
    font-variant-numeric: tabular-nums;
}

.dict-empty {
    padding: clamp(34px, 6vw, 64px);
    text-align: center;
}

.dict-empty h2 {
    font-size: 1.55rem;
    margin-bottom: 8px;
}

.dict-empty p {
    color: var(--dict-muted);
    margin: 0 auto 20px;
    max-width: 520px;
}

.dict-letter-rail {
    background: #ffffff;
    border: 1px solid var(--dict-border);
    border-radius: 6px;
    padding: 14px;
    position: sticky;
    top: 68px;
}

.dict-letter-layout {
    display: grid;
    grid-template-columns: minmax(190px, 0.28fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.dict-letter-rail .dict-letter-grid {
    grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
}

.dict-letter-rail h2 {
    color: var(--dict-muted);
    font-family: var(--dict-mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
    text-transform: uppercase;
}

/* Entry page TOC nav in sidebar */
.dict-entry-toc {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dict-entry-toc a {
    border-radius: 4px;
    color: var(--dict-muted) !important;
    font-size: 0.88rem;
    padding: 5px 8px;
    text-decoration: none !important;
    transition: background 0.1s ease, color 0.1s ease;
}

.dict-entry-toc a:hover {
    background: var(--dict-primary-soft);
    color: var(--dict-primary-dark) !important;
}

/* Sections inside the right column of word detail */
.dict-entry-content > section + section,
.dict-entry-content > .uk-margin-top {
    margin-top: 24px;
}

.dict-entry-head {
    background: var(--dict-panel);
    border-bottom: 1px solid var(--dict-border);
    padding: 30px 0 24px;
}

.dict-entry-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
    align-items: start;
}

.dict-entry-title {
    font-family: var(--dict-serif);
    font-size: clamp(2.2rem, 7vw, 4.2rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.0;
}

.dict-entry-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.dict-entry-tags .uk-label {
    white-space: normal;
    word-break: break-word;
}

.dict-definition-list {
    display: grid;
    gap: 14px;
}

.dict-definition {
    background: #ffffff;
    border: 1px solid var(--dict-border);
    border-left: 3px solid var(--dict-primary);
    border-radius: 6px;
    padding: 17px 20px;
}

.dict-definition h3 {
    align-items: center;
    display: flex;
    gap: 10px;
    font-family: var(--dict-serif);
    font-size: 1.12rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.dict-definition-body {
    color: var(--dict-ink);
    font-family: var(--dict-serif);
    font-size: 1.06rem;
    line-height: 1.74;
}

.dict-definition-body p {
    margin: 0 0 12px;
}

.dict-runic {
    background: var(--dict-primary-dark);
    border-color: #0d423a;
    color: #ffffff;
}

.dict-runic h2,
.dict-runic p {
    color: #ffffff;
}

.dict-runic .dict-eyebrow {
    color: rgba(255, 255, 255, 0.76);
}

.dict-runic .runic-text {
    color: #ffffff;
    font-size: clamp(2rem, 8vw, 3.4rem);
    text-shadow: none;
    transform: none;
}

.dict-runic .runic-text:hover {
    transform: none;
    text-shadow: none;
}

.dict-abbr-list dt {
    color: var(--dict-primary-dark);
    font-family: var(--dict-mono);
    font-size: 0.88rem;
    font-weight: 800;
}

.dict-abbr-list dd {
    color: var(--dict-muted);
}

.dict-entry-nav-wrap {
    margin: 0 auto;
    width: 100%;
}

.dict-source-list {
    columns: 2 300px;
    column-gap: 34px;
}

.dict-source-list dt {
    break-after: avoid;
    color: var(--dict-primary-dark);
    font-family: var(--dict-mono);
    font-size: 0.88rem;
    font-weight: 800;
}

.dict-source-list dd {
    break-inside: avoid;
    color: var(--dict-muted);
    margin-bottom: 16px;
}

.dict-footer {
    background: #ffffff;
    border-top: 1px solid var(--dict-border);
    padding: 32px 0 22px;
}

.dict-footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 0.35fr) minmax(280px, 0.45fr);
    gap: 28px;
}

.dict-footer h4 {
    color: var(--dict-ink);
    font-family: var(--dict-mono);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.dict-footer p,
.dict-footer li,
.dict-footer small {
    color: var(--dict-muted);
}

.dict-footer ul {
    margin: 0;
}

.dict-footer-letter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
    gap: 6px;
}

.dict-footer-bottom {
    border-top: 1px solid var(--dict-border);
    margin-top: 28px;
    padding-top: 18px;
}

.dict-static-nav {
    border-bottom: 1px solid var(--dict-border);
    padding: 16px 0;
}

.dict-static-nav a {
    color: var(--dict-ink);
    font-weight: 800;
    text-decoration: none;
}

.dict-static-page {
    width: min(820px, calc(100vw - 40px));
    margin: 0 auto;
    padding: 44px 0 70px;
}

.dict-static-page h1 {
    color: var(--dict-ink);
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1;
    margin: 0 0 28px;
}

.dict-static-page h2 {
    border-top: 1px solid var(--dict-border);
    color: var(--dict-ink);
    font-size: 1.2rem;
    margin: 30px 0 10px;
    padding-top: 20px;
}

.dict-static-page p,
.dict-static-page li {
    color: var(--dict-muted);
}

.dict-static-page .back-link {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--dict-border);
    border-radius: 6px;
    color: var(--dict-ink);
    font-weight: 750;
    min-height: 40px;
    margin-top: 30px;
    padding: 0 14px;
    text-decoration: none;
}

#modal-loading .uk-modal-dialog {
    background: var(--dict-primary) !important;
    color: #ffffff !important;
}

#modal-loading p,
#modal-loading [uk-spinner] {
    color: #ffffff !important;
    font-family: var(--dict-font) !important;
}

@media (max-width: 960px) {
    .dict-hero-grid,
    .dict-content-grid,
    .dict-letter-layout,
    .dict-entry-top,
    .dict-footer-grid {
        grid-template-columns: 1fr;
    }

    .dict-letter-rail {
        position: static;
    }

    .dict-feature-list {
        grid-template-columns: 1fr;
    }

    .dict-feature + .dict-feature {
        border-left: 0;
        border-top: 1px solid var(--dict-border);
    }
}

@media (max-width: 640px) {
    .dict-shell,
    .dict-shell-narrow,
    .dict-nav-inner,
    .dict-static-page {
        width: min(100vw - 28px, 100%);
    }

    .dict-hero,
    .dict-hero-home {
        padding: 34px 0 30px;
    }

    .dict-search-input-wrap {
        grid-template-columns: 1fr;
    }

    .dict-search-button {
        width: 100%;
    }

    .dict-section-header,
    .dict-toolbar {
        align-items: start;
        flex-direction: column;
    }

    .dict-word-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 15px;
    }

    .dict-row-meta {
        justify-content: space-between;
        white-space: normal;
    }

    .dict-entry-nav-wrap {
        max-width: 100%;
    }

    .dict-entry-top > a.uk-button {
        white-space: normal;
        width: 100%;
        text-align: center;
    }

    .dict-footer-letter-grid {
        grid-template-columns: repeat(auto-fill, minmax(38px, 1fr));
    }
}
