/* ================================================================
   Таро — «Звёздный стол». Стили страницы taro.html
   ================================================================ */

@property --th-c {
  syntax: '<color>';
  inherits: true;
  initial-value: #d8b46a;
}

body.taro-page {
  --t-deep: #06070c;
  --t-night: #0a0c18;
  --t-gold: #d8b46a;
  --t-gold-l: #f4dfa6;
  --t-gold-d: #6e5528;
  --t-line: rgba(216, 180, 106, 0.28);
  --th-c: #d8b46a;
  background: var(--t-deep);
}

.th-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------------- Hero / carousel ---------------- */
.taro-carousel-hero {
  position: relative;
  overflow: hidden;
  padding: 46px 0 56px;
  background:
    radial-gradient(ellipse 46% 50% at 50% 40%, color-mix(in srgb, var(--th-c) 16%, transparent), transparent 72%),
    radial-gradient(ellipse 110% 70% at 50% -10%, #141838 0%, transparent 62%),
    linear-gradient(to bottom, #080a15 0%, var(--t-deep) 100%);
  transition: --th-c 0.9s ease;
  isolation: isolate;
}
.taro-carousel-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--t-deep));
  pointer-events: none;
  z-index: 0;
}
.th-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* Astrolabe ring with all 22 arcana numerals */
.th-astro {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--card-w, 280px) * 2);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  animation: thAstroIn 1.6s ease 0.2s forwards;
}
.th-astro svg { width: 100%; height: 100%; overflow: visible; display: block; }
.th-astro .ring-line { fill: none; stroke: var(--t-gold); }
.th-astro .ring-nums,
.th-astro .ring-slow,
.th-astro .ring-rev {
  transform-box: view-box;
  transform-origin: 0 0; /* центр viewBox (-340 -340 680 680) — точка 0,0 */
}
.th-astro .ring-nums { transition: transform var(--spin-dur, 1.1s) cubic-bezier(.22,.8,.26,1); }
.th-astro .ring-slow { animation: thSpin 240s linear infinite; }
.th-astro .ring-rev { animation: thSpin 360s linear infinite reverse; }
.th-astro .num-t {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  fill: var(--t-gold);
  opacity: 0.55;
  text-anchor: middle;
  dominant-baseline: middle;
  transition: opacity .5s ease, fill .5s ease;
}
.th-astro .num-t.on {
  fill: var(--t-gold-l);
  opacity: 1;
  filter: drop-shadow(0 0 6px rgba(244, 223, 166, 0.85));
}
.th-astro .pointer { fill: var(--t-gold-l); filter: drop-shadow(0 0 5px rgba(244,223,166,.8)); }
@keyframes thAstroIn { to { opacity: 0.62; } }
@media (max-width: 700px) { .th-astro .num-t { font-size: 24px; } .th-astro .ring-nums text { opacity: .45; } }
@keyframes thSpin { to { transform: rotate(360deg); } }

/* settings (dev tool for card sizes) */
.carousel-settings-toggle {
  position: absolute;
  top: 16px;
  right: 22px;
  z-index: 30;
  width: 36px;
  height: 36px;
  border: 1px solid var(--t-line);
  background: rgba(8, 9, 16, 0.7);
  color: var(--ink-muted);
  border-radius: 50%;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s ease, border-color .2s ease, transform .4s ease;
}
.carousel-settings-toggle:hover { color: var(--t-gold-l); border-color: var(--t-gold); transform: rotate(60deg); }

.carousel-settings-panel {
  position: absolute;
  top: 60px;
  right: 22px;
  z-index: 30;
  width: 270px;
  background: linear-gradient(160deg, #11131f, #08090f);
  border: 1px solid var(--t-line);
  border-radius: 10px;
  padding: 18px;
  display: none;
  flex-direction: column;
  gap: 16px;
  box-shadow: inset 0 0 0 4px #08090f, inset 0 0 0 5px rgba(216,180,106,.12), 0 24px 50px rgba(0,0,0,.6);
}
.carousel-settings-panel.is-open { display: flex; animation: thPop .25s ease; }
.settings-row { display: flex; flex-direction: column; gap: 8px; }
.settings-row label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.settings-row input[type="range"] { width: 100%; accent-color: var(--t-gold); }
.settings-val { color: var(--t-gold-l); text-transform: none; letter-spacing: 0; }
.settings-divider { height: 1px; background: var(--t-line); margin: 2px 0; }
.settings-row select {
  width: 100%;
  background: #06070c;
  border: 1px solid var(--t-line);
  color: var(--ink-parchment);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 8px;
  border-radius: 6px;
}
.settings-reset {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
  border: 1px solid var(--t-line);
  color: var(--ink-muted);
  padding: 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease;
}
.settings-reset:hover { color: var(--t-gold-l); border-color: var(--t-gold); }
.settings-export-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--t-gold-l);
  text-align: center;
  margin: -6px 0 0;
}
@keyframes thPop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.carousel-stage {
  position: relative;
  z-index: 1;
  height: clamp(340px, 44vw, 500px);
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: pan-y;
}
.carousel-track {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
}
.carousel-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--card-w, 280px);
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  transform-origin: center center;
  transition:
    transform var(--spin-dur, .6s) cubic-bezier(.2,.7,.3,1),
    opacity var(--spin-dur, .6s) ease;
}
.carousel-card img {
  width: 100%;
  display: block;
  filter: drop-shadow(0 22px 34px rgba(0,0,0,0.7)) brightness(0.6) saturate(0.78);
  transition: filter .6s ease;
}
.carousel-card:not([data-current="true"]):hover img {
  filter: drop-shadow(0 22px 34px rgba(0,0,0,0.7)) brightness(0.85) saturate(0.95);
}
.carousel-card[data-current="true"] img {
  filter:
    drop-shadow(0 30px 46px rgba(0,0,0,0.72))
    drop-shadow(0 0 30px color-mix(in srgb, var(--th-c) 42%, transparent));
  animation: thFloat 6.5s ease-in-out infinite;
  -webkit-box-reflect: below 4px linear-gradient(transparent 88%, rgba(255,255,255,0.14));
}
.carousel-stage.spinning .carousel-card img { animation: none; }
.carousel-stage.drawn .carousel-card[data-current="true"] img {
  animation: thDrawn 1.4s ease-out, thFloat 6.5s ease-in-out 1.4s infinite;
}
@keyframes thFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
@keyframes thDrawn {
  0% { transform: scale(1); filter: drop-shadow(0 30px 46px rgba(0,0,0,.72)) drop-shadow(0 0 0 transparent) brightness(1); }
  25% { transform: scale(1.05); filter: drop-shadow(0 30px 46px rgba(0,0,0,.72)) drop-shadow(0 0 60px var(--th-c)) brightness(1.3); }
  100% { transform: scale(1); }
}
/* gold burst when a card is drawn */
.th-burst {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--card-w, 280px) * 1.9);
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.4);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  background:
    repeating-conic-gradient(from 0deg, color-mix(in srgb, var(--th-c) 55%, transparent) 0deg 2deg, transparent 2deg 15deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%);
          mask: radial-gradient(circle, #000 18%, transparent 68%);
}
.carousel-stage.drawn .th-burst { animation: thBurst 1.5s ease-out; }
@keyframes thBurst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(0deg); }
  20% { opacity: .9; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.25) rotate(40deg); }
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 54px;
  height: 54px;
  padding: 0;
  border: 1px solid rgba(216, 180, 106, 0.5);
  background: radial-gradient(circle at 50% 40%, rgba(24, 22, 36, 0.92), rgba(7, 8, 14, 0.85));
  color: var(--t-gold-l);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    inset 0 0 0 4px rgba(6, 7, 12, 0.9),
    inset 0 0 0 5px rgba(216, 180, 106, 0.22),
    0 8px 22px rgba(0, 0, 0, 0.55);
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s ease;
}
.carousel-arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.carousel-arrow:hover {
  border-color: var(--t-gold);
  transform: translateY(-50%) scale(1.07);
  box-shadow:
    inset 0 0 0 4px rgba(6, 7, 12, 0.9),
    inset 0 0 0 5px rgba(216, 180, 106, 0.4),
    0 0 26px rgba(216, 180, 106, 0.32),
    0 8px 22px rgba(0, 0, 0, 0.55);
}
.carousel-arrow:focus-visible { outline: 1px solid var(--t-gold-l); outline-offset: 3px; }
.carousel-arrow.prev { left: 22px; }
.carousel-arrow.next { right: 22px; }

/* caption */
.taro-carousel-caption {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: 26px;
}
.carousel-num {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--t-gold);
  text-transform: uppercase;
}
.carousel-num::before,
.carousel-num::after {
  content: "";
  width: 56px;
  height: 7px;
  background:
    linear-gradient(var(--t-gold), var(--t-gold)) center / 100% 1px no-repeat;
  -webkit-mask: linear-gradient(90deg, transparent, #000 70%);
          mask: linear-gradient(90deg, transparent, #000 70%);
}
.carousel-num::after { transform: scaleX(-1); }
.carousel-name {
  font-family: 'Cinzel Decorative', var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.15;
  letter-spacing: 0.03em;
  margin: 10px 0 4px;
  background: linear-gradient(180deg, #fff6da 0%, #ecd08e 42%, #a87d3a 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 18px color-mix(in srgb, var(--th-c) 40%, transparent));
}
.carousel-en {
  margin: 0;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-muted);
}
.carousel-path {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.carousel-path::before {
  content: "";
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border: 1px solid var(--th-c);
  box-shadow: 0 0 8px color-mix(in srgb, var(--th-c) 70%, transparent);
}
.taro-carousel-caption.swap .carousel-num,
.taro-carousel-caption.swap .carousel-name,
.taro-carousel-caption.swap .carousel-en,
.taro-carousel-caption.swap .carousel-path {
  animation: thCapIn .6s cubic-bezier(.2,.7,.3,1) both;
}
.taro-carousel-caption.swap .carousel-name { animation-delay: .05s; }
.taro-carousel-caption.swap .carousel-en { animation-delay: .1s; }
.taro-carousel-caption.swap .carousel-path { animation-delay: .15s; }
@keyframes thCapIn {
  from { opacity: 0; transform: translateY(10px); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
/* the gradient title keeps its own glow filter */
.taro-carousel-caption.swap .carousel-name { animation-name: thCapInName; }
@keyframes thCapInName {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.carousel-pips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 14px auto 0;
  max-width: 420px;
}
.carousel-pips button {
  width: 15px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-pips button::before {
  content: "";
  width: 6px;
  height: 6px;
  transform: rotate(45deg);
  border: 1px solid var(--t-gold-d);
  transition: background .3s ease, border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.carousel-pips button:hover::before { border-color: var(--t-gold); }
.carousel-pips button.on::before {
  background: var(--t-gold-l);
  border-color: var(--t-gold-l);
  transform: rotate(45deg) scale(1.35);
  box-shadow: 0 0 10px rgba(244, 223, 166, 0.7);
}

.carousel-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.th-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border: 1px solid rgba(216, 180, 106, 0.45);
  border-radius: 40px;
  background: rgba(216, 180, 106, 0.05);
  color: var(--t-gold-l);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, color .25s ease;
}
.th-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.th-btn:hover {
  background: rgba(216, 180, 106, 0.13);
  border-color: var(--t-gold);
  box-shadow: 0 0 22px rgba(216, 180, 106, 0.22);
}
.th-btn:focus-visible { outline: 1px solid var(--t-gold-l); outline-offset: 3px; }
.th-btn.primary {
  background: linear-gradient(180deg, #e9cb86, #b48a43);
  border-color: #f2dba0;
  color: #17110a;
}
.th-btn.primary:hover { background: linear-gradient(180deg, #f6dda2, #c49950); box-shadow: 0 0 26px rgba(233, 203, 134, 0.4); }
.th-btn[disabled] { opacity: .5; cursor: default; }

@media (max-width: 700px) {
  .taro-carousel-hero { padding: 48px 0 48px; }
  .carousel-arrow { width: 40px; height: 40px; }
  .carousel-arrow svg { width: 15px; height: 15px; }
  .carousel-arrow.prev { left: 8px; }
  .carousel-arrow.next { right: 8px; }
  .taro-carousel-caption { margin-top: 34px; }
  .carousel-num::before, .carousel-num::after { width: 34px; }
  .carousel-en { font-size: 16px; }
  .carousel-pips { gap: 2px; }
  .carousel-pips button { width: 13px; }
  .carousel-pips button::before { width: 5px; height: 5px; }
}
@media (max-width: 560px) {
  .carousel-settings-toggle { right: 12px; top: 10px; }
  .carousel-settings-panel { right: 12px; left: 12px; width: auto; top: 54px; }
  .th-btn { padding: 10px 16px; font-size: 11px; }
}

/* ---------------- Archive grid ---------------- */
main.taro-main {
  position: relative;
  padding-top: 30px;
  padding-bottom: 50px;
}
.th-sec {
  text-align: center;
  margin: 0 0 44px;
}
.th-sec h2 {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin: 0;
  font-family: 'Cinzel Decorative', var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0.03em;
  color: var(--t-gold-l);
}
.th-sec h2::before,
.th-sec h2::after {
  content: "";
  width: clamp(40px, 9vw, 110px);
  height: 11px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 11 11'%3E%3Cpath d='M5.5 0.8L10.2 5.5 5.5 10.2 0.8 5.5Z' fill='none' stroke='%23d8b46a'/%3E%3C/svg%3E") right center / 11px 11px no-repeat,
    linear-gradient(90deg, transparent, var(--t-gold)) left center / calc(100% - 14px) 1px no-repeat;
}
.th-sec h2::after { transform: scaleX(-1); }
.th-sec p {
  margin: 12px 0 0;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 17px;
  color: var(--ink-muted);
}
.th-sec p b { font-style: normal; font-family: var(--font-display); font-weight: 500; font-size: 13px; letter-spacing: .14em; color: var(--t-gold); }

.taro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 36px 26px;
  margin-bottom: 80px;
}

.taro-card {
  --c: #d8b46a;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  text-align: center;
  cursor: pointer;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.3,1);
}
.taro-card.in { opacity: 1; transform: none; }

.tc-frame {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4.3;
  border-radius: 10px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 52% at 50% 48%, color-mix(in srgb, var(--c) 34%, transparent), transparent 72%),
    radial-gradient(ellipse 90% 40% at 50% 112%, color-mix(in srgb, var(--c) 26%, transparent), transparent 70%),
    linear-gradient(170deg, #11131f 0%, #07080d 100%);
  border: 1px solid var(--t-line);
  box-shadow:
    inset 0 0 0 5px #07080d,
    inset 0 0 0 6px rgba(216, 180, 106, 0.14),
    0 16px 32px rgba(0, 0, 0, 0.45);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s cubic-bezier(.2,.7,.3,1), box-shadow .4s ease, border-color .4s ease;
}
.taro-card.tilting .tc-frame { transition: transform .12s linear, box-shadow .4s ease, border-color .4s ease; }
.tc-c {
  position: absolute;
  width: 26px;
  height: 26px;
  z-index: 3;
  pointer-events: none;
  opacity: .75;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 28' fill='none' stroke='%23d8b46a' stroke-width='1'%3E%3Cpath d='M1.5 26V9.5Q1.5 1.5 9.5 1.5H26'/%3E%3Cpath d='M5.5 20V11Q5.5 5.5 11 5.5H20' stroke-opacity='.5'/%3E%3Ccircle cx='10' cy='10' r='1.5' fill='%23d8b46a' stroke='none'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: opacity .4s ease;
}
.tc-c.tl { top: 9px; left: 9px; }
.tc-c.tr { top: 9px; right: 9px; transform: scaleX(-1); }
.tc-c.bl { bottom: 9px; left: 9px; transform: scaleY(-1); }
.tc-c.br { bottom: 9px; right: 9px; transform: scale(-1, -1); }

.tc-art {
  position: absolute;
  inset: 20px 16px;
  z-index: 1;
  display: block;
}
.tc-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.62));
  transform: scale(var(--grid-scale, 1));
  transition: transform .55s cubic-bezier(.2,.7,.3,1), filter .45s ease;
}
.tc-art .empty-glyph {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cinzel Decorative', var(--font-display);
  font-size: 46px;
  color: var(--t-gold-d);
}
.tc-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(255, 240, 205, 0.17), transparent 46%);
  transition: opacity .35s ease;
}
.tc-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 238, 196, 0.13) 50%, transparent 62%);
  transform: translateX(-120%);
}

.taro-card:hover .tc-frame,
.taro-card:focus-visible .tc-frame {
  border-color: rgba(216, 180, 106, 0.62);
  box-shadow:
    inset 0 0 0 5px #07080d,
    inset 0 0 0 6px rgba(216, 180, 106, 0.3),
    0 24px 46px rgba(0, 0, 0, 0.55),
    0 0 38px color-mix(in srgb, var(--c) 26%, transparent);
}
.taro-card:hover .tc-frame::after { transform: translateX(120%); transition: transform 1s ease; }
.taro-card:hover .tc-shine { opacity: 1; }
.taro-card:hover .tc-c { opacity: 1; }
.taro-card:hover .tc-art img,
.taro-card:focus-visible .tc-art img {
  transform: scale(calc(var(--grid-scale, 1) * 1.05)) translateY(-4px);
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.66)) drop-shadow(0 0 18px color-mix(in srgb, var(--c) 50%, transparent));
}
.taro-card:focus-visible { outline: none; }
.taro-card:focus-visible .tc-frame { outline: 1px solid var(--t-gold-l); outline-offset: 4px; }

.tc-plaque { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tc-plaque .num {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--t-gold);
}
.tc-plaque .num::before,
.tc-plaque .num::after {
  content: "";
  width: 16px;
  height: 1px;
  background: currentColor;
  opacity: .45;
}
.tc-plaque .name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15.5px;
  line-height: 1.25;
  letter-spacing: 0.03em;
  color: var(--ink-parchment);
  transition: color .3s ease;
}
.taro-card:hover .tc-plaque .name { color: var(--t-gold-l); }

@media (max-width: 560px) {
  .taro-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 14px; }
  .tc-art { inset: 14px 11px; }
  .tc-c { width: 20px; height: 20px; }
  .tc-c.tl, .tc-c.tr { top: 7px; }
  .tc-c.bl, .tc-c.br { bottom: 7px; }
  .tc-c.tl, .tc-c.bl { left: 7px; }
  .tc-c.tr, .tc-c.br { right: 7px; }
  .tc-plaque .name { font-size: 13.5px; }
}

/* ---------------- Modal ---------------- */
.taro-modal {
  --th-c: #d8b46a;
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 50% 60% at 32% 50%, color-mix(in srgb, var(--th-c) 16%, transparent), transparent 70%),
    rgba(4, 5, 9, 0.9);
  backdrop-filter: blur(8px);
  transition: --th-c .6s ease;
}
.taro-modal.is-open { display: flex; animation: tmFade .35s ease; }
.taro-modal-box {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 1010px;
  height: min(690px, 88vh);
  border: 1px solid rgba(216, 180, 106, 0.42);
  border-radius: 14px;
  background: linear-gradient(160deg, #10121d 0%, #07080d 100%);
  box-shadow:
    inset 0 0 0 6px #07080d,
    inset 0 0 0 7px rgba(216, 180, 106, 0.16),
    0 40px 100px rgba(0, 0, 0, 0.75),
    0 0 60px color-mix(in srgb, var(--th-c) 12%, transparent);
  overflow: hidden;
  animation: tmBox .5s cubic-bezier(.2,.7,.3,1);
}
.taro-modal-img {
  flex: 0 0 41%;
  position: relative;
  padding: 34px 28px;
  perspective: 1400px;
  background:
    radial-gradient(ellipse 66% 56% at 50% 50%, color-mix(in srgb, var(--th-c) 30%, transparent), transparent 74%),
    #05060a;
  border-right: 1px solid rgba(216, 180, 106, 0.18);
  overflow: hidden;
}
.taro-modal-img::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 120%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, rgba(216,180,106,.07) 0deg 1deg, transparent 1deg 10deg);
  -webkit-mask: radial-gradient(circle, transparent 22%, #000 40%, transparent 70%);
          mask: radial-gradient(circle, transparent 22%, #000 40%, transparent 70%);
  animation: thSpin 120s linear infinite;
  pointer-events: none;
}
.tm-card {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(180deg) scale(.86);
}
.tm-card.flip { animation: tmFlip 1.05s cubic-bezier(.2,.7,.25,1) both; }
.tm-card.shown { transform: none; }
.tm-face {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
}
.tm-face img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter:
    drop-shadow(0 22px 40px rgba(0, 0, 0, 0.65))
    drop-shadow(0 0 28px color-mix(in srgb, var(--th-c) 36%, transparent));
}
.tm-face .empty-glyph {
  font-family: 'Cinzel Decorative', var(--font-display);
  font-size: 64px;
  color: var(--t-gold-d);
}
.tm-back { transform: rotateY(180deg); }
.tm-back i {
  display: block;
  height: 88%;
  aspect-ratio: 2 / 3.3;
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(216, 180, 106, 0.7);
  box-shadow: inset 0 0 0 6px #0b0d18, inset 0 0 0 7px rgba(216, 180, 106, 0.4), 0 20px 40px rgba(0,0,0,.6);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-50 -50 100 100' fill='none' stroke='%23d8b46a'%3E%3Ccircle r='30' stroke-opacity='.7'/%3E%3Ccircle r='24' stroke-opacity='.4' stroke-dasharray='1 3'/%3E%3Cpath d='M0-40L7-7 40 0 7 7 0 40-7 7-40 0-7-7Z' fill='%23d8b46a' fill-opacity='.18'/%3E%3Cpath d='M0-22L4-4 22 0 4 4 0 22-4 4-22 0-4-4Z' fill='%23f4dfa6' fill-opacity='.5' stroke='none'/%3E%3Ccircle r='3' fill='%23f4dfa6' stroke='none'/%3E%3C/svg%3E") center / 62% no-repeat,
    radial-gradient(circle, rgba(216,180,106,.18), transparent 60%),
    repeating-linear-gradient(45deg, rgba(216,180,106,.06) 0 1px, transparent 1px 12px),
    repeating-linear-gradient(-45deg, rgba(216,180,106,.06) 0 1px, transparent 1px 12px),
    linear-gradient(160deg, #161a33, #0a0b16);
}
@keyframes tmFlip {
  0% { transform: rotateY(180deg) scale(.86); }
  60% { transform: rotateY(-8deg) scale(1.02); }
  100% { transform: rotateY(0deg) scale(1); }
}
@keyframes tmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tmBox { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }

.taro-modal-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 48px 46px 26px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.tm-roman {
  position: absolute;
  right: 26px;
  top: 14px;
  font-family: 'Cinzel Decorative', var(--font-display);
  font-weight: 700;
  font-size: 150px;
  line-height: 1;
  color: rgba(216, 180, 106, 0.05);
  pointer-events: none;
  user-select: none;
}
.taro-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 5;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--t-line);
  background: rgba(8, 9, 16, 0.85);
  color: var(--ink-muted);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .2s ease, border-color .2s ease, transform .3s ease;
}
.taro-modal-close svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.taro-modal-close:hover { color: var(--t-gold-l); border-color: var(--t-gold); transform: rotate(90deg); }

.taro-modal-num {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--t-gold);
  text-transform: uppercase;
}
.taro-modal-num::after {
  content: "";
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, var(--t-gold), transparent);
}
.taro-modal-body h2 {
  margin: 12px 0 2px;
  font-family: 'Cinzel Decorative', var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff6da 0%, #ecd08e 45%, #a87d3a 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.taro-modal-body .en-name {
  margin: 0;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 18px;
  color: var(--ink-muted);
}
.tm-orn {
  width: 190px;
  height: 14px;
  margin: 20px 0 22px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 14' fill='none' stroke='%23d8b46a'%3E%3Cpath d='M0 7H78M112 7H190' stroke-opacity='.5'/%3E%3Cpath d='M95 1L101 7 95 13 89 7Z' fill='%23d8b46a' fill-opacity='.35'/%3E%3Cpath d='M84 7L87 4 90 7 87 10Z M100 7L103 4 106 7 103 10Z' stroke-opacity='.7'/%3E%3C/svg%3E") left center / contain no-repeat;
}
.taro-modal-body .meaning {
  margin: 0;
  font-size: 18px;
  line-height: 1.75;
  color: #d3cfc4;
}
.taro-modal-body .meaning::first-letter {
  float: left;
  font-family: 'Cinzel Decorative', var(--font-display);
  font-weight: 700;
  font-size: 3.2em;
  line-height: 0.9;
  padding: 6px 10px 0 0;
  color: var(--t-gold-l);
  text-shadow: 0 0 18px color-mix(in srgb, var(--th-c) 55%, transparent);
}
.taro-path-block {
  position: relative;
  margin-top: 28px;
  padding: 20px 22px 22px;
  border: 1px solid var(--t-line);
  border-radius: 10px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--th-c) 10%, transparent), rgba(255, 255, 255, 0.01));
}
.taro-path-block .eyebrow { margin-bottom: 8px; display: block; color: var(--t-gold); }
.taro-path-block h3 {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 21px;
  color: var(--t-gold-l);
}
.taro-path-block .locked-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}
.tm-pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 26px;
}
.tm-pager button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 48%;
  padding: 8px 4px;
  border: 0;
  background: none;
  color: var(--ink-muted);
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
  transition: color .2s ease;
}
.tm-pager button.next { text-align: right; flex-direction: row-reverse; }
.tm-pager button small {
  display: block;
  font-size: 10px;
  letter-spacing: .26em;
  color: var(--t-gold-d);
  transition: color .2s ease;
}
.tm-pager button svg { flex: 0 0 auto; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s ease; }
.tm-pager button:hover { color: var(--t-gold-l); }
.tm-pager button:hover small { color: var(--t-gold); }
.tm-pager button.prev:hover svg { transform: translateX(-3px); }
.tm-pager button.next:hover svg { transform: translateX(3px); }
.taro-modal-body.swap > :not(.tm-roman):not(.tm-pager) { animation: thCapIn .55s cubic-bezier(.2,.7,.3,1) both; }

@media (max-width: 760px) {
  .taro-modal { padding: 12px; }
  .taro-modal-box { flex-direction: column; height: auto; max-height: 92vh; overflow-y: auto; }
  .taro-modal-img { flex: 0 0 320px; padding: 22px; border-right: 0; border-bottom: 1px solid rgba(216,180,106,.18); }
  .taro-modal-body { padding: 26px 22px 18px; overflow: visible; }
  .tm-roman { font-size: 96px; right: 16px; top: 10px; }
  .taro-modal-body .meaning { font-size: 17px; }
  /* крестик остаётся на виду при прокрутке окна */
  .taro-modal-close { position: sticky; top: 10px; align-self: flex-end; flex: 0 0 auto; margin: 10px 10px -48px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-card[data-current="true"] img,
  .th-astro .ring-slow,
  .th-astro .ring-rev,
  .taro-modal-img::before { animation: none; }
  .tm-card.flip { animation: none; }
  .taro-card { opacity: 1; transform: none; }
}
