/* Fullscreen photo lightbox — ticktock.space style: sidebar + media side-by-side */

body.yg-photo-lightbox-open {
  overflow: hidden;
}

.yg-photo-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.yg-photo-lightbox[hidden] {
  display: none !important;
}

.yg-photo-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(4px);
}

.yg-photo-lightbox-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 0;
}

.yg-photo-lb-close {
  position: fixed;
  top: 8px;
  right: 8px;
  z-index: 6;
  width: 40px;
  height: 40px;
  border: 1px solid #444;
  border-radius: 50%;
  background: #111;
  color: #ffe566;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.yg-photo-lb-close:hover {
  background: #e21c21;
  color: #fff;
  border-color: #e21c21;
}

.yg-photo-lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 44px;
  height: 64px;
  border: 1px solid #444;
  border-radius: 6px;
  background: rgba(17, 17, 17, 0.92);
  color: #ffe566;
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.yg-photo-lb-nav:hover {
  background: #e21c21;
  color: #fff;
  border-color: #e21c21;
}

.yg-photo-lb-prev {
  left: 6px;
}

.yg-photo-lb-next {
  right: 6px;
}

.yg-photo-lb-layout {
  display: flex;
  flex-direction: row;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #0a0a0a;
}

.yg-photo-lb-side {
  order: 1;
  flex: 0 0 min(360px, 32vw);
  width: min(360px, 32vw);
  max-width: 420px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background: #0e0e0e;
  border-right: 1px solid #2a2a2a;
  border-top: 0;
}

.yg-photo-lb-stage {
  order: 2;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  padding: 48px 56px 40px;
  box-sizing: border-box;
}

.yg-photo-lb-image {
  width: auto;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.yg-photo-lb-delete {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 80;
  border: 0;
  border-radius: 8px;
  background: rgba(180, 16, 16, 0.92);
  color: #fff;
  font: 700 13px/1.2 system-ui, sans-serif;
  cursor: pointer;
  padding: 8px 12px;
}

.yg-photo-lb-delete:hover {
  background: #c00;
}

.yg-photo-lb-tweet {
  flex: 0 0 auto;
  overflow: visible;
  padding: 14px 16px 12px;
  border-bottom: 1px solid #2a2a2a;
}

.yg-photo-lb-handle {
  margin: 0 0 4px;
  color: #ffe566;
  font: 600 14px/1.3 system-ui, sans-serif;
}

.yg-photo-lb-date {
  margin: 0 0 10px;
  color: #e21c21;
  font: 600 12px/1.3 system-ui, sans-serif;
}

.yg-photo-lb-tweet-card {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 229, 102, 0.1);
  border: 1px solid rgba(255, 229, 102, 0.28);
}

.yg-photo-lb-tweet-label {
  margin: 0 0 6px;
  color: #ffe566;
  font: 700 11px/1.2 system-ui, sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.yg-photo-lb-tweet-url {
  margin: 0 0 8px;
  word-break: break-all;
  font: 13px/1.4 system-ui, sans-serif;
}

.yg-photo-lb-tweet-url a {
  color: #9ec1ff;
  text-decoration: none;
}

.yg-photo-lb-tweet-url a:hover {
  text-decoration: underline;
}

.yg-photo-lb-tweet-text {
  color: #eee;
  font: 15px/1.55 Georgia, serif;
  white-space: pre-wrap;
  word-break: break-word;
}

.yg-photo-lb-damage {
  margin: 0 0 10px;
  color: #ff6b6b;
  font: 600 13px/1.45 system-ui, sans-serif;
}

.yg-photo-lb-fear {
  margin: 0 0 4px;
  padding: 10px 0 2px;
}

.yg-photo-lb-fear .yg-fear-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0 0 6px;
}

.yg-photo-lb-fear .yg-fear-title {
  color: #fff;
  font: 700 12px/1.2 system-ui, sans-serif;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.yg-photo-lb-fear .yg-fear-pct {
  color: #ffe566;
  font: 700 13px/1 system-ui, sans-serif;
}

.yg-photo-lb-fear .yg-fear-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.yg-photo-lb-fear .yg-fear-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffe566, #ff9f43, #e74c3c);
}

.yg-photo-lb-fear .yg-fear-note {
  margin: 8px 0 0;
  color: #ddd;
  font: 13px/1.4 system-ui, sans-serif;
}

.yg-photo-lb-comments {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 14px 20px 20px;
}

.yg-photo-lb-comments-title {
  margin: 0 0 8px;
  color: #ddd;
  font: 600 13px/1.3 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.yg-photo-lb-comments-list {
  flex: 0 0 auto;
  min-height: 48px;
  max-height: 240px;
  overflow: auto;
  margin-bottom: 12px;
}

.yg-photo-lb-comments-empty,
.yg-photo-lb-comments-loading {
  color: #888;
  font: 13px/1.4 system-ui, sans-serif;
}

.yg-photo-lb-comment {
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #2a2a2a;
}

.yg-photo-lb-comment-meta {
  margin: 0 0 4px;
  color: #aaa;
  font: 12px/1.3 system-ui, sans-serif;
}

.yg-photo-lb-comment-body {
  margin: 0;
  color: #eee;
  font: 14px/1.45 system-ui, sans-serif;
  white-space: pre-wrap;
  word-break: break-word;
}

.yg-photo-lb-comment-form {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.yg-photo-lb-comment-label {
  font: 11px/1.2 system-ui, sans-serif;
  color: #888;
}

.yg-photo-lb-comment-name,
.yg-photo-lb-comment-text {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #444;
  border-radius: 6px;
  background: #0a0a0a;
  color: #eee;
  font: 14px/1.4 system-ui, sans-serif;
  padding: 8px 10px;
}

.yg-photo-lb-comment-submit {
  align-self: flex-start;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #e21c21;
  color: #fff;
  font: 600 13px/1 system-ui, sans-serif;
  cursor: pointer;
}

.yg-photo-lb-comment-submit:hover {
  background: #c41818;
}

.yg-photo-lb-comment-submit:disabled {
  opacity: 0.5;
  cursor: default;
}

.yg-photo-lb-counter {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  z-index: 4;
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  text-align: center;
  color: #ddd;
  font: 12px/1.4 system-ui, sans-serif;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.yg-photo-lb-comments {
  flex: 1 1 auto;
  min-height: 0;
}

.yg-photo-lb-comments-list {
  max-height: none;
  flex: 1 1 auto;
}

.yg-photo-gallery-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #666;
  padding: 24px 12px;
  font: 15px/1.5 Georgia, serif;
}

@media (max-width: 900px) {
  .yg-photo-lb-layout {
    flex-direction: column;
    overflow-y: auto;
  }

  .yg-photo-lb-side {
    order: 2;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    height: auto;
    border-right: 0;
    border-top: 1px solid #2a2a2a;
  }

  .yg-photo-lb-stage {
    order: 1;
    flex: 0 0 auto;
    min-height: 36vh;
    max-height: 48vh;
    height: auto;
    padding: 44px 12px 12px;
  }

  .yg-photo-lb-image {
    max-height: 42vh;
    border-radius: 0;
    box-shadow: none;
  }

  .yg-photo-lb-counter {
    position: static;
    transform: none;
    border-radius: 0;
    background: #141414;
    border: 0;
    border-top: 1px solid #2a2a2a;
  }

  .yg-photo-lb-prev {
    left: 2px;
  }

  .yg-photo-lb-next {
    right: 2px;
  }
}
