* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f4f6f8;
  margin: 0;
  color: #222;
}

.container {
  max-width: 760px;
  margin: 16px auto;
  padding: 12px;
}

h1 {
  margin: 0 0 14px 0;
  font-size: clamp(18px, 5vw, 24px);
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.card {
  background: white;
  padding: 20px;
  margin-top: 14px;
  border-radius: 16px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.calculator-card {
  padding-bottom: 12px;
}

label {
  display: block;
  margin-bottom: 22px;
  font-weight: bold;
  font-size: clamp(15px, 4vw, 18px);
}

.calculator-card label:last-child {
  margin-bottom: 4px;
}

input[type="range"] {
  width: 100%;
  margin-top: 10px;
  cursor: pointer;
}

.field-title {
  font-weight: bold;
  font-size: clamp(15px, 4vw, 18px);
  margin: 0 0 10px 0;
}

.gender-group {
  margin-bottom: 22px;
}

.gender-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gender-option {
  width: 100%;
  min-width: 0;
  padding: 12px 6px;
  font-size: clamp(15px, 4vw, 20px);
  font-weight: bold;
  border: 3px solid #cbd5e1;
  border-radius: 14px;
  background: white;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gender-option:hover {
  border-color: #1a73e8;
}

.gender-option.selected {
  background: #1a73e8;
  color: white;
  border-color: #1a73e8;
  transform: scale(1.01);
}

.headline-result {
  text-align: center;
  padding: 18px;
  margin-bottom: 0;
  border-radius: 16px;
  background: #fff5f5;
  border: 3px solid #ffb3b3;
}

.headline-label {
  font-size: clamp(16px, 4vw, 20px);
  font-weight: bold;
  margin: 0 0 10px 0;
  color: #aa0000;
}

.headline-total {
  font-size: clamp(28px, 10vw, 56px);
  font-weight: bold;
  color: #d40000;
  line-height: 1;
  white-space: nowrap;
}

.share-button {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: #1a73e8;
  color: white;
  cursor: pointer;
  font-size: clamp(15px, 4vw, 18px);
  font-weight: bold;
}

.share-button:hover {
  background: #155fc0;
}

.follow-button {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: #21e65f;
  color: #000000;
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: clamp(15px, 4vw, 18px);
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  -webkit-text-fill-color: #000000;
}

.follow-button:link,
.follow-button:visited,
.follow-button:hover,
.follow-button:active,
.follow-button:focus {
  color: #000000;
  text-decoration: none;
  -webkit-text-fill-color: #000000;
}

.follow-button:hover,
.follow-button:focus {
  background: #19c850;
}

.share-status {
  min-height: 18px;
  margin: 8px 0 0 0;
  color: #555;
  font-size: 13px;
  text-align: center;
}

.timestamp {
  margin-top: 14px;
  font-size: clamp(11px, 3vw, 14px);
  color: #666;
  line-height: 1.4;
  text-align: center;
}

@media (max-width: 430px) {

  .container {
    margin: 8px auto;
    padding: 8px;
  }

  .card {
    padding: 16px;
    margin-top: 10px;
  }

  label {
    margin-bottom: 18px;
  }

  .gender-option {
    padding: 10px 4px;
  }

  .headline-total {
    font-size: clamp(24px, 9vw, 40px);
  }
}
