.score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.result-image {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101512;
  object-fit: cover;
}

.result-image {
  max-height: 420px;
  margin-bottom: 18px;
  aspect-ratio: 16 / 9;
}

.option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 12px 14px;
  cursor: pointer;
}

.option span {
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.option:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.quiz {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

fieldset.question {
  min-inline-size: 0;
  margin-inline: 0;
  border: 1px solid var(--line);
  padding: 18px;
}

.result {
  margin-top: 32px;
}

.public-card {
  width: 100%;
  max-width: 960px;
  margin-inline: auto;
}

.public-entry {
  margin-top: clamp(24px, 8vh, 96px);
}

.error {
  border: 1px solid rgba(255, 107, 74, 0.5);
  border-radius: 8px;
  background: rgba(255, 107, 74, 0.1);
  color: #ffb7a6;
  padding: 12px;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(460px, 0.46fr) minmax(0, 1fr);
  gap: 28px;
  min-height: calc(100vh - 104px);
}

.home-brand {
  position: sticky;
  top: 32px;
  align-self: start;
  padding-top: 72px;
}

.home-brand h1 {
  max-width: 560px;
  font-size: clamp(40px, 4vw, 56px);
  overflow-wrap: normal;
  text-transform: uppercase;
}

.home-feed,
.home-list {
  display: grid;
  align-content: start;
  gap: 18px;
}

.signal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border-bottom: 1px solid var(--line);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.signal-bar span {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 18px var(--accent);
}

.home-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  align-self: start;
  border: 1px solid rgba(215, 255, 85, 0.5);
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(215, 255, 85, 0.08), rgba(21, 27, 24, 0.95));
  padding: 18px;
}

.home-card__thumb {
  display: grid;
  place-items: center;
  width: 116px;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(215, 255, 85, 0.16), transparent), #101512;
  overflow: hidden;
}

.home-card__thumb::before {
  content: "";
  width: 38px;
  height: 38px;
  border: 2px solid rgba(215, 255, 85, 0.56);
  border-radius: 50%;
}

.home-card__thumb:has(img)::before {
  content: none;
}

.home-card__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-card__body {
  min-width: 0;
}

.home-card__body h2 {
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(215, 255, 85, 0.35);
  padding-bottom: 8px;
}

.home-card__body p {
  color: var(--muted);
  line-height: 1.45;
}

.home-card__meta {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.home-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent);
  padding: 12px 28px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.admin-step {
  display: none;
}

.admin-step.is-visible {
  display: block;
}

.steps a.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.result-grid {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.result-editor {
  display: grid;
  grid-template-columns: minmax(180px, 0.4fr) minmax(0, 1fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101512;
  padding: 14px;
}

.result-editor__preview {
  display: grid;
  place-items: center;
  min-height: 160px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--muted);
  overflow: hidden;
}

.result-editor__preview img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
}

.result-editor__fields {
  display: grid;
  gap: 12px;
}

.file-field input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-field span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
}

.editor-question summary {
  color: var(--text);
  cursor: pointer;
  font-size: 19px;
  font-weight: 900;
}

.editor-question:not([open]) {
  padding-bottom: 18px;
}

@media (max-width: 760px) {
  .hero,
  .publish-panel,
  .upload-box {
    display: grid;
  }

  .create-panel,
  .create-form,
  .grid-form,
  .result-editor,
  .steps {
    grid-template-columns: 1fr;
  }

  .steps {
    position: static;
  }

  .copy-row {
    align-items: stretch;
  }

  .shell {
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    padding: 24px 12px 56px;
    overflow: hidden;
  }

  .hero,
  .home-card,
  .panel,
  .quiz-card,
  .empty-state,
  .public-card {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .panel {
    padding: 18px;
  }

  .home-grid,
  .home-card {
    grid-template-columns: 1fr;
  }

  .home-brand {
    position: static;
    padding-top: 8px;
  }

  .home-brand h1 {
    font-size: 34px;
  }

  .home-card__thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .home-card__action {
    width: 100%;
  }

  h1 {
    font-size: clamp(26px, 8.5vw, 34px);
    line-height: 1.08;
  }

  h2 {
    font-size: 21px;
    line-height: 1.18;
  }

  .lead {
    max-width: 100%;
    font-size: 16px;
  }

  .result-image {
    max-height: 260px;
  }

  .public-entry {
    margin-top: 32px;
  }

  .option {
    min-height: 56px;
    align-items: flex-start;
  }

  .option input {
    margin-top: 2px;
  }

  fieldset.question {
    width: 100%;
    max-width: 100%;
  }
}
