.sw {
  --sw-ink: #273e34;
  --sw-paper: #fffbed;
  --sw-accent: #994e5b;
  --sw-tint: #f6e2db;
  isolation: isolate;
  width: 100%;
  max-width: 890px;
  margin: auto;
  border: 1px solid #a7b19a;
  border-radius: 7px;
  background: var(--sw-paper);
  color: var(--sw-ink);
  font: 15px/1.46 var(--font, system-ui, sans-serif);
  overflow: hidden;
}
.sw[data-sw="summer"] {
  --sw-accent: #3b6546;
  --sw-tint: #e5ecd6;
}
.sw[data-sw="autumn"] {
  --sw-accent: #93502f;
  --sw-tint: #f4e4ca;
}
.sw[data-sw="winter"] {
  --sw-accent: #386477;
  --sw-tint: #e0ecec;
}
.sw :is(button, a):focus-visible {
  outline: 3px solid #a35d30;
  outline-offset: -3px;
}
.sw button {
  cursor: pointer;
  appearance: none;
  font: inherit;
}
.sw-seasons,
.sw-months {
  display: grid;
}
.sw-seasons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 5px;
  gap: 3px;
  background: #253e36;
}
.sw-seasons button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 41px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 3px;
  color: #f1efde;
  background: transparent;
  font-weight: 680;
}
.sw-seasons button[aria-selected="true"] {
  color: var(--sw-ink);
  background: var(--sw-paper);
  box-shadow: inset 0 -2px #d9ceb6;
}
.sw-seasons button:hover {
  border-color: #a5b198;
}
.sw-motif {
  flex: none;
  display: inline-block;
  vertical-align: -0.18em;
  image-rendering: pixelated;
}
.sw-stage {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 2.5;
  min-height: 180px;
  max-height: 350px;
  overflow: hidden;
  background: #385a64;
  border-block: 2px solid #2e4438;
}
.sw-plates,
.sw-particles,
.sw-plates img,
.sw-stage::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.sw-plates {
  z-index: -3;
}
.sw-plates img {
  display: block;
  object-fit: cover;
  object-position: 50% 46%;
  opacity: 0;
  transition: opacity 0.44s ease;
}
.sw-plates img.sw-active {
  opacity: 1;
}
.sw-stage::after {
  pointer-events: none;
  z-index: -1;
  content: "";
  background: linear-gradient(
    0deg,
    #102a2ce8,
    rgba(19, 35, 35, 0.28) 27%,
    transparent 55%
  );
}
.sw-particles {
  pointer-events: none;
  z-index: -2;
}
.sw-particles i {
  position: absolute;
  width: 4px;
  height: 3px;
  top: 15%;
  left: 20%;
  background: #ffcad4;
  opacity: 0;
  animation: sw-fall 9s linear infinite;
}
.sw-particles i:nth-child(2) {
  top: 2%;
  left: 39%;
  animation-delay: -1.4s;
}
.sw-particles i:nth-child(3) {
  left: 64%;
  top: 8%;
  animation-delay: -6s;
  animation-duration: 10s;
}
.sw-particles i:nth-child(4) {
  left: 75%;
  animation-delay: -3.1s;
}
.sw-particles i:nth-child(5) {
  left: 88%;
  top: 20%;
  animation-delay: -8.3s;
}
.sw[data-sw="summer"] .sw-particles i {
  width: 3px;
  height: 3px;
  background: #ffe29a;
  top: 61%;
  animation-name: sw-glint;
}
.sw[data-sw="autumn"] .sw-particles i {
  background: #ef9145;
}
.sw[data-sw="winter"] .sw-particles i {
  background: #fffaf2;
}
@keyframes sw-fall {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  13%,
  65% {
    opacity: 0.82;
  }
  43% {
    transform: translate(-18px, 35px) rotate(60deg);
  }
  100% {
    opacity: 0;
    transform: translate(-4px, 110px) rotate(135deg);
  }
}
@keyframes sw-glint {
  0%,
  38%,
  72%,
  100% {
    opacity: 0;
  }
  46%,
  57% {
    opacity: 0.8;
  }
  68% {
    transform: translate(12px, -12px);
  }
}
.sw-title {
  position: absolute;
  bottom: 11%;
  left: 4%;
  color: #fffbe9;
  text-shadow: 0 2px 2px #263328b3;
}
.sw-title > span,
.sw-location,
.sw-kanji,
.sw-source {
  font-family: var(--mono, ui-monospace, monospace);
}
.sw-title > span,
.sw-location {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
.sw-title h2 {
  margin: 1px 0 0;
  color: #fffbed;
  font-size: clamp(38px, 5.5vw, 64px);
  letter-spacing: -0.055em;
  line-height: 0.97;
}
.sw-title p {
  margin: 6px 0 0;
  color: #fff9e5;
  font-size: 14px;
}
.sw-kanji {
  position: absolute;
  right: 4%;
  bottom: 10%;
  display: grid;
  place-items: center;
  min-width: 43px;
  min-height: 43px;
  border: 2px solid #fff5da;
  outline: 1px solid #fff5da;
  outline-offset: -5px;
  transform: rotate(-5deg);
  color: #fffbe3;
  background: #253d387d;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: 26px;
  line-height: 1;
}
.sw-months {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid #c6cbb6;
  background: #f3f2e4;
}
.sw-months button {
  position: relative;
  min-height: 40px;
  padding: 7px 4px;
  color: #536353;
  border: 0;
  background: transparent;
  font-weight: 650;
  font-size: 14px;
}
.sw-months button:not(:last-child)::after {
  content: "";
  position: absolute;
  width: 1px;
  right: 0;
  top: 24%;
  height: 52%;
  background: #c8cbb9;
}
.sw-months button:hover,
.sw-months button[aria-pressed="true"] {
  color: var(--sw-accent);
  background: var(--sw-tint);
}
.sw-months button[aria-pressed="true"] {
  box-shadow: inset 0 -3px var(--sw-accent);
}
.sw-notes {
  padding: clamp(14px, 2vw, 24px) 4% 0;
}
.sw-location {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--sw-accent);
}
.sw-notes h3 {
  margin: 5px 0 4px;
  font-size: clamp(21px, 2.5vw, 29px);
  line-height: 1.1;
  letter-spacing: -0.045em;
  color: var(--sw-ink);
}
.sw-notes p {
  margin: 0;
  color: #45594e;
  font-size: 15px;
}
.sw-tip {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 12px;
  padding-left: 9px;
  border-left: 2px solid var(--sw-accent);
}
.sw-tip svg {
  margin-top: 3px;
  flex: none;
  color: var(--sw-accent);
}
.sw-tip p {
  font-size: 14px;
}
.sw .sw-place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 40px;
  margin-top: 12px;
  padding: 6px 12px;
  border: 1px solid var(--sw-accent);
  border-radius: 4px;
  color: var(--sw-accent);
  background: var(--sw-tint);
  font-size: 14px;
  font-weight: 670;
  text-align: left;
}
.sw-place svg {
  flex: none;
}
.sw-place:hover {
  box-shadow: inset 0 -2px var(--sw-accent);
}
.sw-links {
  margin: 14px 4% 0;
  padding: 11px 0 15px;
  border-top: 1px dashed #c3c8b5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}
.sw-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--sw-accent);
}
.sw-deeper {
  font-size: 14px;
  font-weight: 670;
  text-decoration: none;
}
.sw-deeper:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.sw-source {
  font-size: 10px;
  letter-spacing: 0.02em;
  text-underline-offset: 3px;
}
@media (max-width: 520px) {
  .sw {
    font-size: 14px;
  }
  .sw-seasons {
    padding: 4px;
    gap: 1px;
  }
  .sw-seasons button {
    gap: 5px;
    font-size: 13px;
  }
  .sw-stage {
    min-height: 170px;
    aspect-ratio: 1.95;
  }
  .sw-title h2 {
    font-size: 42px;
  }
  .sw-kanji {
    min-width: 35px;
    min-height: 35px;
    font-size: 22px;
  }
  .sw-title p,
  .sw-notes p,
  .sw-deeper {
    font-size: 14px;
  }
  .sw-location {
    font-size: 9px;
  }
  .sw-tip p {
    font-size: 13px;
  }
}
@media (max-width: 350px) {
  .sw-seasons button {
    flex-direction: column;
    gap: 2px;
  }
  .sw-links {
    align-items: flex-start;
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sw-plates img {
    transition: none;
  }
  .sw-particles {
    display: none;
  }
}
