@layer components {
  /* Photo navigation */
  .photo-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 28px;
    background: #fff;
    border-bottom: 1px solid var(--ink-100);
  }

  .photo-nav-info {
    font-size: 14px;
    color: var(--ink-600);
  }

  .photo-nav-info strong {
    color: var(--ink-800);
    font-weight: 500;
  }

  .nav-btns {
    display: flex;
    gap: 6px;
  }

  .nav-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border: 1px solid var(--ink-200);
    border-radius: 7px;
    background: #fff;
    color: var(--ink-600);
    cursor: pointer;
    font-family: var(--font-ui);
    transition: all 0.12s;
    text-decoration: none;
  }

  .nav-btn:hover {
    border-color: var(--forest-300);
    color: var(--forest-700);
    background: var(--forest-50);
  }

  .nav-btn svg {
    width: 13px;
    height: 13px;
  }

  .nav-btn[disabled] {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
  }

  /* Two-column content grid */
  .upload-show-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 0;
    flex: 1;
  }

  /* Photo preview section */
  .photo-section {
    padding: 28px;
    background: var(--ink-50);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    position: relative;
  }

  .photo-frame {
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    border: 1px solid var(--ink-100);
  }

  .photo-frame img {
    max-width: 100%;
    height: auto;
    display: block;
  }

  .photo-frame .image-preview-placeholder {
    width: 100%;
    aspect-ratio: 3/2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--forest-100) 0%, var(--ink-100) 100%);
  }

  .photo-frame .image-preview-placeholder svg {
    width: 48px;
    height: 48px;
  }

  /* Photo ID badge */
  .photo-id-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--ink-100);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    padding: 5px 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  }

  .photo-id-label {
    font-size: 11px;
    color: var(--ink-400);
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .photo-id-value {
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 500;
    color: var(--forest-700);
    letter-spacing: 0.05em;
  }

  .copy-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--ink-400);
    transition: color 0.12s;
  }

  .copy-btn:hover {
    color: var(--forest-700);
  }

  .copy-btn svg {
    width: 12px;
    height: 12px;
  }

  /* Actions bar below photo */
  .photo-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 12px;
  }

  .photo-meta-small {
    font-size: 13px;
    color: var(--ink-400);
  }

  /* Detail panel (right column) */
  .detail-panel {
    border-left: 1px solid var(--ink-100);
    background: #fff;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }

  .detail-section {
    padding: 20px 22px;
    border-bottom: 1px solid var(--ink-100);
  }

  .detail-section:last-child {
    border-bottom: none;
  }

  .detail-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-400);
    margin-bottom: 12px;
  }

  /* Title & caption inputs */
  .meta-input {
    width: 100%;
    font-family: var(--font-ui);
    font-size: 15px;
    font-weight: 500;
    color: var(--ink-800);
    background: var(--ink-50);
    border: 1px solid var(--ink-100);
    border-radius: 8px;
    padding: 10px 12px;
    outline: none;
    resize: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    line-height: 1.5;
  }

  .meta-input::placeholder {
    color: var(--ink-400);
    font-weight: 400;
  }

  .meta-input:focus {
    border-color: var(--forest-500);
    box-shadow: 0 0 0 3px var(--forest-100);
    background: #fff;
  }

  .meta-input.caption {
    font-size: 14px;
    font-weight: 400;
    min-height: 72px;
  }

  .save-indicator {
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
  }

  .save-indicator.saved {
    color: var(--success-500);
  }

  .save-indicator.saving {
    color: var(--ink-400);
  }

  .save-indicator svg {
    width: 11px;
    height: 11px;
  }

  /* Checkboxes */
  .checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
  }

  .cb-item {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
  }

  .cb-item input {
    width: 15px;
    height: 15px;
    accent-color: var(--forest-700);
    cursor: pointer;
    flex-shrink: 0;
  }

  .cb-item span {
    font-size: 13px;
    color: var(--ink-800);
    cursor: pointer;
  }

  /* Info rows */
  .info-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding: 5px 0;
    border-bottom: 1px solid var(--ink-50);
  }

  .info-row:last-child {
    border-bottom: none;
  }

  .info-key {
    font-size: 13px;
    color: var(--ink-400);
    flex-shrink: 0;
    min-width: 70px;
  }

  .info-val {
    font-size: 13px;
    color: var(--ink-800);
    font-weight: 500;
    text-align: right;
    word-break: break-all;
  }

  .info-val.mono {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--forest-700);
  }

  /* Delete section */
  .delete-area {
    margin-top: auto;
    padding: 16px 22px;
    border-top: 1px solid var(--ink-100);
    background: var(--ink-50);
  }

  .delete-hint {
    font-size: 12px;
    color: var(--ink-400);
    margin-bottom: 10px;
    line-height: 1.5;
  }

  .delete-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    padding: 9px;
    border: 1px solid rgba(192, 57, 43, 0.3);
    border-radius: 8px;
    background: #fff;
    color: var(--danger-500);
    cursor: pointer;
    font-family: var(--font-ui);
    transition: all 0.15s;
  }

  .delete-btn:hover {
    background: var(--danger-50);
    border-color: var(--danger-500);
  }

  .delete-btn svg {
    width: 14px;
    height: 14px;
  }

  /* Responsive */
  @media (max-width: 900px) {
    .upload-show-content {
      grid-template-columns: 1fr;
    }

    .detail-panel {
      border-left: none;
      border-top: 1px solid var(--ink-100);
    }
  }

  @media (max-width: 480px) {
    .photo-nav {
      padding: var(--s3) var(--s4);
      flex-direction: column;
      align-items: flex-start;
      gap: var(--s2);
    }

    .nav-btns {
      width: 100%;
      justify-content: space-between;
    }

    .nav-btn {
      min-width: 44px;
      min-height: 44px;
      padding: 6px 10px;
      justify-content: center;
    }

    .photo-section {
      padding: var(--s4);
      min-height: auto;
    }

    .photo-frame {
      max-width: 100%;
      border-radius: 4px;
    }

    .detail-section {
      padding: 16px var(--s4);
    }

    .meta-input {
      width: 100%;
      box-sizing: border-box;
    }

    .delete-area {
      padding: 12px var(--s4);
    }
  }
}
