* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --black: #111;
  --dark: #222;
  --mid: #666;
  --light: #bbb;
  --border: #e8e8e8;
  --bg: #fafafa;
  --white: #fff;
  --accent: #111;
}

html, body {
  height: 100%;
  font-family: 'Noto Sans JP', sans-serif;
  background: var(--bg);
  color: var(--black);
  overflow: hidden;
}

#app {
  height: 100vh;
  position: relative;
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.screen.active {
  opacity: 1;
  pointer-events: all;
}

/* ─── START ─── */
#screen-start {
  justify-content: center;
  align-items: center;
  background: var(--white);
}

.start-content {
  text-align: center;
  padding: 2rem;
}

.logo-mark {
  font-size: 2rem;
  margin-bottom: 1.2rem;
  color: var(--black);
  display: block;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 0.6rem;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--mid);
  letter-spacing: 0.05em;
  margin-bottom: 2.5rem;
}

.question-count {
  font-size: 0.75rem;
  color: var(--light);
  margin-top: 1rem;
  letter-spacing: 0.05em;
}

/* ─── BUTTONS ─── */
.btn-primary {
  background: var(--black);
  color: var(--white);
  border: none;
  padding: 0.9rem 3rem;
  font-size: 0.9rem;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  letter-spacing: 0.1em;
  cursor: pointer;
  border-radius: 2px;
  transition: opacity 0.2s;
}

.btn-primary:active {
  opacity: 0.75;
}

.btn-secondary {
  background: var(--white);
  color: var(--black);
  border: 1.5px solid var(--black);
  padding: 0.85rem 2rem;
  font-size: 0.85rem;
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 2px;
  transition: opacity 0.2s;
}

.btn-secondary:active {
  opacity: 0.6;
}

/* ─── QUIZ ─── */
#screen-quiz {
  background: var(--white);
  justify-content: flex-start;
}

.quiz-header {
  padding: 1.2rem 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.progress-bar-wrap {
  flex: 1;
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--black);
  border-radius: 2px;
  transition: width 0.4s ease;
  width: 10%;
}

.progress-text {
  font-size: 0.72rem;
  color: var(--mid);
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.quiz-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.5rem 1.5rem;
  overflow-y: auto;
}

.question-category {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--mid);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.question-text {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: 0.03em;
  margin-bottom: 2rem;
}

.options-container {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.option-btn {
  background: var(--white);
  border: 1.5px solid var(--border);
  padding: 1rem 1.2rem;
  text-align: left;
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem;
  color: var(--dark);
  cursor: pointer;
  border-radius: 4px;
  letter-spacing: 0.03em;
  line-height: 1.5;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.option-btn .opt-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.option-btn:active {
  background: #f5f5f5;
  border-color: #aaa;
}

.option-btn.selected {
  border-color: var(--black);
  background: #f5f5f5;
}

/* ─── RESULT ─── */
#screen-result {
  background: var(--white);
  overflow-y: auto;
}

.result-content {
  padding: 2rem 1.5rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.result-header {
  text-align: center;
}

.result-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  color: var(--mid);
  margin-bottom: 0.5rem;
}

.result-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.result-subtitle {
  font-size: 0.82rem;
  color: var(--mid);
  letter-spacing: 0.04em;
  line-height: 1.6;
}

.result-image-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  border-radius: 6px;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--border);
  color: var(--mid);
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
}

.result-description {
  font-size: 0.88rem;
  line-height: 1.85;
  color: var(--dark);
  letter-spacing: 0.03em;
}

.result-points {
  background: var(--bg);
  border-radius: 6px;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.point-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.83rem;
  line-height: 1.6;
  color: var(--dark);
}

.point-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

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

.result-actions .btn-primary,
.result-actions .btn-secondary {
  width: 100%;
  text-align: center;
}