/* 本文中の用語リンク＋吹き出し(簡易説明) — Figma 2831:2163 / 2831:2416 */
body a.gloss-term {
    color: inherit;
    text-decoration: underline dotted #272424;
    text-underline-offset: 6px;
    cursor: help;
}
body a.gloss-term:hover,
body a.gloss-term.is-open {
    color: inherit;
    background: #E7EAEF;
    text-decoration: none;
}

.gloss-tip {
    position: absolute;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 340px;
    max-width: calc(100vw - 32px);
    box-sizing: border-box;
    padding: 18px 26px 20px 28px;
    background: #E7EAEF;
    border-radius: 15px;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s;
}
.gloss-tip.is-show { opacity: 1; visibility: visible; }
/* 下向きの三角(位置はJSが --arrow-x で指定) */
.gloss-tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: var(--arrow-x, 104px);
    width: 44px;
    height: 33px;
    margin-left: -22px;
    background: #E7EAEF;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
/* 上に入らない時は下に出して三角を上向きに */
.gloss-tip.is-below::after {
    top: auto;
    bottom: 100%;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.gloss-tip-title {
    margin: 0;
    color: #9D0000;
    font-size: 18px;
    font-weight: 700;
    line-height: 25px;
    letter-spacing: 1.8px;
}
.gloss-tip-desc {
    margin: 4px 0 0;
    color: #141415;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: 1.6px;
}

@media (max-width: 767px) {
    body a.gloss-term { text-underline-offset: 5px; }
    .gloss-tip { width: 280px; padding: 12px 16px 14px; border-radius: 10px; }
    .gloss-tip::after { width: 30px; height: 22px; margin-left: -15px; }
    .gloss-tip-title { font-size: 15px; line-height: 22px; letter-spacing: 1.5px; }
    .gloss-tip-desc { margin-top: 2px; font-size: 13px; line-height: 20px; letter-spacing: 1.3px; }
}
