/* ================================================
   itako-dict-entry.css
   Restyles the single dictionary entry article to
   match the site's visual language (white surface,
   --wood-orange accents, --line-gray hairlines,
   orange-tinted pills like the alphabet/hiragana nav).

   Scoped to the .dict-main column — the page scaffold
   (header, breadcrumb, sidebars, hiragana index) is
   untouched. Loaded after dict-style.css; enqueued on
   is_singular('dictionary').
   ================================================ */

/* ── Entry wrapper (flat — flows in the .dict-main column) ── */
.itako-entry-card {
    background: transparent;
    padding: 0 20px;
}

/* ── Headword zone ────────────────────────────── */
.itako-entry-header {
    padding: 24px 0 18px;
    border-bottom: 2px solid #f0e6d8;
}
.itako-entry-header__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}
.itako-entry-headword {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    color: var(--ink, #2a1e1a);
    line-height: 1.15;
    word-break: break-word;
}
/* Classification code chip (matches dict-style .code-tag) */
.itako-entry-code {
    flex: none;
    font-family: var(--mono, Consolas, monospace);
    font-size: 11px;
    color: #607078;
    background: #eceff1;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    padding: 3px 9px;
    white-space: nowrap;
}
/* Classical Mongol script (Mongol bichig) under the headword */
.itako-entry-classic {
    margin: 6px 0 0;
    font-size: 1.15rem;
    color: #6a5a52;
    font-family: "Noto Serif Mongolian", "Mongolian Baiti", var(--serif);
}

/* Part-of-speech / domain pills */
.itako-entry-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.itako-entry-pos,
.itako-entry-domain {
    font-size: 12px;
    font-weight: 600;
    border-radius: 999px;
    padding: 4px 13px;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition-smooth, all .2s ease);
}
.itako-entry-pos {
    color: #b45f00;
    background: rgba(224, 122, 0, .09);
    border: 1px solid rgba(224, 122, 0, .24);
}
.itako-entry-pos:hover {
    background: var(--wood-orange, #e07a00);
    color: #fff;
}
.itako-entry-domain {
    color: #5a5048;
    background: rgba(90, 73, 67, .07);
    border: 1px solid rgba(90, 73, 67, .18);
}
.itako-entry-domain:hover {
    background: rgba(90, 73, 67, .15);
    color: #2a1e1a;
}

/* ── Definition rows ──────────────────────────── */
.itako-entry-defs {
    padding: 6px 0 10px;
}
.itako-entry-row {
    display: grid;
    grid-template-columns: 84px 1fr;
    align-items: baseline;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid #f1ece3;
}
.itako-entry-defs .itako-entry-row:last-child { border-bottom: none; }

.itako-entry-row__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--wood-orange, #e07a00);
}
.itako-entry-row__value { min-width: 0; }

/* Japanese (hero) */
.itako-entry-jp-main {
    font-size: 20px;
    font-weight: 700;
    color: #1e1410;
    line-height: 1.3;
}
.itako-entry-jp-main rt {
    font-size: 11px;
    font-weight: 400;
    color: #9a8878;
}

/* English */
.itako-entry-en {
    font-size: 19px;
    font-style: italic;
    color: #3a2a20;
    line-height: 1.4;
}

/* Generic text value (notes, origin detail, feature, additional content) */
.itako-entry-text {
    font-size: 15px;
    color: #5a5048;
    line-height: 1.7;
}
.itako-entry-text p:first-child { margin-top: 0; }
.itako-entry-text p:last-child  { margin-bottom: 0; }

/* Inline taxonomy term links inside a value cell (origin, register) */
.itako-entry-termlink {
    font-size: 14px;
    font-weight: 600;
    color: #5a3820;
    text-decoration: none;
    border-bottom: 1px dotted #c9b79c;
    transition: var(--transition-smooth, all .2s ease);
}
.itako-entry-termlink:hover { color: var(--wood-orange, #e07a00); border-bottom-color: var(--wood-orange, #e07a00); }

/* ── Footer: related categories ───────────────── */
.itako-entry-footer {
    padding: 16px 0 22px;
    border-top: 1px dashed #e8ddcf;
}
.itako-entry-footer__label {
    font-size: 12px;
    font-weight: 600;
    color: #8a7a6a;
    margin: 0 0 11px;
}
.itako-entry-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.itako-entry-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #3b2411;
    text-decoration: none;
    background: #fffaf0;
    border: 1px solid var(--line-gray, #e0e0e0);
    border-radius: 8px;
    padding: 8px 15px;
    transition: var(--transition-smooth, all .2s ease);
}
.itako-entry-chip--topic    { border-left: 3px solid var(--wood-orange, #e07a00); }
.itako-entry-chip--category { border-left: 3px solid #5a4943; }
.itako-entry-chip:hover {
    background: var(--wood-orange, #e07a00);
    border-color: var(--wood-orange, #e07a00);
    color: #fff;
    transform: translateY(-1px);
}
.itako-entry-chip__icon { font-size: 1.05em; line-height: 1; }

/* Infographic/glossary related links inherit the broad page category color. */
.itako-infographic-navigation--stem {
    --related-card-bg: #d4ead9;
    --related-card-text: #1a4d26;
    --related-card-border: #6aaa77;
}
.itako-infographic-navigation--humanities {
    --related-card-bg: #ede3d4;
    --related-card-text: #5c3d1a;
    --related-card-border: #b8956a;
}
.itako-infographic-navigation--society {
    --related-card-bg: #dddbd6;
    --related-card-text: #3d3b38;
    --related-card-border: #9b9890;
}
.itako-infographic-navigation--general {
    --related-card-bg: #dde4ef;
    --related-card-text: #2d3d5c;
    --related-card-border: #8fa0bc;
}
.itako-infographic-navigation .itako-entry-chip {
    background: var(--related-card-bg, #fffaf0);
    color: var(--related-card-text, #3b2411);
    border-color: var(--related-card-border, #e0e0e0);
    border-left: 4px solid var(--related-card-border, #e07a00);
}
.itako-infographic-navigation .itako-entry-chip:hover {
    background: #fffdf9;
    border-color: var(--related-card-border, #d4c8b8);
    color: var(--related-card-text, #3b2411);
    box-shadow: 0 5px 14px rgba(59, 36, 17, 0.08);
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 600px) {
    .itako-entry-header { padding: 18px 0 16px; }
    .itako-entry-headword { font-size: 25px; }
    .itako-entry-defs { padding: 4px 0 8px; }
    .itako-entry-row { grid-template-columns: 70px 1fr; gap: 10px; }
    .itako-entry-jp-main { font-size: 18px; }
    .itako-entry-en { font-size: 17px; }
    .itako-entry-footer { padding: 14px 0 20px; }
}
