@font-face {
  font-family: "Pretendard HJIT";
  src: url("./assets/fonts/Pretendard-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Pretendard HJIT";
  src: url("./assets/fonts/Pretendard-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Pretendard HJIT";
  src: url("./assets/fonts/Pretendard-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Pretendard HJIT";
  src: url("./assets/fonts/Pretendard-Bold.woff2") format("woff2");
  font-weight: 700 800;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Paperlogy HJIT";
  src: url("./assets/fonts/Paperlogy-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Source Han Serif KR HJIT";
  src: url("./assets/fonts/SourceHanSerifKR-Heavy.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Paperlogy HJIT";
  src: url("./assets/fonts/Paperlogy-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: block;
}

@font-face {
  font-family: "Esamanru HJIT";
  src: url("./assets/fonts/Esamanru-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

:root {
  color-scheme: light;
  --headline-font: "Esamanru HJIT", "Paperlogy HJIT", "Pretendard HJIT", "Malgun Gothic", sans-serif;
  --title-font: "Paperlogy HJIT", "Pretendard HJIT", "Malgun Gothic", sans-serif;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --text: #1f2935;
  --muted: #627184;
  --text-muted: #627184;
  --line: #dbe5ef;
  --line-strong: #9db3cc;
  --soft: #eef5ff;
  --brand-dark: #051469;
  --brand-blue: #1e64dc;
  --brand-cyan: #00cdff;
  --primary: #051469;
  --primary-dark: #051469;
  --accent: #051469;
  --accent-strong: #1e64dc;
  --danger: #a33b32;
  --ok: #1f6f45;
  --warn: #8b651d;
  --shadow: 0 10px 24px rgba(23, 38, 65, 0.05);
  --radius: 8px;
  font-family: "Pretendard HJIT", "Pretendard", "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard HJIT", "Pretendard", "Segoe UI", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-weight: 500;
  letter-spacing: 0;
  overflow-x: hidden;
}

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

a {
  color: inherit;
}

.app-shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 0 24px;
}

.topbar,
.admin-topbar,
.print-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 0 22px;
}

.admin-topbar {
  align-items: center;
}

.admin-topbar .brand {
  align-items: center;
}

.brand {
  display: flex;
  align-items: flex-end;
  gap: 34px;
  flex: 1 1 auto;
  min-width: 0;
}

.brand-logo {
  width: 326px;
  height: 62px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}

.brand-title {
  display: inline-grid;
  gap: 4px;
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
  min-width: 0;
}

.eyebrow,
.section-label {
  margin: 0 0 5px;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 600;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: var(--title-font);
  margin-bottom: 0;
  color: var(--brand-dark);
  font-size: 28px;
  line-height: 1.25;
  font-weight: 800;
  word-break: keep-all;
}

.health-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  flex-wrap: nowrap;
  width: max-content;
  max-width: 100%;
}

.health-title-main {
  display: inline;
  color: var(--brand-dark);
  font-family: var(--headline-font);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.14;
  word-break: keep-all;
  white-space: nowrap;
}

h2 {
  font-family: var(--headline-font);
  margin-bottom: 0;
  font-size: 22px;
  line-height: 1.32;
  font-weight: 700;
  word-break: keep-all;
}

h3 {
  margin-bottom: 12px;
  font-size: 18px;
}

.period,
.score-pill {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.period span,
.score-pill span {
  display: inline;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.period strong,
.score-pill strong {
  font-size: 15px;
  font-weight: 800;
}

.workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.step-rail {
  position: sticky;
  top: 18px;
  align-self: start;
  padding: 14px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.step-rail::before {
  content: "";
  position: absolute;
  top: 45px;
  height: 186px;
  left: 14px;
  border-left: 1px dashed var(--line-strong);
}

.step-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 0;
  border-radius: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.step-item span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
}

.step-item p {
  font-family: var(--title-font);
  margin: 0;
  font-weight: 700;
}

.step-item.is-active {
  background: transparent;
  color: var(--text);
}

.step-item.is-active span {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.screen {
  display: none;
  min-height: 520px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.screen.is-active {
  display: block;
}

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

.login-form {
  width: min(560px, 100%);
  margin-top: 22px;
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px auto;
  align-items: end;
  gap: 12px;
}

.review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  align-items: end;
  gap: 16px;
  margin-top: 18px;
}

.review-grid .field {
  min-width: 0;
}

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

.field label {
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 0 16px;
  outline: none;
}

textarea {
  min-height: 92px;
  padding: 14px 16px;
  line-height: 1.5;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(0, 205, 255, 0.16);
}

button,
.primary-button,
.secondary-button {
  font-family: var(--title-font);
  min-height: 54px;
  border: 0;
  border-radius: 6px;
  padding: 0 17px;
  cursor: pointer;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

button[type="submit"],
.primary-button {
  background: var(--accent);
  color: #fff;
}

button[type="submit"]:hover,
.primary-button:hover {
  background: var(--accent-strong);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.error-text {
  min-height: 24px;
  margin: 10px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.input-hint,
.panel-help,
.attachment-help {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.attachment-help span {
  display: block;
}

.attachment-help span + span {
  margin-top: 3px;
}

.question-progress {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.person-card {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdff;
}

.person-card div,
.summary-box div,
.review-person div {
  min-width: 0;
}

.meta-label {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.meta-value {
  margin: 0;
  font-weight: 700;
  word-break: keep-all;
}

.notice-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

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

.notice-card h3,
.stat-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.notice-card p,
.stat-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.question-list {
  display: grid;
  gap: 14px;
}

.question-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.question-card.is-hidden,
.submission-attachment-box.is-hidden,
.confirm-panel.is-hidden {
  display: none;
}

.question-card.is-revealing,
.submission-attachment-box.is-revealing,
.confirm-panel.is-revealing {
  animation: revealBlock 0.22s ease-out both;
}

@keyframes revealBlock {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-top {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.question-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--soft);
  color: var(--brand-dark);
  font-weight: 800;
}

.question-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.45;
}

.question-guide {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.question-points {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 8px;
}

.segmented label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  text-align: center;
}

.segmented input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.segmented label:has(input:checked) {
  border-color: var(--brand-blue);
  background: var(--soft);
  color: var(--brand-dark);
}

.attachment-box {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.submission-attachment-box {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.submission-attachment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 10px;
}

.submission-attachment-head h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 20px;
  line-height: 1.35;
  font-weight: 900;
  word-break: keep-all;
}

.submission-attachment-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.attachment-description {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.attachment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 10px;
}

.attachment-head strong {
  color: var(--text);
  font-size: 14px;
}

.attachment-head span,
.attachment-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.attachment-dropzone {
  position: relative;
  display: flex;
  min-height: 82px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--brand-dark);
  cursor: pointer;
  transition:
    border-color 0.18s ease,
    background 0.18s ease;
}

.attachment-dropzone:hover,
.attachment-dropzone.is-dragging {
  border-color: var(--brand-blue);
  background: #f7faff;
}

.attachment-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.attachment-drop-icon {
  position: relative;
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.attachment-drop-icon::before,
.attachment-drop-icon::after {
  content: "";
  position: absolute;
  background: var(--brand-dark);
}

.attachment-drop-icon::before {
  width: 14px;
  height: 2px;
}

.attachment-drop-icon::after {
  width: 2px;
  height: 14px;
}

.attachment-drop-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.attachment-drop-copy strong {
  color: var(--brand-dark);
  font-size: 15px;
}

.attachment-drop-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
}

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

.attachment-file {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #b9d4ff;
  border-radius: 6px;
  background: #f7faff;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.attachment-file > div:first-child {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.attachment-file span,
.attachment-file a {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--brand-dark);
  text-decoration: none;
}

.attachment-file small {
  color: var(--muted);
  font-size: 12px;
}

.attachment-file.is-uploaded {
  border-color: #bce8d9;
  background: #f2fbf8;
}

.attachment-file.is-pending {
  border-color: #b9d4ff;
  background: #f7faff;
}

.attachment-file.is-failed {
  border-color: #e7b9b4;
  background: #fffafa;
}

.attachment-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.attachment-badge.is-pending {
  background: #e8f1ff;
  color: #0b3f91;
}

.attachment-badge.is-uploaded {
  background: #e7f8f3;
  color: #116149;
}

.attachment-badge.is-failed {
  background: #ffe4e2;
  color: #a33b32;
}

.attachment-actions {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.attachment-actions button {
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.attachment-status {
  margin: 0;
}

.attachment-status.is-empty {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px dashed #b9d4ff;
  border-radius: 6px;
  background: #f7faff;
  color: #627184;
}

.review-evidence {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

#submittedEvidence .review-evidence {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

#submittedSignature .review-evidence {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.review-evidence strong {
  color: var(--text);
  font-size: 13px;
}

.review-evidence div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-evidence a {
  display: inline-flex;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.submitted-signature img {
  display: block;
  width: min(420px, 100%);
  height: 120px;
  object-fit: contain;
  object-position: left center;
}

.confirm-panel,
.summary-box {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdff;
}

.confirm-panel h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 900;
}

.signature-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid #b7c8e6;
  border-radius: 6px;
  background: #f7faff;
}

.signature-summary-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.signature-summary strong {
  display: block;
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 800;
}

.signature-summary.is-signed {
  border-color: var(--line);
  background: #fff;
}

.signature-summary.is-signed strong {
  color: var(--brand-dark);
}

.signature-preview {
  display: block;
  width: min(430px, 56vw);
  height: 92px;
  object-fit: contain;
  object-position: left center;
}

.signature-action-button {
  min-width: 128px;
  min-height: 46px;
  padding-inline: 22px;
  font-size: 1rem;
}

.signature-field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

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

.signature-head label {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 800;
}

.signature-pad {
  position: relative;
  height: 170px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
}

.signature-pad canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.signature-pad span {
  position: absolute;
  right: 16px;
  bottom: 12px;
  color: #a7b0ad;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.signature-modal {
  width: min(720px, 100%);
}

.signature-modal .signature-pad {
  height: min(300px, 42vh);
}

.signature-privacy-check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fbff;
  color: var(--text);
  cursor: pointer;
}

.signature-privacy-check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand-dark);
}

.signature-privacy-check strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
}

.signature-privacy-check small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}

.signature-modal .modal-actions {
  margin-top: 18px;
}

.form-actions,
.modal-actions,
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.done-note {
  margin-top: 16px;
  color: var(--muted);
}

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

.footer-note {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 8px 18px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 22px 2px 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  text-align: right;
  word-break: keep-all;
}

.footer-note a {
  color: var(--brand-dark);
  font-weight: 700;
}

.admin-shell {
  min-height: 100vh;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 24px;
}

.oauth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: var(--page-bg);
}

.oauth-panel {
  width: min(720px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(20, 43, 86, 0.08);
}

.oauth-panel h1 {
  margin-bottom: 10px;
  color: var(--brand-dark);
  font-size: 28px;
}

.oauth-panel p {
  color: var(--muted);
  line-height: 1.6;
}

.oauth-status {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}

.oauth-status p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fcfdff;
}

.oauth-status strong {
  color: var(--text);
}

.oauth-status span {
  font-weight: 800;
}

.is-ok {
  color: var(--success);
}

.is-waiting {
  color: var(--danger);
}

.oauth-copy {
  display: grid;
  gap: 8px;
}

.oauth-copy textarea {
  min-height: 56px;
  resize: none;
  font-size: 14px;
}

.oauth-copy p {
  margin: 0;
  font-size: 13px;
}

.oauth-actions {
  justify-content: space-between;
}

.admin-main {
  max-width: 1120px;
  margin: 0 auto;
}

.admin-login-panel,
.admin-content {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.admin-login-panel {
  display: block;
  width: 100%;
  margin-top: 18px;
}

.admin-login-panel > div {
  display: none;
}

.admin-login-panel .admin-login-grid {
  max-width: 760px;
  margin: 0 auto;
}

.period-context {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.period-context h2 {
  margin-bottom: 4px;
}

.period-context p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.period-select-field {
  display: grid;
  gap: 8px;
}

.period-select-field label {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.admin-tabs button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.admin-tabs button.is-active {
  border-color: var(--brand-dark);
  background: var(--brand-dark);
  color: #fff;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) repeat(3, minmax(130px, 160px)) auto auto auto;
  align-items: end;
  gap: 12px;
  margin: 18px 0 16px;
}

.admin-toolbar .field {
  min-width: 0;
}

.admin-toolbar .secondary-button {
  min-height: 54px;
}

.compact-filter select {
  min-height: 54px;
}

.admin-panel {
  display: none;
}

.admin-panel.is-active {
  display: block;
}

.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.period-target-head {
  margin: 22px 0 10px;
}

.period-target-head h3 {
  margin: 0 0 4px;
  color: var(--brand-dark);
  font-size: 18px;
}

.period-target-head p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.period-history-wrap {
  margin-top: 14px;
}

.panel-note {
  margin: -6px 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.period-name-preview {
  min-height: 42px;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-muted);
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 800;
}

.period-target-picker {
  padding-top: 4px;
}

.period-target-picker-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.period-target-picker-head h3 {
  margin: 0 0 4px;
  color: var(--brand-dark);
  font-size: 16px;
}

.period-target-picker-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.period-target-picker-list {
  display: block;
  max-height: 300px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.target-picker-row {
  display: grid;
  grid-template-columns: 32px 1.1fr 1.3fr 1fr 1fr;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.target-picker-row:last-child {
  border-bottom: 0;
}

.target-picker-row:hover {
  background: var(--surface-muted);
}

.target-picker-row input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--brand-dark);
}

.target-picker-row strong {
  color: var(--text);
}

.target-picker-row span {
  color: var(--muted);
}

.period-question-picker {
  padding-top: 4px;
}

.period-question-list {
  display: grid;
  gap: 8px;
}

.question-type-group {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.question-type-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

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

.question-type-head h3 {
  margin: 0;
  color: var(--brand-dark);
  font-size: 15px;
}

.period-question-row {
  display: grid;
  grid-template-columns: 32px minmax(220px, 1.6fr) 86px minmax(220px, 1.2fr) auto;
  gap: 8px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.period-question-number {
  display: grid;
  width: 28px;
  height: 34px;
  place-items: center;
  color: var(--brand-dark);
}

.period-question-row .field {
  gap: 6px;
}

.period-question-row .field label {
  font-size: 12px;
  font-weight: 800;
}

.period-question-row input:not([type="checkbox"]):not([type="radio"]) {
  min-height: 38px;
  padding: 0 10px;
  font-size: 13px;
}

.admin-login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.admin-login-grid .error-text {
  grid-column: 1 / -1;
}

.is-hidden {
  display: none !important;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 10px;
  margin: 18px 0;
}

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

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

.compact-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.muted-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-field {
  flex: 1;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: var(--surface-muted);
  color: var(--text);
  font-size: 13px;
}

.admin-table tr:last-child td {
  border-bottom: 0;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: var(--soft);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

.status-chip.ok {
  background: #dff4e9;
  color: var(--ok);
}

.status-chip.warn {
  background: #fff0d5;
  color: var(--warn);
}

.status-chip.danger {
  background: #ffe4e2;
  color: var(--danger);
}

.work-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.work-type-officeAdmin,
.work-type-businessSupportLead,
.work-type-equipmentAdmin {
  border-color: #d6dde6;
  background: #f2f4f7;
  color: #4b5563;
}

.work-type-cfsLead {
  border-color: #c7d2fe;
  background: #eef2ff;
  color: #3730a3;
}

.work-type-cfsSupervisor,
.work-type-vesselForeman,
.work-type-signalSupervisor,
.work-type-rmqc,
.work-type-armgcRcs {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #075985;
}

.work-type-itVendor,
.work-type-facilityWorks,
.work-type-equipmentMaintenance {
  border-color: #b9d4ff;
  background: #e8f1ff;
  color: #0b3f91;
}

.work-type-operationsLead,
.work-type-planner,
.work-type-onDock,
.work-type-controlRoom {
  border-color: #bce8d9;
  background: #e7f8f3;
  color: #116149;
}

.target-picker-row .work-type-badge {
  justify-self: start;
}

.person-modal {
  width: min(720px, 100%);
}

.birthdate-auth-modal {
  width: min(460px, 100%);
}

.birthdate-auth-form {
  display: grid;
  gap: 14px;
}

.auth-modal-copy {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.32);
  z-index: 10;
}

.modal-panel {
  width: min(940px, 100%);
  max-height: min(820px, 94vh);
  overflow: auto;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(23, 38, 65, 0.18);
}

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

.modal-close {
  position: relative;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--text-muted);
}

.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.modal-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal-close:hover {
  border-color: var(--line);
  background: var(--surface-muted);
  color: var(--brand-dark);
}

.review-person {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdff;
}

.review-note {
  min-height: 22px;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 700;
}

.review-confirm-check {
  margin: 18px 0 8px;
}

.review-modal .modal-actions {
  margin-top: 24px;
}

.review-modal .error-text:empty {
  min-height: 0;
  margin: 0;
}

.question-list.compact {
  margin-bottom: 16px;
}

.question-list.compact .question-card {
  padding: 14px;
}

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

.item-editor {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdff;
}

.item-editor-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.item-editor-top strong {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 999px;
  background: var(--brand-dark);
  color: #fff;
}

.report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.report-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

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

.report-card h3 {
  margin-bottom: 8px;
  font-size: 15px;
}

.report-card p {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.report-detail-grid .report-card p {
  max-height: 190px;
  overflow: auto;
  line-height: 1.55;
}

.reminder-box {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fcfdff;
}

.reminder-box h3 {
  margin: 0;
  font-size: 15px;
}

.reminder-box textarea {
  min-height: 80px;
  background: #fff;
}

.file-action-button {
  position: relative;
  overflow: hidden;
}

.file-action-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.print-body {
  background: var(--bg);
}

.print-filter {
  display: grid;
  gap: 6px;
  min-width: 150px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.print-filter select {
  min-height: 42px;
  padding: 0 10px;
}

.print-toolbar {
  padding: 20px 24px 0;
}

.print-stack {
  display: grid;
  gap: 18px;
  max-width: 210mm;
  margin: 18px auto 40px;
}

.print-page {
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  padding: 14mm 12mm;
  border: 1px solid #dbe5ef;
  background: #fff;
  box-shadow: var(--shadow);
}

.print-page h2 {
  margin: 0 0 32px;
  text-align: center;
  font-family: "Source Han Serif KR HJIT", "Source Han Serif KR", "Source Han Serif K", Batang, serif;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.25;
  -webkit-text-stroke: 0.35px currentColor;
  text-shadow: 0.25px 0 currentColor, -0.25px 0 currentColor;
}

.print-section {
  margin-top: 16px;
}

.print-page h2 + .print-section {
  margin-top: 0;
}

.print-section h3 {
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-dark);
}

.print-table {
  width: 100%;
  border-collapse: collapse;
}

.print-table th,
.print-table td {
  padding: 9px 10px;
  border: 1px solid #dbe5ef;
  text-align: left;
  vertical-align: top;
}

.print-table th {
  width: 170px;
  background: #eef5ff;
}

.print-center,
.print-info-table th,
.print-info-table td,
.print-comment-table th,
.print-comment-table td,
.print-evaluation-table th {
  text-align: center;
  vertical-align: middle;
}

.print-question-cell {
  text-align: left;
}

.print-comment-table th {
  width: 90px;
}

.print-comment-table td {
  height: 156px;
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  line-height: 1.65;
  white-space: pre-wrap;
}

.print-info-table th {
  width: 110px;
  white-space: nowrap;
}

.print-info-table td {
  min-width: 150px;
  white-space: nowrap;
}

.print-info-table td[colspan] {
  text-align: center;
}

.print-question-cell {
  width: auto;
}

.print-result-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 8px;
  border: 1px solid #dbe5ef;
}

.print-result-summary-item {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  min-height: 38px;
}

.print-result-summary-item + .print-result-summary-item {
  border-left: 1px solid #dbe5ef;
}

.print-result-summary-item span,
.print-result-summary-item strong {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
}

.print-result-summary-item span {
  background: #eef5ff;
  font-weight: 700;
}

.print-result-summary-item strong {
  font-weight: 800;
}

.print-evaluation-table {
  table-layout: fixed;
}

.print-eval-col-question {
  width: 60%;
}

.print-eval-col-points {
  width: 8%;
}

.print-eval-col-self {
  width: 13%;
}

.print-eval-col-external {
  width: 12%;
}

.print-eval-col-score {
  width: 7%;
}

.print-evaluation-table tbody tr {
  height: 62px;
}

.print-evaluation-table tbody td {
  height: 62px;
}

.print-question-text {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 2px;
  line-height: 1.35;
}

.print-evaluation-table td:not(:first-child) {
  text-align: center;
  vertical-align: middle;
}

.signature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.signature-box {
  min-height: 84px;
  padding: 12px;
  border: 1px solid #aebbb6;
}

.signature-box strong {
  display: block;
  margin-bottom: 20px;
}

.confirm-table th,
.confirm-table td {
  text-align: center;
  vertical-align: middle;
}

.confirm-table {
  width: 100%;
  table-layout: fixed;
}

.confirm-col-type {
  width: 17%;
}

.confirm-col-name {
  width: 15%;
}

.confirm-col-department {
  width: 25%;
}

.confirm-col-date {
  width: 24%;
}

.confirm-col-signature {
  width: 19%;
}

.confirm-table th,
.confirm-table td {
  padding: 6px 8px;
  line-height: 1.35;
}

.confirm-table th {
  width: auto;
  white-space: nowrap;
}

.print-signature-mark {
  position: relative;
  display: inline-flex;
  width: 86px;
  height: 30px;
  align-items: center;
  justify-content: center;
  color: #333;
}

.print-signature-mark span {
  font-size: 13px;
  font-weight: 700;
}

.print-signature-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  filter: grayscale(1) brightness(0);
  object-fit: contain;
}

.print-confirm-note {
  margin: 12px 0 0;
  color: #23302b;
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 1320px) and (min-width: 861px) {
  .brand {
    gap: 22px;
  }

  .brand-logo {
    width: 280px;
  }

  .health-title-main {
    font-size: 28px;
  }

  .period,
  .score-pill {
    font-size: 13px;
  }
}

@media (max-width: 860px) {
  .app-shell,
  .admin-shell {
    width: min(100% - 22px, 640px);
    padding-top: 16px;
  }

  .topbar,
  .admin-topbar,
  .print-toolbar,
  .footer-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .brand {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 24px;
  }

  .brand-logo {
    width: min(318px, 100%);
    height: 60px;
  }

  .health-title-main {
    display: block;
    max-width: 100%;
    font-size: 28px;
    line-height: 1.22;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .workspace {
    display: block;
  }

  .step-rail {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 26px;
    padding-top: 0;
    padding-bottom: 18px;
  }

  .step-rail::before {
    top: 20px;
    left: 26px;
    height: calc((42px + 12px) * 3);
    right: auto;
    border-top: 0;
    border-left: 1px dashed var(--line-strong);
  }

  .step-item {
    justify-content: flex-start;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
  }

  .step-item p {
    display: block;
    font-size: 13px;
    font-weight: 700;
  }

  .screen {
    min-height: auto;
    padding: 28px;
  }

  .screen-head,
  .survey-head {
    flex-direction: column;
  }

  .signature-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .signature-summary-main {
    justify-content: space-between;
  }

  .signature-preview {
    width: min(320px, 100%);
    height: 80px;
  }

  .signature-summary .compact-button {
    width: 100%;
  }

  .signature-modal .signature-pad {
    height: 240px;
  }

  .login-grid,
  .admin-form-grid,
  .admin-login-grid,
  .admin-toolbar,
  .admin-login-panel,
  .review-grid,
  .period-context,
  .person-card,
  .notice-grid,
  .stats-grid,
  .report-summary,
  .report-detail-grid,
  .summary-grid,
  .review-person,
  .signature-grid {
    grid-template-columns: 1fr;
  }

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

  .period-target-picker-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .period-target-picker-list {
    grid-template-columns: 1fr;
  }

  .target-picker-row {
    grid-template-columns: 28px minmax(64px, 0.9fr) minmax(96px, 1.2fr) minmax(64px, 0.8fr) minmax(78px, 0.9fr);
    gap: 8px;
  }

  .period-question-row {
    grid-template-columns: 32px 1fr;
  }

  .period-question-row .field,
  .period-question-row button {
    grid-column: 1 / -1;
  }

  .toolbar,
  .form-actions,
  .modal-actions,
  .admin-actions,
  .footer-note {
    align-items: stretch;
    flex-direction: column;
    text-align: left;
  }

  button,
  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  body {
    background: #fff;
  }

  .print-toolbar {
    display: none;
  }

  .print-stack {
    display: block;
    margin: 0;
    max-width: none;
  }

  .print-page {
    width: auto;
    min-height: auto;
    page-break-after: always;
    box-shadow: none;
    border: 0;
    padding: 0;
  }

  .print-page:last-child {
    page-break-after: auto;
  }
}
