/* BKS Creations | SAGE TAROT V7 COMPLETE | 2026-11-13
   Additive interface layer only. V4 deck, V5 rooms, V6 reading CSS unchanged.
*/
/* The V1 reveal cue was fixed over the H1. Rehouse it beneath the question. */
.tarot-shell > .question-panel .sage-tarot-reveal-cue {
  display: block !important;
  position: absolute !important;
  z-index: 6 !important;
  top: calc(100% + 7px) !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translateX(-50%) !important;
  width: min(94vw, 610px) !important;
  max-width: 610px !important;
  margin: 0 !important;
  padding: 4px 12px !important;
  border: 1px solid rgba(216, 170, 106, .35) !important;
  background: rgba(16, 5, 32, .82) !important;
  backdrop-filter: blur(4px);
  color: #ffe4a8 !important;
  border-radius: 999px;
  font: 600 clamp(11px, .92vw, 13px)/1.3 Georgia, serif !important;
  text-align: center !important;
  pointer-events: none;
}
.tarot-shell > .question-panel .sage-tarot-reveal-cue[hidden] { display:none !important; }
@media (max-width:899px) {
  .tarot-shell > .question-panel:has(.sage-tarot-reveal-cue:not([hidden])) {
    margin-bottom: 37px !important;
  }
  .tarot-shell > .question-panel .sage-tarot-reveal-cue {
    top: calc(100% + 6px) !important;
    width: min(95vw, 560px) !important;
    border-radius: 12px !important;
  }
}
/* A little more presence for the optional one-card result illustration. */
@media (min-width:1100px) {
  body.sage-v4-one-card .free-reading-panel .free-reading-card-image {
    flex-basis: 137px !important;
    width: 137px !important;
    max-width: 42% !important;
  }
}
/* Buttons use the already-approved Tarot purple and warm gold palette. */
#sage-v7-history-open,
.sage-v7-action {
  border: 1px solid rgba(245, 201, 126, .7) !important;
  border-radius: 999px !important;
  background: rgba(38, 13, 56, .92) !important;
  color: #ffe3aa !important;
  padding: 9px 13px !important;
  min-height: 34px !important;
  font: 700 11px/1.2 system-ui, sans-serif !important;
  letter-spacing: .025em;
  cursor: pointer;
}
#sage-v7-history-open:hover,.sage-v7-action:hover {
  background: rgba(94, 42, 117, .98) !important;
}
#sage-v7-history-open:focus-visible,.sage-v7-action:focus-visible,
.sage-v7-history button:focus-visible {outline:3px solid #ffd989;outline-offset:2px}
#sage-v7-history-open {font-size: 10px !important;min-width: 107px !important;}
.sage-v7-action:disabled {opacity: .5;cursor: not-allowed}
#sage-v7-feedback {
  padding: 4px 8px;
  margin: 0;
  font-size: 11px;
  text-align: center;
  color: #ffe3aa;
  align-self: center;
}
#sage-v7-feedback:empty{display:none}
/* Independent history overlay, never changes original reading panel content. */
.sage-v7-history[hidden] {display:none !important}
.sage-v7-history {
  position: fixed !important;
  inset: 0 !important;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index: 12000 !important;
  padding: 16px;
  background: rgba(4, 1, 12, .79);
  backdrop-filter: blur(5px);
}
.sage-v7-history-panel {
  width: min(730px, 100%);
  max-height: min(86dvh, 760px);
  display:flex;flex-direction:column;gap:12px;
  overflow: hidden;
  padding: clamp(17px, 3vw, 27px);
  border: 1px solid #dbb47d;
  border-radius: 20px;
  background: linear-gradient(150deg, rgba(41, 12, 61, .985), rgba(12, 5, 29, .99));
  box-shadow: 0 20px 80px rgba(0,0,0,.6);
  color: #f9e8ca;
  font: 14px/1.5 system-ui, sans-serif;
}
.sage-v7-history-header {display:flex;align-items:start;justify-content:space-between;gap:12px}
.sage-v7-history-panel h2 {color:#ffe0a5;font:500 clamp(24px,3vw,31px)/1.1 Georgia,serif;margin:2px 0 5px}
.sage-v7-history-panel p {margin:0}
.sage-v7-history-header button,.sage-v7-history button {
  cursor:pointer;border:1px solid rgba(226,180,109,.65);border-radius:999px;
  background:rgba(46,20,67,.9);color:#ffe4ad;padding:7px 13px;font:700 12px/1.3 system-ui,sans-serif;
}
.sage-v7-history button:hover{background:#583171}
.sage-v7-history-info {font-size:12px;color:#d9c5e0}
.sage-v7-history-list,.sage-v7-history-detail {overflow-y:auto;min-height:0;flex:1 1 auto;overscroll-behavior:contain}
.sage-v7-history-item {border:1px solid rgba(221,173,116,.4);background:rgba(74,34,90,.32);border-radius:12px;margin:0 0 10px;padding:12px}
.sage-v7-history-item strong {color:#ffe3ad;font:600 17px/1.3 Georgia,serif}
.sage-v7-history-item small {display:block;color:#d7c0df;margin-top:3px;font-size:11px}
.sage-v7-history-actions {display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.sage-v7-history-toolbar {display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}
.sage-v7-history-detail pre {white-space:pre-wrap;overflow-wrap:anywhere;font:14px/1.65 system-ui,sans-serif;color:#f6e9d6;margin:10px 0 0}
.sage-v7-empty {padding:26px 12px;text-align:center;color:#d7c0df}
@media(max-width:620px) {
 .sage-v7-history{padding:7px}
 .sage-v7-history-panel{max-height:92dvh;padding:15px}
 .sage-v7-history-actions{gap:5px}
 .sage-v7-history button{font-size:11px}
 #sage-v7-history-open{min-width:90px!important}
}
@media(prefers-reduced-motion:reduce){.sage-v7-history *{animation:none!important;transition:none!important}}
