/* JANI test detail system */

.jani-test-page {
  --jani-test-primary: #5661ff;
  --jani-test-primary-strong: #4854f3;
  --jani-test-accent: #5661ff;
  --jani-test-accent-strong: #4854f3;
  --jani-test-ink: #222733;
  --jani-test-muted: #8a92a3;
  --jani-test-line: #eceef3;
  --jani-test-line-strong: #d7dbe6;
  --jani-test-soft: #f7f8fb;
  --jani-test-blue-soft: #eef3ff;
  --jani-test-danger: #ff5a66;
  color: var(--jani-test-ink);
  background: #fff;
  overflow-x: hidden;
}

.jani-test-page button,
.jani-test-page a {
  font: inherit;
}

.jani-test-page button {
  appearance: none;
  cursor: pointer;
}

.jani-test-screen[hidden] {
  display: none !important;
}

.jani-test-screen.is-active {
  animation: jani-test-fade-up .22s ease both;
}

.jani-test-pad {
  padding: 22px 20px 40px;
}

.jani-test-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid var(--jani-test-line);
  border-radius: 8px;
  background: var(--jani-test-soft);
  animation: jani-test-soft-pop .32s ease both;
}

.jani-test-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jani-test-hero-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  background: #f6f8ff;
}

.jani-test-hero-placeholder span {
  font-size: 42px;
  line-height: 1;
  animation: jani-test-float 2.6s ease-in-out infinite;
}

.jani-test-hero-placeholder strong {
  font-size: 24px;
  line-height: 1.25;
}

.jani-test-intro {
  padding-top: 24px;
}

.jani-test-kicker {
  color: var(--jani-test-accent);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.jani-test-title {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0;
}

.jani-test-desc {
  margin: 14px 0 0;
  color: #4b5360;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 500;
}

.jani-test-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 20px;
}

.jani-test-meta-box {
  min-height: 74px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--jani-test-line);
  border-radius: 8px;
  background: #fff;
}

.jani-test-meta-box b {
  color: var(--jani-test-muted);
  font-size: 12px;
  line-height: 1.3;
}

.jani-test-meta-box strong {
  color: var(--jani-test-ink);
  font-size: 16px;
  line-height: 1.3;
}

.jani-test-reaction-panel {
  margin-top: 14px;
  padding: 15px;
  border: 1px solid var(--jani-test-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(22, 27, 36, .035);
}

.jani-test-rating {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--jani-test-muted);
  font-size: 13px;
  font-weight: 700;
}

.jani-test-rating-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.jani-test-rating-summary,
.jani-test-view-summary {
  color: #778194;
  font-size: 12.5px;
  line-height: 1.2;
  white-space: nowrap;
}

.jani-test-rating-summary b,
.jani-test-view-summary b {
  color: #687286;
}

.jani-test-view-summary {
  margin-left: auto;
}

.jani-test-stars {
  --jani-test-rating-percent: 0%;
  position: relative;
  display: inline-block;
  color: #d7dbe6;
  font-size: 17px;
  line-height: 1;
  letter-spacing: .05em;
  white-space: nowrap;
}

.jani-test-stars-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  clip-path: inset(0 calc(100% - var(--jani-test-rating-percent)) 0 0);
  color: #ffbf2f;
  white-space: nowrap;
}

.jani-test-stars-empty {
  color: #d7dbe6;
}

@media (max-width: 380px) {
  .jani-test-rating {
    align-items: flex-start;
  }

  .jani-test-rating-main {
    flex-wrap: wrap;
    row-gap: 5px;
  }
}

.jani-test-reaction-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.jani-test-outline-btn,
.jani-test-sub-btn,
.jani-test-quiz-btn,
.jani-test-primary-btn {
  min-height: 48px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.jani-test-page .jani-test-outline-btn {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--jani-test-line) !important;
  border-radius: 12px;
  background: #fff !important;
  color: #3f4652 !important;
  font-weight: 900;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.jani-test-page .jani-test-outline-btn:hover {
  border-color: #ccd2ff !important;
  background: #f7f8ff !important;
  transform: translateY(-1px);
}

.jani-test-page .jani-test-outline-btn:active {
  transform: scale(.98);
}

.jani-test-page .jani-test-outline-btn.is-liked {
  border-color: #ccd2ff !important;
  background: #eef1ff !important;
  color: var(--jani-test-primary-strong) !important;
}

.jani-test-page .jani-test-primary-btn {
  width: 100% !important;
  min-height: 56px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 18px 0 12px;
  border: 1px solid var(--jani-test-primary) !important;
  border-radius: 8px;
  background: var(--jani-test-primary) !important;
  color: #fff !important;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(86, 97, 255, .20);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.jani-test-page .jani-test-primary-btn:hover {
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 14px 26px rgba(86, 97, 255, .26);
  filter: saturate(1.04);
}

.jani-test-page .jani-test-primary-btn:active {
  transform: scale(.99);
}

.jani-test-sub-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.jani-test-page .jani-test-sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--jani-test-line-strong) !important;
  background: #fff !important;
  color: #3e4653 !important;
  font-weight: 800;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.jani-test-page .jani-test-sub-btn:hover {
  border-color: #c9d0e2 !important;
  background: #fbfcff !important;
  transform: translateY(-1px);
}

.jani-test-content-note {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--jani-test-line);
  border-radius: 14px;
  background: var(--jani-test-soft);
  color: #4b5360;
  font-size: 14px;
  line-height: 1.75;
}

.jani-test-content-section {
  margin-top: 28px;
}

.jani-test-content-section h2 {
  margin: 0 0 12px;
  color: var(--jani-test-ink);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: 0;
}

.jani-test-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.jani-test-related-card {
  overflow: hidden;
  min-height: 116px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--jani-test-line);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(18, 23, 36, .045);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.jani-test-related-card:hover {
  border-color: #ccd2ff;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(18, 23, 36, .075);
}

.jani-test-related-thumb {
  flex: 0 0 92px;
  width: 92px;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f4f6ff;
  color: var(--jani-test-accent);
  font-size: 34px;
  font-weight: 900;
}

.jani-test-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.jani-test-related-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 32px;
}

.jani-test-related-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.jani-test-related-badge {
  align-self: flex-start;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f4ff;
  color: var(--jani-test-accent);
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.jani-test-related-card strong {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  padding: 0;
  color: var(--jani-test-ink);
  font-size: 15px;
  line-height: 1.35;
  font-weight: 900;
}

.jani-test-related-card small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 0;
  color: var(--jani-test-muted);
  font-size: 12px;
  line-height: 1.5;
  font-weight: 700;
}

.jani-test-related-card small span {
  white-space: nowrap;
}

.jani-test-related-empty {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1px dashed var(--jani-test-line-strong);
  border-radius: 12px;
  background: #fbfbfd;
  color: var(--jani-test-muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.jani-test-quiz-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 16px;
  align-items: end;
}

.jani-test-part {
  color: var(--jani-test-muted);
  font-size: 13px;
  font-weight: 800;
}

.jani-test-quiz-title {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.3;
}

.jani-test-progress-side {
  min-width: 0;
}

.jani-test-progress-count {
  color: var(--jani-test-muted);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.jani-test-progress-track {
  height: 6px;
  margin-top: 8px;
  border-radius: 999px;
  background: #edf0f5;
  overflow: hidden;
}

.jani-test-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: var(--jani-test-primary);
  transition: width 180ms ease;
}

.jani-test-question-card {
  margin-top: 22px;
  padding: 20px 16px;
  border: 1px solid var(--jani-test-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(18, 23, 36, .055);
}

.jani-test-question-no {
  color: var(--jani-test-muted);
  font-size: 13px;
  font-weight: 900;
}

.jani-test-question-main {
  min-height: 92px;
  margin: 10px 0 22px;
  font-size: 22px;
  line-height: 1.45;
  font-weight: 900;
  letter-spacing: 0;
}

.jani-test-scale-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  color: var(--jani-test-muted);
  font-size: clamp(15px, 3.6vw, 17px);
  font-weight: 900;
}

.jani-test-scale-label-row span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 999px;
}

.jani-test-scale-label-row span:first-child {
  background: #fff0f1;
  color: var(--jani-test-danger);
}

.jani-test-scale-label-row span:last-child {
  background: #eef1ff;
  color: var(--jani-test-primary-strong);
}

.jani-test-scale-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  justify-items: center;
  align-items: center;
  gap: clamp(4px, 1.8vw, 10px);
  margin-top: 0;
}

.jani-test-page .jani-test-scale-option {
  width: 100%;
  min-width: 0;
  padding: 0 !important;
  display: grid;
  justify-items: center;
  align-items: center;
  gap: 7px;
  border: 0 !important;
  background: transparent !important;
  color: var(--jani-test-muted) !important;
  font-size: clamp(10px, 2.75vw, 12px);
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
  word-break: keep-all;
}

.jani-test-page .jani-test-scale-option.is-selected {
  color: var(--jani-test-primary) !important;
}

.jani-test-scale-dot {
  display: block;
  border-radius: 50%;
  border: 2px solid #d9d8d5;
  background: #fff;
  position: relative;
  transition: transform .12s ease, border-color .12s ease, background .12s ease, box-shadow .12s ease;
}

.jani-test-scale-dot::after {
  content: "";
  position: absolute;
  inset: 29%;
  border-radius: 50%;
  background: transparent;
}

.jani-test-scale-dot.s1,
.jani-test-scale-dot.s5 {
  width: clamp(52px, 13.5vw, 64px);
  height: clamp(52px, 13.5vw, 64px);
}

.jani-test-scale-dot.s2,
.jani-test-scale-dot.s4 {
  width: clamp(46px, 12vw, 56px);
  height: clamp(46px, 12vw, 56px);
}

.jani-test-scale-dot.s3 {
  width: clamp(38px, 10vw, 48px);
  height: clamp(38px, 10vw, 48px);
}

.jani-test-page .jani-test-scale-option.is-selected .jani-test-scale-dot {
  border-color: var(--jani-test-primary);
  background: var(--jani-test-blue-soft);
  box-shadow: 0 0 0 5px rgba(86, 97, 255, .10);
  transform: translateY(-2px);
}

.jani-test-page .jani-test-scale-option.is-selected .jani-test-scale-dot::after {
  background: var(--jani-test-primary);
}

.jani-test-page .jani-test-scale-option:hover .jani-test-scale-dot {
  border-color: var(--jani-test-primary);
  transform: translateY(-3px) scale(1.07);
}

.jani-test-page .jani-test-scale-option.score-low:hover,
.jani-test-page .jani-test-scale-option.score-low.is-selected {
  color: var(--jani-test-danger) !important;
}

.jani-test-page .jani-test-scale-option.score-low:hover .jani-test-scale-dot,
.jani-test-page .jani-test-scale-option.score-low.is-selected .jani-test-scale-dot {
  border-color: var(--jani-test-danger);
  background: #fff0f1;
  box-shadow: 0 0 0 5px rgba(255, 90, 102, .10);
}

.jani-test-page .jani-test-scale-option.score-low.is-selected .jani-test-scale-dot::after {
  background: var(--jani-test-danger);
}

.jani-test-page .jani-test-scale-option.score-neutral:hover,
.jani-test-page .jani-test-scale-option.score-neutral.is-selected {
  color: #7b8494 !important;
}

.jani-test-page .jani-test-scale-option.score-neutral:hover .jani-test-scale-dot,
.jani-test-page .jani-test-scale-option.score-neutral.is-selected .jani-test-scale-dot {
  border-color: #aeb5c2;
  background: #f5f6f8;
  box-shadow: 0 0 0 5px rgba(138, 146, 163, .12);
}

.jani-test-page .jani-test-scale-option.score-neutral.is-selected .jani-test-scale-dot::after {
  background: #8a92a3;
}

.jani-test-page .jani-test-scale-option.score-high:hover,
.jani-test-page .jani-test-scale-option.score-high.is-selected {
  color: var(--jani-test-primary) !important;
}

.jani-test-page .jani-test-scale-option.score-high:hover .jani-test-scale-dot,
.jani-test-page .jani-test-scale-option.score-high.is-selected .jani-test-scale-dot {
  border-color: var(--jani-test-primary);
  background: var(--jani-test-blue-soft);
  box-shadow: 0 0 0 5px rgba(86, 97, 255, .10);
}

.jani-test-page .jani-test-scale-option.score-high.is-selected .jani-test-scale-dot::after {
  background: var(--jani-test-primary);
}

.jani-test-quiz-controls {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 10px;
  margin-top: 18px;
}

.jani-test-page .jani-test-quiz-btn {
  min-height: 50px;
  border: 1px solid var(--jani-test-line-strong) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #4b5360 !important;
  font-weight: 900;
}

.jani-test-page .jani-test-quiz-btn.primary {
  border-color: var(--jani-test-primary) !important;
  background: var(--jani-test-primary) !important;
  color: #fff !important;
}

.jani-test-page .jani-test-quiz-btn.primary:disabled {
  border-color: #d6d8e2 !important;
  background: #d6d8e2 !important;
  color: #fff !important;
  cursor: not-allowed;
  box-shadow: none;
}

.jani-test-helper {
  margin: 14px 0 0;
  color: var(--jani-test-muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.jani-test-result-card {
  padding: 25px 24px 26px;
  border: 1px solid var(--jani-test-line-strong);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 26px rgba(18, 23, 36, .055);
}

.jani-test-page.is-result-visible .jani-test-result-card {
  animation: jani-test-result-enter .34s ease both;
}

.jani-test-result-label {
  color: var(--jani-test-muted);
  font-size: 13px;
  font-weight: 900;
}

.jani-test-result-name {
  margin: 12px 0 0;
  color: var(--jani-test-ink);
  font-size: 34px;
  line-height: 1.18;
  font-weight: 900;
  letter-spacing: 0;
}

.jani-test-result-en {
  margin-top: 8px;
  color: var(--jani-test-accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  font-style: italic;
}

.jani-test-result-summary {
  margin: 20px 0 0;
  color: #4b5360;
  font-size: 15px;
  line-height: 1.75;
  font-weight: 600;
}

.jani-test-axis {
  margin-top: 22px;
}

.jani-test-axis-labels {
  display: flex;
  justify-content: space-between;
  color: var(--jani-test-muted);
  font-size: 12px;
  font-weight: 800;
}

.jani-test-axis-line {
  position: relative;
  height: 5px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #315dff, #e22a2a);
}

.jani-test-axis-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 17px;
  height: 17px;
  border: 2px solid var(--jani-test-accent);
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  transition: left 180ms ease;
}

.jani-test-page.is-result-visible .jani-test-axis-dot {
  animation: jani-test-dot-pop .38s ease .16s both;
}

.jani-test-result-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 24px;
}

.jani-test-result-stat {
  padding: 12px;
  border-radius: 8px;
  background: var(--jani-test-soft);
}

.jani-test-result-stat b {
  display: block;
  color: var(--jani-test-muted);
  font-size: 12px;
  line-height: 1.4;
}

.jani-test-result-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--jani-test-ink);
  font-size: 16px;
  line-height: 1.4;
}

.jani-test-result-stat small {
  display: block;
  margin-top: 3px;
  color: var(--jani-test-muted);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 800;
}

.jani-test-result-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
}

.jani-test-result-actions .wide {
  grid-column: 1 / -1;
}

.jani-test-result-actions .jani-test-primary-btn,
.jani-test-result-actions .jani-test-sub-btn,
.jani-test-quiz-controls .jani-test-quiz-btn {
  margin: 0;
}

.jani-test-rate-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--jani-test-line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfcff 0%, #fff 100%);
}

.jani-test-rate-panel h2 {
  margin: 0;
  color: var(--jani-test-ink);
  font-size: 18px;
  line-height: 1.35;
  font-weight: 900;
}

.jani-test-rate-panel p,
.jani-test-modal-card p {
  margin: 6px 0 0;
  color: var(--jani-test-muted);
  font-size: 13px;
  line-height: 1.55;
  font-weight: 700;
}

.jani-test-rate-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
}

.jani-test-star-row {
  display: flex;
  align-items: center;
  gap: 5px;
}

.jani-test-page .jani-test-star-row button {
  min-width: 0;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  color: #d6dbe8 !important;
  font-size: 26px;
  line-height: 1;
  transition: transform .14s ease, color .14s ease;
}

.jani-test-page .jani-test-star-row button:hover,
.jani-test-page .jani-test-star-row button.is-selected {
  color: #ffc13a !important;
  transform: translateY(-1px) scale(1.08);
}

.jani-test-page .jani-test-rate-submit {
  min-height: 42px;
  border: 1px solid var(--jani-test-primary) !important;
  border-radius: 8px;
  background: var(--jani-test-primary) !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 900;
}

.jani-test-page .jani-test-rate-submit:disabled,
.jani-test-page .jani-test-rating-modal-actions button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.jani-test-rate-panel.is-rated {
  background: #f7fff9;
  border-color: #ccefdc;
}

.jani-test-diagnosis {
  margin-top: 26px;
}

.jani-test-diagnosis h2 {
  margin: 0 0 12px;
  color: var(--jani-test-ink);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 900;
  letter-spacing: 0;
}

.jani-test-diagnosis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.jani-test-diagnosis-card {
  min-height: 126px;
  padding: 13px;
  border: 1px solid var(--jani-test-line);
  border-radius: 12px;
  background: #fff;
}

.jani-test-page.is-result-visible .jani-test-diagnosis-card {
  animation: jani-test-fade-up .28s ease both;
}

.jani-test-page.is-result-visible .jani-test-diagnosis-card:nth-child(2) {
  animation-delay: .04s;
}

.jani-test-page.is-result-visible .jani-test-diagnosis-card:nth-child(3) {
  animation-delay: .08s;
}

.jani-test-page.is-result-visible .jani-test-diagnosis-card:nth-child(4) {
  animation-delay: .12s;
}

.jani-test-diagnosis-dot {
  width: 8px;
  height: 8px;
  margin-bottom: 13px;
  border-radius: 50%;
  background: var(--jani-test-accent);
}

.jani-test-diagnosis-card small {
  display: block;
  margin-bottom: 8px;
  color: #5b6472;
  font-size: 12px;
  font-weight: 800;
}

.jani-test-diagnosis-card strong {
  display: block;
  margin-bottom: 6px;
  color: var(--jani-test-accent-strong);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 900;
}

.jani-test-diagnosis-card p {
  margin: 0;
  color: #66707f;
  font-size: 12px;
  line-height: 1.65;
  font-weight: 650;
}

.jani-test-toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 200;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 14px;
  border-radius: 8px;
  background: #242936;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.jani-test-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.jani-test-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(24, 28, 38, .42);
  opacity: 0;
  transition: opacity .16s ease;
}

.jani-test-modal.is-open {
  opacity: 1;
}

.jani-test-modal-card {
  width: min(100%, 360px);
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(18, 23, 36, .18);
  position: relative;
  transform: translateY(8px) scale(.98);
  transition: transform .16s ease;
}

.jani-test-modal.is-open .jani-test-modal-card {
  transform: translateY(0) scale(1);
}

.jani-test-modal-card h2 {
  margin: 0;
  color: var(--jani-test-ink);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 900;
}

.jani-test-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0 !important;
  border-radius: 50%;
  background: #f4f6fb !important;
  color: #66707f !important;
  font-size: 22px;
  line-height: 1;
}

.jani-test-share-buttons,
.jani-test-rating-modal-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.jani-test-page .jani-test-share-choice {
  min-height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--jani-test-line) !important;
  border-radius: 10px;
  background: #f9fafc !important;
  color: #303747 !important;
  text-align: left;
}

.jani-test-page .jani-test-share-choice.kakao {
  background: #fee500 !important;
  border-color: #efd700 !important;
}

.jani-test-page .jani-test-share-choice.community {
  display: none;
  background: #eef3ff !important;
  border-color: #dce4ff !important;
}

.jani-test-modal.is-result-share .jani-test-share-choice.community {
  display: flex;
}

.jani-test-share-choice img {
  width: 22px;
  height: 22px;
}

.jani-test-share-choice span {
  font-size: 20px;
}

.jani-test-share-choice strong {
  font-size: 14px;
  font-weight: 900;
}

.jani-test-rating-modal-actions {
  grid-template-columns: 1fr 1fr;
}

.jani-test-rating-modal-actions .jani-test-primary-btn {
  margin: 0;
}

.modal-stars {
  justify-content: center;
  margin-top: 18px;
}

@keyframes jani-test-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes jani-test-soft-pop {
  from { opacity: 0; transform: scale(.985); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes jani-test-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-4px) rotate(4deg); }
}

@keyframes jani-test-result-enter {
  from { opacity: 0; transform: translateY(10px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes jani-test-dot-pop {
  from { transform: translate(-50%, -50%) scale(.55); }
  to { transform: translate(-50%, -50%) scale(1); }
}

@media (max-width: 380px) {
  .jani-test-pad {
    padding: 18px 14px 34px;
  }

  .jani-test-title {
    font-size: 25px;
  }

  .jani-test-question-main {
    font-size: 20px;
  }

  .jani-test-quiz-head {
    grid-template-columns: 1fr;
  }

  .jani-test-progress-count {
    text-align: left;
  }

  .jani-test-scale-options {
    gap: 5px;
  }

  .jani-test-diagnosis-grid {
    grid-template-columns: 1fr;
  }

  .jani-test-related-thumb {
    flex-basis: 84px;
    width: 84px;
  }
}
