body {
  font-family: sans-serif;
  padding: 24px;
  line-height: 1.7;
  background: #f7f8fb;
  color: #222;
}

h1 {
  margin: 0 0 24px;
  font-size: 32px;
  line-height: 1.4;
}

.app-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 24px;
  padding: 18px 20px 12px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.26) 0%, rgba(255,255,255,0) 34%),
    linear-gradient(135deg, #144aa8 0%, #1f6feb 52%, #6da8ff 100%);
  box-shadow: 0 14px 34px rgba(20, 74, 168, 0.18);
  color: #ffffff;
}

.app-hero::before {
  content: "";
  position: absolute;
  inset: auto -40px -60px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  filter: blur(4px);
}

.app-hero-badge {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 12px;
  padding: 6px 14px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.24);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.app-hero-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(20px, 4vw, 25px);
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.app-hero-subtitle {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  max-width: 760px;
  font-size: clamp(14px, 1.6vw, 17px);
  line-height: 1.8;
  color: rgba(255,255,255,0.92);
}

hr {
  margin: 24px 0;
  border: none;
  border-top: 1px solid #ddd;
}

label {
  font-weight: 700;
}

input {
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #cfd6df;
  border-radius: 8px;
  background: #fff;
}

button {
  padding: 12px 18px;
  font-size: 15px;
  line-height: 1.5;
  cursor: pointer;
  border: none;
  border-radius: 12px;
  background: #1f6feb;
  color: #fff;
  font-weight: 800;
  transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 18px rgba(31, 111, 235, 0.18);
}

button:hover {
  opacity: 1;
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.secondary-button {
  background: #ffffff;
  color: #1f56b5;
  border: 1px solid #bfd4f6;
  box-shadow: none;
}

.app-shell {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.question-card {
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

#questionArea {
  position: relative;
}

.question-enter-forward {
  animation: questionSlideForward 0.22s ease;
}

.question-enter-back {
  animation: questionSlideBack 0.22s ease;
}

@keyframes questionSlideForward {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes questionSlideBack {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.question-title {
  margin: 0 0 14px;
  font-size: 24px;
  line-height: 1.5;
}

.question-subject-highlight {
  color: #0678db;
  font-weight: 800;
}

.question-description {
  background: #f7faff;
  border: 1px solid #dce8f8;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #4b5563;
  font-size: 14px;
  line-height: 1.75;
}

.question-progress {
  margin-bottom: 12px;
  color: #555;
  font-weight: 700;
}

.question-progress-wrap {
  margin-bottom: 16px;
}

.question-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.question-progress-step {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #1f56b5;
}

.question-progress-text {
  font-size: 13px;
  color: #6b7280;
  font-weight: 700;
}

.question-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e8eef8;
  overflow: hidden;
}

.question-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1f6feb 0%, #6da8ff 100%);
  transition: width 0.25s ease;
}

.question-input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid #cfd6df;
  border-radius: 10px;
  background: #fff;
}

.question-input[type="date"] {
  min-width: 0;
  max-width: 100%;
  appearance: none;
  -webkit-appearance: none;
}

.date-help-text {
  margin: -4px 0 10px;
  font-size: 13px;
  line-height: 1.6;
  color: #6b7280;
}

.question-error {
  min-height: 24px;
  margin-top: 8px;
  color: #d93025;
  font-weight: 700;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 20px 0 0;
}

.output-area {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-bottom: 130px;
}

.output-message {
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 12px;
  padding: 16px;
}

.special-event-item {
  padding-left: 18px;
}

.plan-summary {
  background: #ffffff;
  border: 1px solid #e3e6eb;
  border-radius: 14px;
  padding: 18px;
}

.plan-summary h2 {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.5;
}

.plan-summary p {
  margin: 4px 0;
}

.result-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.result-summary-item {
  background: #f8fbff;
  border: 1px solid #dbe7f6;
  border-radius: 14px;
  padding: 14px;
}

.result-summary-label {
  font-size: 12px;
  color: #5b6472;
  font-weight: 800;
  margin-bottom: 6px;
}

.result-summary-value {
  font-size: 16px;
  line-height: 1.6;
  color: #1f2937;
  font-weight: 800;
}

.rally-guide-card {
  border: 1px solid #dbe7f6;
  background: linear-gradient(135deg, #f8fbff 0%, #ffffff 100%);
}

.rally-guide-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.rally-guide-step {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #eef5ff;
  color: #1f56b5;
  font-weight: 800;
  font-size: 14px;
  border: 1px solid #cfe0fb;
}

.month-card {
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.month-title {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.5;
  border-bottom: 1px solid #eef1f5;
  padding-bottom: 10px;
}

.month-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.month-meta p {
  margin: 0;
}

.month-meta-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.mini-info-card {
  background: #f9fafc;
  border: 1px solid #e7ebf0;
  border-radius: 12px;
  padding: 14px;
  min-width: 0;
}

.mini-info-label {
  font-size: 13px;
  font-weight: 700;
  color: #5b6472;
  margin-bottom: 6px;
}

.mini-info-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  color: #174ea6;
  word-break: break-word;
}

.pass-probability-card {
  border-radius: 12px;
  padding: 14px;
  border: 1px solid transparent;
}

.pass-probability-label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.pass-probability-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

.probability-high {
  background: linear-gradient(135deg, #fff1f0 0%, #fff7ed 100%);
  border-color: #ffd3cc;
}

.probability-high .pass-probability-label {
  color: #c2410c;
}

.probability-high .pass-probability-value {
  color: #dc2626;
}

.probability-mid {
  background: linear-gradient(135deg, #fffbea 0%, #f3fff4 100%);
  border-color: #d9efb0;
}

.probability-mid .pass-probability-label {
  color: #5b8c00;
}

.probability-mid .pass-probability-value {
  color: #2f855a;
}

.probability-low {
  background: linear-gradient(135deg, #eff6ff 0%, #eef2ff 100%);
  border-color: #c7d2fe;
}

.probability-low .pass-probability-label {
  color: #3151a3;
}

.probability-low .pass-probability-value {
  color: #1e3a8a;
}

.subject-card:last-child {
  margin-bottom: 0;
}

.subject-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #174ea6 0%, #1f6feb 100%);
  border-left: none;
  box-shadow: none;
  filter: none;
  color: #ffffff;
  font-weight: 800;
  line-height: 1.4;
  font-size: 20px;
}

.field-block {
  background: #ffffff;
  border: 1px solid #edf1f5;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.field-block:last-child {
  margin-bottom: 0;
}

.field-title {
  display: inline-flex;
  align-items: center;
  margin: 0 0 10px;
  padding: 7px 12px;
  border-left: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #174ea6 0%, #1f6feb 100%);
  color: #ffffff;
  font-weight: 800;
  line-height: 1.5;
  font-size: 17px;
  box-shadow: none;
  filter: none;
}

.candidate-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.candidate-item {
  background: #f8fafc;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  padding: 10px 12px 10px 18px;
}

.candidate-card {
  background: #f8fafc;
  border: 1px solid #edf1f5;
  border-radius: 10px;
  padding: 12px;
  min-width: 0;
}

.candidate-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef5ff;
  border: 1px solid #cfe0ff;
  color: #174ea6;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.candidate-label {
  font-weight: 700;
  display: inline-block;
  margin-right: 6px;
}

.candidate-book {
  font-weight: 700;
}

.candidate-book-name {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  color: #174ea6;
  margin-bottom: 6px;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.candidate-feature {
  display: block;
  margin-top: 4px;
  color: #444;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.book-study-plan {
  margin-top: 10px;
  padding: 10px 12px;
  background: #f7fbff;
  border: 1px solid #d9eaff;
  border-radius: 10px;
}

.book-study-plan-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  min-width: 0;
}

.book-study-plan-line:last-child {
  margin-bottom: 0;
}

.book-study-plan-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eaf3ff;
  color: #174ea6;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  border: 1px solid #d4e5ff;
  white-space: nowrap;
  flex: 0 0 auto;
}

.book-study-plan-tag-unit {
  background: #ffffff;
  color: #315ea8;
}

.book-study-plan-tag-review {
  background: #eef8f0;
  color: #2f6b3c;
  border-color: #cfe8d5;
}

.book-study-plan-range-text {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  font-size: 13px;
  line-height: 1.6;
  color: #174ea6;
  font-weight: 800;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.book-study-plan-review-text {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: anywhere;
  min-width: 0;
}

.book-study-plan-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.book-study-plan-row:last-child {
  margin-bottom: 0;
}

.book-study-plan-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef5ff;
  color: #174ea6;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid #d7e6ff;
  white-space: normal;
  word-break: break-word;
}

.empty-text {
  color: #777;
}

.single-result-card {
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  padding: 18px;
}

.single-result-card h2 {
  margin-top: 0;
}

.score-highlight-card {
  background: linear-gradient(135deg, #eef5ff 0%, #f8fbff 100%);
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  padding: 14px 16px;
  margin: 0 0 14px;
}

.score-highlight-label {
  font-size: 13px;
  font-weight: 700;
  color: #335ea8;
  margin-bottom: 6px;
}

.score-highlight-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  color: #174ea6;
  word-break: break-word;
}

.book-accordion {
  margin-top: 10px;
  border: 1px solid #e5ebf3;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.book-accordion-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 700;
  color: #1f3b73;
  background: #f4f8ff;
  user-select: none;
}

.book-accordion-summary::-webkit-details-marker {
  display: none;
}

.book-accordion-summary::before {
  content: "＋";
  display: inline-block;
  margin-right: 8px;
  font-weight: 700;
}

.book-accordion[open] .book-accordion-summary::before {
  content: "－";
}

.book-accordion[open] .book-accordion-summary {
  border-bottom: 1px solid #e5ebf3;
}

.book-accordion .candidate-list {
  padding: 12px;
}

.month-accordion-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.month-accordion {
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 14px;
  overflow: hidden;
}

.month-accordion {
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.subject-empty-guide {
  background: #f9fafc;
}

.subject-empty-guide .candidate-item {
  background: #ffffff;
}

.subject-tab-panel-wrap.is-switching {
  animation: subjectPanelSwitch 0.22s ease;
}

@keyframes subjectPanelSwitch {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.month-accordion[open] .month-accordion-summary {
  background: linear-gradient(135deg, #eef5ff 0%, #f8fbff 100%);
  color: #174ea6;
}

.month-accordion[open] .month-accordion-body {
  background: #f8fbff;
}

.month-accordion-summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 18px;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.5;
  background: #f8fbff;
  color: #1f3b73;
  user-select: none;
}

.month-accordion-summary::-webkit-details-marker {
  display: none;
}

.month-accordion-summary::before {
  content: "＋";
  display: inline-block;
  margin-right: 10px;
  font-weight: 700;
}

.month-accordion[open] .month-accordion-summary::before {
  content: "－";
}

.month-accordion[open] .month-accordion-summary {
  border-bottom: 1px solid #e5ebf3;
}

.month-accordion-body {
  padding: 16px;
  background: #ffffff;
}

.month-accordion-body .month-card {
  margin: 0;
  box-shadow: none;
}

.info-card {
  background: #f9fafc;
  border: 1px solid #e7ebf0;
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
}

.info-card-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 8px;
}

.info-card-description {
  margin: 0 0 12px;
  color: #444;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.subject-tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef5ff;
  border: 1px solid #cfe0ff;
  color: #174ea6;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}

.form-section {
  background: #ffffff;
  border: 1px solid #e3e6eb;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.subject-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.subject-header .subject-title {
  margin: 0;
  flex: 0 0 auto;
}

.subject-meta-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 8px;
  flex: 1 1 auto;
  max-width: 360px;
}

.english-field-meta-cards {
  max-width: 280px;
}

.subject-mini-info-card {
  padding: 10px 12px;
}

.subject-mini-info-card .mini-info-label {
  font-size: 14px;
  margin-bottom: 4px;
}

.subject-mini-info-card .mini-info-value {
  font-size: 18px;
}

.subject-tab-section {
  margin: 18px 0 0;
}

.subject-tab-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 8px;
  margin: 18px 0 14px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.subject-tab-bar::-webkit-scrollbar {
  height: 6px;
}

.subject-tab-bar::-webkit-scrollbar-thumb {
  background: #cfd9ea;
  border-radius: 999px;
}

.subject-tab-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 19px;
  border-radius: 999px;
  border: 1px solid #d6e2f5;
  background: #ffffff;
  color: #24539c;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: none;
  filter: none;
}

.subject-tab-chip:hover {
  background: #f7fbff;
  border-color: #bfd4f5;
  opacity: 1;
}

.subject-tab-chip.is-active {
  background: linear-gradient(135deg, #1f6feb 0%, #3b82f6 100%);
  color: #ffffff;
  border-color: #1f6feb;
  box-shadow: none;
  filter: none;
}

.subject-tab-panel-wrap {
  min-width: 0;
}

.subject-tab-panel-wrap .subject-card {
  margin-bottom: 0;
}

.subject-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.subject-summary-item {
  background: #ffffff;
  border: 1px solid #e6edf7;
  border-radius: 10px;
  padding: 10px 12px;
  min-width: 0;
}

.subject-summary-label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #617084;
}

.subject-summary-value {
  display: block;
  color: #174ea6;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.consult-cta-section {
  margin-top: 18px;
}

.consult-cta-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef5ff 0%, #f8fbff 100%);
  border: 1px solid #cfe0ff;
}

.consult-cta-box-inline {
  margin-top: 18px;
}

.consult-cta-title {
  margin: 0;
  color: #174ea6;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
}

.consult-cta-description {
  margin: 0;
  color: #334155;
  font-size: 14px;
  line-height: 1.8;
}

.consult-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #1f6feb;
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.consult-cta-button:hover {
  opacity: 0.92;
}

.consult-cta-button-sub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #cfe0ff;
  color: #174ea6;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.consult-cta-button-sub:hover {
  opacity: 0.92;
}

/* CTA image banners */

.cta-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  border: 1px solid #dbe2ea;
}

.cta-card-main {
  background: linear-gradient(135deg, #eef5ff 0%, #f8fbff 100%);
  border: 1px solid #cfe0ff;
}

.cta-card-inline {
  background: #ffffff;
  border: 1px solid #dbe2ea;
}

.cta-card-image-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-top: 24px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.month-bottom-cta-grid {
  margin-top: 28px;
}

.image-cta-block {
  width: 80%;
  min-width: 0;
  margin: 0 auto;
}

.image-cta-image-wrap {
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #d9ebf8;
}

.image-cta-image {
  display: block;
  width: 100%;
  height: auto;
}

.image-cta-button {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 1.5%;
  width: 70%;
  min-height: 56px;
  padding: 15px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  text-decoration: none;
  text-align: center;
  font-size: clamp(18px, 2.25vw, 29px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.02em;
  border-radius: 14px;
  transition: opacity 0.2s ease;
  overflow: hidden;
  isolation: isolate;
}

.image-cta-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -35%;
  width: 22%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.18) 35%,
    rgba(255,255,255,0.55) 50%,
    rgba(255,255,255,0.18) 65%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-20deg);
  animation: ctaShine 1.7s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

@keyframes ctaShine {
  0% {
    left: -35%;
  }
  100% {
    left: 115%;
  }
}

.image-cta-button:hover {
  opacity: 0.92;
  transform: translateX(-50%);
}

.image-cta-button-line {
  background: #1f56b5;
  color: #ffffff;
  border: 3px solid #1f56b5;
}

.image-cta-button-diagnosis {
  background: #1f56b5;
  color: #ffffff;
  border: 3px solid #1f56b5;
}

.cta-card-title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.5;
  color: #174ea6;
  font-weight: 800;
}

.cta-card-description {
  margin: 0 0 14px;
  color: #344054;
}

.cta-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-top: 16px;
}

.cta-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid #dbe7fb;
  border-radius: 14px;
  padding: 16px;
}

.cta-column-label {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.5;
  color: #174ea6;
  margin: 0;
}

.cta-point-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.cta-point-item {
  color: #334155;
  font-weight: 600;
}

.cta-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.cta-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.subject-empty-guide {
  background: linear-gradient(135deg, #eef5ff 0%, #f8fbff 100%);
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  padding: 18px;
}

.subject-empty-guide-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: #174ea6;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.subject-empty-guide-title {
  margin: 0 0 10px;
  color: #174ea6;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.45;
}

.subject-empty-guide-description {
  margin: 0 0 12px;
  color: #334155;
  font-size: 14px;
  line-height: 1.8;
}

.cta-link-button:hover {
  opacity: 0.92;
}

.cta-link-button-primary {
  background: #1f6feb;
  color: #ffffff;
}

.cta-link-button-secondary {
  background: #ffffff;
  color: #174ea6;
  border: 1px solid #cfe0ff;
}

.next-action-card {
  border: 1px solid #cfe0ff;
  background: linear-gradient(135deg, #eef5ff 0%, #f8fbff 100%);
}

.next-action-card p {
  color: #334155;
  line-height: 1.8;
}

.next-action-button {
  background: linear-gradient(135deg, #174ea6 0%, #1f6feb 100%);
  box-shadow: 0 10px 22px rgba(31, 111, 235, 0.18);
  font-weight: 800;
}

.next-action-button:hover {
  opacity: 0.96;
}

.sticky-cta-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #0f172a;
  color: #ffffff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.25);
}

.sticky-cta-text-wrap {
  min-width: 0;
}

.sticky-cta-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.4;
}

.sticky-cta-subtext {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.85);
}

.sticky-cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  background: #ffffff;
  color: #174ea6;
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
}

/* Floating LINE banner */

.floating-line-banner-wrap {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  z-index: 9999;
  width: min(960px, calc(100vw - 32px));
}

.floating-line-banner {
  position: relative;
  width: 100%;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  box-sizing: border-box;
  text-decoration: none;
  color: #ffffff;
  background: linear-gradient(135deg, #1650b8 0%, #2f72db 100%);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(20, 43, 89, 0.22);
  overflow: hidden;
}

.floating-line-banner::after {
  display: none;
}

.floating-line-banner-close {
  position: absolute;
  top: -10px;
  right: -4px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #dbe7f6;
  background: #ffffff;
  color: #1f56b5;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14);
  padding: 0;
  z-index: 2;
}

.floating-line-banner-close:hover {
  transform: none;
  opacity: 1;
}

@keyframes shineStrong {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}

.floating-line-banner-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  z-index: 1;
}

.floating-line-banner-badge {
  display: inline-block;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: #22c55e;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.floating-line-banner-title {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.floating-line-banner-sub {
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.95);
}

.floating-line-banner-button {
  flex: 0 0 auto;
  min-width: 220px;
  min-height: 56px;
  padding: 14px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%);
  color: #1f56b5;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  position: relative;
  z-index: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease, opacity 0.25s ease;
  overflow: hidden;
}

.floating-line-banner-button:hover {
  transform: translateY(-2px) scale(1.03);
  opacity: 1;
}

.floating-line-banner-button::after {
  content: "";
  position: absolute;
  top: 0;
  left: -35%;
  width: 30%;
  height: 100%;
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0) 0%,
    rgba(255,255,255,0.6) 50%,
    rgba(255,255,255,0) 100%
  );
  transform: skewX(-20deg);
  animation: btnShine 2s infinite;
  pointer-events: none;
}

@keyframes btnShine {
  0% {
    left: -35%;
  }
  100% {
    left: 130%;
  }
}

@media (max-width: 1024px) {
  .floating-line-banner-wrap {
    width: calc(100vw - 28px);
    bottom: 14px;
  }

  .floating-line-banner {
    padding: 14px 16px;
    gap: 14px;
    border-radius: 16px;
    min-height: 84px;
  }

  .floating-line-banner-close {
    top: -8px;
    right: -2px;
  }

  .floating-line-banner-button {
    min-width: 180px;
    min-height: 48px;
    font-size: 15px;
    padding: 10px 14px;
    border-radius: 14px;
  }

  .image-cta-button {
    width: 73%;
  }

  .image-cta-button {
    font-size: clamp(16px, 2.8vw, 18px);
  }

  .question-input[type="date"] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: 16px;
    line-height: normal;
    padding: 12px 10px;
    height: 48px;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
  }

  .question-input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
  }

  .question-input[type="date"]::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
  }
}

@media (min-width: 641px) and (max-width: 1180px) {
  .image-cta-block {
    width: 100%;
    margin: 0 auto;
    display: block;
  }

  .image-cta-button {
    width: 75%;
    min-height: 44px;
    padding: 10px 18px;
    font-size: clamp(16px, 2.2vw, 19px);
    border-radius: 14px;
    bottom: 1.5%;
  }
}

@media (max-width: 640px) {
  body {
    padding: 16px;
  }

  h1 {
    font-size: 27px;
    margin-bottom: 20px;
  }

  .question-card,
  .month-card,
  .plan-summary,
  .single-result-card,
  .cta-card {
    padding: 16px;
  }

  .question-card,
  .form-row {
    min-width: 0;
  }

  .subject-empty-guide {
    padding: 14px;
  }

  .subject-empty-guide-title {
    font-size: 17px;
    line-height: 1.5;
  }

  .subject-empty-guide-description,
  .subject-empty-guide-point {
    font-size: 13px;
    line-height: 1.75;
  }
  
  .image-cta-block {
    width: 100%;
  }

  .question-title {
    font-size: 16px;
  }

  .month-title {
    font-size: 17px;
  }

  .subject-title {
    margin-bottom: 12px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 16px;
  }

  .field-title {
    margin-bottom: 8px;
    padding: 6px 10px;
    border-radius: 9px;
    font-size: 15px;
  }

  .score-highlight-value,
  .pass-probability-value {
    font-size: 24px;
  }

  .candidate-book-name,
  .mini-info-value {
    font-size: 18px;
  }

  .month-accordion-summary {
    font-size: 16px;
    padding: 14px 16px;
  }

  .month-accordion-body {
    padding: 0;
  }

  .info-card-title {
    font-size: 15px;
  }

  .subject-tag {
    font-size: 14px;
    padding: 5px 10px;
  }

  .month-meta-cards {
    grid-template-columns: 1fr;
  }

  .subject-header {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
  }

  .subject-meta-cards,
  .english-field-meta-cards {
    grid-template-columns: 1fr;
    max-width: none;
    width: 100%;
    gap: 6px;
  }

  .subject-mini-info-card {
    padding: 8px 10px;
  }

  .subject-summary-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .subject-tab-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
    padding: 0;
    overflow: visible;
  }

  .subject-tab-chip {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 18px;
    white-space: normal;
  }

  .consult-cta-box {
    padding: 14px;
    border-radius: 14px;
  }

  .consult-cta-title {
    font-size: 17px;
  }

  .consult-cta-description {
    font-size: 13px;
    line-height: 1.75;
  }

  .consult-cta-button,
  .consult-cta-button-sub {
    width: 100%;
  }

  .cta-card-title {
    font-size: 20px;
  }

  .cta-two-column {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .cta-column {
    padding: 14px;
  }

  .cta-button-group {
    flex-direction: column;
    gap: 8px;
  }

  .cta-link-button {
    width: 100%;
    min-height: 44px;
    padding: 11px 12px;
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
  }

  .cta-card-image-layout {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
  }

  .month-bottom-cta-grid {
    margin-top: 22px;
  }

  .image-cta-image-wrap {
    border-radius: 14px;
  }

  .image-cta-button {
    width: 75%;
    min-height: 42px;
    padding: 8px 10px;
    bottom: 1.5%;
    border-radius: 10px;
    font-size: clamp(14px, 4.5vw, 21px);
    border-width: 2px;
  }

  .sticky-cta-banner {
    left: 20px;
    right: 20px;
    bottom: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .sticky-cta-button {
    width: 100%;
  }

  .button-row {
    gap: 10px;
  }

  button {
    width: 100%;
    font-size: 17px;
    font-weight: 700;
  }

  .question-input[type="date"] {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.2;
    padding: 12px 10px;
    min-height: 48px;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
  }

  .date-help-text {
    font-size: 14px;
    line-height: 1.7;
    margin: -2px 0 10px;
  }

  .question-input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
  }

  .question-input[type="date"]::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
    flex-shrink: 0;
  }

  .month-card,
  .subject-card,
  .field-block,
  .candidate-card,
  .candidate-item,
  .book-accordion .candidate-list {
    padding-left: 0;
    padding-right: 0;
  }

  .month-card {
    padding: 8px;
  }

  .subject-card,
  .field-block,
  .candidate-card {
    padding: 8px;
  }

  .candidate-item,
  .book-accordion .candidate-list {
    padding-left: 0;
    padding-right: 0;
  }

  .candidate-book-name {
    font-size: 16px;
    line-height: 1.35;
  }

  .candidate-feature {
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .book-study-plan {
    padding: 9px 10px;
  }

  .book-study-plan-line {
    gap: 5px;
    margin-bottom: 7px;
  }

  .book-study-plan-tag {
    min-height: 24px;
    padding: 3px 8px;
    font-size: 12px;
  }

  .book-study-plan-range-text,
  .book-study-plan-review-text {
    min-height: 24px;
    font-size: 13px;
    line-height: 1.5;
  }

  .book-study-plan-row {
    gap: 6px;
  }

  .book-study-plan-chip {
    font-size: 12px;
    padding: 4px 10px;
  }

  .book-accordion-summary {
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
  }

  .floating-line-banner-wrap {
    width: calc(100vw - 20px);
    bottom: 8px;
  }

  .floating-line-banner {
    padding: 12px;
    gap: 8px;
    border-radius: 14px;
    align-items: center;
    min-height: auto;
  }

  .floating-line-banner-close {
    width: 30px;
    height: 30px;
    top: -8px;
    right: -2px;
    font-size: 16px;
  }

  .floating-line-banner-text {
    gap: 6px;
  }

  .floating-line-banner-badge {
    font-size: 13px;
    padding: 3px 11px;
  }

  .floating-line-banner-title {
    font-size: 18px;
  }

  .floating-line-banner-sub {
    font-size: 15px;
    line-height: 1.35;
  }

  .floating-line-banner-button {
    min-width: 120px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 16px;
    border-radius: 10px;
  }
}

@media (max-width: 640px) {
  .question-progress-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .result-summary-grid {
    grid-template-columns: 1fr;
  }

  .rally-heading-description {
    font-size: 15px;
    line-height: 1.8;
  }

  .rally-guide-steps {
    flex-direction: column;
  }

  .rally-guide-step {
    width: 100%;
    box-sizing: border-box;
    border-radius: 14px;
  }
}

  .rally-heading-description {
    font-size: 15px !important;
    line-height: 1.8 !important;
  }

  .candidate-item {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

  .special-event-item {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }

.subject-title,
.field-title,
.subject-tab-chip.is-active,
.subject-card,
.month-accordion[open] {
  box-shadow: none !important;
  filter: none !important;
}