:root {
  --bg: #0d0f0e;
  --panel: #161917;
  --green: #06c755;
  --green-dark: #049a42;
  --text: #f2f4f3;
  --muted: #9aa39e;
  --border: #2a2f2c;
}

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

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
}

main { display: flex; flex: 1; }

.screen {
  display: none;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 20px;
  animation: fadein .35s ease;
}
.screen.active { display: flex; }

@keyframes fadein {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.brand {
  letter-spacing: .35em;
  font-size: 13px;
  color: var(--green);
  font-weight: 700;
}

h1 { font-size: 30px; letter-spacing: .06em; }

.lead { color: var(--muted); line-height: 1.9; font-size: 15px; }

.experience {
  color: var(--text);
  font-size: 12px;
  letter-spacing: .08em;
  background: var(--panel);
  border-radius: 999px;
  padding: 7px 14px;
}

.note { color: var(--muted); font-size: 12px; line-height: 1.7; }

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  font-size: 17px;
  font-weight: 700;
  padding: 16px 28px;
  width: 100%;
  cursor: pointer;
  transition: transform .08s ease, opacity .15s ease, border-color .15s ease,
    background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { cursor: wait; opacity: .55; }

.btn-primary {
  background: var(--green);
  color: #06210f;
}

.btn-secondary {
  background: transparent;
  color: var(--green);
  border: 1.5px solid var(--green);
}

.btn:focus-visible { outline: none; }
.back-button:focus-visible, a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

/* マウスhoverとキーボードfocusを同じ選択状態として見せる */
.btn-primary:focus-visible {
  background: #0ad960;
  box-shadow: 0 0 0 4px rgba(6, 199, 85, .22), 0 0 24px rgba(6, 199, 85, .2);
}
.btn-secondary:focus-visible {
  background: var(--green);
  color: #06210f;
  box-shadow: 0 0 0 4px rgba(6, 199, 85, .18);
}

/* 質問画面 */
.progress {
  width: 100%;
  height: 5px;
  border-radius: 99px;
  background: var(--border);
  overflow: hidden;
}
#progress-bar {
  height: 100%;
  width: 0;
  background: var(--green);
  border-radius: 99px;
  transition: width .3s ease;
}

.q-count { color: var(--green); font-weight: 700; letter-spacing: .1em; }

.q-text {
  font-size: 24px;
  line-height: 1.5;
  min-height: 3em;
  display: flex;
  align-items: center;
}

.answers {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.btn-answer {
  background: var(--panel);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-answer:focus-visible {
  border-color: var(--green);
  color: var(--green);
  box-shadow: 0 0 0 3px rgba(6, 199, 85, .14);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: #0ad960;
    box-shadow: 0 0 0 4px rgba(6, 199, 85, .22), 0 0 24px rgba(6, 199, 85, .2);
  }
  .btn-secondary:hover {
    background: var(--green);
    color: #06210f;
    box-shadow: 0 0 0 4px rgba(6, 199, 85, .18);
  }
  .btn-answer:hover {
    border-color: var(--green);
    color: var(--green);
    box-shadow: 0 0 0 3px rgba(6, 199, 85, .14);
  }
}

.back-button {
  min-height: 44px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}
.back-button:disabled { visibility: hidden; }

/* 考え中 */
.thinking-icon {
  font-size: 56px;
  animation: pulse 1s ease infinite;
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* 結果画面 */
.tsu-badge {
  color: #ffd76a;
  font-weight: 700;
  letter-spacing: .08em;
  animation: pulse 1.6s ease infinite;
}
.hidden { display: none !important; }

.result-label { color: var(--muted); font-size: 13px; letter-spacing: .1em; }

.result-card {
  width: 100%;
  background: var(--panel);
  border: 1.5px solid var(--green);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 0 32px rgba(6, 199, 85, .15);
}

.nonic-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border: 1px solid var(--green);
  border-radius: 999px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
}

.result-brand { color: var(--green); font-size: 13px; font-weight: 700; letter-spacing: .1em; }
.result-name { font-size: 26px; margin: 10px 0 14px; line-height: 1.4; }
.result-desc { color: var(--muted); font-size: 15px; line-height: 1.8; }

.staff-note {
  width: 100%;
  background: rgba(6, 199, 85, .08);
  border-radius: 14px;
  padding: 14px;
  font-size: 15px;
  line-height: 1.7;
}
.staff-note strong { color: var(--green); }
.staff-note .small { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* 公式サイトへの戻り導線。店内QRからの診断を邪魔しないよう最小限に */
.site-link {
  margin-top: 28px;
  text-align: center;
  font-size: 11px;
  letter-spacing: .1em;
}
.site-link a { color: var(--muted); text-decoration: none; }
.site-link a:hover { color: var(--green); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
