/* Lifecycle, fullscreen on the recon layout. The canvas is the page; the
   top bar and the bottom stack of stats, states and timeline sit over it.
   Species colours: pike amber, roach blue, chub green. */

.lc { position: fixed; inset: 0; background: var(--bg); --pike: var(--amber); --jack: #f5d78a; --roach: #4fb3ff; --chub: #6fdc8c; }
.lc canvas { display: block; width: 100%; height: 100%; }

.lc-top { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; pointer-events: none; }
.lc-title { display: flex; flex-direction: column; gap: 2px; }
.lc-brand { font: 600 16px var(--font-ui); letter-spacing: .12em; color: var(--phos); }
.lc-phase { font: 13px var(--font-data); color: var(--dim); background: rgba(7,13,11,.6); padding: 4px 10px; border-radius: 4px; }
.lc-phase em { font-style: normal; color: var(--fg); font-weight: 500; }
.lc-top__r { display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.lc-switch { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); background: rgba(7,13,11,.75); }
.lc-switch a { padding: 6px 12px; font: 500 12px var(--font-data); letter-spacing: .08em; color: var(--dim); text-decoration: none; }
.lc-switch a.is-on { background: var(--phos); color: var(--bg); }
.lc-select { padding: 6px 10px; border: 1px solid var(--line); background: rgba(7,13,11,.75); color: var(--fg); font: 500 12px var(--font-data); letter-spacing: .04em; max-width: 220px; }
.lc-play { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(7,13,11,.75); color: var(--fg); cursor: pointer; font-size: 13px; }
.lc-play:hover { border-color: var(--phos); color: var(--phos); }
.lc-exit { position: static; }

.lc-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(to top, rgba(7,13,11,.97) 70%, rgba(7,13,11,0)); }

.lc-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.lc-stat { text-align: center; padding: 6px 4px; border-top: 1px solid var(--line); }
.lc-stat__l { font: 11px var(--font-data); letter-spacing: .06em; color: var(--dim); }
.lc-stat__v { font: 600 17px var(--font-ui); color: var(--fg); font-variant-numeric: tabular-nums; }
.lc-stat__v.pike-large { color: var(--pike); } .lc-stat__v.pike-small { color: var(--jack); } .lc-stat__v.roach { color: var(--roach); } .lc-stat__v.chub { color: var(--chub); }

.lc-states { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.lc-state { padding: 10px 12px; border: 1px solid var(--line); background: rgba(13,26,21,.9); --c: var(--fg); }
.lc-state--pike-large { --c: var(--pike); } .lc-state--pike-small { --c: var(--jack); } .lc-state--roach { --c: var(--roach); } .lc-state--chub { --c: var(--chub); }
.lc-state__head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.lc-state__name { font: 500 13px var(--font-data); color: var(--c); }
.lc-state__name em { font-style: normal; color: var(--fg); }
.lc-state__badge { font: 500 10px var(--font-data); letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); color: var(--c); white-space: nowrap; }
.lc-state__body { margin-top: 6px; font: 12px var(--font-data); color: var(--fg); line-height: 1.4; }
.lc-state__src { margin-top: 4px; font: 10px var(--font-data); color: var(--dim); }

.lc-timeline { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.lc-timeline label { font: 12px var(--font-data); color: var(--dim); white-space: nowrap; }
.lc-timeline label span { color: var(--amber); margin-left: 6px; }
.lc-timeline input { flex: 1; appearance: none; height: 4px; background: var(--line); outline: none; }
.lc-timeline input::-webkit-slider-thumb { appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--amber); cursor: pointer; }
.lc-timeline input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--amber); cursor: pointer; }
.lc-timeline__month { min-width: 90px; text-align: right; font: 600 15px var(--font-ui); color: var(--fg); }

@media (max-width: 760px) {
  /* Phone: brand and phase in one row, controls wrap under them; the three
     state cards become a swipeable strip so the column keeps its height. */
  .lc-top { flex-direction: column; align-items: stretch; gap: 6px; left: 10px; right: 10px; }
  .lc-title { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; }
  .lc-brand { font-size: 13px; }
  .lc-phase { font-size: 11px; padding: 3px 8px; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lc-top__r { flex-wrap: wrap; gap: 6px; }
  .lc-select { flex: 1 1 100%; max-width: none; padding: 7px 10px; }
  .lc-switch a { padding: 7px 10px; font-size: 11px; }
  .lc-play { width: 34px; height: 34px; }
  .lc-exit { padding: 7px 10px; }

  .lc-bottom { padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .lc-stats { grid-template-columns: repeat(6, 1fr); gap: 3px; }
  .lc-stat { padding: 4px 2px; }
  .lc-stat__l { font-size: 9px; letter-spacing: .02em; }
  .lc-stat__v { font-size: 13px; }

  .lc-states { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .lc-states::-webkit-scrollbar { display: none; }
  .lc-state { flex: 0 0 88%; scroll-snap-align: start; padding: 8px 10px; }
  .lc-state__name { font-size: 12px; }
  .lc-state__body { font-size: 11px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
  .lc-state__src { display: none; }

  .lc-timeline { gap: 10px; margin-top: 8px; }
  .lc-timeline label { font-size: 11px; }
  .lc-timeline label span { display: none; }
  .lc-timeline input::-webkit-slider-thumb { width: 22px; height: 22px; }
  .lc-timeline__month { min-width: 70px; font-size: 13px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .lc-states { display: none; }
}
