.rule-flow {
  --rule-blue: #192896;
  --rule-teal: #00766d;
  --rule-selected-bg: #f3fcfb;
  --rule-selected-shadow: #b9e4df;
  --rule-orange: #f39800;
  --rule-pink: #ed3f70;
  --rule-ink: #202a3c;
  --rule-line: #cfe1e8;
  background: #fff;
  color: var(--rule-ink);
}

.rule-flow-heading {
  margin-bottom: 22px;
}

.rule-flow-heading__eyebrow {
  margin: 0 0 5px;
  color: var(--rule-teal);
  font-weight: 800;
}

.rule-flow-heading h1 { margin: 0; font-size: clamp(1.5rem, var(--font-fluid-vw-3, 3vw), 2.375rem); }
.rule-flow-heading p { margin: 8px 0 0; }

.rule-step-nav { margin-bottom: 22px; }
.rule-step-nav ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-step-nav li { position: relative; }
.rule-step-nav li:not(:last-child)::after {
  content: "›";
  position: absolute;
  top: 50%;
  right: -18px;
  color: var(--rule-teal);
  font-size: 1.75rem;
  transform: translateY(-50%);
}

.rule-step-nav li > span,
.rule-step-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 11px 15px;
  border: 1px solid #9bd8d3;
  border-radius: 8px;
  color: var(--rule-blue);
  text-decoration: none;
}

.rule-step-nav li > span > b,
.rule-step-nav a > b {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #e9f7f6;
  color: var(--rule-teal);
}

.rule-step-nav li > span > span,
.rule-step-nav a > span { display: grid; font-size: 0.75rem; font-weight: 800; }
.rule-step-nav small { font-size: 0.9375rem; }
.rule-step-nav .is-current > span { background: var(--rule-teal); color: #fff; }
.rule-step-nav .is-current > span > b { background: #fff; color: var(--rule-teal); }

.rule-panel {
  padding: 28px;
  border: 1px solid var(--rule-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(25, 40, 150, .07);
}

.rule-completion-message {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 1.35fr) minmax(0, 1fr);
  min-height: 300px;
  margin-bottom: 22px;
  overflow: hidden;
  border: 1px solid var(--guide-rule-bg);
  border-radius: 20px;
  background: #fffaf1;
}
.rule-completion-message__figure { position: relative; min-width: 0; }
.rule-completion-message__figure img {
  position: absolute;
  bottom: 0;
  left: 50%;
  display: block;
  width: min(100%, 280px);
  height: auto;
  object-fit: contain;
  transform: translateX(-50%);
}
.rule-completion-message__copy {
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: center;
  min-width: 0;
  padding: 18px 4px;
  text-align: center;
}
.rule-completion-message__check {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--guide-rule-bg);
  color: #fff;
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
}
.rule-completion-message__copy h2 {
  margin: 0 0 12px;
  color: var(--guide-rule-bg);
  font-size: clamp(1.5rem, 2.7vw, 2.125rem);
  font-weight: 800;
  line-height: 1.35;
}
.rule-completion-message__copy h2 span {
  background: linear-gradient(transparent 76%, #fff2d8 76%);
}
.rule-completion-message__copy p { margin: 0; line-height: 1.5; }
.rule-completion-message__thanks { font-size: 1.125rem; font-weight: 700; }
.rule-completion-message__description { font-size: 1rem; font-weight: 600; }

@media (min-width: 768px) and (max-width: 1024px) {
  .rule-completion-message { grid-template-columns: minmax(0, 1fr) minmax(300px, 1.5fr) minmax(0, 1fr); min-height: 270px; }
  .rule-completion-message__copy h2 { font-size: 1.5rem; }
  .rule-completion-message__check { width: 48px; height: 48px; font-size: 2rem; }
  .rule-completion-message__thanks { font-size: 1rem; }
  .rule-completion-message__description { font-size: .875rem; }
}
@media (max-width: 767px) {
  .rule-completion-message { grid-template-columns: repeat(2, minmax(0, 1fr)); min-height: 0; }
  .rule-completion-message__copy { grid-column: 1 / -1; grid-row: 1; padding: 20px 12px 0; }
  .rule-completion-message__copy h2 { font-size: clamp(1.375rem, 5.5vw, 1.75rem); }
  .rule-completion-message__check { width: 48px; height: 48px; font-size: 2rem; }
  .rule-completion-message__thanks { font-size: 1rem; }
  .rule-completion-message__description { font-size: .875rem; }
  .rule-completion-message__figure { grid-row: 2; height: 135px; }
  .rule-completion-message__figure--left { grid-column: 1; }
  .rule-completion-message__figure--right { grid-column: 2; }
  .rule-completion-message__figure img { bottom: 0; width: min(100%, 150px); }
}

.rule-panel--step-one {
  padding: 12px 20px 26px;
  overflow: hidden;
}

.rule-question-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
}

.rule-question-row + .rule-question-row {
  border-top: 1px solid #e5eef1;
  padding-top: 10px;
  margin-top: 10px;
}

.rule-question-index {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  padding: 22px 8px;
  background: linear-gradient(135deg, #eefafa 0%, #e3f5f3 100%);
  color: #1199aa;
  font-weight: 800;
}

.rule-question-index span {
  font-size: 0.8125rem;
  letter-spacing: .02em;
}

.rule-question-index strong {
  font-size: 2.25rem;
  line-height: 1.15;
}

.rule-panel--step-one .rule-question {
  margin: 0;
  padding: 16px 0 20px;
}

.rule-question { margin: 0 0 30px; padding: 0; border: 0; }
.rule-question legend,
.rule-editor > h2,
.rule-parent-rules > h2,
.rule-confirm section > h2 {
  width: 100%;
  margin: 0 0 16px;
  font-size: 1.25rem;
  font-weight: 800;
}

.rule-question legend > b,
.rule-editor > h2 > b,
.rule-parent-rules > h2 > b,
.rule-confirm section > h2 > b,
.rule-talk-card h3 > b {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--rule-teal);
  color: #fff;
}

.rule-question legend em,
.rule-talk-card h3 em {
  margin-left: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #fff0f4;
  color: #cf1348;
  font-size: 0.6875rem;
  font-style: normal;
}

.rule-question legend small { margin-left: 8px; font-weight: 500;}
.rule-choice-grid { display: grid; gap: 14px; }
.rule-choice-grid--device { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rule-choice-grid label,
.rule-theme-grid label,
.rule-count-grid label { cursor: pointer; }
.rule-choice-grid input,
.rule-theme-grid input,
.rule-count-grid input { position: absolute; opacity: 0; pointer-events: none; }
.rule-choice-grid label > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 76px;
  border: 2px solid #d7e3e9;
  border-radius: 10px;
  background: #fff;
  transition: .2s ease;
}
.rule-choice-grid label > span i { font-size: 1.625rem; color: #bac9d0; font-style: normal; }
.rule-choice-grid input:checked + span { border-color: var(--rule-teal); background: var(--rule-selected-bg); box-shadow: 0 4px 0 var(--rule-selected-shadow); }
.rule-choice-grid input:checked + span i { color: var(--rule-teal); }

.rule-panel--step-one .rule-choice-grid--device label > span {
  min-height: 104px;
  padding: 8px 20px;
}

.rule-panel--step-one .rule-choice-grid--device img {
  width: clamp(130px, 17vw, 205px);
  height: 88px;
  object-fit: contain;
}

.rule-panel--step-one .rule-choice-grid--device i {
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  border: 3px solid #cbdde4;
  border-radius: 50%;
  background: #fff;
}

.rule-panel--step-one .rule-choice-grid--device input:checked + span i {
  border: 7px solid var(--rule-teal);
}

.rule-panel--step-one .rule-choice-grid--device strong {
  font-size: 1.0625rem;
}

.rule-theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rule-theme-grid label > span {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 118px;
  padding: 14px 8px;
  border: 2px solid #d7e3e9;
  border-radius: 12px;
  text-align: center;
  transition: .2s ease;
}
.rule-theme-grid label > span::after { content: "✓"; position: absolute; top: 7px; right: 9px; color: transparent; font-weight: 900; }
.rule-theme-grid i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #eaf8f7; color: var(--rule-teal); font-size: 1.5rem; font-style: normal; }
.rule-theme-grid strong { font-size: 0.875rem; }
.rule-theme-grid input:checked + span { border-color: var(--rule-teal); background: var(--rule-selected-bg); transform: translateY(-2px); box-shadow: 0 4px 0 var(--rule-selected-shadow); }
.rule-theme-grid input:checked + span::after { color: var(--rule-teal); }

.rule-panel--step-one .rule-theme-grid label > span {
  min-height: 138px;
  padding: 8px;
}

.rule-panel--step-one .rule-theme-grid img {
  width: 86px;
  height: 86px;
  object-fit: contain;
}

.rule-panel--step-one .rule-theme-grid strong {
  line-height: 1.35;
}

.rule-error { min-height: 20px; margin: 8px 0 0; color: #d92f56; font-weight: 700; }
.rule-talk-card textarea[aria-invalid="true"],
.rule-high-remote textarea[aria-invalid="true"] { border-color: #a31818; }
.rule-talk-card [data-talk-field-error],
.rule-high-remote [data-high-remote-concern-error],
.rule-high-remote [data-high-remote-request-error] { color: #a31818; }
.rule-error__recovery { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 8px; }
.rule-error__recovery button { padding: 0; border: 0; background: none; color: #175a8d; font: inherit; text-decoration: underline; cursor: pointer; }
.rule-members { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.rule-members label > .rule-member-card,
.rule-member-add {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 84px;
  padding: 10px 14px;
  border: 1px solid var(--rule-line);
  border-radius: 10px;
  background: #fff;
}
.rule-members label { position: relative; cursor: pointer; }
.rule-members .rule-member-checkbox-mark {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  margin: 0;
  cursor: pointer;
}
.rule-members img { width: 48px; height: 48px; object-fit: contain; }
.rule-members span { flex-wrap: wrap; }
.rule-members span small { flex-basis: calc(100% - 60px); margin-left: 60px; font-size: 0.6875rem; }
.rule-member-add { justify-content: center; color: var(--rule-blue); font: inherit; font-weight: 700; cursor: pointer; }
.rule-member-add b { font-size: 1.75rem; color: var(--rule-teal); }
.rule-sub-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.rule-sub-actions button { display: flex; justify-content: space-between; padding: 14px 18px; border: 0; border-radius: 8px; background: #f4f9fa; color: var(--rule-blue); font: inherit; font-weight: 700; cursor: pointer; }

.rule-panel--step-one .rule-member-picker > p {
  margin: -8px 0 14px;
}

.rule-panel--step-one .rule-member-picker .rule-member-picker__heading {
  margin: 0 0 8px;
  color: var(--rule-teal);
  font-size: 0.875rem;
  font-weight: 800;
}

.rule-panel--step-one .rule-members {
  margin-top: 0;
}

.rule-panel--step-one .rule-members label > .rule-member-card,
.rule-panel--step-one .rule-member-add {
  min-height: 92px;
  padding: 10px 18px;
}

.rule-panel--step-one .rule-members label > .rule-member-card {
  flex-wrap: nowrap;
}

.rule-panel--step-one .rule-members img {
  width: 66px;
  height: 66px;
}

.rule-panel--step-one .rule-member-copy {
  display: grid;
  gap: 5px;
}

.rule-panel--step-one .rule-member-copy b {
  font-size: 1.0625rem;
}

.rule-panel--step-one .rule-members .rule-member-copy small {
  flex-basis: auto;
  margin-left: 0;
  color: #394554;
}

/* Match the selected state used by QUESTION02. */
.rule-panel--step-one .rule-members input:checked ~ .rule-member-card {
  color: var(--rule-ink);
  background: var(--rule-selected-bg);
  border-color: var(--rule-teal);
  box-shadow: 0 4px 0 var(--rule-selected-shadow);
}

.rule-panel--step-one .rule-members input:checked ~ .rule-member-card .rule-member-copy small {
  color: #394554;
}

.rule-panel--step-one .rule-member-add {
  border: 2px dashed #a9d8dc;
  color: var(--rule-teal);
  font-size: 1rem;
}

.rule-panel--step-one .rule-member-add b {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 2px solid var(--rule-teal);
  border-radius: 50%;
  font-size: 1.75rem;
  line-height: 1;
}

.rule-panel--step-one .rule-members label.is-new-member {
  animation: rule-member-added .35s ease-out both;
}

@keyframes rule-member-added {
  from {
    opacity: 0;
    transform: translateY(8px) scale(.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.rule-panel--step-one .rule-sub-actions button {
  align-items: center;
  gap: 15px;
  min-height: 100px;
  padding: 12px 20px;
  border: 1px solid #d7e5ea;
  background: #fff;
  color: var(--rule-ink);
  text-align: left;
}

.rule-panel--step-one .rule-sub-actions img {
  flex: 0 0 auto;
  width: 90px;
  height: 70px;
  object-fit: contain;
}

.rule-panel--step-one .rule-sub-actions button > span {
  display: grid;
  gap: 4px;
  flex: 1 1 auto;
}

.rule-panel--step-one .rule-sub-actions b {
  font-size: 1.0625rem;
}

.rule-panel--step-one .rule-sub-actions small {
  color: #46515f;
  font-size: 0.75rem;
  font-weight: 500;
}

.rule-panel--step-one .rule-sub-actions i {
  color: #0759d5;
  font-size: 2.125rem;
  font-style: normal;
  font-weight: 400;
}

.rule-actions { display: flex; justify-content: center; gap: 18px; margin-top: 26px; }
.rule-button,
.rule-inline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 28px;
  border: 2px solid var(--rule-teal);
  border-radius: 999px;
  background: #fff;
  color: var(--rule-ink);
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.rule-button--next { min-width: 310px; background: var(--rule-teal); color: #fff; }
.rule-button--back { border-color: #c4d2d8; }
.rule-notice { margin-bottom: 20px; padding: 15px 20px; border-left: 5px solid var(--rule-orange); background: #fff8e7; }

.rule-talk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; align-items: start; }
.rule-theme-tabs { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 5px; }
.rule-theme-tabs button { flex: 0 0 auto; padding: 8px 14px; border: 1px solid var(--rule-teal); border-radius: 999px; background: #fff; color: var(--rule-teal); font: inherit; font-weight: 700; cursor: pointer; }
.rule-theme-tabs button.is-active { background: var(--rule-teal); color: #fff; }
.rule-talk > h2 { margin: 0 0 18px; color: var(--rule-blue); }
.rule-talk-card { position: relative; margin: 0 0 16px; padding: 18px; border: 1px solid var(--rule-line); border-radius: 12px; background: #fbfefd; }
.rule-talk-card h3 { margin: 0 0 10px; font-size: 1.125rem; }
.rule-talk-card p { margin: 0 0 12px; }
.rule-talk-card__people { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rule-talk-card__people img { width: 42px; height: 42px; object-fit: contain; }
.rule-talk-card textarea,
.rule-confirm textarea { width: 100%; min-height: 92px; padding: 12px; border: 1px solid #b9cdd4; border-radius: 8px; resize: vertical; font: inherit; }
.rule-talk-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 700; }
.rule-talk-check input { width: 20px; height: 20px; accent-color: var(--rule-teal); }
.rule-guide { padding: 20px; border-radius: 12px; background: #f3f5f6; }
.rule-guide h2 { margin: 0 0 18px; color: var(--rule-blue); font-size: 1.125rem; }
.rule-guide h3 { margin: 18px 0 8px; color: var(--rule-teal); font-size: 0.9375rem; }
.rule-guide ul { padding-left: 20px; }

.rule-count-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rule-count-grid label > span { display: grid; place-items: center; min-height: 190px; padding: 16px; border: 2px solid #d6e2e7; border-radius: 12px; text-align: center; transition: .2s; }
.rule-count-grid img { width: 105px; height: 80px; object-fit: contain; }
.rule-count-grid strong { color: var(--rule-blue); font-size: 1.125rem; }
.rule-count-grid strong small { color: var(--rule-teal); }
.rule-count-grid label > span > small { max-width: 190px; }
.rule-count-grid input:checked + span { border-color: var(--rule-teal); background: var(--rule-selected-bg); box-shadow: 0 5px 0 var(--rule-selected-shadow); }
.rule-editor { margin-top: 30px; }
.rule-theme-rules { margin: 0 0 24px; padding: 18px; border: 1px solid var(--rule-line); border-radius: 12px; }
.rule-theme-rules h3 { margin: 0 0 8px; color: var(--rule-blue); }
.rule-agreement { margin: 0 0 13px; padding: 10px 13px; background: #f3f9fb; font-size: 0.8125rem; }
.rule-template-tabs { display: flex; gap: 7px; margin-bottom: 10px; }
.rule-template-tabs button { padding: 7px 15px; border: 1px solid var(--rule-teal); border-radius: 999px; background: #fff; color: var(--rule-teal); font: inherit; cursor: pointer; }
.rule-template-tabs button.is-active { background: var(--rule-teal); color: #fff; }
.rule-table { width: 100%; border-collapse: collapse; }
.rule-table th,
.rule-table td { padding: 9px; border-bottom: 1px solid #e1eaee; text-align: left; }
.rule-table th:first-child,
.rule-table td:first-child { width: 96px; text-align: center; }
.rule-table__person { width: 118px; text-align: center; }
.rule-checkbox-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.rule-checkbox-mark {
  position: relative;
  box-sizing: border-box;
  display: inline-block;
  flex: 0 0 21px;
  width: 21px;
  height: 21px;
  margin: 0;
  border: 2px solid #526273;
  border-radius: 4px;
  background-color: #fff;
  vertical-align: middle;
  cursor: pointer;
}
.rule-checkbox-mark::after {
  content: "";
  display: none;
  position: absolute;
  left: 6px;
  top: 2px;
  box-sizing: border-box;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.rule-checkbox-input:checked + .rule-checkbox-mark {
  border-color: var(--rule-teal);
  background-color: var(--rule-teal);
}
.rule-checkbox-input:checked + .rule-checkbox-mark::after { display: block; }
.rule-checkbox-input:focus-visible + .rule-checkbox-mark {
  outline: 3px solid var(--rule-blue);
  outline-offset: 3px;
}
.rule-checkbox-input:disabled + .rule-checkbox-mark {
  cursor: not-allowed;
  opacity: .55;
}
.rule-table__checkbox { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
@media (forced-colors: active) {
  .rule-checkbox-input:checked + .rule-checkbox-mark { border-color: Highlight; background: Highlight; }
  .rule-checkbox-input:checked + .rule-checkbox-mark::after { border-color: HighlightText; }
}
.rule-table-scroll { overflow-x: auto; }
.rule-table-scroll .rule-table { min-width: 690px; }
.rule-table__importance span {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  background: #ffe7ee;
  color: #cf1348;
  font-size: 0.6875rem;
  font-weight: 800;
  white-space: nowrap;
}
.rule-table__copy { display: grid; grid-template-columns: minmax(0, 1fr) 36px; gap: 6px; align-items: center; }
.rule-edit-copy { width: 100%; min-height: 52px; padding: 7px 9px; overflow-y: hidden; border: 1px solid transparent; border-radius: 5px; background: transparent; font: inherit; line-height: 1.5; resize: none; }
.rule-edit-copy.is-editing { border-color: var(--rule-teal); background: #fff; }
.rule-edit-button { padding: 5px; border: 0; background: none; color: var(--rule-blue); font-size: 1.125rem; cursor: pointer; }
.rule-add-row { margin-top: 10px; border: 0; background: none; color: var(--rule-teal); font: inherit; font-weight: 800; cursor: pointer; }
.rule-parent-rules { margin-top: 30px; padding: 22px; border-radius: 12px; background: #effafa; }
.rule-parent-rules__toggle { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; cursor: pointer; }
.rule-parent-rules__toggle + p { margin: 10px 0 0; }
.rule-parent-theme-picker { margin-top: 18px; }
.rule-parent-theme-picker > p { margin: 0 0 8px; color: var(--rule-teal); font-weight: 800; }
.rule-parent-theme-picker > div { display: flex; flex-wrap: wrap; gap: 8px; }
.rule-parent-theme-picker label { display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border: 1px solid #9bd8d3; border-radius: 999px; background: #fff; font-weight: 700; cursor: pointer; }
.rule-parent-details { display: grid; gap: 14px; margin-top: 18px; }
.rule-parent-theme { overflow: hidden; border: 1px solid #b8e1de; border-radius: 10px; background: #fff; }
.rule-parent-theme h3 { margin: 0; padding: 10px 14px; color: var(--rule-blue); font-size: 1rem; }
.rule-parent-table { width: 100%; min-width: 520px; border-collapse: collapse; }
.rule-parent-table th,
.rule-parent-table td { padding: 10px 12px; border-top: 1px solid #e1eaee; text-align: left; }
.rule-parent-table th:first-child,
.rule-parent-table td:first-child { width: 96px; text-align: center; }
.rule-parent-table .rule-table__person { text-align: center; }
.rule-parent-empty { margin: 0; padding: 14px; border-top: 1px solid #e1eaee; color: #53606b; }

.rule-confirm > section { padding: 0 0 32px; margin-bottom: 30px; border-bottom: 1px solid var(--rule-line); }
.rule-final-list { display: grid; gap: 16px; margin-bottom: 18px; }
.rule-final-list article { padding: 16px; border: 1px solid var(--rule-line); border-radius: 10px; }
.rule-final-list h3 { margin: 0 0 10px; color: var(--rule-blue); }
.rule-final-list ul { display: grid; gap: 8px; margin: 0; padding-left: 24px; }
.rule-final-table-scroll { overflow-x: auto; }
.rule-final-table { width: 100%; min-width: 700px; border-collapse: collapse; }
.rule-final-table th,
.rule-final-table td { padding: 11px 12px; border: 1px solid #dce7eb; }
.rule-final-table th { color: var(--rule-blue); background: #f3f8fa; font-size: 0.8125rem; }
.rule-final-table th:first-child,
.rule-final-table td:first-child { width: auto; text-align: left; }
.rule-final-table th:not(:first-child),
.rule-final-table td:not(:first-child) { width: 112px; text-align: center; }
.rule-final-check {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: #fff;
  background: var(--rule-teal);
  border-radius: 5px;
  font-weight: 900;
}
.rule-final-empty { color: #78858d; font-weight: 800; }
.rule-final-empty-message { margin: 0; padding: 12px; color: #53606b; background: #f7fafb; border-radius: 7px; }
.rule-penalty-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.rule-penalty-grid label { display: grid; place-items: center; min-height: 100px; padding: 15px; border: 1px solid var(--rule-line); border-radius: 10px; text-align: center; }
.rule-confirm textarea { margin-bottom: 14px; }
.rule-declarations { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.rule-declarations article { padding: 20px; border: 1px solid #a8ded9; border-radius: 12px; background: #f3fcfb; }
.rule-declarations h3 { margin: 0 0 12px; color: var(--rule-teal); text-align: center; }
.rule-declarations li { margin-bottom: 8px; }
.rule-output-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 680px; margin: 22px auto 0; }
.rule-output-grid button { min-height: 46px; border: 0; border-radius: 8px; background: var(--rule-teal); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.rule-calendar { padding: 22px; border-radius: 12px; background: #fff8e7; }
.rule-calendar h3 { margin: 0 0 5px; }
.rule-calendar > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rule-calendar button { min-height: 60px; border: 1px solid var(--rule-teal); border-radius: 8px; background: #fff; color: var(--rule-blue); font: inherit; font-weight: 700; cursor: pointer; }
.rule-toast { position: fixed; left: 50%; bottom: 28px; z-index: 100; max-width: calc(100% - 40px); padding: 13px 22px; border-radius: 999px; background: #17364a; color: #fff; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: .25s; }
.rule-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.rule-related { padding: 68px 20px; background-color: #fff; background-image: linear-gradient(#eff5f6 1px, transparent 1px), linear-gradient(90deg, #eff5f6 1px, transparent 1px); background-size: 24px 24px; }
.rule-related .section-heading { margin-bottom: 28px; text-align: center; }
.rule-related .section-heading h2 span { color: var(--rule-orange); }
.rule-flow .guide-card--learning > .guide-card__copy > h3 { color: #117b6c; }

/* 小学校高学年・中学生向けフローの見出しとステップ表示。 */
.rule-flow--high .rule-flow-heading__eyebrow {
  color: #06827b;
}

.rule-flow--high .rule-step-nav li:not(:last-child)::after {
  color: #078d85;
}

.rule-high-talk {
  position: relative;
}

.rule-high-method,
.rule-high-entry,
.rule-high-review {
  padding: 28px;
  border: 1px solid var(--rule-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 28px rgb(25 40 150 / 7%);
}

.rule-high-method h2,
.rule-high-entry > h2,
.rule-high-review > h2,
.rule-high-remote > h2 {
  margin: 0 0 8px;
  color: var(--rule-blue);
}

.rule-high-entry > h2,
.rule-high-remote > h2,
.rule-high-review-theme > h3 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rule-high-entry > h2 img,
.rule-high-remote > h2 img,
.rule-high-review-theme > h3 img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.rule-high-method__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 24px;
}

.rule-high-method__grid button {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  min-height: 180px;
  padding: 20px;
  align-items: center;
  border: 1px solid #a5dcd7;
  border-radius: 12px;
  background: #f6fcfb;
  color: var(--rule-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.rule-high-method__grid button:hover,
.rule-high-method__grid button:focus-visible {
  border-color: var(--rule-teal);
  box-shadow: 0 6px 18px rgb(0 118 109 / 14%);
  transform: translateY(-2px);
}

.rule-high-method__grid img {
  width: 150px;
  height: 120px;
  object-fit: contain;
}

.rule-high-method__grid span,
.rule-high-method__grid b,
.rule-high-method__grid small {
  display: block;
}

.rule-high-method__grid b {
  margin-bottom: 8px;
  color: var(--rule-blue);
  font-size: 1.25rem;
}

.rule-high-method__grid small {
  line-height: 1.7;
}

.rule-high-entry__intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--rule-line);
}

.rule-high-entry__intro h2 {
  margin: 0 0 8px;
  color: var(--rule-blue);
}

.rule-high-entry__intro p {
  margin: 0;
}

.rule-high-qr-launch {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 12px;
  width: min(100%, 360px);
  padding: 12px 16px;
  align-items: center;
  border: 2px solid var(--rule-teal);
  border-radius: 12px;
  background: #f6fcfb;
  color: var(--rule-ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .2s, box-shadow .2s, transform .2s;
}

.rule-high-qr-launch:hover,
.rule-high-qr-launch:focus-visible {
  background: #e8f8f6;
  box-shadow: 0 6px 18px rgb(0 118 109 / 14%);
  transform: translateY(-2px);
}

.rule-high-qr-launch img {
  width: 68px;
  height: 68px;
  object-fit: contain;
}

.rule-high-qr-launch span,
.rule-high-qr-launch b,
.rule-high-qr-launch small {
  display: block;
}

.rule-high-qr-launch b {
  margin-bottom: 4px;
  color: var(--rule-blue);
  font-size: 1.125rem;
}

.rule-high-qr-launch small {
  line-height: 1.5;
}

.rule-high-progress {
  margin: 14px 0 6px;
  color: var(--rule-teal);
  font-weight: 800;
  text-align: right;
}

.rule-high-opinions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.rule-high-opinions article {
  padding: 20px;
  border: 1px solid #cfe1e8;
  border-radius: 12px;
  background: #fbfefd;
}

.rule-high-opinions article:first-child {
  border-top: 6px solid var(--rule-teal);
}

.rule-high-opinions article:last-child {
  border-top: 6px solid var(--rule-pink);
}

.rule-high-opinions h3 {
  margin: 0 0 14px;
  color: var(--rule-blue);
}

.rule-high-opinions label,
.rule-high-remote > label,
.rule-high-discussion {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  font-weight: 800;
}

.rule-high-opinions textarea,
.rule-high-remote textarea,
.rule-high-discussion textarea {
  min-height: 112px;
  font-weight: 400;
}

.rule-high-tip {
  margin: 18px 0 0;
  padding: 13px 16px;
  border-radius: 8px;
  background: #fff8dc;
}

.rule-high-review-theme {
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--rule-line);
  border-radius: 12px;
}

.rule-high-review-theme > h3 {
  margin: 0;
  padding: 12px 16px;
  background: #eaf8f7;
  color: var(--rule-blue);
}

.rule-high-review-theme > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rule-high-review-theme article {
  padding: 18px;
}

.rule-high-review-theme article + article {
  border-left: 1px solid var(--rule-line);
}

.rule-high-review-theme h4 {
  margin: 0 0 12px;
  color: var(--rule-teal);
}

.rule-high-review-theme article + article h4 {
  color: #bd2854;
}

.rule-high-review-theme dl,
.rule-high-review-theme dd {
  margin: 0;
}

.rule-high-review-theme dt {
  margin-top: 12px;
  color: #52616c;
  font-size: 0.8125rem;
  font-weight: 800;
}

.rule-high-review-theme dd {
  min-height: 48px;
  margin-top: 4px;
  padding: 10px;
  border-radius: 7px;
  background: #f7fafb;
  white-space: pre-wrap;
}

.rule-high-review--single > h2 {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rule-high-review--single > h2 img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.rule-high-reflect {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding: 18px 20px;
  border: 1px solid #b9d9e8;
  border-radius: 12px;
  background: #f4fbff;
}

.rule-high-reflect h3,
.rule-high-reflect p,
.rule-high-requirement p {
  margin: 0;
}

.rule-high-reflect h3 {
  margin-bottom: 5px;
  color: var(--rule-blue);
}

.rule-high-refresh-status {
  min-height: 1.6em;
  margin: 7px 0 0;
  color: #52616c;
  font-size: 0.875rem;
  text-align: right;
}

.rule-high-requirement {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #efcf83;
  border-radius: 10px;
  background: #fff8e8;
}

.rule-high-requirement > span {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #f0a900;
  color: #fff;
  font-weight: 900;
}

.rule-high-requirement strong {
  display: block;
  margin-bottom: 5px;
  color: #7a4c00;
}

.rule-high-register-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.rule-high-register-actions button,
.rule-high-register-actions a {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  min-height: 128px;
  padding: 16px;
  align-items: center;
  border: 1px solid #a5dcd7;
  border-radius: 12px;
  background: #f6fcfb;
  color: var(--rule-ink);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.rule-high-register-actions button:hover,
.rule-high-register-actions button:focus-visible,
.rule-high-register-actions a:hover,
.rule-high-register-actions a:focus-visible {
  border-color: var(--rule-teal);
  box-shadow: 0 6px 18px rgb(0 118 109 / 14%);
}

.rule-high-register-actions img {
  width: 92px;
  height: 88px;
  object-fit: contain;
}

.rule-high-register-actions span,
.rule-high-register-actions b,
.rule-high-register-actions small {
  display: block;
}

.rule-high-register-actions b {
  margin-bottom: 6px;
  color: var(--rule-blue);
  font-size: 1.125rem;
}

.rule-high-register-actions small {
  line-height: 1.6;
}

.rule-high-review-theme--current {
  margin-top: 18px;
}

.rule-high-empty-answer {
  display: grid;
  min-height: 155px;
  place-items: center;
  align-content: center;
  color: #7a8790;
  text-align: center;
}

.rule-high-empty-answer span {
  color: #aeb9bf;
  font-size: 2.125rem;
}

.rule-high-empty-answer p {
  margin: 8px 0 0;
}

.rule-high-qr-dialog {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(14 28 46 / 65%);
}

.rule-high-qr-dialog[hidden] {
  display: none;
}

.rule-high-qr-dialog > div {
  position: relative;
  width: min(520px, 100%);
  padding: 28px;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.rule-high-qr-dialog h2 {
  margin: 0 32px 18px;
  color: var(--rule-blue);
}

.rule-high-qr-dialog__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--rule-blue);
  font-size: 1.875rem;
  cursor: pointer;
}

.rule-high-qr-placeholder {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  margin: 0 auto 16px;
  border: 14px solid #fff;
  outline: 2px solid var(--rule-blue);
  background: repeating-conic-gradient(#172a85 0 25%, #fff 0 50%) 0 / 22px 22px;
}

.rule-high-qr-placeholder span {
  padding: 9px;
  background: #fff;
  color: var(--rule-blue);
  font-size: 1.375rem;
  font-weight: 900;
}

.rule-high-qr-image {
  display: block;
  width: 197px;
  height: 197px;
  margin: 0 auto 16px;
  padding: 4px;
  border: 2px solid var(--rule-blue);
  background: #fff;
  object-fit: contain;
}

.rule-high-qr-dialog a {
  display: inline-flex;
  min-height: 46px;
  margin: 5px 0 12px;
  padding: 0 28px;
  align-items: center;
  border-radius: 999px;
  background: var(--rule-teal);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.rule-high-qr-dialog small {
  display: block;
  color: #64717a;
}

.rule-high-remote__user,
.rule-high-remote__complete {
  padding: 15px 18px;
  border-radius: 8px;
  background: #eef8fb;
}

.rule-high-remote__complete {
  margin-top: 22px;
  border: 1px solid #8ed2cc;
  color: #006b63;
  font-weight: 800;
}

.rule-flow--high .rule-theme-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rule-flow--high .rule-theme-grid label > span {
  min-height: 150px;
}

@media (max-width: 900px) {
  .rule-theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-talk-layout { grid-template-columns: 1fr; }
  .rule-guide { order: -1; }
  .rule-penalty-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-panel--step-one .rule-choice-grid--device label > span { gap: 10px; padding-inline: 10px; }
  .rule-panel--step-one .rule-choice-grid--device img { width: 125px; }
  .rule-panel--step-one .rule-members { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-panel--step-one .rule-member-add { grid-column: 1 / -1; }
  .rule-high-method__grid button { grid-template-columns: 110px minmax(0, 1fr); }
  .rule-high-method__grid img { width: 110px; }
}

@media (max-width: 767px) {
  .rule-step-nav ol { gap: 5px; }
  .rule-step-nav li:not(:last-child)::after { display: none; }
  .rule-step-nav li > span,
  .rule-step-nav a { display: grid; place-items: center; gap: 3px; min-height: 74px; padding: 7px 3px; text-align: center; }
  .rule-step-nav li > span > b,
  .rule-step-nav a > b { width: 28px; height: 28px; }
  .rule-step-nav li > span > span,
  .rule-step-nav a > span { font-size: 0.5625rem; }
  .rule-step-nav small { font-size: 0.625rem; }
  .rule-panel { padding: 18px 14px; }
  .rule-panel--step-one { padding: 0 12px 20px; }
  .rule-question-row { grid-template-columns: 66px minmax(0, 1fr); gap: 10px; }
  .rule-question-index { padding: 19px 4px; }
  .rule-question-index span { font-size: 0.5625rem; }
  .rule-question-index strong { font-size: 1.6875rem; }
  .rule-choice-grid--device,
  .rule-count-grid,
  .rule-members,
  .rule-sub-actions,
  .rule-declarations,
  .rule-output-grid { grid-template-columns: 1fr; }
  .rule-count-grid label > span {
    min-height: 86px;
    padding: 9px 12px;
    grid-template-columns: minmax(64px, 25%) minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    justify-items: start;
    column-gap: 14px;
    text-align: left;
  }
  .rule-count-grid img {
    width: 100%;
    height: 64px;
    grid-column: 1;
    grid-row: 1 / 3;
  }
  .rule-count-grid strong {
    align-self: end;
    grid-column: 2;
    grid-row: 1;
    font-size: 1rem;
    line-height: 1.25;
  }
  .rule-count-grid label > span > small {
    align-self: start;
    grid-column: 2;
    grid-row: 2;
    font-size: 0.6875rem;
    line-height: 1.4;
  }
  .rule-actions { flex-direction: column-reverse; }
  .rule-button { width: 100%; min-width: 0; }
  .rule-table { font-size: 0.8125rem; }
  .rule-table th,
  .rule-table td { padding: 7px 4px; }
  .rule-table-scroll { overflow: visible; }
  .rule-table-scroll .rule-table,
  .rule-parent-table { min-width: 0; }
  .rule-table thead,
  .rule-parent-table thead { display: none; }
  .rule-table tbody,
  .rule-parent-table tbody {
    display: grid;
    gap: 12px;
  }
  .rule-table tr,
  .rule-parent-table tr {
    display: grid;
    padding: 12px;
    border: 1px solid var(--rule-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 3px 10px rgb(25 40 150 / 6%);
  }
  .rule-table td,
  .rule-parent-table td {
    display: flex;
    width: auto;
    padding: 7px 0;
    align-items: center;
    border: 0;
    text-align: left;
  }
  .rule-table td:first-child,
  .rule-parent-table td:first-child {
    width: auto;
    padding-top: 0;
    text-align: left;
  }
  .rule-table__importance:empty { display: none; }
  .rule-table__content {
    line-height: 1.65;
  }
  .rule-table__copy {
    width: 100%;
  }
  .rule-table__person {
    width: auto;
    justify-content: space-between;
    border-top: 1px solid #e7eef1;
    text-align: left;
  }
  .rule-table__person::before {
    content: attr(data-label);
    font-weight: 800;
  }
  .rule-table .rule-checkbox-mark,
  .rule-parent-table .rule-checkbox-mark {
    width: 24px;
    height: 24px;
    margin: 0;
  }
  .rule-parent-theme {
    overflow: visible;
    border: 0;
  }
  .rule-parent-theme h3 {
    padding-inline: 0;
  }
  .rule-parent-empty {
    border: 1px solid var(--rule-line);
    border-radius: 8px;
    background: #fff;
  }
  .rule-final-list,
  .rule-final-list article,
  .rule-final-table-scroll {
    min-width: 0;
    max-width: 100%;
  }
  .rule-final-table-scroll { overflow: visible; }
  .rule-final-table {
    display: block;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }
  .rule-final-table thead { display: none; }
  .rule-final-table tbody {
    display: grid;
    width: 100%;
    gap: 12px;
  }
  .rule-final-table tr {
    display: grid;
    padding: 11px 12px;
    border: 1px solid var(--rule-line);
    border-radius: 9px;
    background: #fff;
    overflow-wrap: anywhere;
  }
  .rule-final-table td,
  .rule-final-table td:first-child,
  .rule-final-table td:not(:first-child) {
    display: flex;
    width: auto;
    padding: 8px 0;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-top: 1px solid #e7eef1;
    text-align: left;
  }
  .rule-final-table td:first-child {
    display: block;
    padding-top: 0;
    border-top: 0;
    line-height: 1.65;
  }
  .rule-final-table td:not(:first-child)::before {
    content: attr(data-label);
    font-weight: 800;
  }
  .rule-calendar > div { grid-template-columns: 1fr; }
  .rule-panel--step-one .rule-choice-grid--device label > span { flex-wrap: wrap; }
  .rule-panel--step-one .rule-choice-grid--device img { width: 180px; max-width: 100%; }
  .rule-panel--step-one .rule-theme-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rule-panel--step-one .rule-theme-grid img { width: 72px; height: 72px; }
  .rule-panel--step-one .rule-members,
  .rule-panel--step-one .rule-sub-actions { grid-template-columns: 1fr; }
  .rule-panel--step-one .rule-member-add { grid-column: auto; }
  .rule-panel--step-one .rule-sub-actions img { width: 68px; }
  .rule-flow--high .rule-theme-grid,
  .rule-high-method__grid,
  .rule-high-opinions,
  .rule-high-review-theme > div { grid-template-columns: 1fr; }
  .rule-high-method,
  .rule-high-entry,
  .rule-high-review { padding: 18px 14px; }
  .rule-high-entry__intro {
    display: grid;
    gap: 16px;
  }
  .rule-high-qr-launch { width: 100%; }
  .rule-high-method__grid button {
    grid-template-columns: 86px minmax(0, 1fr);
    min-height: 130px;
    padding: 14px;
  }
  .rule-high-method__grid img { width: 86px; height: 86px; }
  .rule-high-method__grid b { font-size: 1.0625rem; }
  .rule-high-review-theme article + article {
    border-top: 1px solid var(--rule-line);
    border-left: 0;
  }
  .rule-high-reflect {
    display: grid;
    gap: 14px;
  }
  .rule-high-reflect .rule-button { width: 100%; }
  .rule-high-register-actions { grid-template-columns: 1fr; }
  .rule-high-register-actions button,
  .rule-high-register-actions a { grid-template-columns: 74px minmax(0, 1fr); }
  .rule-high-register-actions img { width: 74px; height: 72px; }
  .rule-high-qr-dialog > div { padding: 24px 16px; }
  .rule-high-qr-placeholder { width: 160px; height: 160px; }
  .rule-high-qr-image { width: 160px; height: 160px; }
}
