/* 100 days, 100 portraits — homepage: the Salon wall (H3, Neli's final hang) and the homepage-only sections.
   Shared reading styles: pages.css. Wall behaviour: js/wall.js.
   900px and up: the wall hangs 1:1 in a viewport you scroll or drag in both directions.
   Under 900px: the wall is scaled down and pans sideways only, so the page still scrolls up and down. */

/* ---------- The room ---------- */
.room { position: relative; }
.room__bar {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 32px;
  padding: 14px var(--gutter);
}
.room__intro { flex: 1 1 260px; margin: 0; max-width: 34em; font: 400 19px/1.35 var(--serif); color: var(--on-wall); }
.room__tools { flex: none; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: flex-end; gap: 12px 22px; margin-left: auto; }
@media (max-width: 1199.98px) { .room__intro { font-size: 17px; } }
/* Wide screens: the sentence on one line across the top, "Drag to explore the wall" under it, the mini-map on the right */
@media (min-width: 900px) {
  .room__bar { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 32px; row-gap: 4px; }
  .room__intro { max-width: none; grid-column: 1; grid-row: 1; }
  .room__tools { display: contents; }
  .room__hint { grid-column: 1; grid-row: 2; }
  .minimap { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
}
.room__hint { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; line-height: 1.35; color: var(--on-wall-2); }
.room__hint svg { flex: none; color: var(--brass); }
/* one sideways arrow at every width (Neli, 23 Oct 2026) */
.room__hint .ico-pan { display: none; }
.room__hint .ico-sideways { display: block; }
.room__noscript { margin: 0; padding: 8px var(--gutter) 48px; color: var(--on-wall-2); }

/* Mini-map: the whole wall at a glance, with a frame for where you stand. Click or drag it to move. */
.minimap {
  position: relative; flex: none; width: 120px; aspect-ratio: 5556 / 2690;
  background: rgba(0, 0, 0, .04); box-shadow: 0 0 0 1px rgba(37, 37, 37, .16);
  overflow: hidden; cursor: pointer; touch-action: none;
}
.minimap svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: rgba(37, 37, 37, .2); }
.minimap__view { position: absolute; left: 0; top: 0; border: 1.5px solid var(--brass); background: rgba(138, 59, 44, .14); pointer-events: none; }

/* ---------- The viewport and the wall ---------- */
.viewport {
  position: relative; overflow: auto;
  height: calc(100vh - 140px); height: calc(100svh - 140px); min-height: 480px;
  overscroll-behavior-x: contain; scroll-padding: 40px;
  cursor: grab; -webkit-user-select: none; user-select: none;
  scrollbar-width: thin; scrollbar-color: rgba(138, 59, 44, .5) transparent;
}
.viewport::-webkit-scrollbar { width: 10px; height: 10px; }
.viewport::-webkit-scrollbar-thumb { background: rgba(138, 59, 44, .45); border: 3px solid var(--wall); border-radius: 10px; }
.viewport::-webkit-scrollbar-track, .viewport::-webkit-scrollbar-corner { background: transparent; }
.viewport:focus { outline: none; }
.viewport:focus-visible { outline: 2px solid var(--brass); outline-offset: -4px; }
.room.is-dragging .viewport { cursor: grabbing; }
.wall { position: relative; }

/* One sheet: link > shade (shadow) > paper (torn clip) > drawing, then the day tag. Nothing is laid on a drawing. */
.sheet { position: absolute; display: block; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.sheet__shade {
  display: block;
  filter: drop-shadow(0 var(--o, 4px) var(--b, 6px) rgba(16, 18, 15, .2));
  transition: transform .35s var(--ease), filter .35s var(--ease);
}
.sheet__paper { display: block; background: var(--ground); }
.sheet .drawing { opacity: 0; transition: opacity .45s ease; }
.sheet .drawing.is-in { opacity: 1; }
.sheet__tag {
  display: flex; align-items: baseline; gap: 8px; max-width: 100%; margin-top: 4px;
  overflow: hidden; white-space: nowrap; color: var(--brass);
  font: 500 11px/13px var(--sans); letter-spacing: .14em; font-variant-numeric: tabular-nums lining-nums;
}
.sheet__no { flex: none; }
.sheet__name {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; letter-spacing: .01em;
  color: var(--on-wall); opacity: 0; transition: opacity .2s ease;
}
@media (hover: hover) {
  .sheet:hover .sheet__shade {
    transform: translateY(-3px);
    filter: drop-shadow(0 calc(var(--o, 4px) + 4px) calc(var(--b, 6px) + 6px) rgba(16, 18, 15, .26));
  }
  .sheet:hover .sheet__name { opacity: 1; }
}
.sheet:focus-visible { outline: 2px solid var(--brass); outline-offset: 5px; }
.sheet:focus-visible .sheet__name { opacity: 1; }
.room.is-dragging .sheet .sheet__shade { transform: none; filter: drop-shadow(0 var(--o, 4px) var(--b, 6px) rgba(16, 18, 15, .2)); }
.room.is-dragging .sheet .sheet__name { opacity: 0; }


/* ---------- Narrow screens: a sideways strip, scaled down by wall.js ---------- */
@media (max-width: 899.98px) {
  .room__bar { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px var(--gutter) 14px; }
  .room__intro { flex: none; font-size: 17px; line-height: 1.32; }
  .room__tools { margin-left: 0; justify-content: space-between; gap: 10px 16px; }
  .room__hint { gap: 8px; }
  .minimap { display: none; }
  .viewport { height: auto; min-height: 0; overflow-x: auto; overflow-y: hidden; }
  /* Until wall.js hangs the drawings, hold about the wall's height (2690 x scale) so the page doesn't jump. */
  .wall:empty { height: min(calc(348vw + 122px), 2018px); }
  .sheet__tag { margin-top: 2px; gap: 6px; font-size: 10px; line-height: 10px; }
}
@media (max-width: 480px) { .room__intro { font-size: 16px; } }
@media (pointer: coarse) { .viewport { cursor: auto; } }

