/* Season, Docs and the week's weather: ranked boxes, the photo journal, the post viewer
   and day cards. Builds on views.css (panels, tiles, chips). */
/* Season: four metrics, view chips, ranked boxes. */
.tiles--4 { --cols: 4; }
.view-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; border-radius: 999px; }
.view-chips .chip-toggle { text-decoration: none; }
.view-chips .chip-toggle[aria-current="page"] { color: #1b1208; background: linear-gradient(180deg, #f8d59e, #dc9f5e); box-shadow: none; }
.rank-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rank-list li[hidden] { display: none; }
.rank-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 10px 14px 10px 10px;
  border-radius: 16px; color: var(--cream); text-decoration: none; background: rgba(244, 233, 215, 0.05);
}
.rank-list--plain .rank-row { grid-template-columns: minmax(0, 1fr) auto; padding-left: 16px; }
a.rank-row:hover { background: rgba(244, 233, 215, 0.09); box-shadow: inset 0 0 0 1px rgba(237, 181, 106, 0.4); }
.rank-n { color: var(--amber); font: 400 22px/1 var(--serif); text-align: center; font-variant-numeric: lining-nums; }
.rank-main { display: grid; gap: 4px; min-width: 0; }
.rank-name { font-weight: 600; overflow-wrap: anywhere; }
.rank-detail { color: var(--cream-3); font-size: 13.5px; }
.rank-bar { height: 5px; margin-top: 3px; }
.rank-value { font: 400 24px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.show-more {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 44px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--amber); font: 600 15px var(--sans); box-shadow: inset 0 0 0 1px rgba(237, 181, 106, 0.3);
}
.show-more:hover { background: rgba(237, 181, 106, 0.1); }
@media (max-width: 560px) {
  .tiles--4 { --cols: 2; }
  .view-chips { border-radius: 24px; }
}

/* Docs: journal header tiles, filters, the square post grid. */
.hero-tiles { margin-top: 14px; }
.panel .empty { padding: 28px 8px; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.filters-panel { gap: 0; padding: 8px 10px 8px 8px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.filters-toggle {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: var(--amber); font: 600 16px var(--sans);
}
.filters-toggle:hover { background: rgba(237, 181, 106, 0.1); }
.filters-toggle .icon { transform: rotate(90deg); transition: transform 0.2s; }
.filters-toggle[aria-expanded="true"] .icon { transform: rotate(-90deg); }
.filters-sort { color: var(--cream-3); font-size: 14px; padding-right: 8px; }
.filters-body { display: grid; gap: 18px; padding: 14px 12px 12px; }
.filters-body[hidden] { display: none; }
.filter-legend { color: var(--cream-3); font-size: 13.5px; font-weight: 600; }
.filter-select { appearance: none; max-width: 320px; cursor: pointer; }
.filter-select option { color: #1b1208; }
.filter-group .segmented { margin-top: 0; }
.filters-clear { justify-self: start; min-height: 40px; padding: 0 18px; }
.segmented button { padding: 8px 18px; border: 0; border-radius: 999px; cursor: pointer; background: transparent; color: var(--cream-2); font: 600 14.5px var(--sans); }
.segmented button[aria-pressed="true"] { color: #1b1208; background: linear-gradient(180deg, #f8d59e, #dc9f5e); }
.post-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; border-radius: 18px; overflow: hidden; }
.post-tile { position: relative; display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; cursor: pointer; background: none; }
.post-tile-photo { width: 100%; height: 100%; }
.post-tile:hover .post-tile-photo img { transform: scale(1.03); }
.post-tile-photo img { transition: opacity 0.35s ease, transform 0.4s ease; }
.post-tile:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.post-tile-label { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 6px; color: #fff; font: 600 11px/1.2 var(--sans); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: linear-gradient(transparent, rgba(0, 0, 0, 0.72)); }
.post-badge { position: absolute; top: 8px; right: 8px; padding: 3px 8px; border-radius: 8px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 12.5px; font-weight: 600; }

/* The post viewer: photos shown whole, then the result, caption, bag and notes. */
.post-viewer { width: min(620px, calc(100% - 24px)); max-height: calc(100svh - 24px); overflow-y: auto; padding: 14px 18px 22px; }
.post-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-bottom: 10px; }
.post-title { margin: 0; font: 600 16px var(--sans); }
.post-byline { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #1b1208; font-weight: 700; background: linear-gradient(180deg, #f8d59e, #dc9f5e); }
.post-who { display: grid; gap: 2px; min-width: 0; }
.post-hunters { font-weight: 600; overflow-wrap: anywhere; }
.post-where { color: var(--cream-3); font-size: 14px; }
.post-stage { position: relative; }
.post-photo .photo { aspect-ratio: 1; max-height: 58svh; width: 100%; border-radius: 18px; background: rgba(0, 0, 0, 0.35); }
.post-photo .photo img { object-fit: contain; }
.post-nav {
  position: absolute; top: 50%; translate: 0 -50%; display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%;
  cursor: pointer; color: var(--cream); background: rgba(16, 34, 32, 0.72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.post-nav:disabled { opacity: 0.25; cursor: default; }
.post-nav--prev { left: 10px; }
.post-nav--next { right: 10px; }
.post-result { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; font-weight: 600; }
.post-count { color: var(--cream-3); font-weight: 500; }
.post-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.post-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(244, 233, 215, 0.3); }
.post-dots span.is-on { background: var(--amber); }
.post-caption, .post-bag, .post-notes, .post-hint { margin: 10px 0 0; }
.post-caption[hidden] { display: none; }
.post-bag { color: var(--cream-2); }
.post-notes { white-space: pre-line; }
.post-open { width: 100%; margin-top: 16px; }
.post-hint { color: var(--cream-3); font-size: 14px; text-align: center; }

/* The week's weather: seven day cards, each opening the hourly wind. */
.weather-note { margin: 0; color: var(--cream-3); font-size: 14px; }
.weather-body { display: grid; gap: 12px; }
.week-days { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(92px, 1fr)); gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.week-days li { scroll-snap-align: start; }
.day-card {
  display: grid; gap: 4px; justify-items: start; width: 100%; padding: 12px; border: 0; border-radius: 16px; cursor: pointer; text-align: left;
  color: var(--cream); font: inherit; background: rgba(244, 233, 215, 0.06); box-shadow: inset 0 0 0 1px rgba(244, 233, 215, 0.08);
}
.day-card:hover { box-shadow: inset 0 0 0 1px rgba(237, 181, 106, 0.45); }
.day-name { font-weight: 700; }
.day-date { color: var(--cream-3); font-size: 13px; }
.day-temp { font: 400 18px/1.2 var(--serif); white-space: nowrap; }
.day-wind { display: inline-flex; align-items: center; gap: 4px; color: var(--cream-2); font-size: 13px; }
.day-wind .icon { width: 15px; height: 15px; color: var(--amber); }
.hourly-sheet .dialog-title:focus { outline: none; }
.hourly-sheet { width: min(460px, calc(100% - 24px)); max-height: 78svh; overflow-y: auto; }
.hourly-list { list-style: none; margin: 0; padding: 0; display: grid; }
.hourly-list li { display: grid; grid-template-columns: 64px 52px 1fr; gap: 10px; padding: 9px 2px; border-bottom: 1px solid rgba(244, 233, 215, 0.08); font-variant-numeric: tabular-nums; }
.hourly-time { color: var(--cream-3); }
.hourly-wind { font-weight: 600; }
.hourly-gust { color: var(--amber); font-weight: 500; }
@media (max-width: 560px) {
  .post-grid { border-radius: 14px; gap: 2px; }
  .post-viewer { padding: 12px 14px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .post-tile-photo img, .filters-toggle .icon { transition: none; }
}

/* AI: mode chips, the conversation and the composer. */
.ai-modes { margin-top: 14px; flex-wrap: wrap; }
.ai-hint { margin: 4px 0 0; max-width: 60ch; }
.ai-panel { gap: 12px; }
.ai-thread { list-style: none; margin: 0; padding: 4px; display: grid; align-content: start; gap: 10px; min-height: 280px; max-height: 56svh; overflow-y: auto; }
.ai-empty { margin: auto; padding: 40px 12px; color: var(--cream-3); text-align: center; }
.ai-turn { display: grid; gap: 6px; max-width: 92%; }
.ai-turn--user { justify-self: end; justify-items: end; }
.ai-turn--assistant { justify-self: start; justify-items: start; }
.ai-bubble { margin: 0; padding: 10px 14px; border-radius: 18px; white-space: pre-line; overflow-wrap: anywhere; line-height: 1.5; }
.ai-turn--user .ai-bubble { color: #1b1208; font-weight: 600; background: linear-gradient(180deg, #f8d59e, #dc9f5e); border-bottom-right-radius: 6px; }
.ai-turn--assistant .ai-bubble { background: rgba(244, 233, 215, 0.08); box-shadow: inset 0 0 0 1px rgba(244, 233, 215, 0.1); border-bottom-left-radius: 6px; }
.ai-typing { color: var(--cream-3); letter-spacing: 0.2em; }
.ai-open { min-height: 40px; padding: 0 16px; }
.ai-report { padding: 2px; font-size: 13px; color: var(--cream-3); }
.ai-off { display: grid; gap: 10px; justify-items: start; max-width: 46ch; margin: 24px auto; text-align: left; }
.ai-off-title { margin: 0; font: 600 18px/1.3 inherit; }
.ai-off p { margin: 0; color: var(--cream-3); }
.ai-off .actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ai-composer { display: flex; gap: 10px; align-items: flex-end; }
.ai-input { flex: 1; min-height: 50px; max-height: 140px; padding: 12px 16px; resize: vertical; line-height: 1.4; }
.ai-send { min-height: 50px; padding: 0 22px; }

/* Seasons: what a total covers, the season picker and season sections in logs. */
.stats-caption { margin: 4px 8px 10px; color: var(--cream-3); font-size: 13.5px; font-weight: 600; }
.hero-caption { margin: 12px 0 -4px; }
.season-select-wrap { display: grid; gap: 6px; width: min(380px, 100%); margin-top: 14px; }
.season-select { cursor: pointer; }
.season-log { display: grid; gap: 26px; }
.season-block { display: grid; gap: 14px; }
.season-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; padding: 0 4px 8px; border-bottom: 1px solid rgba(244, 233, 215, 0.14); font: 400 22px/1.2 var(--serif); }
.empty .pill { margin-top: 10px; padding: 0 22px; min-height: 44px; display: inline-flex; align-items: center; color: #1b1208; text-decoration: none; }

/* Full-screen photo viewer (lightbox.js): the photo fits the screen; zoomed, it is its real size and pans by scrolling. */
.photo.is-openable { cursor: zoom-in; }
.photo.is-openable:focus-visible { outline: 3px solid var(--amber); outline-offset: -3px; }
.lightbox { width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; color: #fff; background: #000; }
.lightbox::backdrop { background: #000; }
.lightbox-bar { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(max(10px, env(safe-area-inset-top)) + 4px) 14px 10px; background: linear-gradient(rgba(0, 0, 0, 0.75), transparent); }
.lightbox-bar .back-link { color: #fff; }
.lightbox-count { font-variant-numeric: tabular-nums; }
.lightbox-actions { display: flex; gap: 8px; }
.lightbox-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: auto; }
.lightbox-photo { width: 100%; height: 100%; aspect-ratio: auto; border-radius: 0; background: #000; }
.lightbox-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.lightbox.is-zoomed .lightbox-stage { display: block; }
.lightbox.is-zoomed .lightbox-photo { width: max-content; height: max-content; min-width: 100%; min-height: 100%; }
.lightbox.is-zoomed .lightbox-photo img { width: auto; height: auto; max-width: none; max-height: none; cursor: zoom-out; }
.lightbox-nav { position: absolute; z-index: 2; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; transform: translateY(-50%); cursor: pointer; color: #fff; background: rgba(0, 0, 0, 0.55); }
.lightbox-nav--prev { left: 12px; }
.lightbox-nav--next { right: 12px; }
.lightbox-nav:disabled { opacity: 0.3; cursor: default; }
.lightbox-caption { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; margin: 0; padding: 10px 16px calc(max(12px, env(safe-area-inset-bottom)) + 4px); text-align: center; font-size: 14px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); }
