/* 800Game — visual map of the toll-free vanity process */

:root {
  --ink: #1a1a1a;
  --paper: #fafaf6;
  --hair: #d8d4c6;
  --accent: #c4331f;
  --accent-soft: #c4331f1a;
  --gold: #c08a2e;
}

* { box-sizing: border-box; }

body.game {
  margin: 0;
  font-family: Georgia, 'Iowan Old Style', serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
}

.game-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--hair);
  background: #fff;
}
.game-nav a { color: var(--ink); text-decoration: none; font-size: 14px; }
.game-nav a:hover { text-decoration: underline; }
.game-nav .brand { font-weight: 700; letter-spacing: 0.02em; }
.game-nav .mode-badge {
  font-size: 11px;
  padding: 3px 8px;
  border: 1px solid var(--accent);
  border-radius: 3px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.game-hero {
  max-width: 880px;
  margin: 40px auto 24px;
  text-align: center;
  padding: 0 20px;
}
.game-hero h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
.game-hero .tagline {
  font-size: 1.05rem;
  color: #555;
  max-width: 620px;
  margin: 0 auto;
}
.game-hero .instruction {
  margin-top: 18px;
  font-size: 0.9rem;
  color: #777;
  font-style: italic;
}

/* Stage: image + overlay */
.game-stage {
  position: relative;
  max-width: 1100px;
  margin: 0 auto 60px;
  padding: 0 16px;
}
.game-stage-inner {
  position: relative;
  width: 100%;
  border: 1px solid var(--hair);
  background: #fff;
  box-shadow: 0 6px 30px rgba(0,0,0,.05);
  overflow: hidden;
  border-radius: 4px;
}
.game-stage-inner picture, .game-stage-inner img {
  display: block;
  width: 100%;
  height: auto;
}
.game-stage-inner .hotspots {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.game-stage-inner .hotspot {
  fill: transparent;
  stroke: transparent;
  stroke-width: 0.3;
  cursor: pointer;
  pointer-events: all;
  transition: fill .15s, stroke .15s;
}
.game-stage-inner .hotspot:hover {
  fill: var(--accent-soft);
  stroke: var(--accent);
}
.game-stage-inner .hotspot.hotspot-filled {
  fill: rgba(192, 138, 46, 0.08);
  stroke: rgba(192, 138, 46, 0.55);
  stroke-width: 0.2;
}
.game-stage-inner .hotspot.hotspot-filled:hover {
  fill: rgba(192, 138, 46, 0.18);
  stroke: var(--gold);
  stroke-width: 0.3;
}
body.edit-mode .game-stage-inner .hotspot {
  fill: rgba(196, 51, 31, 0.05);
  stroke: rgba(196, 51, 31, 0.35);
  stroke-width: 0.2;
}

/* Progress strip (editor only) */
.edit-progress {
  max-width: 1100px;
  margin: 0 auto 12px;
  padding: 0 16px;
  font-size: 13px;
  color: #555;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}
.edit-progress .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--hair);
}
.edit-progress .chip .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
}
.edit-progress .chip.empty .dot { background: #ddd; }

/* Dialog / modal */
dialog.popup {
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: 6px;
  max-width: min(960px, 92vw);
  width: 960px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  background: var(--paper);
}
dialog.popup::backdrop { background: rgba(20,20,15,.55); }
.popup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 440px;
}
@media (max-width: 720px) {
  .popup-grid { grid-template-columns: 1fr; }
}

.popup-image {
  background: #fff;
  background-repeat: no-repeat;
  border-right: 1px solid var(--hair);
  min-height: 360px;
}
.popup-image.uploaded {
  background-color: #fafaf6;
  padding: 12px;
}

/* Image on right: flip columns, move border to the other side */
.popup-grid.image-right .popup-image {
  order: 2;
  border-right: none;
  border-left: 1px solid var(--hair);
}
.popup-grid.image-right .popup-body {
  order: 1;
}
@media (max-width: 720px) {
  .popup-grid.image-right .popup-image {
    border-left: none;
    border-top: 1px solid var(--hair);
  }
}
@media (max-width: 720px) {
  .popup-image { border-right: none; border-bottom: 1px solid var(--hair); min-height: 280px; }
}

.popup-body {
  padding: 28px 30px 24px;
  position: relative;
  display: flex;
  flex-direction: column;
}
.popup-body .num {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
}
.popup-body h2 {
  font-size: 1.5rem;
  margin: 0 0 14px;
  line-height: 1.25;
}
.popup-body .text p {
  margin: 0 0 12px;
  font-size: 0.98rem;
}
.popup-body .text .empty {
  color: #a0998a;
  font-style: italic;
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #888;
}
.popup-close:hover { color: var(--ink); }

.popup-nav {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 18px;
  gap: 10px;
}
.popup-nav button {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 14px;
  border: 1px solid var(--hair);
  background: #fff;
  cursor: pointer;
  border-radius: 3px;
}
.popup-nav button:hover { border-color: var(--ink); }
.popup-nav .counter { font-size: 12px; color: #999; align-self: center; }

/* Editor form */
.popup-body.editor input, .popup-body.editor textarea {
  font-family: inherit;
  font-size: 0.98rem;
  border: 1px solid var(--hair);
  padding: 10px 12px;
  background: #fff;
  border-radius: 3px;
  width: 100%;
  resize: vertical;
}
.popup-body.editor input { font-size: 1.15rem; font-weight: 600; }
.popup-body.editor textarea { min-height: 200px; line-height: 1.5; }
.popup-body.editor label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
  margin: 14px 0 6px;
}
.popup-body.editor label:first-of-type { margin-top: 18px; }
.popup-body.editor .actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 18px;
  align-items: center;
}
.popup-body.editor .save {
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 14px;
  padding: 10px 22px;
  cursor: pointer;
  border-radius: 3px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.popup-body.editor .save:hover { background: #a32a17; }
.popup-body.editor .preview-link {
  font-family: inherit;
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  padding: 10px 12px;
  border: 1px solid var(--hair);
  border-radius: 3px;
  background: #fff;
}
.popup-body.editor .preview-link:hover {
  border-color: var(--accent);
  background: #fdf4f3;
}
.btn-redraw, .btn-delete, .btn-reorder {
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  border: 1px solid var(--hair);
  background: #fff;
  cursor: pointer;
  border-radius: 3px;
}
.btn-reorder {
  padding: 4px 10px;
  font-size: 14px;
  line-height: 1;
}
.btn-reorder:hover { border-color: var(--ink); background: #f5f1e3; }
.btn-redraw:hover { border-color: var(--ink); }
.btn-delete { color: var(--accent); }
.btn-delete:hover { background: #fdf4f3; border-color: var(--accent); }

.add-hotspot-btn {
  font-family: inherit;
  font-size: 13px;
  padding: 4px 12px;
  border: 1px solid var(--hair);
  background: #fff;
  cursor: pointer;
  border-radius: 3px;
  font-weight: 600;
}
.add-hotspot-btn:hover { border-color: var(--accent); color: var(--accent); }

.game-stage-inner.drawing-mode { cursor: crosshair; }
.game-stage-inner.drawing-mode .hotspot { pointer-events: none; }

/* Manual hotspots get a slightly different look in edit mode */
body.edit-mode .hotspot-manual {
  stroke: rgba(196, 51, 31, 0.5);
  stroke-width: 0.25;
  stroke-dasharray: 1,0.5;
}
.popup-body.editor .save-status {
  font-size: 12px;
  color: #666;
}
.popup-body.editor .save-status.ok { color: #3a7d2c; }
.popup-body.editor .hint {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  font-style: italic;
}
.image-upload {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.btn-upload, .btn-clear {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border: 1px solid var(--hair);
  background: #fff;
  cursor: pointer;
  border-radius: 3px;
}
.btn-upload:hover { border-color: var(--ink); }
.btn-clear { color: var(--accent); }
.btn-clear:hover { background: #fdf4f3; border-color: var(--accent); }
.upload-status {
  font-size: 12px;
  color: #666;
}
.upload-status.ok { color: #3a7d2c; }
.image-preview {
  margin: 8px 0 0;
  padding: 6px;
  border: 1px solid var(--hair);
  background: #fff;
  border-radius: 3px;
}
.image-preview img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  margin: 0 auto;
}
.image-side {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 0;
  font-size: 13px;
  color: #555;
}
.image-side .side-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #666;
}
.image-side label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-size: 13px;
  color: var(--ink);
  margin: 0;
  font-weight: 400;
}

