/* Christmas Games Online — letterpress holiday card on cream paper.
   Design recipe: 暖纸. Memory point: a gold foil rule and a holly sprig in the header. */
:root {
  --bg: #f7f1e8;
  --card: #fffaf2;
  --text: #2b2118;
  --muted: #6b5b4b;
  --primary: #c2562f;
  --primary-hover: #a34626;
  --accent: #e0a03a;
  --pine: #2f7d4f;
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-2: 0 8px 24px rgba(0, 0, 0, .08);
  --font-title: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, sans-serif;
  --wrap: 1120px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover { color: var(--primary-hover); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.wrap {
  width: min(100% - 48px, var(--wrap));
  margin-inline: auto;
}

.site-header {
  border-bottom: 1px solid var(--accent);
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 64px;
  padding-block: 12px;
}

.wordmark {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.wordmark:hover { color: var(--text); }

.sprig {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  background:
    radial-gradient(circle at 50% 62%, var(--primary) 0 3px, transparent 3.2px),
    radial-gradient(circle at 38% 68%, var(--primary) 0 2.5px, transparent 2.7px),
    radial-gradient(circle at 62% 68%, var(--primary) 0 2.5px, transparent 2.7px),
    radial-gradient(ellipse 5px 10px at 50% 32%, var(--pine) 0 100%, transparent 100%),
    radial-gradient(ellipse 5px 9px at 32% 40%, var(--pine) 0 100%, transparent 100%),
    radial-gradient(ellipse 5px 9px at 68% 40%, var(--pine) 0 100%, transparent 100%);
}

.nav {
  display: flex;
  gap: 16px;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 4px;
}

.nav a:hover { color: var(--primary); }

.hero {
  padding-top: 32px;
  padding-bottom: 16px;
}

.hero h1 {
  margin: 0 0 16px;
  font-family: var(--font-title);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
}

.play { margin-bottom: 16px; }

.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 240px;
  background: var(--card);
  border: 1px solid rgba(43, 33, 24, .12);
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}

.cover,
.loader,
.stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.cover {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px;
  background: var(--card);
}

.cover-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.btn,
.btn-play,
.btn-ghost {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: var(--radius);
  cursor: pointer;
}

.btn,
.btn-play {
  min-height: 44px;
  padding: 12px 24px;
  border: 0;
  background: var(--primary);
  color: #fff;
}

.btn:hover,
.btn-play:hover { background: var(--primary-hover); }

.btn-play {
  position: relative;
  z-index: 1;
  min-height: 52px;
  padding: 16px 32px;
  font-size: 18px;
  box-shadow: var(--shadow-2);
}

.btn-ghost {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid rgba(43, 33, 24, .22);
  background: transparent;
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

.btn-ghost[data-gf-liked],
.btn-ghost[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-text {
  border: 0;
  background: none;
  color: var(--primary);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  padding: 0 4px;
}

.loader {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--card);
  color: var(--muted);
}

.stage[data-gf-state="loading"] .loader { display: flex; }

.loader-visual {
  display: flex;
  align-items: center;
  gap: 12px;
}

.loader-rule {
  display: block;
  width: 64px;
  height: 3px;
  background: var(--accent);
  transform-origin: center;
  animation: foil 1.2s ease-in-out infinite;
}

.loader-berry {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  animation: berry 1.2s ease-in-out infinite;
}

@keyframes foil {
  0%, 100% { transform: scaleX(.6); opacity: .45; }
  50% { transform: scaleX(1); opacity: 1; }
}

@keyframes berry {
  0%, 100% { transform: scale(.85); }
  50% { transform: scale(1.15); }
}

.loader-text { margin: 0; font-weight: 600; }

.play-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.share-msg {
  font-size: 14px;
  color: var(--muted);
}

.credit {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.prose {
  padding-block: 48px 64px;
}

.prose h2,
.prose h3,
.page h1 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.2;
}

.page h1 {
  margin: 0 0 24px;
  font-size: 36px;
}

.prose h2 {
  margin: 48px 0 16px;
  font-size: 28px;
}

.prose h3 {
  margin: 24px 0 8px;
  font-size: 22px;
}

.prose p,
.prose li {
  max-width: 70ch;
}

.prose p { margin: 0 0 16px; }

.prose ol,
.prose ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

.prose li { margin-bottom: 8px; }

.prose img {
  margin: 24px 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  border: 1px solid rgba(43, 33, 24, .08);
  background: var(--card);
}

.faq { margin-top: 48px; }

.faq-item {
  max-width: 70ch;
  padding: 16px 0;
  border-top: 1px solid rgba(43, 33, 24, .12);
}

.faq-item h3 { margin-top: 0; }

.comments {
  margin-top: 64px;
  max-width: 70ch;
}

.comments-lead,
.comments-empty { color: var(--muted); }

.comment-list[data-gf-empty] .comments-empty { display: block; }
.comment-list:not([data-gf-empty]) .comments-empty { display: none; }
.comment-list[data-gf-off] { display: none; }

.comment-form,
.comment,
.comment-reply {
  background: var(--card);
  border: 1px solid rgba(43, 33, 24, .1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  padding: 16px;
  margin-bottom: 16px;
}

.comment[data-gf-owner] { border-color: var(--accent); }

.field { display: block; margin-bottom: 12px; }

.field span {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(43, 33, 24, .22);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 16px;
}

.form-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.form-msg, .reply-to { font-size: 14px; color: var(--muted); }

.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--muted);
}

.owner-flag { display: none; color: var(--primary); font-weight: 600; }
[data-gf-owner] .owner-flag,
[data-gf-c-owner]:not(:empty) { display: inline; }

.replies { margin-top: 12px; margin-left: 16px; }

.site-footer {
  border-top: 1px solid var(--accent);
  padding: 32px 0 48px;
  background: var(--bg);
}

.footer-inner { display: grid; gap: 16px; }

.footer-brand {
  margin: 0;
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.footer-nav a {
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 14px;
  font-weight: 600;
}

.footer-nav a:hover { color: var(--primary); }

.footer-copy {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  max-width: 70ch;
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 32px, var(--wrap)); }
  body { font-size: 16px; }
  .hero h1 { font-size: 32px; }
  .page h1 { font-size: 28px; }
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .nav { width: 100%; justify-content: flex-start; }
  .btn, .btn-play, .btn-ghost { width: 100%; justify-content: center; }
  .play-bar .share-msg { width: 100%; }
  .stage { aspect-ratio: 4 / 3; }
  .form-actions .btn, .form-actions .btn-ghost { width: auto; }
}


.more-games {
  margin-top: 24px;
}

.more-games h2 {
  margin: 0 0 16px;
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.more-games-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 220px));
  gap: 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.more-games-list a {
  display: block;
  overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(43, 33, 24, .1);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  color: var(--text);
  text-decoration: none;
}

.more-games-list a:hover { color: var(--primary); }

.more-games-list img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.more-games-list span {
  display: block;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .more-games-list { grid-template-columns: 1fr; }
}
