:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #667085;
  --line: #e5e7eb;
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --danger: #dc2626;
  --ok: #047857;
  --warn: #b45309;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.app-header {
  padding: 28px 32px;
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: white;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.app-header h1 {
  margin: 4px 0 0;
  font-size: clamp(24px, 4vw, 36px);
}

.eyebrow {
  margin: 0;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #bfdbfe;
  font-weight: 700;
  font-size: 12px;
}

.session-box {
  min-width: 220px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 16px;
  padding: 14px;
  font-size: 14px;
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px;
}

.grid {
  display: grid;
  gap: 20px;
}

.auth-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.dashboard {
  display: grid;
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}

.card h2, .card h3 {
  margin-top: 0;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-weight: 700;
  font-size: 14px;
}

input, select, textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 15px;
  background: white;
}

textarea {
  resize: vertical;
}

button {
  border: none;
  background: var(--primary);
  color: white;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 12px;
}

button:hover {
  background: var(--primary-dark);
}

button.ghost {
  background: #eef2ff;
  color: #1e3a8a;
}

button.danger {
  background: #fee2e2;
  color: var(--danger);
}

button.ok {
  background: #dcfce7;
  color: var(--ok);
}

button.mini {
  padding: 8px 10px;
  font-size: 13px;
  margin-top: 0;
}

.password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.button-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.role-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.role-nav button {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

.message {
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 18px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  white-space: pre-wrap;
}

.message.error {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.message.success {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #065f46;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  background: white;
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #f8fafc;
  font-size: 13px;
  color: #475467;
}

.pill {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 700;
  margin: 2px;
}

.pill.closed {
  background: #f3f4f6;
  color: #4b5563;
}

.pill.open {
  background: #dcfce7;
  color: #166534;
}

.pill.answered {
  background: #fef3c7;
  color: #92400e;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.three-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.option-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin: 8px 0;
  background: #fff;
}

.option-row input {
  width: auto;
  margin-top: 4px;
}

.result-box {
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  margin-top: 14px;
  white-space: pre-wrap;
}

.question-title {
  font-size: 18px;
  line-height: 1.7;
  font-weight: 700;
}

.file-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: end;
}

.ticket-detail {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 12px;
}

.comment {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
  margin: 8px 0;
}

.comment-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}


.import-progress {
  margin-top: 14px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  border-radius: 14px;
  padding: 12px;
}

.import-progress.error {
  border-color: #fecaca;
  background: #fef2f2;
}

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

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

.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--primary);
  border-radius: 999px;
  transition: width .25s ease;
}

.import-progress.error .progress-bar-fill {
  background: var(--danger);
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}


.header-actions {
  margin-top: 10px;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.question-set-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.question-set-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}

.question-set-card h3 {
  margin: 12px 0 8px;
  font-size: 20px;
}

.quiz-screen-card {
  min-height: 70vh;
}

.quiz-topbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 20px;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.quiz-controls {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 12px;
  align-items: end;
}

.quiz-only-box {
  max-width: 900px;
  margin: 0 auto;
}

.quiz-question-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.quiz-options {
  margin-top: 18px;
}

.large-option {
  padding: 16px;
  font-size: 17px;
}

.large-option input {
  transform: scale(1.25);
  margin-right: 6px;
}

.quiz-action-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.empty-quiz {
  text-align: center;
  padding: 50px 12px;
}

.contact-card {
  max-width: 900px;
  margin: 0 auto;
}

.ticket-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-top: 12px;
  background: #fff;
}

@media (max-width: 820px) {
  .quiz-topbar,
  .quiz-controls,
  .random-only-controls {
    grid-template-columns: 1fr;
  }

  .quiz-question-header {
    flex-direction: column;
  }
}


.two-factor-secret {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .08em;
  background: #f8fafc;
  border: 1px dashed #94a3b8;
  border-radius: 12px;
  padding: 12px;
  word-break: break-all;
  font-size: 16px;
}

.two-factor-steps {
  counter-reset: step;
  padding-left: 0;
  list-style: none;
}

.two-factor-steps li {
  counter-increment: step;
  margin: 10px 0;
  padding-left: 36px;
  position: relative;
}

.two-factor-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -1px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.status-box {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #f8fafc;
}


.filter-box {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fafc;
}

.filter-box h3 {
  margin: 0 0 8px;
}


.result-box.success {
  background: #ecfdf5;
  border-color: #bbf7d0;
}

.result-box.error {
  background: #fef2f2;
  border-color: #fecaca;
}


/* =========================
   Quiz Answer Highlight
========================= */

.option-row.option-correct {
  background: #ecfdf5;
  border-color: #22c55e;
  color: #065f46;
}

.option-row.option-wrong {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.option-row.option-unselected {
  opacity: .78;
}

.option-row.option-correct::after,
.option-row.option-wrong::after {
  margin-left: auto;
  flex-shrink: 0;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 700;
}

.option-row.option-correct::after {
  content: "正解";
  background: #bbf7d0;
  color: #166534;
}

.option-row.option-wrong::after {
  content: "不正解";
  background: #fecaca;
  color: #991b1b;
}


/* =========================
   One Column Card Layout
========================= */

/* 2列カード構成を廃止し、カードは常に1列で表示 */
.auth-grid,
.two-col,
.question-set-grid {
  grid-template-columns: 1fr !important;
}

/* カードを横に広げすぎず、読みやすい幅に寄せる */
.two-col > .card,
.auth-grid > .card,
.question-set-grid > .question-set-card {
  width: 100%;
}

/* 問題集カードも1列で見やすくする */
.question-set-card {
  min-height: auto;
}

/* 画面が広い場合でもフォーム内の入力欄は詰まりすぎないように調整 */
@media (min-width: 821px) {
  .two-col {
    grid-template-columns: 1fr !important;
  }

  .auth-grid {
    grid-template-columns: 1fr !important;
  }

  .question-set-grid {
    grid-template-columns: 1fr !important;
  }
}


/* =========================
   Two Factor QR Code
========================= */

.two-factor-qr {
  width: fit-content;
  max-width: 100%;
  margin: 12px 0 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #ffffff;
}

.two-factor-qr img,
.two-factor-qr canvas {
  display: block;
  max-width: 100%;
  height: auto;
}


/* =========================
   Simple Two Factor Settings
========================= */

.simple-settings-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 52px;
  align-items: start;
  max-width: 1120px;
  margin: 0 auto;
}

.settings-sidebar {
  border-right: 1px solid var(--border);
  min-height: 720px;
  padding: 8px 44px 0 0;
}

.settings-sidebar h3 {
  margin: 0 0 18px;
  font-size: 20px;
  color: var(--text);
}

.settings-sidebar nav {
  display: grid;
  gap: 8px;
}

.settings-sidebar nav span {
  display: block;
  padding: 13px 16px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 700;
}

.settings-sidebar nav span.active {
  background: #f0edff;
  color: #5b3ff2;
}

.simple-two-factor-panel {
  max-width: 760px;
  padding-top: 4px;
}

.simple-two-factor-panel h2 {
  margin: 0 0 28px;
  font-size: 30px;
  letter-spacing: .02em;
}

.simple-lead {
  margin: 0 0 28px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.8;
}

.simple-two-factor-status {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.simple-two-factor-status h3 {
  margin: 0;
  font-size: 18px;
}

.simple-toggle {
  width: 74px;
  height: 38px;
  border-radius: 999px;
  background: #5b3ff2;
  position: relative;
  flex: 0 0 auto;
}

.simple-toggle span {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .18);
}

.simple-divider {
  height: 1px;
  background: var(--border);
  margin: 34px 0;
}

.simple-setup-box {
  display: grid;
  gap: 24px;
}

.simple-qr-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 34px;
  align-items: center;
}

.simple-qr-box {
  width: 190px;
  height: 190px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: none;
  padding: 0;
}

.simple-qr-box img,
.simple-qr-box canvas {
  display: block;
  width: 180px !important;
  height: 180px !important;
}

.simple-qr-row p {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  line-height: 1.8;
}

.simple-code-input {
  width: 100%;
  min-height: 54px;
  font-size: 16px;
}

.simple-secret-details {
  color: var(--muted);
}

.simple-secret-details summary {
  cursor: pointer;
  font-weight: 700;
}

.simple-submit-button {
  width: 86px;
  min-height: 58px;
  background: #f47c52;
  border-color: #f47c52;
}

.simple-success-box {
  border: 1px solid #bbf7d0;
  background: #ecfdf5;
  color: #166534;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  font-weight: 700;
}

@media (max-width: 860px) {
  .simple-settings-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .settings-sidebar {
    min-height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0 0 18px;
  }

  .simple-qr-row {
    grid-template-columns: 1fr;
  }
}


/* =========================
   Profile Settings
========================= */

.settings-sidebar nav button {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.settings-sidebar nav button.active {
  background: #f0edff;
  color: #5b3ff2;
}

.settings-sidebar nav span {
  cursor: default;
}

.settings-sidebar nav span[onclick] {
  cursor: pointer;
}

.profile-settings-panel {
  max-width: 760px;
}

.simple-profile-form {
  display: grid;
  gap: 12px;
}

.simple-profile-form input[readonly] {
  background: #f8fafc;
  color: var(--muted);
}


/* =========================
   Password Settings
========================= */

.settings-password-row {
  align-items: center;
}

.settings-password-row input {
  min-width: 0;
}

.settings-password-row .mini {
  height: 42px;
  white-space: nowrap;
}

/* =========================
   Complete Security Utility
========================= */

.card-flat {
  box-shadow: none;
}

.mt-12 {
  margin-top: 12px;
}


/* =========================
   Manual Question Builder
========================= */

.question-builder-empty {
  padding: 20px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
}

.question-builder-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(420px, 1.2fr);
  gap: 20px;
  align-items: start;
  margin: 12px 0 28px;
}

.question-preview-panel,
.question-editor-panel {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #ffffff;
  padding: 18px;
}

.question-builder-sticky {
  position: sticky;
  top: 16px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-title-row h4 {
  margin: 0;
  font-size: 18px;
}

.preview-card {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  background: #f8fafc;
  padding: 16px;
}

.markdown-preview {
  min-height: 80px;
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.markdown-preview h3,
.markdown-preview h4,
.markdown-preview h5,
.markdown-preview p,
.markdown-preview ul,
.markdown-preview pre {
  margin-top: 0;
}

.markdown-preview ul {
  padding-left: 22px;
}

.markdown-preview code {
  padding: 2px 5px;
  border-radius: 6px;
  background: #eef2ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.markdown-preview pre {
  padding: 12px;
  border-radius: 12px;
  background: #111827;
  color: #f9fafb;
  overflow-x: auto;
}

.explanation-preview {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.question-editor-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.question-editor-section h5 {
  margin: 0 0 8px;
  font-size: 16px;
}

.question-editor-section textarea {
  min-height: 160px;
  font-family: inherit;
  line-height: 1.7;
}

.question-options-editor {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.question-option-row {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}

.option-correct-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-weight: 800;
  white-space: nowrap;
}

.option-correct-check input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.preview-options {
  display: grid;
  gap: 10px;
}

.preview-option {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
}

.preview-option.correct {
  border-color: #86efac;
  background: #f0fdf4;
}

.preview-option-letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #e0e7ff;
  color: #1d4ed8;
  font-weight: 900;
}

.preview-option.correct .preview-option-letter {
  background: #bbf7d0;
  color: #15803d;
}

.preview-option strong {
  color: #15803d;
  font-size: 13px;
}

@media (max-width: 980px) {
  .question-builder-grid {
    grid-template-columns: 1fr;
  }

  .question-builder-sticky {
    position: static;
  }

  .question-option-row {
    grid-template-columns: 1fr;
  }
}


/* =========================
   Question Builder Separate Screen
========================= */

.question-creator-page {
  max-width: 1500px;
  margin: 0 auto;
}

.question-creator-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.question-creator-header h2 {
  margin: 0 0 6px;
}

.question-creator-header .button-list {
  justify-content: flex-end;
  margin: 0;
}

.question-builder-grid-reversed {
  grid-template-columns: minmax(460px, 1.15fr) minmax(360px, 0.95fr);
}

.question-builder-grid-reversed .question-editor-panel {
  order: 1;
}

.question-builder-grid-reversed .question-preview-panel {
  order: 2;
}

.question-builder-grid-reversed textarea {
  resize: vertical;
}

@media (max-width: 980px) {
  .question-creator-header {
    display: block;
  }

  .question-creator-header .button-list {
    justify-content: flex-start;
    margin-top: 12px;
  }

  .question-builder-grid-reversed {
    grid-template-columns: 1fr;
  }

  .question-builder-grid-reversed .question-editor-panel,
  .question-builder-grid-reversed .question-preview-panel {
    order: initial;
  }
}


/* =========================
   Two Factor Login Checkbox Fix
========================= */

#trustDeviceForWeekWrap,
.trust-device-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: auto;
  max-width: 100%;
  margin: 18px 0 18px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.5;
  cursor: pointer;
}

#trustDeviceForWeekWrap input,
.trust-device-checkbox {
  width: 18px;
  height: 18px;
  min-width: 18px;
  margin: 0;
  flex: 0 0 auto;
  cursor: pointer;
}

#trustDeviceForWeekWrap span,
.trust-device-text {
  display: inline-block;
  margin: 0;
  line-height: 1.5;
}

#twoFactorLoginCard .trust-device-row {
  margin-left: 0;
}


/* =========================
   Question Builder HTML Preview
========================= */

.html-output-box {
  margin-top: 10px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.html-output-box summary {
  padding: 10px 12px;
  cursor: pointer;
  color: #1d4ed8;
  font-weight: 800;
  list-style-position: inside;
}

.html-output-box pre {
  margin: 0;
  padding: 12px;
  max-height: 220px;
  overflow: auto;
  border-top: 1px solid #dbeafe;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.question-builder-grid-reversed .question-editor-panel textarea {
  min-height: 170px;
}


/* =========================
   Markdown Preview Table
========================= */

.markdown-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 12px 0;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #ffffff;
}

.markdown-preview table {
  width: 100%;
  border-collapse: collapse;
  min-width: 420px;
  margin: 0;
  background: #ffffff;
}

.markdown-preview th,
.markdown-preview td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  vertical-align: top;
  line-height: 1.65;
}

.markdown-preview th:last-child,
.markdown-preview td:last-child {
  border-right: 0;
}

.markdown-preview tr:last-child td {
  border-bottom: 0;
}

.markdown-preview th {
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 900;
}

.markdown-preview td {
  color: var(--text);
}


/* =========================
   Question Builder Image Paste
========================= */

.editor-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 10px 0;
}

.question-option-row {
  grid-template-columns: auto minmax(180px, 1fr) auto;
}

.manual-option-text {
  min-height: 64px;
  resize: vertical;
  line-height: 1.65;
}

.option-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.markdown-image {
  display: block;
  max-width: 100%;
  max-height: 420px;
  margin: 12px 0;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #ffffff;
  object-fit: contain;
}

.preview-option-body .markdown-preview,
.quiz-option-text.markdown-preview {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.quiz-markdown {
  margin: 14px 0;
}

.large-option {
  align-items: flex-start;
}

.large-option input {
  margin-top: 8px;
}

.answer-summary-block {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

@media (max-width: 980px) {
  .question-option-row {
    grid-template-columns: 1fr;
  }

  .option-row-actions {
    justify-content: flex-start;
  }
}
