* { box-sizing: border-box; }

.sheet {
  max-width: 1280px;
  margin: 0 auto;
  background: white;
  padding: 22px 26px;
  border-radius: 8px;
  border: 1px solid #D3D1C7;
}

.boss-header { margin-bottom: 14px; }

.boss-zone { font-size: 11.5px; color: #888780; margin-bottom: 2px; letter-spacing: 0.3px; }
.boss-name { font-size: 23px; font-weight: 500; margin: 0; }

.sheet-footer {
  margin-top: 16px;
  padding-top: 10px;
  border-top: 0.5px solid #D3D1C7;
  font-size: 10.5px;
  color: #888780;
  text-align: center;
}

.boss-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
}

.boss-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.boss-tab-icon {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  object-fit: cover;
  flex: 0 0 14px;
}

.boss-tab-active {
  background: #185FA5;
  color: #fff;
  border-color: #185FA5;
}

.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #2B2B2B;
  border: 1px solid #55524A;
  border-radius: 8px;
  padding: 10px 14px;
}

.page-nav-title {
  font-size: 12px;
  color: #F1EFE8;
}

.page-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}


.btn {
  font-size: 12px;
  padding: 7px 14px;
  border: 0.5px solid #55524A;
  background: #2B2B2B;
  border-radius: 5px;
  cursor: pointer;
  font-family: inherit;
  color: #F1EFE8;
  transition: background 0.15s;
}
.btn:hover { background: #3A3A3A; }
.btn-primary { background: #185FA5; color: white; border-color: #185FA5; }
.btn-primary:hover { background: #0C447C; }

.icon {
  width: 32px; height: 32px;
  border-radius: 4px;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid #55524A;
  background: #2B2B2B;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 500;
}
.icon.symbol { font-size: 15px; }
.icon.symbol-tank  { color: #854F0B; }
.icon.symbol-warn  { color: #791F1F; }
.icon.symbol-trans { color: #854F0B; }

.mech-name.danger { color: #FFB3B3; }

.critical {
  background: rgba(118, 58, 52, 0.44);
  border: 2px solid #B05B52;
  border-radius: 5px;
  padding: 7px 9px;
  margin: -1px -1px 9px -1px;
}
.critical .mech-name { color: #FFB3B3; }

.image-card {
  background: #2B2B2B;
  border: 0.5px solid #55524A;
  border-radius: 8px;
  padding: 10px 12px;
}
.image-card-label {
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.6px;
  color: #B8B4A8; margin-bottom: 6px; text-transform: uppercase;
}
.image-card-caption { font-size: 11px; color: #D3D1C7; margin-top: 6px; line-height: 1.45; }

.reminder-card {
  background: #FCEBEB;
  border: 0.5px solid #F09595;
  border-radius: 8px;
  padding: 10px 12px;
}
.reminder-card-label {
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.6px;
  color: #791F1F; margin-bottom: 6px; text-transform: uppercase;
}
.reminder-list { margin: 0; padding-left: 16px; font-size: 11.5px; color: #501313; line-height: 1.55; }
.reminder-list li { margin-bottom: 4px; color: #501313; }

.setup-block {
  background: #FAFAFA;
  border: 1px solid #D3D1C7;
  border-radius: 8px;
  color: #5F5E5A;
  margin-bottom: 14px;
  padding: 12px 16px;
}

.setup-label {
  color: #2C2C2A;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.6px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.setup-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
  font-size: 12px;
}

.setup-grid-3,
.setup-grid-4,
.setup-grid-5 {
  grid-template-columns: none;
}

.setup-col {
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  padding: 10px;
  background: rgba(0, 0, 0, 0.16);
  border: 0.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
}

.setup-heading,
.setup-col-label {
  color: #2C2C2A;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.setup-line {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin-bottom: 4px;
  white-space: nowrap;
}

.setup-line:last-child { margin-bottom: 0; }

.setup-line .line-text {
  flex: 0 0 auto;
  min-width: 0;
  line-height: 1.45;
  white-space: nowrap;
}

.role {
  color: #2C2C2A;
  font-weight: 500;
}

.role.unassigned {
  color: #888780;
  font-style: italic;
  font-weight: 400;
}

.setup-block .role-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

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

.header-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
  margin-bottom: 7px;
}

.col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
  margin-bottom: 10px;
}

.mech {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 9px;
}

.mech:last-child { margin-bottom: 0; }

.icon img { width: 100%; height: 100%; display: block; }

.mech-body { flex: 1; min-width: 0; }

.image-sidebar { display: flex; flex-direction: column; gap: 10px; }

.positioning-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  cursor: zoom-in;
}

.boss-image-lightbox-open {
  overflow: hidden;
}

.boss-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 42px 4vw;
}

.boss-image-lightbox.is-open {
  display: flex;
}

.boss-image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.boss-image-lightbox-panel {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.boss-image-lightbox-img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.boss-image-lightbox-img.is-icon {
  width: min(256px, 42vw);
  height: auto;
  max-width: 42vw;
  max-height: 42vh;
  image-rendering: auto;
}

.boss-image-lightbox-close {
  position: fixed;
  top: 16px;
  right: 18px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(241, 239, 232, 0.35);
  border-radius: 999px;
  background: rgba(43, 43, 43, 0.92);
  color: #F1EFE8;
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  line-height: 1;
}

.boss-image-lightbox-close:hover,
.boss-image-lightbox-close:focus-visible {
  background: #185FA5;
  border-color: #185FA5;
  outline: none;
}

.boss-image-lightbox-caption {
  max-width: min(92vw, 900px);
  color: #F1EFE8;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

@media (max-width: 980px) {
  .main-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .sheet { padding: 18px; }
  .header-row,
  .col-grid { grid-template-columns: 1fr; }
  .page-nav { align-items: flex-start; flex-direction: column; }
  .setup-col { width: 100%; }
}

@media print {
  .setup-block,
  .setup-col { page-break-inside: avoid; }
  .setup-block { border-color: #D3D1C7; box-shadow: none; }
  .positioning-img { cursor: default; }
  .boss-image-lightbox { display: none !important; }
}

.role-icon-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 2px;
  flex: 0 0 16px;
  overflow: hidden;
  vertical-align: -3px;
}

.role-icon-inline img,
.raid-marker-inline img {
  width: 16px;
  height: 16px;
  display: block;
  object-fit: contain;
}

.setup-line .role-icon-inline {
  border: 0.5px solid rgba(0, 0, 0, 0.15);
}

.setup-line .role-icon-inline.raid-marker-inline {
  border: none;
  border-radius: 0;
  overflow: visible;
}

.line-text .role-icon-inline {
  margin: 0 3px;
  vertical-align: -3px;
}

.assignment-target {
  color: currentColor;
  font-weight: 500;
}

.role-label {
  font-size: 11px;
  color: #888780;
  margin-left: 4px;
  white-space: nowrap;
}
