/* 이미지딕 내 딕테이션 기록 */
:root {
    --dt-bg: #f8fafc; --dt-card: #ffffff; --dt-line: #e2e8f0; --dt-text: #0f172a; --dt-sub: #64748b; --dt-body: #334155;
    --dt-pri: #4f46e5; --dt-pri-d: #3730a3; --dt-pri-l: #eef2ff; --dt-pri-b: #c7d2fe;
    --dt-ok: #dcfce7; --dt-ok-t: #14532d; --dt-bad: #fee2e2; --dt-bad-t: #7f1d1d; --dt-miss: #fffbeb; --dt-miss-t: #92400e; --dt-miss-b: #b45309;
    --dt-sp: #e0f2fe; --dt-sp-t: #075985;
}
.dtm { max-width: 960px; margin: 0 auto; padding: 0 16px 48px; color: var(--dt-text); font-size: 15px; line-height: 1.6; }
.dtm *, .dt-sheet-wrap * { box-sizing: border-box; }
.dtm svg, .dt-sheet-wrap svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.dtm svg.fill, .dt-sheet-wrap svg.fill { fill: currentColor; stroke: none; }
.dtm-head { padding: 24px 0 12px; }
.dtm-head-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dtm-help { min-height: 36px; padding: 0 14px; border-radius: 18px; border: 1px solid var(--dt-pri-b); background: var(--dt-pri-l); color: var(--dt-pri-d); font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer; }
.dtm-back { font-size: 14px; font-weight: 700; color: var(--dt-pri-d); text-decoration: none; }
.dtm-head h1 { margin: 6px 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.dtm-head p { margin: 0; font-size: 14px; color: var(--dt-sub); }

.dtm-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 0; background: var(--dt-bg, #f8fafc); cursor: grab; -webkit-overflow-scrolling: touch; }
.dtm-tabs::-webkit-scrollbar { display: none; }
.dtm-tabs button { flex: 0 0 auto; min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid #cbd5e1; background: var(--dt-card); color: var(--dt-body); font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; }
.dtm-tabs button.on { border-color: var(--dt-pri); background: var(--dt-pri); color: #fff; }
.dtm-body { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.dtm-loading { padding: 60px 0; text-align: center; color: var(--dt-sub); }

.dtm-box { background: var(--dt-card); border: 1px solid var(--dt-line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.dtm-lab { font-size: 16px; font-weight: 800; }
.dtm-sub { font-size: 13px; font-weight: 400; color: var(--dt-sub); }
.dtm-note { margin: 0; font-size: 13px; color: var(--dt-sub); line-height: 1.65; }
.dtm-note-top { margin-bottom: -4px; }
.dtm-empty { align-items: center; text-align: center; padding: 28px 16px; }
.dtm-empty b { font-size: 16px; }
.dtm-empty p { margin: 0; font-size: 14px; color: var(--dt-sub); }
.dtm-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 18px; border-radius: 12px; border: 1px solid #cbd5e1; background: var(--dt-card); color: var(--dt-body); font-size: 15px; font-weight: 700; font-family: inherit; text-decoration: none; cursor: pointer; }
.dtm-btn.main { border: 0; background: var(--dt-pri); color: #fff; }
.dtm-btn-full { width: 100%; }
.dtm-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dtm-actions .dtm-btn { flex: 1 1 160px; }
.dtm-tip { padding: 10px 12px; border-radius: 10px; background: var(--dt-pri-l); color: var(--dt-pri-d); font-size: 14px; line-height: 1.65; }

.dtm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dtm-stat { background: var(--dt-card); border: 1px solid var(--dt-line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; }
.dtm-stat span { font-size: 13px; color: var(--dt-sub); }
.dtm-stat b { font-size: 26px; font-weight: 800; color: var(--dt-pri-d); line-height: 1.3; }
.dtm-stat em { font-style: normal; font-size: 13px; color: var(--dt-sub); }

.dtm-heat-wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.dtm-heat-rows { display: grid; grid-template-rows: 18px repeat(7, 16px); gap: 3px; font-size: 12px; color: var(--dt-sub); line-height: 16px; }
.dtm-heat { display: flex; gap: 3px; }
.dtm-heat-col { display: grid; grid-template-rows: 18px repeat(7, 16px); gap: 3px; }
.dtm-heat-m { font-size: 12px; color: var(--dt-sub); white-space: nowrap; line-height: 18px; width: 16px; overflow: visible; }
.dtm-heat button, .dtm-heat i, .dtm-heat-lg i { display: block; width: 16px; height: 16px; border-radius: 4px; border: 0; padding: 0; cursor: pointer; }
.dtm-heat i { cursor: default; }
.lv-0 { background: #eef2f7; } .lv-1 { background: #c7d2fe; } .lv-2 { background: #a5b4fc; } .lv-3 { background: #6366f1; } .lv-4 { background: #3730a3; } .lv-f { background: transparent; }
.dtm-heat button.today { box-shadow: inset 0 0 0 2px #0f172a; }
.dtm-heat button.sel { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0f172a; }
.dtm-heat-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--dt-body); }
.dtm-heat-lg { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--dt-sub); }
.dtm-heat-lg i { width: 12px; height: 12px; border-radius: 3px; cursor: default; }

.dtm-bar { display: flex; flex-direction: column; gap: 6px; }
.dtm-bar-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; font-size: 14px; }
.dtm-bar-h b { white-space: nowrap; }
.dtm-meter { height: 8px; border-radius: 4px; background: var(--dt-line); overflow: hidden; }
.dtm-meter i { display: block; height: 100%; background: var(--dt-miss-b); border-radius: 0 4px 4px 0; }

.dtm-dayh { margin: 10px 0 6px; font-size: 14px; font-weight: 800; color: var(--dt-body); }
.dtm-list { display: flex; flex-direction: column; gap: 8px; }
.dtm-item { background: var(--dt-card); border: 1px solid var(--dt-line); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.dtm-list .dtm-item { margin-bottom: 0; }
.dtm-item.open { border-color: var(--dt-pri-b); }
.dtm-item-h { width: 100%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 4px 8px; padding: 12px 14px; border: 0; background: none; text-align: left; font-family: inherit; color: inherit; cursor: pointer; }
.dtm-item-h.static { cursor: default; padding-bottom: 6px; }
.dtm-kind { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #f1f5f9; color: var(--dt-body); }
.dtm-src { font-size: 13px; color: var(--dt-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dtm-sc { font-size: 15px; font-weight: 800; }
.dtm-sc.good { color: #15803d; } .dtm-sc.mid { color: #b45309; } .dtm-sc.low { color: #b91c1c; }
.dtm-txt { grid-column: 1 / -1; font-size: 16px; color: var(--dt-text); line-height: 1.5; }
.dtm-txt em { font-style: normal; color: var(--dt-sub); font-size: 14px; }
.dtm-ko2 { grid-column: 1 / -1; font-size: 14px; color: var(--dt-body); }
.dtm-meta { grid-column: 1 / -1; font-size: 13px; color: var(--dt-sub); }
.dtm-item-b { padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid #f1f5f9; padding-top: 12px; }
.dtm-item-b[hidden] { display: none; }
.dtm-sent { display: flex; flex-wrap: wrap; gap: 6px; line-height: 1.3; }
.dtm-tk { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px; border-radius: 7px; font-size: 15px; }
.dtm-tk.ok { background: var(--dt-ok); color: var(--dt-ok-t); }
.dtm-tk.miss { background: var(--dt-miss); color: var(--dt-miss-t); outline: 2px dashed var(--dt-miss-b); outline-offset: -2px; font-weight: 700; }
.dtm-tk.bad { background: var(--dt-bad); color: var(--dt-bad-t); }
.dtm-tk.sp { background: var(--dt-sp); color: var(--dt-sp-t); }
.dtm-tk.xt { background: #f1f5f9; color: #94a3b8; }
.dtm-tk s { opacity: .75; }
.dtm-ans { margin: 0; font-size: 14px; color: var(--dt-body); }
.dtm-ans span { display: inline-block; margin-right: 8px; font-size: 13px; font-weight: 700; color: var(--dt-sub); }
.dtm-ko { margin: 0; font-size: 14px; color: var(--dt-body); }
.dtm-legend { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: #475569; }
.dtm-legend span { display: inline-flex; align-items: center; gap: 5px; }
.dtm .lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.dtm .lg.ok { background: var(--dt-ok); } .dtm .lg.miss { background: var(--dt-miss); outline: 2px dashed var(--dt-miss-b); outline-offset: -2px; } .dtm .lg.bad { background: var(--dt-bad); } .dtm .lg.sp { background: var(--dt-sp); }
.dtm-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.dtm-item-b .dtm-row { padding: 0; }
.dtm-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid #cbd5e1; background: var(--dt-card); color: var(--dt-body); font-size: 14px; font-weight: 700; font-family: inherit; text-decoration: none; cursor: pointer; }
.dtm-pill:disabled { opacity: .45; cursor: default; }
.dtm-pill.on { border-color: var(--dt-pri); background: var(--dt-pri-l); color: var(--dt-pri-d); }
.dtm-unsave { color: #991b1b; }
.dtm-more { display: flex; justify-content: center; padding: 8px 0; }

.dtm-wchips { display: flex; flex-wrap: wrap; gap: 6px; }
.dtm-wchip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid #cbd5e1; background: var(--dt-card); color: var(--dt-text); font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer; }
.dtm-wchip:disabled { cursor: default; }
.dtm-wchip em { font-style: normal; font-size: 13px; font-weight: 800; color: var(--dt-miss-t); }

.dtm-chart { display: grid; grid-template-columns: auto 1fr; gap: 6px; height: 150px; }
.dtm-grid { display: flex; flex-direction: column; justify-content: space-between; font-size: 12px; color: var(--dt-sub); text-align: right; padding: 0 2px; }
.dtm-bars { position: relative; display: flex; align-items: flex-end; gap: 2px; border-top: 1px solid #eef2f7; border-bottom: 1px solid #cbd5e1; }
.dtm-bars::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid #eef2f7; pointer-events: none; }
.dtm-bcol { flex: 1; height: 100%; display: flex; align-items: flex-end; padding: 0; border: 0; background: none; cursor: pointer; min-width: 0; }
.dtm-bcol i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: #6366f1; }
.dtm-bcol.sel i { background: #3730a3; }
.dtm-bcol.none { cursor: default; }
.dtm-xlab { display: flex; gap: 2px; margin-left: 40px; font-size: 12px; color: var(--dt-sub); }
.dtm-xlab span { flex: 1; min-width: 0; white-space: nowrap; overflow: visible; }
.dtm-chart-info { font-size: 14px; color: var(--dt-body); font-weight: 700; }
.dtm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dtm-table th, .dtm-table td { padding: 9px 6px; border-bottom: 1px solid #f1f5f9; text-align: right; }
.dtm-table th:first-child, .dtm-table thead th:first-child { text-align: left; }
.dtm-table thead th { font-size: 13px; color: var(--dt-sub); font-weight: 700; }
.dtm-table tbody th { font-weight: 700; color: var(--dt-body); }

.dtm-toast { position: fixed; left: 50%; bottom: 40px; z-index: 120; max-width: calc(100% - 32px); transform: translate(-50%, 12px); padding: 10px 16px; border-radius: 12px; background: #0f172a; color: #fff; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.dtm-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 단어 창 */
.dt-sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.dt-sheet-wrap[hidden] { display: none; }
.dt-sheet-bg { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.dt-sheet { position: relative; width: 100%; max-width: 560px; max-height: 80vh; overflow-y: auto; overscroll-behavior: contain; background: var(--dt-card); border-radius: 18px 18px 0 0; padding: 18px 16px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.dt-sheet-x { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border: 0; background: none; color: #475569; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }
.dt-sw { display: flex; gap: 14px; padding-right: 32px; }
.dt-sw-img { width: 104px; height: 104px; object-fit: cover; border-radius: 12px; background: #f1f5f9; flex: 0 0 auto; }
.dt-sw-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dt-sw-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.dt-sw-head h3 { margin: 0; font-size: 20px; font-weight: 800; }
.dt-sw-head span { font-size: 14px; color: var(--dt-sub); }
.dt-sw-form { margin: 0; font-size: 13px; color: var(--dt-sub); }
.dt-sw-mean { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; font-size: 14px; color: var(--dt-body); }
.dt-sw-mean em { font-style: normal; font-size: 13px; color: var(--dt-pri-d); font-weight: 700; margin-right: 4px; }
.dt-sw-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.dt-sq { width: 38px; height: 38px; border-radius: 8px; border: 1px solid #cbd5e1; background: var(--dt-card); color: var(--dt-body); display: inline-flex; align-items: center; justify-content: center; }
.dt-sq.on { border-color: var(--dt-pri); background: var(--dt-pri-l); color: var(--dt-pri-d); }
.dt-sbtn { min-height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid #cbd5e1; background: var(--dt-card); color: var(--dt-body); font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; }
.dt-sbtn.on { border-color: var(--dt-pri); background: var(--dt-pri-l); color: var(--dt-pri-d); font-weight: 700; }
.dt-sw-msg { margin: 0; font-size: 13px; color: var(--dt-miss-t); }
.dt-sw-msg:empty { display: none; }

.dt-sheet-wrap { color: var(--dt-text); font-size: 15px; line-height: 1.5; }
.dt-sheet-wrap button { font-family: inherit; cursor: pointer; }
.dt-sheet-x svg { width: 22px; height: 22px; }
.dt-note { margin: 0; font-size: 13px; color: var(--dt-sub); }
@media (min-width: 641px) { .dt-sheet-wrap { align-items: center; } .dt-sheet { border-radius: 18px; } }
@media (max-width: 760px) { .dtm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }