/* 개념: 왼쪽 목록 + 오른쪽 상세. 좁은 화면에서는 한쪽만 보임 */
.progress-strip { display: flex; height: 6px; border-radius: 3px; overflow: hidden; gap: 2px; margin: -8px 0 18px; background: var(--rule-2); }
.progress-strip span { min-width: 0; }
.ps-new { background: var(--rule); } .ps-shaky { background: var(--warn-dot); } .ps-known { background: var(--accent); } .ps-explain { background: var(--ok); }

.cx { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 16px; align-items: start; }
.cx-list { padding: 14px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + var(--header-h) + 14px); max-height: calc(100vh - var(--header-h) - 40px); display: flex; flex-direction: column; gap: 10px; }
.cx-items { display: flex; flex-direction: column; margin: 0 -6px; overflow: auto; min-height: 0; padding: 2px; }
.cx-item { display: grid; grid-template-columns: 12px minmax(0, 1fr); column-gap: 10px; align-items: center; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 9px; transition: background var(--dur); }
.cx-item .sdot { grid-row: 1 / 3; }
.cx-item:hover { background: var(--sheet-2); }
.cx-item.on { background: var(--accent-soft); }
.cx-item.on .cx-ko { color: var(--accent-2); }
.cx-ko { font-weight: 600; font-size: var(--fs-base); letter-spacing: -.005em; }
.cx-sub { font-size: var(--fs-xs); letter-spacing: var(--ls-caption); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 이해 정도 표시: 모양으로도 구분(빈 원 · 반쪽 · 꽉 참 · 체크) */
.sdot { position: relative; display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; border: 1.5px solid var(--ink-3); background: transparent; }
.sdot.s-shaky { border-color: var(--warn-dot); background: linear-gradient(90deg, var(--warn-dot) 50%, transparent 50%); }
.sdot.s-known { border-color: var(--accent); background: var(--accent); }
.sdot.s-explain { border-color: var(--ok); background: var(--ok); }
.sdot.s-explain::after { content: ""; position: absolute; left: 2.5px; top: .5px; width: 2.5px; height: 5px; border: solid var(--sheet); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }

.cx-detail { position: relative; overflow: hidden; isolation: isolate; padding: 26px 30px; }
.cx-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.cx-title { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.cx-title h1 { font-family: var(--f-serif); font-size: var(--fs-3xl); line-height: 1.2; letter-spacing: var(--ls-display); }
.cx-meta { color: var(--ink-2); font-size: 15px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 2px; }
.cx-meta.center { justify-content: center; }
.cx-meta .dot { color: var(--ink-3); margin: 0 8px; }
.hanja { font-family: var(--f-serif); font-size: 1.06em; }
.cx-back { display: none; }
.status-seg button { gap: 7px; }
.auto-note { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--warn); }
.cx-sec { padding: 20px 0 4px; }
.cx-sec + .cx-sec { border-top: 1px solid var(--rule-2); margin-top: 16px; }
.cx-h { font-size: var(--fs-xs); color: var(--ink-3); letter-spacing: .05em; font-weight: 600; margin-bottom: 10px; display: flex; gap: 8px; align-items: baseline; }
.cx-def { font-family: var(--f-serif); font-size: var(--fs-read); line-height: 1.8; max-width: 38em; }
.cx-ex { margin-top: 14px; padding: 12px 16px; border-left: 3px solid var(--rule); font-family: var(--f-serif); font-size: var(--fs-md); line-height: 1.8; background: var(--sheet-2); border-radius: 0 var(--r) var(--r) 0; }
.cx-ex figcaption { font-family: var(--f-ui); font-size: 12px; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.cx-rels { display: flex; flex-wrap: wrap; gap: 6px; }
.rel { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--rule); background: var(--sheet); border-radius: 9px; padding: 5px 12px 5px 6px; font-size: 14px; color: var(--ink); text-decoration: none; transition: border-color var(--dur), background var(--dur); }
.rel:hover { border-color: var(--accent); background: var(--accent-soft); }
.rel-t { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: var(--rule-2); color: var(--ink-2); }
.rel-t.t-0 { background: var(--warn-soft); color: var(--warn); }
.rel-t.t-1 { background: var(--accent-soft); color: var(--accent-2); }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.form-row input.inp { width: 100%; }
.cx-notation summary { cursor: pointer; font-size: 13px; color: var(--ink-3); font-weight: 600; list-style: none; display: flex; align-items: center; gap: 6px; }
.cx-notation summary::before { content: "›"; display: inline-block; transition: transform var(--dur); font-size: 16px; }
.cx-notation[open] summary::before { transform: rotate(90deg); }
.cx-notation summary::-webkit-details-marker { display: none; }
.kv { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px 16px; margin-top: 12px; font-size: 14.5px; }
.kv dt { color: var(--ink-3); font-size: 13.5px; }
.cx-compact .status-seg { margin-top: 14px; }
.cx-compact .cx-sec:first-of-type { padding-top: 18px; }
.cx-compact .cx-def { font-size: 16px; }
.cx-compact #dxMemo { margin-bottom: 4px; }

/* 추가 · 수정 */
.cx-form { display: flex; flex-direction: column; gap: 16px; max-width: 820px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.cx-form input.inp, .cx-form select { width: 100%; }

/* 카드 복습 */
.flash { position: relative; max-width: 680px; margin: 0 auto 16px; text-align: center; padding: 44px 32px; border-radius: var(--r-xl); }
/* 카드 더미처럼 뒤에 두 장 */
.flash::before, .flash::after { content: ""; position: absolute; z-index: -1; left: 14px; right: 14px; bottom: -8px; height: 40px; border-radius: 0 0 var(--r-xl) var(--r-xl); background: var(--sheet); border: 1px solid var(--rule); box-shadow: var(--shadow-1); }
.flash::after { left: 30px; right: 30px; bottom: -16px; opacity: .6; z-index: -2; }
.flash-ko { font-family: var(--f-serif); font-weight: 700; font-size: 42px; letter-spacing: -.02em; margin: 14px 0 6px; }
.flash.flipped .flash-ko { font-size: 30px; }
.flash-back { text-align: left; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rule-2); animation: enter 220ms var(--ease) both; }
.flash-rate { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.flash-rate .btn { gap: 8px; }

@media (max-width: 860px) {
  .cx { grid-template-columns: minmax(0, 1fr); }
  .cx-list { position: static; max-height: none; }
  .cx-items { max-height: none; overflow: visible; }
  .cx.detail-open .cx-list { display: none; }
  .cx:not(.detail-open) .cx-detail { display: none; }
  .cx-back { display: inline-flex; flex-basis: 100%; justify-content: flex-start; margin-left: -10px; }
  .cx-detail { padding: 20px 18px; }
  .cx-title h1 { font-size: 28px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .flash { padding: 28px 18px; }
}

/* 개념 상세: 한자 워터마크 */
.cx-glyph { position: absolute; z-index: -1; right: -6px; top: -18px; font-family: var(--f-serif); font-weight: 700; font-size: 150px; line-height: 1; color: var(--accent); opacity: .06; pointer-events: none; user-select: none; white-space: nowrap; letter-spacing: -.06em; }
.cx-title h1 { background: linear-gradient(transparent 64%, var(--hi-soft) 64%, var(--hi-soft) 92%, transparent 92%); padding: 0 2px; }
.cx-item.on { box-shadow: inset 3px 0 0 var(--hi-2); }
.flash-ko .hl { padding: 0 6px; }
