.wd-practice-drawer__year-wheel-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  justify-items: start;
}

.wd-practice-drawer__year-wheel-title {
  color: var(--wd-practice-title);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
}

.wd-practice-drawer__year-wheel-next,
.wd-practice-drawer__year-wheel-countdown {
  color: var(--wd-practice-muted);
  font-size: .74rem;
  line-height: 1.35;
}

.wd-practice-drawer__year-wheel-button {
  display: grid;
  width: var(--wd-practice-control-size, 82px);
  height: var(--wd-practice-control-size, 82px);
  margin: 0;
  padding: 4px;
  overflow: hidden;
  place-items: center;
  border: 1px solid rgba(228, 191, 99, .42);
  border-radius: 50%;
  background: #182425;
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .28), 0 0 18px rgba(228, 191, 99, .16);
  cursor: pointer;
  transition: filter .2s ease, transform .2s ease;
}

.wd-practice-drawer__year-wheel-button:hover {
  filter: brightness(1.08);
  transform: translateY(-2px) scale(1.035);
}

.wd-practice-drawer__year-wheel-button:focus-visible {
  outline: 3px solid #C69E3C;
  outline-offset: 4px;
}

.wd-practice-drawer__year-wheel-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

body.year-wheel-modal-open {
  overflow: hidden;
}

.year-wheel-modal[hidden] {
  display: none;
}

.year-wheel-modal {
  position: fixed;
  z-index: 2147483646;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  color: #25302E;
  font: inherit;
  opacity: 0;
  transition: opacity .18s ease;
}

.year-wheel-modal.is-open {
  opacity: 1;
}

.year-wheel-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 12, 14, .76);
  backdrop-filter: blur(7px);
}

.year-wheel-modal__dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(900px, 100%);
  height: min(92vh, 940px);
  max-height: min(92vh, 940px);
  overflow: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  border: 1px solid rgba(181, 139, 55, .42);
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 4%, rgba(47, 145, 147, .13), transparent 30%),
    linear-gradient(155deg, #FBF7ED, #EEE3CB);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .8);
  transform: translateY(14px) scale(.985);
  transition: transform .2s ease;
}

.year-wheel-modal.is-open .year-wheel-modal__dialog {
  transform: translateY(0) scale(1);
}

.year-wheel-modal__dialog:focus {
  outline: none;
}

.year-wheel-modal__header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px 15px;
  border-bottom: 1px solid rgba(111, 82, 35, .16);
  background: linear-gradient(155deg, #FBF7ED, #F2E8D3);
}

.year-wheel-modal__eyebrow {
  display: block;
  color: #936922;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.year-wheel-modal__title {
  margin: 4px 0 0;
  color: #153B3D;
  font-size: clamp(1.3rem, 3vw, 1.75rem);
  line-height: 1.15;
}

.year-wheel-modal__close {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  padding: 0 0 3px;
  place-items: center;
  border: 1px solid rgba(122, 79, 29, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .54);
  color: #61441C;
  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.year-wheel-modal__close:hover,
.year-wheel-modal__nav-button:hover,
.year-wheel-modal__today:hover {
  border-color: rgba(43, 145, 147, .52);
  background: rgba(43, 145, 147, .1);
}

.year-wheel-modal__close:focus-visible,
.year-wheel-modal__nav-button:focus-visible,
.year-wheel-modal__today:focus-visible,
.year-wheel-modal__festival:focus-visible {
  outline: 3px solid #C69E3C;
  outline-offset: 3px;
}

.year-wheel-modal__body {
  display: grid;
  gap: 18px;
  min-height: 0;
  padding: 18px 14px 24px 22px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.year-wheel-modal__today-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #704A1B;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .035em;
}

.year-wheel-modal__today-line::before,
.year-wheel-modal__today-line::after {
  width: min(80px, 14vw);
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(140, 95, 40, .5));
  content: "";
}

.year-wheel-modal__today-line::after {
  transform: scaleX(-1);
}

.year-wheel-modal__stage {
  --wheel-size: min(64vw, 570px);
  position: relative;
  width: var(--wheel-size);
  height: var(--wheel-size);
  margin: 0 auto;
}

.year-wheel-modal__pointer {
  position: absolute;
  z-index: 12;
  top: 3.5%;
  left: 50%;
  width: 0;
  height: 0;
  border-right: 14px solid transparent;
  border-left: 14px solid transparent;
  border-top: 24px solid #E1B74E;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .28));
  transform: translateX(-50%);
}

.year-wheel-modal__image-viewport {
  position: absolute;
  z-index: 1;
  inset: 6.5%;
  overflow: hidden;
  border-radius: 50%;
  mask-image: radial-gradient(circle, #000 0 85%, rgba(0, 0, 0, .9) 89%, rgba(0, 0, 0, .58) 94%, rgba(0, 0, 0, .18) 98%, transparent 100%);
  pointer-events: none;
}

.year-wheel-modal__image-wrap {
  position: absolute;
  inset: 5.35%;
  display: grid;
  place-items: center;
  border-radius: 50%;
  filter: drop-shadow(0 15px 22px rgba(38, 28, 16, .24));
  transform: rotate(var(--wheel-rotation, 0deg));
  transform-origin: center;
  transition: transform .58s cubic-bezier(.22, .68, .18, 1), filter .46s ease;
}

.year-wheel-modal__image-wrap.is-festival-focused {
  filter: drop-shadow(0 18px 28px rgba(38, 28, 16, .34)) brightness(1.08);
  transform: translateY(42%) rotate(var(--wheel-focus-rotation, var(--wheel-rotation, 0deg))) scale(2.24);
}

.year-wheel-modal__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.year-wheel-modal__scale {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 7px rgba(255, 242, 190, .95)) drop-shadow(0 0 16px rgba(255, 230, 151, .56));
  transition: filter .48s ease;
}

.year-wheel-modal__scale-ring {
  position: absolute;
  inset: 6.5%;
  border: 1px solid rgba(140, 95, 40, .58);
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 248, 222, .72), 0 0 18px rgba(80, 53, 20, .12);
  transition: border-color .48s ease, box-shadow .48s ease;
}

.year-wheel-modal__stage.is-image-focused .year-wheel-modal__scale {
  filter: drop-shadow(0 0 9px rgba(255, 247, 204, 1)) drop-shadow(0 0 22px rgba(230, 181, 67, .88));
}

.year-wheel-modal__stage.is-image-focused .year-wheel-modal__scale-ring {
  border-color: rgba(182, 124, 35, .88);
  box-shadow: 0 0 0 1px rgba(255, 251, 230, .92), 0 0 14px rgba(255, 224, 139, .82), 0 0 34px rgba(218, 157, 44, .5), inset 0 0 18px rgba(255, 236, 174, .2);
}

.year-wheel-modal__scale-ring::after {
  position: absolute;
  inset: 5.5%;
  border: 1px solid rgba(181, 138, 44, .42);
  border-radius: 50%;
  content: "";
}

.year-wheel-modal__scale-mark,
.year-wheel-modal__scale-month {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1px;
  height: 1px;
  transform: translate(-50%, -50%);
  transition: transform .65s cubic-bezier(.2, .72, .24, 1);
}

.year-wheel-modal__scale-mark i {
  position: absolute;
  top: -5px;
  left: 0;
  display: block;
  width: 1px;
  height: 10px;
  background: #5B3512;
}

.year-wheel-modal__scale-month b {
  position: absolute;
  display: grid;
  min-width: 29px;
  min-height: 18px;
  padding: 2px 3px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #704A1B;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .045em;
  line-height: 1;
  text-shadow: 0 1px rgba(255, 251, 236, .9);
  transform: translate(-50%, -50%);
  text-transform: uppercase;
  transition: color .48s ease, text-shadow .48s ease;
}

.year-wheel-modal__stage.is-image-focused .year-wheel-modal__scale-month b {
  color: #5F390D;
  text-shadow: 0 1px rgba(255, 252, 235, 1), 0 0 8px rgba(255, 229, 151, .95);
}

.year-wheel-modal__festivals {
  position: absolute;
  z-index: 6;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.year-wheel-modal__festival-item {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 1px;
  height: 1px;
}

.year-wheel-modal__festival {
  position: absolute;
  display: grid;
  width: 92px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #6A4B20;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transform: translate(-50%, -50%);
  transition: color .2s ease, transform .65s cubic-bezier(.2, .72, .24, 1);
}

.year-wheel-modal__festival-node {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid #FFF8E9;
  border-radius: 50%;
  background: #8C5F28;
  box-shadow: 0 0 0 1px rgba(92, 57, 20, .55), 0 2px 6px rgba(52, 33, 13, .28);
  transform: translate(-50%, -50%);
  transition: background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.year-wheel-modal__festival-label {
  position: absolute;
  top: calc(50% + 12px);
  left: 50%;
  display: block;
  padding: 5px 11px;
  background: radial-gradient(ellipse at center, rgba(255, 247, 218, .94) 0 42%, rgba(255, 237, 181, .58) 62%, transparent 82%);
  color: #3D260E;
  filter: drop-shadow(0 0 8px rgba(255, 226, 137, .82));
  line-height: 1.08;
  text-shadow: 0 1px #FFF, 0 0 7px rgba(255, 247, 217, .96);
  transform: translateX(-50%);
  white-space: nowrap;
}

.year-wheel-modal__festival-label strong {
  font-size: .9rem;
  font-weight: 850;
  letter-spacing: .01em;
}

.year-wheel-modal__festival.is-selected {
  color: #936922;
}

.year-wheel-modal__festival.is-selected .year-wheel-modal__festival-node {
  background: #D8AC3D;
  box-shadow: 0 0 0 4px rgba(228, 191, 99, .24), 0 0 12px rgba(181, 138, 44, .52);
  transform: translate(-50%, -50%) scale(1.18);
}

.year-wheel-modal__festival.is-next .year-wheel-modal__festival-node::after {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 6px;
  height: 6px;
  border: 1px solid #FFF8E9;
  border-radius: 50%;
  background: #2B918F;
  content: "";
}

.year-wheel-modal__festival::after {
  position: absolute;
  z-index: 10;
  bottom: calc(100% + 3px);
  left: 50%;
  padding: 4px 7px;
  border: 1px solid rgba(140, 95, 40, .26);
  border-radius: 7px;
  background: #FFF8E9;
  box-shadow: 0 5px 12px rgba(56, 38, 17, .16);
  color: #61441C;
  content: attr(data-tooltip);
  font-size: .65rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity .18s ease, transform .18s ease;
  white-space: nowrap;
}

.year-wheel-modal__festival:hover::after,
.year-wheel-modal__festival:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.year-wheel-modal__controls {
  display: grid;
  grid-template-columns: 42px auto 42px;
  gap: 7px;
  justify-content: center;
}

.year-wheel-modal__nav-button,
.year-wheel-modal__today {
  min-height: 38px;
  padding: 6px 12px;
  border: 1px solid rgba(122, 79, 29, .24);
  border-radius: 12px;
  background: rgba(255, 255, 255, .48);
  color: #2D5655;
  font: inherit;
  font-size: .8rem;
  font-weight: 750;
  cursor: pointer;
}

.year-wheel-modal__nav-button--next {
  justify-self: stretch;
}

.year-wheel-modal__card {
  display: grid;
  gap: 11px;
  padding: 18px 20px;
  border: 1px solid rgba(101, 82, 46, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .4);
  box-shadow: inset 0 1px rgba(255, 255, 255, .65);
}

.year-wheel-modal__card-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.year-wheel-modal__card-title {
  margin: 0;
  color: #704A1B;
  font-size: 1.18rem;
}

.year-wheel-modal__card-date {
  color: #936922;
  font-size: .8rem;
  font-weight: 800;
  text-align: right;
}

.year-wheel-modal__card-lead,
.year-wheel-modal__card-note,
.year-wheel-modal__card-history,
.year-wheel-modal__card-context {
  margin: 0;
  color: #5F685F;
  font-size: .88rem;
  line-height: 1.55;
}

.year-wheel-modal__card-history {
  margin: 0;
  color: #3E4E48;
  font-size: .84rem;
  line-height: 1.6;
}

.year-wheel-modal__card-context {
  margin: 0;
  color: #4C5B53;
  font-size: .82rem;
  line-height: 1.58;
}

.year-wheel-modal__card-note {
  color: #7B6543;
  font-size: .78rem;
}

.year-wheel-modal__symbols {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.year-wheel-modal__symbol {
  padding: 5px 9px;
  border: 1px solid rgba(111, 82, 35, .14);
  border-radius: 999px;
  background: rgba(181, 138, 44, .08);
  color: #3F2B10;
  font-size: .72rem;
  font-weight: 700;
}

:root[data-wd-theme="dark"] .year-wheel-modal {
  color: #F2E8CF;
}

:root[data-wd-theme="dark"] .year-wheel-modal__dialog {
  border-color: rgba(228, 191, 99, .3);
  background:
    radial-gradient(circle at 88% 4%, rgba(47, 145, 147, .16), transparent 30%),
    linear-gradient(155deg, #152725, #0C171A);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .7), inset 0 1px rgba(255, 244, 205, .08);
}

:root[data-wd-theme="dark"] .year-wheel-modal__header {
  border-bottom-color: rgba(228, 191, 99, .16);
  background: linear-gradient(155deg, #152725, #101F20);
}

:root[data-wd-theme="dark"] .year-wheel-modal__title,
:root[data-wd-theme="dark"] .year-wheel-modal__card-title {
  color: #F1D57E;
}

:root[data-wd-theme="dark"] .year-wheel-modal__eyebrow,
:root[data-wd-theme="dark"] .year-wheel-modal__card-date,
:root[data-wd-theme="dark"] .year-wheel-modal__today-line {
  color: #D9B75E;
}

:root[data-wd-theme="dark"] .year-wheel-modal__close,
:root[data-wd-theme="dark"] .year-wheel-modal__nav-button,
:root[data-wd-theme="dark"] .year-wheel-modal__today {
  border-color: rgba(228, 191, 99, .22);
  background: rgba(255, 249, 238, .06);
  color: #F2E8CF;
}

:root[data-wd-theme="dark"] .year-wheel-modal__festival {
  border-color: transparent;
  background: transparent;
  color: #E9DAB5;
  box-shadow: none;
}

:root[data-wd-theme="dark"] .year-wheel-modal__festival-label {
  background: radial-gradient(ellipse at center, rgba(18, 47, 46, .96) 0 42%, rgba(19, 54, 52, .68) 62%, transparent 82%);
  color: #FFF0BD;
  filter: drop-shadow(0 0 9px rgba(228, 191, 99, .48));
  text-shadow: 0 1px #071112, 0 0 6px #071112;
}

:root[data-wd-theme="dark"] .year-wheel-modal__festival.is-selected {
  border-color: rgba(228, 191, 99, .72);
  color: #F1D57E;
}

:root[data-wd-theme="dark"] .year-wheel-modal__festival::after {
  border-color: rgba(228, 191, 99, .24);
  background: #102324;
  color: #F1D57E;
}

:root[data-wd-theme="dark"] .year-wheel-modal__scale-ring {
  border-color: rgba(228, 191, 99, .52);
  box-shadow: 0 0 0 1px rgba(5, 12, 13, .62), 0 0 14px rgba(0, 0, 0, .42);
}

:root[data-wd-theme="dark"] .year-wheel-modal__scale-mark i {
  background: rgba(241, 213, 126, .7);
}

:root[data-wd-theme="dark"] .year-wheel-modal__scale-month b {
  border-color: transparent;
  background: transparent;
  color: #F1D57E;
  text-shadow: 0 1px #071112;
}

:root[data-wd-theme="dark"] .year-wheel-modal__stage.is-image-focused .year-wheel-modal__scale-ring {
  border-color: rgba(241, 213, 126, .86);
  box-shadow: 0 0 0 1px rgba(7, 17, 18, .72), 0 0 15px rgba(241, 213, 126, .7), 0 0 34px rgba(197, 139, 42, .48), inset 0 0 18px rgba(241, 213, 126, .12);
}

:root[data-wd-theme="dark"] .year-wheel-modal__stage.is-image-focused .year-wheel-modal__scale-month b {
  color: #FFE49A;
  text-shadow: 0 1px #071112, 0 0 8px rgba(241, 213, 126, .72);
}

:root[data-wd-theme="dark"] .year-wheel-modal__card {
  border-color: rgba(228, 191, 99, .16);
  background: rgba(255, 249, 238, .045);
  box-shadow: inset 0 1px rgba(255, 244, 205, .05);
}

:root[data-wd-theme="dark"] .year-wheel-modal__card-history {
  color: #E9E2D1;
}

:root[data-wd-theme="dark"] .year-wheel-modal__card-context {
  color: #E4DDCB;
}

:root[data-wd-theme="dark"] .year-wheel-modal__symbol {
  color: #FFF0BD;
}

:root[data-wd-theme="dark"] .year-wheel-modal__card-lead {
  color: #C5C9BB;
}

:root[data-wd-theme="dark"] .year-wheel-modal__card-note {
  color: #B7A77E;
}

:root[data-wd-theme="dark"] .year-wheel-modal__symbol {
  border-color: rgba(228, 191, 99, .16);
  background: rgba(228, 191, 99, .07);
  color: #D6C89E;
}

@media (max-width: 700px) {
  .year-wheel-modal {
    padding: 8px;
  }

  .year-wheel-modal__dialog {
    height: 96vh;
    max-height: 96vh;
    border-radius: 19px;
  }

  .year-wheel-modal__header {
    padding: 14px 15px 12px;
  }

  .year-wheel-modal__body {
    gap: 14px;
    padding: 14px 12px 18px;
  }

  .year-wheel-modal__stage {
    --wheel-size: min(92vw, 430px);
  }

  .year-wheel-modal__image-viewport {
    inset: 6.5%;
  }

  .year-wheel-modal__image-wrap {
    inset: 5.35%;
  }

  .year-wheel-modal__image-wrap.is-festival-focused {
    transform: translateY(39%) rotate(var(--wheel-focus-rotation, var(--wheel-rotation, 0deg))) scale(1.92);
  }

  .year-wheel-modal__festival {
    width: 44px;
    min-height: 44px;
    padding: 0;
  }

  .year-wheel-modal__festival-label {
    display: none;
  }

  .year-wheel-modal__scale-ring {
    inset: 6.5%;
  }

  .year-wheel-modal__scale-month b {
    min-width: 27px;
    min-height: 17px;
    padding: 2px 3px;
    font-size: .52rem;
  }

  .year-wheel-modal__controls {
    grid-template-columns: 42px minmax(0, auto) 42px;
  }

  .year-wheel-modal__card {
    padding: 15px;
  }

  .year-wheel-modal__card-heading {
    display: grid;
    gap: 3px;
  }

  .year-wheel-modal__card-date {
    text-align: left;
  }
}

@media (max-width: 420px) {
  .year-wheel-modal__stage {
    --wheel-size: calc(100vw - 32px);
  }

  .year-wheel-modal__festival {
    width: 44px;
  }

  .year-wheel-modal__scale-month b {
    min-width: 25px;
    font-size: .49rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wd-practice-drawer__year-wheel-button,
  .year-wheel-modal,
  .year-wheel-modal__dialog,
  .year-wheel-modal__image-wrap,
  .year-wheel-modal__festival,
  .year-wheel-modal__scale-mark,
  .year-wheel-modal__scale-month {
    transition: none;
  }
}
