/* GiC Bonus Bar Natural Restore v1
   Focused override only:
   restore Grammar / Pronunciation / Language Kit bar to its normal full width
   and place it slightly lower, fully inside the card.
   No Settings, Bell, FSRS, Recorder, or card-transition changes. */

.gic-study-back:not([hidden]){
  position:relative !important;
  box-sizing:border-box !important;
  padding-bottom:104px !important;
}

/* Override older compact/squeezed rules from previous UI patches. */
.gic-study-back .gic-layer-tabs,
.gic-study-back [data-gic-layer-tabs]{
  position:absolute !important;
  left:24px !important;
  right:24px !important;
  bottom:14px !important;
  top:auto !important;

  width:auto !important;
  min-width:0 !important;
  max-width:none !important;

  height:82px !important;
  min-height:82px !important;
  max-height:82px !important;

  margin:0 !important;
  padding:8px 10px !important;
  box-sizing:border-box !important;

  display:flex !important;
  align-items:stretch !important;
  gap:8px !important;

  border-radius:24px !important;
  background:#f4f0e7 !important;
  border:1px solid rgba(21,44,39,.14) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 8px 22px rgba(20,54,48,.06) !important;

  overflow-y:hidden !important;
  z-index:9 !important;
}

.gic-study-back .gic-layer-tabs.gic-layer-tabs-scroll,
.gic-study-back [data-gic-layer-tabs].gic-layer-tabs-scroll{
  overflow-x:auto !important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior-x:contain;
}

.gic-study-back .gic-layer-tabs > button,
.gic-study-back [data-gic-layer-tabs] > button{
  flex:1 1 0 !important;
  min-width:0 !important;
  height:64px !important;
  min-height:64px !important;
  max-height:64px !important;

  margin:0 !important;
  padding:0 12px !important;

  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;

  border-radius:18px !important;
  white-space:nowrap !important;
}

.gic-study-back .gic-layer-tabs > button.active,
.gic-study-back [data-gic-layer-tabs] > button.active{
  background:rgba(255,255,255,.96) !important;
  color:#315f56 !important;
  box-shadow:
    0 4px 12px rgba(27,67,60,.08),
    inset 0 0 0 1px rgba(24,72,63,.06) !important;
}

.gic-study-back .gic-layer-tabs > button:disabled,
.gic-study-back [data-gic-layer-tabs] > button:disabled{
  opacity:.42 !important;
}

.gic-study-back .gic-layer-tabs svg,
.gic-study-back [data-gic-layer-tabs] svg{
  width:20px !important;
  height:20px !important;
  flex:0 0 20px !important;
}

@media (max-width:640px){
  .gic-study-back:not([hidden]){
    padding-bottom:100px !important;
  }

  .gic-study-back .gic-layer-tabs,
  .gic-study-back [data-gic-layer-tabs]{
    left:18px !important;
    right:18px !important;
    bottom:10px !important;

    height:78px !important;
    min-height:78px !important;
    max-height:78px !important;

    padding:7px 8px !important;
    border-radius:22px !important;
  }

  .gic-study-back .gic-layer-tabs > button,
  .gic-study-back [data-gic-layer-tabs] > button{
    height:62px !important;
    min-height:62px !important;
    max-height:62px !important;

    padding:0 8px !important;
    gap:6px !important;
    border-radius:17px !important;
  }
}
