/* One complete, rotating deck. Keep this sheet after the legacy layouts. */
body[data-deck-layout="circle"] .deck-layout-switcher,
body[data-deck-layout="circle"] .circle-pagination {
  display: none !important;
}

body[data-deck-layout="circle"] .card-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: auto;
  margin-top: 10px;
}

body[data-deck-layout="circle"] .selection-zone {
  flex: 0 0 auto;
  padding: 10px 0 12px;
  border: 0;
}

body[data-deck-layout="circle"] .selection {
  gap: clamp(16px, 5vw, 28px);
}

body[data-deck-layout="circle"] .selection-note {
  margin-top: 10px;
  color: #c2af8a;
}

body[data-deck-layout="circle"] .deck-zone {
  width: 100%;
  min-width: 0;
  padding: 0;
  overflow: visible;
}

body[data-deck-layout="circle"] #deck.deck {
  --circle-rotation: 0deg;
  --circle-card-width: clamp(30px, 9.6cqw, 48px);
  --circle-card-height: calc(var(--circle-card-width) * 1.5183);
  --circle-radius: calc(50cqw - var(--circle-card-height) / 2 - 13px);
  --wheel-radius: var(--circle-radius);
  display: block;
  position: relative;
  width: 100%;
  max-width: 520px;
  height: auto;
  min-height: 0;
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  isolation: isolate;
  perspective: none;
  transform: none;
  container-type: inline-size;
  background: radial-gradient(circle, #19335b4d 0%, #10264433 42%, transparent 65%);
  border-radius: 50%;
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}

body[data-deck-layout="circle"] #deck.deck::before {
  content: '';
  position: absolute;
  inset: 3%;
  z-index: -1;
  border: 1px solid #dbb77c4d;
  border-radius: 50%;
  background: none;
  box-shadow: 0 0 0 5px #d9b87a06, 0 0 0 6px #b9caeb10, 0 0 45px #79a2dc20;
  pointer-events: none;
}

body[data-deck-layout="circle"] #deck.deck::after {
  content: '';
  position: absolute;
  inset: 26.8%;
  z-index: -1;
  border: 1px solid #c4a66d29;
  border-radius: 50%;
  transform: none;
  width: auto;
  height: auto;
  box-shadow: 0 0 0 6px #b7cde90a, 0 0 35px #537aa422;
  pointer-events: none;
}

body[data-deck-layout="circle"] #deck .circle-rotor {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(var(--circle-rotation, 0deg));
  transform-origin: 50% 50%;
  will-change: transform;
}

body[data-deck-layout="circle"] #deck.deck .circle-rotor > .tarot-card,
body[data-deck-layout="circle"] #deck.deck .circle-rotor > .tarot-card:hover,
body[data-deck-layout="circle"] #deck.deck .circle-rotor > .tarot-card:focus-visible,
body[data-deck-layout="circle"] #deck.deck .circle-rotor > .tarot-card.is-picked,
body[data-deck-layout="circle"] #deck.deck.is-shuffling .circle-rotor > .tarot-card {
  --circle-lift: 0px;
  --circle-scale: 1;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: var(--circle-card-width);
  min-width: 0;
  height: var(--circle-card-height);
  min-height: 0;
  aspect-ratio: auto;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  opacity: 1;
  filter: none;
  transform: translate(-50%, -50%) rotate(var(--circle-angle)) translateY(calc(-1 * var(--circle-radius) - var(--circle-lift))) scale(var(--circle-scale));
  transform-origin: 50% 50%;
  transition: transform .18s ease, filter .18s ease;
  animation: none;
  cursor: pointer;
  outline: none;
  touch-action: pan-y;
}

body[data-deck-layout="circle"] #deck.deck .circle-rotor > .tarot-card .card-surface {
  inset: 0;
  border-radius: 4px;
  box-shadow: -1px 0 1px #f3cb8a70, 0 2px 7px #000a;
  animation: none;
  transform: none;
  transition: box-shadow .18s ease, filter .18s ease;
  backface-visibility: visible;
}

body[data-deck-layout="circle"] #deck .card-surface > img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  border-radius: inherit;
  -webkit-user-drag: none;
  pointer-events: none;
}

body[data-deck-layout="circle"] #deck.deck .circle-rotor > .tarot-card.is-preview,
body[data-deck-layout="circle"] #deck.deck .circle-rotor > .tarot-card:focus-visible {
  --circle-lift: 6px;
  --circle-scale: 1.14;
  z-index: 90 !important;
  filter: brightness(1.22);
}

body[data-deck-layout="circle"] #deck.deck .tarot-card.is-preview .card-surface,
body[data-deck-layout="circle"] #deck.deck .tarot-card:focus-visible .card-surface {
  box-shadow: 0 0 0 2px #ffe2a4, 0 0 18px #d5b277a8, 0 5px 14px #0009;
}

body[data-deck-layout="circle"] #deck.deck .circle-rotor > .tarot-card.is-picked {
  filter: brightness(.57) saturate(.6);
}

body[data-deck-layout="circle"] #deck.deck .tarot-card.is-picked .card-surface {
  box-shadow: 0 0 0 1px #ffdfa1, 0 0 13px #f1c57d8c;
}

body[data-deck-layout="circle"] #deck.deck .circle-rotor > .tarot-card.is-picked.is-preview {
  filter: brightness(.95) saturate(.7);
}

body[data-deck-layout="circle"] #deck .card-index,
body[data-deck-layout="circle"] #deck .card-glimmer {
  display: none;
}

body[data-deck-layout="circle"] #deck .circle-hit-map {
  position: absolute;
  inset: 0;
  z-index: 95;
  width: 100%;
  height: 100%;
  max-width: none;
  overflow: visible;
  pointer-events: none;
}

body[data-deck-layout="circle"] #deck .circle-hit-map path {
  fill: transparent;
  stroke: none;
  pointer-events: auto;
  cursor: pointer;
}

body[data-deck-layout="circle"] #deck .circle-core {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 49%;
  height: 49%;
  padding: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  color: #f0d7a4;
  text-align: center;
  pointer-events: none;
}

body[data-deck-layout="circle"] #deck .circle-core::before {
  content: '✦';
  display: block;
  margin-bottom: 4px;
  color: #f0d297;
  font: 32px/1 Georgia, serif;
  text-shadow: 0 0 20px #bad2ff77;
}

body[data-deck-layout="circle"] #deck .circle-preview {
  display: none;
  position: relative;
  flex: 0 0 auto;
  width: clamp(44px, 13cqw, 68px);
  aspect-ratio: 600 / 911;
  margin: 0 auto 2px;
  border-radius: 5px;
  box-shadow: 0 0 0 1px #dfc18cbb, 0 0 20px #b6d0f529, 0 5px 15px #0007;
}

body[data-deck-layout="circle"] #deck .circle-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  -webkit-user-drag: none;
  pointer-events: none;
}

body[data-deck-layout="circle"] #deck.has-preview .circle-core::before {
  display: none;
}

body[data-deck-layout="circle"] #deck.has-preview .circle-preview {
  display: block;
  animation: circle-preview-appear .18s ease-out both;
}

body[data-deck-layout="circle"] #deck .circle-core-count {
  margin: 0;
  color: #f2d9aa;
  font-family: var(--serif, Georgia, serif);
  font-size: clamp(23px, 7cqw, 34px);
  line-height: 1.05;
  font-weight: 400;
  letter-spacing: .3px;
}

body[data-deck-layout="circle"] #deck.has-preview .circle-core-count {
  font-family: var(--sans, Arial, sans-serif);
  font-size: clamp(9px, 2.7cqw, 12px);
  line-height: 1.5;
  letter-spacing: .4px;
}

body[data-deck-layout="circle"] #deck .circle-core-hint {
  max-width: 93%;
  margin: 1px 0 0;
  color: #afc0d7;
  font-size: clamp(9px, 2.55cqw, 11px);
  line-height: 1.55;
  text-wrap: balance;
}

body[data-deck-layout="circle"] #deck .circle-confirm {
  display: none;
  justify-content: center;
  align-items: center;
  flex: 0 0 auto;
  min-height: 31px;
  max-width: 100%;
  margin: 3px 0 0;
  padding: 6px 12px;
  border: 1px solid #e6c58b99;
  border-radius: 20px;
  background: linear-gradient(120deg, #e5c58e, #f3deba);
  color: #15213a;
  box-shadow: 0 3px 16px #e5be6e1a;
  font-size: clamp(8px, 2.35cqw, 10px);
  font-weight: 700;
  line-height: 1.35;
  pointer-events: auto;
  touch-action: manipulation;
}

body[data-deck-layout="circle"] #deck.has-preview .circle-confirm {
  display: inline-flex;
}

body[data-deck-layout="circle"] #deck .circle-confirm:disabled {
  opacity: .6;
  cursor: default;
}

body[data-deck-layout="circle"] #deck .circle-confirm:focus-visible {
  outline: 2px solid #f5ddad;
  outline-offset: 4px;
}

body[data-deck-layout="circle"] .deck-layout-note {
  max-width: 410px;
  margin: 3px auto 0;
  padding: 0 9px;
  color: #b9c6d9;
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

body[data-deck-layout="circle"] .deck-controls {
  margin-top: 8px;
}

@keyframes circle-preview-appear {
  from { opacity: .6; transform: translateY(4px) scale(.94); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 650px) {
  body[data-deck-layout="circle"] .card-table { gap: 4px; }
  body[data-deck-layout="circle"] .selection-zone { padding: 8px 0 7px; }
  body[data-deck-layout="circle"] .selection-slot { width: 45px; height: 68px; }
  body[data-deck-layout="circle"] .selection-note { font-size: 6px; margin-top: 8px; }
  body[data-deck-layout="circle"] #deck.deck { max-width: 440px; }
  body[data-deck-layout="circle"] .deck-layout-note { font-size: 8px; margin-top: 2px; }
  body[data-deck-layout="circle"] #deck .circle-core { gap: 3px; }
  body[data-deck-layout="circle"] #deck .circle-confirm { padding-inline: 10px; min-height: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  body[data-deck-layout="circle"] #deck .circle-rotor { will-change: auto; }
  body[data-deck-layout="circle"] #deck .circle-preview,
  body[data-deck-layout="circle"] #deck .tarot-card { animation: none; transition: none; }
}
