:root {
  --bg: #050506;
  --surface: #0d0d10;
  --surface-subtle: #15151a;
  --surface-hover: #1b1b22;
  --text: #f7f5f8;
  --muted: #aaa8b2;
  --line: rgba(255, 255, 255, .18);
  --line-subtle: rgba(255, 255, 255, .09);
  --pink: #ed4d72;
  --pink-light: #e56edb;
  --blue: #799cff;
  --green: #62ca79;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 50% -20%, rgba(229, 110, 219, .12), transparent 36rem),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Noto Sans JP", sans-serif;
  line-height: 1.5;
}

main {
  max-width: 900px;
  margin: auto;
  padding: 48px 18px 64px;
}

.back-link {
  display: block;
  width: fit-content;
  margin: 20px 20px 0 auto;
  color: #ffaf5b;
  font-size: 13px;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

header {
  padding-top: 14px;
  padding-bottom: 18px;
  margin-bottom: 28px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(26px, 5vw, 36px);
  letter-spacing: -.03em;
  color: var(--text);
}

h1.page-title {
  color: var(--text);
}

h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.lead,
.hint,
.note,
label {
  color: var(--muted);
}

.lead,
.hint {
  margin: 0 0 16px;
  font-size: 13px;
}

.lead {
  display: inline-block;
  max-width: calc(100vw - 64px);
  margin-bottom: 0;
  font-size: 14px;
  text-align: left;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-top: 16px;
  background: var(--surface);
  border: 1px solid var(--line-subtle);
  border-radius: 12px;
}

.fever-detail-link {
  display: block;
  margin-top: 16px;
  margin-left: 10px;
  color: #ffaf5b;
  font-size: 12px;
  text-decoration: none;
}

.fever-detail-link:hover {
  text-decoration: underline;
}

.fever-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-top: 8px;
  background: var(--surface);
  border: 1px solid rgba(255, 149, 82, .3);
  border-radius: 12px;
  transition: border-color .2s, box-shadow .2s;
}

.fever-bar.is-active {
  border-color: rgba(255, 149, 52, .55);
  box-shadow: 0 0 24px rgba(255, 149, 52, .12);
}

.fever-tag {
  padding: 3px 8px;
  background: linear-gradient(135deg, #ff9534, #ed4d72);
  border-radius: 999px;
  color: #0d0d10;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}

.fever-bar-label {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.fever-switch {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.fever-switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.fever-switch-track {
  position: relative;
  width: 40px;
  height: 22px;
  background: #08080a;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: background .2s, border-color .2s;
}

.fever-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: var(--muted);
  border-radius: 50%;
  transition: transform .2s, background .2s;
}

.fever-switch input:checked + .fever-switch-track {
  background: linear-gradient(135deg, #ff9534, #ed4d72);
  border-color: transparent;
}

.fever-switch input:checked + .fever-switch-track .fever-switch-thumb {
  background: #fff;
  transform: translateX(18px);
}

.fever-switch input:focus-visible + .fever-switch-track {
  box-shadow: 0 0 0 3px rgba(255, 149, 52, .3);
}

.fever-switch-state {
  min-width: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.fever-bar.is-active .fever-switch-state {
  color: #ffaf5b;
}

.fever-subtoggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  margin: 0 0 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--line-subtle);
  border-radius: 8px;
  cursor: pointer;
}

.fever-subtoggle.is-visible {
  display: flex;
}

.fever-subtoggle-label {
  font-size: 12px;
  color: var(--muted);
}

.tab {
  flex: 1 1 0;
  padding: 10px 8px;
  background: transparent;
  border: none;
  border-radius: 8px;
  appearance: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  text-align: center;
  cursor: pointer;
  transition: background .2s, color .2s;
}

.tab:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.tab:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(229, 110, 219, .16);
}

.tab[aria-selected="true"] {
  color: var(--text);
  background: linear-gradient(135deg, rgba(229, 110, 219, .16), rgba(121, 156, 255, .11)), var(--surface-subtle);
  box-shadow: inset 0 0 0 1px rgba(229, 110, 219, .35);
}

.panel[hidden] {
  display: none;
}

.card {
  padding: clamp(18px, 4vw, 28px);
  margin-top: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, .035), transparent 45%), var(--surface);
  border: 1px solid var(--line-subtle);
  border-radius: 12px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .22);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, 1fr);
}

label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
}

input,
select {
  width: 100%;
  padding: 10px 11px;
  appearance: none;
  background: #08080a;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

input:hover,
select:hover {
  background: var(--surface-subtle);
  border-color: rgba(255, 255, 255, .35);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--pink-light);
  box-shadow: 0 0 0 3px rgba(229, 110, 219, .16);
}

/* PCでは非表示 */
.sp-only {
  display: none;
}

.results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.result,
.formula div {
  padding: 14px;
  background: var(--surface-subtle);
  border: 1px solid var(--line-subtle);
  border-radius: 8px;
}

.result:first-child,
.result.is-highlight {
  border-color: rgba(229, 110, 219, .35);
  background: linear-gradient(135deg, rgba(229, 110, 219, .13), rgba(121, 156, 255, .09)), var(--surface-subtle);
}

.result b {
  display: block;
  margin-top: 2px;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -.03em;
  color: var(--text);
}

.result:first-child b,
.result.is-highlight b {
  color: transparent;
  background: linear-gradient(100deg, var(--pink-light), var(--blue));
  background-clip: text;
  -webkit-background-clip: text;
}

.result span {
  color: var(--muted);
  font-size: 12px;
}

.comparison {
  width: 100%;
  margin-top: 14px;
  border-collapse: collapse;
  font-size: 13px;
}

.comparison th,
.comparison td {
  padding: 10px 7px;
  text-align: right;
  border-bottom: 1px solid var(--line-subtle);
}

.comparison th {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
}

.comparison th:first-child,
.comparison td:first-child {
  text-align: left;
}

.comparison tbody tr:hover {
  background: rgba(255, 255, 255, .035);
}

.comparison tbody tr.is-selected {
  background: rgba(255, 149, 52, .16);
}

.comparison tbody tr.is-selected td {
  color: #ffd2a1;
  border-bottom-color: rgba(255, 149, 52, .4);
}

.comparison tbody tr.is-selected td:first-child {
  color: #ffaf5b;
  font-weight: 700;
}

.note {
  margin: 16px 0 0;
  font-size: 12px;
}

.note a {
  color: var(--muted);
  text-decoration: underline;
}

.formula {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.formula div {
  color: var(--muted);
  font-size: 12px;
}

.formula strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text);
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  width: min(900px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.footer-credit {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

#x-logo {
  width: 24px;
}

.footer-social {
  margin: 16px 0;
  padding-top: 7px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.footer-links a {
  color: #ffaf5b;
  font-size: 12px;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.privacy-content {
  padding-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.privacy-content p {
  margin: 0;
}

.privacy-content h2 {
  margin: 18px 0 4px;
  color: var(--text);
  font-size: 13px;
}

.privacy-content a {
  color: #ffaf5b;
}

.privacy-updated {
  margin-top: 10px !important;
  margin-bottom: 0 !important;
  color: #85838e;
}

@media (max-width: 650px) {
  main {
  padding-top: 32px;
  }

  .sp-only {
    display: block;
  }

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

  .results {
  grid-template-columns: 1fr;
  }

  .tabs {
  flex-wrap: wrap;
  }

  .tab {
  flex: 1 1 calc(50% - 4px);
  }
}

@media (max-width: 420px) {
  .grid.two,
  .formula {
  grid-template-columns: 1fr;
  }

  main {
  padding: 24px 12px 40px;
  }
}
