:root {
  --erp-ink: #102b45;
  --erp-text: #294158;
  --erp-muted: #64758a;
  --erp-line: #d4e1ed;
  --erp-line-strong: #b7cada;
  --erp-paper: #ffffff;
  --erp-soft: #f4f8fc;
  --erp-blue: #1769aa;
  --erp-blue-dark: #0e4f86;
  --erp-blue-soft: #eaf5ff;
  --erp-teal: #087f77;
  --erp-teal-soft: #e9f8f5;
  --erp-green: #177044;
  --erp-green-soft: #eaf8f0;
  --erp-amber: #8a5a00;
  --erp-amber-soft: #fff7df;
  --erp-red: #a72b35;
  --erp-red-soft: #fff0f1;
  --erp-shadow: 0 18px 44px rgba(24, 61, 91, 0.1);
  --erp-radius-lg: 22px;
  --erp-radius-md: 15px;
  --erp-radius-sm: 10px;
}

.erp,
.erp *,
.erp *::before,
.erp *::after {
  box-sizing: border-box;
}

.erp {
  width: 100%;
  overflow-wrap: anywhere;
  color: var(--erp-text);
  font-family:
    "Yu Gothic",
    "Hiragino Kaku Gothic ProN",
    Meiryo,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.erp [hidden] {
  display: none !important;
}

.erp button,
.erp select,
.erp input {
  font: inherit;
}

.erp button,
.erp select,
.erp input[type="radio"] {
  accent-color: var(--erp-blue);
}

.erp button:focus-visible,
.erp select:focus-visible,
.erp input:focus-visible,
.erp [tabindex="-1"]:focus-visible {
  outline: 3px solid rgba(23, 105, 170, 0.35);
  outline-offset: 3px;
}

.erp__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
  gap: 28px;
  align-items: end;
  margin-bottom: 18px;
  padding: clamp(22px, 4vw, 38px);
  overflow: hidden;
  border: 1px solid #bfd7eb;
  border-radius: var(--erp-radius-lg);
  background:
    radial-gradient(circle at 88% 8%, rgba(73, 174, 181, 0.2), transparent 29%),
    linear-gradient(135deg, #f7fbff 0%, #edf7ff 58%, #eefaf7 100%);
  box-shadow: var(--erp-shadow);
}

.erp[data-preview="false"] .erp__header {
  grid-template-columns: minmax(0, 1fr);
}

.erp[data-preview="false"] .erp__heading {
  max-width: 780px;
}

.erp__heading {
  min-width: 0;
}

.erp__eyebrow,
.erp-screen__step {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: var(--erp-blue-dark);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.erp__title,
.erp-screen h3,
.erp-mode h4,
.erp-result h4 {
  margin: 0;
  color: var(--erp-ink);
  line-height: 1.3;
  letter-spacing: 0;
}

.erp__title {
  margin-top: 6px;
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  font-weight: 850;
}

.erp__lead {
  max-width: 760px;
  margin: 12px 0 0;
  color: #41576b;
  font-size: clamp(0.96rem, 1.6vw, 1.06rem);
  font-weight: 650;
}

.erp__bank-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(130, 170, 200, 0.55);
  border-radius: var(--erp-radius-md);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(8px);
}

.erp__bank-summary div {
  min-width: 0;
  padding: 7px 8px;
}

.erp__bank-summary dt {
  color: var(--erp-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.erp__bank-summary dd {
  margin: 2px 0 0;
  color: var(--erp-ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.erp__notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 14px 0;
  padding: 13px 15px;
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius-md);
  background: var(--erp-paper);
}

.erp__notice strong,
.erp__notice p {
  display: block;
  margin: 0;
}

.erp__notice p {
  margin-top: 2px;
  font-size: 0.88rem;
  font-weight: 650;
}

.erp__notice-icon {
  flex: 0 0 30px;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 950;
}

.erp__notice--preview {
  border-color: #b8d9d4;
  background: var(--erp-teal-soft);
  color: #145e59;
}

.erp__notice--preview .erp__notice-icon {
  background: var(--erp-teal);
  color: #fff;
}

.erp__notice--warning {
  border-color: #ecd18b;
  background: var(--erp-amber-soft);
  color: var(--erp-amber);
}

.erp__notice--warning .erp__notice-icon {
  background: #d99a18;
  color: #fff;
}

.erp__notice--error {
  border-color: #e7b6ba;
  background: var(--erp-red-soft);
  color: var(--erp-red);
}

.erp__notice--error .erp__notice-icon {
  background: var(--erp-red);
  color: #fff;
}

.erp__notice .erp-action {
  margin-top: 9px;
}

.erp__status {
  min-height: 25px;
  margin: 12px 2px;
  color: var(--erp-muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.erp-screen {
  padding: clamp(18px, 3.5vw, 32px);
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius-lg);
  background: var(--erp-paper);
  box-shadow: var(--erp-shadow);
}

.erp-screen__heading {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 20px;
}

.erp[data-preview="false"] .erp-launcher__intro {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.erp[data-preview="false"] .erp-launcher .erp-screen__heading {
  min-height: 0;
  margin-bottom: 0;
}

.erp[data-preview="false"] .erp-launcher .erp-screen__heading:has([data-resume-session]:not([hidden])) {
  min-height: 44px;
  margin-bottom: 12px;
}

.erp-screen h3 {
  margin-top: 3px;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  font-weight: 850;
}

.erp-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.erp-quick-start {
  max-width: 720px;
}

.erp-quick-start .erp-mode {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  column-gap: clamp(16px, 4vw, 34px);
  padding: clamp(20px, 4vw, 30px);
  border-width: 2px;
  box-shadow: 0 16px 34px rgba(23, 105, 170, 0.13);
}

.erp-quick-start .erp-mode__tag,
.erp-quick-start .erp-mode h4,
.erp-quick-start .erp-mode p {
  grid-column: 1;
}

.erp-quick-start .erp-mode h4 {
  font-size: clamp(1.25rem, 3vw, 1.55rem);
}

.erp-quick-start .erp-mode__meta,
.erp-quick-start .erp-mode .erp-action {
  grid-column: 2;
}

.erp-quick-start .erp-mode__meta {
  align-self: end;
}

.erp-quick-start .erp-mode .erp-action {
  grid-row: 2 / span 2;
  min-width: 190px;
  align-self: end;
}

.erp-more-modes {
  margin-top: 18px;
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius-md);
  background: #fbfdff;
}

.erp-more-modes > summary {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 12px 16px;
  color: var(--erp-blue-dark);
  font-weight: 900;
  cursor: pointer;
  list-style-position: inside;
}

.erp-more-modes > summary small {
  color: var(--erp-muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.erp-more-modes[open] > summary {
  border-bottom: 1px solid var(--erp-line);
  background: var(--erp-blue-soft);
}

.erp-more-modes > .erp-mode-grid {
  padding: 14px;
}

.erp-more-modes:not([open]) > .erp-mode-grid {
  display: none;
}

.erp-mode {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(52px, 1fr) auto auto;
  align-content: start;
  gap: 9px;
  padding: 20px;
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius-md);
  background: linear-gradient(180deg, #fff, #fbfdff);
}

.erp-mode--primary {
  border-color: #93c1e5;
  background:
    linear-gradient(180deg, rgba(235, 247, 255, 0.9), rgba(255, 255, 255, 0.96));
}

.erp-mode--wide {
  grid-column: 1 / -1;
}

.erp-mode__tag {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--erp-soft);
  color: var(--erp-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.erp-mode--primary .erp-mode__tag {
  background: var(--erp-blue);
  color: #fff;
}

.erp-mode h4 {
  font-size: 1.05rem;
  font-weight: 850;
}

.erp-mode p {
  margin: 0;
  color: #52687d;
  font-size: 0.88rem;
  font-weight: 620;
}

.erp-mode__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.erp-mode__meta span {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid var(--erp-line);
  border-radius: 999px;
  background: #fff;
  color: var(--erp-text);
  font-size: 0.74rem;
  font-weight: 800;
}

.erp-mode__fields {
  display: grid;
  grid-template-columns: minmax(120px, 0.38fr) minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
}

.erp-mode__fields label {
  color: var(--erp-ink);
  font-size: 0.78rem;
  font-weight: 850;
}

.erp-mode__fields select {
  width: 100%;
  min-height: 44px;
  padding: 8px 36px 8px 11px;
  border: 1px solid var(--erp-line-strong);
  border-radius: var(--erp-radius-sm);
  background: #fff;
  color: var(--erp-text);
  font-weight: 750;
}

.erp-action {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: var(--erp-radius-sm);
  color: var(--erp-ink);
  background: #fff;
  font-size: 0.9rem;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background-color 160ms ease;
}

.erp-action:hover:not(:disabled) {
  transform: translateY(-1px);
}

.erp-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.erp-action--primary {
  border-color: var(--erp-blue);
  background: var(--erp-blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(23, 105, 170, 0.2);
}

.erp-action--primary:hover:not(:disabled) {
  border-color: var(--erp-blue-dark);
  background: var(--erp-blue-dark);
}

.erp-action--secondary {
  border-color: #a9bfd3;
  background: #fff;
  color: var(--erp-blue-dark);
}

.erp-action--secondary:hover:not(:disabled),
.erp-action--quiet:hover:not(:disabled) {
  border-color: #77a5cb;
  background: var(--erp-blue-soft);
}

.erp-action--quiet {
  border-color: currentColor;
  background: transparent;
  color: inherit;
}

.erp-action--text {
  min-height: 44px;
  padding-inline: 8px;
  color: var(--erp-muted);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.erp-question__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 16px;
  align-items: center;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--erp-line);
}

.erp-question__progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--erp-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.erp-question__progress-copy strong {
  color: var(--erp-ink);
}

.erp-progress {
  grid-column: 1;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf5;
}

.erp-progress span {
  display: block;
  width: var(--erp-progress, 8.333%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--erp-blue), #23a096);
}

.erp-question__header .erp-action {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.erp-question__body {
  width: min(100%, 820px);
  margin: 0 auto;
  padding-block: clamp(22px, 4vw, 38px) 4px;
}

.erp-question__instruction {
  margin: 0 0 12px;
  color: var(--erp-muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.erp-stimulus {
  margin-bottom: 22px;
  padding: clamp(16px, 3vw, 24px);
  border-left: 4px solid var(--erp-blue);
  border-radius: 0 var(--erp-radius-md) var(--erp-radius-md) 0;
  background: var(--erp-soft);
}

.erp-stimulus h3,
.erp-stimulus p {
  margin: 0;
}

.erp-stimulus h3 {
  color: var(--erp-ink);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 800;
  line-height: 1.7;
}

.erp-stimulus audio,
.erp-stimulus img {
  display: block;
  max-width: 100%;
}

.erp-stimulus audio {
  width: 100%;
  margin-top: 14px;
}

.erp-stimulus img {
  height: auto;
  margin: 0 auto 14px;
  border-radius: var(--erp-radius-sm);
}

.erp-stimulus__image-frame {
  position: relative;
}

.erp-stimulus__panel-labels {
  position: absolute;
  z-index: 1;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0.55rem 0.7rem;
  pointer-events: none;
}

.erp-stimulus__panel-labels span {
  justify-self: start;
  display: inline-grid;
  place-items: center;
  min-width: 2rem;
  min-height: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 999px;
  background: rgba(5, 53, 101, 0.9);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(5, 34, 64, 0.22);
}

.erp-hint {
  margin: -8px 0 20px;
  padding: 14px;
  border: 1px solid #ecd18b;
  border-radius: var(--erp-radius-md);
  background: var(--erp-amber-soft);
}

.erp-hint__panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(138, 90, 0, 0.2);
}

.erp-hint__panel p {
  margin: 0;
}

.erp-hint__panel p + p {
  margin-top: 7px;
}

.eiken-player__prompt {
  margin: 0 0 22px;
  padding: clamp(16px, 3vw, 24px);
  border-left: 4px solid var(--erp-blue);
  border-radius: 0 var(--erp-radius-md) var(--erp-radius-md) 0;
  background: var(--erp-soft);
  color: var(--erp-ink);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 800;
  line-height: 1.7;
}

.eiken-player__prompt[data-prompt-concealed="true"] {
  color: var(--erp-muted);
  font-size: 1rem;
  font-weight: 650;
}

.erp-answer fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.erp-answer legend {
  width: 100%;
  margin: 0 0 10px;
  color: var(--erp-ink);
  font-size: 0.92rem;
  font-weight: 850;
}

.erp-choice-list {
  display: grid;
  gap: 10px;
}

.erp-choice,
.eiken-player__choice {
  min-height: 52px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius-md);
  background: #fff;
  color: var(--erp-text);
  cursor: pointer;
}

.erp-choice:hover,
.eiken-player__choice:hover {
  border-color: #8db5d6;
  background: #f8fbff;
}

.erp-choice:has(input:focus-visible),
.eiken-player__choice:has(input:focus-visible) {
  outline: 3px solid rgba(23, 105, 170, 0.35);
  outline-offset: 2px;
}

.erp-choice:has(input:checked),
.eiken-player__choice:has(input:checked) {
  border-color: var(--erp-blue);
  background: var(--erp-blue-soft);
  box-shadow: inset 0 0 0 1px var(--erp-blue);
}

.erp-choice:has(input:disabled) {
  cursor: default;
}

.erp .erp-choice.is-correct {
  border-color: var(--erp-green);
  background: var(--erp-green-soft);
  box-shadow: inset 0 0 0 1px var(--erp-green);
}

.erp .erp-choice.is-incorrect {
  border-color: var(--erp-red);
  background: var(--erp-red-soft);
  box-shadow: inset 0 0 0 1px var(--erp-red);
}

.erp-choice.is-correct .erp-choice__marker {
  background: var(--erp-green);
  color: #fff;
}

.erp-choice.is-incorrect .erp-choice__marker {
  background: var(--erp-red);
  color: #fff;
}

.erp-choice input[type="radio"],
.eiken-player__choice input[type="radio"] {
  width: 20px;
  height: 20px;
  margin: 0;
}

.erp-choice__marker {
  min-width: 28px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--erp-soft);
  color: var(--erp-blue-dark);
  font-size: 0.78rem;
  font-weight: 900;
}

.erp-choice__copy {
  min-width: 0;
  font-weight: 750;
}

.erp-choice__state {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
}

.erp-choice.is-correct .erp-choice__state {
  color: var(--erp-green);
}

.erp-choice.is-incorrect .erp-choice__state {
  color: var(--erp-red);
}

.erp-choice.is-selected .erp-choice__state {
  color: var(--erp-blue-dark);
}

.erp-choice--number-only {
  grid-template-columns: auto minmax(44px, 1fr) auto;
  min-height: 64px;
}

.erp-choice--number-only .erp-choice__marker {
  min-width: 44px;
  min-height: 44px;
  font-size: 1rem;
}

.eiken-player__choice-label {
  min-width: 0;
  font-weight: 750;
}

.eiken-player__choice {
  grid-template-columns: auto minmax(0, 1fr);
}

.erp-choice--placeholder {
  color: var(--erp-muted);
  cursor: wait;
}

.erp-question__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.erp-answer__unanswered {
  margin: 10px 0 0;
  color: var(--erp-red);
  font-size: 0.84rem;
  font-weight: 850;
}

.erp-question__actions .erp-action {
  min-width: min(100%, 190px);
}

.erp-feedback {
  margin-top: 22px;
  padding: clamp(17px, 3vw, 24px);
  border: 1px solid #afd7cf;
  border-radius: var(--erp-radius-md);
  background: linear-gradient(180deg, #f1fbf8, #fff);
}

.erp-feedback.is-correct {
  border-color: #9bcfb3;
  background: linear-gradient(180deg, var(--erp-green-soft), #fff 46%);
}

.erp-feedback.is-incorrect {
  border-color: #e2aab0;
  background: linear-gradient(180deg, var(--erp-red-soft), #fff 46%);
}

.erp-feedback.is-deferred {
  border-color: #b9cde0;
  background: linear-gradient(180deg, var(--erp-blue-soft), #fff 60%);
}

.erp-feedback__heading {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.erp-feedback__result {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--erp-teal);
  color: #fff;
  font-size: 0.76rem;
  font-weight: 900;
}

.erp-feedback.is-correct .erp-feedback__result {
  background: var(--erp-green);
}

.erp-feedback.is-incorrect .erp-feedback__result {
  background: var(--erp-red);
}

.erp-feedback.is-deferred .erp-feedback__result {
  background: var(--erp-blue-dark);
}

.erp-feedback h3,
.erp-feedback p {
  margin: 0;
}

.erp-feedback h3 {
  color: var(--erp-ink);
  font-size: 1.05rem;
  font-weight: 850;
}

.erp-feedback [data-feedback-body] {
  display: grid;
  gap: 14px;
}

.erp-feedback [data-feedback-body] h4 {
  margin: 0 0 5px;
  color: var(--erp-ink);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.erp-feedback__answer-card,
.erp-feedback__reason-block,
.erp-feedback__evidence-card,
.erp-feedback__recovery {
  padding: 14px 16px;
  border-radius: var(--erp-radius-sm);
}

.erp-feedback__answer-card {
  border-left: 5px solid var(--erp-green);
  background: var(--erp-green-soft);
}

.erp-feedback__answer-card .eiken-player__correct-answer {
  color: #0e5934;
  font-size: clamp(1.12rem, 2.6vw, 1.35rem);
  font-weight: 900;
  line-height: 1.55;
}

.erp-feedback__reason-block {
  border: 1px solid var(--erp-line);
  background: #fff;
}

.erp-feedback__reason-block .eiken-player__answer-reason {
  color: var(--erp-ink);
  font-size: 1rem;
  font-weight: 750;
  line-height: 1.8;
}

.erp-feedback__evidence-card {
  border-left: 5px solid var(--erp-blue);
  background: var(--erp-blue-soft);
}

.erp-feedback__evidence-card .eiken-player__evidence {
  color: var(--erp-blue-dark);
  font-size: 1.03rem;
  font-weight: 850;
  line-height: 1.7;
}

.erp-feedback__evidence-card .eiken-player__evidence-ja {
  margin-top: 4px;
  color: #445b70;
  font-size: 0.9rem;
  font-weight: 650;
}

.erp-feedback__details {
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius-sm);
  background: #fff;
}

.erp-feedback__details > summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 10px 13px;
  color: var(--erp-blue-dark);
  font-weight: 850;
  cursor: pointer;
}

.erp-feedback__details[open] > summary {
  border-bottom: 1px solid var(--erp-line);
  background: #f8fbfe;
}

.erp-feedback__details-body {
  padding: 13px 15px;
}

.erp-feedback__details-body p {
  margin: 0 0 9px;
  line-height: 1.8;
}

.erp-feedback__recovery {
  border: 1px solid #e9d5a7;
  background: var(--erp-amber-soft);
}

.erp-feedback__recovery > p {
  color: var(--erp-amber);
  font-size: 0.78rem;
  font-weight: 900;
}

.erp-feedback__deferred-copy {
  color: var(--erp-blue-dark);
  font-weight: 750;
}

.eiken-player__feedback-title,
.eiken-player__correct-answer,
.eiken-player__answer-reason,
.eiken-player__evidence,
.eiken-player__translation {
  margin: 0 0 9px;
}

.eiken-player__feedback-title {
  color: var(--erp-ink);
  font-size: 1.05rem;
  font-weight: 850;
}

.eiken-player__choice-reasons {
  display: grid;
  gap: 8px;
  margin: 13px 0;
  padding-left: 1.25rem;
}

.eiken-player__recovery-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  color: var(--erp-blue-dark);
  font-weight: 850;
  text-underline-offset: 4px;
}

.erp-result {
  display: grid;
  gap: 18px;
}

.erp-result__hero {
  padding: clamp(18px, 4vw, 30px);
  border-radius: var(--erp-radius-md);
  background:
    radial-gradient(circle at 90% 12%, rgba(50, 165, 158, 0.2), transparent 34%),
    var(--erp-blue-soft);
}

.erp-result__hero > p {
  margin: 8px 0 0;
}

.erp-result__score {
  display: flex;
  gap: 9px;
  align-items: baseline;
}

.erp-result__score strong {
  color: var(--erp-blue-dark);
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.1;
  font-weight: 900;
}

.erp-result__score span {
  color: var(--erp-muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.erp-result__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.erp-result__breakdown {
  grid-column: 1 / -1;
  padding: 17px;
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius-md);
}

.erp-result__breakdown h4 {
  font-size: 1rem;
  font-weight: 850;
}

.erp-result__breakdown ul {
  display: grid;
  gap: 7px;
  margin: 10px 0 0;
  padding-left: 1.25rem;
}

.erp-result__exam-review {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
}

.erp-result__exam-review > h4 {
  margin: 8px 0 0;
  color: var(--erp-ink);
  font-size: 1.08rem;
  font-weight: 850;
}

.erp-result__review-item {
  min-width: 0;
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius-md);
  background: var(--erp-soft);
}

.erp-result__review-item > summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  padding: 12px 15px;
  color: var(--erp-ink);
  font-weight: 900;
  cursor: pointer;
}

.erp-result__review-item.is-correct > summary {
  color: var(--erp-green);
}

.erp-result__review-item.is-incorrect > summary {
  color: var(--erp-red);
}

.erp-result__review-item[open] > summary {
  border-bottom: 1px solid var(--erp-line);
}

.erp-result__review-body {
  padding: clamp(15px, 3vw, 20px);
}

.erp-result__review-item p,
.erp-result__review-item ul {
  margin-block: 7px 0;
}

.erp-result__review-item ul {
  display: grid;
  gap: 6px;
  padding-left: 1.25rem;
}

.erp-result__next {
  padding: 18px;
  border: 1px solid var(--erp-line);
  border-left: 4px solid var(--erp-teal);
  border-radius: var(--erp-radius-md);
}

.erp-result__next > span {
  color: var(--erp-teal);
  font-size: 0.76rem;
  font-weight: 900;
}

.erp-result__next h4 {
  margin-top: 4px;
  font-size: 1.06rem;
  font-weight: 850;
}

.erp-result__next p {
  margin: 6px 0 0;
  color: var(--erp-muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.erp-result__next .erp-action {
  margin-top: 12px;
}

.erp-result__disclaimer {
  margin: 0;
  color: var(--erp-muted);
  font-size: 0.8rem;
  font-weight: 650;
}

.erp-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.erp-preview-body {
  margin: 0;
  color: var(--erp-text);
  background:
    linear-gradient(180deg, #eef4f8 0, #f7f9fb 240px, #f7f9fb 100%);
  font-family:
    "Yu Gothic",
    "Hiragino Kaku Gothic ProN",
    Meiryo,
    system-ui,
    sans-serif;
}

.erp-preview-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 22px auto 52px;
}

.erp-preview-top {
  display: flex;
  gap: 16px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.erp-preview-top h1,
.erp-preview-top p {
  margin: 0;
}

.erp-preview-top h1 {
  margin-top: 5px;
  color: var(--erp-ink);
  font-size: clamp(1.55rem, 3.6vw, 2.25rem);
  line-height: 1.25;
  font-weight: 850;
}

.erp-preview-top p {
  margin-top: 5px;
  color: var(--erp-muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.erp-preview-kicker {
  color: var(--erp-blue-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.erp-preview-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.erp-preview-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid var(--erp-line-strong);
  border-radius: var(--erp-radius-sm);
  background: #fff;
  color: var(--erp-blue-dark);
  font-size: 0.86rem;
  font-weight: 850;
  text-decoration: none;
}

.erp-preview-nav a:hover {
  border-color: #77a5cb;
  background: var(--erp-blue-soft);
}

.erp-preview-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.erp-preview-context div {
  padding: 13px 15px;
  border: 1px solid var(--erp-line);
  border-radius: var(--erp-radius-md);
  background: rgba(255, 255, 255, 0.9);
}

.erp-preview-context span,
.erp-preview-context strong {
  display: block;
}

.erp-preview-context span {
  color: var(--erp-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.erp-preview-context strong {
  margin-top: 3px;
  color: var(--erp-ink);
  font-size: 0.9rem;
  font-weight: 900;
}

@media (max-width: 760px) {
  .erp__header {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .erp__bank-summary {
    max-width: 440px;
  }

  .erp-mode-grid,
  .erp-result__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .erp-mode--wide {
    grid-column: auto;
  }

  .erp-preview-top {
    align-items: stretch;
    flex-direction: column;
  }

  .erp-preview-context {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .erp-preview-shell {
    width: min(100% - 18px, 1180px);
    margin-top: 10px;
  }

  .erp__header,
  .erp-screen {
    border-radius: 16px;
  }

  .erp__bank-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .erp-screen__heading,
  .erp-question__progress-copy {
    align-items: stretch;
    flex-direction: column;
  }

  .erp-screen__heading .erp-action,
  .erp-result__actions .erp-action,
  .erp-preview-nav a {
    width: 100%;
  }

  .erp-mode {
    padding: 16px;
  }

  .erp-quick-start .erp-mode {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
  }

  .erp-quick-start .erp-mode__tag,
  .erp-quick-start .erp-mode h4,
  .erp-quick-start .erp-mode p,
  .erp-quick-start .erp-mode__meta,
  .erp-quick-start .erp-mode .erp-action {
    grid-column: 1;
    grid-row: auto;
  }

  .erp-quick-start .erp-mode .erp-action {
    width: 100%;
    min-width: 0;
  }

  .erp-more-modes > summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .erp-more-modes > summary small {
    grid-column: 1;
  }

  .erp-mode__fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 5px;
  }

  .erp-mode__fields select + label {
    margin-top: 5px;
  }

  .erp-question__header {
    grid-template-columns: minmax(0, 1fr);
  }

  .erp-question__header .erp-action {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .erp-progress {
    grid-column: 1;
  }

  .erp-choice {
    grid-template-columns: auto auto minmax(0, 1fr);
    padding-inline: 11px;
  }

  .erp-choice__state {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .erp-choice--number-only {
    grid-template-columns: auto minmax(44px, 1fr);
  }

  .erp-question__actions,
  .erp-question__actions .erp-action {
    width: 100%;
  }

  .erp[data-answer-state] .erp-question__body {
    padding-bottom: 96px;
  }

  .erp[data-answer-state] .erp-question__actions--next:has([data-next-question]:not([hidden])) {
    position: fixed;
    z-index: 1040;
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(8px + env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    width: auto;
    margin: 0;
    padding: 8px;
    border: 1px solid rgba(183, 202, 218, 0.92);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 32px rgba(16, 43, 69, 0.22);
    backdrop-filter: blur(10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .erp *,
  .erp *::before,
  .erp *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (forced-colors: active) {
  .erp-action,
  .erp-mode,
  .erp-choice,
  .erp-screen,
  .erp__notice {
    border: 1px solid CanvasText;
  }

  .erp-choice:has(input:checked) {
    outline: 3px solid Highlight;
  }

  .erp-choice.is-correct,
  .erp-choice.is-incorrect,
  .erp-feedback.is-correct,
  .erp-feedback.is-incorrect {
    outline: 3px solid CanvasText;
  }

  .erp-choice__state {
    border: 1px solid CanvasText;
  }
}
