:root {
  color-scheme: light;
  --ink: #17211c;
  --muted: #647067;
  --line: #d8dfd9;
  --soft: #f4f7f3;
  --panel: #ffffff;
  --brand: #2f6f50;
  --brand-2: #b08952;
  --danger: #b42318;
  --warn: #b54708;
  --ok: #257a55;
  font-family: Inter, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 14px;
  cursor: pointer;
}

button.primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

button.danger {
  border-color: var(--danger);
  color: var(--danger);
}

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

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 10px 12px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.check-field {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  white-space: nowrap;
  color: var(--ink);
}

.check-field input {
  width: auto;
}

.check-field.compact {
  justify-content: center;
  min-width: 72px;
}

.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 14% 16%, rgba(139, 174, 99, .22), transparent 34%),
    radial-gradient(circle at 88% 86%, rgba(231, 195, 91, .24), transparent 32%),
    linear-gradient(135deg, #edf3e9 0%, #f8f5e9 100%);
}

.login-panel {
  width: min(980px, calc(100vw - 64px));
  min-height: 620px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  overflow: hidden;
  border: 1px solid rgba(77, 105, 68, .16);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(40, 54, 43, .16);
}

.login-visual {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 28px 34px 34px;
  border-right: 1px solid rgba(77, 105, 68, .12);
  background:
    radial-gradient(circle at 84% 12%, rgba(236, 207, 103, .24), transparent 26%),
    linear-gradient(180deg, #fbfaf4 0%, #f0f5e9 100%);
}

.login-visual-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--brand);
  font-size: 13px;
  letter-spacing: .08em;
}

.login-visual-kicker strong {
  font-size: 15px;
  letter-spacing: .12em;
}

.login-visual-kicker span {
  padding: 5px 10px;
  border: 1px solid rgba(47, 111, 80, .2);
  border-radius: 999px;
  background: rgba(255, 255, 255, .7);
}

.login-mascots {
  display: block;
  width: calc(100% + 10px);
  max-height: 388px;
  margin: 8px -5px 6px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.login-visual-copy {
  margin-top: auto;
}

.login-visual-copy p {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .12em;
}

.login-visual-copy h1 {
  margin: 0;
  color: #26382d;
  font-size: clamp(25px, 2.4vw, 32px);
  line-height: 1.35;
  letter-spacing: .02em;
}

.login-card {
  width: auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 42px;
  background: #fff;
}

.brand-mark {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 8px;
}

.login-logo {
  display: block;
  width: min(190px, 62%);
  height: auto;
  margin: 0 0 24px;
}

.login-brand-logo {
  width: min(160px, 52%);
  margin-bottom: 18px;
}

.login-card .brand-mark {
  margin-bottom: 10px;
  font-size: 24px;
}

.login-card > .muted {
  margin: 0 0 22px;
  line-height: 1.65;
}

.login-card .login-permission-note {
  margin: 18px 0 0;
  font-size: 13px;
}

.login-form-error {
  margin: -2px 0 0;
  color: #bc1f18;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.login-card input[aria-invalid="true"] {
  border-color: #d92d27;
  background: #fff7f6;
  box-shadow: 0 0 0 3px rgba(217, 45, 39, .12);
}

.muted {
  color: var(--muted);
}

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  width: 100%;
  max-width: 100vw;
  min-height: 100dvh;
  min-height: 100svh;
  overflow-x: hidden;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: #fff;
  padding: calc(18px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  position: sticky;
  top: 0;
  height: 100dvh;
  height: 100svh;
}

.nav-title {
  font-weight: 800;
  line-height: 1.3;
  margin: 0 8px 18px;
}

.sidebar-logo {
  display: block;
  width: 168px;
  max-width: 100%;
  height: auto;
  margin-bottom: 10px;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav button {
  justify-content: flex-start;
  text-align: left;
  border-color: transparent;
  background: transparent;
}

.nav button.active {
  background: #eaf2ed;
  border-color: #cfe1d7;
  color: var(--brand);
}

.main {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .92);
  padding: calc(12px + env(safe-area-inset-top)) 22px 12px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.content {
  padding: 22px max(22px, env(safe-area-inset-right)) calc(22px + env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  max-width: none;
  width: 100%;
  min-width: 0;
}

.page-title {
  font-size: 24px;
  margin: 0 0 16px;
}

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

.grid.cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}

.admin-section {
  display: grid;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-settings-menu {
  display: grid;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-settings-menu h2 {
  margin: 0;
}

.admin-settings-menu p {
  margin: 6px 0 0;
}

.admin-settings-nav {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.admin-settings-nav-item {
  min-height: 92px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  border-color: #d8e4da;
  background: #fbfdfb;
  padding: 12px;
  text-align: left;
}

.admin-settings-nav-item:hover,
.admin-settings-nav-item:focus-visible {
  border-color: #9cbfa9;
  background: #f3f9f4;
}

.admin-settings-nav-item.active {
  border-color: var(--brand);
  background: #eaf4ed;
  box-shadow: inset 0 0 0 1px var(--brand);
}

.admin-settings-nav-item strong,
.admin-settings-nav-item small {
  display: block;
}

.admin-settings-nav-item strong {
  color: var(--ink);
  font-size: 14px;
}

.admin-settings-nav-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.admin-settings-nav-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e2eee6;
  color: var(--brand);
  font-size: 19px;
  font-weight: 800;
}

.admin-settings-nav-item.active .admin-settings-nav-icon {
  background: var(--brand);
  color: #fff;
}

.entry-choice-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(150deg, #edf5ef, #f8fbf8);
}

.entry-choice-card {
  width: min(620px, 100%);
  display: grid;
  gap: 16px;
  justify-items: center;
  border: 1px solid #cfe1d7;
  border-radius: 14px;
  background: #fff;
  padding: 30px;
  text-align: center;
  box-shadow: 0 18px 42px rgba(28, 57, 39, .1);
}

.entry-choice-card h1,
.entry-choice-card p {
  margin: 0;
}

.entry-choice-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.entry-choice-button {
  min-height: 132px;
  display: grid;
  gap: 8px;
  align-content: center;
  border-color: #cfe1d7;
  padding: 18px;
  text-align: left;
}

.entry-choice-button strong,
.entry-choice-button span {
  display: block;
}

.entry-choice-button strong {
  font-size: 18px;
}

.entry-choice-button span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.5;
}

.entry-choice-button.primary span {
  color: rgba(255, 255, 255, .86);
}

.audit-create-progress {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.audit-create-progress li {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  padding: 10px 12px;
  color: var(--muted);
}

.audit-create-progress li span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #edf1ee;
  font-weight: 900;
}

.audit-create-progress li strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.audit-create-progress li.active {
  border-color: var(--brand);
  background: #f3f8f5;
  color: var(--brand);
}

.audit-create-progress li.active span,
.audit-create-progress li.done span {
  background: var(--brand);
  color: #fff;
}

.audit-create-step {
  gap: 18px;
}

.audit-create-step h2,
.audit-create-step p {
  margin: 0;
}

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

.audit-choice-card {
  width: 100%;
  min-height: 116px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  border-color: #c9dcd0;
  border-radius: 10px;
  background: linear-gradient(145deg, #fff, #f5faf6);
  padding: 18px;
  text-align: left;
}

.audit-choice-card:hover,
.audit-choice-card:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 8px 22px rgba(34, 80, 56, .1);
}

.audit-choice-card strong,
.audit-choice-card span {
  display: block;
}

.audit-choice-card strong {
  font-size: 18px;
}

.audit-choice-card span {
  color: var(--muted);
  font-size: 13px;
}

.audit-choice-card.unavailable {
  border-style: dashed;
  background: #f5f5f3;
  box-shadow: none;
}

.audit-owner-note {
  display: grid;
  align-content: center;
  gap: 5px;
  border: 1px solid #d8e4da;
  border-radius: 8px;
  background: #f6faf7;
  padding: 12px;
}

.audit-owner-note span {
  color: var(--muted);
  font-size: 13px;
}

.audit-assistant-picker {
  display: grid;
  gap: 7px;
}

.audit-assistant-picker select {
  min-height: 132px;
}

.audit-team-panel {
  margin: 0 0 14px;
}

.audit-team-members {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}

.collaboration-lead-note {
  border: 1px solid #d8e4da;
  border-radius: 8px;
  background: #f6faf7;
  padding: 12px;
}

.collaboration-lead-note p {
  margin: 6px 0 0;
}

.section-kicker {
  display: block;
  margin-bottom: 4px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .12em;
}

.improvement-assignment-panel {
  display: grid;
  gap: 16px;
  margin-top: 14px;
  border: 1px solid #b9d2c2;
  background: linear-gradient(145deg, #fff 0%, #f3f8f4 100%);
}

.improvement-assignment-panel h2,
.improvement-assignment-panel p,
.correction-assignee-banner h2,
.correction-assignee-banner p {
  margin: 0;
}

.improvement-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.improvement-flow li {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  color: var(--muted);
}

.improvement-flow li span {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 50%;
  background: #e8eeea;
  font-weight: 900;
}

.improvement-flow li.current {
  border-color: var(--brand);
  color: var(--brand);
}

.improvement-flow li.current span,
.improvement-flow li.done span {
  background: var(--brand);
  color: #fff;
}

.improvement-flow li.done {
  border-color: #b9d2c2;
  color: var(--ink);
}

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

.assignment-current > div,
.assignment-empty,
.assignment-select-form,
.assignment-quick-add {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.assignment-current > div {
  display: grid;
  gap: 3px;
}

.assignment-current small {
  color: var(--muted);
}

.assignment-select-form,
.assignment-quick-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.assignment-cta {
  display: flex;
  justify-content: flex-end;
}

.correction-assignee-banner {
  margin-bottom: 14px;
  border-left: 5px solid var(--brand);
}

.access-settings-form,
.access-user-list,
.access-user-card,
.access-mapping-section,
.access-grants {
  display: grid;
  gap: 14px;
}

.access-user-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfb;
  overflow: hidden;
}

.access-user-card[hidden] {
  display: none;
}

.access-user-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.access-user-summary::-webkit-details-marker {
  display: none;
}

.access-user-summary::after {
  content: "展開設定";
  grid-column: 2;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.access-user-card[open] .access-user-summary::after {
  content: "收合設定";
}

.access-user-summary > span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.access-user-summary small {
  color: var(--muted);
}

.access-user-avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #deebe2;
  color: var(--brand);
  font-size: 18px;
  font-weight: 900;
}

.access-user-body {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding: 16px;
}

.access-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.access-card-heading > div:first-child {
  display: grid;
  gap: 3px;
}

.access-card-heading small {
  color: var(--muted);
}

.access-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.access-overview-grid > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8fbf8;
  padding: 12px;
}

.access-overview-grid span {
  color: var(--muted);
  font-size: 13px;
}

.access-overview-grid strong {
  color: var(--brand);
  font-size: 24px;
}

.unit-partner-admin {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  border: 1px solid #b9d2c2;
  border-radius: 10px;
  background: #f6faf7;
  padding: 16px;
}

.access-section-heading,
.access-section-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.access-section-heading {
  justify-content: space-between;
}

.access-section-heading h3,
.access-section-heading p {
  margin: 0;
}

.access-section-heading > div:first-child {
  flex-wrap: wrap;
}

.access-section-heading p {
  flex-basis: 100%;
  margin-left: 42px;
}

.access-step-number {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
}

.unit-partner-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: 12px;
}

.unit-partner-actions > * {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.unit-partner-add-form {
  grid-template-columns: minmax(150px, .7fr) minmax(180px, 1fr) auto;
  align-items: end;
}

.unit-partner-import {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.unit-partner-import p {
  margin: 3px 0 0;
}

.file-button {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 14px;
  white-space: nowrap;
  cursor: pointer;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.unit-partner-table td strong,
.unit-partner-table td small {
  display: block;
}

.unit-partner-table td small {
  margin-top: 2px;
  color: var(--muted);
}

.access-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, .55fr) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f8faf8;
  padding: 12px;
}

.access-mapping-section {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px;
}

.access-mapping-section > summary {
  cursor: pointer;
}

.access-mapping-section > summary span {
  display: grid;
  gap: 3px;
}

.access-mapping-section > summary small {
  color: var(--muted);
}

.access-mapping-section[open] > summary {
  margin-bottom: 14px;
}

.access-save-bar {
  position: sticky;
  bottom: max(10px, env(safe-area-inset-bottom));
  z-index: 4;
  justify-content: space-between;
  border: 1px solid #b9d2c2;
  border-radius: 9px;
  background: rgba(255, 255, 255, .96);
  padding: 10px;
  box-shadow: 0 8px 24px rgba(24, 55, 38, .12);
}

.access-user-card h3,
.access-user-card h4,
.access-user-card p,
.access-mapping-section h3,
.access-mapping-section p {
  margin: 0;
}

.access-permission-group {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.access-grants {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.access-grants.is-disabled {
  opacity: .58;
}

.access-check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.access-check-grid label {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  border: 1px solid #d8e4da;
  border-radius: 7px;
  background: #fff;
  padding: 9px;
  font-size: 13px;
}

.access-scope-details {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.access-scope-details summary {
  cursor: pointer;
  color: var(--brand);
  font-weight: 800;
}

.access-scope-details .admin-form-grid {
  margin-top: 12px;
}

.access-scope-details select[multiple] {
  min-height: 142px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(280px, .9fr);
  gap: 14px;
  align-items: start;
}

.admin-manage-grid {
  align-items: start;
}

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

.admin-form-grid.compact {
  gap: 10px;
}

.admin-wide {
  grid-column: 1 / -1;
}

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

.permission-option {
  min-height: 86px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfb;
  color: var(--ink);
}

.permission-option input {
  width: auto;
  margin-top: 3px;
}

.permission-option span {
  display: grid;
  gap: 4px;
}

.permission-option small,
.admin-note-list span {
  color: var(--muted);
  line-height: 1.5;
}

.admin-note-list {
  display: grid;
  gap: 10px;
}

.admin-note-list p {
  margin: 0;
  display: grid;
  gap: 4px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.create-submit {
  display: flex;
  align-self: end;
  justify-content: flex-end;
}

.create-submit button {
  min-width: 180px;
}

.stat {
  display: grid;
  gap: 6px;
}

.stat strong {
  font-size: 26px;
}

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

.split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}

.template-items-wrap {
  max-height: calc(100vh - 148px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

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

th {
  color: var(--muted);
  font-size: 13px;
}

.template-edit-table {
  min-width: 1660px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.template-edit-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--panel);
  box-shadow: 0 1px 0 var(--line), 0 8px 16px rgba(23, 33, 28, .08);
}

.template-edit-table input,
.template-edit-table select,
.template-edit-table textarea {
  min-width: 0;
  width: 100%;
}

.template-edit-table textarea {
  min-width: 280px;
  min-height: 68px;
}

.template-edit-table tr.pending-disable {
  background: #fff7f5;
}

.template-edit-table tr.pending-disable input,
.template-edit-table tr.pending-disable select,
.template-edit-table tr.pending-disable textarea {
  opacity: .62;
}

.template-edit-table tr.pending-disable td:first-child::before {
  content: "待停用";
  display: block;
  margin-bottom: 4px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 700;
}

.template-edit-table th:nth-child(1),
.template-edit-table td:nth-child(1) {
  width: 96px;
}

.template-edit-table th:nth-child(2),
.template-edit-table td:nth-child(2) {
  width: 150px;
}

.template-edit-table th:nth-child(3),
.template-edit-table td:nth-child(3) {
  width: 300px;
}

.template-edit-table th:nth-child(4),
.template-edit-table td:nth-child(4) {
  width: 130px;
}

.template-edit-table th:nth-child(5),
.template-edit-table td:nth-child(5) {
  width: 82px;
}

.template-edit-table th:nth-child(6),
.template-edit-table td:nth-child(6) {
  width: 160px;
}

.template-edit-table th:nth-child(7),
.template-edit-table td:nth-child(7),
.template-edit-table th:nth-child(8),
.template-edit-table td:nth-child(8) {
  width: 120px;
  text-align: center;
}

.template-edit-table th:nth-child(9),
.template-edit-table td:nth-child(9) {
  width: 320px;
}

.template-edit-table th:nth-child(10),
.template-edit-table td:nth-child(10) {
  width: 96px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  background: #edf3ef;
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.badge.warn {
  background: #fff3e4;
  color: var(--warn);
}

.badge.danger {
  background: #fff0ee;
  color: var(--danger);
}

.audit-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 16px;
}

.item-card {
  display: grid;
  gap: 12px;
}

.item-head {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: flex-start;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.segmented button {
  min-height: 36px;
}

.segmented button.active-pass {
  background: #e8f5ee;
  border-color: #afd6c1;
  color: var(--ok);
}

.segmented button.active-fail {
  background: #fff0ee;
  border-color: #efb1aa;
  color: var(--danger);
}

.segmented button.active-rec {
  background: #fff8e8;
  border-color: #e3c17f;
  color: var(--warn);
}

.hidden {
  display: none !important;
}

.signature-pad {
  width: 100%;
  height: 170px;
  border: 1px dashed #aeb8af;
  border-radius: 6px;
  background: #fff;
  touch-action: none;
}

.photo-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.photo-list img {
  width: 72px;
  height: 72px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.photo-preview {
  min-height: 82px;
  align-content: flex-start;
  padding: 10px;
  border: 1px dashed #b7c2ba;
  border-radius: 6px;
  background: #fbfcfb;
}

.photo-preview-empty {
  width: 100%;
  margin: auto 0;
  text-align: center;
}

.editable-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.editable-photo-card {
  display: grid;
  gap: 6px;
  min-width: 132px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.editable-photo-card img,
.photo-list .editable-photo-card img {
  width: 100%;
  height: 112px;
  border-radius: 6px;
  object-fit: cover;
}

.editable-photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.editable-photo-actions button {
  min-height: 36px;
  padding: 6px 8px;
  font-size: 13px;
}

.danger-text {
  color: var(--danger);
}

.photo-input-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.file-action {
  min-height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.file-action input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(14, 28, 22, .72);
}

.photo-editor {
  width: min(980px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  padding: 18px;
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .28);
}

#photo-editor-canvas {
  display: block;
  max-width: 100%;
  margin: 14px auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
  touch-action: none;
}

.photo-editor-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.report-subtitle {
  margin: -8px 0 0;
}

.public-link-result {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.public-link-result p {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.report-finding {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.report-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}

.report-photo-grid a {
  display: block;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  aspect-ratio: 1;
}

.report-photo-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.signature-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.signature-record img {
  width: 100%;
  height: 96px;
  object-fit: contain;
  border: 1px dashed #aeb8af;
  border-radius: 6px;
  background: #fff;
}

.clause-preview:empty {
  display: none;
}

.clause-card {
  background: #fbfcfb;
}

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

.finding-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.finding-row p {
  margin: 6px 0 0;
}

.recommendation-entry-list,
.recommendation-report-list {
  margin: 0;
  padding-left: 24px;
}

.recommendation-entry-list > li,
.recommendation-report-list > li {
  padding: 12px 0 12px 4px;
}

.recommendation-entry-list > li + li,
.recommendation-report-list > li + li {
  border-top: 1px solid var(--line);
}

.recommendation-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.recommendation-entry p,
.recommendation-report-list p {
  margin: 6px 0;
}

.recommendation-editor {
  display: grid;
  gap: 10px;
}

.recommendation-entry-actions {
  justify-content: flex-end;
}

.score-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #e5d3b8;
  border-radius: 8px;
  background: #fff8e8;
  padding: 12px;
}

.score-preview strong {
  font-size: 24px;
  color: var(--warn);
}

.org-chart-board {
  overflow-x: auto;
  padding: 10px 0 6px;
}

.org-chart-help {
  margin: 6px 0 0;
  line-height: 1.55;
}

.workflow-overview-selector {
  width: min(420px, 100%);
  color: var(--ink);
  font-weight: 700;
}

.workflow-overview-card {
  display: grid;
  gap: 16px;
  border: 1px solid #cfe1d7;
  border-radius: 10px;
  background: linear-gradient(180deg, #fbfdfb, #f5f9f6);
  padding: 16px;
}

.workflow-overview-heading {
  align-items: flex-start;
}

.workflow-overview-title-row strong {
  font-size: 18px;
}

.workflow-overview-heading p {
  margin: 8px 0 0;
}

.workflow-overview-flow {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 4px 2px 12px;
  scroll-snap-type: x proximity;
}

.workflow-overview-step {
  position: relative;
  flex: 0 0 210px;
  min-height: 142px;
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-top: 4px solid #8ca598;
  border-radius: 9px;
  background: #fff;
  padding: 14px;
  scroll-snap-align: start;
}

.workflow-overview-step.configurable {
  border-top-color: var(--brand);
  background: #f7fbf8;
}

.workflow-overview-step:not(:last-child)::after {
  content: "→";
  position: absolute;
  top: 50%;
  right: -24px;
  color: var(--brand);
  font-size: 22px;
  font-weight: 800;
  transform: translateY(-50%);
}

.workflow-step-index {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.workflow-overview-step.configurable .workflow-step-index {
  background: #e4f1e9;
  color: var(--brand);
}

.workflow-step-stage {
  width: fit-content;
  border-radius: 999px;
  background: #eef2ef;
  color: var(--muted);
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.workflow-overview-step.configurable .workflow-step-stage {
  background: #deeee4;
  color: var(--brand);
}

.workflow-overview-step strong {
  padding-right: 24px;
  line-height: 1.5;
}

.workflow-step-role {
  color: var(--muted);
  font-size: 13px;
}

.workflow-overview-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.workflow-phase-key {
  display: inline-flex;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 800;
}

.workflow-phase-key.fixed {
  background: #eef2ef;
  color: var(--muted);
}

.workflow-phase-key.configurable {
  background: #deeee4;
  color: var(--brand);
}

.org-chart-inner {
  position: relative;
  min-width: max-content;
  width: max-content;
  margin: 0 auto;
  padding: 8px 10px 16px;
}

.org-chart-lines {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: visible;
  pointer-events: none;
}

.org-chart-link {
  fill: none;
  stroke: #cfe0d5;
  stroke-width: 2;
  stroke-linecap: square;
  vector-effect: non-scaling-stroke;
}

.org-tree,
.org-tree ul {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.org-tree {
  position: relative;
  z-index: 1;
  min-width: max-content;
  padding: 0;
}

.org-tree ul {
  padding-top: 30px;
}

.org-tree li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-tree-node {
  position: relative;
  z-index: 1;
  width: 220px;
  min-height: 116px;
  display: grid;
  gap: 7px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfb;
  padding: 12px;
  text-align: center;
  box-shadow: 0 1px 0 rgba(28, 57, 39, 0.04);
}

.org-tree-node strong {
  font-size: 16px;
}

.org-tree-node.unit-node {
  background: #fff;
  border-color: #d7e1da;
}

.workflow-role {
  color: var(--muted);
  font-size: 13px;
}

.org-chart-toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.org-chart-editing {
  border-color: #b8d3c2;
  box-shadow: 0 0 0 3px rgba(40, 116, 74, 0.08);
}

.org-chart-editing .org-chart-help {
  color: var(--ink);
}

.org-node-actions {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 4px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.org-chart-editing .org-node-actions {
  display: flex;
}

#organization-management-forms[hidden] {
  display: none;
}

.org-node-actions button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 12px;
}

.workflow-editor {
  margin-top: 14px;
}

.workflow-form {
  display: grid;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.workflow-step-table {
  min-width: 620px;
}

.workflow-step-table th:first-child,
.workflow-step-table td:first-child {
  width: 70px;
  text-align: center;
}

.workflow-step-table th:last-child,
.workflow-step-table td:last-child {
  width: 190px;
}

.workflow-step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.workflow-step-actions button {
  min-height: 34px;
  padding-inline: 10px;
}

.trend {
  display: flex;
  min-height: 210px;
  gap: 10px;
  align-items: end;
  overflow-x: auto;
  padding-top: 18px;
}

.trend-point {
  flex: 1 0 54px;
  min-width: 54px;
  display: grid;
  grid-template-rows: 140px auto auto;
  gap: 6px;
  align-items: end;
  text-align: center;
}

.trend-bar {
  width: 24px;
  max-height: 140px;
  justify-self: center;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #2f6f50, #86b793);
}

.trend-point strong {
  font-size: 14px;
}

.trend-point span {
  color: var(--muted);
  font-size: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(110px, 36%) 42px;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.bar-label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bar-label strong,
.bar-label span {
  overflow-wrap: anywhere;
}

.bar-label span {
  color: var(--muted);
  font-size: 12px;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #edf2ee;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.bar-value {
  text-align: right;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: 360px;
  background: #17211c;
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
  z-index: 20;
}

@media (max-width: 860px) {
  body {
    overscroll-behavior-x: none;
  }

  .improvement-flow,
  .assignment-current,
  .assignment-actions,
  .access-overview-grid,
  .unit-partner-actions,
  .unit-partner-add-form,
  .access-filter-bar {
    grid-template-columns: 1fr;
  }

  .assignment-select-form,
  .assignment-quick-add {
    grid-template-columns: 1fr;
  }

  .assignment-cta,
  .assignment-cta button {
    width: 100%;
  }

  .access-section-heading,
  .access-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .access-section-heading > button {
    width: 100%;
  }

  .access-section-heading p {
    margin-left: 0;
  }

  .unit-partner-import {
    align-items: stretch;
    flex-direction: column;
  }

  .file-button {
    justify-content: center;
  }

  .app-shell {
    grid-template-columns: 1fr;
    width: 100vw;
  }

  .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: calc(12px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
    overflow: hidden;
  }

  .nav {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav button {
    flex: 0 0 auto;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .content {
    padding: 14px max(14px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    overflow-x: hidden;
  }

  .grid.cols-2,
  .grid.cols-3,
  .audit-layout,
  .admin-layout,
  .admin-form-grid,
  .permission-group {
    grid-template-columns: 1fr;
  }

  .admin-settings-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .entry-choice-actions,
  .access-permission-group,
  .access-check-grid {
    grid-template-columns: 1fr;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions button,
  .create-submit button {
    width: 100%;
    min-width: 0;
  }

  .photo-editor-tools {
    grid-template-columns: 1fr;
  }

  .create-submit {
    justify-content: stretch;
    align-self: stretch;
  }

  .topbar {
    position: static;
    flex-wrap: wrap;
    padding: 12px max(14px, env(safe-area-inset-right)) 12px max(14px, env(safe-area-inset-left));
  }

  .topbar strong,
  .topbar span {
    overflow-wrap: anywhere;
  }

  .panel,
  .card {
    padding: 14px;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  select,
  input,
  textarea {
    font-size: 16px;
  }

  input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    text-align: left;
    min-height: 48px;
  }

  input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
  }

  input[type="date"]::-webkit-calendar-picker-indicator {
    margin-left: auto;
  }

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

  .signature-record {
    grid-template-columns: 1fr;
  }

  .public-link-result {
    align-items: stretch;
    flex-direction: column;
  }

  .signature-record img {
    height: 110px;
  }

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

  .bar-value {
    text-align: left;
  }
}

.notification-admin-section {
  display: grid;
  gap: 18px;
}

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

.notification-status-list {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #d8e4da;
  border-radius: 10px;
  background: #f5faf6;
}

.notification-status-list p {
  margin: 0;
}

.notification-subsection {
  display: grid;
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.notification-subsection h3 {
  margin: 0;
}

.notification-rule-table th:not(:first-child),
.notification-rule-table td:not(:first-child) {
  text-align: center;
}

.notification-rule-table td:first-child {
  min-width: 180px;
  text-align: left;
}

.compact-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  font-size: 13px;
}

.compact-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.notification-template-list {
  display: grid;
  gap: 12px;
}

.notification-template-row {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdfb;
}

.notification-template-row textarea {
  min-height: 132px;
}

.approval-simulation-assignees {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.approval-simulation-assignee {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d8e4da;
  border-radius: 8px;
  background: #f8fbf8;
}

.approval-simulation-assignee.backup {
  border-style: dashed;
  background: #fffdf7;
}

.approval-add-backup {
  justify-self: start;
}

@media (max-width: 840px) {
  .login-shell {
    align-items: start;
  }

  .login-panel {
    width: min(620px, calc(100vw - 48px));
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .login-visual {
    padding: 22px 28px 26px;
    border-right: 0;
    border-bottom: 1px solid rgba(77, 105, 68, .12);
  }

  .login-mascots {
    max-height: 260px;
    margin: 4px auto 0;
  }

  .login-visual-copy {
    margin-top: 0;
  }

  .login-visual-copy h1 {
    font-size: 24px;
  }

  .login-card {
    padding: 34px 36px 38px;
  }

  .notification-service-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .login-shell {
    min-height: 100svh;
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }

  .login-panel {
    width: min(420px, calc(100vw - 28px));
    border-radius: 18px;
  }

  .login-visual {
    padding: 16px 18px;
  }

  .login-visual-kicker span {
    display: none;
  }

  .login-mascots {
    max-height: 185px;
  }

  .login-visual-copy p {
    margin-bottom: 6px;
    font-size: 12px;
  }

  .login-visual-copy h1 {
    font-size: 20px;
  }

  .login-card {
    padding: 22px 22px 24px;
  }

  .login-brand-logo {
    width: min(150px, 52%);
    margin-bottom: 14px;
  }

  .login-card .brand-mark {
    font-size: 22px;
  }

  .login-card > .muted {
    margin-bottom: 16px;
    line-height: 1.55;
  }

  .login-card .login-permission-note {
    margin-top: 14px;
  }

  .sidebar-logo {
    width: 132px;
  }

  .nav-title {
    display: grid;
    gap: 8px;
    margin: 0 2px 12px;
  }

  .nav-title span {
    font-size: 18px;
  }

  .nav {
    gap: 8px;
    margin-inline: -2px;
    padding: 0 2px 8px;
  }

  .nav button {
    min-height: 44px;
    border-color: var(--line);
    border-radius: 8px;
    background: #fff;
    padding-inline: 12px;
  }

  .page-title {
    font-size: 22px;
    overflow-wrap: anywhere;
  }

  .content {
    padding-top: 12px;
  }

  .panel,
  .card {
    padding: 12px;
  }

  #create-audit {
    gap: 12px;
  }

  #create-audit label {
    gap: 8px;
    font-size: 14px;
  }

  #create-audit select,
  #create-audit input {
    min-height: 48px;
  }

  .audit-create-progress {
    gap: 5px;
  }

  .audit-create-progress li {
    display: grid;
    justify-items: center;
    gap: 5px;
    padding: 8px 4px;
    text-align: center;
  }

  .audit-create-progress li span {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .audit-create-progress li strong {
    font-size: 11px;
    line-height: 1.35;
  }

  .audit-choice-grid {
    grid-template-columns: 1fr;
  }

  .audit-choice-card {
    min-height: 92px;
    padding: 14px;
  }

  .photo-input-actions {
    grid-template-columns: 1fr;
  }

  .report-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workflow-overview-card {
    padding: 12px;
  }

  .workflow-overview-flow {
    overflow-x: visible;
    flex-direction: column;
    gap: 30px;
    padding-inline: 0;
  }

  .workflow-overview-step {
    flex-basis: auto;
    width: 100%;
    min-height: 0;
  }

  .workflow-overview-step:not(:last-child)::after {
    top: auto;
    right: 50%;
    bottom: -28px;
    content: "↓";
    transform: translateX(50%);
  }

  .split {
    align-items: flex-start;
    flex-direction: column;
  }

  .row > button,
  .split > button {
    width: 100%;
  }

  .segmented {
    grid-template-columns: 1fr;
  }

  .toast {
    right: max(12px, env(safe-area-inset-right));
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    max-width: none;
  }
}
