* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  color: #1b1f24;
  --stage-accent: #1b5aa5;
  --stage-accent-dark: #154882;
  --stage-accent-soft: #eef5ff;
  --stage-accent-ink: #173651;
}

body.stage-clean {
  --stage-accent: #1b5aa5;
  --stage-accent-dark: #154882;
  --stage-accent-soft: #eef5ff;
  --stage-accent-ink: #173651;
}

body.stage-distribution {
  --stage-accent: #1f7a55;
  --stage-accent-dark: #17593f;
  --stage-accent-soft: #edf9f2;
  --stage-accent-ink: #184a36;
}

body.stage-mapping {
  --stage-accent: #9c4f1a;
  --stage-accent-dark: #743712;
  --stage-accent-soft: #fff3eb;
  --stage-accent-ink: #5b2b0f;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #eef8ff, #f5f7fb 60%, #eef5f0);
}

.login-card {
  width: min(420px, 92vw);
  background: #fff;
  border: 1px solid #d8e1ea;
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(18, 48, 76, 0.08);
}

.login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

h1 {
  margin: 0 0 8px;
  font-size: 24px;
}

.subtext {
  margin: 0 0 16px;
  color: #4e5b6b;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="file"] {
  border: 1px solid #ccd8e6;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 14px;
  background: #fff;
}

button {
  border: 0;
  border-radius: 8px;
  background: #1768c8;
  color: #fff;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
}

button.secondary {
  background: #5a6677;
}

button.warning {
  background: #bb5a02;
}

.sample-template-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid #66aa3e;
  background: linear-gradient(180deg, #c9ff94 0%, #a7ef63 100%);
  color: #16320f;
  font-weight: 700;
  text-decoration: none;
  padding: 9px 12px;
  box-shadow: 0 0 12px rgba(137, 227, 74, 0.55);
  white-space: nowrap;
}

.sample-template-btn:hover {
  filter: brightness(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.error-box {
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0 14px;
  background: #ffe9ea;
  border: 1px solid #ffb7bc;
  color: #9c1e27;
}

.info-box {
  border-radius: 8px;
  padding: 10px;
  margin: 8px 0 14px;
  background: #ecf6ff;
  border: 1px solid #b6d7f6;
  color: #0e4f87;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid #ccd8e6;
  border-radius: 8px;
  padding: 8px 12px;
  text-decoration: none;
  font-weight: 600;
  color: #1e3045;
  background: #f7fbff;
}

.icon-link:hover {
  background: #edf5ff;
}

.admin-entry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #1f2a36;
  background: #2a3543;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.admin-entry-btn:hover {
  background: #1f2935;
}

.small-gap {
  margin-top: 12px;
}

.inline-form {
  margin-top: 8px;
}

.app-body {
  min-height: 100vh;
  background: radial-gradient(circle at top right, #e7f2ff, #f8fbff 30%, #f5f8f4);
  padding: clamp(10px, 2vw, 20px);
  padding-bottom: 82px;
  overflow-x: hidden;
  overflow-y: auto;
}

.topbar {
  max-width: 980px;
  margin: 0 auto 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.topbar-wide {
  max-width: 1280px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-nav {
  max-width: 980px;
  margin: 0 auto 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stage-nav.stage-nav-wide {
  max-width: 1280px;
}

.stage-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #c7d4e3;
  background: #f6f9fd;
  color: #173651;
  text-decoration: none;
  font-weight: 700;
}

.stage-tab:hover {
  background: #ecf3fb;
}

.stage-tab.active {
  background: var(--stage-accent);
  border-color: var(--stage-accent-dark);
  color: #fff;
}

.session-timer {
  min-width: 76px;
  text-align: center;
  font-weight: 700;
  border: 1px solid #c9d4e2;
  background: #f5f9ff;
  border-radius: 8px;
  padding: 8px 10px;
}

.panel {
  width: min(100%, 980px);
  max-width: 980px;
  margin: 0 auto;
  background: #fff;
  border-radius: 14px;
  border: 1px solid #d8e1ea;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(18, 48, 76, 0.08);
}

.workflow-status-panel {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid #d8e3ef;
  border-radius: 14px;
  background:
    linear-gradient(135deg, #f7fbff 0%, #f3f9ff 58%, #eef7f1 100%);
}

.workflow-status-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  color: #183651;
}

.workflow-status-head strong {
  flex: 1 1 280px;
}

.workflow-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--stage-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.workflow-status-box {
  min-height: 58px;
  font-size: 15px;
  line-height: 1.6;
  background: rgba(255, 255, 255, 0.88);
}

.stage-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.stage-summary-card {
  border: 1px solid #d8e1ea;
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 12px 26px rgba(18, 48, 76, 0.05);
}

.stage-summary-label {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #58708b;
  letter-spacing: 0.2px;
}

.stage-summary-value {
  font-size: 22px;
  font-weight: 800;
  color: #163a5f;
  line-height: 1.35;
  word-break: break-word;
}

.stage-summary-value.small {
  font-size: 16px;
  font-weight: 700;
}

.stage-guidance {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #d7e4f0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbff 0%, #f1f8ff 100%);
}

.stage-guidance-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.stage-guidance-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--stage-accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.stage-guidance strong {
  color: #183651;
}

.stage-guidance-list {
  margin: 0;
  padding-left: 18px;
  color: #516577;
  line-height: 1.7;
}

.workflow-card-note {
  margin-top: 10px;
  font-size: 13px;
  color: #5a697a;
  line-height: 1.6;
}

.stage-next-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #d7e3ef;
  border-radius: 16px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef7ff 100%);
}

.stage-next-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stage-next-head h2 {
  margin: 0 0 4px;
  font-size: 20px;
  color: #173651;
}

.stage-next-head p {
  margin: 0;
  color: #57697c;
  line-height: 1.6;
}

.stage-next-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 10px;
  background: var(--stage-accent);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid var(--stage-accent-dark);
}

.primary-link-btn:hover {
  background: var(--stage-accent-dark);
}

.secondary-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 10px;
  background: #f5f9ff;
  color: #173651;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid #c7d4e3;
}

.secondary-link-btn:hover {
  background: #edf4fb;
}

.completion-banner {
  display: none;
  margin-bottom: 18px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid #bcdcc2;
  background: linear-gradient(135deg, #f4fff4 0%, #ebfff1 100%);
  color: #17552d;
  box-shadow: 0 12px 26px rgba(51, 124, 73, 0.08);
}

body.stage-clean .completion-banner {
  border-color: #b6d4f0;
  background: linear-gradient(135deg, #f4faff 0%, #edf5ff 100%);
  color: #174a7d;
}

body.stage-distribution .completion-banner {
  border-color: #bcdcc2;
  background: linear-gradient(135deg, #f4fff4 0%, #ebfff1 100%);
  color: #17552d;
}

body.stage-mapping .completion-banner {
  border-color: #f0c9b3;
  background: linear-gradient(135deg, #fff8f4 0%, #fff1e8 100%);
  color: #7c3e16;
}

.completion-banner.show {
  display: block;
}

.completion-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.completion-banner-head strong {
  font-size: 18px;
}

.completion-banner p {
  margin: 6px 0 0;
  line-height: 1.6;
}

.workflow-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
  align-items: start;
}

.workflow-card {
  border: 1px solid #d8e1ea;
  border-radius: 16px;
  padding: 18px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  box-shadow: 0 12px 26px rgba(18, 48, 76, 0.06);
}

.workflow-card-wide {
  grid-column: 1 / -1;
}

.workflow-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  cursor: pointer;
}

.workflow-card-head::after {
  content: "-";
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #2c6ec9;
  background: linear-gradient(180deg, #2f82f5 0%, #185bb5 100%);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 8px 18px rgba(24, 91, 181, 0.24);
}

.workflow-card-head.with-status {
  align-items: center;
}

.workflow-card-head h2 {
  margin: 0 0 6px;
  font-size: clamp(18px, 2vw, 21px);
  color: #173651;
}

.workflow-card-head p {
  margin: 0;
  color: #5a697a;
  line-height: 1.55;
}

.workflow-step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(180deg, var(--stage-accent) 0%, var(--stage-accent-dark) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(22, 88, 164, 0.22);
}

.workflow-step-copy {
  flex: 1;
}

.workflow-step-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #c6d3e2;
  background: #f3f7fb;
  color: #496176;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.workflow-step-status.pending {
  border-color: #c6d3e2;
  background: #f3f7fb;
  color: #496176;
}

.workflow-step-status.current {
  border-color: var(--stage-accent);
  background: var(--stage-accent-soft);
  color: var(--stage-accent-ink);
  box-shadow: 0 0 0 4px rgba(27, 90, 165, 0.12);
}

.workflow-step-status.done {
  border-color: #6db26c;
  background: #eaf9ea;
  color: #216b31;
}

.workflow-step-status.done::before {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  margin-right: 6px;
  margin-top: -1px;
}

.workflow-card.step-current {
  border-color: var(--stage-accent);
  background: linear-gradient(180deg, #ffffff 0%, var(--stage-accent-soft) 100%);
  box-shadow: 0 14px 28px rgba(27, 90, 165, 0.12);
}

.workflow-card.step-complete {
  border-color: #b8d8bb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fff8 100%);
}

.workflow-card.accordion-collapsed > :not(.workflow-card-head) {
  display: none !important;
}

.workflow-card.accordion-collapsed .workflow-card-head {
  margin-bottom: 0;
}

.workflow-card.accordion-collapsed .workflow-card-head::after {
  content: "+";
  border-color: #c62828;
  background: linear-gradient(180deg, #ff6b6b 0%, #d32f2f 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(211, 47, 47, 0.22);
}

.workflow-row {
  margin-bottom: 0;
}

.workflow-file-name {
  margin-top: 12px;
  display: grid;
  gap: 4px;
}

.workflow-file-name strong {
  color: #173651;
  word-break: break-word;
}

.workflow-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.workflow-action-grid-single {
  grid-template-columns: 1fr;
}

.workflow-action-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-progress-box {
  padding: 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f7fbff 0%, #eef6ff 100%);
  border: 1px solid #d7e3f0;
}

.workflow-progress-box progress {
  height: 24px;
}

.workflow-progress-meta {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.workflow-progress-meta strong {
  font-size: clamp(20px, 2.6vw, 24px);
  color: #123a63;
}

.workflow-link-btn {
  min-height: 46px;
  padding: 10px 16px;
}

.workflow-row > input[type="file"] {
  flex: 1 1 240px;
  min-width: 0;
}

.workflow-row > button,
.workflow-row > a {
  flex: 1 1 180px;
}

.workflow-inline-actions {
  margin-bottom: 0;
}

.workflow-inline-actions-2 > * {
  flex: 1 1 220px;
}

.workflow-inline-actions-3 > * {
  flex: 1 1 180px;
}

.to-distribution-link {
  background: var(--stage-accent);
  border-color: var(--stage-accent-dark);
  color: #fff;
}

.to-distribution-link:hover {
  background: var(--stage-accent-dark);
}

.distribution-panel {
  margin-top: 14px;
}

.distribution-panel h2 {
  margin: 4px 0 8px;
}

.admin-panel {
  margin-top: 14px;
}

.admin-add-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.check-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #ccd8e6;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fbfdff;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 950px;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.admin-table th,
.admin-table td {
  border: 1px solid #c7d3e0;
  padding: 6px 8px;
  vertical-align: middle;
}

.admin-table th {
  background: #edf4fb;
  text-align: left;
}

.admin-table .center {
  text-align: center;
}

.admin-table input[type="text"],
.admin-table input[type="password"],
.admin-table input[type="email"] {
  width: 100%;
}

.dist-controls {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 14px;
}

.dist-input-group {
  display: grid;
  gap: 8px;
}

.dist-input-head {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dist-input-head label {
  margin: 0;
}

.dist-input-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dist-file-hint {
  min-height: 18px;
  line-height: 18px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dist-input-group textarea {
  border: 1px solid #ccd8e6;
  border-radius: 8px;
  padding: 9px 10px;
  min-height: 72px;
  max-height: 180px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  overflow-y: auto;
  overflow-x: hidden;
  white-space: pre-wrap;
  word-break: break-word;
}

.dist-select {
  border: 1px solid #ccd8e6;
  border-radius: 8px;
  padding: 9px 10px;
  min-height: 42px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

.row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.row.vertical {
  align-items: flex-start;
  flex-direction: column;
}

.muted {
  color: #536174;
}

.status-box {
  width: 100%;
  min-height: 46px;
  border: 1px solid #ccd8e6;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

progress {
  width: 100%;
  height: 18px;
}

.dist-result.hidden {
  display: none;
}

.dist-cards {
  display: grid;
  grid-template-columns: repeat(7, minmax(90px, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.dist-card {
  border: 1px solid #cad5e4;
  border-radius: 10px;
  background: #f8fbff;
  padding: 10px 8px;
  text-align: center;
  font-size: 13px;
}

.dist-card strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.dist-validation {
  margin: 6px 0 14px;
  font-weight: 600;
}

.dist-validation.ok {
  color: #0a7c3d;
}

.dist-validation.bad {
  color: #b01c1c;
}

.dist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 12px;
}

.dist-table-wrap h4 {
  margin: 0 0 6px;
}

.dist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.dist-table th,
.dist-table td {
  border: 1px solid #c7d3e0;
  padding: 6px 8px;
  text-align: left;
}

.dist-table th {
  background: #edf4fb;
}

.distribution-stage {
  max-width: 1280px;
}

.integrated-stage {
  margin-top: 24px;
}

.mapping-stage-panel {
  max-width: 1280px;
}

.mapping-embed-frame {
  width: 100%;
  min-height: 1200px;
  border: 1px solid #d0dcea;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 34px rgba(24, 63, 96, 0.14);
}

.mapping-embed-frame.hidden {
  display: none;
}

.dist-upload-box {
  margin-bottom: 0;
  border: 1px solid #cdd7e5;
  border-radius: 10px;
  background: #f8fbff;
  padding: 12px;
}

.dist-upload-label {
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
}

.drop-zone {
  border: 2px dashed #8ba7c6;
  border-radius: 10px;
  padding: 14px;
  background: #ffffff;
}

.drop-zone.dragover {
  border-color: #1768c8;
  background: #edf5ff;
}

.dist-legacy-board {
  margin-top: 12px;
  border: 1px solid #6d6d6d;
  background: #dcdcdc;
  padding: 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.dist-legacy-board.hidden {
  display: none;
}

.dist-report-sheet {
  min-width: 1220px;
  width: 1220px;
  margin: 0 auto;
}

.dist-report-title {
  border: 2px solid #323232;
  background: #f6f6f6;
  text-align: center;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 10px 8px;
  margin-bottom: 10px;
}

.dist-report-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 10px;
}

.dist-head-card-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(84px, 1fr));
  gap: 8px;
}

.dist-head-card {
  border: 2px solid #515151;
  background: #efefef;
  text-align: center;
  display: grid;
  grid-template-rows: auto auto auto;
}

.dist-head-label {
  border-bottom: 1px solid #6f6f6f;
  font-size: 28px;
  font-weight: 700;
  padding: 4px 4px;
}

.dist-head-value {
  font-size: 34px;
  font-weight: 700;
  padding: 4px 4px 2px;
}

.dist-head-pct {
  border-top: 1px solid #6f6f6f;
  font-size: 18px;
  font-weight: 700;
  padding: 2px 4px 4px;
}

.dist-report-columns {
  display: grid;
  grid-template-columns: 240px 1fr 1fr 300px 230px;
  gap: 8px;
  align-items: start;
}

.dist-col-stack {
  display: grid;
  gap: 8px;
}

.dist-block {
  border: 2px solid #565656;
  background: #f0f0f0;
}

.dist-block-title {
  border-bottom: 1px solid #6c6c6c;
  background: #e4e4e4;
  padding: 6px 8px;
  font-size: 28px;
  font-weight: 700;
}

.dist-legacy-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
  font-size: 24px;
}

.dist-legacy-table th,
.dist-legacy-table td {
  border: 1px solid #6d6d6d;
  padding: 4px 6px;
  overflow-wrap: anywhere;
}

.dist-legacy-table th {
  background: #ececec;
  text-align: left;
}

.dist-legacy-table .num {
  width: 72px;
  text-align: right;
  font-weight: 700;
}

@media (max-width: 700px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .stage-nav {
    width: 100%;
  }

  .stage-tab {
    flex: 1;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .top-actions > * {
    flex: 1 1 100%;
  }

  .top-actions form {
    width: 100%;
  }

  .top-actions form button,
  .top-actions a,
  .top-actions button,
  .session-timer {
    width: 100%;
  }

  .panel {
    padding: 14px;
  }

  h1 {
    font-size: 22px;
  }

  .stage-summary-grid {
    grid-template-columns: 1fr;
  }

  .workflow-action-grid {
    grid-template-columns: 1fr;
  }

  .workflow-progress-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .workflow-card-head.with-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .workflow-step-status {
    width: 100%;
    justify-content: center;
  }

  .workflow-card-head::after {
    width: 100%;
  }

  .stage-summary-card {
    padding: 12px 14px;
  }

  .stage-summary-value {
    font-size: 18px;
  }

  .stage-summary-value.small {
    font-size: 14px;
  }

  .dist-controls {
    grid-template-columns: 1fr;
  }

  .dist-cards {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
  }

  .dist-grid {
    grid-template-columns: 1fr;
  }

  .admin-add-form {
    grid-template-columns: 1fr;
  }

  .stage-next-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .stage-next-actions {
    width: 100%;
  }

  .primary-link-btn,
  .secondary-link-btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .app-body {
    padding: 8px;
  }

  .topbar,
  .stage-nav,
  .panel,
  .topbar-wide,
  .stage-nav.stage-nav-wide {
    width: 100%;
  }

  .topbar {
    gap: 10px;
    margin-bottom: 12px;
  }

  .stage-nav {
    gap: 6px;
    margin-bottom: 8px;
  }

  .stage-tab {
    min-width: 0;
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 8px;
  }

  h1 {
    font-size: 20px;
    line-height: 1.3;
  }

  .subtext {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .panel {
    padding: 12px;
    border-radius: 12px;
  }

  .workflow-status-panel,
  .stage-guidance,
  .stage-next-panel,
  .workflow-card,
  .stage-summary-card {
    padding: 12px;
    border-radius: 12px;
  }

  .workflow-status-box,
  .status-box {
    min-height: 0;
    padding: 10px;
    font-size: 14px;
    line-height: 1.5;
  }

  .stage-summary-grid {
    gap: 10px;
  }

  .stage-summary-label {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .stage-summary-value {
    font-size: 17px;
  }

  .stage-summary-value.small {
    font-size: 13px;
  }

  .workflow-card-head {
    gap: 10px;
    margin-bottom: 12px;
  }

  .workflow-card-head h2 {
    font-size: 18px;
  }

  .workflow-card-head p,
  .workflow-card-note,
  .stage-next-head p,
  .stage-guidance-list {
    font-size: 13px;
    line-height: 1.55;
  }

  .workflow-step-no {
    min-width: 30px;
    height: 30px;
    font-size: 14px;
    border-radius: 8px;
  }

  .workflow-step-status {
    min-height: 28px;
    font-size: 11px;
    padding: 4px 8px;
  }

  .workflow-row {
    gap: 8px;
  }

  .workflow-row > * {
    flex: 1 1 100%;
    width: 100%;
  }

  .workflow-action-grid {
    gap: 8px;
  }

  .workflow-progress-box {
    padding: 12px;
  }

  .workflow-progress-box progress {
    height: 20px;
  }

  .workflow-progress-meta strong {
    font-size: 18px;
  }

  .top-actions {
    gap: 6px;
  }

  .sample-template-btn,
  .session-timer,
  .top-actions button,
  .top-actions form button {
    min-height: 36px;
    font-size: 13px;
    padding: 8px 10px;
  }

  .dist-upload-box,
  .drop-zone {
    padding: 10px;
  }

  .dist-input-head {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .dist-input-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .dist-input-actions > * {
    flex: 1 1 100%;
    width: 100%;
  }

  .dist-file-hint {
    min-height: 0;
    line-height: 1.45;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }

  .dist-input-group textarea,
  .dist-select,
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="file"] {
    font-size: 16px;
  }

  .dist-report-title {
    font-size: 18px;
    line-height: 1.35;
    padding: 8px 6px;
  }

  .dist-head-card-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .dist-head-label {
    font-size: 14px;
  }

  .dist-head-value {
    font-size: 18px;
  }

  .dist-head-pct {
    font-size: 11px;
  }

  .dist-block-title {
    font-size: 15px;
  }

  .dist-legacy-table {
    font-size: 13px;
  }

  .dist-legacy-table .num {
    width: 56px;
  }

  .dist-report-sheet {
    min-width: 980px;
    width: 980px;
  }
}

@media (max-width: 1280px) {
  .dist-report-title {
    font-size: 26px;
  }

  .dist-head-label {
    font-size: 22px;
  }

  .dist-head-value {
    font-size: 26px;
  }

  .dist-head-pct {
    font-size: 14px;
  }

  .dist-block-title {
    font-size: 18px;
  }

  .dist-legacy-table {
    font-size: 15px;
  }

  .dist-report-columns {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }
}

@media (max-width: 900px) {
  .workflow-action-grid-3 {
    grid-template-columns: 1fr;
  }

  .dist-legacy-board {
    overflow-x: auto;
  }

  .dist-head-card-row {
    grid-template-columns: repeat(4, minmax(80px, 1fr));
  }

  .dist-report-top {
    grid-template-columns: 1fr;
  }

  .dist-report-columns {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 6mm;
  }

  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
    margin: 0;
    padding: 0;
  }

  .topbar,
  .dist-upload-box,
  .dist-controls,
  #distStatus {
    display: none !important;
  }

  .panel.distribution-stage {
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  #distBoard {
    display: block !important;
    margin: 0 !important;
    border: 0 !important;
    padding: 0 !important;
    background: #fff !important;
    transform: scale(0.74);
    transform-origin: top left;
    width: 136%;
    overflow: visible !important;
  }

  #distBoard .dist-report-sheet {
    min-width: 0 !important;
    width: 100% !important;
  }

  .dist-report-title {
    font-size: 18px !important;
    margin-bottom: 4px !important;
    padding: 4px !important;
  }

  .dist-report-top {
    grid-template-columns: 1fr !important;
  }

  .dist-head-card-row {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
  }

  .dist-head-label {
    font-size: 11px !important;
    padding: 2px !important;
  }

  .dist-head-value {
    font-size: 12px !important;
    padding: 2px !important;
  }

  .dist-head-pct {
    font-size: 9px !important;
    padding: 1px !important;
  }

  .dist-block-title {
    font-size: 9px !important;
    padding: 2px 3px !important;
  }

  .dist-report-columns {
    grid-template-columns: 240px 1fr 1fr 300px 230px !important;
    gap: 6px !important;
  }

  .dist-legacy-table {
    font-size: 7px !important;
  }

  .dist-legacy-table th,
  .dist-legacy-table td {
    padding: 1px !important;
  }

  .dist-validation {
    margin: 2px 0 4px !important;
    font-size: 10px !important;
  }
}
.single-workspace-body {
  background:
    radial-gradient(circle at top left, rgba(54, 123, 168, 0.12), transparent 26%),
    linear-gradient(180deg, #edf3f7 0%, #f5f8fb 100%);
  color: #0f2b40;
}

.single-workspace-shell,
.single-workspace-main,
.bottom-overview {
  width: min(1480px, calc(100vw - 40px));
  margin: 0 auto;
}

.single-workspace-shell {
  padding-top: 16px;
}

.hero-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
  gap: 18px;
  align-items: stretch;
  background: linear-gradient(135deg, #1f6788 0%, #184b6a 100%);
  border: 1px solid #1d4b64;
  border-radius: 18px;
  padding: 24px 26px;
  color: #fff;
  box-shadow: 0 18px 32px rgba(13, 45, 63, 0.14);
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(34px, 4.9vw, 64px);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.hero-copy p {
  margin: 12px 0 0;
  max-width: 760px;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
}

.hero-side {
  display: grid;
  gap: 12px;
  align-content: space-between;
  justify-items: end;
}

.hero-account {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.single-workspace-shell .session-timer {
  min-width: 86px;
  background: rgba(10, 41, 59, 0.92);
  color: #ffffff;
  border: 1px solid rgba(169, 215, 239, 0.55);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.toolbar-btn {
  min-height: 46px;
  min-width: 150px;
  border: 1px solid #99aec0;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff 0%, #edf3f7 100%);
  color: #15405b;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  box-shadow: 0 2px 0 rgba(103, 126, 144, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.toolbar-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffffff 0%, #e4eef5 100%);
  transform: translateY(-1px);
}

.toolbar-btn.primary {
  border-color: #285c79;
  background: linear-gradient(180deg, #6ea7c4 0%, #4f8baa 100%);
  color: #fff;
}

.toolbar-btn.toolbar-btn-utility {
  min-width: 124px;
}

.toolbar-btn.toolbar-btn-accent {
  border-color: #80997d;
  background: linear-gradient(180deg, #f8fcf6 0%, #e6f0e3 100%);
  color: #28482c;
}

.toolbar-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.single-workspace-main {
  margin-top: 14px;
}

.sheet-panel {
  border: 1px solid #d5e1e9;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  padding: 14px;
  box-shadow: 0 18px 30px rgba(18, 46, 68, 0.08);
}

.sheet-window-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.command-zone-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.command-zone {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #d7e3eb;
  border-radius: 14px;
}

.command-zone-left {
  background: linear-gradient(180deg, #f7fbff 0%, #edf5fb 100%);
}

.command-zone-right {
  background: linear-gradient(180deg, #fbfdf8 0%, #f0f6eb 100%);
}

.command-zone-label {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #5c7386;
}

.command-zone-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sheet-workspace {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  border: 1px solid #d8e3eb;
  border-radius: 18px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.sheet-results-panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.sheet-results-panel {
  background: #fcfdff;
}

.pane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.pane-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(31, 103, 136, 0.12);
  color: #15506f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pane-badge.accent {
  background: rgba(157, 33, 151, 0.12);
  color: #7f257a;
}

.sheet-panel h2 {
  margin: 10px 0 0;
  font-size: clamp(26px, 2.5vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.pane-subcopy {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #5d7788;
}

.results-head-side {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 220px;
}

.results-head-side progress {
  width: min(320px, 100%);
  height: 16px;
  border-radius: 999px;
  overflow: hidden;
}

.paste-sheet {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1.7fr) minmax(220px, 0.9fr);
  border: 2px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.92);
  min-height: 420px;
}

.paste-sheet-index {
  padding: 14px 8px;
  white-space: pre;
  text-align: right;
  background: rgba(16, 50, 68, 0.1);
  color: #477c36;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 13px;
  line-height: 1.55;
  overflow: hidden;
}

.paste-column {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 420px;
  border-left: 1px solid rgba(17, 54, 74, 0.08);
}

.paste-column:first-of-type {
  border-left: 0;
}

.paste-column-label {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(17, 54, 74, 0.08);
  background: rgba(17, 54, 74, 0.05);
  color: #14415c;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.paste-sheet textarea {
  width: 100%;
  min-height: 420px;
  border: 0;
  resize: vertical;
  padding: 14px 16px;
  color: #12344f;
  background: transparent;
  font-size: 14px;
  line-height: 1.55;
  font-family: "Noto Sans KR", "Malgun Gothic", sans-serif;
}

.voting-column textarea {
  background: rgba(245, 250, 255, 0.88);
}

.paste-sheet textarea:focus {
  outline: none;
}

.sheet-panel-actions button,
.app-modal-actions button {
  min-height: 46px;
  border: 1px solid #0f2e40;
  border-radius: 10px;
  background: #fff;
  color: #0f2f44;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.sheet-panel-actions button.secondary,
.mini-btn {
  background: #eff6fa;
  color: #21465d;
  border-color: #c9dae6;
}

.results-table-wrap {
  overflow: auto;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid #dbe6ee;
  border-radius: 12px;
  max-height: calc(100vh - 280px);
}

.sheet-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 2px 0;
  color: #294a61;
  font-size: 13px;
}

.sheet-page-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sheet-page-nav,
.sheet-page-btn {
  min-width: 38px;
  min-height: 34px;
  border: 1px solid #c8d8e6;
  border-radius: 9px;
  background: #f8fbfe;
  color: #12344f;
  font-weight: 800;
  cursor: pointer;
}

.sheet-page-nav {
  padding: 0 12px;
}

.sheet-page-btn.active {
  border-color: #1e6ed0;
  background: #1e6ed0;
  color: #fff;
  box-shadow: 0 6px 14px rgba(30, 110, 208, 0.22);
}

.sheet-page-nav:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.sheet-page-info {
  margin-left: 6px;
  white-space: nowrap;
  font-weight: 700;
}

.live-results-table {
  width: 100%;
  border-collapse: collapse;
  color: #12344f;
  font-size: 13px;
  background: #fff;
  min-width: 1900px;
}

.live-results-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #dfeaf5;
  color: #0f2f44;
  font-weight: 800;
  white-space: nowrap;
}

.live-results-table th,
.live-results-table td {
  border: 1px solid #d9e2ea;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
  word-break: keep-all;
}

.live-results-table td:first-child,
.live-results-table th:first-child {
  width: 70px;
  text-align: center;
}

.sheet-grid-table td.sheet-edit-cell {
  padding: 0;
  background: #fbfdff;
}

.sheet-grid-table td.sheet-edit-cell.vote-cell {
  background: #f6faff;
}

.sheet-grid-input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.45;
}

.sheet-grid-input:focus {
  background: #edf5ff;
  box-shadow: inset 0 0 0 2px rgba(27, 90, 165, 0.22);
}

.sheet-grid-table td:nth-child(2) .sheet-grid-input {
  min-width: 280px;
}

.sheet-grid-table td:nth-child(3) .sheet-grid-input {
  min-width: 74px;
  text-align: center;
}

.vote-grid-input {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0b61d8;
}

.vote-text {
  color: #0b61d8;
  font-size: 22px;
  font-weight: 900;
  line-height: 1.2;
}

.bottom-status-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 14px;
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border: 1px solid #14384f;
  border-radius: 12px;
  background: rgba(18, 52, 79, 0.96);
  color: #f4fbff;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 12px 28px rgba(10, 31, 47, 0.24);
  z-index: 900;
}

.bottom-status-bar.notice-success {
  border-color: #15713f;
  background: rgba(18, 126, 69, 0.96);
  color: #f3fff8;
  box-shadow: 0 12px 28px rgba(12, 93, 48, 0.24);
}

.live-results-table td:nth-child(2),
.live-results-table th:nth-child(2) {
  min-width: 280px;
}

.live-results-table td:nth-child(5),
.live-results-table th:nth-child(5),
.live-results-table td:nth-child(6),
.live-results-table th:nth-child(6) {
  min-width: 280px;
}

.live-results-table td:nth-child(15),
.live-results-table th:nth-child(15) {
  min-width: 180px;
}

.live-results-table td:nth-child(16),
.live-results-table th:nth-child(16) {
  min-width: 180px;
}

.empty-row td,
.muted-cell {
  color: #7b8e9c;
}

.cell-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.cell-pill.success {
  background: #e5f7eb;
  color: #0f7a3e;
}

.cell-pill.fail {
  background: #fde7ea;
  color: #bb2244;
}

.cell-pill.pending {
  background: #eef3f8;
  color: #5e7890;
}

.class-hit {
  color: #0b61d8;
  font-weight: 800;
  background: rgba(11, 97, 216, 0.12);
}

.bottom-overview {
  display: none;
}

.app-modal[hidden] {
  display: none !important;
}

.app-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 16px;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 32, 0.5);
  backdrop-filter: blur(3px);
}

.reset-confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 16px;
}

.reset-confirm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 32, 0.48);
  backdrop-filter: blur(3px);
}

.reset-confirm-card {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
  border: 1px solid #cbd9e7;
  border-radius: 12px;
  background: #ffffff;
  padding: 22px;
  box-shadow: 0 22px 56px rgba(18, 40, 60, 0.28);
}

.reset-confirm-card p {
  margin: 0 0 18px;
  color: #12344f;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.5;
}

.reset-confirm-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.reset-confirm-yes {
  background: #1768c8;
}

.reset-confirm-no {
  border: 1px solid #c7d4e3;
  background: #f5f9ff;
  color: #173651;
}

.app-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, calc(100vw - 32px));
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 56px rgba(18, 40, 60, 0.28);
  padding: 22px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.app-modal-wide .app-modal-card {
  width: min(1440px, calc(100vw - 32px));
  min-height: min(90vh, 980px);
}

.app-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.app-modal-head h3 {
  margin: 0;
  font-size: 28px;
  color: #12344f;
}

.modal-close-btn {
  border: 1px solid #d2dde7;
  background: #f4f7fa;
  color: #355066;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 700;
  cursor: pointer;
}

.app-modal-help {
  margin: 0 0 12px;
  color: #587184;
  line-height: 1.5;
}

.modal-textarea {
  width: 100%;
  min-height: 240px;
  border: 1px solid #cfdae4;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15px;
  line-height: 1.6;
  resize: vertical;
}

.app-modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.iframe-modal-card {
  display: grid;
  grid-template-rows: auto 1fr;
  height: min(90vh, 980px);
}

.iframe-modal-body {
  min-height: 0;
  overflow: auto;
}

.iframe-modal-body iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 720px;
  border: 0;
  border-radius: 14px;
  background: #f2f5f8;
}

.mini-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.modal-open {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .hero-banner,
  .sheet-workspace,
  .command-zone-bar {
    grid-template-columns: 1fr;
  }

  .hero-side {
    justify-items: start;
  }

  .hero-actions {
    justify-content: flex-start;
  }

}

@media (max-width: 760px) {
  .single-workspace-shell,
  .single-workspace-main {
    width: min(100vw - 20px, 100%);
  }

  .hero-copy h1 {
    font-size: 40px;
  }

  .sheet-panel h2 {
    font-size: 30px;
  }

  .sheet-workspace {
    grid-template-columns: 1fr;
  }

  .command-zone-buttons {
    flex-direction: column;
  }

  .app-modal-card,
  .app-modal-wide .app-modal-card {
    width: calc(100vw - 18px);
    padding: 16px;
  }
}

.embedded-distribution {
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.92), transparent 28%),
    linear-gradient(180deg, #e8f0f6 0%, #f3f7fa 46%, #eef4f8 100%);
  min-height: auto;
}

.embedded-distribution .distribution-embed-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 18px;
  background: transparent;
}

.distribution-embed-summary {
  margin-bottom: 18px;
}

.distribution-embed-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.distribution-embed-actions button {
  min-width: 170px;
}

.embedded-distribution .dist-legacy-board {
  padding-bottom: 6px;
}
