
/* ============================================================
   GIC Personal Review v4 — unified across all learning layers
   ============================================================ */

.gic-rv-back{
  position:fixed;inset:0;z-index:2147483100;background:rgba(12,31,26,.48);
  display:flex;align-items:flex-end;justify-content:center;padding:14px
}
.gic-rv-sheet{
  width:min(620px,100%);max-height:86vh;overflow:auto;background:#fff;
  border-radius:25px 25px 16px 16px;padding:17px;color:#17231f;
  font:400 15px/1.45 Manrope,Inter,system-ui,sans-serif;
  box-shadow:0 24px 70px rgba(14,38,31,.24)
}
.gic-rv-head{display:flex;justify-content:space-between;gap:12px}
.gic-rv-head h2{margin:2px 0 4px;font:800 25px/1.12 Newsreader,Georgia,serif;color:#18483f}
.gic-rv-k{font-size:11px;font-weight:900;letter-spacing:.11em;text-transform:uppercase;color:#9a741d}
.gic-rv-sub{font-size:13px;color:#73807b}
.gic-rv-x{width:38px;height:38px;border:1px solid #dde4e1;border-radius:12px;background:#fff;font-size:22px;color:#5d6965}
.gic-rv-all,.gic-rv-opt{
  display:flex;gap:10px;align-items:flex-start;border:1px solid #e0e6e3;
  border-radius:14px;padding:11px 12px;margin-top:8px;background:#fff
}
.gic-rv-all{background:#eef8f4;border-color:#b9d8cd;color:#165c4e;font-weight:900}
.gic-rv-opt.cur{background:#f8fbfa;border-color:#b9d8cd}
.gic-rv-all input,.gic-rv-opt input{width:19px;height:19px;margin-top:1px;accent-color:#0f6658}
.gic-rv-opt b{display:block}.gic-rv-opt small{display:block;color:#7c8783;margin-top:2px}
.gic-rv-actions{
  display:flex;gap:8px;position:sticky;bottom:-17px;margin:14px -17px -17px;
  padding:12px 17px 17px;background:#fff
}
.gic-rv-save,.gic-rv-cancel{min-height:47px;border-radius:14px;font-weight:900}
.gic-rv-save{flex:1;border:0;background:#0f6658;color:#fff}
.gic-rv-cancel{border:1px solid #dde4e1;background:#fff;color:#5b6863;padding:0 14px}

.gic-rv-toast{
  position:fixed;left:50%;bottom:22px;transform:translateX(-50%);
  z-index:2147483200;width:min(92vw,520px);background:#173e35;color:#fff;
  border-radius:14px;padding:11px 13px;text-align:center;
  font:800 13px/1.4 Manrope,system-ui,sans-serif;
  box-shadow:0 12px 34px rgba(16,37,31,.22)
}

/* Due reminder */
.gic-rv-banner{
  display:flex;align-items:center;justify-content:space-between;gap:9px;
  width:min(94%,800px);margin:10px auto 14px;padding:10px 12px;
  border:1px solid #e5d7aa;border-radius:14px;background:#fff8e8;color:#655426;
  font:750 13px/1.4 Manrope,system-ui,sans-serif
}
.gic-rv-banner a{
  border:1px solid #d9bf75;border-radius:999px;padding:6px 9px;background:#fff;
  color:#6c571c;text-decoration:none;font-weight:900
}

/* Learning-system explainer */
.gic-rv-guide{
  width:min(100%,900px);margin:10px auto 16px;padding:15px 16px;
  border:1px solid #e4dcc5;border-radius:18px;background:#fffaf0;
  font:400 13px/1.45 Manrope,system-ui,sans-serif;color:#4f574f
}
.gic-rv-guide h3{
  margin:0 0 5px;color:#56471e;font:850 20px/1.15 Newsreader,Georgia,serif
}
.gic-rv-guide p{margin:0 0 10px;color:#6c6f66}
.gic-rv-guide-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.gic-rv-guide-item{
  border:1px solid #e6e0d0;border-radius:13px;padding:9px 10px;background:#fff
}
.gic-rv-guide-item b{display:block;color:#26493f;margin-bottom:2px}
.gic-rv-guide-item span{font-size:12px;color:#7b7f76}

/* Review today */
.gic-rv-center{
  width:min(100%,900px);margin:10px auto 22px;padding:17px;
  border:1px solid #dce7e2;border-radius:20px;background:#fff;
  font-family:Manrope,system-ui,sans-serif
}
.gic-rv-center h2{margin:0;color:#17483e;font:800 27px/1.12 Newsreader,Georgia,serif}
.gic-rv-meta{color:#74817c;font-size:13px;margin:4px 0 12px}
.gic-rv-item{border:1px solid #e0e6e3;border-radius:16px;padding:13px;margin-top:9px}
.gic-rv-item-title{display:block;color:#1e3e36;font:800 19px/1.2 Newsreader,Georgia,serif}
.gic-rv-chips{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
.gic-rv-chip{border-radius:999px;background:#eef7f4;color:#1b6254;padding:4px 8px;font-size:12px;font-weight:800}
.gic-rv-row{display:flex;gap:7px;flex-wrap:wrap}
.gic-rv-open,.gic-rv-status-btn{
  min-height:40px;border-radius:12px;padding:0 10px;font-weight:850;font-size:12px
}
.gic-rv-open{
  border:1px solid #9fc8bb;background:#fff;color:#155c4e;text-decoration:none;
  display:inline-flex;align-items:center
}

/* Unified self-rating buttons */
.gic-rv-status-btn{border:1px solid #d7dfdb;background:#fff;color:#53615c}
.gic-rv-status-btn[data-status="needs_practice"]{border-color:#e6c2bd;background:#fff4f2;color:#9c4339}
.gic-rv-status-btn[data-status="learning"]{border-color:#dcc77a;background:#fff9e7;color:#786019}
.gic-rv-status-btn[data-status="confident"]{border-color:#add2c5;background:#f0faf6;color:#176757}
.gic-rv-status-btn[data-status="mastered"]{border-color:#90bdad;background:#e7f5ef;color:#0b5a4b}
.gic-rv-status-btn.is-active{
  box-shadow:inset 0 0 0 2px currentColor,0 3px 10px rgba(18,54,44,.06);
  transform:translateY(-1px)
}
.gic-rv-empty{padding:13px;border:1px dashed #d9e1dd;border-radius:13px;color:#77837e;text-align:center;font-size:13px}

/* All account notes get one unified accordion */
.gic-rv-note{position:relative!important;overflow:hidden!important}
.gic-rv-note-toggle{
  width:100%!important;display:grid!important;grid-template-columns:1fr auto!important;
  gap:12px!important;align-items:center!important;padding:16px 18px!important;
  border:0!important;background:#fff!important;color:#173e35!important;text-align:left!important;
  font-family:Manrope,system-ui,sans-serif!important
}
.gic-rv-note-toggle-k{
  display:block!important;font-size:11px!important;font-weight:900!important;
  letter-spacing:.08em!important;text-transform:uppercase!important;color:#aa8426!important
}
.gic-rv-note-toggle-title{
  display:block!important;margin-top:3px!important;color:#176052!important;
  font-size:20px!important;font-weight:850!important;line-height:1.22!important
}
.gic-rv-note-toggle-chips{display:flex!important;flex-wrap:wrap!important;gap:5px!important;margin-top:7px!important}
.gic-rv-note-toggle-chip{
  border-radius:999px!important;padding:4px 8px!important;background:#eef7f4!important;
  color:#286b5f!important;font-size:11px!important;font-weight:850!important
}
.gic-rv-note-chevron{font-size:23px!important;color:#176052!important;transition:transform .18s ease!important}
.gic-rv-note[data-open="1"]>.gic-rv-note-toggle .gic-rv-note-chevron{transform:rotate(180deg)!important}
.gic-rv-note:not([data-open="1"])>.gic-rv-native{display:none!important}
.gic-rv-note[data-open="1"]>.gic-rv-native{display:revert!important}
.gic-rv-note[data-open="1"]>.gic-rv-note-toggle{border-bottom:1px solid #e9eeeb!important}

.gic-rv-note-status{
  padding:13px 16px 15px!important;border-top:1px solid #e9eeeb!important;background:#fbfcfc!important
}
.gic-rv-question{
  margin:0 0 10px!important;color:#5f6d67!important;font-size:14px!important;font-weight:750!important
}
.gic-rv-layer-state{padding:10px 0;border-top:1px solid #edf0ee}
.gic-rv-layer-state:first-of-type{border-top:0}
.gic-rv-layer-state-title{
  display:inline-flex;align-items:center;border-radius:999px;padding:4px 8px;
  margin-bottom:7px;background:#eef7f4;color:#28695d;font-size:11px;font-weight:900
}
.gic-rv-layer-state-buttons{display:flex;flex-wrap:wrap;gap:6px}

.gic-rv-stop{
  margin-top:12px;border:1px solid #dfc0bb;border-radius:12px;background:#fff;
  color:#97483f;min-height:42px;padding:0 12px;font-weight:900
}

/* Hide every native Remove control in the note cards.
   The native action remains in DOM and is reused after confirmation. */
.gic-rv-native-remove{display:none!important}

/* Client-side filter/search: hidden note */
.gic-rv-filtered-out{display:none!important}

/* Make notes page reliably scrollable on mobile. */
html.gic-rv-notes-page,
html.gic-rv-notes-page body{
  overflow-y:auto!important;overflow-x:hidden!important;height:auto!important;
  max-height:none!important;overscroll-behavior-y:auto!important;touch-action:pan-y!important
}

@media(max-width:560px){
  .gic-rv-back{padding:0}
  .gic-rv-sheet{width:100%;max-height:88vh;border-radius:23px 23px 0 0}
  .gic-rv-center,.gic-rv-guide{margin:8px 0 16px;padding:14px}
  .gic-rv-guide-grid{grid-template-columns:1fr}
  .gic-rv-note-toggle{padding:15px!important}
  .gic-rv-note-toggle-title{font-size:19px!important}
}


/* BEGIN GIC V4 unified layer-note cards; only the saved notes tab. */
.gic-library-card.gic-rv-layer-note{padding:0!important;border-radius:22px!important;overflow:hidden!important}
.gic-rv-layer-note>.gic-rv-note-toggle{padding:24px 25px!important;cursor:pointer!important}
.gic-rv-layer-note>.gic-rv-native{margin-left:20px!important;margin-right:20px!important}
.gic-rv-layer-note>.gic-rv-native.gic-library-source{margin-top:12px!important}
.gic-rv-layer-note>.gic-rv-native.gic-library-copy{margin-top:12px!important;margin-bottom:12px!important}
.gic-rv-layer-note>.gic-rv-native form{padding-bottom:16px}
.gic-rv-layer-note .gic-rv-note-toggle-chips .gic-rv-note-toggle-chip{display:inline-flex;max-width:100%;overflow-wrap:anywhere}
.gic-rv-layer-note .gic-rv-resume{border:1px solid #9fc8bb;border-radius:12px;color:#155c4e;background:#fff;min-height:42px;padding:0 12px;font-weight:850}
.gic-rv-layer-note .gic-rv-status-btn{cursor:pointer}
@media(max-width:560px){.gic-rv-layer-note>.gic-rv-note-toggle{padding:19px 18px!important}}
/* END GIC V4 unified layer-note cards. */

/* GIC V4 on Grammar / Pronunciation pages — native details remain intact. */
.gic-rv-tip.gic-library-card{padding:0!important;overflow:hidden!important;border-radius:22px!important}
.gic-rv-tip>.gic-rv-note-toggle{padding:24px 25px!important;cursor:pointer!important}
.gic-rv-tip>.gic-rv-tip-native-toggle{display:none!important}
.gic-rv-tip>.gic-library-details.gic-rv-native{padding:12px 18px 20px!important;margin:0 18px!important;border-top:1px solid #ebefeb!important}
.gic-rv-tip .gic-rv-status-btn{cursor:pointer}
@media(max-width:560px){.gic-rv-tip>.gic-rv-note-toggle{padding:19px 18px!important}}

/* GIC V4 Cleanup v5: legacy UI stays in DOM for server form submission,
   but is never shown alongside V4 controls. */
.gic-rv-note .gic-rv-legacy-ui,
.gic-rv-tip .gic-rv-legacy-ui,
.gic-rv-layer-note .gic-rv-legacy-ui,
.gic-rv-note[data-open="1"] > .gic-rv-native.gic-rv-legacy-ui {display:none!important}
.gic-rv-note .gic-rv-native-remove,
.gic-rv-tip .gic-rv-native-remove {display:none!important}
.gic-rv-stop:disabled{opacity:.6;cursor:wait}
/* Filter bar for dynamic tabs that previously lacked any search controls. */
.gic-rv-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:18px 0 24px}
.gic-rv-filters select,.gic-rv-filters input{box-sizing:border-box;min-width:0;width:100%;height:56px;
  border:1px solid #d0dad6;border-radius:14px;background:#fff;color:#245b4e;
  padding:0 16px;font:500 16px/1.3 Manrope,system-ui,sans-serif}
.gic-rv-filters input{grid-column:1/-1;color:#263e37}
@media(max-width:460px){.gic-rv-filters{gap:10px}.gic-rv-filters select,.gic-rv-filters input{padding:0 11px;font-size:15px}}
