/* Approved Alice text-card proposal 01: Pearl Ivory, 2026-10-24.
 * Alice-only surface layer. Shared card dimensions, typography, annotations,
 * audio, subtitles, image edition and stored progress keep their native owners.
 */
html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard) {
  --alice-pearl-key-size: 80px;
  --reader-ink: #26384a;
  --reader-ink-soft: #26384a;
  position: relative;
  color: #26384a !important;
  background-color: #f8f5ed !important;
  background-image: none !important;
  border-color: #c4af83 !important;
  box-shadow: 0 12px 30px rgba(38, 56, 74, .15), inset 0 1px 0 rgba(255, 255, 255, .8) !important;
  /* The small ornament has its own strip; even long text cannot cover it. */
  padding-bottom: calc(var(--alice-pearl-key-size) + 24px) !important;
}

html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard)::before {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: 6px;
  z-index: 0;
  border: 1px solid rgba(196, 175, 131, .58) !important;
  border-radius: 16px;
  background: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard)::after {
  content: "" !important;
  display: block !important;
  position: absolute;
  inset: auto 18px 16px auto;
  width: var(--alice-pearl-key-size);
  height: var(--alice-pearl-key-size);
  z-index: 0;
  background: url("/alice-reader/assets/alice-pearl-key-20261024.png") center / contain no-repeat !important;
  border: 0 !important;
  box-shadow: none !important;
  pointer-events: none;
}

html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard) #normalCardBody > .english,
html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard) #normalCardBody > .japanese {
  color: #26384a !important;
  -webkit-text-fill-color: currentColor !important;
  text-shadow: none !important;
}

html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard) .readerCardHead .label,
html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard) .readerCardHead .chapterLabel {
  color: #36678d !important;
  border-color: rgba(54, 103, 141, .3) !important;
}

html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard) #slopeTextFlipToggle {
  color: #36678d !important;
  text-shadow: none !important;
}

@media (min-width: 601px) and (max-width: 1023px) {
  html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard) {
    --alice-pearl-key-size: 68px;
  }
}

@media (max-width: 600px) {
  html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard) {
    --alice-pearl-key-size: 52px;
  }
  html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard)::before {
    inset: 5px;
    border-radius: 13px;
  }
  html.reader-pair-ui-v1 body[data-reader-image="alice"] #reader#reader .readerCard:not(.imageCard):not(.illustrationMode):not(.richCard)::after {
    right: 12px;
    bottom: 13px;
  }
}
