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

:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface-hover: #242836;
  --border: #2e3345;
  --text: #e8eaef;
  --text-muted: #8b92a8;
  --accent: #ff4d6d;
  --accent-hover: #ff6b85;
  --accent-glow: rgba(255, 77, 109, 0.35);
  --success: #4ade80;
  --radius: 12px;
  --font: "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

.app {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.subtitle {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

main {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.vote-page .app,
.survey-page .app {
  max-width: 480px;
  padding: 2.5rem 1.5rem 4rem;
}

.vote-page main,
.survey-page main {
  gap: 0;
}

/* ── アンケート公開ページ（PDFデザイン） ── */
.survey-page {
  --s-bg: #ffffff;
  --s-text: #222222;
  --s-link: #1155cc;
  --s-link-hover: #0a3d91;
  --s-border: #cccccc;
  --s-border-strong: #888888;
  --s-muted: #555555;
  --s-btn-bg: #f5f5f5;
  --s-btn-hover: #e8e8e8;
  --s-tap-bg: #f8f9fb;
  --s-tap-hover: #eef3fa;
  --s-tap-border: #1155cc;
  --s-tap-active: #dce8f8;
  --s-primary: #1155cc;
  --s-primary-hover: #0a3d91;
  --s-voted: #1a7f4b;
  background: var(--s-bg);
  color: var(--s-text);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

.survey-page section {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}

.survey-section {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.survey-page .page-title {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "MS PMincho", serif;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.75;
  text-align: center;
  margin-bottom: 2.75rem;
  color: var(--s-text);
}

.survey-page .vote-taps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.survey-page .vote-tap {
  display: block;
  width: 100%;
  min-height: 3.5rem;
  padding: 1rem 1.25rem;
  border: 2px solid var(--s-border);
  border-radius: 8px;
  background: var(--s-tap-bg);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.75;
  text-align: center;
  color: var(--s-text);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
}

.survey-page .vote-tap:hover {
  background: var(--s-tap-hover);
  border-color: var(--s-tap-border);
  box-shadow: 0 2px 8px rgba(17, 85, 204, 0.12);
}

.survey-page .vote-tap:active {
  transform: scale(0.98);
  background: var(--s-tap-active);
}

.survey-page .vote-tap.voted {
  border-color: var(--s-voted);
  background: #edf7f0;
  color: var(--s-voted);
}

.survey-link {
  display: block;
  text-align: center;
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.75;
  color: var(--s-link);
  border: 2px solid var(--s-link);
  border-radius: 8px;
  background: #ffffff;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.survey-link:hover {
  color: #ffffff;
  background: var(--s-link);
  border-color: var(--s-link);
}

.survey-page .toast {
  background: #333333;
  border: none;
  color: #ffffff;
}

/* ── TOPページ（1ページ目）派手デザイン ── */
.top-page {
  min-height: 100vh;
}

.top-page .app {
  padding-top: 2rem;
}

.top-page .survey-section {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 2rem 1.5rem 2.25rem;
  box-shadow:
    0 12px 40px rgba(17, 85, 204, 0.15),
    0 4px 12px rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.top-page .page-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: top-fade-up 0.6s ease both;
}

.top-page .hint {
  align-self: center;
  margin: 0 auto 1.5rem;
  padding: 0.5rem 1.125rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.7;
  color: #1155cc;
  animation: top-fade-up 0.6s ease 0.08s both;
}

.top-page .page-title-text {
  background: linear-gradient(135deg, #1e3a8a 0%, #1155cc 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.75;
  text-align: center;
}

.top-page .page-title-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  font-size: 1.75rem;
  line-height: 1;
  background: linear-gradient(135deg, #eef4ff 0%, #f3e8ff 100%);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(17, 85, 204, 0.2);
  border: 2px solid rgba(17, 85, 204, 0.15);
}

.top-page .page-title::after {
  content: "";
  display: block;
  width: 4rem;
  height: 4px;
  margin: 1rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1155cc, #7c3aed, #d97706);
}

.top-page .vote-taps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.125rem;
}

.top-page .vote-tap {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  min-height: 3.5rem;
  padding: 1.125rem 1.25rem;
  border: none;
  border-radius: 14px;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.top-page .vote-tap-mark,
.top-page .vote-tap-text {
  position: relative;
  z-index: 1;
}

.top-page .vote-tap-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  font-size: 1.625rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.top-page .vote-tap-text {
  font-size: clamp(0.8125rem, 2.8vw, 0.9375rem);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  color: #ffffff;
}

.top-page .vote-tap.voted .vote-tap-mark {
  background: rgba(255, 255, 255, 0.95);
  border-color: #ffffff;
  font-size: 0;
  animation: top-mark-pop 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.top-page .vote-tap.voted .vote-tap-mark::after {
  content: "✓";
  font-size: 1.5rem;
  font-weight: 700;
  color: #15803d;
}

.top-page .survey-link {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding: 1rem 1.25rem;
  color: #ffffff;
  border: none;
  border-radius: 14px;
  background: linear-gradient(135deg, #be185d 0%, #e11d48 100%);
  box-shadow: 0 4px 16px rgba(190, 24, 93, 0.35);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.top-page .vote-tap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.top-page .vote-tap:hover::before {
  transform: translateX(100%);
}

.top-page .vote-tap:nth-child(1) {
  background: linear-gradient(135deg, #1155cc 0%, #3b82f6 100%);
  box-shadow: 0 4px 16px rgba(17, 85, 204, 0.35);
}

.top-page .vote-tap:nth-child(2) {
  background: linear-gradient(135deg, #6d28d9 0%, #a855f7 100%);
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.35);
}

.top-page .vote-tap:nth-child(3) {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
  box-shadow: 0 4px 16px rgba(180, 83, 9, 0.35);
}

.top-page .vote-tap:nth-child(4) {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  box-shadow: 0 4px 16px rgba(15, 118, 110, 0.35);
}

.top-page .vote-tap:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.top-page .vote-tap.is-pressing,
.top-page .vote-tap:active {
  transform: scale(0.94) translateY(2px);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 3px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.05s ease, box-shadow 0.05s ease;
}

.top-page .vote-tap.voted {
  background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(21, 128, 61, 0.45);
  animation: top-vote-success 0.55s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.top-page .survey-link-text {
  position: relative;
  z-index: 1;
  line-height: 1.75;
  text-align: center;
  color: #ffffff;
}

.top-page .survey-link-mark {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.375rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.top-page .survey-link:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #9f1239 0%, #f43f5e 100%);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 24px rgba(190, 24, 93, 0.4);
}

.top-page .survey-link:active {
  transform: scale(0.9) translateY(2px);
  box-shadow:
    0 1px 4px rgba(0, 0, 0, 0.28),
    inset 0 4px 10px rgba(0, 0, 0, 0.22);
  transition: transform 0.06s ease, box-shadow 0.06s ease;
}

@keyframes top-fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-page .vote-tap:nth-child(1) {
  animation: top-fade-up 0.6s ease 0.15s both;
}

.top-page .vote-tap:nth-child(2) {
  animation: top-fade-up 0.6s ease 0.25s both;
}

.top-page .vote-tap:nth-child(3) {
  animation: top-fade-up 0.6s ease 0.35s both;
}

.top-page .vote-tap:nth-child(4) {
  animation: top-fade-up 0.6s ease 0.45s both;
}

.top-page .survey-link {
  animation: top-fade-up 0.6s ease 0.55s both;
}

/* ── 詳細評価ページ ── */
.detail-page {
  min-height: 100vh;
}

.detail-page .app {
  max-width: 560px;
  padding-top: 2rem;
}

.detail-page .survey-section {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 20px;
  padding: 2rem 1.5rem 2.25rem;
  box-shadow:
    0 12px 40px rgba(17, 85, 204, 0.15),
    0 4px 12px rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

.detail-page .page-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: top-fade-up 0.6s ease both;
}

.detail-page .page-title-text {
  background: linear-gradient(135deg, #1e3a8a 0%, #1155cc 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.75;
  text-align: center;
}

.detail-page .page-title-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  font-size: 1.5rem;
  background: linear-gradient(135deg, #eef4ff 0%, #f3e8ff 100%);
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(17, 85, 204, 0.2);
  border: 2px solid rgba(17, 85, 204, 0.15);
}

.detail-page .page-title::after {
  content: "";
  display: block;
  width: 4rem;
  height: 4px;
  margin: 0.75rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #1155cc, #7c3aed, #d97706);
}

.detail-page .detail-instruction {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 1.5rem;
  padding: 0.625rem 1.375rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.6;
  text-align: center;
  color: #1e3a8a;
  background: linear-gradient(135deg, #eef4ff 0%, #f3e8ff 100%);
  border-radius: 999px;
  border: 1px solid rgba(17, 85, 204, 0.28);
  box-shadow: 0 2px 12px rgba(17, 85, 204, 0.14);
  letter-spacing: 0.03em;
  animation: top-fade-up 0.6s ease 0.1s both;
}

.detail-page .detail-taps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.detail-page .detail-tap {
  width: 100%;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 5.5rem;
  padding: 0.875rem 0.625rem;
  border: none;
  border-radius: 14px;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.detail-page .detail-tap-mark,
.detail-page .detail-tap-text {
  position: relative;
  z-index: 1;
}

.detail-page .detail-tap-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.25rem;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.detail-page .detail-tap-text {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
}

.detail-page .detail-tap:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.detail-page .detail-tap.is-pressing,
.detail-page .detail-tap:active {
  transform: scale(0.94) translateY(2px);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 3px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.05s ease, box-shadow 0.05s ease;
}

.detail-page .detail-tap.voted {
  background: linear-gradient(135deg, #15803d 0%, #22c55e 100%) !important;
  box-shadow: 0 6px 20px rgba(21, 128, 61, 0.45);
  animation: top-vote-success 0.55s cubic-bezier(0.34, 1.35, 0.64, 1);
}

.detail-page .detail-tap.voted .detail-tap-mark {
  background: rgba(255, 255, 255, 0.95);
  border-color: #ffffff;
  font-size: 0;
  animation: top-mark-pop 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.detail-page .detail-tap.voted .detail-tap-mark::after {
  content: "✓";
  font-size: 1.25rem;
  font-weight: 700;
  color: #15803d;
}

.detail-page .detail-tap--c01 {
  background: linear-gradient(135deg, #1155cc 0%, #3b82f6 100%);
  box-shadow: 0 4px 14px rgba(17, 85, 204, 0.3);
}

.detail-page .detail-tap--c02 {
  background: linear-gradient(135deg, #6d28d9 0%, #a855f7 100%);
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.3);
}

.detail-page .detail-tap--c03 {
  background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
  box-shadow: 0 4px 14px rgba(180, 83, 9, 0.3);
}

.detail-page .detail-tap--c04 {
  background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
  box-shadow: 0 4px 14px rgba(15, 118, 110, 0.3);
}

.detail-page .detail-tap--c05 {
  background: linear-gradient(135deg, #be123c 0%, #f43f5e 100%);
  box-shadow: 0 4px 14px rgba(190, 18, 60, 0.3);
}

.detail-page .detail-tap--c06 {
  background: linear-gradient(135deg, #3730a3 0%, #6366f1 100%);
  box-shadow: 0 4px 14px rgba(55, 48, 163, 0.3);
}

.detail-page .detail-tap--c07 {
  background: linear-gradient(135deg, #047857 0%, #10b981 100%);
  box-shadow: 0 4px 14px rgba(4, 120, 87, 0.3);
}

.detail-page .detail-tap--c08 {
  background: linear-gradient(135deg, #c2410c 0%, #fb923c 100%);
  box-shadow: 0 4px 14px rgba(194, 65, 12, 0.3);
}

.detail-page .detail-tap--c09 {
  background: linear-gradient(135deg, #0e7490 0%, #06b6d4 100%);
  box-shadow: 0 4px 14px rgba(14, 116, 144, 0.3);
}

.detail-page .detail-tap--c10 {
  background: linear-gradient(135deg, #a21caf 0%, #e879f9 100%);
  box-shadow: 0 4px 14px rgba(162, 28, 175, 0.3);
}

.detail-page .detail-tap--c11 {
  background: linear-gradient(135deg, #4d7c0f 0%, #84cc16 100%);
  box-shadow: 0 4px 14px rgba(77, 124, 15, 0.3);
}

.detail-page .detail-tap--c12 {
  background: linear-gradient(135deg, #9d174d 0%, #ec4899 100%);
  box-shadow: 0 4px 14px rgba(157, 23, 77, 0.3);
}

.detail-page .detail-tap--c13 {
  background: linear-gradient(135deg, #1d4ed8 0%, #60a5fa 100%);
  box-shadow: 0 4px 14px rgba(29, 78, 216, 0.3);
}

.detail-page .detail-tap--c14 {
  background: linear-gradient(135deg, #7c2d12 0%, #ea580c 100%);
  box-shadow: 0 4px 14px rgba(124, 45, 18, 0.3);
}

.detail-page .detail-tap--c15 {
  background: linear-gradient(135deg, #5b21b6 0%, #8b5cf6 100%);
  box-shadow: 0 4px 14px rgba(91, 33, 182, 0.3);
}

.detail-page .detail-tap--c16 {
  background: linear-gradient(135deg, #065f46 0%, #34d399 100%);
  box-shadow: 0 4px 14px rgba(6, 95, 70, 0.3);
}

.detail-page .detail-back-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.5rem;
  padding: 0.875rem 1.25rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(75, 85, 99, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}

.detail-page .detail-back-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(75, 85, 99, 0.4);
  color: #ffffff;
}

.detail-page .detail-back-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

@media (max-width: 400px) {
  .detail-page .detail-taps {
    grid-template-columns: 1fr;
  }

  .detail-page .detail-tap {
    min-height: 4.5rem;
    flex-direction: row;
    justify-content: flex-start;
    padding: 0.875rem 1rem;
    gap: 0.75rem;
  }

  .detail-page .detail-tap-text {
    font-size: 0.9rem;
    text-align: left;
  }
}

/* 詳細ページ（旧・簡素スタイル） */
.survey-page.detail-page .app {
  max-width: 560px;
}

.survey-page .detail-section {
  gap: 1.5rem;
}

.detail-taps {
  list-style: none;
}

.detail-tap {
  font-family: inherit;
}

.detail-back-link {
  width: 100%;
}

.survey-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  max-width: 10rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  font-size: 1.05rem;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  background: var(--s-primary);
  border: 2px solid var(--s-primary);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(17, 85, 204, 0.2);
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
}

.survey-btn:hover {
  background: var(--s-primary-hover);
  border-color: var(--s-primary-hover);
}

.survey-btn:active {
  transform: scale(0.98);
}

.survey-btn-outline {
  color: var(--s-text);
  background: var(--s-btn-bg);
  border-color: var(--s-border-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.survey-btn-outline:hover {
  background: var(--s-btn-hover);
  border-color: var(--s-border-strong);
  color: var(--s-text);
}

/* ── 旧 vote-page 互換 ── */
.vote-section {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.page-title {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
  margin-bottom: 2.5rem;
}

.vote-taps {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.vote-tap {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.75;
  text-align: center;
  color: var(--text);
  cursor: pointer;
  transition: color 0.15s;
}

.vote-tap:hover {
  color: var(--accent);
}

.vote-tap.voted {
  color: var(--accent);
}

.detail-link {
  display: block;
  text-align: center;
  margin-top: 2.5rem;
  color: var(--accent);
  font-size: 0.95rem;
  line-height: 1.7;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.detail-link:hover {
  color: var(--accent-hover);
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.detail-instruction {
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: center;
}

.detail-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.detail-item:hover {
  background: var(--surface-hover);
}

.detail-item input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.detail-item label {
  flex: 1;
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}

.detail-bulk-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: center;
}

.text-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0.25rem;
  transition: color 0.15s;
}

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

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-results-header {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.option-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}

.option-item:hover {
  background: var(--surface-hover);
}

.option-item.selected {
  border-color: var(--accent);
  background: rgba(255, 77, 109, 0.08);
}

.option-item.voted {
  animation: pulse 0.4s ease;
  border-color: var(--accent);
  background: rgba(255, 77, 109, 0.12);
}

.option-item .like-icon {
  font-size: 1.25rem;
  color: var(--accent);
  flex-shrink: 0;
}

.option-item input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.option-label {
  flex: 1;
  font-size: 1rem;
}

.like-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.25rem;
  padding: 0.875rem 1.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.like-btn:not(:disabled):hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.like-btn:not(:disabled):active {
  transform: scale(0.98);
}

.like-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.like-btn.voted {
  animation: pulse 0.4s ease;
}

.like-icon {
  font-size: 1.25rem;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.results-header h2 {
  margin-bottom: 0;
}

.total-badge {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
}

.results-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.95rem;
}

.result-label {
  font-weight: 500;
}

.result-count {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.result-bar-track {
  height: 8px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}

.result-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff8fa3);
  border-radius: 999px;
  transition: width 0.4s ease;
  min-width: 0;
}

.result-item.leader .result-bar-fill {
  background: linear-gradient(90deg, var(--success), #86efac);
}

.reset-btn {
  margin-top: 1.25rem;
  width: 100%;
  padding: 0.625rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.reset-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  z-index: 100;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.empty-results {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 1rem 0;
}

/* ── 管理画面 ── */
.admin-page {
  min-height: 100vh;
  color: #222222;
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
}

.admin-page .app {
  max-width: 640px;
  padding-top: 2rem;
}

.admin-page .header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1e3a8a 0%, #1155cc 50%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.admin-page .subtitle {
  color: #555555;
}

.admin-page .results-section {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow:
    0 12px 40px rgba(17, 85, 204, 0.12),
    0 4px 12px rgba(124, 58, 237, 0.06);
}

.admin-page .form-label {
  color: #1155cc;
}

.admin-page .login-input {
  color: #222222;
  background: #f8f9fb;
  border-color: #cccccc;
}

.admin-page .login-input:focus {
  border-color: #1155cc;
}

.admin-page .save-title-btn {
  background: linear-gradient(135deg, #1155cc 0%, #3b82f6 100%);
}

.admin-page .save-title-btn:hover {
  background: linear-gradient(135deg, #0a3d91 0%, #2563eb 100%);
}

.admin-page .results-header h2 {
  color: #1155cc;
  text-transform: none;
  letter-spacing: 0.02em;
}

.admin-page .total-badge {
  color: #1155cc;
  background: #eef4ff;
}

.admin-page .result-bar-fill {
  background: linear-gradient(90deg, #1155cc, #7c3aed);
}

.admin-page .result-item.leader .result-bar-fill {
  background: linear-gradient(90deg, #15803d, #22c55e);
}

.admin-page .secondary-link,
.admin-page .secondary-btn {
  color: #1155cc;
  background: #ffffff;
  border-color: #1155cc;
}

.admin-page .secondary-link:hover,
.admin-page .secondary-btn:hover {
  color: #ffffff;
  background: #1155cc;
  border-color: #1155cc;
}

.admin-page .reset-btn {
  color: #b45309;
  border-color: #f59e0b;
  background: #fffbeb;
}

.admin-page .reset-btn:hover {
  color: #ffffff;
  background: #f59e0b;
  border-color: #f59e0b;
}

.admin-page .toast {
  background: #333333;
  border: none;
  color: #ffffff;
}

.admin-page .poll-title-edit {
  border-bottom-color: #e5e7eb;
}

.admin-page .detail-results-header {
  border-top-color: #e5e7eb;
}

.admin-page .result-label {
  color: #222222;
}

.admin-page .result-count {
  color: #555555;
}

.admin-page .result-bar-track {
  background: #eef4ff;
}

.login-section {
  max-width: 360px;
  margin: 0 auto;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.login-input {
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.login-input:focus {
  outline: none;
  border-color: var(--accent);
}

.login-error {
  color: var(--accent);
  font-size: 0.85rem;
}

.login-btn {
  margin-top: 0.5rem;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

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

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.secondary-btn {
  width: 100%;
  padding: 0.625rem;
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.secondary-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.not-ready-section {
  text-align: center;
  padding: 2rem 1.5rem;
}

.not-ready-message {
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.setup-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.form-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.form-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
}

.option-inputs {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.option-input-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.option-input-field {
  flex: 1;
}

.remove-option-btn {
  flex-shrink: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.remove-option-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.add-option-btn {
  padding: 0.625rem;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.add-option-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.setup-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.secondary-link {
  display: block;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: color 0.15s, border-color 0.15s;
}

.secondary-link:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

.poll-title-edit {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.title-edit-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.title-edit-row .login-input {
  flex: 1;
}

.save-title-btn {
  flex-shrink: 0;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s;
}

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

/* ── デザイン強化（全体） ── */
@keyframes bg-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes mark-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 4px 14px rgba(17, 85, 204, 0.25);
  }
  50% {
    transform: scale(1.06);
    box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
  }
}

@keyframes vote-pop {
  0% { transform: scale(1); }
  30% { transform: scale(0.9); }
  55% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes top-vote-success {
  0% { transform: scale(0.94); }
  45% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@keyframes top-mark-pop {
  0% { transform: scale(0.6); opacity: 0.5; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes tap-flash {
  0% { opacity: 0; }
  20% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.top-page,
.detail-page,
.admin-page {
  background: linear-gradient(-45deg, #dce8ff, #ede5ff, #fff4e6, #dbeafe, #fae8ff);
  background-size: 400% 400%;
  animation: bg-shift 14s ease infinite;
  position: relative;
  overflow-x: hidden;
}

.top-page::before,
.detail-page::before,
.admin-page::before {
  content: "";
  position: fixed;
  top: -8rem;
  right: -6rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.18), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.top-page::after,
.detail-page::after,
.admin-page::after {
  content: "";
  position: fixed;
  bottom: -6rem;
  left: -5rem;
  width: 16rem;
  height: 16rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(17, 85, 204, 0.16), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.top-page .app,
.detail-page .app,
.admin-page .app {
  position: relative;
  z-index: 1;
}

.top-page .survey-section,
.detail-page .survey-section,
.admin-page .results-section {
  position: relative;
  box-shadow:
    0 16px 48px rgba(17, 85, 204, 0.18),
    0 6px 16px rgba(124, 58, 237, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.top-page .survey-section::before,
.detail-page .survey-section::before,
.admin-page .results-section::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 22px;
  /* background: linear-gradient(135deg, #1155cc, #7c3aed, #f59e0b, #14b8a6); */
  z-index: -1;
  opacity: 0.45;
}

.top-page .page-title-mark,
.detail-page .page-title-mark {
  animation: mark-pulse 3s ease-in-out infinite;
}

.top-page .vote-tap,
.detail-page .detail-tap {
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.top-page .vote-tap::after,
.detail-page .detail-tap::after,
.top-page .survey-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.top-page .vote-tap:active::after,
.detail-page .detail-tap:active::after,
.top-page .survey-link:active::after {
  animation: tap-flash 0.28s ease;
}

.top-page .vote-tap.voted::after,
.detail-page .detail-tap.voted::after {
  animation: tap-flash 0.4s ease;
}

.detail-page .detail-tap::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
  pointer-events: none;
}

.detail-page .detail-tap:hover::before {
  transform: translateX(100%);
}

.top-page .survey-link,
.detail-page .detail-back-link {
  position: relative;
  overflow: hidden;
}

.top-page .survey-link::before,
.detail-page .detail-back-link::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0) 70%
  );
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.top-page .survey-link:hover::before,
.detail-page .detail-back-link:hover::before {
  transform: translateX(100%);
}

.survey-page .toast.show,
.admin-page .toast.show {
  background: linear-gradient(135deg, #1e3a8a 0%, #1155cc 50%, #7c3aed 100%);
  border: none;
  box-shadow: 0 8px 28px rgba(17, 85, 204, 0.45);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.admin-page .header {
  margin-bottom: 2rem;
  padding: 1.25rem 1rem;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 16px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 16px rgba(17, 85, 204, 0.1);
}

.admin-page .results-section {
  padding: 1.75rem;
}

.admin-page .result-item {
  padding: 0.35rem 0.5rem;
  border-radius: 10px;
  transition: background 0.15s;
}

.admin-page .result-item:hover {
  background: rgba(238, 244, 255, 0.8);
}

.admin-page .result-item.leader {
  background: rgba(237, 247, 240, 0.9);
  border: 1px solid rgba(34, 197, 94, 0.25);
}

/* ── PC向け: 表示幅を広げる ── */
@media (min-width: 768px) {
  .survey-page .app {
    max-width: 720px;
  }

  .survey-page.detail-page .app,
  .detail-page .app {
    max-width: 900px;
  }

  .detail-page .detail-taps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .admin-page .app {
    max-width: 860px;
  }
}

@media (min-width: 1024px) {
  .survey-page .app {
    max-width: 840px;
  }

  .survey-page.detail-page .app,
  .detail-page .app {
    max-width: 1100px;
  }

  .detail-page .detail-taps {
    grid-template-columns: repeat(4, 1fr);
  }

  .detail-page .detail-tap {
    min-height: 6rem;
    padding: 1rem 0.75rem;
  }

  .admin-page .app,
  .app {
    max-width: 1040px;
  }
}
