/* 408 知识点重点标记 / 本地批注 */
.k408-annotation-ui { box-sizing: border-box; font-family: Inter, "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif; }
#k408-selection-button {
  position: fixed; z-index: 2147483001; padding: 8px 13px; border: 1px solid rgba(83,222,255,.75);
  border-radius: 9px; color: #eafbff; background: rgba(8,25,43,.96); box-shadow: 0 7px 24px rgba(0,0,0,.32),0 0 14px rgba(69,220,255,.2);
  font-size: 13px; font-weight: 700; cursor: pointer;
}
#k408-selection-button[hidden] { display: none !important; }
#k408-annotation-fab {
  position: fixed; z-index: 999; right: 22px; bottom: 78px; width: 48px; height: 48px; border: 1px solid rgba(78,218,255,.58);
  border-radius: 15px; color: #dffaff; background: linear-gradient(145deg,rgba(13,40,65,.96),rgba(17,24,52,.96));
  box-shadow: 0 7px 24px rgba(0,0,0,.28),0 0 17px rgba(69,220,255,.18); cursor: pointer;
}
#k408-annotation-fab > span { font-size: 22px; line-height: 1; }
#k408-annotation-count { position: absolute; right: -6px; top: -7px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 10px; color: #05101e; background: #74e6ff; font: 800 11px/19px monospace; }
#k408-annotation-panel {
  position: fixed; z-index: 2147482998; right: 18px; bottom: 136px; display: flex; flex-direction: column; width: min(370px,calc(100vw - 28px)); max-height: min(620px,calc(100vh - 180px));
  border: 1px solid rgba(83,211,244,.28); border-radius: 17px; color: #e8f7ff; background: rgba(7,18,35,.97); box-shadow: 0 18px 50px rgba(0,0,0,.45),0 0 30px rgba(32,171,219,.11);
  opacity: 0; visibility: hidden; transform: translateY(10px) scale(.98); transition: opacity .18s ease,transform .18s ease,visibility .18s;
}
#k408-annotation-panel.is-open { opacity: 1; visibility: visible; transform: none; }
.k408-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 17px 13px; border-bottom: 1px solid rgba(125,220,255,.12); }
.k408-panel-head strong { display: block; color: #f4fcff; font-size: 16px; }
.k408-panel-head small { display: block; margin-top: 3px; color: #8eacbb; font-size: 11px; }
.k408-panel-head button,.k408-dialog-head button { width: 30px; height: 30px; border: 0; border-radius: 8px; color: #a9c5d2; background: rgba(255,255,255,.06); font-size: 22px; cursor: pointer; }
.k408-annotation-list { overflow: auto; min-height: 130px; padding: 10px; }
.k408-list-item { display: block; width: 100%; margin: 0 0 8px; padding: 11px 12px; border: 1px solid rgba(255,255,255,.1); border-left: 3px solid #ffd65a; border-radius: 10px; color: #dceef6; background: rgba(255,255,255,.035); text-align: left; cursor: pointer; }
.k408-list-item:hover { background: rgba(100,210,255,.08); border-color: rgba(100,210,255,.28); }
.k408-list-item--mistake { border-left-color: #ff7185; }.k408-list-item--review { border-left-color: #65b8ff; }.k408-list-item--custom { border-left-color: #bb8cff; }
.k408-list-meta { display: block; margin-bottom: 5px; color: #8faab8; font-size: 10px; letter-spacing: .12em; }
.k408-list-item b { display: -webkit-box; overflow: hidden; color: #f1f9fc; font-size: 13px; line-height: 1.55; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.k408-list-note { display: block; overflow: hidden; margin-top: 5px; color: #99b2be; font-size: 12px; white-space: nowrap; text-overflow: ellipsis; }
.k408-list-empty { display: grid; place-content: center; min-height: 145px; color: #88a5b2; text-align: center; }
.k408-list-empty b { margin-bottom: 7px; color: #dbeef6; }.k408-list-empty span { max-width: 230px; font-size: 12px; line-height: 1.6; }
.k408-panel-foot { display: flex; gap: 8px; padding: 11px; border-top: 1px solid rgba(125,220,255,.12); }
.k408-panel-foot button { flex: 1; padding: 8px; border: 1px solid rgba(119,206,235,.18); border-radius: 8px; color: #aacee0; background: rgba(255,255,255,.04); cursor: pointer; }
#k408-annotation-dialog[hidden] { display: none !important; }
#k408-annotation-dialog { position: fixed; z-index: 2147483002; inset: 0; display: grid; place-items: center; padding: 18px; }
.k408-dialog-backdrop { position: absolute; inset: 0; background: rgba(1,7,16,.72); backdrop-filter: blur(5px); }
.k408-dialog-card { position: relative; width: min(510px,100%); max-height: calc(100vh - 36px); overflow: auto; padding: 19px; border: 1px solid rgba(95,219,249,.3); border-radius: 17px; color: #dff2f9; background: #0a192b; box-shadow: 0 24px 70px rgba(0,0,0,.58),0 0 38px rgba(51,189,229,.1); }
.k408-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }.k408-dialog-head strong { color: #f4fcff; font-size: 17px; }
#k408-selected-quote { max-height: 110px; overflow: auto; margin: 0 0 16px; padding: 10px 12px; border-left: 3px solid #55dcff; border-radius: 0 8px 8px 0; color: #bfd7e1; background: rgba(85,220,255,.06); font-size: 13px; line-height: 1.65; }
.k408-dialog-card > label { display: block; margin: 12px 0 7px; color: #b7ced8; font-size: 12px; }.k408-dialog-card > label small { color: #7996a3; }
.k408-type-options { display: grid; grid-template-columns: repeat(4,1fr); gap: 7px; }
.k408-type-options input { position: absolute; opacity: 0; pointer-events: none; }.k408-type-options span { display: block; padding: 8px 5px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; color: #a9c0ca; background: rgba(255,255,255,.035); text-align: center; font-size: 12px; cursor: pointer; }
.k408-type-options input:checked + span { border-color: #55dcff; color: #eafbff; background: rgba(85,220,255,.13); box-shadow: inset 0 0 0 1px rgba(85,220,255,.09); }
#k408-note { box-sizing: border-box; width: 100%; resize: vertical; min-height: 90px; padding: 10px 11px; border: 1px solid rgba(118,207,235,.2); border-radius: 9px; outline: none; color: #e7f6fb; background: rgba(0,0,0,.2); font: 13px/1.6 inherit; }
#k408-note:focus { border-color: rgba(85,220,255,.68); box-shadow: 0 0 0 3px rgba(85,220,255,.08); }
.k408-dialog-actions { display: flex; align-items: center; gap: 8px; margin-top: 17px; }.k408-dialog-actions span { flex: 1; }.k408-dialog-actions button { padding: 8px 14px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; color: #bcd3dd; background: rgba(255,255,255,.05); cursor: pointer; }.k408-dialog-actions .primary { border-color: rgba(85,220,255,.55); color: #06121e; background: #68ddf5; font-weight: 700; }.k408-dialog-actions .danger { border-color: rgba(255,103,123,.35); color: #ff9aa7; background: rgba(255,74,99,.08); }
#k408-annotation-toast { position: fixed; z-index: 2147483005; left: 50%; bottom: 28px; padding: 9px 15px; border: 1px solid rgba(98,220,248,.35); border-radius: 9px; color: #e7faff; background: rgba(5,19,33,.96); box-shadow: 0 8px 25px rgba(0,0,0,.35); opacity: 0; pointer-events: none; transform: translate(-50%,12px); transition: .2s ease; }
#k408-annotation-toast.is-visible { opacity: 1; transform: translate(-50%,0); }
mark.k408-annotation { padding: .05em .08em; border-radius: .2em; color: inherit !important; background: linear-gradient(transparent 18%,rgba(255,213,75,.42) 18%,rgba(255,213,75,.42) 88%,transparent 88%) !important; box-decoration-break: clone; -webkit-box-decoration-break: clone; cursor: pointer; }
mark.k408-annotation--mistake { background: linear-gradient(transparent 18%,rgba(255,92,116,.33) 18%,rgba(255,92,116,.33) 88%,transparent 88%) !important; }
mark.k408-annotation--review { background: linear-gradient(transparent 18%,rgba(72,166,255,.34) 18%,rgba(72,166,255,.34) 88%,transparent 88%) !important; }
mark.k408-annotation--custom { background: linear-gradient(transparent 18%,rgba(173,112,255,.34) 18%,rgba(173,112,255,.34) 88%,transparent 88%) !important; }
mark.k408-annotation:hover,mark.k408-annotation:focus,mark.k408-annotation.is-located { outline: 2px solid rgba(110,224,255,.75); outline-offset: 2px; }
body.k408-dialog-open { overflow: hidden; }
@media (max-width:768px) {
  #k408-annotation-fab { right: 13px; bottom: 72px; width: 44px; height: 44px; border-radius: 13px; }
  #k408-annotation-panel { right: 7px; bottom: 125px; width: calc(100vw - 14px); max-height: calc(100vh - 145px); }
  .k408-type-options { grid-template-columns: repeat(2,1fr); }
  .k408-dialog-card { padding: 15px; }.k408-dialog-actions button { padding: 8px 11px; }
}
@media (prefers-reduced-motion:reduce) { #k408-annotation-panel,#k408-annotation-toast { transition:none; } }

/* Performance: skip painting off-screen annotation rows. */
.k408-list-item{content-visibility:auto;contain-intrinsic-size:auto 76px}
