/* glossary.css — 용어 밑줄(.gl-term)·📖 칩(.gl-chip)·설명 카드(.gl-card). templates/_glossary.html 이 싣는다.
 * 색은 전부 tokens.css. 밑줄은 글자색을 바꾸지 않는 점선 — 시세 숫자·제목 색(등락·상태색)을 그대로 두고, 읽는 흐름을 끊지 않게.
 * 배포 순서: 이 파일은 merge 순간 살아나지만 클래스는 새 마크업에만 있어(.gl-*) 옛 페이지에 영향이 없다. */

/* ---- 밑줄 단어 — 버튼이지만 글자처럼 보인다 ---- */
.gl-term {
    font: inherit; color: inherit; letter-spacing: inherit; text-align: inherit;
    background: none; border: 0; padding: 0; margin: 0;
    display: inline; cursor: pointer;
    text-decoration: underline dotted var(--text-muted);
    text-decoration-thickness: 1px; text-underline-offset: 3px;
    border-radius: 2px;
}
.gl-term:hover { text-decoration-color: var(--accent-text); text-decoration-style: solid; }
.gl-term[aria-expanded="true"] { background: var(--accent-soft); }

/* ---- 📖 칩 — 줄 자체가 버튼이라 밑줄을 넣을 수 없는 곳(다가오는 일정의 행) ---- */
.gl-chip {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; margin-left: 4px; padding: 0;
    border-radius: 6px; border: 0; background: transparent;
    font-size: 13px; line-height: 1; cursor: pointer; vertical-align: middle;
    opacity: .6;
}
.gl-chip:hover { background: var(--bg-hover); opacity: 1; }
.gl-chip-host { display: flex; align-items: center; gap: 2px; }
.gl-chip-host > :first-child { flex: 1; min-width: 0; }

/* ---- 카드 ---- */
.gl-card[hidden], .gl-scrim[hidden] { display: none; }
.gl-scrim { position: fixed; inset: 0; z-index: 800; background: var(--scrim); }
.gl-card {
    position: absolute; z-index: 810;
    width: min(360px, calc(100vw - 16px)); max-height: min(70vh, 560px); overflow-y: auto;
    padding: 14px 16px 12px;
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow);
    font-size: 14px; line-height: 1.6; text-align: left; word-break: keep-all; overflow-wrap: anywhere;
    outline: none;
}
.gl-card-head { display: flex; align-items: flex-start; gap: 8px; }
.gl-card-tt { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.gl-card-title { margin: 0; font-size: 16px; line-height: 1.4; color: var(--text-strong); }
.gl-cat {
    padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap;
    background: var(--bg-inset); color: var(--text-secondary);
}
.gl-x {
    flex: none; width: 32px; height: 32px; margin: -4px -6px 0 0; border-radius: 6px; cursor: pointer;
    background: transparent; border: 0; color: var(--text-secondary); font-size: 14px; line-height: 1;
}
.gl-x:hover { background: var(--bg-hover); color: var(--text-primary); }
.gl-short { margin: 8px 0 0; color: var(--text-primary); }
.gl-sec { margin-top: 10px; }
.gl-sec h3, .gl-react h3 { margin: 0 0 2px; font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.gl-sec p { margin: 0; color: var(--text-primary); font-size: 13px; }
.gl-react { margin-top: 10px; padding: 8px 10px; border-radius: var(--radius); background: var(--bg-inset); }
.gl-react p { margin: 0; font-size: 12.5px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.gl-react p + p { margin-top: 2px; }
.gl-react .gl-note { margin-top: 4px; font-size: 11px; color: var(--text-muted); }
.gl-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
    margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-soft);
}
.gl-more { font-size: 13px; font-weight: 600; color: var(--accent-text); text-decoration: none; }
.gl-more:hover { text-decoration: underline; }
.gl-save {
    min-height: 32px; padding: 4px 12px; border-radius: 6px; cursor: pointer;
    background: var(--bg-inset); color: var(--text-primary); border: 1px solid var(--border);
    font-size: 12.5px; font-weight: 600;
}
.gl-save:hover { background: var(--bg-hover); }
.gl-save[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent); }
.gl-save:disabled { opacity: .6; cursor: default; }
.gl-login { font-size: 12px; color: var(--text-secondary); }
.gl-status { margin: 6px 0 0; font-size: 12px; color: var(--warn); }
.gl-status:empty { display: none; }

/* ---- 폰: 화면 아래 시트 ---- */
body.gl-lock { overflow: hidden; }
.gl-card.gl-sheet {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto !important; left: 0 !important;
    width: 100%; max-height: 82vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0; border-bottom: 0;
    padding: 16px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    font-size: 15px;
}
.gl-card.gl-sheet .gl-sec p { font-size: 14px; }
.gl-card.gl-sheet .gl-x { width: 40px; height: 40px; }
