/* 技術AI の答えのふりがなと、選んだ語の訳 (課題 tab-20261128-d9cd4c97)。js/tech-reading.js が使う。 */
.tech-ai-md ruby { ruby-position: over; }
.tech-ai-md rt {
    font-size: .58em;
    color: #475569;
    font-weight: 400;
    /* ふりがなの字は選ぶ字・写す字に入れない (訳に送らない) */
    user-select: none;
    -webkit-user-select: none;
}
.tech-ai-md.tr-ruby p,
.tech-ai-md.tr-ruby li { line-height: 2.25; }
.tech-ai-md.tr-ruby h4,
.tech-ai-md.tr-ruby h5 { line-height: 1.9; }

.tr-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin: 4px 0 8px;
    font-size: .88rem;
    color: #334155;
}
.tr-bar-label { font-weight: 700; }
.tr-mode {
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1f2937;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: .88rem;
    min-height: 32px;
    cursor: pointer;
}
.tr-mode[aria-pressed="true"] { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }
.tr-mode:focus-visible, .tr-btn:focus-visible, .tr-pop button:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }
.tr-hint { flex-basis: 100%; font-size: .78rem; color: #64748b; }
@media (hover: hover) and (pointer: fine) { .tr-hint { display: none; } }

.tr-btn {
    position: absolute;
    z-index: 2000;
    background: #0f766e;
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 15px;
    font-weight: 700;
    min-height: 40px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    cursor: pointer;
}
.tr-btn[hidden] { display: none; }

.tr-pop {
    position: absolute;
    z-index: 2001;
    width: min(360px, calc(100vw - 16px));
    box-sizing: border-box;
    background: #fff;
    color: #0f172a;
    border: 2px solid #0f766e;
    border-radius: 12px;
    padding: 10px 12px 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    font-size: 15px;
    overflow-wrap: anywhere;
}
.tr-src { font-weight: 700; padding-right: 28px; }
.tr-tabs { display: flex; gap: 6px; margin: 8px 0 6px; }
.tr-tabs button {
    flex: 1;
    min-height: 36px;
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    color: #0f172a;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
}
.tr-tabs button[aria-pressed="true"] { background: #0f766e; color: #fff; border-color: #0f766e; }
.tr-out { font-size: 18px; line-height: 1.7; min-height: 1.7em; }
.tr-out.tr-error { font-size: 15px; color: #b91c1c; }
.tr-note { font-size: 12px; color: #475569; margin-top: 6px; }
.tr-privacy { font-size: 12px; color: #64748b; margin-top: 4px; }
.tr-x {
    position: absolute;
    right: 6px;
    top: 4px;
    border: 0;
    background: none;
    font-size: 22px;
    line-height: 1;
    padding: 4px 8px;
    color: #64748b;
    cursor: pointer;
}
