.rat {
  --rat-bg: #080b14;
  --rat-panel: #101522;
  --rat-panel-2: #151b2a;
  --rat-ink: #f7f0df;
  --rat-muted: #b9b4ac;
  --rat-gold: #d8b45e;
  --rat-gold-soft: #f0d58d;
  --rat-line: rgba(216, 180, 94, .25);
  --rat-blue: #17243c;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 0 2.5rem;
  border: 1px solid rgba(216, 180, 94, .24);
  border-radius: 26px;
  background:
    radial-gradient(circle at 50% 24%, rgba(42, 67, 104, .27), transparent 31rem),
    linear-gradient(180deg, #060810, #0b0e18 58%, #070910);
  color: var(--rat-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.rat *, .rat *::before, .rat *::after { box-sizing: border-box; }
.rat button { font: inherit; }
.rat [hidden] { display: none !important; }
.rat h2, .rat h3, .rat h4, .rat p { margin-top: 0; }
.rat h2, .rat h3, .rat h4 { color: var(--rat-ink); font-family: Georgia, 'Times New Roman', serif; }
.rat button:focus-visible { outline: 3px solid #fff1b5; outline-offset: 4px; }

.rat::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: .22;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(255,255,255,.75) 0 1px, transparent 1.3px);
  background-size: 79px 83px;
}

.rat-hero {
  position: relative;
  min-height: clamp(440px, 61vw, 720px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--rat-line);
}

.rat-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(.9) contrast(1.04);
}

.rat-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 6, 12, .94) 0%, rgba(4, 6, 12, .65) 42%, rgba(4, 6, 12, .1) 78%),
    linear-gradient(0deg, rgba(4, 6, 12, .94), transparent 55%);
}

.rat-hero-copy {
  position: relative;
  width: min(700px, calc(100% - 2rem));
  margin: 0 max(1rem, calc((100vw - 1180px) / 2)) clamp(2rem, 6vw, 5rem);
  text-shadow: 0 2px 22px rgba(0,0,0,.85);
}

.rat-kicker {
  display: block;
  margin-bottom: .75rem;
  color: var(--rat-gold-soft);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.4;
  text-transform: uppercase;
}

.rat-hero-copy h2 {
  max-width: 650px;
  margin-bottom: .8rem;
  font-size: clamp(2.35rem, 5.8vw, 5.4rem);
  font-weight: 500;
  line-height: .98;
}

.rat-hero-copy > p {
  max-width: 590px;
  margin-bottom: 1.25rem;
  color: #e2ddd2;
  font-size: clamp(1rem, 1.7vw, 1.23rem);
  line-height: 1.65;
}

.rat-hero-points { display: flex; flex-wrap: wrap; gap: .55rem; }
.rat-hero-points span {
  padding: .55rem .75rem;
  border: 1px solid rgba(240, 213, 141, .35);
  border-radius: 999px;
  background: rgba(8, 11, 20, .68);
  color: #f3ead5;
  font-size: .78rem;
  font-weight: 700;
  backdrop-filter: blur(5px);
}

.rat-body { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }
.rat-start { padding: clamp(3.5rem, 8vw, 6rem) 0 5rem; text-align: center; }
.rat-intro { max-width: 720px; margin: 0 auto; }
.rat-intro h2, .rat-opening h2, .rat-result-head h2 {
  margin-bottom: .85rem;
  font-size: clamp(2rem, 4.5vw, 4rem);
  font-weight: 500;
  line-height: 1.08;
}
.rat-intro p, .rat-result-head > p {
  max-width: 690px;
  margin: 0 auto;
  color: var(--rat-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.rat-period-preview {
  display: inline-flex;
  flex-direction: column;
  gap: .2rem;
  margin: 1.75rem auto 1.25rem;
  padding: .65rem 1.2rem;
  border: 1px solid var(--rat-line);
  border-radius: 999px;
  background: rgba(255,255,255,.025);
}
.rat-period-preview small { color: var(--rat-muted); font-size: .67rem; letter-spacing: .12em; text-transform: uppercase; }
.rat-period-preview strong { color: var(--rat-gold-soft); font-family: Georgia, serif; font-size: 1rem; }

.rat-closed-wheel {
  --closed-size: clamp(220px, 40vw, 330px);
  position: relative;
  width: var(--closed-size);
  aspect-ratio: 1;
  margin: 1.4rem auto 1.8rem;
}
.rat-closed-ring, .rat-opening-wheel > span {
  position: absolute;
  inset: 17%;
  border: 2px solid rgba(216, 180, 94, .58);
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(216,180,94,.035), inset 0 0 25px rgba(216,180,94,.08);
}
.rat-closed-wheel i, .rat-opening-wheel i {
  --angle: calc(var(--i) * 30deg);
  position: absolute;
  left: 50%;
  top: 50%;
  width: 9%;
  height: 15%;
  border: 1px solid rgba(216,180,94,.56);
  border-radius: 2px;
  background: linear-gradient(145deg, #17233a, #070b14);
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-245%) rotate(calc(var(--angle) * -1));
  box-shadow: 0 5px 12px rgba(0,0,0,.35);
}
.rat-closed-wheel b, .rat-opening-wheel b {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20%;
  height: 33%;
  border: 2px solid var(--rat-gold);
  border-radius: 4px;
  background: radial-gradient(circle at 50% 35%, #283d61, #070b14 65%);
  transform: translate(-50%, -50%);
  box-shadow: 0 12px 30px #000, 0 0 30px rgba(216,180,94,.14);
}
.rat-closed-wheel b::after, .rat-opening-wheel b::after {
  content: '✦';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--rat-gold);
  font-size: clamp(1rem, 3vw, 1.8rem);
}

.rat-draw, .rat-share, .rat-again {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
  min-height: 52px;
  padding: .85rem 1.25rem;
  border: 1px solid var(--rat-gold);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 800;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.rat-draw, .rat-share {
  background: linear-gradient(135deg, #f0d58d, #b98933);
  color: #161005;
  box-shadow: 0 11px 28px rgba(183, 133, 42, .2);
}
.rat-again { background: transparent; color: var(--rat-ink); }
.rat-draw:hover, .rat-share:hover, .rat-again:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(183,133,42,.3); }

.rat-opening { min-height: 650px; padding: clamp(4rem, 9vw, 7rem) 0; text-align: center; }
.rat-opening-wheel {
  position: relative;
  width: min(420px, 82vw);
  aspect-ratio: 1;
  margin: 2rem auto 1.5rem;
  animation: rat-spin 8s linear infinite;
}
.rat-opening-wheel i { animation: rat-pulse 1.4s ease-in-out infinite alternate; animation-delay: calc(var(--i) * 65ms); }
.rat-opening-wheel b { animation: rat-center-glow 1.1s ease-in-out infinite alternate; }
.rat-opening-status { margin-bottom: .3rem; color: var(--rat-gold-soft); font-family: Georgia, serif; font-size: 1.15rem; }
.rat-opening-count { color: var(--rat-muted); }
.rat-progress { width: min(420px, 84vw); height: 3px; margin: 1.1rem auto 0; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,.08); }
.rat-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #8d6424, #f0d58d); transition: width .45s ease; }
@keyframes rat-spin { to { transform: rotate(360deg); } }
@keyframes rat-pulse { to { filter: brightness(1.7); } }
@keyframes rat-center-glow { to { box-shadow: 0 12px 30px #000, 0 0 42px rgba(240,213,141,.45); } }

.rat-result { padding: clamp(3.5rem, 8vw, 6rem) 0 4.5rem; }
.rat-result-head { margin-bottom: 1.5rem; text-align: center; }
.rat-period {
  display: inline-block;
  margin-top: 1rem;
  color: var(--rat-gold-soft);
  font-family: Georgia, serif;
  font-size: 1.05rem;
}

.rat-wheel-stage {
  overflow: hidden;
  margin: 0 auto 1.5rem;
  padding: 1rem 0 2.2rem;
}
.rat-wheel {
  position: relative;
  width: min(790px, 84vw);
  aspect-ratio: 1;
  margin: 0 auto;
}
.rat-wheel::before {
  content: '';
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(25,39,64,.55), rgba(7,10,17,.12) 67%, transparent 68%);
  box-shadow: inset 0 0 70px rgba(0,0,0,.45);
}
.rat-wheel-ring {
  position: absolute;
  inset: 20%;
  border: 5px double rgba(216,180,94,.6);
  border-radius: 50%;
  box-shadow: 0 0 0 10px rgba(216,180,94,.025), 0 0 42px rgba(216,180,94,.1), inset 0 0 35px rgba(216,180,94,.08);
}
.rat-wheel-ring::after {
  content: '';
  position: absolute;
  inset: 7%;
  border: 1px solid rgba(216,180,94,.23);
  border-radius: 50%;
}
.rat-month {
  --angle: calc(var(--i) * 30deg);
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 96px;
  height: 148px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rat-ink);
  cursor: pointer;
  transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-215%) rotate(calc(var(--angle) * -1));
  transition: filter .2s ease, z-index 0s;
}
.rat-month span {
  position: absolute;
  left: 50%;
  top: -.3rem;
  z-index: 2;
  min-width: 42px;
  padding: .2rem .38rem;
  border: 1px solid rgba(216,180,94,.58);
  border-radius: 999px;
  background: #0b101c;
  color: var(--rat-gold-soft);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .08em;
  transform: translate(-50%, -50%);
}
.rat-month img {
  width: 76px;
  height: 122px;
  border: 2px solid #b88d3f;
  border-radius: 5px;
  object-fit: cover;
  box-shadow: 0 8px 19px rgba(0,0,0,.72);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.rat-month:hover, .rat-month.is-active { z-index: 5; filter: brightness(1.1); }
.rat-month:hover img, .rat-month.is-active img { border-color: #fff0b3; transform: translateY(-4px) scale(1.08); box-shadow: 0 12px 27px #000, 0 0 20px rgba(240,213,141,.3); }

.rat-center {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 132px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--rat-ink);
  cursor: pointer;
  transform: translate(-50%, -50%);
}
.rat-center-label {
  display: block;
  margin-bottom: .45rem;
  color: var(--rat-gold-soft);
  font-size: .62rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.rat-center img {
  width: 100px;
  height: 160px;
  border: 3px solid var(--rat-gold);
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 12px 28px #000, 0 0 38px rgba(216,180,94,.2);
  transition: transform .2s ease, box-shadow .2s ease;
}
.rat-center:hover img { transform: scale(1.04); box-shadow: 0 15px 34px #000, 0 0 44px rgba(216,180,94,.36); }
.rat-center strong { display: block; margin-top: .45rem; color: #f7edda; font-family: Georgia, serif; font-size: .88rem; line-height: 1.2; }

.rat-month-detail {
  display: grid;
  grid-template-columns: minmax(180px, 255px) 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  margin: 0 auto clamp(3rem, 7vw, 5.5rem);
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--rat-line);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(22,29,45,.95), rgba(10,13,23,.96));
  box-shadow: 0 25px 70px rgba(0,0,0,.28);
}
.rat-detail-card { text-align: center; }
.rat-detail-card img {
  width: min(230px, 100%);
  height: auto;
  aspect-ratio: 5 / 8;
  border: 3px solid #b98e40;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 18px 35px rgba(0,0,0,.55);
}
.rat-detail-kicker { display: block; margin-bottom: .35rem; color: var(--rat-gold-soft); font-size: .72rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.rat-detail-copy h3 { margin-bottom: .25rem; font-size: clamp(2rem, 4vw, 3.8rem); font-weight: 500; }
.rat-detail-tagline { margin-bottom: 1.2rem; color: #ded3bc; font-family: Georgia, serif; font-size: 1.2rem; font-style: italic; }
.rat-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.rat-detail-grid section {
  min-height: 118px;
  padding: .9rem 1rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 13px;
  background: rgba(255,255,255,.025);
}
.rat-detail-grid section:last-child { border-color: rgba(216,180,94,.28); background: rgba(216,180,94,.06); }
.rat-detail-grid small, .rat-summary small, .rat-flow small {
  display: block;
  margin-bottom: .4rem;
  color: var(--rat-gold-soft);
  font-size: .65rem;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.rat-detail-grid p { margin: 0; color: #d6d2ca; font-size: .9rem; line-height: 1.55; }

.rat-summary > header { margin-bottom: 1.25rem; text-align: center; }
.rat-summary > header h3 { margin: 0; font-size: clamp(2rem, 4vw, 3.6rem); font-weight: 500; }
.rat-annual-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid rgba(216,180,94,.35);
  border-radius: 18px;
  background: linear-gradient(100deg, rgba(216,180,94,.1), rgba(17,22,35,.92) 40%);
}
.rat-annual-card img { width: 110px; height: 176px; border: 2px solid var(--rat-gold); border-radius: 6px; object-fit: cover; box-shadow: 0 9px 22px rgba(0,0,0,.45); }
.rat-annual-card h4 { margin: 0 0 .2rem; font-size: 1.8rem; font-weight: 500; }
.rat-annual-card strong { display: block; margin-bottom: .5rem; color: var(--rat-gold-soft); font-family: Georgia, serif; font-style: italic; }
.rat-annual-card p { margin: 0; color: #d9d4ca; line-height: 1.62; }
.rat-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.rat-summary-grid section {
  min-height: 160px;
  padding: 1.1rem;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(16,21,34,.85);
}
.rat-summary-grid h4 { margin: 0 0 .5rem; font-size: 1.35rem; font-weight: 500; }
.rat-summary-grid p { margin: 0; color: #c9c5be; font-size: .91rem; line-height: 1.58; }
.rat-summary-momentum { border-left: 3px solid #deb95d !important; }
.rat-summary-care { border-left: 3px solid #8e78ba !important; }
.rat-summary-turn { border-left: 3px solid #7fabc7 !important; }
.rat-summary-dominant { border-left: 3px solid #c68b66 !important; }
.rat-flow { margin-top: .8rem; padding: 1rem 1.15rem; border: 1px solid rgba(216,180,94,.2); border-radius: 14px; background: rgba(216,180,94,.045); }
.rat-flow p { margin: 0; color: #ddd6c9; line-height: 1.62; }

.rat-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.rat-share-status { min-height: 1.35rem; margin: .8rem 0 0; color: var(--rat-gold-soft); text-align: center; }
.rat-disclaimer { margin: .35rem 0 0; color: #888b93; font-size: .72rem; text-align: center; }

.rat-guide {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto clamp(3rem, 7vw, 6rem);
  padding: clamp(1.3rem, 4vw, 2.7rem);
  border: 1px solid var(--rat-line);
  border-radius: 24px;
  background: rgba(13,17,28,.86);
}
.rat-guide-copy h3 { margin-bottom: .6rem; font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 500; }
.rat-guide-copy p { margin: 0; color: var(--rat-muted); line-height: 1.65; }
.rat-guide ol { display: grid; gap: .65rem; margin: 0; padding: 0; list-style: none; }
.rat-guide li { display: flex; gap: .8rem; align-items: center; padding: .7rem; border-bottom: 1px solid rgba(255,255,255,.07); }
.rat-guide li:last-child { border-bottom: 0; }
.rat-guide li > b { display: grid; flex: 0 0 36px; height: 36px; place-items: center; border: 1px solid var(--rat-gold); border-radius: 50%; color: var(--rat-gold-soft); }
.rat-guide li span { display: grid; gap: .2rem; }
.rat-guide li strong { color: var(--rat-ink); }
.rat-guide li small { color: var(--rat-muted); line-height: 1.45; }

@media (max-width: 780px) {
  .rat-hero { min-height: 580px; }
  .rat-hero > img { object-position: 54% center; }
  .rat-hero-veil { background: linear-gradient(0deg, rgba(4,6,12,.97) 0%, rgba(4,6,12,.65) 55%, rgba(4,6,12,.25)); }
  .rat-hero-copy { margin-bottom: 2rem; }
  .rat-wheel { width: min(710px, 96vw); }
  .rat-month { width: 80px; height: 126px; transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-215%) rotate(calc(var(--angle) * -1)); }
  .rat-month img { width: 63px; height: 101px; }
  .rat-center { width: 108px; }
  .rat-center img { width: 82px; height: 131px; }
  .rat-month-detail { grid-template-columns: 180px 1fr; }
  .rat-detail-grid { grid-template-columns: 1fr; }
  .rat-detail-grid section { min-height: 0; }
  .rat-guide { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .rat-body { width: min(100% - 1rem, 1180px); }
  .rat-hero-points { gap: .35rem; }
  .rat-hero-points span { padding: .42rem .55rem; font-size: .68rem; }
  .rat-start { padding-bottom: 3.5rem; }
  .rat-wheel-stage { margin-inline: -.5rem; padding-top: .2rem; }
  .rat-wheel { width: min(350px, calc(100vw - 16px)); }
  .rat-wheel-ring { inset: 19%; border-width: 3px; }
  .rat-month { width: 53px; height: 83px; transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-178%) rotate(calc(var(--angle) * -1)); }
  .rat-month span { top: -.18rem; min-width: 32px; padding: .12rem .25rem; font-size: .48rem; }
  .rat-month img { width: 43px; height: 69px; border-width: 1px; border-radius: 3px; }
  .rat-month:hover img, .rat-month.is-active img { transform: translateY(-2px) scale(1.1); }
  .rat-center { width: 78px; }
  .rat-center-label { margin-bottom: .25rem; font-size: .48rem; }
  .rat-center img { width: 58px; height: 93px; border-width: 2px; border-radius: 4px; }
  .rat-center strong { max-width: 78px; margin-inline: auto; font-size: .65rem; }
  .rat-month-detail { grid-template-columns: 94px 1fr; align-items: start; gap: .9rem; padding: .85rem; border-radius: 16px; }
  .rat-detail-card { grid-column: 1; grid-row: 1 / span 3; }
  .rat-detail-card img { width: 94px; border-width: 2px; border-radius: 6px; }
  .rat-detail-copy h3 { font-size: 1.85rem; }
  .rat-detail-tagline { margin-bottom: .8rem; font-size: 1rem; }
  .rat-detail-grid { grid-column: 1 / -1; }
  .rat-detail-copy { display: contents; }
  .rat-detail-copy > .rat-detail-kicker { grid-column: 2; grid-row: 1; align-self: end; margin: 0 0 .2rem; }
  .rat-detail-copy > h3 { grid-column: 2; grid-row: 2; align-self: start; margin: 0; }
  .rat-detail-copy > .rat-detail-tagline { grid-column: 2; grid-row: 3; align-self: start; margin: 0; }
  .rat-detail-copy > .rat-detail-grid { grid-column: 1 / -1; grid-row: 4; }
  .rat-annual-card { grid-template-columns: 83px 1fr; gap: .8rem; }
  .rat-annual-card img { width: 76px; height: 122px; }
  .rat-annual-card h4 { font-size: 1.35rem; }
  .rat-annual-card p { font-size: .86rem; }
  .rat-summary-grid { grid-template-columns: 1fr; }
  .rat-summary-grid section { min-height: 0; }
  .rat-actions { display: grid; grid-template-columns: 1fr; }
  .rat-share, .rat-again { width: 100%; }
  .rat-guide { width: min(100% - 1rem, 1180px); padding: 1rem; border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .rat *, .rat *::before, .rat *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
