* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
               "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: #fff; color: #111;
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.wrap {
  width: 100%; max-width: 640px; margin: 0 auto; padding: 88px 24px 40px;
  flex: 1;
  display: flex; flex-direction: column; justify-content: center;
}
.back {
  align-self: flex-start;
  color: #999; text-decoration: none; font-size: 13px; letter-spacing: 2px;
  position: fixed; top: 28px;
  left: max(24px, calc((100vw - 592px) / 2)); z-index: 10;
}
.back:hover { color: #111; }
h1 { font-size: 28px; font-weight: 700; letter-spacing: 6px; }
.content-card {
  margin-top: 28px;
  border: 1px solid #e5e5e5; border-radius: 14px;
  padding: 48px 32px; text-align: center;
  letter-spacing: 2px; font-size: 15px;
}
.ver {
  display: inline-block;
  font-size: 12px; letter-spacing: 3px; color: #9b87a5;
  border: 1px solid #9b87a5; border-radius: 999px;
  padding: 4px 16px; margin-bottom: 22px;
}
.content-card p { color: #555; }
.content-card p + p { margin-top: 12px; color: #999; font-size: 13px; }

footer {
  text-align: center; padding: 28px 0 36px;
  font-size: 12px; color: #ccc; letter-spacing: 1px;
}

.portal-snow { display: none; position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 3; }
body.xmas {
  --pine: #28624e; --berry: #a83242; --gold: #c6a165;
  background:
    radial-gradient(ellipse at 100% 0%, #c6a16521, transparent 48%),
    linear-gradient(160deg, #f1f4ec, #fbf7ef 65%, #f6f0e7);
  color: #293e35;
}
body.xmas::before {
  content: ''; position: fixed; right: max(14px, calc((100vw - 760px) / 2));
  bottom: 54px; width: clamp(160px, 28vw, 260px); aspect-ratio: 4 / 3;
  background: url('winter-scene.webp') right bottom / contain no-repeat;
  opacity: .6; pointer-events: none;
}

body.xmas .wrap { position: relative; }

body.xmas header {
  position: relative; padding: 34px 20px 28px; margin-bottom: 0; text-align: center;
  border: 1px solid #c6a16566; border-radius: 24px;
  background:
    radial-gradient(circle at 14% 20%, #f5dda680 1px, transparent 2px) 0 0 / 100px 70px,
    repeating-linear-gradient(125deg, transparent 0 14px, #ffffff05 14px 15px),
    linear-gradient(115deg, #163f33, #285d48 65%, #1c483a);
  box-shadow: 0 8px 28px #1c402e12;
}
body.xmas header::before {
  content: ''; position: absolute; top: 8px; left: 16px; width: 135px; height: 32px;
  background: url('header-decoration.webp') center / contain no-repeat;
  transform: rotate(-10deg); pointer-events: none;
}

body.xmas .snow-card {
  --snow-cap: url("snow-edge.svg");
  position: relative;
}
body.xmas .snow-card::before {
  content: ''; position: absolute; top: -11px; left: 9px; right: 9px; height: 22px;
  background: var(--snow-cap) center / 100% 100% no-repeat;
  filter: drop-shadow(0 2px 1px #41594618); pointer-events: none;
}
body.xmas .snow-card:nth-of-type(even) { --snow-cap: url("snow-edge-alt.svg"); }

body.xmas footer { position: relative; color: #7b8073; }
body.xmas .portal-snow { display: block; }
.portal-flake {
  position: absolute; top: -12px; width: var(--size); height: var(--size); border-radius: 50%;
  background: #fff; opacity: 0;
  animation: portal-snowfall var(--duration) var(--delay) linear infinite;
}
@keyframes portal-snowfall {
  0% { transform: translate3d(0, -12px, 0); opacity: 0; }
  8%, 90% { opacity: .65; }
  100% { transform: translate3d(22px, calc(100vh + 24px), 0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  body.xmas .portal-snow { display: none; }
}

body.xmas h1 { color: #fff9e9; }
body.xmas .back { color: #60705e; }
body.xmas .back:hover { color: #a83242; }
body.xmas .content-card {
  background: #fffefaf0; border-color: #4a5e4926; border-radius: 18px;
  box-shadow: 0 4px 18px #2642300b;
}
body.xmas .ver { color: #a83242; border-color: #c6a16599; background: #fcf6f0; }
body.xmas .content-card p { color: #4b6051; }
body.xmas .content-card p + p, body.xmas .social .label { color: #7b8073; }

.primary-link {
  align-self: stretch; margin-top: 26px; padding: 18px 24px;
  border-radius: 14px; background: #242225; color: #fff;
  font-size: 16px; font-weight: 700; line-height: 1.5; letter-spacing: 1px;
  text-align: center; text-decoration: none;
}
.primary-link:hover { background: #353237; }
.primary-link:focus-visible { outline: 2px solid #242225; outline-offset: 3px; }
body.xmas .primary-link {
  background: var(--pine); color: #fff9e9;
  box-shadow: inset 0 0 0 1px var(--gold);
}
body.xmas .primary-link:hover { background: #1c483a; }
body.xmas .primary-link:focus-visible { outline-color: var(--berry); }
