.q41,
.q41-m {
  --q41-gold-ink: #7a5717;
  --q41-gold-soft: #fbf3e2;
  --q41-gold-line: #e4d2ae;
  --q41-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  color: var(--ink);
  font-family: var(--font-sans);
}

.q41 *,
.q41-m * {
  box-sizing: border-box;
}

.q41 [hidden],
.q41-m [hidden] {
  display: none !important;
}

.q41 {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 52px 64px 26px;
  background: var(--paper);
}

.q41-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.q41-heading {
  min-width: 0;
}

.q41-title {
  margin: 0;
  font-size: 40px;
  line-height: 1.32;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

.q41-sub {
  margin: 6px 0 0;
  font-size: 20px;
  line-height: 1.7;
  color: var(--muted);
}

.q41-head-meta {
  flex: 0 0 auto;
  padding-bottom: 2px;
  text-align: right;
}

.q41-state {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.q41-tag {
  margin: 4px 0 0;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--q41-gold-ink);
  white-space: nowrap;
}

.q41-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 0 12px;
}

.q41-panel {
  height: 100%;
  min-height: 0;
}

.q41-panel[hidden] {
  display: none !important;
}

.q41-b0 {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 34px;
}

.q41-pair {
  min-width: 0;
  padding: 20px 24px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.q41-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
}

.q41-panel-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q41-panel-meta {
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
}

.q41-tablewrap {
  margin-top: 10px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  scrollbar-color: var(--line) transparent;
}

.q41-log {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: fixed;
}

.q41-log-pair {
  min-width: 720px;
}

.q41-col-t {
  width: 12%;
}

.q41-col-req {
  width: 17%;
}

.q41-col-attempt {
  width: 17%;
}

.q41-col-receiver {
  width: 18%;
}

.q41-col-event {
  width: 18%;
}

.q41-col-outcome {
  width: 18%;
}

.q41-log th {
  padding: 8px 14px;
  border-bottom: 2px solid var(--line);
  background: #f2f6fa;
  text-align: left;
  vertical-align: bottom;
}

.q41-th-cn {
  display: block;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--navy);
  white-space: nowrap;
}

.q41-th-en {
  display: block;
  margin-top: 2px;
  font-family: var(--q41-mono);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--muted);
  white-space: nowrap;
}

.q41-log td {
  padding: 6px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-family: var(--q41-mono);
  font-size: 20px;
  line-height: 1.45;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.q41-log tbody tr:last-child td {
  border-bottom: 0;
}

.q41-log-pair td {
  padding: 16px 14px;
  font-size: 23px;
}

.q41-num,
.q41-req,
.q41-attempt,
.q41-receiver,
.q41-event,
.q41-outcome {
  display: inline-block;
}

.q41-attempt,
.q41-event {
  padding: 1px 10px;
  border-radius: 999px;
  background: transparent;
  transition: box-shadow 160ms ease-out, background-color 160ms ease-out;
}

.q41-attempt.is-on,
.q41-event.is-on {
  background: var(--white);
  box-shadow: 0 0 0 2px var(--gold);
}

.q41-log tr.is-on {
  background: var(--q41-gold-soft);
}

.q41-outcome.is-timeout {
  font-weight: 600;
}

.q41-table-note {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.q41-aid {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-top: 10px;
  border-top: 2px solid var(--gold);
}

.q41-aid-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.q41-aid-k {
  margin: 0;
  font-family: var(--q41-mono);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: var(--q41-gold-ink);
}

.q41-aid-title {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q41-aid-text {
  margin: 6px 0 0;
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
}

.q41-timeline {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.q41-tl-tick {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--q41-mono);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.q41-tl-tick i {
  width: 10px;
  height: 10px;
  border: 2px solid var(--gold);
  border-radius: 999px;
  background: var(--white);
}

.q41-tl-line {
  flex: 1 1 auto;
  height: 2px;
  background: var(--gold-line);
}

.q41-timeline-note {
  margin: 8px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.q41-full {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
}

.q41-logpanel {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.q41-side {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 10px;
  border-top: 2px solid var(--gold);
}

.q41-judge {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.q41-side-k {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--q41-gold-ink);
}

.q41-judge-q {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--navy);
}

.q41-field-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  margin-top: 16px;
}

.q41-field-label {
  font-size: 17px;
  line-height: 1.5;
  color: var(--muted);
}

.q41-field-line {
  display: block;
  height: 26px;
  border-bottom: 1px dashed var(--control-line);
}

.q41-side-note {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.q41-priority {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.q41-priority-head {
  min-height: 28px;
}

.q41-side-title {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 600;
  color: var(--navy);
}

.q41-pri {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.q41-pri.is-first {
  border-top-color: var(--gold);
}

.q41-pri-verdict {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--q41-gold-ink);
}

.q41-pri-verdict.is-quiet {
  color: var(--muted);
}

.q41-pri-title {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--navy);
}

.q41-pri-text {
  margin: 5px 0 0;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted);
}

.q41-gap {
  padding: 12px 14px;
  border: 2px dashed var(--q41-gold-line);
  border-radius: 12px;
  background: transparent;
}

.q41-gap-k {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--q41-gold-ink);
}

.q41-gap-title {
  margin: 4px 0 0;
  font-size: 20px;
  line-height: 1.45;
  font-weight: 600;
  color: var(--navy);
}

.q41-foot {
  flex: 0 0 auto;
  min-height: 104px;
  display: flex;
  align-items: center;
  padding-top: 12px;
  border-top: 2px solid var(--gold);
}

.q41-foot > div {
  width: 100%;
}

.q41-footline {
  margin: 0;
  font-size: 30px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

.q41-footsub {
  margin: 6px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

.q41-question {
  margin: 0;
  font-size: 34px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--navy);
}

.q41-question-sub {
  margin: 6px 0 0;
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
}

@keyframes q41-rise {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.q41-motion [data-q41-reveal].q41-in,
.q41-motion [data-q41-foot="b2"].q41-in {
  animation: q41-rise 320ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.q41.q41-m {
  position: static;
  inset: auto;
  display: block;
  height: auto;
  padding: 0;
  background: transparent;
}

.q41-m {
  min-width: 0;
}

.q41-m .q41-head {
  display: block;
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.q41-m .q41-title {
  font-size: 28px;
  line-height: 1.38;
}

.q41-m .q41-sub {
  font-size: 16px;
  line-height: 1.75;
}

.q41-m .q41-head-meta {
  margin-top: 10px;
  text-align: left;
}

.q41-m .q41-state {
  font-size: 15px;
  line-height: 1.6;
  white-space: normal;
}

.q41-m .q41-tag {
  margin-top: 2px;
  font-size: 14px;
  line-height: 1.5;
  white-space: normal;
}

.q41-m .q41-body {
  padding: 0;
}

.q41-m .q41-panel,
.q41-m .q41-b0,
.q41-m .q41-full {
  height: auto;
}

.q41-m .q41-b0 {
  display: block;
}

.q41-m .q41-pair {
  padding: 16px;
  margin-bottom: 20px;
}

.q41-m .q41-panel-head {
  display: block;
}

.q41-m .q41-panel-meta {
  display: block;
  margin-top: 4px;
  white-space: normal;
}

.q41-m .q41-tablewrap {
  margin-top: 10px;
}

.q41-m .q41-log {
  min-width: 900px;
}

.q41-m .q41-log-pair {
  min-width: 760px;
}

.q41-m .q41-aid {
  padding-top: 8px;
}

.q41-m .q41-aid-title {
  font-size: 21px;
  line-height: 1.45;
}

.q41-m .q41-aid-text {
  font-size: 16px;
  line-height: 1.7;
}

.q41-m .q41-timeline-note {
  font-size: 15px;
  line-height: 1.65;
}

.q41-m .q41-full {
  display: block;
}

.q41-m .q41-side {
  margin-top: 24px;
  padding-top: 12px;
}

.q41-m .q41-judge-q {
  font-size: 24px;
  line-height: 1.45;
}

.q41-m .q41-pri-title {
  font-size: 21px;
  line-height: 1.45;
}

.q41-m .q41-pri-text {
  font-size: 16px;
  line-height: 1.7;
}

.q41-m .q41-gap-title {
  font-size: 18px;
  line-height: 1.5;
}

.q41-m .q41-side-note {
  font-size: 15px;
  line-height: 1.7;
}

.q41-m .q41-foot {
  display: block;
  min-height: 0;
  margin-top: 24px;
  padding-top: 14px;
}

.q41-m .q41-footline {
  font-size: 22px;
  line-height: 1.55;
}

.q41-m .q41-footsub {
  font-size: 16px;
  line-height: 1.7;
}

.q41-m .q41-question {
  font-size: 24px;
  line-height: 1.45;
}

.q41-m .q41-question-sub {
  font-size: 16px;
  line-height: 1.7;
}

.q41-m-link {
  margin: 24px 0 0;
  font-size: 15px;
  line-height: 1.6;
}

.is-instant .q41 *,
.is-instant .q41-m * {
  transition: none !important;
  animation: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .q41 *,
  .q41-m * {
    transition: none !important;
    animation: none !important;
  }
}

/* Coordinator: keep prediction rows equally weighted and final sidebar above footer. */
.q41-outcome.is-timeout { font-weight: 400; }
.q41-priority { gap: 8px; }
.q41-pri, .q41-gap { padding: 10px 14px; }
.q41-priority > .q41-side-note { margin-top: 6px; }
