/* Opened cards inhabit a full-screen ritual scene. Gallery art and PNG exports
   keep their existing presentation in heroCards.css. */
.hc-viewer {
  --hc-secondary: #a2eeff;
  --hc-display-width: min(34vw, 520px, calc((100dvh - 320px) * .666667));
  --hc-tilt-x: 0deg; --hc-tilt-y: 0deg;
  position: fixed; inset: 0; width: 100vw; height: 100dvh;
  max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: #030711; overflow: hidden; overscroll-behavior: contain;
  isolation: isolate; box-shadow: none;
}
.hc-viewer[open] { animation: none; }
.hc-viewer::backdrop { background: #02040bf5; backdrop-filter: blur(18px); }
.hc-viewer[data-rarity="GR"] { --hc-secondary: #43efff; }
.hc-viewer[data-rarity="LR"] { --hc-secondary: #ffefb6; }
.hc-viewer[data-rarity="UR"] { --hc-secondary: #88f3e5; }

/* The current illustration becomes the world around the card. */
.hc-theatre-scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.hc-theatre-backdrop {
  position: absolute; inset: -5%; width: 110%; height: 110%; object-fit: cover;
  object-position: 50% 40%; opacity: .3; filter: grayscale(1) blur(7px) brightness(.5);
  transform: scale(1.03); transition: filter 1.2s, opacity 1.2s;
}
.hc-viewer[data-color="true"] .hc-theatre-backdrop { opacity: .48; filter: saturate(.75) blur(7px) brightness(.55); }
.hc-theatre-veil { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, #03081400 5%, #03081466 50%, #030711f5 100%), linear-gradient(0deg, #030711 0%, #03071100 42%, #030711aa 100%); }
.hc-theatre-aura { position: absolute; inset: 8% 10% 5%; background: radial-gradient(ellipse at 54% 42%, color-mix(in srgb, var(--hc-accent) 23%, transparent), transparent 48%), radial-gradient(ellipse at 39% 68%, color-mix(in srgb, var(--hc-secondary) 12%, transparent), transparent 50%); opacity: .7; }
.hc-theatre-aura::after { content: ''; position: absolute; inset: 3% 15% 8%; border: 1px solid color-mix(in srgb, var(--hc-accent) 15%, transparent); border-radius: 50%; transform: rotate(-22deg); box-shadow: 0 0 90px color-mix(in srgb, var(--hc-accent) 7%, transparent); }
.hc-theatre-shafts { position: absolute; inset: -20% 0; opacity: .6; transform: rotate(-20deg); }
.hc-theatre-shafts>i { position: absolute; top: -10%; bottom: -10%; width: 9%; left: 34%; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--hc-accent) 13%, transparent), transparent); filter: blur(10px); }
.hc-theatre-shafts>i:nth-child(2) { left: 52%; width: 3%; opacity: .7; }
.hc-theatre-shafts>i:nth-child(3) { left: 69%; width: 5%; opacity: .45; }
.hc-viewer[data-rarity="LR"] .hc-theatre-shafts { opacity: 1; transform: rotate(21deg); }
.hc-viewer[data-rarity="UR"] .hc-theatre-shafts>i { background: linear-gradient(90deg, transparent, #8ad5ff18, #d09cff17, #ffb1d812, transparent); }
.hc-theatre-horizon { position: absolute; left: 12%; right: 12%; bottom: 7%; height: 26%; border-top: 1px solid color-mix(in srgb, var(--hc-accent) 17%, transparent); background: repeating-radial-gradient(ellipse at 50% 0, transparent 0 54px, #becbe90b 55px 56px, transparent 57px 85px); transform: perspective(500px) rotateX(65deg); transform-origin: 50% 0; mask-image: radial-gradient(ellipse at 50% 0, #000, transparent 75%); }
.hc-theatre-motes { position: absolute; inset: 0; }
.hc-theatre-motes>i { position: absolute; left: var(--x); bottom: -30px; width: calc(3px + var(--i) * .5px); height: calc(3px + var(--i) * .5px); background: var(--hc-accent); opacity: 0; transform: rotate(45deg); box-shadow: 0 0 16px color-mix(in srgb, var(--hc-accent) 60%, transparent); }
.hc-viewer[data-rarity="GR"] .hc-theatre-motes>i { border-radius: 50%; background: radial-gradient(circle, #e4fbff, #78caff88 40%, transparent 75%); }
.hc-viewer[data-rarity="LR"] .hc-theatre-motes>i { clip-path: polygon(50% 0, 65% 36%, 100% 50%, 65% 65%, 50% 100%, 36% 65%, 0 50%, 36% 36%); }
.hc-viewer[data-rarity="UR"] .hc-theatre-motes>i { height: calc(8px + var(--i) * 1.3px); clip-path: polygon(50% 0, 95% 32%, 75% 85%, 35% 100%, 0 35%); background: linear-gradient(130deg, #a1edffcc, #b69bff88 35%, #ffb2e1aa 50%, #ffefa866 70%, #9bf6edaa); }

.hc-theatre { position: relative; z-index: 1; display: grid; grid-template-rows: 72px minmax(0, 1fr) 104px; height: 100%; padding-inline: clamp(24px, 4vw, 88px); }
.hc-theatre-topline { position: relative; display: flex; align-items: center; gap: 24px; min-width: 0; }
.hc-theatre-topline::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, #c6b58a3b, #c6b58a12 40%, transparent); }
.hc-theatre-brand { display: flex; align-items: center; gap: 12px; color: #efe5d1; font-size: 14px; letter-spacing: .22em; white-space: nowrap; }
.hc-theatre-brand>i { color: var(--hc-accent); font-size: 30px; font-style: normal; }
.hc-theatre-brand>small { margin-left: 10px; padding-left: 21px; border-left: 1px solid #c6b58a3d; font-size: 9px; letter-spacing: .18em; color: #aab5c7; }
.hc-theatre-record { display: flex; align-items: center; gap: 20px; min-width: 0; margin-left: auto; margin-right: 90px; color: #c6cddb; font-size: 11px; letter-spacing: .12em; }
.hc-theatre-record>i { width: 22px; height: 1px; background: #a9bad057; }
.hc-theatre-record>span { white-space: nowrap; color: #e1d6bf; font-variant-numeric: tabular-nums; }
.hc-viewer .hc-viewer-close { top: 15px; right: 0; display: flex; align-items: center; justify-content: center; gap: 9px; width: 70px; height: 40px; border: 1px solid #d4c08e44; border-radius: 30px; background: #07101b66; color: #dcd3be; }
.hc-viewer-close>span { font-size: 24px; line-height: 1; }
.hc-viewer-close>small { font-size: 8px; letter-spacing: .12em; }
.hc-viewer .hc-viewer-close:hover { background: #d6c49a15; border-color: #d4c08eaa; }

/* The card is the centre of a ritual, surrounded by its echoes. */
.hc-theatre-body { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.7fr) minmax(0, .7fr); align-items: center; gap: 16px; min-height: 0; min-width: 0; }
.hc-theatre-inscription { position: relative; z-index: 4; min-width: 0; padding: 25px 0; }
.hc-theatre-kicker { display: block; color: var(--hc-accent); font-size: 9px; line-height: 1.8; font-weight: 500; letter-spacing: .18em; }
.hc-theatre-hero { display: block; margin-top: 28px; color: #d8cebb; font-size: clamp(15px, 1.25vw, 23px); font-weight: 400; letter-spacing: .04em; }
.hc-theatre-inscription>h2 { color: #f1e8d6; font-size: clamp(28px, 3vw, 56px); font-weight: 400; line-height: 1.13; letter-spacing: -.045em; text-wrap: balance; margin: 12px 0 0; text-shadow: 0 3px 30px #0008; }
.hc-theatre-title-rule { display: flex; align-items: center; gap: 12px; width: 82%; max-width: 250px; margin-top: 27px; color: var(--hc-accent); font-size: 10px; }
.hc-theatre-title-rule>i { display: block; flex: 1; height: 1px; background: linear-gradient(90deg, var(--hc-accent), transparent); opacity: .5; }
.hc-theatre-inscription>.hc-state { margin-top: 19px; font-size: 11px; color: #acb7c7; }
.hc-theatre-inscription>.hc-state.is-active { color: #9ce8cd; }
.hc-theatre-whisper { max-width: 270px; margin-top: 44px; padding-left: 23px; border-left: 1px solid #c9ba932e; }
.hc-theatre-whisper>span { display: block; color: #ccbc95; font-size: 26px; line-height: 1; }
.hc-theatre-whisper>p { color: #b8c2d1; font-size: 12px; line-height: 1.9; font-weight: 400; margin: 12px 0; }
.hc-theatre-whisper>small { display: block; color: #8293ac; font-size: 10px; line-height: 1.8; }
.hc-theatre-stage { position: relative; align-self: stretch; min-height: 0; min-width: 0; isolation: isolate; }
.hc-theatre-sigil { position: absolute; z-index: -1; left: 50%; top: 49%; width: min(135%, 820px); aspect-ratio: 1; transform: translate(-50%, -50%) rotate(-12deg); color: var(--hc-accent); opacity: .22; pointer-events: none; }
.hc-theatre-sigil>svg { display: block; width: 100%; height: 100%; stroke: currentColor; stroke-width: .8; }
.hc-theatre-plinth { position: absolute; z-index: -1; bottom: 26px; left: 50%; width: 110%; height: 80px; transform: translateX(-50%); pointer-events: none; }
.hc-theatre-plinth>i { position: absolute; inset: 0; border: 1px solid color-mix(in srgb, var(--hc-accent) 40%, transparent); border-radius: 50%; background: radial-gradient(ellipse, color-mix(in srgb, var(--hc-accent) 9%, transparent), transparent 70%); box-shadow: 0 -4px 30px color-mix(in srgb, var(--hc-accent) 6%, transparent); }
.hc-theatre-plinth>i:nth-child(2) { inset: 13px 11%; opacity: .45; }
.hc-theatre-plinth>span { position: absolute; inset: 25px 12% -18px; background: radial-gradient(ellipse, color-mix(in srgb, var(--hc-accent) 26%, transparent), transparent 70%); filter: blur(15px); }
.hc-viewer .hc-viewer-art { position: absolute; z-index: 3; inset: 0; display: flex; overflow: auto; background: transparent; pointer-events: none; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #b8a4c546 transparent; max-height: none; min-height: 0; }
.hc-viewer .hc-zoom-canvas { flex: 0 0 auto; width: calc(var(--hc-zoom, 1) * var(--hc-display-width)); min-width: 0; margin: auto; padding: 64px; box-sizing: content-box; pointer-events: auto; }
.hc-theatre-card-mount { position: relative; }
.hc-viewer .hc-theatre-card-mount>.hc-card { transform: perspective(1400px) rotateX(var(--hc-tilt-x)) rotateY(var(--hc-tilt-y)); transform-origin: 50% 50%; filter: drop-shadow(0 22px 26px #000a); transition: transform .2s ease-out, filter .7s; }
.hc-viewer .hc-theatre-card-mount>.hc-card[data-active="false"]:not(.is-color-preview) { filter: grayscale(1) brightness(.85) drop-shadow(0 22px 26px #000a); }
.hc-viewer .hc-theatre-card-mount .hc-card-edition { font-size: clamp(10px, 1.1vw, 16px); }
.hc-viewer .hc-theatre-card-mount .hc-card-caption>small { font-size: clamp(7px, .65vw, 11px); }
.hc-viewer .hc-theatre-card-mount .hc-card-caption>strong { font-size: clamp(13px, 1.35vw, 23px); }
.hc-theatre-glint { position: absolute; z-index: 5; inset: 0; border-radius: 3%; pointer-events: none; mix-blend-mode: screen; background: radial-gradient(ellipse at var(--hc-glint-x, 50%) var(--hc-glint-y, 35%), #dbf4ff30, #fff0 56%); opacity: 0; transform: perspective(1400px) rotateX(var(--hc-tilt-x)) rotateY(var(--hc-tilt-y)); transition: opacity .4s, transform .2s; }
.hc-theatre-card-mount:hover>.hc-theatre-glint { opacity: .75; }
.hc-theatre-echo { position: absolute; z-index: 2; top: 49%; width: 39%; max-width: 190px; border: 0; padding: 0; background: none; opacity: .24; filter: blur(.6px); transform: translateY(-50%) rotate(-12deg) scale(.88); transition: opacity .3s, filter .3s, transform .3s; }
.hc-theatre-echo-previous { left: -2%; }
.hc-theatre-echo-next { right: -2%; transform: translateY(-50%) rotate(12deg) scale(.88); }
.hc-theatre-echo>span { display: block; }
.hc-theatre-echo :is(.hc-token, .hc-card-caption, .hc-card-edition, .hc-foil) { display: none; }
.hc-theatre-echo:hover, .hc-theatre-echo:focus-visible { opacity: .65; filter: none; }
.hc-theatre-echo-previous:hover { transform: translate(-6px, -50%) rotate(-10deg) scale(.93); }
.hc-theatre-echo-next:hover { transform: translate(6px, -50%) rotate(10deg) scale(.93); }
.hc-viewer.is-zoomed .hc-viewer-art { pointer-events: auto; cursor: grab; }
.hc-viewer.is-dragging .hc-viewer-art { cursor: grabbing; user-select: none; }
.hc-viewer.is-zoomed .hc-theatre-card-mount { animation: none !important; }
.hc-viewer.is-zoomed .hc-theatre-card-mount>.hc-card { transform: none; }
.hc-viewer.is-zoomed .hc-theatre-glint { display: none; }
.hc-viewer.is-zoomed :is(.hc-theatre-sigil, .hc-theatre-echo, .hc-theatre-plinth) { opacity: .08; }

/* A large sculpted rarity seal replaces the former information panel. */
.hc-theatre-rarity { position: relative; z-index: 2; min-width: 0; padding: 25px 0 25px 15px; text-align: center; isolation: isolate; }
.hc-theatre-rarity-ghost { position: absolute; z-index: -1; top: 11%; left: -7%; right: -7%; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--hc-accent) 19%, transparent); font: 300 clamp(120px, 17vw, 320px)/1 Georgia, serif; letter-spacing: -.12em; opacity: .65; pointer-events: none; }
.hc-theatre-rarity>.hc-theatre-kicker { font-size: 8px; letter-spacing: .2em; }
.hc-theatre-medallion { position: relative; display: grid; place-items: center; width: clamp(105px, 11vw, 180px); aspect-ratio: 1; margin: 42px auto 37px; }
.hc-theatre-medallion::before, .hc-theatre-medallion::after { content: ''; position: absolute; inset: -18px; border: 1px solid color-mix(in srgb, var(--hc-accent) 25%, transparent); border-radius: 50%; }
.hc-theatre-medallion::after { inset: -27px; border-style: dashed; opacity: .3; transform: rotate(20deg); }
.hc-theatre-medallion>i { position: absolute; width: 6px; height: 6px; top: -20px; left: calc(50% - 3px); background: var(--hc-accent); transform: rotate(45deg); box-shadow: 0 0 12px var(--hc-accent); }
.hc-theatre-medallion>img { position: relative; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 0 22px color-mix(in srgb, var(--hc-accent) 28%, transparent)); }
.hc-theatre-rarity>strong { display: block; color: #ebdfc8; font-size: clamp(20px, 2vw, 34px); line-height: 1.3; font-weight: 300; letter-spacing: .03em; }
.hc-theatre-material { display: block; font-size: 11px; line-height: 1.8; color: #a6b4c7; margin-top: 9px; }
.hc-theatre-edition { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 28px; color: #899bb2; font-size: 8px; letter-spacing: .16em; }
.hc-theatre-edition>b { font-size: 14px; font-weight: 400; color: #ddcfae; }
.hc-theatre-edition>i { width: 20px; height: 1px; background: #b0bbcf33; }

/* The controls are a quiet HUD at the edge of the scene. */
.hc-theatre-footer { position: relative; z-index: 6; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 24px; min-width: 0; padding: 12px 0 18px; }
.hc-theatre-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, #c4ad7b44, transparent); }
.hc-theatre-preview { justify-self: start; min-width: 0; }
.hc-viewer .hc-theatre-reveal { gap: 9px; width: auto; min-height: 42px; padding: 8px 13px; border: 1px solid #b4bbd245; border-radius: 30px; background: #0e18244d; color: #cdd5e2; white-space: nowrap; }
.hc-viewer .hc-theatre-reveal>span { color: var(--hc-accent); font-size: 23px; }
.hc-viewer .hc-theatre-reveal[aria-pressed="true"] { border-color: color-mix(in srgb, var(--hc-accent) 65%, transparent); color: #f8eaff; background: color-mix(in srgb, var(--hc-accent) 9%, #0e182466); box-shadow: 0 0 25px color-mix(in srgb, var(--hc-accent) 9%, transparent); }
.hc-viewer .hc-theatre-reveal[aria-pressed="true"]>i { background: linear-gradient(90deg, var(--hc-accent), var(--hc-secondary)); }
.hc-theatre-preview>.hc-preview-note { margin: 7px 0 0 15px; font-size: 9px; color: #8397ad; }
.hc-theatre-awakened { display: flex; align-items: center; gap: 12px; color: #a9cfb9; font-size: 9px; letter-spacing: .12em; line-height: 1.8; }
.hc-theatre-awakened>i { color: #e2d4a8; font-size: 27px; font-style: normal; }
.hc-viewer .hc-theatre-navigation { display: flex; justify-content: center; gap: 12px; width: auto; min-width: 0; margin: 0; padding: 0; border: 0; }
.hc-theatre-navigation>[data-hc-step] { flex-shrink: 0; width: 42px; height: 42px; background: #0d172055; border-color: #beab7b50; }
.hc-theatre-pages { position: relative; display: flex; align-items: center; gap: 6px; max-width: min(42vw, 580px); min-width: 0; overflow-x: auto; padding: 10px 9px; scrollbar-width: none; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
.hc-theatre-pages::-webkit-scrollbar { display: none; }
.hc-viewer .hc-theatre-page { position: relative; flex: 0 0 32px; width: 32px; height: 48px; border: 1px solid #a6adbd55; border-radius: 3px; background: #07111b; padding: 0; transform: scale(.9) translateY(2px); scroll-snap-align: center; transition: transform .25s, border-color .25s, box-shadow .25s; }
.hc-theatre-page>img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 2px; filter: grayscale(1); opacity: .5; transition: opacity .3s; }
.hc-theatre-page>img.is-active { filter: none; }
.hc-theatre-page>span { position: absolute; left: 0; bottom: 0; width: 100%; padding-block: 2px; background: #0207129c; color: #e6dbc5; text-align: center; font-size: 7px; line-height: 1.2; letter-spacing: .08em; }
.hc-viewer .hc-theatre-page[aria-current="true"] { transform: scale(1.05) translateY(-3px); border-color: var(--hc-accent); box-shadow: 0 0 16px color-mix(in srgb, var(--hc-accent) 24%, transparent); }
.hc-theatre-page[aria-current="true"]>img { opacity: .95; }
.hc-viewer[data-color="true"] .hc-theatre-page[aria-current="true"]>img { filter: none; }
.hc-viewer .hc-theatre-page:hover { transform: scale(1.05) translateY(-3px); border-color: #ece0b6; }
.hc-theatre-page:hover>img { opacity: 1; }
.hc-viewer .hc-theatre-zoom { justify-self: end; justify-content: flex-end; gap: 7px; width: auto; min-width: 0; padding: 0; }
.hc-viewer .hc-theatre-zoom>button { min-width: 36px; min-height: 36px; border-radius: 50%; border-color: #b4bbd23d; background: #0d172055; font-size: 17px; }
.hc-viewer .hc-theatre-zoom>output { min-width: 38px; font-size: 11px; color: #b4c1d2; }
.hc-viewer .hc-theatre-zoom>[data-hc-fit] { border-radius: 30px; padding-inline: 12px; font-size: 10px; margin-left: 5px; }
.hc-theatre-zoom>button:hover { border-color: #e1d0a6; color: #fff0cf; }

@media (max-width: 1100px) and (min-width: 741px) {
  .hc-theatre { padding-inline: 24px; }
  .hc-theatre-body { grid-template-columns: minmax(0, .8fr) minmax(0, 1.8fr) minmax(0, .65fr); gap: 8px; }
  .hc-theatre-inscription>h2 { font-size: 32px; }
  .hc-theatre-kicker { font-size: 8px; }
  .hc-theatre-whisper { padding-left: 15px; margin-top: 28px; }
  .hc-theatre-whisper>p { font-size: 11px; }
  .hc-theatre-medallion { width: 100px; }
  .hc-theatre-rarity>.hc-theatre-kicker { letter-spacing: .08em; }
  .hc-theatre-material { font-size: 10px; }
  .hc-theatre-footer { column-gap: 12px; }
  .hc-theatre-pages { max-width: 35vw; }
  .hc-viewer .hc-theatre-page { flex-basis: 29px; width: 29px; height: 43px; }
  .hc-viewer .hc-theatre-reveal { font-size: 10px !important; padding-inline: 10px; }
  .hc-theatre-preview>.hc-preview-note { font-size: 8px; }
  .hc-viewer .hc-theatre-zoom { gap: 4px; }
  .hc-viewer .hc-theatre-zoom>[data-hc-fit] { padding-inline: 9px; margin-left: 0; }
}
@media (max-height: 760px) and (min-width: 741px) {
  .hc-theatre-whisper { display: none; }
  .hc-theatre-hero { margin-top: 15px; }
  .hc-theatre-inscription>h2 { font-size: clamp(25px, 2.8vw, 43px); }
  .hc-theatre-medallion { width: 100px; margin-block: 30px; }
  .hc-theatre-rarity>strong { font-size: 24px; }
  .hc-theatre-edition { margin-top: 15px; }
}
@media (max-width: 740px) {
  .hc-viewer { --hc-display-width: min(72vw, calc((100dvh - 400px) * .666667)); }
  .hc-theatre { grid-template-rows: 56px minmax(0, 1fr) auto; padding-inline: 12px; }
  .hc-theatre-brand { gap: 8px; font-size: 12px; }
  .hc-theatre-brand>i { font-size: 25px; }
  .hc-theatre-brand>small { display: none; }
  .hc-theatre-record { font-size: 0; gap: 0; margin-right: 57px; }
  .hc-theatre-record>i { display: none; }
  .hc-theatre-record>span { font-size: 10px; letter-spacing: .08em; }
  .hc-viewer .hc-viewer-close { top: 9px; width: 37px; height: 37px; }
  .hc-viewer-close>small { display: none; }
  .hc-theatre-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 0; }
  .hc-theatre-inscription { padding: 12px 10px 0; text-align: center; }
  .hc-theatre-inscription>.hc-theatre-kicker, .hc-theatre-title-rule, .hc-theatre-whisper, .hc-theatre-rarity { display: none; }
  .hc-theatre-hero { font-size: 12px; margin-top: 0; color: #c2b59a; }
  .hc-theatre-inscription>h2 { font-size: clamp(22px, 5.4vw, 29px); margin-top: 5px; line-height: 1.16; }
  .hc-theatre-inscription>.hc-state { margin: 8px 0 0; font-size: 9px; }
  .hc-theatre-stage { width: 100%; }
  .hc-viewer .hc-zoom-canvas { padding: 40px; }
  .hc-theatre-sigil { width: 115%; max-width: 520px; }
  .hc-theatre-plinth { bottom: 10px; width: 95%; height: 53px; }
  .hc-theatre-echo { width: 32%; max-width: 130px; }
  .hc-theatre-echo-previous { left: 1%; }
  .hc-theatre-echo-next { right: 1%; }
  .hc-viewer .hc-theatre-card-mount .hc-card-caption>strong { font-size: clamp(10px, 3.3vw, 16px); }
  .hc-viewer .hc-theatre-card-mount .hc-card-caption>small { font-size: 7px; }
  .hc-viewer .hc-theatre-card-mount .hc-card-edition { font-size: 10px; }
  .hc-theatre-footer { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 4px 0 max(9px, env(safe-area-inset-bottom)); }
  .hc-viewer .hc-theatre-navigation { grid-column: 1 / -1; grid-row: 1; gap: 10px; }
  .hc-theatre-navigation>[data-hc-step] { width: 38px; height: 38px; }
  .hc-theatre-pages { max-width: calc(100vw - 145px); padding-block: 9px; }
  .hc-viewer .hc-theatre-page { flex-basis: 29px; width: 29px; height: 43px; }
  .hc-theatre-preview { grid-column: 1; grid-row: 2; }
  .hc-viewer .hc-theatre-reveal { font-size: 10px !important; gap: 7px; padding: 7px 10px; min-height: 40px; }
  .hc-viewer .hc-theatre-reveal>span { font-size: 20px; }
  .hc-theatre-reveal>i { width: 24px; }
  .hc-theatre-preview>.hc-preview-note { display: none; }
  .hc-viewer .hc-theatre-zoom { grid-column: 2; grid-row: 2; gap: 5px; }
  .hc-viewer .hc-theatre-zoom>button { min-width: 32px; min-height: 36px; }
  .hc-viewer .hc-theatre-zoom>output { min-width: 32px; font-size: 9px; }
  .hc-viewer .hc-theatre-zoom>[data-hc-fit] { padding-inline: 9px; font-size: 9px; margin-left: 0; }
  .hc-theatre-awakened { font-size: 8px; gap: 7px; }
}
@media (max-width: 380px) {
  .hc-theatre { padding-inline: 9px; }
  .hc-viewer .hc-theatre-reveal { gap: 5px; padding-inline: 8px; }
  .hc-theatre-reveal>i { display: none; }
  .hc-viewer .hc-theatre-zoom { gap: 3px; }
  .hc-viewer .hc-theatre-zoom>[data-hc-fit] { font-size: 8px; padding-inline: 6px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .hc-viewer { --hc-display-width: min(34vw, calc((100dvh - 150px) * .666667)); }
  .hc-theatre { grid-template-rows: 44px minmax(0, 1fr) 60px; padding-inline: 18px; }
  .hc-theatre-brand>small { display: none; }
  .hc-viewer .hc-viewer-close { top: 5px; height: 32px; }
  .hc-theatre-body { grid-template-columns: minmax(0, .9fr) minmax(0, 1.6fr) minmax(0, .7fr); grid-template-rows: minmax(0, 1fr); gap: 8px; }
  .hc-theatre-inscription { padding: 0; text-align: left; }
  .hc-theatre-inscription>.hc-theatre-kicker { display: none; }
  .hc-theatre-hero { font-size: 12px; }
  .hc-theatre-inscription>h2 { font-size: clamp(20px, 2.8vw, 27px); margin-top: 7px; }
  .hc-theatre-inscription>.hc-state { font-size: 9px; margin-top: 12px; }
  .hc-theatre-title-rule, .hc-theatre-whisper { display: none; }
  .hc-viewer .hc-zoom-canvas { padding: 24px; }
  .hc-viewer .hc-theatre-card-mount .hc-card-caption>strong { font-size: 10px; }
  .hc-viewer .hc-theatre-card-mount .hc-card-edition { font-size: 8px; }
  .hc-theatre-rarity { display: block; padding: 0; }
  .hc-theatre-rarity>.hc-theatre-kicker, .hc-theatre-rarity-ghost, .hc-theatre-edition { display: none; }
  .hc-theatre-medallion { width: 65px; margin: 20px auto; }
  .hc-theatre-medallion::before { inset: -10px; }
  .hc-theatre-medallion::after { inset: -16px; }
  .hc-theatre-medallion>i { top: -13px; }
  .hc-theatre-rarity>strong { font-size: 18px; }
  .hc-theatre-material { font-size: 8px; }
  .hc-theatre-footer { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: 0; gap: 10px; }
  .hc-viewer .hc-theatre-navigation { grid-column: 2; grid-row: 1; gap: 7px; }
  .hc-theatre-pages { max-width: 34vw; padding-block: 5px; }
  .hc-viewer .hc-theatre-page { flex-basis: 22px; width: 22px; height: 33px; }
  .hc-theatre-navigation>[data-hc-step] { width: 32px; height: 32px; }
  .hc-theatre-preview { grid-column: 1; grid-row: 1; }
  .hc-theatre-preview>.hc-preview-note { display: none; }
  .hc-viewer .hc-theatre-reveal { min-height: 32px; font-size: 9px !important; padding: 5px 9px; gap: 6px; }
  .hc-theatre-reveal>i { display: none; }
  .hc-viewer .hc-theatre-zoom { grid-column: 3; grid-row: 1; gap: 3px; }
  .hc-viewer .hc-theatre-zoom>button { min-width: 30px; min-height: 32px; }
  .hc-viewer .hc-theatre-zoom>output { font-size: 9px; min-width: 30px; }
  .hc-viewer .hc-theatre-zoom>[data-hc-fit] { padding-inline: 7px; font-size: 8px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hc-viewer[open] .hc-theatre-inscription { animation: hc-theatre-arrive .6s ease-out both; }
  .hc-viewer[open] .hc-viewer-art { animation: hc-theatre-summon .7s cubic-bezier(.2,.7,.2,1) both; }
  .hc-viewer[open].is-zoomed .hc-viewer-art { animation: none; }
  .hc-viewer[open] .hc-theatre-card-mount { animation: hc-theatre-suspend 6s ease-in-out infinite; }
  .hc-viewer[open] .hc-theatre-sigil>svg { animation: hc-theatre-orbit 110s linear infinite; }
  .hc-viewer[open] .hc-theatre-medallion::after { animation: hc-theatre-orbit 65s linear infinite reverse; }
  .hc-viewer[open] .hc-theatre-aura { animation: hc-theatre-breathe 9s ease-in-out infinite alternate; }
  .hc-viewer[open] .hc-theatre-motes>i { animation: hc-theatre-drift calc(11s + var(--i) * .6s) linear var(--delay) infinite; }
}
.sanctuary-motion-paused .hc-viewer *,
.sanctuary-motion-paused .hc-viewer *::before,
.sanctuary-motion-paused .hc-viewer *::after,
.hc-viewer.is-paused *, .hc-viewer.is-paused *::after { animation: none !important; }
.sanctuary-motion-paused .hc-theatre-card-mount>.hc-card { transform: none; }
.sanctuary-motion-paused .hc-theatre-glint { display: none; }
@media (prefers-reduced-motion: reduce) {
  .hc-viewer *, .hc-viewer *::before, .hc-viewer *::after { animation: none !important; transition: none !important; }
  .hc-theatre-motes { display: none; }
  .hc-viewer .hc-theatre-card-mount>.hc-card { transform: none; }
}
@keyframes hc-theatre-arrive { from { opacity: 0; } to { opacity: 1; } }
@keyframes hc-theatre-summon { from { opacity: 0; transform: translateY(22px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes hc-theatre-suspend { 0%, 100% { translate: 0 3px; } 50% { translate: 0 -5px; } }
@keyframes hc-theatre-orbit { from { rotate: 0deg; } to { rotate: 360deg; } }
@keyframes hc-theatre-breathe { from { opacity: .4; } to { opacity: .85; } }
@keyframes hc-theatre-drift { 0% { translate: 0 0; opacity: 0; rotate: 0deg; } 15% { opacity: .45; } 75% { opacity: .3; } 100% { translate: 35px -90dvh; opacity: 0; rotate: 120deg; } }
