/* ===========================
   CSS Custom Properties
   =========================== */
:root {
  --primary: #0ea5e9;
  --primary-hover: #0284c7;
  --primary-dark: #0369a1;
  --primary-rgb: 14, 165, 233;
  --bg: #f0f9ff;
  --surface: #ffffff;
  --text: #0c1a2e;
  --text-muted: #6b7280;
  --text-weak: #9ca3af;
  --border: #bae6fd;
  --border-base: #e2e8f0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 16px rgba(0,0,0,0.10), 0 1px 4px rgba(0,0,0,0.06);
  --transition: 0.15s ease;
}

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

body {
  font-family: 'BIZ UDPGothic', 'Outfit', -apple-system, BlinkMacSystemFont,
               "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  word-break: break-word;
}

/* ===========================
   Header
   =========================== */
header {
  background: linear-gradient(135deg, #0369a1, #0ea5e9);
  color: #fff;
  padding: 2rem 1.25rem 1.75rem;
  text-align: center;
}

.header-inner {
  max-width: 700px;
  margin: 0 auto;
}

.header-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  opacity: 0.92;
}

header h1 {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(1.1rem, 3.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
}

.subtitle {
  font-size: 0.875rem;
  opacity: 0.88;
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ===========================
   Main Layout
   =========================== */
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 1.25rem 1rem 2rem;
}

/* ===========================
   Privacy Notice
   =========================== */
.privacy-notice {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  padding: 0.625rem 1rem;
  font-size: 0.8125rem;
  color: #0369a1;
  margin-bottom: 1.25rem;
}

.privacy-notice i {
  font-size: 1rem;
  flex-shrink: 0;
}

/* ===========================
   Ad Units
   =========================== */
.ad-unit {
  min-height: 0;
  background: #f8fafc;
  margin: 1.5rem 0;
  border-radius: var(--radius-sm);
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ===========================
   Tool Section
   =========================== */
.tool-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
}

.section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title i {
  color: var(--primary);
}

/* ===========================
   Form Fields
   =========================== */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.field-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #374151;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.field-label i {
  color: var(--primary);
}

.field-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* ===========================
   Slider Row
   =========================== */
.slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.range-input {
  flex: 1;
  height: 6px;
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(to right, var(--primary), var(--primary)) 0 / var(--val, 31%) no-repeat, #e2e8f0;
  border-radius: 100px;
  cursor: pointer;
  min-height: 44px;
  padding: 0;
  border: none;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.4);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}

.range-input::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 10px rgba(14, 165, 233, 0.5);
}

.range-input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.4);
  cursor: pointer;
}

.range-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.number-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex-shrink: 0;
}

.number-input-wrap input[type="number"] {
  width: 70px;
  text-align: center;
  padding: 0.5rem 0.5rem;
  border: 1.5px solid var(--border-base);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: #fff;
  min-height: 44px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.number-input-wrap input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.unit-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ===========================
   Radio Cards
   =========================== */
.radio-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}

.radio-card {
  cursor: pointer;
  display: block;
}

.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-label {
  display: flex;
  flex-direction: column;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border-base);
  border-radius: var(--radius-sm);
  background: #fafafa;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  min-height: 60px;
  justify-content: center;
}

.radio-card input[type="radio"]:checked + .radio-label {
  border-color: var(--primary);
  background: #e0f2fe;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.radio-card:hover .radio-label {
  border-color: var(--primary);
  background: #f0f9ff;
}

.radio-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.radio-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
  line-height: 1.4;
}

/* ===========================
   Checkbox Cards
   =========================== */
.checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem;
}

.checkbox-card {
  cursor: pointer;
  display: block;
}

.checkbox-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.875rem 1rem;
  border: 1.5px solid var(--border-base);
  border-radius: var(--radius-sm);
  background: #fafafa;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
  min-height: 60px;
}

.checkbox-label i {
  font-size: 1.25rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.checkbox-card input[type="checkbox"]:checked + .checkbox-label {
  border-color: var(--primary);
  background: #e0f2fe;
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}

.checkbox-card input[type="checkbox"]:checked + .checkbox-label i {
  color: var(--primary);
}

.checkbox-card:hover .checkbox-label {
  border-color: var(--primary);
  background: #f0f9ff;
}

.checkbox-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
}

.checkbox-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
}

/* ===========================
   Submit Button
   =========================== */
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.875rem 1.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  min-height: 52px;
  transition: background var(--transition), transform 0.12s ease, box-shadow var(--transition);
  box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(var(--primary-rgb), 0.25);
}

/* ===========================
   Result Section
   =========================== */
.result-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.result-main {
  background: linear-gradient(135deg, #e0f2fe, #bae6fd);
  border: 1px solid #7dd3fc;
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
}

.result-header {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.result-icon {
  font-size: 2.5rem;
  color: var(--primary-dark);
  flex-shrink: 0;
}

.result-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0369a1;
  margin-bottom: 0.25rem;
}

.result-value {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.25rem, 8vw, 3.5rem);
  font-weight: 800;
  color: var(--primary-dark);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.result-sub {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: #0ea5e9;
  margin-top: 0.25rem;
}

.result-breakdown {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(3, 105, 161, 0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.breakdown-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(3, 105, 161, 0.2);
  border-radius: 100px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8125rem;
  color: #0369a1;
  font-weight: 500;
}

/* ===========================
   Cards (generic)
   =========================== */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title i {
  color: var(--primary);
}

/* ===========================
   Drink Grid
   =========================== */
.drink-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.drink-item {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
}

.drink-icon {
  font-size: 1.75rem;
  margin-bottom: 0.375rem;
}

.drink-name {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 600;
}

.drink-count {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin-top: 0.25rem;
}

.drink-unit {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===========================
   Schedule Table
   =========================== */
.schedule-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.schedule-table thead tr {
  background: #f0f9ff;
}

.schedule-table th {
  padding: 0.625rem 0.75rem;
  font-weight: 700;
  color: #0369a1;
  text-align: left;
  border-bottom: 2px solid #bae6fd;
  white-space: nowrap;
}

.schedule-table td {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: top;
}

.schedule-table tbody tr:last-child td {
  border-bottom: none;
}

.schedule-table tbody tr:hover td {
  background: #f0f9ff;
}

.schedule-timing {
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.schedule-ml {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--primary-dark);
  white-space: nowrap;
}

.schedule-note {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* ===========================
   Howto Section
   =========================== */
.howto-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
  margin-top: 1.25rem;
}

details {
  border-top: 1px solid var(--border-base);
  margin-top: 1rem;
}

details[open] {
  padding-bottom: 0.5rem;
}

summary {
  cursor: pointer;
  padding: 0.875rem 0;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  user-select: none;
}

summary::after {
  content: '\F282';
  font-family: 'bootstrap-icons';
  font-size: 0.875rem;
  color: var(--primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

details[open] summary::after {
  transform: rotate(180deg);
}

.howto-steps {
  list-style: none;
  padding: 0.75rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.howto-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: #374151;
  line-height: 1.6;
}

.step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  margin-top: 0.1rem;
}

/* ===========================
   Info Section
   =========================== */
.info-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
  margin-top: 1.25rem;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
  margin-top: 1rem;
}

.info-card {
  border-radius: var(--radius-sm);
  padding: 1.125rem;
  border: 1px solid transparent;
}

.info-card.warning {
  background: #fefce8;
  border-color: #fde047;
}

.info-card.danger {
  background: #fff1f2;
  border-color: #fda4af;
}

.info-card.tip {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.info-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.info-card.warning h3 { color: #854d0e; }
.info-card.warning h3 i { color: #ca8a04; }
.info-card.danger h3 { color: #9f1239; }
.info-card.danger h3 i { color: #e11d48; }
.info-card.tip h3 { color: #14532d; }
.info-card.tip h3 i { color: #16a34a; }

.info-card ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.info-card li {
  font-size: 0.8125rem;
  color: #374151;
  padding-left: 1rem;
  position: relative;
  line-height: 1.6;
}

.info-card li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.external-link-box {
  margin-top: 1.25rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-sm);
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.external-link-box i {
  color: var(--primary);
  flex-shrink: 0;
}

.external-link-box a {
  font-size: 0.875rem;
  color: var(--primary-dark);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}

.external-link-box a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ===========================
   FAQ Section
   =========================== */
.faq-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.05);
  margin-top: 1.25rem;
}

.faq-list {
  margin-top: 0.5rem;
}

.faq-item {
  border-bottom: 1px solid var(--border-base);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item summary {
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.875rem 0;
  border-top: none;
}

.faq-item p {
  font-size: 0.875rem;
  color: #374151;
  padding: 0 0 1rem;
  line-height: 1.75;
}

/* ===========================
   Disclaimer
   =========================== */
.disclaimer {
  margin-top: 1.25rem;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: var(--radius-sm);
  padding: 1rem 1.125rem;
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
}

.disclaimer i {
  color: #f97316;
  font-size: 1.125rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.disclaimer p {
  font-size: 0.8125rem;
  color: #7c2d12;
  line-height: 1.7;
}

/* ===========================
   Footer
   =========================== */
footer {
  background: #0c1a2e;
  color: #94a3b8;
  padding: 2rem 1.25rem;
  text-align: center;
  margin-top: 2.5rem;
}

.footer-inner {
  max-width: 760px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-bottom: 0.875rem;
}

.footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #e2e8f0;
}

.footer-copy {
  font-size: 0.8125rem;
  color: #64748b;
}

/* ===========================
   Responsive — Tablet
   =========================== */
@media (min-width: 640px) {
  main {
    padding: 1.5rem 1.5rem 2.5rem;
  }

  .radio-group {
    grid-template-columns: repeat(4, 1fr);
  }

  .info-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===========================
   Responsive — Desktop
   =========================== */
@media (min-width: 900px) {
  main {
    padding: 2rem 2rem 3rem;
  }

  .tool-section {
    padding: 2rem;
  }
}
