/* 新規申請画面全体・共通レイアウト */
.new-request-area {
  --nr-user-col-flex: 3;
  --nr-viewer-col-flex: 8;
  --nr-user-col-width: 500px;
  --nr-user-col-min: 408px;
  --nr-user-col-max: 760px;
  --nr-resizer-width: 10px;
  --nr-thumb-col-width: 180px;
  --nr-thumb-col-min: 160px;
  --nr-thumb-col-max: 220px;
  --nr-title-width: 260px;
  --nr-title-gap: var(--ds-space-4);
  --nr-empty-shell-inline-pad: clamp(24px, 4vw, 52px);
  --nr-empty-shell-top-pad: clamp(76px, 10vh, 120px);
  --nr-empty-shell-bottom-pad: clamp(32px, 8vh, 72px);
  --nr-empty-shell-max-width: min(440px, calc(100% - (var(--nr-empty-shell-inline-pad) * 2)));
  --nr-empty-guidance-max-width: min(520px, calc(100% - (var(--nr-empty-shell-inline-pad) * 2)));
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 var(--ds-space-5);
  padding: 0;
  border: 1px solid var(--ds-color-border);
  border-radius: var(--ds-radius-lg);
  background-color: #ddd;
  box-shadow: var(--ds-shadow-soft);
  height: calc(100vh - 140px);
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}

.new-request-area[data-layout-mode="compact"] {
  --nr-user-col-flex: 3.15;
  --nr-viewer-col-flex: 7.6;
  --nr-user-col-width: 456px;
  --nr-user-col-min: 380px;
  --nr-user-col-max: 620px;
  --nr-thumb-col-width: 164px;
  --nr-thumb-col-min: 152px;
  --nr-thumb-col-max: 188px;
  --nr-empty-shell-inline-pad: clamp(20px, 3vw, 40px);
  --nr-empty-shell-max-width: min(396px, calc(100% - (var(--nr-empty-shell-inline-pad) * 2)));
  --nr-empty-guidance-max-width: min(460px, calc(100% - (var(--nr-empty-shell-inline-pad) * 2)));
}

.new-request-area[data-layout-mode="constrained"] {
  --nr-user-col-flex: 3.05;
  --nr-viewer-col-flex: 7.2;
  --nr-user-col-width: 500px;
  --nr-user-col-min: 400px;
  --nr-user-col-max: 680px;
  --nr-thumb-col-width: 148px;
  --nr-thumb-col-min: 138px;
  --nr-thumb-col-max: 170px;
  --nr-title-width: 220px;
  --nr-title-gap: var(--ds-space-2);
  --nr-empty-shell-inline-pad: 18px;
  --nr-empty-shell-top-pad: clamp(68px, 8vh, 96px);
  --nr-empty-shell-bottom-pad: 24px;
  --nr-empty-shell-max-width: min(340px, calc(100% - (var(--nr-empty-shell-inline-pad) * 2)));
  --nr-empty-guidance-max-width: min(360px, calc(100% - (var(--nr-empty-shell-inline-pad) * 2)));
}

.new-request-area[data-request-stage="editing"] {
  border-style: solid;
  border-color: var(--ds-color-border);
  background-color: #ddd;
}

.new-request-area[data-request-stage="empty"] {
  border-style: dashed;
  border-color: #aebdcd;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.8), transparent 48%),
    linear-gradient(180deg, #f7fbff 0%, #edf3f8 100%);
}

.new-request-title-row {
  display: flex;
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  justify-content: space-between;
  align-items: center;
  gap: var(--ds-space-6);
  margin: var(--ds-space-1) var(--ds-space-2);
  padding: 0;
  min-height: 44px;
}

.new-request-editing-shell {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

.new-request-empty-shell,
.new-request-empty {
  display: none;
}

.new-request-empty-shell[hidden],
.new-request-editing-shell[hidden],
.new-request-empty[hidden] {
  display: none !important;
}

.new-request-area[data-request-stage="editing"] .new-request-empty-shell,
.new-request-area[data-request-stage="editing"] .new-request-empty {
  display: none;
}

.new-request-area[data-request-stage="editing"] .new-request-editing-shell {
  display: flex;
}

.new-request-area[data-request-stage="empty"] .new-request-editing-shell {
  display: none;
}

.new-request-area[data-request-stage="empty"] .template-control-group,
.new-request-area[data-request-stage="empty"] .title-section,
.new-request-area[data-request-stage="empty"] #request-apply-trigger,
.new-request-area[data-request-stage="empty"] #request-apply-popup-root,
.new-request-area[data-request-stage="empty"] .new-request-body {
  display: none !important;
}

.new-request-area[data-request-stage="empty"] .new-request-title-actions {
  margin-left: auto;
  min-width: auto;
  flex: 0 0 auto;
  gap: var(--ds-space-2);
}

.new-request-area[data-request-stage="empty"] .close-request-x-btn {
  width: 40px;
  min-width: 40px;
  height: 40px;
}

.new-request-area[data-request-stage="empty"] .new-request-empty-shell {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    var(--nr-empty-shell-top-pad)
    var(--nr-empty-shell-inline-pad)
    var(--nr-empty-shell-bottom-pad);
  pointer-events: none;
  z-index: 1;
}

.new-request-area[data-request-stage="empty"] .new-request-empty-shell > * {
  pointer-events: auto;
  width: 100%;
  max-width: var(--nr-empty-shell-max-width);
}

.new-request-area[data-request-stage="empty"] .new-request-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding:
    var(--nr-empty-shell-top-pad)
    var(--nr-empty-shell-inline-pad)
    var(--nr-empty-shell-bottom-pad);
  pointer-events: none;
  z-index: 1;
}

.new-request-area[data-request-stage="empty"] .new-request-empty > * {
  pointer-events: auto;
  width: 100%;
  max-width: var(--nr-empty-shell-max-width);
}

.new-request-empty-stack,
.new-request-empty-content,
.new-request-area[data-request-stage="empty"] .new-request-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--ds-space-4);
  text-align: center;
}

.new-request-empty-cta,
.new-request-empty-primary,
.new-request-empty-trigger,
[data-new-request-empty-cta],
[data-empty-primary-cta] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 320px);
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1px solid rgba(83, 134, 191, 0.2);
  background:
    linear-gradient(180deg, rgba(240, 247, 255, 0.98) 0%, rgba(228, 239, 250, 0.98) 100%);
  box-shadow:
    0 16px 34px rgba(85, 122, 164, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: #245789;
  font-size: clamp(16px, 1.45vw, 20px);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

.new-request-empty-message,
.new-request-empty-copy,
.new-request-empty-description,
.new-request-empty-subcopy,
.new-request-empty-hint,
.new-request-empty-drop-hint,
[data-empty-message] {
  width: 100%;
  max-width: var(--nr-empty-guidance-max-width);
  margin: 0;
  color: #66788d;
  font-size: clamp(13px, 1vw, 15px);
  line-height: 1.7;
  letter-spacing: 0.01em;
}
.title-section {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--nr-title-gap);
}
.new-request-title {
  font-size: var(--ds-font-xl);
  line-height: var(--ds-line-compact);
  font-weight: bold;
  text-align: center;
}

.edit-title-input {
  all: unset;
  font-family: "BIZ UDPGothic", sans-serif;
  font-size: var(--ds-font-lg);
  line-height: var(--ds-line-normal);
  font-weight: bold;
  padding: 6px var(--ds-space-5);
  width: var(--nr-title-width);
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--ds-color-surface);
  border: 1px solid var(--ds-color-border);
  border-radius: var(--ds-radius-pill);
}

.edit-title {
  display: inline-flex;
  align-items: center;
  background-color: var(--ds-color-surface-muted);
  padding: 6px var(--ds-space-5);
  border-radius: var(--ds-radius-pill);
  border: none;
  font-size: var(--ds-font-lg);
  line-height: var(--ds-line-normal);
  font-weight: bold;
  transition: background-color 0.2s;
  width: var(--nr-title-width);
  justify-content: center;
}
.edit-title:hover {
  background-color: #ccc;
}
.edit-title-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--nr-title-gap);
}
.edit-title-label {
  font-size: var(--ds-font-md);
  color: var(--ds-color-text-sub);
  line-height: var(--ds-line-normal);
  white-space: nowrap;
  margin: 0;
}

#close-request-btn {
  align-items: center;
  justify-content: center;
  display: inline-flex;
  min-width: 72px;
  height: 36px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: #b42318;
  border: 1px solid #f2c7cc;
  background: #fdecec;
  cursor: pointer;
  border-radius: var(--ds-radius-pill);
  box-shadow: 0 6px 14px rgba(180, 35, 24, 0.12);
  margin-left: -1px;
  position: relative;
  z-index: 1;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
  white-space: nowrap;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

#close-request-btn:hover {
  background: #fadfe2;
  border-color: #e7aeb7;
  transform: translateY(-1px);
}

#close-request-btn:focus-visible {
  outline: 2px solid rgba(180, 35, 24, 0.24);
  outline-offset: 2px;
  z-index: 2;
}

.new-request-title-actions {
  --nr-header-close-x-size: 36px;
  --nr-header-action-gap: var(--ds-space-2);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0;
  min-width: max-content;
  flex: 0 0 auto;
}

.new-request-discard-slot {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.new-request-discard-slot:empty {
  display: none;
}

.close-request-x-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--nr-header-close-x-size);
  min-width: var(--nr-header-close-x-size);
  height: var(--nr-header-close-x-size);
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #516071;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
  flex: 0 0 var(--nr-header-close-x-size);
  margin-left: var(--nr-header-action-gap);
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.close-request-x-btn:hover {
  background: #eef3f8;
  color: #243041;
  transform: translateY(-1px);
}

.close-request-x-btn:focus-visible {
  outline: 2px solid #145174;
  outline-offset: 2px;
}

.request-apply-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  height: 36px;
  padding: 0 18px;
  margin-right: -1px;
  border-top-left-radius: var(--ds-radius-pill);
  border-bottom-left-radius: var(--ds-radius-pill);
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
  font-size: var(--ds-font-md);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.request-apply-trigger.ds-cta-primary-soft {
  background: var(--ds-color-primary-soft);
  border-color: rgba(0, 123, 255, 0.2);
  color: var(--ds-color-primary);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.request-apply-trigger.ds-cta-primary-soft:hover:not(:disabled) {
  background: #deeaff;
  transform: translateY(-1px);
}

.request-apply-trigger[aria-expanded="true"] {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 0 0 3px rgba(0, 123, 255, 0.16);
}

.request-apply-trigger:hover,
.request-apply-trigger:focus-visible {
  z-index: 2;
}

.new-request-apply-popup-root {
  position: absolute;
  top: calc(100% + 10px);
  right: calc(var(--nr-header-close-x-size) + var(--nr-header-action-gap));
  z-index: 21050;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding: 14px 0 0 24px;
}

.new-request-apply-popup-root[hidden] {
  display: none !important;
}

.new-request-apply-popup {
  width: min(360px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--ds-color-border);
  border-radius: 16px;
  background: var(--ds-color-surface);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.new-request-apply-gate {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f9fc;
  color: #243041;
  font-size: 14px;
  line-height: 1.45;
}

.new-request-apply-gate input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.new-request-apply-submit {
  border-radius: 12px;
  height: 44px;
  font-size: var(--ds-font-lg);
  font-weight: 700;
  cursor: pointer;
}

.new-request-apply-submit:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.new-request-body {
  display: flex;
  height: 100%;
  border-radius: 0 0 var(--ds-radius-lg) var(--ds-radius-lg); /* 下のみ角丸、上は角丸なし */
  flex: 1;
  overflow: hidden; /* 追加: 全体の高さを固定し、カラムだけスクロール */
}
.new-request-area .column {
  padding: 0;
  margin: 0;
  border-radius: 0;
  background-color: #eee;
  overflow: hidden; /* 各カラムも高さ固定 */
  box-sizing: border-box;
  height: 100%; /* 追加: カラムの高さを親に合わせる */
}
.new-request-area .column.user-column {
  flex: 0 0 var(--nr-user-col-width);
  width: var(--nr-user-col-width);
  min-width: var(--nr-user-col-min);
  max-width: var(--nr-user-col-max-runtime, var(--nr-user-col-max));
  height: 100%;
  box-sizing: border-box;
}
.new-request-column-resizer {
  flex: 0 0 var(--nr-resizer-width);
  width: var(--nr-resizer-width);
  min-width: var(--nr-resizer-width);
  align-self: stretch;
  position: relative;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
}
.new-request-column-resizer::before {
  content: "";
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 50%;
  width: 2px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(198, 205, 214, 0.7) 0%, rgba(178, 188, 199, 0.8) 100%);
}
.new-request-column-resizer::after {
  content: "";
  position: absolute;
  inset: 0;
}
.new-request-column-resizer:hover::before,
.new-request-column-resizer:focus-visible::before,
.new-request-area[data-user-column-resizing="true"] .new-request-column-resizer::before {
  background: linear-gradient(180deg, #90b9eb 0%, #5f98df 100%);
  box-shadow: 0 0 0 2px rgba(95, 152, 223, 0.14);
}
.new-request-column-resizer:focus-visible {
  outline: none;
}
.new-request-area .column.thumbnail-column {
  flex: 0 0 var(--nr-thumb-col-width);
  min-width: var(--nr-thumb-col-min);
  max-width: var(--nr-thumb-col-max);
  width: var(--nr-thumb-col-width);
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
}
.new-request-area .column.viewer-column {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
}

.new-request-area[data-layout-mode="constrained"] .new-request-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--ds-space-2);
  margin: var(--ds-space-1);
}

.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .new-request-title-actions {
  grid-column: 3;
  justify-self: end;
}

.new-request-area[data-layout-mode="constrained"] .title-section {
  position: static;
  left: auto;
  transform: none;
  justify-content: center;
  min-width: 0;
}

.new-request-area[data-layout-mode="constrained"] .edit-title-wrapper {
  width: 100%;
  justify-content: center;
  min-width: 0;
}

.new-request-area[data-layout-mode="constrained"] .edit-title,
.new-request-area[data-layout-mode="constrained"] .edit-title-input {
  max-width: 100%;
}

.new-request-area[data-layout-mode="constrained"] .new-request-title-actions {
  min-width: max-content;
  flex-basis: auto;
  gap: var(--ds-space-2);
}

.new-request-area[data-layout-mode="constrained"] .request-apply-trigger.ds-cta-primary-soft {
  min-width: 64px;
  padding: 0 14px;
  font-size: 13px;
}

.new-request-area[data-layout-mode="compact"][data-request-stage="empty"] .new-request-empty {
  gap: var(--ds-space-3);
}

.new-request-area[data-layout-mode="compact"][data-request-stage="empty"] .new-request-empty-cta,
.new-request-area[data-layout-mode="compact"][data-request-stage="empty"] .new-request-empty-primary,
.new-request-area[data-layout-mode="compact"][data-request-stage="empty"] .new-request-empty-trigger,
.new-request-area[data-layout-mode="compact"][data-request-stage="empty"] [data-new-request-empty-cta],
.new-request-area[data-layout-mode="compact"][data-request-stage="empty"] [data-empty-primary-cta] {
  width: min(100%, 300px);
  min-height: 50px;
  padding: 0 24px;
}

.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .close-request-btn {
  width: 38px;
  height: 38px;
}

.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .close-request-x-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
}

.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .new-request-empty {
  gap: var(--ds-space-3);
}

.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .new-request-empty-cta,
.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .new-request-empty-primary,
.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .new-request-empty-trigger,
.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] [data-new-request-empty-cta],
.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] [data-empty-primary-cta] {
  width: min(100%, 280px);
  min-height: 48px;
  padding: 0 18px;
  font-size: 16px;
  white-space: normal;
}

.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .new-request-empty-message,
.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .new-request-empty-copy,
.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .new-request-empty-description,
.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .new-request-empty-subcopy,
.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .new-request-empty-hint,
.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] .new-request-empty-drop-hint,
.new-request-area[data-layout-mode="constrained"][data-request-stage="empty"] [data-empty-message] {
  max-width: min(100%, 320px);
  font-size: 13px;
  line-height: 1.6;
}

/* ビューワ内の画像・canvasのアスペクト比維持 */
.viewer-column img,
.viewer-column canvas {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  aspect-ratio: auto;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.approval-signpos-btn {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* 右寄せ */
  gap: 4px; /* ラベルとアイコンの間隔を少し確保 */
}

.approval-signpos-btn img {
  display: block;
  width: 20px;  /* 必要に応じてサイズ調整 */
  height: 20px;
}
.anchor-popup .anchor-item {
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.anchor-popup .anchor-item.is-selected {
  background-color: #e7f1ff;
  border-color: #2b6cb0;
  box-shadow: 0 0 0 2px rgba(43,108,176,0.2);
}
.anchor-popup .anchor-item:focus-visible {
  outline: 2px solid #2b6cb0;
  outline-offset: 1px;
}

.request-retention-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.request-retention-label {
  font-size: var(--ds-font-md);
  color: var(--ds-color-text-sub);
  line-height: var(--ds-line-normal);
  white-space: nowrap;
}

.request-retention-select {
  min-width: 132px;
  height: 36px;
  padding: 0 34px 0 12px;
  border: 1px solid #c8d1dc;
  border-radius: 999px;
  background: #fff;
  color: #263238;
  font-size: 14px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.request-retention-select.is-placeholder {
  color: #c23b32;
  font-weight: 700;
}

.request-retention-select option {
  color: #263238;
}

.request-retention-select:focus {
  outline: none;
  border-color: #5f98df;
  box-shadow: 0 0 0 3px rgba(95, 152, 223, 0.16);
}

.request-retention-select.is-invalid {
  border-color: #c23b32;
  box-shadow: 0 0 0 3px rgba(194, 59, 50, 0.14);
}

.request-retention-notice {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2400;
  padding: 6px 10px;
  border: 1px solid rgba(194, 59, 50, 0.22);
  border-radius: 10px;
  background: rgba(124, 31, 24, 0.94);
  color: #fff7f6;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(84, 18, 13, 0.18);
}

.request-retention-reference-btn {
  height: 36px;
  padding: 0 14px;
  border: 1px solid #bfd5ea;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5fb 100%);
  color: #30557d;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.request-retention-reference-btn:hover {
  background: linear-gradient(180deg, #eff6fd 0%, #e2eef9 100%);
}

.request-retention-reference-modal {
  position: fixed;
  inset: 0;
  z-index: 2300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.42);
  padding: 24px;
}

.request-retention-reference-dialog {
  width: min(1040px, 100%);
  max-height: min(86vh, 860px);
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.26);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.request-retention-reference-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #e1e7ee;
  background: linear-gradient(180deg, #f8fbff 0%, #f2f6fb 100%);
}

.request-retention-reference-title {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
  color: #203246;
}

.request-retention-reference-lead {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: #5d6c7c;
}

.request-retention-reference-close {
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #e9f0f8;
  color: #35516d;
  font-size: 24px;
  cursor: pointer;
  flex: 0 0 auto;
}

.request-retention-reference-close:hover {
  background: #dce8f4;
}

.request-retention-reference-body {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  min-height: 0;
  flex: 1 1 auto;
}

.request-retention-reference-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 14px 20px 20px;
  border-right: 1px solid #e1e7ee;
  background: #f8fafc;
  overflow-y: auto;
}

.request-retention-reference-nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d6dfeb;
  border-radius: 14px;
  background: #fff;
  color: #31465c;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.request-retention-reference-nav-btn:hover,
.request-retention-reference-nav-btn:focus-visible {
  border-color: #8fb5df;
  box-shadow: 0 0 0 3px rgba(95, 152, 223, 0.14);
  outline: none;
}

.request-retention-reference-nav-btn.is-active {
  border-color: #6d9ed2;
  background: linear-gradient(180deg, #f2f8ff 0%, #e7f1ff 100%);
  color: #1f4f8a;
}

.request-retention-reference-nav-note {
  font-size: var(--ds-font-xs);
  font-weight: 600;
  color: #607388;
}

.request-retention-reference-content {
  min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 24px;
  background: #fff;
}

.request-retention-reference-overview,
.request-retention-reference-detail {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.request-retention-reference-quick-guide {
  border: 1px solid #dde6f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #fbfdff 0%, #f5f8fb 100%);
  padding: 18px 20px;
}

.request-retention-reference-quick-guide h4,
.request-retention-reference-card h4,
.request-retention-reference-detail h4 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.3;
  color: #22354a;
}

.request-retention-reference-quick-guide-table,
.request-retention-reference-detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.request-retention-reference-quick-guide-table th,
.request-retention-reference-quick-guide-table td,
.request-retention-reference-detail-table th,
.request-retention-reference-detail-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
}

.request-retention-reference-quick-guide-table th,
.request-retention-reference-detail-table th {
  width: 128px;
  color: #4c6075;
  font-weight: 700;
  background: rgba(239, 245, 251, 0.72);
}

.request-retention-reference-detail-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.request-retention-reference-card,
.request-retention-reference-detail-panel {
  border: 1px solid #dde6f0;
  border-radius: 18px;
  background: #fff;
  padding: 18px 20px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.request-retention-reference-card p,
.request-retention-reference-detail-panel p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.7;
  color: #31465c;
}

.request-retention-reference-card ul,
.request-retention-reference-detail-panel ul {
  margin: 0 0 14px;
  padding-left: 20px;
  color: #31465c;
  line-height: 1.7;
}

.request-retention-reference-card strong,
.request-retention-reference-detail-panel strong {
  color: #1f4f8a;
}

.request-retention-reference-card:last-child,
.request-retention-reference-detail-panel:last-child {
  margin-bottom: 0;
}

.request-retention-reference-modal.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .title-section {
    flex-wrap: wrap;
    justify-content: center;
  }

  .request-retention-wrapper {
    flex-wrap: wrap;
    justify-content: center;
  }

  .request-retention-reference-body {
    grid-template-columns: 1fr;
  }

  .request-retention-reference-nav {
    flex-direction: row;
    gap: 10px;
    padding: 16px 20px 0;
    border-right: none;
    border-bottom: 1px solid #e1e7ee;
    overflow-x: auto;
  }

  .request-retention-reference-nav-btn {
    min-width: 110px;
    flex: 0 0 auto;
  }
}

@media (max-width: 720px) {
  .request-retention-reference-modal {
    padding: 10px;
  }

  .request-retention-reference-dialog {
    max-height: 92vh;
    border-radius: 16px;
  }

  .request-retention-reference-header,
  .request-retention-reference-content {
    padding-left: 16px;
    padding-right: 16px;
  }

  .request-retention-reference-header {
    align-items: center;
  }

  .request-retention-reference-title {
    font-size: 18px;
  }

  .request-retention-reference-quick-guide-table th,
  .request-retention-reference-quick-guide-table td,
  .request-retention-reference-detail-table th,
  .request-retention-reference-detail-table td {
    padding: 8px 10px;
    font-size: 12px;
  }
}
