/* =====================================================================
   Trip Log · Hatchet badges · Weather signs
   Same system as app.css: --ui-surface cards, hairline borders, one radius,
   pixel sprites at integer scale (2x / 3x) inside tinted tiles.
   ===================================================================== */

/* Shared: dark sprite tile used in every theme (pixel art reads best on dark) */
.trip-type-tile, .trip-head-ico, .hb-medal, .hb-chip, .ws-art {
  --tile: #1a1f19;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, var(--c, #b3c2a2) 14%, var(--tile));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, #b3c2a2) 20%, transparent);
  border-radius: var(--ui-r-tile);
}
[data-theme="red"] :is(.trip-type-tile, .trip-head-ico, .hb-medal, .hb-chip, .ws-art) { --tile: #140300; --c: #ff7a45; }
:is(.trip-type-tile, .trip-head-ico, .hb-medal, .hb-chip, .ws-art) svg {
  display: block; shape-rendering: crispEdges; image-rendering: pixelated;
}

/* ---------- Home: Hatchet progress pill ---------- */
.need-progress {
  position: absolute; top: 7px; right: 8px;
  padding: 2px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.02em; line-height: 1.4;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 16%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 28%, transparent);
  font-variant-numeric: tabular-nums;
}
.need-progress.is-full { color: #1a1712; background: var(--c); }

/* =====================================================================
   TRIP LOG
   ===================================================================== */
.trip-view { gap: 12px; }
.trip-type-tile { width: 40px; height: 40px; border-radius: 10px; }
.trip-type-tile svg { width: 32px; height: 32px; }
.trip-type-tile.is-small { width: 32px; height: 32px; border-radius: 9px; }
.trip-type-tile.is-small svg { width: 16px; height: 16px; }
.trip-type-tile.is-camp   { --c: #f2a274; }
.trip-type-tile.is-water  { --c: #8fbcd8; }
.trip-type-tile.is-fish   { --c: #a9c48e; }
.trip-type-tile.is-hazard { --c: #e8c86e; }
.trip-type-tile.is-note   { --c: #d8b882; }

.trip-head { gap: 10px; }
.trip-head-row { display: flex; align-items: center; gap: 12px; }
.trip-head-ico { --c: #f2a274; width: 56px; height: 56px; }
.trip-head-ico svg { width: 48px; height: 48px; }
.trip-head-text { flex: 1; min-width: 0; }
.trip-count {
  align-self: flex-start; white-space: nowrap;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: var(--ui-tile-neutral); color: var(--ui-sub);
}
.trip-privacy {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: var(--ui-r-tile);
  background: rgba(90, 114, 71, 0.1);
  border: 1px solid rgba(90, 114, 71, 0.28);
}
[data-theme="red"] .trip-privacy { background: rgba(255, 90, 40, 0.06); border-color: var(--ui-hairline-strong); }
.trip-privacy p { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--ui-sub); }
.trip-privacy strong { color: var(--ui-title); }
.trip-privacy-lock svg { width: 16px; height: 16px; margin-top: 2px; shape-rendering: crispEdges; display: block; }
.trip-head-actions { display: flex; gap: 8px; }
.trip-head-actions .tool-btn { flex: 1; }
.trip-head-actions .tool-btn[hidden] { display: none; }
.trip-export-opt {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ui-sub); cursor: pointer;
}
.trip-export-opt input { width: 18px; height: 18px; accent-color: var(--bob-accent); margin: 0; }
.trip-status { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--bob-muted); }
.trip-status:empty { display: none; }

.trip-list-title {
  margin: 4px 4px -4px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ui-sub);
}
.trip-list { display: flex; flex-direction: column; gap: 8px; }
.trip-empty {
  text-align: center; padding: 18px 14px;
  border: 1px dashed var(--ui-hairline-strong); border-radius: var(--ui-r);
  background: var(--ui-surface);
}
.trip-empty p { margin: 8px 0 0; font-size: 13px; color: var(--ui-sub); }
.trip-empty-icons { display: flex; gap: 6px; justify-content: center; }

.trip-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px 10px 10px;
  background: var(--ui-surface);
  border: 1px solid var(--ui-hairline-strong);
  border-radius: var(--ui-r);
  box-shadow: var(--ui-elev);
}
.trip-card-head { display: flex; align-items: center; gap: 10px; }
.trip-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.trip-card-kicker {
  font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bob-muted);
}
.trip-card-kicker.is-camp { color: #c8682e; }
.trip-card-kicker.is-water { color: #2f78a8; }
.trip-card-kicker.is-fish { color: #4f7a35; }
.trip-card-kicker.is-hazard { color: #a87a10; }
[data-theme="night"] .trip-card-kicker.is-camp { color: #f2a274; }
[data-theme="night"] .trip-card-kicker.is-water { color: #8fbcd8; }
[data-theme="night"] .trip-card-kicker.is-fish { color: #a9c48e; }
[data-theme="night"] .trip-card-kicker.is-hazard { color: #e8c86e; }
[data-theme="red"] .trip-card-kicker { color: #ff7a45; }
.trip-card-title {
  margin: 0; font-size: 15px; font-weight: 800; line-height: 1.25; color: var(--ui-title);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.trip-card-when { font-size: 12px; color: var(--ui-sub); font-variant-numeric: tabular-nums; }
.trip-card-photo {
  width: 52px; height: 52px; object-fit: cover; flex-shrink: 0;
  border-radius: 10px; border: 1px solid var(--ui-hairline-strong);
}
.trip-card-photo[hidden] { display: none; }
.trip-card-note {
  margin: 0 0 0 50px; font-size: 13px; line-height: 1.4; color: var(--ui-title);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden;
  white-space: pre-line;
}
.trip-gps {
  display: flex; align-items: center; gap: 8px;
  margin-left: 50px; padding: 6px 6px 6px 10px;
  border-radius: var(--ui-r-tile);
  background: var(--ui-tile-neutral);
  border: 1px solid var(--ui-hairline);
}
.trip-gps-form { margin-left: 0; }
.trip-gps-pin { display: inline-flex; flex-shrink: 0; }
.trip-gps-pin svg { width: 16px; height: 20px; display: block; shape-rendering: crispEdges; } /* 8x10 art at 2x */
.trip-gps-form { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 10px; }
.trip-gps-row { display: flex; align-items: center; gap: 8px; }
.trip-gps-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.trip-gps-coords {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px; font-weight: 700; color: var(--ui-title); letter-spacing: -0.01em;
}
.trip-gps-acc { font-size: 11.5px; color: var(--ui-sub); }
.trip-card-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; flex-wrap: wrap; }
.trip-card-actions.is-confirm {
  justify-content: flex-end;
  padding: 6px 6px 6px 10px; border-radius: var(--ui-r-tile);
  background: rgba(224, 64, 42, 0.08); border: 1px solid rgba(224, 64, 42, 0.25);
}
.trip-confirm-q { flex: 1; font-size: 12.5px; font-weight: 700; color: var(--ui-title); }
.kit-photo-btn.trip-del-yes { background: #c8322a; border-color: #c8322a; color: #fff; }
[data-theme="red"] .kit-photo-btn.trip-del-yes { background: #a01800; border-color: #a01800; color: #ffd8c8; }
.kit-photo-btn[hidden] { display: none; }

/* Form */
.trip-form { gap: 8px; border-color: var(--ui-hairline-strong); }
.trip-form .tool-label { margin-top: 6px; }
.trip-type-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.trip-type-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 2px 6px; min-height: 64px;
  border: 1px solid var(--ui-hairline-strong); border-radius: var(--ui-r-tile);
  background: var(--ui-surface); color: var(--ui-title);
  font-size: 11.5px; font-weight: 700; cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background-color 0.12s ease;
}
.trip-type-btn:active { transform: scale(0.97); }
.trip-type-btn.is-on {
  border-color: var(--bob-accent);
  box-shadow: inset 0 0 0 1px var(--bob-accent);
  background: color-mix(in srgb, var(--bob-accent) 8%, var(--ui-surface));
}
.trip-type-btn:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; }
.trip-type-btn .trip-type-tile { width: 36px; height: 36px; }
.trip-type-hint { margin: 0; }
.trip-input {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--ui-hairline-strong); border-radius: var(--ui-r-tile);
  background: var(--bob-page); color: var(--ui-title);
  font: inherit; font-size: 16px; /* 16px stops iOS zoom */
}
.trip-input:focus { outline: 2px solid var(--ui-focus); outline-offset: 1px; }
.trip-textarea { resize: vertical; min-height: 76px; line-height: 1.4; }
.trip-inline { display: flex; gap: 8px; align-items: center; }
.trip-inline .trip-input { flex: 1; min-width: 0; }
.trip-photo-slot { padding: 0; }
.trip-form-thumb[hidden] { display: none; }
.trip-gps-msg { margin: 0; }
.trip-gps-msg:empty { display: none; }
.trip-form-actions { margin-top: 8px; }
.trip-form-actions .tool-btn { flex: 1; }
.trip-form-del { justify-content: flex-start; }
.trip-form-host:empty { display: none; }

/* =====================================================================
   HATCHET BADGES
   ===================================================================== */
.hatchet-badges { gap: 10px; }
.hb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hb-count {
  font-size: 12px; font-weight: 800; padding: 3px 9px; border-radius: 999px;
  background: rgba(232, 165, 108, 0.16); color: #a8581c;
  font-variant-numeric: tabular-nums;
}
[data-theme="night"] .hb-count { color: #e8a56c; }
[data-theme="red"] .hb-count { color: #ff7a45; background: rgba(255, 90, 40, 0.12); }
.hb-bar {
  display: block; height: 6px; border-radius: 999px; overflow: hidden;
  background: var(--ui-tile-neutral); box-shadow: inset 0 0 0 1px var(--ui-hairline);
}
.hb-bar-fill { display: block; height: 100%; width: 0; border-radius: inherit; background: #e8a56c; transition: width 0.3s ease; }
[data-theme="red"] .hb-bar-fill { background: #ff6b2b; }
.hb-sub {
  margin: 4px 0 0; font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--ui-sub);
}
.hb-shelf {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.hb-shelf-miles { grid-template-columns: repeat(3, 1fr); }
.hb-badge {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center; min-width: 0;
}
.hb-medal {
  --c: #e8a56c;
  width: 60px; height: 60px; border-radius: 50%;
  position: relative;
}
.hb-medal svg { width: 48px; height: 48px; }
.hb-badge.is-milestone .hb-medal { --c: #e8c86e; width: 64px; height: 64px; }
.hb-badge:not(.is-earned) .hb-medal {
  background: var(--ui-tile-neutral);
  box-shadow: inset 0 0 0 1px var(--ui-hairline-strong);
}
.hb-badge:not(.is-earned) .hb-medal svg { filter: grayscale(1) brightness(0.9); opacity: 0.28; }
.hb-badge.is-earned .hb-medal {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 70%, transparent), 0 0 0 3px color-mix(in srgb, var(--c) 14%, transparent);
}
.hb-badge.is-new .hb-medal { animation: hb-pop 0.6s ease; }
@keyframes hb-pop { 0% { transform: scale(0.7); } 60% { transform: scale(1.12); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .hb-badge.is-new .hb-medal { animation: none; } .hb-bar-fill { transition: none; } }
.hb-name { font-size: 12px; font-weight: 800; line-height: 1.2; color: var(--ui-title); }
.hb-badge:not(.is-earned) .hb-name { color: var(--ui-sub); }
.hb-earn { font-size: 10.5px; line-height: 1.25; color: var(--ui-sub); }
.hb-badge.is-earned .hb-earn { color: #a8581c; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 9.5px; }
[data-theme="night"] .hb-badge.is-earned .hb-earn { color: #e8a56c; }
[data-theme="red"] .hb-badge.is-earned .hb-earn { color: #ff7a45; }
.hb-toast {
  margin: 0; padding: 8px 10px; border-radius: var(--ui-r-tile);
  font-size: 13px; font-weight: 800; color: var(--ui-title);
  background: rgba(232, 165, 108, 0.14); border: 1px solid rgba(232, 165, 108, 0.4);
}
.hb-toast[hidden] { display: none; }

/* Small badge chip at the right of each book challenge card */
.hatchet-book-card { position: relative; }
.hb-chip { --c: #e8a56c; width: 36px; height: 36px; border-radius: 50%; margin-left: auto; align-self: center; }
.hb-chip svg { width: 32px; height: 32px; }
.hb-chip:not(.is-earned) { background: var(--ui-tile-neutral); box-shadow: inset 0 0 0 1px var(--ui-hairline-strong); }
.hb-chip:not(.is-earned) svg { filter: grayscale(1); opacity: 0.3; }
.hb-chip.is-earned { box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--c) 70%, transparent); }

/* =====================================================================
   WEATHER SIGNS
   ===================================================================== */
.ws-view { gap: 12px; }
.ws-art { --c: #8fbcd8; --tile: #17202b; width: 84px; height: 60px; }
.ws-art svg { width: 72px; height: 48px; }      /* 24x16 art at exactly 3x */
.ws-art-sq { width: 56px; height: 56px; }
.ws-art-sq svg { width: 48px; height: 48px; }   /* 16x16 at 3x */
.ws-art-svg svg { width: 72px; height: 48px; image-rendering: auto; shape-rendering: geometricPrecision; }
[data-theme="red"] .ws-art { --tile: #140300; }

.ws-intro-head, .ws-offwater-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.ws-intro-head .section-lead, .ws-offwater-head .section-lead { margin: 0; }
.ws-legend {
  display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center;
  margin-top: 10px; font-size: 12.5px; color: var(--ui-sub);
}
.ws-legend .ws-tag { justify-self: start; }

.ws-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  white-space: nowrap;
}
.ws-tag.is-reliable { color: #3f6a2c; background: rgba(90, 140, 60, 0.14); box-shadow: inset 0 0 0 1px rgba(90, 140, 60, 0.3); }
.ws-tag.is-often { color: #93630c; background: rgba(232, 180, 60, 0.16); box-shadow: inset 0 0 0 1px rgba(232, 180, 60, 0.36); }
.ws-tag.is-folklore { color: #7a5aa0; background: rgba(150, 110, 200, 0.14); box-shadow: inset 0 0 0 1px rgba(150, 110, 200, 0.3); }
[data-theme="night"] .ws-tag.is-reliable { color: #a9d48e; }
[data-theme="night"] .ws-tag.is-often { color: #ecc86e; }
[data-theme="night"] .ws-tag.is-folklore { color: #c4a8e8; }
[data-theme="red"] .ws-tag.is-reliable { color: #ffb08a; background: rgba(255, 90, 40, 0.16); box-shadow: inset 0 0 0 1px rgba(255, 90, 40, 0.4); }
[data-theme="red"] .ws-tag.is-often { color: #ff7a45; background: rgba(255, 90, 40, 0.08); box-shadow: inset 0 0 0 1px rgba(255, 90, 40, 0.28); }
[data-theme="red"] .ws-tag.is-folklore { color: #a84a20; background: transparent; box-shadow: inset 0 0 0 1px rgba(168, 74, 32, 0.5); }

.ws-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.ws-card {
  display: flex; flex-direction: column; gap: 5px;
  padding: 10px 12px 11px 10px;
  border: 1px solid var(--ui-hairline-strong);
  border-radius: var(--ui-r-tile);
  background: var(--bob-page);
}
[data-theme="night"] .ws-card, [data-theme="red"] .ws-card { background: rgba(255, 255, 255, 0.015); }
.ws-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 2px; }
.ws-art-wrap { display: flex; gap: 6px; flex-shrink: 0; }
.ws-art-wrap.is-pair { flex-direction: column; }
.ws-art-wrap.is-pair .ws-art { height: 54px; }
.ws-card-title { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.ws-card h3 { margin: 0; font-size: 15px; font-weight: 800; line-height: 1.25; color: var(--ui-title); }
.ws-line { margin: 0; font-size: 13.5px; line-height: 1.42; color: var(--bob-ink); }
.ws-line strong { font-weight: 800; color: var(--ui-title); }
.ws-line.is-do {
  margin-top: 2px; padding: 7px 10px; border-radius: 10px;
  background: rgba(255, 107, 43, 0.08); border-left: 3px solid var(--bob-accent);
}
.ws-caveat { margin: 0; font-size: 12px; line-height: 1.4; color: var(--ui-sub); font-style: italic; }

.ws-wind-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 4px 0 10px; }
.ws-wind { align-items: flex-start; }
.ws-wind .ws-art { width: 100%; }
.ws-wind-dir { margin: 0; font-size: 12px; font-weight: 800; color: var(--bob-muted); letter-spacing: 0.02em; }
.ws-rules { margin: 6px 0 0; padding-left: 1.15em; font-size: 13.5px; line-height: 1.42; }
.ws-rules li { margin-bottom: 5px; }

.ws-offwater { border-color: rgba(224, 64, 42, 0.45); }
.ws-offwater .section-title { color: #c8322a; }
[data-theme="night"] .ws-offwater .section-title { color: #ff8a70; }
[data-theme="red"] .ws-offwater .section-title { color: #ff6b2b; }
.ws-check { gap: 6px; }
.ws-check .tool-check-toggle {
  padding: 10px 12px; font-size: 13.5px; font-weight: 600; line-height: 1.35;
  border-color: var(--ui-hairline-strong); background: var(--bob-page);
  border-radius: var(--ui-r-tile);
}
[data-theme="night"] .ws-check .tool-check-toggle, [data-theme="red"] .ws-check .tool-check-toggle { background: rgba(255, 255, 255, 0.015); }
.ws-check .tool-check-toggle input { accent-color: #c8322a; margin-top: 1px; }
.ws-check .tool-check-toggle:has(input:checked) { border-color: rgba(224, 64, 42, 0.6); background: rgba(224, 64, 42, 0.08); }
.ws-go-banner {
  margin: 10px 0 0; padding: 12px 14px; border-radius: var(--ui-r-tile);
  background: #c8322a; color: #fff; font-weight: 800; font-size: 14px; line-height: 1.35;
}
[data-theme="red"] .ws-go-banner { background: #a01800; color: #ffe0d0; }
.ws-go-banner[hidden] { display: none; }
.ws-offwater .kit-btn { margin-top: 10px; }

.ws-wind .ws-art { height: 76px; }
.ws-wind .ws-art svg { width: 108px; height: 72px; }
.ws-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ws-jump .action-btn { min-height: 32px; padding: 5px 11px; font-size: 12px; }
.ws-go-banner { margin: 2px 0 8px; }

/* Field Log: filter bar, weather/temp pills, and gear worked/failed notes */
.trip-filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.trip-filter-btn.is-on,
.trip-weather-btn.is-on {
  background: var(--bob-accent, #c8682e); color: #1a120c; border-color: transparent; font-weight: 700;
}
.trip-weather-pick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.trip-temp-in { max-width: 180px; margin-bottom: 4px; }
.trip-weather-pill {
  display: inline-block; margin: 6px 0 2px; padding: 3px 9px;
  font-size: 12px; font-weight: 600; border-radius: 999px;
  background: var(--ui-surface, rgba(0,0,0,0.05));
  border: 1px solid var(--ui-border, rgba(0,0,0,0.14));
}
.trip-gear-notes {
  margin: 8px 0 4px; padding: 8px 10px; border-radius: 8px;
  background: var(--ui-surface, rgba(0,0,0,0.04));
  border: 1px solid var(--ui-border, rgba(0,0,0,0.12));
  font-size: 13px; display: flex; flex-direction: column; gap: 4px;
}
.trip-gear-notes p { margin: 0; line-height: 1.4; }
.trip-gear-ok strong { color: #2f7a3e; }
.trip-gear-fail strong { color: #c93b2b; }
[data-theme="night"] .trip-gear-ok strong { color: #8ad697; }
[data-theme="night"] .trip-gear-fail strong { color: #ff7a6b; }
