.portfolio-reader-page { margin: 0; overflow: hidden; background: #f7f7f7; color: #222; }
.portfolio-reader { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto minmax(0,1fr); }
.portfolio-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid #ddd; background: #fff; }
.portfolio-counter { margin: 0; font-size: 15px; font-weight: 550; line-height: 1.4; white-space: nowrap; font-variant-numeric: tabular-nums; }
.portfolio-tools { display: flex; flex: none; gap: 8px; align-items: center; }
.portfolio-tools button,.portfolio-tools a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 1px solid #ddd; border-radius: 0; background: #fff; color: #222; text-decoration: none; font: inherit; font-size: 15px; cursor: pointer; }
.portfolio-tools svg { width: 20px; height: 20px; }
.portfolio-tools button:disabled { opacity: .3; cursor: default; }
.portfolio-tools button:not(:disabled):hover,.portfolio-tools a:hover { border-color: #ff385c; color: #ff385c; }
.portfolio-tools .portfolio-download { margin-right: 8px; }
.portfolio-stage { display: grid; grid-template-columns: clamp(52px,6vw,96px) minmax(0,1fr) clamp(52px,6vw,96px); min-height: 0; min-width: 0; }
.portfolio-side-arrow { align-self: center; justify-self: center; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 1px solid #ddd; border-radius: 0; background: #fff; color: #222; cursor: pointer; touch-action: manipulation; }
.portfolio-side-arrow svg { width: 24px; height: 24px; }
.portfolio-side-arrow:disabled { opacity: .3; cursor: default; }
.portfolio-side-arrow:not(:disabled):hover { border-color: #ff385c; color: #ff385c; }
.portfolio-canvas { min-height: 0; min-width: 0; overflow: auto; padding: clamp(12px,2.5vw,40px) 0; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; }
.portfolio-canvas.is-zoomed { touch-action: pan-x pan-y pinch-zoom; }
.portfolio-slide { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 0; min-width: 0; }
.portfolio-slide img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; max-width: none; object-fit: contain; user-select: none; }
.portfolio-canvas.is-zoomed .portfolio-slide { width: max(100%,var(--slide-width)); height: max(100%,var(--slide-height)); }
.portfolio-canvas.is-zoomed img { width: var(--slide-width); height: var(--slide-height); }
.portfolio-reader-page :focus-visible { outline: 2px solid #ff385c; outline-offset: 3px; }
.portfolio-canvas:focus-visible { outline-offset: -4px; }
.portfolio-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.portfolio-load-error,.portfolio-noscript { position: fixed; bottom: 20px; left: 20px; right: 20px; padding: 12px; text-align: center; background: #fff; color: #222; font-size: 13px; }
.portfolio-load-error[hidden] { display: none; }
@media(max-width:600px) {
  .portfolio-toolbar { padding: 12px; gap: 8px; }
  .portfolio-counter { font-size: 13px; }
  .portfolio-brand { display: none; }
  .portfolio-tools { gap: 4px; }
  .portfolio-tools button,.portfolio-tools a { width: 40px; height: 40px; font-size: 13px; }
  .portfolio-tools .portfolio-download { margin-right: 2px; }
  .portfolio-stage { grid-template-columns: 48px minmax(0,1fr) 48px; }
  .portfolio-side-arrow { width: 44px; height: 44px; }
  .portfolio-side-arrow svg { width: 21px; height: 21px; }
  .portfolio-canvas { padding: 10px 0; }
}
@media(max-width:340px) {
  .portfolio-toolbar { padding-inline: 8px; }
  .portfolio-tools button,.portfolio-tools a { width: 36px; }
}
