﻿:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #171717;
  background: #f7f7f5;
}
* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; }
button, input, textarea { font: inherit; }
.wrap { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.hero {
  padding: 42px 0 28px;
  border-bottom: 1px solid #ddd;
  background: white;
}
.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
}
h1 {
  margin: 0;
  font-size: clamp(38px, 7vw, 88px);
  line-height: .95;
  letter-spacing: -.04em;
}
.tagline {
  font-size: clamp(18px, 2.4vw, 30px);
  margin: 14px 0 20px;
  max-width: 800px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 36px;
  font-size: 18px;
}
.stats strong { font-size: 24px; }

.instructions {
  margin: 24px 0 14px;
  padding: 14px 16px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 12px;
}

.board-shell {
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #222;
}
.toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px;
  color: white;
  border-bottom: 1px solid #333;
}
.toolbar button {
  border: 1px solid #555;
  background: #222;
  color: white;
  border-radius: 8px;
  padding: 7px 12px;
  cursor: pointer;
}
#zoomLabel { min-width: 48px; text-align: center; }

.viewport {
  width: 100%;
  height: 650px;
  overflow: auto;
  position: relative;
  background:
    linear-gradient(45deg, #171717 25%, transparent 25%),
    linear-gradient(-45deg, #171717 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #171717 75%),
    linear-gradient(-45deg, transparent 75%, #171717 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}
.canvas-stage {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-width: 100%;
  min-height: 100%;
  padding: 14px;
}
canvas#board {
  display: block;
  background: #efefec;
  cursor: crosshair;
  flex: 0 0 auto;
}

.selection-panel {
  position: sticky;
  bottom: 16px;
  margin: 16px 0 24px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  box-shadow: 0 12px 35px rgba(0,0,0,.15);
}
.selection-panel.hidden { display: none; }
.selection-panel .label {
  display: block;
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
}
.selection-panel strong { font-size: 20px; }
.selection-panel button {
  border: 0;
  border-radius: 10px;
  padding: 12px 16px;
  cursor: pointer;
}
#claimBtn { background: #111; color: white; }
#claimBtn:disabled { opacity: .4; cursor: not-allowed; }
.secondary { background: #eee; }

/* Requested change: charity text centered under the board */
.cause {
  margin: 42px auto 20px;
  max-width: 860px;
  text-align: center;
}
.cause h2 {
  font-size: 30px;
  margin: 0 0 12px;
}
.cause p {
  font-size: 18px;
  line-height: 1.65;
  margin: 0 auto;
}

.magnifier {
  position: fixed;
  z-index: 1000;
  width: 200px;
  background: white;
  border: 2px solid #111;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 12px 35px rgba(0,0,0,.25);
  pointer-events: none;
}
.magnifier canvas {
  display: block;
  width: 180px;
  height: 180px;
  border: 1px solid #bbb;
  background: #efefec;
}
.magnifier-meta {
  padding: 7px 3px 2px;
  font-size: 13px;
  line-height: 1.3;
}
.magnifier-meta strong,
.magnifier-meta span { display: block; }
.magnifier-meta span { color: #666; margin-top: 2px; }

dialog {
  width: min(560px, calc(100% - 30px));
  border: 0;
  border-radius: 16px;
  padding: 0;
  box-shadow: 0 25px 80px rgba(0,0,0,.28);
}
dialog::backdrop { background: rgba(0,0,0,.55); }
.claim-form { padding: 22px; }
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.dialog-head h2 { margin: 0; font-size: 30px; }
.close {
  border: 0;
  background: none;
  font-size: 28px;
  cursor: pointer;
}
.claim-summary { font-size: 18px; margin: 12px 0 4px; }
.claim-form label {
  display: block;
  margin: 16px 0;
  font-weight: 600;
}
.claim-form input,
.claim-form textarea {
  width: 100%;
  margin-top: 6px;
  border: 1px solid #bbb;
  border-radius: 9px;
  padding: 10px 11px;
}
.upload-preview {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 12px;
  background: #fafaf8;
}
.upload-preview.hidden { display: none; }
.preview-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}
.preview-frame {
  width: 100%;
  max-height: 260px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #999;
  background: #111;
}
.preview-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.preview-note {
  display: block;
  margin-top: 7px;
  color: #666;
  font-size: 13px;
}
.review-notice,
.notice {
  padding: 10px 12px;
  border-radius: 9px;
  font-size: 14px;
  margin-top: 10px;
}
.review-notice {
  border: 1px solid #bbb;
  background: white;
  font-weight: 600;
}
.notice { background: #f1f1ee; }
.primary {
  margin-top: 16px;
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 10px;
  background: #111;
  color: white;
  font-weight: 700;
  cursor: pointer;
}
.footer {
  padding: 30px 0 50px;
  display: flex;
  justify-content: space-between;
  color: #777;
  font-size: 14px;
}

@media (max-width: 720px) {
  .viewport { height: 520px; }
  .selection-panel { grid-template-columns: 1fr 1fr 1fr; }
  .selection-panel button { grid-column: span 3; }
  .magnifier { width: 164px; }
  .magnifier canvas { width: 144px; height: 144px; }
  .cause h2 { font-size: 25px; }
  .cause p { font-size: 16px; }
}

/* Animated GIF claims layered above the canvas */
.canvas-stage {
  position: relative;
}

.animated-claim-media {
  position: absolute;
  display: block;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
  z-index: 2;
}

/* =========================================================
   COMPACT DESKTOP LAYOUT
   Keeps the whole experience closer to one-screen height.
   Mobile layout remains unchanged.
   ========================================================= */

@media (min-width: 721px) {

  .hero {
    padding: 18px 0 12px;
  }

  .hero h1 {
    margin-top: 0;
    margin-bottom: 8px;
  }

  .instructions {
    margin: 10px 0 8px;
    padding: 9px 14px;
  }

  .toolbar {
    padding: 7px 10px;
  }

  .viewport {
    height: clamp(360px, 42vh, 460px);
  }

  .cause {
    margin: 18px auto 10px;
  }

  .cause h2 {
    font-size: 26px;
    margin-bottom: 7px;
  }

  .cause p {
    font-size: 16px;
    line-height: 1.4;
  }

  .footer {
    padding: 12px 0 18px;
  }
}

/* Final desktop balance */
@media (min-width: 721px) {
  .hero h1 {
    font-size: clamp(56px, 6vw, 78px);
    line-height: .95;
    margin-bottom: 8px;
  }

  .hero {
    padding: 14px 0 10px;
  }

  .viewport {
    height: clamp(380px, 44vh, 430px);
  }

  .cause {
    margin-top: 14px;
  }
}

/* Final landscape board sizing */
@media (min-width: 721px) {
  .viewport {
    height: 530px;
  }

  .cause {
    margin-top: 10px;
  }
}


.stats {
  flex-wrap: wrap;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}


/* Policy and support pages */
.policy-page {
  max-width: 900px;
  padding-top: 48px;
  padding-bottom: 80px;
}

.policy-page h1 {
  margin-bottom: 8px;
}

.policy-page h2 {
  margin-top: 32px;
  margin-bottom: 10px;
}

.policy-page p,
.policy-page li {
  line-height: 1.65;
}

.policy-page li + li {
  margin-top: 7px;
}

.policy-page a {
  color: inherit;
}

.policy-meta {
  opacity: .65;
  margin-bottom: 32px;
}

.policy-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid #d8d8d2;
}

.support-address {
  font-size: 1.2rem;
  font-weight: 700;
}

.checkout-legal {
  margin: 12px 0 16px;
  font-size: 12px;
  line-height: 1.45;
  opacity: .75;
}

.checkout-legal a {
  color: inherit;
  text-decoration: underline;
}

.footer {
  flex-wrap: wrap;
  gap: 10px 18px;
}
