  :root {
    --bg-main:    #eeeeee;
    --bg-card:    #efefef;
    --bg-hover:   #e0e0e0;
    --border:     #bebebe;
    --border-dark:#a0a0a0;
    --text-dark:  #111111;
    --text-mid:   #444444;
    --text-light: #777777;
    --accent:     #1a1a1a;
    --copy-flash: #222222;
    --shadow:     rgba(0,0,0,0.08);
    --shadow-deep:rgba(0,0,0,0.15);
  }
 
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
 
  html { scroll-behavior: smooth; }
 
  body {
    background: var(--bg-main);
    color: var(--text-dark);
    font-family: 'Noto Sans TC', 'Zen Kaku Gothic New', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
  }
 
  body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.025'/%3E%3C/svg%3E");
    opacity: 0.4;
  }
 
  header {
    position: relative; z-index: 10;
    background: var(--bg-card);
    border-bottom: 2px solid var(--border);
    padding: 0 2rem;
  }
 
  .header-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.2rem 0;
    gap: 1rem;
  }
 
  .logo {
    display: flex; align-items: baseline; gap: 0.5rem;
    text-decoration: none; color: inherit;
  }
  .logo-kanji {
    font-size: 2rem; font-weight: 900; letter-spacing: -0.04em;
    line-height: 1;
  }
  .logo-sub {
    font-size: 0.72rem; color: var(--text-light); letter-spacing: 0.12em;
    text-transform: uppercase; font-weight: 400;
  }
 
  .header-stats {
    display: flex; gap: 1.5rem; align-items: center;
  }
  .stat-item {
    text-align: center;
    border-left: 1px solid var(--border);
    padding-left: 1.5rem;
  }
  .stat-num { font-size: 1.4rem; font-weight: 900; line-height: 1; }
  .stat-lbl { font-size: 0.68rem; color: var(--text-light); letter-spacing: 0.08em; }
 
  .main-yanwenzi {
    position: relative; z-index: 10;
    padding: 4rem 2rem 3rem;
    text-align: center;
    max-width: 1200px; margin: 0 auto;
  }

.imagethumb {
    text-align: center;
}

.responsive-image {
    max-width: 1180px;
    width: 90%;
    margin: 10px;
    border: 1px solid #e0d0f0;
    box-shadow: 0 4px 20px rgba(47, 9, 68, .13);
    border-radius: clamp(8px, .7vw, 14px);
}
 
  .main-yanwenzi-title {
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 900; line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 1rem;
  }
  .main-yanwenzi-title .accent-line {
    display: block;
    color: var(--text-dark);
  }
  .main-yanwenzi-title .big-emo {
    font-size: clamp(1.5rem, 1.5vw, 4.5rem);
    color: var(--text-mid);
    font-weight: 400; letter-spacing: -0.01em;
    display: block;
    padding: 0.3rem 0;
    margin-top: 1rem;
    margin-bottom: 1.2rem;
  }
 
  .main-yanwenzi-desc {
    font-size: 1rem; color: var(--text-mid);
    max-width: 480px; margin: 0 auto 2.5rem;
    line-height: 1.7; font-weight: 300;
  }
 
  .search-wrap {
    max-width: 600px; margin: 0 auto 0;
    position: relative;
  }
  .search-wrap input {
    width: 100%;
    background: #fff;
    border: 2px solid var(--border-dark);
    border-radius: 4px;
    padding: 0.9rem 3.5rem 0.9rem 1.2rem;
    font-size: 1rem; color: var(--text-dark);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px var(--shadow);
  }
  .search-wrap input:focus {
    border-color: var(--text-dark);
    box-shadow: 0 4px 16px var(--shadow-deep);
  }
  .search-wrap input::placeholder { color: var(--text-light); }
  .search-icon {
    position: absolute; right: 1rem; top: 50%;
    transform: translateY(-50%);
    color: var(--text-light); font-size: 1.2rem; pointer-events: none;
  }
  .search-count {
    text-align: center; margin-top: 0.6rem;
    font-size: 0.78rem; color: var(--text-light);
    letter-spacing: 0.05em; min-height: 1.2em;
  }
 
  .section-divider {
    max-width: 1200px; margin: 2.5rem auto 0;
    padding: 0 2rem;
    display: flex; align-items: center; gap: 1rem;
  }
  .section-divider::before, .section-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
  }
  .divider-text {
    font-size: 0.7rem; letter-spacing: 0.2em;
    text-transform: uppercase; color: var(--text-light);
    white-space: nowrap;
  }
 
  .cat-scroll {
    position: sticky; top: 0; z-index: 20;
    background: #222222;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px var(--shadow);
  }
  .cat-inner {
    max-width: 1200px; margin: 0 auto;
    padding: 0 2rem;
    display: flex; gap: 0; overflow-x: auto;
    scrollbar-width: none;
  }
  .cat-inner::-webkit-scrollbar { display: none; }
 
  .cat-btn {
    background: none; border: none; cursor: pointer;
    padding: 0.85rem 1.2rem;
    font-family: inherit; font-size: 0.82rem;
    color: var(--text-light); font-weight: 500;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    letter-spacing: 0.02em;
  }
  .cat-btn:hover { color: var(--text-dark); }
  .cat-btn.active {
    color: #ffffff;
    border-bottom-color: var(--text-dark);
    font-weight: 700;
  }
 
  .main {
    max-width: 1200px; margin: 0 auto;
    padding: 2rem 2rem 4rem;
    position: relative; z-index: 10;
    padding-bottom: 1rem;
  }
 
  .cat-section {
    margin-bottom: 3rem;
    transition: opacity 0.2s;
  }
  .cat-section.hidden { display: none; }
 
  .cat-header {
    display: flex; align-items: baseline; gap: 0.8rem;
    margin-bottom: 1.2rem; padding-bottom: 0.6rem;
    border-bottom: 1.5px solid var(--border);
  }
  .cat-emoji-icon { font-size: 1.2rem; }
  .cat-name {
    font-size: 1.1rem; font-weight: 700; letter-spacing: -0.01em;
  }
  .cat-count {
    font-size: 0.75rem; color: var(--text-light);
    background: var(--border);
    padding: 0.15rem 0.5rem; border-radius: 20px;
    font-weight: 500;
  }
 
  .kaomoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.6rem;
  }
 
  .kmo-card {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 0.85rem 0.7rem 0.7rem;
    cursor: pointer;
    display: flex; flex-direction: column;
    align-items: center; gap: 0.4rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease,
                background 0.12s ease, border-color 0.12s ease;
    position: relative; overflow: hidden;
    user-select: none;
  }
  .kmo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--shadow-deep);
    background: #b2b2b2;
    border-color: var(--border-dark);
  }
  .kmo-card:active { transform: translateY(0); }
 
  .kmo-text {
    font-size: 1.15rem; line-height: 1.4;
    word-break: break-all; text-align: center;
    color: var(--text-dark); font-weight: 400;
  }
 
  .kmo-copy-hint {
    font-size: 0.62rem; letter-spacing: 0.1em;
    color: var(--text-light); text-transform: uppercase;
    font-weight: 500;
  }
 
  .kmo-card .copied-overlay {
    position: absolute; inset: 0;
    background: var(--copy-flash);
    display: flex; align-items: center; justify-content: center;
    color: #eeeeee; font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.1em;
    opacity: 0; pointer-events: none;
    border-radius: 5px;
    transition: opacity 0.15s;
  }
  .kmo-card.copied .copied-overlay { opacity: 1; }
 
  #toast {
    position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
    background: var(--text-dark); color: #eee;
    padding: 0.65rem 1.4rem; border-radius: 4px;
    font-size: 0.85rem; font-weight: 500; letter-spacing: 0.05em;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateX(-50%) translateY(8px);
    z-index: 9999; white-space: nowrap;
  }
  #toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
 
  .marquee-wrap {
    background: var(--border);
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
    overflow: hidden; padding: 0.7rem 0;
    margin: 2rem 0;
    margin-top: 0;
  }
  .marquee-track {
    display: flex; gap: 2.2rem;
    animation: marquee 30s linear infinite;
    width: max-content;
  }
  .marquee-track:hover { animation-play-state: paused; }
  .marquee-item {
    font-size: 1.1rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
  }
  .marquee-item:hover { opacity: 0.5; }
  @keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }
 
  .guide-section {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 8px; padding: 2.5rem 2rem;
    margin-bottom: 2rem;
  }
  .guide-section h2 {
    font-size: 1.4rem; font-weight: 900;
    margin-bottom: 1.5rem; letter-spacing: -0.02em;
  }
  .guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }
  .guide-item {
    display: flex; gap: 0.8rem; align-items: flex-start;
  }
  .guide-num {
    width: 28px; height: 28px; flex-shrink: 0;
    background: var(--text-dark); color: #eee;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; font-size: 0.75rem; font-weight: 700;
  }
  .guide-text h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.2rem; }
  .guide-text p  { font-size: 0.8rem; color: var(--text-mid); line-height: 1.5; }
 
  footer {
    background: var(--bg-card);
    border-top: 2px solid var(--border);
    padding: 2.5rem 2rem;
    position: relative; z-index: 10;
  }
  .footer-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; flex-wrap: wrap; gap: 2rem;
    align-items: flex-start; justify-content: space-between;
  }
  .footer-logo {
    font-size: 1.5rem; font-weight: 900; letter-spacing: -0.04em;
  }
  .footer-logo span { display: block; font-size: 0.7rem; font-weight: 400;
    color: var(--text-light); letter-spacing: 0.12em; margin-top: 0.2rem; }
  .footer-links {
    display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem;
    font-size: 0.82rem; color: var(--text-mid);
  }
  .footer-links a { color: inherit; text-decoration: none; }
  .footer-links a:hover { color: var(--text-dark); }
  .footer-copy {
    font-size: 0.75rem; color: var(--text-light);
    width: 100%; border-top: 1px solid var(--border);
    padding-top: 1rem; margin-top: 1rem;
  }
 
  .no-results {
    text-align: center; padding: 4rem 2rem;
    color: var(--text-light); display: none;
  }
  .no-results .no-kmo { font-size: 3rem; margin-bottom: 0.8rem; }
  .no-results p { font-size: 0.95rem; }
 
  @media (max-width: 640px) {
    .header-stats { display: none; }
    .kaomoji-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
    .main-yanwenzi { padding: 2.5rem 1.2rem 2rem; }
    .main-yanwenzi-title { font-size: clamp(2.5rem, 12vw, 5rem); }
    .main { padding: 1.5rem 1.2rem 3rem; }
    .guide-grid { grid-template-columns: 1fr; }
  }

  .yanwenzi-section {
    background: var(--bg-main);
    padding: 0 2rem 4rem;
    position: relative; z-index: 10;
  }
  .yanwenzi-inner-content {
    max-width: 1200px; margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }
  .yanwenzi-article {
    background: #ffffff;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: 2rem 1.8rem;
  }
  .yanwenzi-article.yanwenzi-full { grid-column: 1 / -1; }
  .yanwenzi-article h2 {
    font-size: 1.2rem; font-weight: 900;
    letter-spacing: -0.02em; margin-bottom: 1rem;
    padding-bottom: 0.6rem; border-bottom: 1.5px solid var(--border);
  }
  .yanwenzi-article p {
    font-size: 0.88rem; line-height: 1.8;
    color: var(--text-mid); margin-bottom: 0.8rem;
  }
  .yanwenzi-article p:last-child { margin-bottom: 0; }
  .yanwenzi-article strong { color: var(--text-dark); }
 
  .compare-table { font-size: 0.82rem; }
  .cmp-row {
    display: grid; grid-template-columns: 1.2fr 1fr 1fr;
    gap: 0.4rem; padding: 0.45rem 0;
    border-bottom: 1px solid var(--border); align-items: center;
  }
  .cmp-row:last-child { border-bottom: none; }
  .cmp-head { font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; color: var(--text-light); }
  .cmp-row div:first-child { color: var(--text-mid); }
  .cmp-row div:not(:first-child) { color: var(--text-dark); font-weight: 500; }
 
  .yanwenzi-cat-list {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem; margin-top: 1rem;
  }
  .yanwenzi-cat-item {
    background: var(--bg-main); border: 1px solid var(--border);
    border-radius: 6px; padding: 0.9rem 1rem;
  }
  .yanwenzi-cat-item strong { display: block; margin-bottom: 0.3rem; font-size: 0.88rem; }
  .yanwenzi-cat-item p { font-size: 0.8rem; margin: 0; color: var(--text-mid); }
 
  .kmo-inline {
    display: inline-block; background: #fff; border: 1px solid var(--border);
    border-radius: 4px; padding: 0.05rem 0.4rem;
    font-size: 0.92rem; color: var(--text-dark);
    cursor: pointer; transition: background 0.15s;
  }
  .kmo-inline:hover { background: var(--bg-hover); }
  .kmo-inline.lg { font-size: 1.1rem; }
 
  .yanwenzi-list { padding-left: 1.2rem; margin-top: 0.6rem; }
  .yanwenzi-list li { font-size: 0.87rem; color: var(--text-mid); line-height: 1.7; margin-bottom: 0.3rem; }
  .yanwenzi-list li strong { color: var(--text-dark); }
 
  .faq-list { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.5rem; }
  .faq-item { background: var(--bg-main); border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
  .faq-item summary {
    padding: 0.75rem 1rem; font-size: 0.87rem; font-weight: 600;
    cursor: pointer; list-style: none;
    display: flex; justify-content: space-between; align-items: center; color: var(--text-dark);
  }
  .faq-item summary::-webkit-details-marker { display: none; }
  .faq-item summary::after { content: '+'; font-size: 1.1rem; color: var(--text-light); }
  .faq-item[open] summary::after { content: '−'; }
  .faq-item p { padding: 0 1rem 0.85rem; font-size: 0.83rem; color: var(--text-mid); line-height: 1.7; margin: 0; }
 
  .trending-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.8rem; margin: 1rem 0;
  }
  .trending-item {
    background: var(--bg-main); border: 1px solid var(--border);
    border-radius: 6px; padding: 0.9rem 0.8rem;
    display: flex; flex-direction: column; align-items: center; gap: 0.4rem; text-align: center;
  }
  .trending-item span:last-child { font-size: 0.75rem; color: var(--text-light); letter-spacing: 0.03em; }
 
  .tag-cloud { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }
  .tag-cloud span {
    background: var(--bg-main); border: 1px solid var(--border-dark);
    border-radius: 3px; padding: 0.25rem 0.65rem;
    font-size: 0.77rem; color: var(--text-mid); letter-spacing: 0.03em;
  }
 
  .yanwenzi-outro { background: var(--text-dark); border-color: var(--text-dark); }
  .yanwenzi-outro h2 { color: #eee; border-bottom-color: #444; }
  .yanwenzi-outro p  { color: #aaa; }
  .yanwenzi-outro p strong { color: #eee; }
  .yanwenzi-outro .tag-cloud span { background: #222; border-color: #444; color: #999; }
 
  @media (max-width: 768px) {
    .yanwenzi-inner-content { grid-template-columns: 1fr; }
    .yanwenzi-article.yanwenzi-full { grid-column: 1; }
    .yanwenzi-cat-list { grid-template-columns: 1fr; }
    .trending-grid { grid-template-columns: repeat(3, 1fr); }
  }
  @media (max-width: 480px) {
    .yanwenzi-section { padding: 0 1.2rem 3rem; }
    .trending-grid { grid-template-columns: repeat(2, 1fr); }
  }
 
  .kmo-card {
    animation: cardIn 0.3s ease both;
  }
  @keyframes cardIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 12px;
    color: #1a1a2e;
    padding-bottom: 8px;
    border-bottom: 3px solid #f0e6f6;
    line-height: 1.4;
}

h2 .emoji-badge {
    font-size: 1.3rem;
    margin-right: 6px;
}

h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 28px;
    margin-bottom: 8px;
    color: #2d2d4a;
}

p {
    margin-bottom: 16px;
    color: #2d2d4a;
}

a {
    color: #e85d7a;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: #c94a67;
    text-decoration: underline;
}

strong {
    color: #1a1a2e;
    font-weight: 700;
}

em {
    color: #6b6b8a;
    font-style: italic;
}

blockquote {
    margin: 20px 0;
    padding: 16px 24px;
    background: #f8f5fc;
    border-left: 4px solid #d4b8e0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #3d3d5c;
}

blockquote p {
    margin-bottom: 0;
}

/* ===== LISTS ===== */
ul,
ol {
    margin: 12px 0 20px 24px;
    color: #2d2d4a;
}

li {
    margin-bottom: 8px;
}

ul ul,
ol ol {
    margin-top: 4px;
    margin-bottom: 4px;
}

/* ===== TABLES ===== */
.table-wrap {
    overflow-x: auto;
    margin: 16px 0 24px;
    border-radius: 14px;
    border: 1px solid #eeeaf2;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    min-width: 500px;
    background: #ffffff;
}

table thead {
    background: #f5f0fa;
}

table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    color: #1a1a2e;
    border-bottom: 2px solid #e0d6ea;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

table td {
    padding: 11px 16px;
    border-bottom: 1px solid #eeeaf2;
    color: #2d2d4a;
    vertical-align: middle;
}

table tbody tr:hover {
    background: #faf7fd;
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* ===== SPECIAL TABLE STYLES ===== */
table .face-cell {
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

table .mood-tag {
    display: inline-block;
    background: #f0e6f6;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b3f7a;
}

/* ===== CHECKMARK ===== */
.check {
    color: #4caf50;
    font-weight: 700;
}

/* ===== COMPARISON TABLE ===== */
.compare-table td:first-child {
    font-weight: 500;
    color: #6b6b8a;
}

.compare-table td:last-child {
    font-weight: 600;
    color: #1a1a2e;
}

/* ===== QUICK REFERENCE TABLE ===== */
.ref-table td:first-child {
    font-weight: 600;
    color: #6b3f7a;
    background: #faf7fd;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    h2 {
        font-size: 1.3rem;
        margin-top: 32px;
    }

    h3 {
        font-size: 1.05rem;
    }

    table {
        font-size: 0.85rem;
        min-width: 380px;
    }

    table th,
    table td {
        padding: 8px 12px;
    }

    .subtitle {
        font-size: 1rem;
        padding: 10px 14px;
    }

    blockquote {
        padding: 14px 18px;
        margin: 16px 0;
    }

    ul,
    ol {
        margin-left: 18px;
    }

    .table-wrap {
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 1.1rem;
        margin-top: 26px;
    }

    table {
        font-size: 0.78rem;
        min-width: 300px;
    }

    table th,
    table td {
        padding: 6px 10px;
    }

    .subtitle {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    blockquote {
        padding: 12px 14px;
        font-size: 0.95rem;
    }

    ul,
    ol {
        margin-left: 16px;
        font-size: 0.95rem;
    }
}

/* ===== PRINT ===== */
@media print {
    table tbody tr:hover {
        background: transparent;
    }

    .table-wrap {
        border: 1px solid #ddd;
    }
}

/* ===== ANIMATION (optional subtle touch) ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}