/* HNHOT images route styles. */

.article-gallery-media .image-media {
aspect-ratio: 16 / 10;
}

.article-gallery-media .image-media.is-loaded {
aspect-ratio: auto;
}

.article-gallery-media .image-media img {
display: block; height: auto; object-fit: contain;
}

body.article-image-viewer-open {
overflow: hidden;
}

.article-image-viewer {
width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; color: var(--nav-text); background: var(--viewer-backdrop);
}

.article-image-viewer::backdrop {
background: var(--viewer-backdrop); backdrop-filter: blur(8px);
}

.article-image-viewer-panel {
position: relative; width: 100%; height: 100%; overflow: hidden;
}

.article-image-viewer-close {
position: absolute; z-index: 2; top: max(14px, env(safe-area-inset-top)); right: max(14px, env(safe-area-inset-right)); min-height: 40px; padding: 8px 13px; border: 1px solid var(--nav-line); border-radius: 999px; color: var(--nav-text); background: color-mix(in srgb, var(--nav) 82%, transparent); cursor: pointer; font-size: 11px; font-weight: 750;
}

.article-image-viewer-stage {
display: grid; width: 100%; height: 100%; padding: max(64px, calc(50px + env(safe-area-inset-top))) max(16px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); overflow: hidden; place-items: center; touch-action: none; user-select: none;
}

.article-image-viewer-stage img {
display: block; max-width: 100%; max-height: 100%; opacity: 0; object-fit: contain; will-change: transform;
}

.article-image-viewer-stage img.is-loaded {
opacity: 1;
}

.article-image-viewer-stage img.is-resetting {
transition: transform .2s ease;
}

.article-image-viewer-stage span {
position: absolute; color: var(--media-muted); font-size: 11px; pointer-events: none;
}

.image-archive-page {
width: min(1480px, calc(100% - 48px)); padding-bottom: 80px;
}

.image-archive-intro {
max-width: 720px; margin: 18px 0 28px; color: var(--muted); font-family: Georgia, "Noto Serif CJK SC", serif; font-size: 14px; line-height: 1.75;
}

.image-archive-intro p {
margin: 0;
}

.image-date-group {
margin-top: 32px;
}

.image-date-group > header {
display: flex; padding-bottom: 10px; align-items: baseline; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line);
}

.image-date-group > header h2 {
margin: 0; font: 700 22px Georgia, "Noto Serif CJK SC", serif;
}

.image-date-group > header span {
color: var(--muted); font-size: 11px;
}

.image-story-grid {
display: grid; padding-top: 14px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); grid-auto-flow: dense; grid-auto-rows: 1px; align-items: start; gap: 13px;
}

.image-story {
min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
}

.image-story-header {
display: grid; min-height: 104px; padding: 14px; grid-template-columns: 27px minmax(0, 1fr) auto; align-items: start; gap: 10px; border-bottom: 1px solid var(--line-soft);
}

.image-story-header h3 {
margin: 0; font: 700 16px/1.45 Georgia, "Noto Serif CJK SC", serif;
}

.image-story-header h3 a:hover {
color: var(--accent);
}

.image-story-header p {
display: -webkit-box; margin: 5px 0 0; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}

.image-story-header > span:last-child {
padding-top: 4px; color: var(--muted); font-size: 9px; white-space: nowrap;
}

.image-story-gallery {
display: grid; padding: 9px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px;
}

.image-story-figure {
min-width: 0; margin: 0; overflow: hidden; border-radius: 7px; background: color-mix(in srgb, var(--line-soft) 72%, var(--paper));
}

.image-card-trigger {
display: block; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; cursor: zoom-in;
}

.image-media {
position: relative; display: grid; overflow: hidden; aspect-ratio: 4 / 3; color: var(--muted); background: color-mix(in srgb, var(--line-soft) 72%, var(--paper)); place-items: center;
}

.image-media img {
width: 100%; height: 100%; opacity: 0; object-fit: cover; transition: opacity .22s ease;
}

.image-media.is-loaded img {
opacity: 1;
}

.image-story-figure .image-media.is-loaded {
aspect-ratio: auto;
}

.image-story-figure .image-media img {
display: block; height: auto; object-fit: contain;
}

.image-media.is-error img {
display: none;
}

.image-load-state {
position: absolute; inset: auto 12px 12px; color: var(--muted); font-size: 10px; text-align: center;
}

.image-story-figure figcaption {
display: -webkit-box; padding: 8px 9px 9px; overflow: hidden; color: var(--muted); font: 10px/1.55 Georgia, "Noto Serif CJK SC", serif; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
}

.image-empty {
margin-top: 30px;
}

body.image-viewer-open {
overflow: hidden;
}

.image-viewer {
width: 100vw; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 26px; border: 0; color: var(--ink); background: var(--viewer-overlay);
}

.image-viewer::backdrop {
background: var(--viewer-backdrop); backdrop-filter: blur(8px);
}

.image-viewer-panel {
display: grid; width: min(1280px, 100%); height: min(820px, 100%); margin: auto; overflow: hidden; grid-template-rows: auto minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow-strong);
}

.image-viewer-toolbar {
position: relative; z-index: 4; display: flex; min-height: 48px; padding: 7px 10px 7px 18px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: var(--muted); background: var(--paper); font-size: 11px;
}

.image-viewer-toolbar button {
border: 1px solid var(--line); color: var(--ink); background: color-mix(in srgb, var(--paper) 84%, transparent); cursor: pointer; font-size: 11px; font-weight: 700;
}

.image-viewer-toolbar button {
min-height: 34px; padding: 6px 12px; border-radius: 999px;
}

.image-viewer-content {
position: relative; min-height: 0; overflow-y: auto; background: var(--bg); overscroll-behavior-y: contain; scroll-behavior: smooth; scroll-snap-type: y proximity;
}

.image-viewer-story {
position: relative; display: grid; width: min(1120px, calc(100% - 48px)); min-height: calc(100% - 28px); margin: 0 auto 28px; padding: 28px; grid-template-columns: minmax(0, 1fr) 320px; grid-template-rows: auto auto 1fr auto; align-content: start; column-gap: 28px; background: var(--paper); scroll-margin-top: 0; scroll-snap-align: start;
}

.image-viewer-story-header {
display: grid; padding-bottom: 18px; grid-column: 1 / -1; grid-template-columns: 27px minmax(0, 1fr); gap: 12px; border-bottom: 1px solid var(--line-soft);
}

.image-viewer-story-header span:not(.scope-badge) {
color: var(--muted); font-size: 10px;
}

.image-viewer-story-header h2 {
margin: 4px 0 0; font: 700 24px/1.4 var(--font-serif);
}

.image-viewer-carousel {
min-width: 0; grid-column: 1; grid-row: 2 / 5;
}

.image-viewer-strip {
display: flex; overflow-x: auto; overflow-y: hidden; background: var(--media-bg); scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-inline: contain;
}

.image-viewer-strip::-webkit-scrollbar {
display: none;
}

.image-viewer-slide {
flex: 0 0 100%; min-width: 0; margin: 0; scroll-snap-align: start;
}

.image-viewer-media {
position: relative; display: grid; width: 100%; overflow: hidden; padding: 0; border: 0; aspect-ratio: 4 / 3; color: inherit; background: var(--media-bg); cursor: pointer; place-items: center;
}

.image-viewer-media img {
position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; object-fit: contain; transition: opacity .18s ease;
}

.image-viewer-media.is-loaded img {
opacity: 1;
}

.image-viewer-media span {
position: absolute; color: var(--media-muted); font-size: 11px;
}

.image-viewer-media:focus-visible {
outline: 2px solid var(--accent); outline-offset: -2px;
}

.image-viewer-slide figcaption {
padding: 10px 12px 0; color: var(--muted); font: 11px/1.65 var(--font-serif);
}

.image-viewer-dots {
display: flex; min-height: 30px; padding: 10px 0 0; align-items: center; justify-content: center; gap: 8px;
}

.image-viewer-dots button {
width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--line); cursor: pointer; transition: transform .18s ease, background-color .18s ease;
}

.image-viewer-dots button[aria-current="true"] {
background: var(--accent); transform: scale(1.28);
}

.image-viewer-story > .image-viewer-summary {
grid-column: 2; margin-top: 24px;
}

.image-viewer-story > .image-viewer-summary strong {
color: var(--muted); font-size: 10px; letter-spacing: .08em;
}

.image-viewer-story > .image-viewer-summary p {
margin: 7px 0 0; color: var(--muted); font: 13px/1.75 var(--font-serif);
}

.image-viewer-story > .source-button {
margin-top: 20px; grid-column: 2; align-self: start; justify-self: start; border-radius: 999px;
}

.image-viewer-next-peek {
display: none;
}

.image-viewer-toolbar button:hover {
border-color: var(--accent); color: var(--accent);
}

@media (max-width: 760px) {
.article-gallery-media .image-media {
aspect-ratio: 4 / 3;
}

.article-gallery-media .image-media.is-loaded {
aspect-ratio: auto;
}

.article-gallery-media .image-media img {
width: 100%; height: auto; object-fit: contain;
}

.image-archive-page {
width: 100%; padding: 19px 16px 38px;
}

.image-archive-page > .explore-page-header {
padding-bottom: 0; border-bottom: 0;
}

.image-archive-page > .explore-page-header .eyebrow,
  .image-archive-page > .explore-page-header .explore-stats {
display: none;
}

.image-archive-page > .explore-page-header h1 {
margin: 0; font: 700 20px/1.3 var(--font-serif); letter-spacing: 0;
}

.image-archive-intro {
margin: 18px 0 26px; font-size: 14px;
}

.image-date-group {
margin-top: 28px;
}

.image-date-group > header {
position: sticky; top: env(safe-area-inset-top); z-index: 28; min-height: 42px; margin: 0 -16px 10px; padding: 8px max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left)); align-items: baseline; flex-direction: row; gap: 12px; border-bottom: 0; background: var(--bg);
}

.image-date-group > header h2 {
min-width: 0; overflow: hidden; font-size: 18px; text-overflow: ellipsis; white-space: nowrap;
}

.image-date-group > header > span {
flex: 0 0 auto; white-space: nowrap;
}

.image-story-grid {
padding-top: 11px; grid-template-columns: 1fr; grid-auto-flow: row; grid-auto-rows: auto; gap: 10px;
}

.image-story-header {
min-height: 0; padding: 12px 11px;
}

.image-story-header h3 {
font-size: 14px;
}

.image-story-header p {
font-size: 10px;
}

.image-story-gallery {
display: flex; padding: 8px; overflow-x: auto; gap: 7px; scroll-snap-type: x mandatory; scrollbar-width: none;
}

.image-story-gallery::-webkit-scrollbar {
display: none;
}

.image-story-figure {
flex: 0 0 min(68vw, 245px); scroll-snap-align: start;
}

.image-story-figure figcaption {
min-height: 54px; -webkit-line-clamp: 2;
}

.image-viewer {
padding: 0;
}

.image-viewer-panel {
width: 100%; height: 100%; border: 0; border-radius: 0;
}

.image-viewer-toolbar {
position: sticky; top: 0; min-height: calc(49px + env(safe-area-inset-top)); padding: calc(7px + env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) 7px max(16px, env(safe-area-inset-left));
}

.image-viewer-content {
background: var(--paper); scroll-padding-top: 0; scroll-behavior: auto; scroll-snap-type: y mandatory;
}

.image-viewer-story {
display: grid; width: 100%; height: 100%; min-height: 100%; max-height: 100%; margin: 0; padding: 0; overflow: hidden; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; column-gap: 0; border-bottom: 0; scroll-snap-align: start; scroll-snap-stop: normal;
}

.image-viewer-story-header {
min-height: 0; padding: 14px 18px 12px; grid-template-columns: 25px minmax(0, 1fr); gap: 9px; align-content: start;
}

.image-viewer-story-header h2 {
display: -webkit-box; margin-top: 4px; overflow: hidden; font-size: 19px; line-height: 1.4; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}

.image-viewer-carousel {
display: grid; width: 100%; min-height: 0; grid-column: 1; grid-row: 2; grid-template-rows: minmax(0, 1fr) auto;
}

.image-viewer-strip {
min-height: 0;
}

.image-viewer-slide {
display: grid; height: 100%; grid-template-rows: minmax(0, 1fr) auto;
}

.image-viewer-media {
min-height: 0; height: 100%; aspect-ratio: auto;
}

.image-viewer-media img {
display: block;
}

.image-viewer-slide figcaption {
display: -webkit-box; min-height: 0; max-height: 42px; padding: 7px 18px 0; overflow: hidden; font-size: 10px; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}

.image-viewer-dots {
min-height: 24px; padding-top: 7px;
}

.image-viewer-story > .image-viewer-summary {
margin: 7px 18px 0; grid-column: 1; grid-row: 3;
}

.image-viewer-story > .image-viewer-summary p {
display: -webkit-box; max-height: 44px; margin-top: 3px; overflow: hidden; font-size: 11px; line-height: 1.65; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
}

.image-viewer-story > .source-button {
margin: 10px 18px 12px; grid-column: 1; grid-row: 4; align-self: start; justify-self: start;
}

.image-viewer-next-peek {
display: none;
}
}

.reader-image-block {
margin: 24px 0;
  text-align: center;
  scroll-margin-top: 80px;
}

.reader-image-block img {
max-width: 100%;
  height: auto;
  border-radius: 11px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.reader-image-block figcaption {
margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-sans);
}
