:root {
  color-scheme: light;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Arial, sans-serif;
  background: #f7f7f4;
  color: #14171f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 88% 8%, rgb(35 104 220 / 8%), transparent 22rem),
    #f7f7f4;
}

.page-shell {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 80px;
}

.site-header {
  padding: 0 0 34px;
  border-bottom: 1px solid #cfd2d8;
}

.header-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

.debug-badge {
  margin: 0;
  border: 1px solid #2368dc;
  border-radius: 999px;
  padding: 7px 11px;
  color: #2368dc;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

h1 {
  margin: 6px 0 12px;
  font-family: Arial, "Yu Gothic", sans-serif;
  font-size: clamp(24px, 3.6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

h1 span {
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Arial, sans-serif;
  font-size: 0.64em;
  letter-spacing: -0.025em;
}

.lead {
  max-width: 680px;
  margin: 8px 0 0;
  color: #626976;
  font-size: clamp(13px, 1.6vw, 15px);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.7;
}

.vote-panel {
  padding-top: 54px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.comment-block label {
  display: block;
  margin-bottom: 12px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.choice-hint {
  margin: 0 0 18px;
  color: #707784;
  font-size: 13px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

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

.option-card {
  position: relative;
  display: flex;
  min-width: 0;
  cursor: pointer;
  flex-direction: column;
  overflow: hidden;
  border: 6px solid transparent;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 0 0 1px #d9dce1;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.option-card:hover {
  box-shadow: 0 8px 26px rgb(23 34 52 / 12%);
  transform: translateY(-2px);
}

.option-card:focus-within {
  box-shadow: 0 0 0 4px rgb(35 104 220 / 20%);
}

.option-card:has(input:checked) {
  border-color: #2368dc;
  box-shadow: 0 8px 28px rgb(35 104 220 / 20%);
}

.option-card input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.option-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
}

.option-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px 14px;
  border-top: 1px solid #e8eaee;
  font-size: 15px;
  font-weight: 700;
}

.option-label::after {
  content: "SELECT";
  color: #9197a2;
  font-family: Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.option-card:has(input:checked) .option-label::after {
  content: "SELECTED";
  color: #2368dc;
}

.selection-mark {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #2368dc;
  color: #fff;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 140ms ease, transform 140ms ease;
}

.option-card:has(input:checked) .selection-mark {
  opacity: 1;
  transform: scale(1);
}

.vote-panel.is-voted .choice-hint,
.vote-panel.is-voted .comment-block,
.vote-panel.is-voted .message,
.vote-panel.is-voted .submit-row {
  display: none;
}

.vote-panel.is-voted .option-card {
  cursor: default;
}

.vote-panel.is-voted .option-card:hover {
  box-shadow: 0 0 0 1px #d9dce1;
  transform: none;
}

.vote-panel.is-voted .option-card:has(input:checked):hover {
  box-shadow: 0 8px 28px rgb(35 104 220 / 20%);
}

.vote-panel.is-voted .option-label::after {
  content: "";
}

.vote-panel.is-voted .option-card:has(input:checked) .option-label::after {
  content: "投票済み";
}

.comment-block {
  margin-top: 68px;
  padding-top: 42px;
  border-top: 1px solid #cfd2d8;
}

textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #b9bec7;
  border-radius: 8px;
  background: #fff;
  padding: 14px 15px;
  color: inherit;
  font: inherit;
  font-size: 16px;
  line-height: 1.7;
}

textarea:focus {
  border-color: #2368dc;
  outline: 3px solid rgb(35 104 220 / 14%);
}

textarea::placeholder {
  color: #9da2ac;
}

.counter {
  margin: 7px 0 0;
  color: #7c838f;
  font-size: 11px;
  text-align: right;
}

.submit-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 36px;
}

button {
  min-width: 160px;
  border: 0;
  border-radius: 999px;
  background: #14171f;
  color: #fff;
  cursor: pointer;
  padding: 15px 25px;
  font: inherit;
  font-weight: 700;
  transition: background 140ms ease, transform 140ms ease;
}

button:hover {
  background: #2368dc;
  transform: translateY(-1px);
}

button:focus-visible {
  outline: 4px solid rgb(35 104 220 / 22%);
  outline-offset: 3px;
}

button:disabled {
  cursor: default;
  opacity: 0.55;
  transform: none;
}

.message {
  margin-top: 24px;
  border-left: 4px solid currentColor;
  padding: 12px 14px;
  font-size: 14px;
}

.error-message {
  background: #fff1ef;
  color: #b3261e;
}

.success-message {
  background: #edf5ff;
  color: #185abc;
}

.complete-card {
  padding: 54px 24px 0;
  text-align: center;
}

.complete-card h2 {
  margin: 22px 0 10px;
  font-size: clamp(28px, 5vw, 46px);
  letter-spacing: -0.04em;
}

.complete-card p {
  margin: 0;
  color: #707784;
}

.image-modal {
  width: min(92vw, 920px);
  max-width: none;
  max-height: 92vh;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #fff;
  padding: 0;
  box-shadow: 0 24px 80px rgb(10 18 32 / 35%);
}

.image-modal::backdrop {
  background: rgb(12 17 25 / 72%);
  backdrop-filter: blur(4px);
}

.image-modal img {
  display: block;
  width: 100%;
  max-height: calc(92vh - 64px);
  background: #fff;
  object-fit: contain;
}

.image-modal img[hidden] {
  display: none;
}

.image-modal-title {
  margin: 0;
  padding: 15px 20px 17px;
  border-top: 1px solid #e4e7eb;
  font-size: 17px;
  font-weight: 700;
}

.image-modal-close {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: grid;
  width: 42px;
  min-width: 0;
  height: 42px;
  margin: 0;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 50%;
  background: rgb(20 23 31 / 76%);
  color: #fff;
  padding: 0;
  font-family: Arial, sans-serif;
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}

.image-modal-close:hover {
  background: #14171f;
  transform: none;
}

.complete-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #2368dc;
  color: #fff;
  font-size: 32px;
  font-weight: 800;
}

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 28px, 1080px);
    padding: 36px 0 56px;
  }

  .site-header {
    padding-bottom: 34px;
  }

  h1 span {
    display: block;
    margin-top: 7px;
    font-size: 0.68em;
  }

  .submit-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .header-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .vote-panel {
    padding-top: 38px;
  }

  .option-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .option-card img {
    aspect-ratio: 4 / 3;
  }

  .comment-block {
    margin-top: 48px;
    padding-top: 34px;
  }

  button {
    width: 100%;
  }

  .image-modal {
    width: calc(100vw - 20px);
  }

  .image-modal-close {
    width: 42px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
