/* ============================================================
   B-Kyu Gourmet Match — custom styles
   (Tailwind handles 90% via CDN; this file is for what Tailwind
    can't easily do — option selection states, animations, etc.)
   ============================================================ */

:root {
  --sake-indigo: #2a4274;
  --sake-indigo-dark: #1e2c4a;
  --sake-gold: #d99421;
  --sake-cream: #fefdf9;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.7;
}

/* ===== Typography: readable long-form text ===== */
.prose-text {
  line-height: 1.85;
  max-width: 65ch;
  font-size: 1rem;
  color: #2a4274;
}

.prose-text p {
  margin: 0 0 1em 0;
}

.prose-text p:last-child {
  margin-bottom: 0;
}

/* Japanese text — slightly wider line-height + tracking */
[lang="ja"] .prose-text {
  line-height: 2;
  letter-spacing: 0.02em;
}

[lang="ja"] .prose-text p {
  margin-bottom: 1.2em;
}

/* Drop-cap style highlight for first sentence */
.lead-sentence {
  display: block;
  font-weight: 600;
  font-size: 1.05em;
  color: #1e2c4a;
  margin-bottom: 0.6em;
  padding-left: 0.7rem;
  border-left: 3px solid #d99421;
}

/* Quick facts mini-grid */
.quick-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.6rem;
  margin: 1rem 0 1.5rem 0;
}

.fact-chip {
  padding: 0.65rem 0.8rem;
  background: rgba(254, 253, 249, 0.08);
  border: 1px solid rgba(239, 201, 97, 0.2);
  border-radius: 0.6rem;
  text-align: center;
}

.fact-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #efc961;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.fact-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fdf9ed;
  line-height: 1.3;
}

/* ===== Sake card role badge (perfect/explorer/wildcard) ===== */
.role-badge {
  position: absolute;
  top: -10px;
  right: 1.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  z-index: 2;
}

.role-perfect {
  background: linear-gradient(135deg, #d99421 0%, #efc961 100%);
  color: #1e2c4a;
  border: 1.5px solid #d99421;
}

.role-explorer {
  background: linear-gradient(135deg, #6486bf 0%, #92add5 100%);
  color: #fff;
  border: 1.5px solid #33518f;
}

.role-wildcard {
  background: linear-gradient(135deg, #a83e2e 0%, #c1606b 100%);
  color: #fff;
  border: 1.5px solid #a83e2e;
}

/* ===== Flavor profile (Nose · Palate · Finish) - 香り・味わい・余韻 ===== */
.flavor-profile-section {
  background: linear-gradient(180deg, #fefbf5 0%, #fbf5e6 100%);
  border: 1.5px solid #e8d4a8;
  border-radius: 12px;
  padding: 1.1rem 1.25rem 1.2rem;
  margin: 1.25rem 0 1.5rem;
}
.flavor-profile-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 0.7rem;
}
@media (min-width: 640px) {
  .flavor-profile-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.95rem;
  }
}
.flavor-cell {
  background: #fff;
  border-radius: 8px;
  padding: 0.85rem 1rem 0.95rem;
  border-left: 3px solid #d99421;
}
.flavor-cell-icon {
  display: inline-block;
  margin-right: 0.4rem;
  font-size: 1.1rem;
  vertical-align: middle;
}
.flavor-cell-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8a6c1a;
  margin-bottom: 0.5rem;
  vertical-align: middle;
}
.flavor-cell-text {
  font-size: 0.88rem;
  line-height: 1.75;
  color: #4a3f33;
  margin: 0;
  overflow-wrap: anywhere;
}
[lang="ja"] .flavor-cell-text {
  line-height: 1.85;
}

/* ===== Feedback / Retry Card (マスオさん要望: 結果が違うと感じたら) ===== */
.feedback-card {
  background: linear-gradient(135deg, #fef9f3 0%, #fdf2e0 100%);
  border: 1.5px solid #e8d4a8;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  text-align: center;
}
.feedback-title {
  font-family: 'Noto Serif JP', 'Yu Mincho', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e2c4a;
  margin-bottom: 0.5rem;
}
.feedback-subtitle {
  color: #6b6157;
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 1.25rem;
}
.feedback-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}
.feedback-btn {
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  transition: all 0.18s ease;
  border: 1.5px solid transparent;
  cursor: pointer;
}
.feedback-btn-primary {
  background: #d99421;
  color: #fff;
  border-color: #d99421;
}
.feedback-btn-primary:hover {
  background: #b87a18;
  border-color: #b87a18;
}
.feedback-btn-secondary {
  background: #fff;
  color: #33518f;
  border-color: #33518f;
}
.feedback-btn-secondary:hover {
  background: #eef2fa;
}
.feedback-btn-text {
  background: transparent;
  color: #6b6157;
  border-color: transparent;
}
.feedback-btn-text:hover {
  color: #1e2c4a;
}
.feedback-form {
  margin-top: 1.25rem;
  text-align: left;
}
.feedback-textarea,
.feedback-email {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid #e8d4a8;
  border-radius: 10px;
  font-size: 0.92rem;
  font-family: inherit;
  background: #fff;
  margin-bottom: 0.7rem;
  resize: vertical;
}
.feedback-textarea:focus,
.feedback-email:focus {
  outline: none;
  border-color: #d99421;
  box-shadow: 0 0 0 3px rgba(217, 148, 33, 0.15);
}
.feedback-form-actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}
.feedback-thanks {
  margin-top: 1.25rem;
  padding: 1rem;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #166534;
  border-radius: 10px;
  font-weight: 600;
  text-align: center;
}

/* Low-confidence axes profile warning (axes_confidence: "low" in sakes.json) */
.confidence-warn-badge {
  position: absolute;
  top: 1.3rem;
  right: 1.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  letter-spacing: 0.02em;
  z-index: 2;
  cursor: help;
}

/* Match confidence display */
.match-confidence {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 0.3rem;
}

.match-pct {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #d99421;
}

.confidence-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6486bf;
  letter-spacing: 0.02em;
}

/* ===== Branch badge (shows user's path) ===== */
.branch-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #1e2c4a 0%, #2a4274 100%);
  color: #efc961;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #d99421;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(30, 44, 74, 0.15);
}

@media (max-width: 639px) {
  .branch-badge {
    top: 0.65rem;
    right: 0.65rem;
    font-size: 0.65rem;
    padding: 0.25rem 0.65rem;
  }
}

/* ===== QR Share Card (result page) ===== */
.qr-share-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fdf9ed 0%, #f0f4fa 100%);
  border: 1.5px solid #efc961;
  border-radius: 1.25rem;
  box-shadow: 0 4px 16px rgba(217, 148, 33, 0.1);
}

.qr-share-text {
  flex: 1;
  min-width: 0;
}

.qr-share-title {
  font-family: 'Playfair Display', 'Noto Serif JP', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e2c4a;
  margin: 0 0 0.4rem 0;
  line-height: 1.3;
}

.qr-share-sub {
  font-size: 0.875rem;
  color: #2a4274;
  margin: 0 0 0.75rem 0;
  line-height: 1.5;
}

.qr-url-display {
  font-family: 'Courier New', monospace;
  font-size: 0.8rem;
  color: #6486bf;
  background: rgba(254, 253, 249, 0.7);
  padding: 0.35rem 0.75rem;
  border-radius: 0.4rem;
  display: inline-block;
  margin: 0;
  border: 1px dashed #d99421;
  letter-spacing: 0.02em;
}

.qr-share-image {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.qr-share-image img {
  width: 130px;
  height: 130px;
  display: block;
  border-radius: 0.5rem;
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(30, 44, 74, 0.15);
  background: #fefdf9;
}

.qr-save-hint {
  font-size: 0.65rem;
  color: #6486bf;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Footer QR */
.footer-qr img {
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(30, 44, 74, 0.1);
}

/* Mobile: stack QR vertically */
@media (max-width: 639px) {
  .qr-share-card {
    flex-direction: column;
    text-align: center;
    padding: 1.25rem;
  }
  .qr-share-image img {
    width: 110px;
    height: 110px;
  }
  .qr-url-display {
    font-size: 0.7rem;
  }
}

/* ===== Taste Profile Card ===== */
.taste-profile-card {
  background: linear-gradient(135deg, #f0f4fa 0%, #fdf9ed 100%);
  border: 1px solid #dce6f3;
  border-radius: 1.25rem;
  padding: 1.75rem;
}

.profile-title {
  font-family: 'Playfair Display', 'Noto Serif JP', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e2c4a;
  margin: 0 0 0.4rem 0;
}

.profile-subtitle {
  font-size: 0.9rem;
  color: #6486bf;
  margin: 0 0 1.5rem 0;
  line-height: 1.5;
}

.axis-grid {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 1.75rem;
}

.axis-row {
  position: relative;
}

.axis-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.axis-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e2c4a;
  letter-spacing: 0.02em;
}

.axis-track {
  position: relative;
  width: 100%;
  height: 14px;
  background: rgba(220, 230, 243, 0.6);
  border-radius: 999px;
  overflow: visible;
}

.axis-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: linear-gradient(90deg, #6486bf 0%, #d99421 100%);
  border-radius: 999px;
  transition: width 0.8s ease;
}

.axis-marker {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  background: #fff;
  border: 3px solid #d99421;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 8px rgba(30, 44, 74, 0.25);
  transition: left 0.8s ease;
  z-index: 2;
}

.axis-mid-line {
  position: absolute;
  top: -2px;
  left: 50%;
  width: 1px;
  height: 18px;
  background: rgba(50, 60, 90, 0.3);
  transform: translateX(-50%);
  pointer-events: none;
}

.axis-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: #6486bf;
}

.axis-label-left {
  text-align: left;
}

.axis-label-right {
  text-align: right;
}

.profile-summary {
  padding-top: 1.25rem;
  border-top: 1px dashed #bccde7;
}

.summary-text {
  font-size: 1rem;
  color: #1e2c4a;
  line-height: 1.8;
  margin: 0;
}

.summary-text strong {
  color: #1e2c4a;
  font-weight: 700;
  background: linear-gradient(transparent 60%, rgba(217, 148, 33, 0.3) 60%);
  padding: 0 2px;
}

[lang="ja"] .summary-text {
  line-height: 2;
}

/* Mobile taste profile */
@media (max-width: 639px) {
  .taste-profile-card {
    padding: 1.25rem;
  }
  .profile-title {
    font-size: 1.25rem;
  }
  .axis-marker {
    width: 18px;
    height: 18px;
    border-width: 2px;
  }
  .axis-track {
    height: 10px;
  }
  .summary-text {
    font-size: 0.92rem;
  }
  .axis-labels {
    font-size: 0.65rem;
  }
}

/* Multi-line popularity/description text */
.text-multi p {
  margin: 0 0 1em 0;
  line-height: 1.75;
}

.text-multi p:last-child {
  margin-bottom: 0;
}

[lang="ja"] .text-multi p {
  line-height: 1.9;
  margin-bottom: 1.1em;
  /* Prevent awkward line breaks mid-word in mixed JP/EN text */
  overflow-wrap: anywhere;
  word-break: normal;
}

/* ===== Quiz option buttons ===== */
.option-btn {
  display: block;
  width: 100%;
  padding: 1rem 1.25rem;
  text-align: left;
  background: #fff;
  border: 2px solid #dce6f3;
  border-radius: 0.75rem;
  color: #1e2c4a;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.option-btn:hover {
  border-color: #92add5;
  background: #f0f4fa;
  transform: translateY(-1px);
}

.option-btn.selected {
  border-color: #d99421;
  background: #fdf9ed;
  color: #1e2c4a;
  box-shadow: 0 4px 12px rgba(217, 148, 33, 0.15);
}

.option-btn.selected::after {
  content: '✓';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #d99421;
  font-weight: 900;
  font-size: 1.25rem;
}

/* ===== Country selection grid ===== */
.option-btn.option-country {
  padding: 0.875rem 0.75rem;
  text-align: center;
  font-size: 0.875rem;
}

.option-btn.option-country.selected::after {
  display: none;
}

.option-btn.option-country.selected {
  background: #2a4274;
  color: #fff;
  border-color: #d99421;
}

/* ===== Option with description (tooltip/sub-text) ===== */
.option-btn .option-main {
  font-weight: 600;
  line-height: 1.35;
}
.option-btn .option-main {
  display: block;
  line-height: 1.5;
}
.option-btn .option-desc {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  font-weight: 400;
  color: #6b6157;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.option-btn.selected .option-desc {
  color: #e6d7a8;
}

/* ===== Region tag (in sake card brewery line) ===== */
.region-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: #d99421;
  background: #fdf9ed;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  margin-left: 0.4rem;
  font-weight: 600;
}

/* ===== Sake card enriched sections ===== */
.section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6486bf;
  margin: 0 0 0.4rem 0;
}

.taste-section,
.why-section,
.availability-section {
  margin: 1rem 0;
  padding-top: 0.875rem;
  border-top: 1px dashed #dce6f3;
}

.taste-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.5rem;  /* row-gap, column-gap — comfortable when 6-8 tags wrap */
  line-height: 1.5;
}

.taste-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: linear-gradient(135deg, #f0f4fa 0%, #fdf9ed 100%);
  color: #2a4274;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid #dce6f3;
  white-space: nowrap;  /* keep each tag on one line */
}

.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.why-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.3rem 0;
  font-size: 0.875rem;
  color: #2a4274;
  line-height: 1.4;
}

.reason-icon {
  flex-shrink: 0;
  font-size: 1rem;
  width: 1.4rem;
  text-align: center;
}

.availability-text {
  font-size: 0.875rem;
  color: #2a4274;
  margin: 0;
  line-height: 1.4;
  padding: 0.5rem 0.75rem;
  background: #f0f4fa;
  border-radius: 0.5rem;
  border-left: 3px solid #d99421;
}

/* ===== Recommendation Score gauge ===== */
.score-section {
  margin: 0.75rem 0 1rem 0;
  padding-bottom: 0.875rem;
  border-bottom: 1px dashed #dce6f3;
}

.score-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.4rem;
}

.score-value {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1;
}

.score-max {
  font-size: 0.75rem;
  font-weight: 400;
  color: #6486bf;
  margin-left: 0.15rem;
}

.score-bar-bg {
  width: 100%;
  height: 8px;
  background: #f0f4fa;
  border-radius: 999px;
  overflow: hidden;
}

.score-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
  background: linear-gradient(90deg, #6486bf 0%, #d99421 100%);
}

/* ===== Popularity / Appeals sections ===== */
.popularity-section {
  margin: 1rem 0;
  padding-top: 0.875rem;
  border-top: 1px dashed #dce6f3;
}

.popularity-text {
  font-size: 0.9rem;
  color: #2a4274;
  margin: 0;
  line-height: 1.55;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(135deg, #fdf9ed 0%, #f0f4fa 100%);
  border-radius: 0.5rem;
  border-left: 3px solid #d99421;
}

/* Brewery story section (kura no story) */
.brewery-story-section {
  margin: 1rem 0;
  padding-top: 0.875rem;
  border-top: 1px dashed #dce6f3;
}

.brewery-story-text {
  font-size: 0.875rem;
  color: #2a4274;
  margin: 0;
  line-height: 1.6;
  padding: 0.65rem 0.85rem;
  background: linear-gradient(135deg, #f0f4fa 0%, #fefdf9 100%);
  border-radius: 0.5rem;
  border-left: 3px solid #6486bf;
  font-style: italic;
}

.brewery-story-text p {
  font-style: italic;
}

.appeals-section {
  margin: 1rem 0;
  padding-top: 0.875rem;
  border-top: 1px dashed #dce6f3;
}

/* ===== Responsive — Mobile-first additions ===== */

/* Tablet & up */
@media (min-width: 640px) {
  .sake-card .affiliate-buttons {
    flex-direction: row;
  }
}

/* Mobile-specific tweaks */
@media (max-width: 639px) {
  body {
    font-size: 15px;
  }

  .sake-card {
    padding: 1.1rem !important;
  }

  .sake-card .sake-name {
    font-size: 1.1rem;
  }

  .sake-card .sake-description {
    font-size: 0.9rem;
  }

  .score-value {
    font-size: 1.25rem;
  }

  .why-list li, .availability-text, .popularity-text {
    font-size: 0.825rem;
  }

  .taste-tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.55rem;
  }

  .option-btn {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  .option-btn.option-country {
    padding: 0.65rem 0.4rem;
    font-size: 0.78rem;
  }

  /* Result type hero card */
  #result-name {
    font-size: 1.75rem !important;
    line-height: 1.15 !important;
  }

  #result-tagline {
    font-size: 1rem !important;
  }

  /* Hero title */
  h1[data-i18n="tagline"] {
    font-size: 2rem !important;
    line-height: 1.2 !important;
  }
}

/* Print disable */
@media print {
  body {
    display: none !important;
  }
  html::after {
    content: "Printing is disabled for this content.";
    display: block;
    padding: 2rem;
    text-align: center;
    color: #2a4274;
    font-size: 1.25rem;
  }
}

/* Disable text selection on result cards & body content (deterrent) */
.sake-card,
#screen-result,
#screen-quiz {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Allow selection in form inputs */
input, textarea, select, button {
  -webkit-user-select: auto;
  -moz-user-select: auto;
  -ms-user-select: auto;
  user-select: auto;
}

/* Disable image dragging */
img, svg {
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: auto;
}

/* ===== Sake recommendation card ===== */
.sake-card {
  background: #fff;
  border: 1px solid #dce6f3;
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.25s ease;
  position: relative;
}

.sake-card:hover {
  border-color: #d99421;
  box-shadow: 0 8px 24px rgba(42, 66, 116, 0.08);
  transform: translateY(-2px);
}

.sake-card .rank-badge {
  position: absolute;
  top: -10px;
  left: 1.5rem;
  background: linear-gradient(135deg, #d99421 0%, #efc961 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.sake-card .brewery {
  font-size: 0.875rem;
  color: #6486bf;
  margin-bottom: 0.5rem;
}

/* ===== Sake label (SVG/img) + radar layout ===== */
.sake-header {
  display: grid;
  grid-template-columns: 90px 1fr 110px;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.sake-label-frame {
  width: 90px;
  height: 126px;
  border: 1px solid #dce6f3;
  border-radius: 0.4rem;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(30, 44, 74, 0.12);
  background: #fff;
  transition: transform 0.25s ease;
}

.sake-label-frame:hover {
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 0 8px 20px rgba(30, 44, 74, 0.2);
}

.sake-label-svg,
.sake-label-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.sake-header-text {
  min-width: 0;
}

/* Radar chart container */
.sake-radar {
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sake-radar-svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Mobile: stack label + radar */
@media (max-width: 639px) {
  .sake-header {
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
  }
  .sake-label-frame {
    width: 72px;
    height: 100px;
  }
  .sake-radar {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    height: auto;
    aspect-ratio: 1;
  }
}

.sake-card .sake-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1e2c4a;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.sake-card .sake-description {
  color: #2a4274;
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.sake-card .sake-meta {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
}

.sake-card .meta-tag {
  background: #f0f4fa;
  color: #33518f;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 600;
}

.sake-card .affiliate-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.affiliate-btn {
  flex: 1;
  min-width: 120px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.affiliate-btn.btn-tippsy {
  background: #2a4274;
  color: #fff;
}

.affiliate-btn.btn-tippsy:hover {
  background: #1e2c4a;
}

.affiliate-btn.btn-amazon {
  background: #fff;
  color: #2a4274;
  border: 1.5px solid #dce6f3;
}

.affiliate-btn.btn-amazon:hover {
  background: #f0f4fa;
  border-color: #92add5;
}

/* ===== Pairings list styling ===== */
#result-pairings li {
  position: relative;
  padding-left: 1.25rem;
}

#result-pairings li::before {
  content: '🍴';
  position: absolute;
  left: 0;
  font-size: 0.85rem;
}

/* ===== Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.35s ease-out;
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 148, 33, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(217, 148, 33, 0); }
}

#start-quiz {
  animation: pulse-gold 2.5s infinite;
}

#start-quiz:hover {
  animation: none;
}

/* ===== Japanese typography tweak ===== */
[lang="ja"] {
  font-family: 'Noto Sans JP', sans-serif;
  letter-spacing: 0.01em;
}

[lang="ja"] h1,
[lang="ja"] h2,
[lang="ja"] h3,
[lang="ja"] .font-serif-jp {
  font-family: 'Noto Serif JP', serif;
}

/* ===== Print / Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== Mobile fine-tuning ===== */
@media (max-width: 640px) {
  .sake-card .affiliate-buttons {
    flex-direction: column;
  }
  .affiliate-btn {
    min-width: 100%;
  }
}


/* Hero responsive tagline — Cowork final patch */
.hero-tagline,
h1.tagline {
  text-wrap: balance;
  max-width: 20em;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 640px) {
  .hero-tagline,
  h1.tagline {
    max-width: 14em;
    font-size: 1.75rem;
    line-height: 1.4;
  }
}
