/* Scoped to the new article screen. The shared header/gallery stylesheet is unchanged. */
.mobile[data-screen='detail'] { padding-bottom: 0; height: 100dvh; display: grid; grid-template-rows: max-content minmax(0, 1fr); }
.gallery figure[role='button'] { cursor: pointer; touch-action: manipulation; }
.gallery figure[role='button']:focus-visible,
.indexit-item-detail button:focus-visible,
.indexit-item-detail [tabindex]:focus-visible { outline: 2px solid #87fff2; outline-offset: 2px; }
.indexit-item-detail { width: 100%; min-width: 0; min-height: 0; display: flex; flex-direction: column; color: #ead6b9; }
.indexit-item-detail > * { flex-shrink: 0; }
.indexit-item-detail .detail-navigation { min-height: 34px; padding: 0 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: linear-gradient(#30170a, #1d0c05); border-bottom: 1px solid #6c3819; }
.detail-navigation button { min-height: 34px; padding: 0; border: 0; background: none; color: #efd0a4; font-weight: 700; font-size: 12px; white-space: nowrap; }
#detail-collection { min-width: 0; font-size: 10px; text-align: right; text-transform: uppercase; letter-spacing: .05em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.indexit-item-detail .detail-photo-recess { display: grid; place-items: center; appearance: none; padding: 0; margin: 7px 8px 0; aspect-ratio: 1.56; min-height: 0; position: relative; overflow: hidden; border-radius: 9px; background: radial-gradient(ellipse at 50% 45%, #29211c 0%, #14110e 72%); border: 1px solid #a87b3a; box-shadow: inset 0 0 0 3px #24190f, inset 0 0 14px 6px #060606, 0 0 0 1px #3b1d0b; color: #ead6b9; }
.detail-photo-recess .selected-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; cursor: zoom-in; }
.detail-photo-recess .photo-index { position: absolute; right: 8px; top: 8px; background: #14100edc; border: 1px solid #806345; color: #e6ded1; border-radius: 999px; padding: 2px 7px; font-size: 10px; font-variant-numeric: tabular-nums; }
.indexit-item-detail .detail-thumbnails { display: flex; gap: 5px; overflow-x: auto; min-width: 0; padding: 6px 8px 8px; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #a7804e #2a140a; }
.detail-thumbnails button { flex: 0 0 clamp(48px, 17.5cqw, 68px); height: clamp(44px, 11.7cqw, 46px); min-width: 0; background: #20150e; color: #ead6b9; padding: 2px; border: 1px solid #967043; border-radius: 4px; box-shadow: inset 0 0 0 1px #31190a; }
.detail-thumbnails button[aria-current='true'] { border-color: #55fff1; box-shadow: 0 0 0 1px #55e6d8; }
.detail-thumbnails img { width: 100%; height: 100%; object-fit: contain; }
.detail-thumbnails span { font-size: 10px; }
.indexit-item-detail .detail-fields-frame { margin: 0 8px 8px; min-height: clamp(242px, 68.7cqw, 270px); flex: 1 0 clamp(242px, 68.7cqw, 270px); display: flex; flex-direction: column; border: 1px solid #a77935; border-radius: 7px; background: url('./assets/nogal_textura_aprobada.jpg') repeat; background-size: 418px 418px; box-shadow: inset 0 0 0 1px #311406; padding: 6px 5px 6px 8px; }
.detail-fields-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior-y: contain; scrollbar-color: #a7804e #2a140a; scrollbar-width: thin; }
.detail-fields-scroll::-webkit-scrollbar { width: 3px; }
.detail-fields-scroll::-webkit-scrollbar-track { background: #2a140a; }
.detail-fields-scroll::-webkit-scrollbar-thumb { background: #a7804e; border-radius: 4px; }
/* Distribute only spare height; long records keep their natural rows and scroll. */
#detail-fields { margin: 0; min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; }
.detail-field { flex-shrink: 0; display: grid; grid-template-columns: minmax(70px, 28%) minmax(0, 1fr); align-items: center; gap: 11px; min-height: 32px; padding: 3px 5px 3px 0; }
.detail-field-label { margin: 0; text-align: right; justify-self: stretch; text-transform: uppercase; color: #efd0a4; font-size: 11px; font-weight: 600; line-height: 1.12; overflow-wrap: anywhere; }
.detail-field-value { margin: 0; min-width: 0; min-height: 26px; color: #e9e7e2; background: #161514; border: 1px solid #866332; border-radius: 5px; padding: 4px 9px; font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; white-space: pre-wrap; }
.indexit-item-detail .detail-actions { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 0 11px calc(12px + env(safe-area-inset-bottom, 0px)); }
.detail-actions .detail-action { appearance: none; display: grid; place-items: center; min-height: 48px; padding: 0; border: 0; background: none; touch-action: manipulation; }
/* Non-destructive sprite windows into the unchanged approved 488 x 80 strip. */
.detail-action-art { display: block; position: relative; overflow: hidden; pointer-events: none; }
.detail-action-art img { position: absolute; width: 488px; max-width: none; height: 80px; }
.detail-edit { width: 74px; justify-self: start; }
.detail-edit .detail-action-art { width: 73px; height: 46px; border-radius: 50px; transform: scale(.96); }
.detail-edit .detail-action-art img { left: -22px; top: -10px; }
.detail-share { width: 130px; justify-self: center; }
.detail-share .detail-action-art { width: 130px; height: 36px; border-radius: 6px; transform: scale(.9230769231); }
.detail-share .detail-action-art img { left: -174px; top: -20px; }
.detail-share-photo { width: 48px; justify-self: end; }
.detail-share-photo .detail-action-art { width: 44px; height: 44px; border-radius: 50%; }
.detail-share-photo .detail-action-art img { left: -410px; top: -9px; }
.detail-photo-dialog { position: fixed; inset: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); border: 0; background: #080808; color: #fff; overflow: hidden; }
.detail-photo-dialog[open] { display: flex; flex-direction: column; }
.detail-zoom-tools { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 6px; flex-shrink: 0; }
.detail-zoom-tools button { min-width: 44px; min-height: 44px; font-size: 15px; }
.detail-zoom-tools output { min-width: 45px; text-align: center; font-size: 13px; }
.detail-photo-stage { flex: 1; min-height: 0; position: relative; overflow: hidden; touch-action: none; overscroll-behavior: contain; cursor: grab; }
.detail-photo-stage:active { cursor: grabbing; }
.detail-photo-stage img { width: 100%; height: 100%; object-fit: contain; transform-origin: center; pointer-events: none; user-select: none; -webkit-user-select: none; }
#detail-copy-text { width: 100%; resize: vertical; font: inherit; }
@media (max-width: 375px) {
  .indexit-item-detail .detail-photo-recess { margin-inline: 6px; }
  .detail-field { grid-template-columns: minmax(61px, 28%) minmax(0, 1fr); gap: 8px; }
  .detail-field-label { font-size: 10px; }
  .detail-field-value { font-size: 12px; }
}
