.daily-report-mode-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.daily-mode-plan-photos {
  display: none;
}

.daily-report-shell[data-report-mode="planPhotos"] {
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
}

.daily-report-shell[data-report-mode="planPhotos"] .daily-input-area > .daily-report-mode-panel:not(.daily-mode-plan-photos),
.daily-report-shell[data-report-mode="planPhotos"] .daily-preview-panel {
  display: none !important;
}

.daily-report-shell[data-report-mode="planPhotos"] .daily-mode-plan-photos {
  display: block;
}

.asgg-ppr {
  padding: 0 !important;
  overflow: hidden;
  border-color: #dfe3e8 !important;
}

.asgg-ppr button,
.asgg-ppr input,
.asgg-ppr select,
.asgg-ppr textarea {
  font: inherit;
}

.asgg-ppr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.asgg-ppr-head-copy {
  min-width: 0;
}

.asgg-ppr-kicker {
  display: block;
  margin-bottom: 5px;
  color: #047857;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.asgg-ppr-head h3 {
  margin: 0;
  color: #111827;
  font-size: 18px;
  line-height: 1.3;
}

.asgg-ppr-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
}

.asgg-ppr-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.asgg-ppr-btn,
.asgg-ppr-upload {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #253047;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
}

.asgg-ppr-btn:hover,
.asgg-ppr-upload:hover {
  border-color: #9ca3af;
  background: #f8fafc;
}

.asgg-ppr-btn.primary {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.asgg-ppr-btn.active {
  border-color: #047857;
  background: #ecfdf5;
  color: #047857;
}

.asgg-ppr-btn.danger {
  border-color: #fecaca;
  color: #b91c1c;
}

.asgg-ppr-upload input,
.asgg-ppr-hidden-input {
  display: none;
}

.asgg-ppr-status {
  min-height: 30px;
  padding: 8px 20px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
}

.asgg-ppr-status.ok {
  color: #047857;
}

.asgg-ppr-status.warn {
  color: #a16207;
}

.asgg-ppr-status.error {
  color: #b91c1c;
}

.asgg-ppr-board-strip {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 49px;
  padding: 8px 20px;
  overflow-x: auto;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.asgg-ppr-board-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 118px;
  max-width: 230px;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #475569;
  cursor: pointer;
}

.asgg-ppr-board-tab b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.asgg-ppr-board-tab span {
  margin-left: auto;
  color: #94a3b8;
  font-size: 10px;
}

.asgg-ppr-board-tab.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.asgg-ppr-board-tab.active span {
  color: #d1fae5;
}

.asgg-ppr-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.72fr);
  min-height: 660px;
  background: #fff;
}

.asgg-ppr-plan-pane {
  min-width: 0;
  padding: 16px 18px 22px;
  border-right: 1px solid #e5e7eb;
}

.asgg-ppr-plan-toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 12px;
}

.asgg-ppr-field {
  display: grid;
  gap: 5px;
}

.asgg-ppr-field label {
  color: #475569;
  font-size: 10px;
  font-weight: 800;
}

.asgg-ppr-field input,
.asgg-ppr-field select,
.asgg-ppr-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  background: #fff;
  color: #111827;
  padding: 8px 9px;
  font-size: 12px;
}

.asgg-ppr-field textarea {
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
}

.asgg-ppr-plan-frame {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: 520px;
  padding: 14px;
  overflow: auto;
  border: 1px solid #d1d5db;
  background-color: #f3f4f6;
  background-image:
    linear-gradient(#e5e7eb 1px, transparent 1px),
    linear-gradient(90deg, #e5e7eb 1px, transparent 1px);
  background-size: 20px 20px;
}

.asgg-ppr-plan-surface {
  position: relative;
  width: 100%;
  max-width: 1200px;
  line-height: 0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
  cursor: crosshair;
}

.asgg-ppr-plan-surface img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.asgg-ppr-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  transform: translate(-50%, -50%);
  border: 3px solid #fff;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  box-shadow: 0 2px 9px rgba(15, 23, 42, 0.34);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: grab;
}

.asgg-ppr-pin:hover,
.asgg-ppr-pin.active {
  background: #047857;
}

.asgg-ppr-pin[data-status="완료"] {
  background: #047857;
}

.asgg-ppr-pin[data-status="진행중"] {
  background: #d97706;
}

.asgg-ppr-pin[data-status="보류"] {
  background: #b91c1c;
}

.asgg-ppr-pin:active {
  cursor: grabbing;
}

.asgg-ppr-plan-empty {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 520px;
  padding: 36px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  text-align: center;
}

.asgg-ppr-plan-empty b {
  display: block;
  color: #111827;
  font-size: 15px;
}

.asgg-ppr-plan-empty span {
  display: block;
  margin: 7px 0 15px;
  color: #64748b;
  font-size: 11px;
}

.asgg-ppr-inspector {
  min-width: 0;
  padding: 16px 18px 22px;
  background: #fafafa;
}

.asgg-ppr-inspector-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.asgg-ppr-inspector-head h4 {
  margin: 0;
  color: #111827;
  font-size: 14px;
}

.asgg-ppr-inspector-head span {
  color: #64748b;
  font-size: 10px;
}

.asgg-ppr-marker-fields {
  display: grid;
  gap: 10px;
}

.asgg-ppr-quick-types {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.asgg-ppr-chip {
  min-height: 27px;
  padding: 5px 8px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.asgg-ppr-chip.active {
  border-color: #047857;
  background: #ecfdf5;
  color: #047857;
}

.asgg-ppr-photo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.asgg-ppr-photo-head b {
  color: #111827;
  font-size: 12px;
}

.asgg-ppr-photo-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.asgg-ppr-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 9px;
}

.asgg-ppr-photo-item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
}

.asgg-ppr-photo-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #eef2f7;
  cursor: pointer;
}

.asgg-ppr-photo-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e5e7eb;
}

.asgg-ppr-photo-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asgg-ppr-photo-visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.asgg-ppr-photo-caption {
  display: block;
  min-height: 38px;
  padding: 7px 8px;
  overflow: hidden;
  color: #334155;
  font-size: 10px;
  line-height: 1.35;
  text-align: left;
}

.asgg-ppr-photo-note-count {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 3;
  padding: 3px 5px;
  border-radius: 4px;
  background: rgba(17, 24, 39, 0.84);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.asgg-ppr-photo-remove {
  position: absolute;
  top: 5px;
  right: 5px;
  z-index: 4;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  background: rgba(127, 29, 29, 0.9);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.asgg-ppr-empty {
  padding: 24px 14px;
  border: 1px dashed #cbd5e1;
  background: #fff;
  color: #64748b;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.asgg-ppr-marker-list {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.asgg-ppr-marker-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  background: #fff;
  color: #334155;
  text-align: left;
  cursor: pointer;
}

.asgg-ppr-marker-row.active {
  border-color: #047857;
  background: #ecfdf5;
}

.asgg-ppr-marker-row .num {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.asgg-ppr-marker-row .copy {
  min-width: 0;
}

.asgg-ppr-marker-row b,
.asgg-ppr-marker-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asgg-ppr-marker-row b {
  font-size: 10px;
}

.asgg-ppr-marker-row span {
  margin-top: 2px;
  color: #64748b;
  font-size: 9px;
}

.asgg-ppr-marker-row em {
  color: #64748b;
  font-size: 9px;
  font-style: normal;
}

.asgg-ppr-modal {
  position: fixed;
  inset: 0;
  z-index: 100500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.62);
}

.asgg-ppr-modal.open {
  display: flex;
}

.asgg-ppr-dialog {
  display: flex;
  flex-direction: column;
  width: min(1500px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: hidden;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
}

.asgg-ppr-dialog.medium {
  width: min(980px, calc(100vw - 36px));
}

.asgg-ppr-dialog-head,
.asgg-ppr-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.asgg-ppr-dialog-head h3 {
  margin: 0;
  color: #111827;
  font-size: 14px;
}

.asgg-ppr-dialog-foot {
  justify-content: flex-end;
  border-top: 1px solid #e5e7eb;
  border-bottom: 0;
}

.asgg-ppr-dialog-body {
  min-height: 0;
  overflow: auto;
}

.asgg-ppr-close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #d1d5db;
  border-radius: 50%;
  background: #fff;
  color: #111827;
  font-size: 20px;
  cursor: pointer;
}

.asgg-ppr-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 620px;
}

.asgg-ppr-editor-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #e5e7eb;
}

.asgg-ppr-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border-bottom: 1px solid #cbd5e1;
  background: #fff;
}

.asgg-ppr-tool {
  min-height: 31px;
  padding: 6px 9px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  background: #fff;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.asgg-ppr-tool.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.asgg-ppr-note-input {
  flex: 1 1 220px;
  min-width: 150px;
  height: 31px;
  border: 1px solid #d1d5db;
  border-radius: 5px;
  padding: 6px 8px;
  color: #111827;
  font-size: 11px;
}

.asgg-ppr-color {
  width: 27px;
  height: 27px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  outline: 1px solid #cbd5e1;
  cursor: pointer;
}

.asgg-ppr-color.active {
  outline: 3px solid #111827;
}

.asgg-ppr-editor-stage-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  flex: 1;
  padding: 16px;
  overflow: auto;
}

.asgg-ppr-editor-surface {
  position: relative;
  max-width: 100%;
  line-height: 0;
  background: #111827;
}

.asgg-ppr-editor-surface img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 190px);
  width: auto;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.asgg-ppr-editor-surface svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  touch-action: none;
}

.asgg-ppr-editor-side {
  min-width: 0;
  padding: 14px;
  overflow: auto;
  border-left: 1px solid #d1d5db;
  background: #fff;
}

.asgg-ppr-editor-side h4 {
  margin: 0 0 9px;
  color: #111827;
  font-size: 12px;
}

.asgg-ppr-annotation-list {
  display: grid;
  gap: 6px;
}

.asgg-ppr-annotation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  color: #334155;
  font-size: 10px;
}

.asgg-ppr-annotation-row button {
  width: 25px;
  height: 25px;
  padding: 0;
  border: 1px solid #fecaca;
  border-radius: 50%;
  background: #fff;
  color: #b91c1c;
  cursor: pointer;
}

.asgg-ppr-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 15px;
}

.asgg-ppr-picker-item {
  overflow: hidden;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.asgg-ppr-picker-item:hover {
  border-color: #047857;
}

.asgg-ppr-picker-item img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e5e7eb;
}

.asgg-ppr-picker-item span {
  display: block;
  min-height: 38px;
  padding: 7px 8px;
  color: #334155;
  font-size: 10px;
  line-height: 1.35;
}

.asgg-ppr-report-preview {
  padding: 18px;
  background: #e5e7eb;
}

.asgg-ppr-report-page {
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto 18px;
  padding: 13mm;
  background: #fff;
  color: #111827;
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.15);
}

.asgg-ppr-report-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 5mm;
  border-bottom: 1.2mm solid #111827;
}

.asgg-ppr-report-head h1 {
  margin: 1mm 0 0;
  font-size: 20pt;
}

.asgg-ppr-report-head p,
.asgg-ppr-report-head b {
  margin: 0;
  font-size: 9pt;
}

.asgg-ppr-report-plan {
  position: relative;
  margin-top: 7mm;
  line-height: 0;
  border: 0.3mm solid #9ca3af;
}

.asgg-ppr-report-plan img {
  display: block;
  width: 100%;
  height: auto;
}

.asgg-ppr-report-pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 7mm;
  height: 7mm;
  transform: translate(-50%, -50%);
  border: 0.7mm solid #fff;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 7pt;
  font-weight: 900;
}

.asgg-ppr-report-legend {
  width: 100%;
  margin-top: 6mm;
  border-collapse: collapse;
  font-size: 8pt;
}

.asgg-ppr-report-legend th,
.asgg-ppr-report-legend td {
  padding: 2.2mm;
  border: 0.2mm solid #cbd5e1;
  text-align: left;
  vertical-align: top;
}

.asgg-ppr-report-legend th {
  background: #f1f5f9;
}

.asgg-ppr-report-marker-title {
  margin: 0 0 4mm;
  padding-bottom: 3mm;
  border-bottom: 0.5mm solid #111827;
  font-size: 15pt;
}

.asgg-ppr-report-marker-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2mm;
  margin-bottom: 4mm;
}

.asgg-ppr-report-marker-meta div {
  padding: 2.5mm;
  border: 0.2mm solid #cbd5e1;
}

.asgg-ppr-report-marker-meta span,
.asgg-ppr-report-marker-meta b {
  display: block;
  font-size: 8pt;
}

.asgg-ppr-report-marker-meta span {
  margin-bottom: 1mm;
  color: #64748b;
}

.asgg-ppr-report-note {
  min-height: 14mm;
  margin-bottom: 4mm;
  padding: 3mm;
  border: 0.2mm solid #cbd5e1;
  font-size: 9pt;
  line-height: 1.5;
  white-space: pre-wrap;
}

.asgg-ppr-report-photos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4mm;
}

.asgg-ppr-report-photo {
  margin: 0;
  border: 0.2mm solid #cbd5e1;
}

.asgg-ppr-report-photo .asgg-ppr-photo-visual {
  aspect-ratio: 4 / 3;
}

.asgg-ppr-report-photo figcaption {
  min-height: 10mm;
  padding: 2mm;
  font-size: 7.5pt;
  line-height: 1.4;
}

body.asgg-ppr-modal-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .daily-report-mode-tabs {
    display: flex;
    overflow-x: auto;
  }

  .daily-report-mode-tab {
    flex: 0 0 168px;
  }

  .asgg-ppr-workspace {
    grid-template-columns: 1fr;
  }

  .asgg-ppr-plan-pane {
    border-right: 0;
    border-bottom: 1px solid #e5e7eb;
  }

  .asgg-ppr-editor-layout {
    grid-template-columns: 1fr;
  }

  .asgg-ppr-editor-side {
    max-height: 220px;
    border-top: 1px solid #d1d5db;
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .asgg-ppr-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .asgg-ppr-actions {
    justify-content: flex-start;
  }

  .asgg-ppr-plan-toolbar {
    grid-template-columns: 1fr;
  }

  .asgg-ppr-plan-frame,
  .asgg-ppr-plan-empty {
    min-height: 340px;
  }

  .asgg-ppr-photo-grid,
  .asgg-ppr-picker-grid {
    grid-template-columns: 1fr;
  }

  .asgg-ppr-modal {
    padding: 8px;
  }

  .asgg-ppr-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
  }

  .asgg-ppr-editor-toolbar {
    align-items: stretch;
  }

  .asgg-ppr-note-input {
    flex-basis: 100%;
  }
}

@media print {
  body.asgg-ppr-printing * {
    visibility: hidden !important;
  }

  body.asgg-ppr-printing #asgg-ppr-report-modal,
  body.asgg-ppr-printing #asgg-ppr-report-modal * {
    visibility: visible !important;
  }

  body.asgg-ppr-printing #asgg-ppr-report-modal {
    position: static !important;
    display: block !important;
    padding: 0 !important;
    background: #fff !important;
  }

  body.asgg-ppr-printing #asgg-ppr-report-modal .asgg-ppr-dialog-head,
  body.asgg-ppr-printing #asgg-ppr-report-modal .asgg-ppr-dialog-foot {
    display: none !important;
  }

  body.asgg-ppr-printing #asgg-ppr-report-modal .asgg-ppr-dialog,
  body.asgg-ppr-printing #asgg-ppr-report-modal .asgg-ppr-dialog-body,
  body.asgg-ppr-printing #asgg-ppr-report-modal .asgg-ppr-report-preview {
    position: static !important;
    display: block !important;
    width: auto !important;
    max-height: none !important;
    overflow: visible !important;
    border: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
  }

  body.asgg-ppr-printing .asgg-ppr-report-page {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    box-shadow: none;
    break-after: page;
    page-break-after: always;
  }

  body.asgg-ppr-printing .asgg-ppr-report-page:last-child {
    break-after: auto;
    page-break-after: auto;
  }

  @page {
    size: A4 portrait;
    margin: 0;
  }
}
