#onhen-hub-faculties.onhen-top-subjects {
  box-sizing: border-box; width: 100vw; max-width: none; margin: 0 calc(50% - 50vw);
  background: #fffbe5; color: #252525; line-height: 1.6; padding: 88px clamp(24px, 5.56vw, 80px) 80px;
  font-family: "Noto Sans JP", sans-serif;
}
.onhen-top-subject-inner { max-width: 1280px; margin: auto; display: grid; grid-template-columns: minmax(0,392fr) minmax(0,824fr); gap: clamp(24px,4.44vw,64px); }
@media (min-width:768px) {
  .onhen-top-subject-intro, .onhen-top-subject-results { align-self: start; }
  .onhen-top-subject-intro[data-sticky] {
    position: sticky;
    top: calc(var(--onhen-shared-header-height, 0px) + var(--onhen-subnav-height, 0px) + 16px);
  }
}
.onhen-top-subjects h2 { font-size: clamp(26px,2.78vw,40px); line-height: 1.6; margin: 0; }
.onhen-top-subjects p { font-size: 15px; line-height: 1.7; margin: 16px 0 40px; }
.onhen-top-subjects fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.onhen-top-subjects legend { padding: 0; margin: 0 auto -1px; font-size: 13px; }
.onhen-top-toggle { display: flex; gap: 10px; background: white; border: 1px solid; border-radius: 4px; padding: 8px 12px; }
.onhen-top-toggle label { position: relative; flex: 1; cursor: pointer; }
.onhen-top-toggle input { position: absolute; opacity: 0; }
.onhen-top-toggle span { box-sizing: border-box; display: grid; place-items: center; height: 56px; border: 1px solid #252525; border-radius: 4px; background: #f16078; color: white; font-size: 20px; font-weight: bold; }
.onhen-top-toggle label:last-child span { background: #0b78e5; }
.onhen-top-toggle input:not(:checked) + span { opacity: .5; }
.onhen-top-toggle input:focus-visible + span { outline: 3px solid #252525; outline-offset: 2px; }
.onhen-top-panel { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 16px; }
.onhen-top-subjects:has(input[value="0"]:checked) [data-group="1"],
.onhen-top-subjects:has(input[value="1"]:checked) [data-group="0"] { display: none; }
.onhen-top-subject-card { display: flex; flex-direction: column; align-items: center; text-align: center; padding-bottom: 12px; background: white; color: inherit; text-decoration: none; border: 1px solid; border-radius: 4px; overflow: hidden; }
.onhen-top-subject-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; background: #ffe5e6; }
.onhen-top-panel[data-group="1"] img { background: #e4f3ff; }
.onhen-top-subject-card b, .onhen-top-subject-card .s { padding-inline: 4px; }
.onhen-top-subject-card b { font-size: clamp(13px,1.25vw,18px); line-height: 1.4; margin: 8px 0 2px; }
.onhen-top-subject-card .s { font-size: 13px; line-height: 1.4; color: rgb(37 37 37 / 70%); }
@media(max-width:767px) {
  #onhen-hub-faculties.onhen-top-subjects { padding: 48px 0 0; }
  .onhen-top-subject-inner { display: block; }
  .onhen-top-subject-intro { padding: 0 15px; }
  .onhen-top-subjects h2 { text-align: center; font-size: 28px; }
  .onhen-top-subjects p { margin: 12px 0 28px; }
  .onhen-top-subjects legend { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
  .onhen-top-toggle { align-items: end; gap: 4px; padding: 0; background: transparent; border: 0; }
  .onhen-top-toggle span { height: 45px; border-bottom: 0; border-radius: 2px 2px 0 0; font-size: 15px; }
  .onhen-top-toggle input:not(:checked) + span { height: 33px; opacity: 1; }
  .onhen-top-subject-results { padding: 24px 15px 48px; border-top: 1px solid; background: #fffbe5; }
  .onhen-top-panel { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
  .onhen-top-subject-card { border-radius: 2px; padding-bottom: 8px; }
  .onhen-top-subject-card .s { font-size: 10px; }
  .onhen-top-subject-card b { margin-top: 6px; font-size: 14px; }
}
#onhen-top-introduction { box-sizing: border-box; width: 100%; max-width: 760px; margin: auto; padding: 56px 20px; color: #252525; text-align: center; font-family: "Noto Sans JP",sans-serif; }
#onhen-top-introduction h2 { margin: 0 0 32px; font-size: 32px; line-height: 1.6; text-decoration: underline dotted; text-underline-offset: .15em; }
#onhen-top-introduction p { margin: 0; font-size: 15px; line-height: 2; }
#onhen-top-introduction small { display: block; font-size: 10px; line-height: 2; }
#onhen-top-introduction sup { font-size: 10px; }
@media(max-width:767px) {
  #onhen-top-introduction { width: 100vw; max-width: none; margin-inline: calc(50% - 50vw); padding: 48px 20px; text-align: left; }
  #onhen-top-introduction h2 { font-size: 24px; text-align: center; }
  #onhen-top-introduction p { line-height: 1.8; }
  #onhen-top-introduction p + p { margin-top: 20px; }
}
.onhen-top-subject-intro h2 img { margin-inline-start: 4px; vertical-align: middle; }
.onhen-top-subject-intro legend img { vertical-align: top; }
.onhen-top-subject-intro legend .onhen-top-speech { vertical-align: top; }
@media(max-width:767px) {
  .onhen-top-subject-intro h2 img { width: 24px; height: auto; }
}

@media (hover: hover) and (pointer: fine) {
  .onhen-top-subject-card:hover {
    transform: scale(1.04);
    z-index: 1;
  }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .onhen-top-subject-card { transition: transform 220ms ease-out; }
}
