:root {
  font-family: "Inter", "Segoe UI", system-ui, sans-serif;
  color: #fffaf4;
  background: #20221f;
  color-scheme: dark;
  --orange: #ff4d03;
  --muted: #c6c7bf;
  --edge: #4c4e46;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
body:has(dialog[open]) { overflow: hidden; }
button { font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 3px solid #ff9d73; outline-offset: 4px; }
.wrap { width: min(100% - 96px, 1320px); margin-inline: auto; }
.topbar { border-bottom: 1px solid #3c3e36; }
.topbar-inner { display: flex; align-items: center; min-height: 72px; }
.brand-logo { display: block; width: 192px; max-width: 100%; height: auto; }
.main { padding-block: 38px 48px; }
.intro { padding: clamp(22px, 4vw, 52px); border: 1px solid var(--edge); border-radius: 14px; background: #2a2c28; }
h1 { margin: 0 0 28px; font-weight: 820; letter-spacing: -.055em; font-size: clamp(2rem, 4.5vw, 4.3rem); line-height: 1.04; }
.collection-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.collection { display: inline-flex; justify-content: space-between; align-items: center; gap: 17px; min-height: 52px; padding: 12px 18px; border: 1px solid transparent; border-radius: 6px; color: #171915; background: var(--orange); font-weight: 780; text-align: left; }
.collection:hover { background: #ff763f; }
.chevron { display: inline-block; flex: 0 0 8px; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); }
.collection[aria-expanded="true"] .chevron { transform: rotate(225deg) translate(-1px, -1px); }
.gallery { margin-top: 30px; scroll-margin-block: 22px; }
.gallery-header { margin-bottom: 16px; }
.gallery h2 { font-size: clamp(1.45rem, 3vw, 2.4rem); letter-spacing: -.045em; margin: 0; }
.gallery-header p { color: var(--muted); margin: 4px 0 0; font-size: .94rem; }
.project-gallery h3 { margin: 0 0 10px; font-size: 1.18rem; }
.project-gallery + .project-gallery { margin-top: 26px; padding-top: 22px; border-top: 1px solid #77796e; }
.photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.photo { min-width: 0; background: #292b27; color: inherit; border: 1px solid var(--edge); border-radius: 9px; padding: 0; overflow: hidden; text-align: left; }
.photo:hover { border-color: var(--orange); }
.photo img { width: 100%; height: auto; aspect-ratio: 1 / 1; display: block; object-fit: cover; object-position: center; }
.photo-label { display: flex; gap: 8px; align-items: center; justify-content: space-between; min-height: 51px; padding: 10px 14px; font-size: .95rem; font-weight: 700; }
.expand-icon { flex: 0 0 13px; height: 13px; --corner: #ff8d60; background: linear-gradient(var(--corner), var(--corner)) top left / 5px 1.5px, linear-gradient(var(--corner), var(--corner)) top left / 1.5px 5px, linear-gradient(var(--corner), var(--corner)) top right / 5px 1.5px, linear-gradient(var(--corner), var(--corner)) top right / 1.5px 5px, linear-gradient(var(--corner), var(--corner)) bottom left / 5px 1.5px, linear-gradient(var(--corner), var(--corner)) bottom left / 1.5px 5px, linear-gradient(var(--corner), var(--corner)) bottom right / 5px 1.5px, linear-gradient(var(--corner), var(--corner)) bottom right / 1.5px 5px; background-repeat: no-repeat; }
#viewer { position: fixed; inset: 0; height: 100dvh; width: 100%; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: #161815; color: #fffaf4; overflow: hidden; }
#viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
#viewer::backdrop { background: #161815; }
.viewer-header, .viewer-footer { z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 16px; background: #252723; }
.viewer-header { border-bottom: 1px solid var(--edge); padding-top: max(9px, env(safe-area-inset-top)); }
.viewer-header h2 { margin: 0; font-size: clamp(1rem, 3vw, 1.3rem); }
.viewer-footer { border-top: 1px solid var(--edge); padding-bottom: max(9px, env(safe-area-inset-bottom)); }
.viewer-group { display: flex; align-items: center; gap: 8px; }
.viewer-group > span { min-width: 4ch; text-align: center; font-size: .83rem; font-variant-numeric: tabular-nums; }
#zoom-level { min-width: 7ch; }
.tool { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 7px 12px; background: #30322d; border: 1px solid #62645a; color: #fffaf4; border-radius: 6px; font-size: .875rem; font-weight: 720; white-space: nowrap; }
.tool:hover:not(:disabled) { background: #42453c; }
.tool:disabled { cursor: default; opacity: .47; }
.tool-icon { min-width: 44px; padding: 0; font-size: 1.15rem; }
.chevron-left { transform: rotate(135deg); }
.chevron-right { transform: rotate(-45deg); }
.viewport { position: relative; min-height: 0; overflow: hidden; background: #121410; touch-action: none; user-select: none; }
.viewport img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; }
.viewport { cursor: zoom-in; }
.viewport.zoomed { cursor: grab; }
.viewport.zoomed:active { cursor: grabbing; }
@media (max-width: 860px) {
  .wrap { width: calc(100% - 48px); }
}
@media (max-width: 600px) {
  .wrap { width: calc(100% - 28px); }
  .topbar-inner { min-height: 58px; }
  .brand-logo { width: 162px; }
  .main { padding-block: 17px 25px; }
  h1 { margin-bottom: 21px; }
  .collection-list { grid-template-columns: 1fr; }
  .photos { grid-template-columns: 1fr; }
  .photo img { max-height: 390px; }
  .viewer-header, .viewer-footer { padding-inline: 8px; }
  .viewer-group { gap: 4px; }
  #zoom-level { min-width: 5ch; }
  .tool { padding-inline: 8px; }
  .tool-icon { padding: 0; }
}
@media (max-width: 370px) {
  .viewer-footer { flex-wrap: wrap; justify-content: center; }
}

.topbar-inner { justify-content: space-between; gap: 12px; }
.login-main {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 24px 16px;
}
.login-card {
  width: min(100%, 430px);
  padding: clamp(24px, 7vw, 38px);
  background: #2a2c28;
  border: 1px solid var(--edge);
  border-radius: 14px;
}
.login-logo { display: block; width: 104px; height: 104px; border-radius: 12px; margin-bottom: 24px; }
.login-card h1 { font-size: clamp(1.85rem, 7vw, 2.5rem); margin-bottom: 8px; }
.login-card p { color: var(--muted); margin: 0 0 24px; }
.login-card form { display: grid; gap: 16px; }
.login-card label { display: grid; gap: 6px; font-weight: 700; }
.login-card input {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  font: inherit;
  color: inherit;
  background: #20221f;
  border: 1px solid #73756b;
  border-radius: 6px;
}
.login-card input:focus-visible { outline: 2px solid #ff9d73; outline-offset: 2px; }
.login-card .collection { justify-content: center; margin-top: 4px; }
.login-card .login-error { margin: 0; color: #ffb9a0; }

.login-card .remember { display: flex; align-items: center; gap: 10px; min-height: 32px; font-weight: 500; cursor: pointer; }
.login-card .remember input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; accent-color: var(--orange); }
