/* ===================================================
   酒器素材診断 - Design System & Styles
   =================================================== */

/* --- CSS Variables --- */
:root {
  --color-bg: #F5F0E8;
  --color-text: #1A1A1A;
  --color-accent: #C9A94E;
  --color-accent-light: #D4BA6A;
  --color-sub: #6B6B6B;
  --color-white: #FEFCF7;
  --color-border: #D8D0C0;
  --font-serif: 'Noto Serif JP', serif;
  --transition-fast: 0.3s ease;
  --transition-normal: 0.4s ease;
  --radius: 8px;
  --shadow-soft: 0 2px 12px rgba(0, 0, 0, 0.06);
  --max-width: 480px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-serif);
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Header --- */
.site-header {
  text-align: center;
  padding: 16px 20px 8px;
  flex-shrink: 0;
}

.company-link {
  font-size: 0.75rem;
  color: var(--color-sub);
  text-decoration: none;
  letter-spacing: 0.15em;
  transition: color var(--transition-fast);
}

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

/* --- Main Container --- */
.main-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 20px;
}

/* --- Background Decoration --- */
.bg-decoration {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.brush-stroke {
  position: absolute;
  width: 120%;
  left: -10%;
}

.stroke-top {
  top: -5%;
}

.stroke-bottom {
  bottom: -5%;
}

.gold-dots {
  position: absolute;
  width: 45%;
  max-width: 220px;
}

.dots-top-left {
  top: 2%;
  left: 0;
}

.dots-bottom-right {
  bottom: 2%;
  right: 0;
}

.ink-splatter {
  position: absolute;
  width: 15%;
  max-width: 80px;
  bottom: 25%;
  left: 5%;
}

/* --- Screen System --- */
.screen {
  display: none;
  width: 100%;
  max-width: var(--max-width);
  position: relative;
  z-index: 1;
}

.screen.active {
  display: block;
}

.screen-content {
  padding: 20px 0;
}

/* --- Animation Classes --- */
.screen.fade-slide-in {
  animation: fadeSlideIn var(--transition-normal) forwards;
}

.screen.fade-slide-out {
  animation: fadeSlideOut var(--transition-fast) forwards;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeSlideOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

/* Question content fade */
.question-area.fade-out {
  animation: questionFadeOut 0.2s ease forwards;
}

.question-area.fade-in {
  animation: questionFadeIn 0.3s ease forwards;
}

@keyframes questionFadeOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(-30px); }
}

@keyframes questionFadeIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Result reveal */
.result-material.reveal {
  animation: resultReveal 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes resultReveal {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Start Screen --- */
.start-content {
  text-align: center;
  padding: 40px 0;
}

.start-decoration,
.start-decoration-bottom {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.title-brush,
.title-brush-bottom {
  width: 200px;
  height: auto;
}

.start-title {
  margin: 16px 0;
}

.title-sub {
  display: block;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-sub);
  letter-spacing: 0.2em;
  margin-bottom: 8px;
}

.title-main {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.3;
}

.start-description {
  margin: 24px 0 36px;
  font-size: 0.875rem;
  color: var(--color-sub);
  line-height: 1.8;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 52px;
  padding: 14px 40px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background-color: var(--color-text);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: #333;
}

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

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

/* --- Quiz Screen --- */
.quiz-content {
  padding: 10px 0 30px;
}

/* Progress */
.progress-area {
  margin-bottom: 32px;
}

.progress-text {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-sub);
  margin-bottom: 10px;
  letter-spacing: 0.1em;
}

.progress-bar {
  width: 100%;
  height: 3px;
  background-color: var(--color-border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--color-accent);
  border-radius: 2px;
  width: 0%;
  transition: width var(--transition-normal);
}

/* Question */
.question-area {
  min-height: 350px;
}

.question-text {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.7;
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.05em;
}

/* Answer Buttons */
.answers-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.answer-btn {
  display: block;
  width: 100%;
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
  padding: 16px 20px;
  background-color: var(--color-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-height: 52px;
  color: var(--color-text);
  box-shadow: var(--shadow-soft);
}

.answer-btn:hover {
  border-color: var(--color-accent);
  background-color: #FDFAF2;
}

.answer-btn:active {
  transform: scale(0.98);
  background-color: #FAF5E8;
}

.answer-btn.selected {
  border-color: var(--color-accent);
  background-color: #FAF5E8;
}

/* --- Result Screen --- */
.result-content {
  text-align: center;
  padding: 30px 0;
}

.result-label {
  font-size: 0.85rem;
  color: var(--color-sub);
  letter-spacing: 0.15em;
  margin-bottom: 20px;
}

.result-material {
  margin-bottom: 32px;
  opacity: 0;
}

.result-icon {
  display: block;
  font-size: 3rem;
  margin-bottom: 12px;
  line-height: 1;
}

.result-name {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  line-height: 1.3;
  position: relative;
  display: inline-block;
}

.result-name::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 10%;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.result-description {
  margin: 0 auto 36px;
  max-width: 360px;
  font-size: 0.9rem;
  color: var(--color-sub);
  line-height: 2;
  text-align: left;
}

.result-description p {
  margin-bottom: 8px;
}

.result-description .material-feature {
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.result-description .material-detail {
  margin-bottom: 16px;
}

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: 12px 20px 20px;
  flex-shrink: 0;
}

.site-footer p {
  font-size: 0.7rem;
  color: var(--color-sub);
  letter-spacing: 0.1em;
}

/* --- Responsive --- */
@media (min-width: 600px) {
  .start-title .title-main {
    font-size: 2.4rem;
  }

  .question-text {
    font-size: 1.25rem;
  }

  .result-name {
    font-size: 2.4rem;
  }
}

@media (max-height: 600px) and (orientation: landscape) {
  .main-container {
    align-items: flex-start;
    padding-top: 10px;
  }

  .start-content {
    padding: 10px 0;
  }

  .start-description {
    margin: 12px 0 20px;
  }

  .question-area {
    min-height: 250px;
  }
}
