/* Memory Palace recall mode: hide English spelling while preserving the locus, number and Chinese cue. */
body.mp-hide-english .cell .en,
body.mp-hide-english .glass-panel .gp-en {
  color: transparent !important;
  text-shadow: none !important;
  user-select: none;
  -webkit-user-select: none;
}

/*
 * Keep unrevealed English hidden even when later theme styles target
 * .cell:hover .en / .cell.is-active .en with !important colors.
 */
body.mp-hide-english .cell:not(.is-english-revealed) .en,
body.mp-hide-english .cell:not(.is-english-revealed):hover .en,
body.mp-hide-english .cell:not(.is-english-revealed).is-active .en,
body.mp-hide-english.theme-blackhole .cell:not(.is-english-revealed) .en,
body.mp-hide-english.theme-snow .cell:not(.is-english-revealed) .en,
body.mp-hide-english.memory-content-only .cell:not(.is-english-revealed) .en {
  color: transparent !important;
  text-shadow: none !important;
  -webkit-text-fill-color: transparent !important;
}

body.mp-hide-english .cell .en {
  position: relative;
  min-width: 52px;
  min-height: 13px;
  overflow: visible;
}

body.mp-hide-english .cell .en::after {
  content: '';
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 1px;
  border-bottom: 1px solid rgba(255,255,255,.56);
}

body.mp-hide-english .cell:hover .en::after,
body.mp-hide-english .cell.is-active .en::after {
  border-bottom-color: rgba(0,0,0,.42);
}

body.mp-hide-english .cell.is-english-revealed .en,
body.mp-hide-english.theme-blackhole .cell.is-english-revealed .en,
body.mp-hide-english.theme-snow .cell.is-english-revealed .en,
body.mp-hide-english.memory-content-only .cell.is-english-revealed .en {
  color: rgba(255,255,255,.96) !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.42) !important;
  user-select: text;
  -webkit-user-select: text;
}

body.mp-hide-english .cell.is-english-revealed:hover .en,
body.mp-hide-english .cell.is-english-revealed.is-active .en {
  color: #000 !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}

body.mp-hide-english.theme-blackhole .cell.is-english-revealed:hover .en,
body.mp-hide-english.theme-blackhole .cell.is-english-revealed.is-active .en,
body.mp-hide-english.theme-snow .cell.is-english-revealed:hover .en,
body.mp-hide-english.theme-snow .cell.is-english-revealed.is-active .en {
  color: #fff !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: 0 1px 6px rgba(0,0,0,.70) !important;
}

body.mp-hide-english .cell.is-english-revealed .en::after {
  display: none;
}

body.mp-hide-english .cell.is-english-revealed {
  box-shadow: inset 0 0 0 1px rgba(126,231,135,.52);
}

body.mp-hide-english .glass-panel .gp-en {
  position: relative;
  min-width: 86px;
  min-height: 1.35em;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  text-shadow: none !important;
}

body.mp-hide-english .glass-panel .gp-en::after {
  content: '英文已隐藏';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  color: rgba(255,255,255,.5);
  -webkit-text-fill-color: currentColor;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  white-space: nowrap;
}

body.mp-hide-english.mp-panel-english-revealed .glass-panel .gp-en {
  color: rgba(255,255,255,.96) !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.42) !important;
  user-select: text;
  -webkit-user-select: text;
}

body.mp-hide-english.mp-panel-english-revealed .glass-panel .gp-en::after {
  display: none;
}

.view-controls .recall-toggle[aria-pressed="true"] {
  color: #111;
  background: rgba(255,255,255,.92);
  text-shadow: none;
  box-shadow: 0 2px 8px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.9);
}

@media (max-width: 720px) {
  .view-controls .recall-toggle {
    min-width: 58px;
    padding-inline: 8px;
  }
}
