:root {
  --bg: #f7f4ee;
  --surface: #ffffff;
  --surface-alt: #efe9dc;
  --ink: #18181b;
  --muted: #5d584f;
  --accent: #c43419;
  --accent-hover: #a52811;
  --accent-soft: #fff2ef;
  --accent-ink: #9e2610;
  --gold: #f2b82e;
  --border: #dcd5c7;
  --radius: 20px;
  --shadow-sm: 0 2px 0 rgba(24, 24, 27, 0.1);
  --shadow-md: 4px 5px 0 rgba(24, 24, 27, 0.9);
  --font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320' viewBox='0 0 320 320'%3E%3Cellipse cx='72' cy='86' rx='54' ry='36' transform='rotate(-14 72 86)' fill='none' stroke='%23e7e0d0' stroke-width='2'/%3E%3Ccircle cx='248' cy='214' r='44' fill='none' stroke='%23e7e0d0' stroke-width='2' stroke-dasharray='8 8'/%3E%3Cpath d='M196 58 Q232 34 268 62' fill='none' stroke='%23e7e0d0' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  background: var(--ink);
  color: #ffffff;
  padding: 8px 16px;
  border-radius: 999px;
  z-index: 100;
}

.skip-link:focus {
  left: 16px;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Playful Brand Lockup */
.site-header {
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px dashed var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.025em;
}

.brand:hover {
  text-decoration: none;
}

.brand-svg {
  flex-shrink: 0;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand:hover .brand-svg {
  transform: rotate(-5deg) scale(1.06);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-accent {
  color: var(--accent);
}

.brand-pill {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  background: var(--gold);
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 2px 8px;
  border-radius: 999px;
  transform: rotate(-3deg);
  line-height: 1.25;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-nav a {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.site-nav a:hover {
  background: var(--surface);
  border-color: var(--ink);
  text-decoration: none;
}

/* Typography & Playful Sticker Eyebrows */
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0;
  color: var(--ink);
}

h1 {
  font-size: 40px;
  font-weight: 700;
}

h2 {
  font-size: 30px;
  font-weight: 700;
}

h3 {
  font-size: 20px;
  font-weight: 700;
}

.eyebrow,
.eyebrow-sticker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--ink);
  padding: 4px 12px;
  border-radius: 999px;
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-1.5deg);
}

.eyebrow-sticker--gold {
  background: var(--gold);
  transform: rotate(1.2deg);
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* Tactile Pill Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.15s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 4px 0 var(--ink);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 0 var(--ink);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}

.btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 var(--ink);
}

.btn-full {
  width: 100%;
}


/* Hero & Sketchbook Stage */
.hero-stage {
  padding: 18px 0 44px;
}

.hero-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.hero-h1 {
  position: relative;
  display: inline-block;
  padding-bottom: 6px;
}

.hero-squiggle {
  display: block;
  width: 170px;
  height: 14px;
  margin-top: -2px;
}

.hero-summary {
  margin: 0;
  max-width: 44ch;
  color: var(--muted);
  font-size: 15px;
}

.stage-shell {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 24px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.stage-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 455px;
  max-height: 535px;
  background: var(--surface-alt);
  overflow: hidden;
}

.stage-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.stage-cover {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  z-index: 2;
}

.cover-visual {
  flex: 1;
  min-height: 0;
  padding: 12px 16px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
}

.cover-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 14px;
}

.cover-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: var(--surface);
  border-top: 1.5px dashed var(--border);
}

.cover-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cover-badge {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.cover-hint {
  font-size: 14px;
  color: var(--muted);
}

.btn-play {
  min-height: 48px;
  padding: 0 28px;
  font-size: 16px;
  flex-shrink: 0;
}

.stage-loader {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg);
  z-index: 3;
}

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

.stage-frame[data-gf-state="loading"] .stage-cover,
.stage-frame[data-gf-state="playing"] .stage-cover {
  display: none;
}

.proof-spinner {
  position: relative;
  width: 56px;
  height: 56px;
}

.proof-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px dashed var(--accent);
  animation: spinProof 2.4s linear infinite;
}

.proof-ring--inner {
  inset: 12px;
  border: 3px solid var(--ink);
  border-top-color: transparent;
  animation: spinProof 1.1s linear infinite reverse;
}

@keyframes spinProof {
  to { transform: rotate(360deg); }
}

.loader-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

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

.stage-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  background: var(--surface);
  border-top: 1.5px dashed var(--border);
  flex-wrap: wrap;
}

.action-left, .action-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  transition: transform 0.12s ease, background-color 0.15s ease;
}

.btn-chip:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn-chip[data-gf-liked],
.btn-chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 2px 0 var(--accent);
}

.btn-chip--dark {
  background: var(--ink);
  color: #ffffff;
  border-color: var(--ink);
}

.btn-chip--dark:hover {
  background: #2e2e34;
}

.chip-count {
  font-family: var(--font-display);
  font-weight: 700;
}

.share-toast {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

/* Sections */
.section {
  padding: 56px 0;
  border-top: 1.5px dashed var(--border);
}

.section-head {
  margin-bottom: 32px;
}

.section-sub {
  margin: 8px 0 0;
  max-width: 62ch;
  color: var(--muted);
}

/* Casual Pinned-Print Exhibition Cards */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.gallery-card {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

.gallery-card:nth-child(1) { transform: rotate(-1.2deg); }
.gallery-card:nth-child(2) { transform: rotate(1.1deg); }
.gallery-card:nth-child(3) { transform: rotate(0.9deg); }
.gallery-card:nth-child(4) { transform: rotate(-1.1deg); }

.gallery-card:hover {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: 6px 8px 0 rgba(24, 24, 27, 0.95);
}

.gallery-thumb {
  padding: 14px 14px 0;
  background: var(--surface);
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
  border: 1.5px solid var(--ink);
}

.gallery-body {
  padding: 18px 22px 24px;
}

.gallery-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.gallery-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  padding: 3px 11px;
  border-radius: 999px;
  transform: rotate(-4deg);
}

.gallery-tag {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.gallery-body p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}


/* Tactile 3-Step Strip */
.steps-strip {
  list-style: none;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  background: var(--surface-alt);
  border: 2px solid var(--ink);
  border-radius: 26px;
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.step-item {
  background: var(--surface);
  border: 1.5px dashed #c6bdae;
  border-radius: 18px;
  padding: 22px;
}

.step-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  background: var(--gold);
  border: 1.5px solid var(--ink);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  transform: rotate(-4deg);
}

.step-item:nth-child(2) .step-num {
  background: var(--accent);
  color: #ffffff;
  transform: rotate(3deg);
}

.step-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

/* Asymmetric Reading + Dark Gallery Pass */
.editorial-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 48px;
  align-items: start;
}

.prose p {
  max-width: 70ch;
  margin: 0 0 16px;
  color: var(--ink);
}

.prose h2 {
  margin: 32px 0 12px;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose h3 {
  margin: 24px 0 8px;
}

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

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

.spec-card {
  position: sticky;
  top: 88px;
  background: var(--ink);
  color: #f7f4ee;
  border: 2px solid var(--ink);
  border-radius: 26px;
  padding: 26px;
  box-shadow: 6px 6px 0 var(--gold);
}

.spec-eyebrow {
  display: inline-block;
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--ink);
  padding: 4px 12px;
  border-radius: 999px;
  transform: rotate(-2deg);
}

.spec-card h3 {
  color: #ffffff;
  font-size: 22px;
  margin-bottom: 16px;
}

.spec-list {
  margin: 0 0 24px;
}

.spec-row {
  padding: 12px 0;
  border-top: 1.5px dashed rgba(247, 244, 238, 0.22);
}

.spec-row dt {
  font-size: 12px;
  font-weight: 600;
  color: #c5bfb4;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.spec-row dd {
  margin: 4px 0 0;
  font-size: 14px;
  color: #ffffff;
}

.spec-card .btn-primary {
  border-color: #ffffff;
  box-shadow: 0 4px 0 rgba(255, 255, 255, 0.25);
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 820px;
}

.faq-item {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 20px;
  padding: 0 24px;
  box-shadow: 3px 3px 0 rgba(24, 24, 27, 0.14);
}

.faq-item[open] {
  box-shadow: var(--shadow-md);
}

.faq-item summary {
  cursor: pointer;
  padding: 20px 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--accent);
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2212";
  background: var(--gold);
  color: var(--ink);
}

.faq-answer {
  padding: 0 0 20px;
  color: var(--muted);
  border-top: 1.5px dashed var(--border);
}

.faq-answer p {
  margin: 12px 0 0;
  max-width: 70ch;
}

/* Comments */
.comments-wrap {
  max-width: 820px;
}

.comment-form {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 24px;
  padding: 26px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.reply-banner {
  margin-bottom: 12px;
  padding: 8px 14px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border: 1.5px solid var(--accent);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.form-row {
  margin-bottom: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field span {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
  background: var(--surface);
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

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

.comment-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.comments-empty {
  display: none;
  margin: 0;
  padding: 24px;
  background: var(--surface);
  border: 1.5px dashed #c6bdae;
  border-radius: 20px;
  color: var(--muted);
}

.comment-list[data-gf-empty] .comments-empty {
  display: block;
}

.comment-list[data-gf-off] {
  display: none;
}

.comment-card {
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 20px;
  padding: 20px 24px;
}

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

.comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.comment-author {
  font-family: var(--font-display);
  font-size: 16px;
}

.comment-owner-badge {
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  background: var(--accent);
  padding: 2px 10px;
  border-radius: 999px;
}

.comment-time {
  font-size: 12px;
  color: var(--muted);
}

.comment-reply-to {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

.comment-body {
  margin: 0 0 12px;
  white-space: pre-wrap;
}

.comment-reply-btn {
  background: none;
  border: 0;
  padding: 4px 0;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.comment-reply-btn:hover {
  color: var(--accent);
}

.comment-replies {
  margin-top: 12px;
  padding-left: 20px;
  border-left: 2px dashed var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Inner & Legal Pages */
.page-shell {
  padding: 32px 0 64px;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 14px;
  color: var(--muted);
}

.prose-card {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 26px;
  padding: 48px;
  max-width: 820px;
  box-shadow: var(--shadow-md);
}

.page-header {
  padding-bottom: 24px;
  margin-bottom: 24px;
  border-bottom: 1.5px dashed var(--border);
}

.page-lead {
  margin: 12px 0 0;
  font-size: 18px;
  color: var(--muted);
  max-width: 64ch;
}

.page-meta {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.page-cta {
  margin-top: 32px;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 2px solid var(--ink);
  padding: 48px 0 32px;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1.5px dashed var(--border);
}

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

.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  font-size: 14px;
  color: var(--muted);
  flex-wrap: wrap;
}

.footer-bottom p {
  margin: 0;
}


/* Embedded Original SpotDifference Game */
body.is-embed {
  background: var(--bg);
  background-image: none;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.embed-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.sd-app {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 16px 14px;
  gap: 10px;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.sd-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: 16px;
  padding: 8px 14px;
  box-shadow: 0 2px 0 rgba(24, 24, 27, 0.12);
}

.sd-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.sd-style-pill {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ink);
  color: #ffffff;
  flex-shrink: 0;
}

.sd-style-pill--daily {
  background: var(--accent);
}

.sd-puzzle-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sd-dots {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sd-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: transparent;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease, border-color 0.2s ease;
}

.sd-dot.is-found {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.18);
}

.sd-counter {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-left: 4px;
}

.sd-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sd-stat {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink);
}

.sd-stat.is-penalty {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.sd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--ink);
  transition: transform 0.12s ease, background-color 0.15s ease;
}

.sd-btn:hover {
  transform: translateY(-1px);
}

.sd-btn--accent {
  background: var(--accent);
  border-color: var(--ink);
  color: #ffffff;
}

.sd-btn--accent:hover {
  background: var(--accent-hover);
}

.sd-board-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sd-frames {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
  max-height: 100%;
  align-items: center;
}

.sd-frame-card {
  position: relative;
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 3px 0 rgba(24, 24, 27, 0.12);
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.sd-frame-card.is-shake {
  animation: sdShake 0.28s ease;
}

@keyframes sdShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.sd-canvas-box {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-alt);
  cursor: crosshair;
}

.sd-canvas-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  display: block;
}

.sd-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.sd-proof-ring {
  fill: rgba(196, 52, 25, 0.1);
  stroke: #c43419;
  stroke-width: 4.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  animation: sdPop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes sdPop {
  0% { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.sd-hint-ring {
  fill: rgba(242, 184, 46, 0.22);
  stroke: #d99a26;
  stroke-width: 4;
  stroke-dasharray: 8 6;
  vector-effect: non-scaling-stroke;
  animation: sdPulse 1.1s ease-in-out infinite;
}

@keyframes sdPulse {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.3; }
}

.sd-crosshair {
  position: absolute;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  margin-top: -11px;
  border-radius: 50%;
  border: 2px solid rgba(196, 52, 25, 0.85);
  background: rgba(255, 255, 255, 0.25);
  pointer-events: none;
  display: none;
  z-index: 4;
}

.sd-miss-mark {
  position: absolute;
  width: 28px;
  height: 28px;
  margin-left: -14px;
  margin-top: -14px;
  border-radius: 50%;
  background: rgba(196, 52, 25, 0.94);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 5;
  animation: sdFadeOut 0.65s ease forwards;
}

@keyframes sdFadeOut {
  0% { opacity: 1; transform: scale(0.8); }
  25% { opacity: 1; transform: scale(1.08); }
  100% { opacity: 0; transform: scale(0.95) translateY(-8px); }
}

.sd-bottombar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  font-size: 14px;
  color: var(--muted);
}

.sd-toast {
  font-weight: 600;
  color: var(--ink);
}

.sd-toast.is-found {
  color: var(--accent);
}

.sd-modal {
  position: fixed;
  inset: 0;
  background: rgba(24, 24, 27, 0.56);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 999;
}

.sd-modal-card {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 24px;
  padding: 24px;
  width: 100%;
  max-width: 760px;
  max-height: 92%;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
}

.sd-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sd-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.sd-tab {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.sd-tab.is-active {
  background: var(--gold);
  color: var(--ink);
}

.sd-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.sd-pick-card {
  text-align: left;
  padding: 0;
  border: 1.5px solid var(--ink);
  border-radius: 14px;
  background: var(--bg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.sd-pick-card:hover {
  transform: translateY(-2px);
  box-shadow: 3px 3px 0 var(--ink);
}

.sd-pick-card.is-current {
  border-color: var(--accent);
  box-shadow: 3px 3px 0 var(--accent);
}

.sd-pick-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.sd-pick-info {
  padding: 8px 10px;
}

.sd-pick-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 2px;
}

.sd-pick-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.sd-solved-tag {
  color: var(--accent);
  font-weight: 700;
}

.sd-win-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.sd-win-box {
  background: var(--bg);
  border: 1.5px dashed #c6bdae;
  border-radius: 14px;
  padding: 12px;
  text-align: center;
}

.sd-win-val {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

.sd-win-lbl {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sd-board-list {
  margin: 16px 0;
  padding: 14px;
  background: var(--bg);
  border: 1.5px dashed #c6bdae;
  border-radius: 14px;
}

.sd-board-list h4 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 14px;
}

.sd-board-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.sd-board-rows li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sd-win-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

/* Responsive */
@media (max-width: 900px) {
  .hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .editorial-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .spec-card {
    position: static;
  }
}

@media (max-width: 680px) {
  body.is-embed {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
  .sd-app {
    padding: 8px 10px 14px;
  }
  .sd-frames {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .sd-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .sd-puzzle-title {
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  .header-inner {
    min-height: 58px;
    gap: 8px;
  }
  .brand {
    font-size: 18px;
    gap: 6px;
  }
  .brand-svg {
    width: 32px;
    height: 32px;
  }
  .brand-pill {
    display: none;
  }
  .site-nav {
    gap: 2px;
  }
  .site-nav a {
    font-size: 13px;
    padding: 6px 8px;
  }
  h1 {
    font-size: 30px;
  }
  h2 {
    font-size: 24px;
  }
  .stage-frame {
    aspect-ratio: auto;
    min-height: 500px;
    max-height: none;
  }
  .cover-visual {
    padding: 10px;
  }
  .cover-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 16px;
  }
  .btn-play {
    width: 100%;
  }
  .stage-actions {
    padding: 12px 16px;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .gallery-card:nth-child(n) {
    transform: rotate(0deg);
  }
  .steps-strip {
    grid-template-columns: 1fr;
    padding: 16px;
  }
  .prose-card {
    padding: 24px;
  }
  .footer-inner {
    flex-direction: column;
  }
}


/* Gallery Card Links & Pictures / Hard Catalog Grid */
a.gallery-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.gallery-card:hover {
  text-decoration: none;
}

.gallery-link-cta {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
}

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.filter-bar .btn-chip.is-active {
  background: var(--gold);
  border-color: var(--ink);
  color: var(--ink);
}

.pictures-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.picture-card {
  background: var(--surface);
  border: 2px solid var(--ink);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.picture-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 8px 0 rgba(24, 24, 27, 0.95);
}

.picture-thumb {
  padding: 12px 12px 0;
}

.picture-thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  border: 1.5px solid var(--ink);
}

.picture-body {
  padding: 14px 18px 20px;
}

.picture-body p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}

@media (max-width: 900px) {
  .pictures-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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