/* Jogo Leve — O Meu Bichinho, the scene (`47`).
 *
 * Sized from the container, never fixed (`SH-24`), and it must work at 320x568 (`SH-21`).
 * Tap targets are >= 44x44 CSS px (`SH-22`) — on a 1 GB phone in daylight a smaller button is
 * a button that gets missed.
 */

.jl-pet-page {
  /* THE PAGE IS THE VIEWPORT, so the scene can distribute its own space (`SH-21`, `SH-23`). */
  min-height: 100vh;
  min-height: 100dvh;
  /*
   * ⭐ THE DARK BACKGROUND LIVES ON THE PAGE, NOT ONLY ON THE SCENE.
   *
   * All of the pet's styling hung off `.jl-pet-scene`, which does not exist until the gate lets the
   * game mount. Signed out, the page was therefore UNSTYLED: white, with the gate panel floating in
   * the top-left corner. That is the state every new player sees first.
   */
  background: #0b1d19;
  color: #e8f2ec;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
/* The gate needs the flex centring the scene would otherwise provide: `margin: auto` on the panel
   only centres inside a flex or block parent with height. */
.jl-gate-host {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  padding: 16px;
}
.jl-gate-host[aria-busy] { opacity: 0.6; }
.jl-pet-scene {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px 12px 18px;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  /* ⭐ THE SCENE TAKES THE SKY'S COLOURS, NOT A FIXED DARK GREEN.
     The canvas paints the sky, but the text and buttons sit BELOW it on the
     scene's own background. A fixed green kept them light-ink while the sky went
     bright, so at midday a pale label sat directly under a bright sky.
     `--sky-mid` is set from `JLStorm` whenever the sky changes. */
  background: var(--sky-mid, #0f2a24);
  color: #e8f2ec;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ---- the numbers row ------------------------------------------------------------------- */
.jl-pet-nums {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}
.jl-pet-num {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  padding: 6px 12px;
}
.jl-pet-num-lab { font-size: 14px; line-height: 1; opacity: 0.9; }
.jl-pet-num-val {
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  color: #ffd54f;
}

/* ---- the stage ------------------------------------------------------------------------- */
.jl-pet-stage {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 0;
  position: relative;
}
.jl-pet-canvas {
  display: block;
  /* THE PET IS THE PAGE. Its size comes from `resize()` in JS, derived from the container. */
  max-width: 100%;
  touch-action: manipulation;
}
/* THE MOOD IS ALSO A WORD (`RN-5`, `BM-2`): the face alone would carry meaning by shape only,
   and a low-vision player reads the word. */
.jl-pet-mood {
  font-size: 13px;
  letter-spacing: 0.02em;
  color: #9fd8b6;
  text-transform: lowercase;
}
.jl-pet-line {
  margin: 0;
  text-align: center;
  font-size: 13.5px;
  line-height: 1.4;
  color: #b7cfc2;
  min-height: 2.8em;
}

/* ---- the three taps -------------------------------------------------------------------- */
.jl-pet-acts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.jl-pet-act {
  /* 44 px MINIMUM (`SH-22`), and the row is the primary control of the page. */
  min-height: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font: inherit;
  color: #eaf5ee;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.jl-pet-act:active { background: rgba(255, 255, 255, 0.16); }
.jl-pet-glyph { font-size: 20px; line-height: 1; }
.jl-pet-act-lab { font-size: 11.5px; line-height: 1.1; opacity: 0.92; }

/* DONE FOR TODAY: dimmed AND struck through AND disabled — three signals, not one, so the state
   survives greyscale and colour blindness (`SH-81`). */
.jl-pet-act-done {
  opacity: 0.42;
  text-decoration: line-through;
  cursor: default;
  background: rgba(255, 255, 255, 0.04);
}

.jl-pet-sleep {
  min-height: 44px;
  font: inherit;
  font-size: 13px;
  color: #8fb9a6;
  background: transparent;
  border: 1px dashed rgba(143, 185, 166, 0.35);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.jl-pet-err {
  padding: 24px 16px;
  text-align: center;
  color: #e8f2ec;
}
.jl-pet-err a { color: #ffd54f; }

/* NARROW PHONES (320 px, `SH-21`): the labels shrink before the targets do. */
@media (max-width: 340px) {
  .jl-pet-act-lab { font-size: 10.5px; }
  .jl-pet-scene { padding: 8px 8px 14px; gap: 8px; }
}

/* ANIMATION IS A GIFT, NOT A REQUIREMENT: a player who has asked for reduced motion gets a
   still pet, which still carries every piece of information the moving one does. */
@media (prefers-reduced-motion: reduce) {
  .jl-pet-canvas { transition: none; }
}

/* ---- the tutorial (`52`, BS-1) ---------------------------------------------------------
   FOUR RECTANGLES, NOT A 100vmax box-shadow. `TL-7` specifies the shadow, but the demo found it
   does not clip inside an overflow:hidden container — the dim leaked into the page below and the
   whole phone went dark except the control (`55` §6). Four absolutely-positioned rectangles leave
   the area around the real control clear, so the player taps the actual button (`TL-3`).
*/
.jl-tut-shade {
  position: fixed;
  background: rgba(0, 0, 0, 0.55);
  z-index: 60;
  pointer-events: none;   /* the control underneath stays tappable */
}
.jl-tut-panel {
  position: fixed;
  z-index: 61;
  display: flex;
  /*
   * ⭐ THE PANEL IS A COLUMN WITH A BUTTON ROW, NOT A ROW OF THREE ITEMS.
   *
   * It was `flex` with `align-items: center`, which was right for a one-line hint beside one button.
   * The intro steps add a TITLE and a second button, and a row then put the title in a narrow
   * column beside the paragraph — the heading broke to one word per line while the text squeezed
   * past it. Text, then buttons, is what the content is.
   */
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  background: #14261f;
  border: 1px solid rgba(255, 213, 79, 0.35);
  border-radius: 12px;
  padding: 12px 12px 12px 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}
.jl-tut-line {
  flex: 1 1 auto;
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  color: #f1f8f3;
}
/* THE TWO BUTTONS SIT SIDE BY SIDE under the text, per the column layout above. `Continuar` takes
   the room and `Saltar` stays small — the primary action is the one to follow. */
.jl-tut-go { order: 2; }
.jl-tut-skip { order: 3; align-self: flex-end; }
.jl-tut-title, .jl-tut-line { order: 1; }

.jl-tut-skip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 13px;
  color: #0b1d19;
  background: #ffd54f;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}

/* ==== THE MIMINHO PAGE (`49`) ==========================================================
   DOM + CSS only (`R-1`). The plant is not a canvas: the creature is the spine's single paint,
   and a second canvas here would be a second thing to redraw on a 1 GB phone.
*/
.jl-mim {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 14px 24px;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  background: linear-gradient(180deg, #0f2a24 0%, #0b1d19 55%, #081512 100%);
  color: #e8f2ec;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: center;
}
.jl-mim-title { margin: 4px 0 2px; font-size: 17px; font-weight: 700; }

/* the plant: a pot with a stem, and leaves alternating up it */
.jl-mim-plantbox {
  width: 100%;
  max-width: 320px;
  height: 210px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
}
.jl-mim-plant { position: relative; width: 160px; height: 100%; }
.jl-mim-pot {
  position: absolute;
  bottom: 0; left: 50%;
  width: 62px; height: 40px;
  margin-left: -31px;
  background: linear-gradient(180deg, #a9704a, #7d4f31);
  border-radius: 4px 4px 10px 10px;
}
.jl-mim-pot::before {
  content: '';
  position: absolute;
  top: -6px; left: -5px; right: -5px;
  height: 10px;
  background: #b87d54;
  border-radius: 3px;
}
.jl-mim-stem {
  position: absolute;
  bottom: 36px; left: 50%;
  width: 5px;
  margin-left: -2.5px;
  background: linear-gradient(180deg, #4e7d3f, #35602c);
  border-radius: 3px;
}
/* THE LEAVES LIVE IN A BOX THAT STARTS AT THE POT RIM (its `bottom` is set in JS to the rim
   height), so a leaf's `bottom` is measured up the STEM rather than up the whole plant. The
   first version used `inset: 0`, which put the lowest leaves inside the pot. */
.jl-mim-leaves {
  position: absolute;
  left: 0; right: 0;
  margin: 0; padding: 0; list-style: none;
}
.jl-mim-leaf {
  position: absolute;
  left: 50%;
  width: 26px; height: 15px;
  background: #4f8f3d;
  border-radius: 0 100% 0 100%;
}
.jl-mim-leaf-l { margin-left: -28px; border-radius: 100% 0 100% 0; background: #477f37; }
.jl-mim-leaf-r { margin-left: 2px; }
/* R-4: above the cap the stem carries the texture instead of 200 more nodes. */
.jl-mim-leaves-bulk { background: linear-gradient(180deg, transparent, rgba(79,143,61,.18)); }

.jl-mim-rings { margin: 0; font-size: 15px; font-weight: 700; color: #ffd54f; }
.jl-mim-since { margin: 0 0 6px; font-size: 12.5px; color: #9fb9ab; }

.jl-mim-card {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  padding: 8px 16px;
  margin-top: 4px;
}
.jl-mim-card-lab { font-size: 13px; color: #b7cfc2; }
.jl-mim-card-val { font-size: 17px; color: #ffd54f; font-variant-numeric: tabular-nums; }
.jl-mim-fonte { margin: 0; font-size: 12.5px; color: #9fb9ab; }

.jl-mim-care { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 4px; }
.jl-mim-chip {
  font-size: 11.5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  color: #7f9689;
}
/* DONE IS ALSO A SHAPE AND A WORD, never colour alone (`SH-81`). */
.jl-mim-chip-on { background: rgba(120,200,150,.16); border-color: rgba(120,200,150,.4); color: #bfe6cd; }

.jl-mim-of {
  width: 100%; max-width: 320px;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
}
.jl-mim-of-top { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.jl-mim-of-val { font-size: 15px; color: #ffd54f; }
.jl-mim-of-best { font-size: 12px; color: #9fb9ab; }
.jl-mim-flowers { margin-top: 6px; font-size: 15px; line-height: 1.2; color: #e79bd0; letter-spacing: 2px; min-height: 1em; }

.jl-mim-back {
  margin-top: 12px;
  font-size: 13.5px;
  color: #ffd54f;
  text-decoration: none;
  padding: 10px 14px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.jl-pet-link {
  margin-top: 4px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13.5px;
  color: #ffd54f;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 213, 79, 0.22);
  border-radius: 12px;
}

/* ==== THE STAGING TIME CONTROL =========================================================
   Only ever rendered on localhost or staging.* — the module refuses to run elsewhere, and these
   rules do nothing without its markup. See test-clock.js for why the gate is at runtime.
*/
.jl-tm {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 80;
  background: rgba(20, 30, 44, 0.96);
  border: 1px solid #35506b;
  border-radius: 12px;
  padding: 8px 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #dbe7f3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
.jl-tm-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}
.jl-tm-title {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #0d1720;
  background: #6cb6ff;
  border-radius: 4px;
  padding: 2px 5px;
}
.jl-tm-day { font-size: 13px; color: #ffffff; font-variant-numeric: tabular-nums; }
.jl-tm-off { font-size: 11px; color: #8fa8bf; margin-left: auto; }
.jl-tm-on { border-color: #d98a2b; }
.jl-tm-on .jl-tm-title { background: #ffb648; }
.jl-tm-on .jl-tm-off { color: #ffb648; font-weight: 700; }

.jl-tm-row { display: flex; gap: 6px; }
.jl-tm-btn, .jl-tm-reset {
  flex: 1 1 auto;
  min-height: 40px;
  font: inherit;
  font-size: 12.5px;
  color: #dbe7f3;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.jl-tm-btn:active, .jl-tm-reset:active { background: rgba(255, 255, 255, 0.18); }
.jl-tm-reset { margin-top: 6px; width: 100%; color: #ffb0b0; }

/* A FABRICATED DAY MUST NEVER BE MISTAKEN FOR A REAL ONE. */
.jl-tm-flag {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 81;
  background: #d98a2b;
  color: #1a1004;
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-align: center;
  padding: 2px 0;
  pointer-events: none;
}

/* ==== THE EVENT POPUP (`63` §10) =========================================================
   A moment is a CHOICE: the player taps to keep it. Nothing here is rolled for value, so the
   panel has no rarity, no glow and no "open another" — the restraint is the point (`50` §1.2).
*/
.jl-ev {
  position: fixed;
  inset: 0;
  z-index: 85;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(4, 8, 12, 0.78);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.jl-ev-panel {
  width: 100%;
  max-width: 330px;
  background: #101c2a;
  border: 1px solid #2a3d52;
  border-radius: 16px;
  padding: 18px 16px 14px;
  text-align: center;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
}
/* THE SCENE. A 4:3 picture across the top of the panel, so the moment is shown rather than
   named. The round glyph frame is kept only as the fallback when the image cannot load. */
.jl-ev-art {
  margin: 0 0 12px;
  border-radius: 12px;
  overflow: hidden;
  background: #16232f;
  /* THE SPACE IS RESERVED BEFORE THE IMAGE ARRIVES, so the panel does not jump when it lands —
     a layout shift on a slow connection is worse than a brief blank. */
  aspect-ratio: 4 / 3;
}
.jl-ev-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.jl-ev-art-plain {
  width: 76px; height: 76px; aspect-ratio: auto;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #1e3348, #14212f);
  border: 1px solid #2a3d52;
  display: flex; align-items: center; justify-content: center;
}
.jl-ev-glyph { font-size: 36px; line-height: 1; }
.jl-ev-place {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7f9bb5;
  margin-bottom: 4px;
}
.jl-ev-title { margin: 0 0 8px; font-size: 17px; color: #eef5fb; line-height: 1.25; }
.jl-ev-line { margin: 0 0 12px; font-size: 13.5px; line-height: 1.42; color: #b3c6d8; }
.jl-ev-marks { font-size: 15px; font-weight: 700; color: #ffd54f; margin-bottom: 12px; }
.jl-ev-go {
  display: block; width: 100%; min-height: 48px;
  font: inherit; font-size: 14.5px; font-weight: 700;
  color: #1b1200; background: #ffd54f;
  border: 0; border-radius: 10px; cursor: pointer;
}
.jl-ev-skip {
  width: 100%; min-height: 44px;
  margin-top: 4px; font: inherit; font-size: 12.5px;
  color: #7f97ad; background: none; border: 0; cursor: pointer;
}

/* ==== THE ALBUM ========================================================================= */
.jl-album {
  padding: 14px 12px 24px;
  min-height: 100vh;
  min-height: 100dvh;
  box-sizing: border-box;
  background: linear-gradient(180deg, #0f2a24 0%, #0b1d19 55%, #081512 100%);
  color: #e8f2ec;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.jl-album-title { margin: 2px 0 4px; font-size: 17px; text-align: center; }
.jl-album-count { margin: 0 0 8px; text-align: center; font-size: 13px; color: #9fb9ab; }
.jl-album-bar {
  height: 6px; border-radius: 999px; background: rgba(255,255,255,.1);
  overflow: hidden; margin-bottom: 6px;
}
.jl-album-fill { height: 100%; background: #ffd54f; border-radius: 999px; }
.jl-album-token {
  margin: 10px 0 4px; text-align: center; font-size: 13px;
  color: #ffd54f; line-height: 1.4;
}
.jl-album-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 10px;
}
.jl-album-card {
  border-radius: 10px; padding: 9px 6px; text-align: center;
  min-height: 88px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
}
/* A SEEN MOMENT AND AN UNSEEN ONE DIFFER IN SHAPE AND WORDS, not colour alone (`SH-81`). */
.jl-album-got { background: rgba(255,255,255,.08); border: 1px solid rgba(255,213,79,.25); }
.jl-album-blank { background: rgba(255,255,255,.03); border: 1px dashed rgba(255,255,255,.12); }
.jl-album-glyph { font-size: 21px; line-height: 1; }
.jl-album-name { font-size: 10.5px; line-height: 1.2; color: #cfe0d5; }
.jl-album-blank .jl-album-name { color: #5f7568; }
.jl-album-date { font-size: 9px; color: #7f9689; font-variant-numeric: tabular-nums; }
.jl-album-times { font-size: 9px; color: #ffd54f; }
.jl-album-back {
  display: block; margin-top: 16px; min-height: 44px;
  text-align: center; line-height: 44px;
  font-size: 13.5px; color: #ffd54f; text-decoration: none;
}

/* ==== THE SEASON REPORT (`51`) ========================================================== */
.jl-season {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 20px 16px 28px;
  min-height: 100vh; min-height: 100dvh; box-sizing: border-box;
  background: linear-gradient(180deg, #12261f 0%, #0b1d19 60%, #081512 100%);
  color: #e8f2ec; text-align: center;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.jl-season-badge {
  font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: #1b1200; background: #ffd54f; border-radius: 999px; padding: 4px 12px;
}
.jl-season-title { margin: 0; font-size: 20px; font-weight: 750; line-height: 1.25; }
.jl-season-art { display: flex; justify-content: center; }
.jl-season-stats { display: flex; gap: 22px; margin: 4px 0 2px; }
.jl-season-stat { display: flex; flex-direction: column; gap: 2px; }
.jl-season-stat-v { font-size: 19px; font-weight: 750; color: #ffd54f; font-variant-numeric: tabular-nums; }
.jl-season-stat-l { font-size: 11px; color: #9fb9ab; }
.jl-season-keep { margin: 2px 0; font-size: 12.5px; line-height: 1.45; color: #b7cfc2; max-width: 300px; }
.jl-season-name { width: 100%; max-width: 300px; text-align: left; margin-top: 6px; }
.jl-season-name-lab { display: block; font-size: 11.5px; color: #9fb9ab; margin-bottom: 4px; }
.jl-season-name-in {
  width: 100%; min-height: 44px; box-sizing: border-box;
  font: inherit; font-size: 15px; color: #eaf5ee;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px; padding: 0 12px;
}
.jl-season-go {
  width: 100%; max-width: 300px; min-height: 50px;
  font: inherit; font-size: 15px; font-weight: 700;
  color: #1b1200; background: #ffd54f; border: 0; border-radius: 12px; cursor: pointer;
}

/* ==== THE PET DATABASE (`51`, the Coleção) ============================================== */
.jl-col {
  padding: 14px 12px 24px;
  min-height: 100vh; min-height: 100dvh; box-sizing: border-box;
  background: linear-gradient(180deg, #0f2a24 0%, #0b1d19 55%, #081512 100%);
  color: #e8f2ec; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.jl-col-title { margin: 2px 0 2px; font-size: 17px; text-align: center; }
.jl-col-sub { margin: 0 0 12px; text-align: center; font-size: 12.5px; color: #9fb9ab; }
.jl-col-empty { text-align: center; font-size: 52px; opacity: .35; padding: 40px 0; }
.jl-col-list { display: flex; flex-direction: column; gap: 8px; }
.jl-col-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.09);
  border-radius: 12px; padding: 10px 12px;
}
.jl-col-head { display: flex; justify-content: space-between; align-items: baseline; }
.jl-col-n { font-size: 12px; color: #7f9689; font-variant-numeric: tabular-nums; }
.jl-col-stage { font-size: 11px; color: #ffd54f; }
.jl-col-name { font-size: 15px; font-weight: 700; margin-top: 2px; }
.jl-col-dates { font-size: 11.5px; color: #8fa99a; margin-top: 2px; font-variant-numeric: tabular-nums; }
.jl-col-stats { display: flex; gap: 12px; margin-top: 6px; font-size: 11.5px; color: #b7cfc2; }
.jl-col-back {
  display: block; margin-top: 18px; min-height: 44px; line-height: 44px;
  text-align: center; font-size: 13.5px; color: #ffd54f; text-decoration: none;
}

/* THE CARE BUTTON'S SMALL NOTE — why it is not tappable, said in text rather than implied by a
   colour (`SH-81`). */
.jl-pet-act { position: relative; }
.jl-pet-act-note {
  font-size: 9px;
  line-height: 1;
  color: #ffb0b0;
  min-height: 9px;
}
.jl-pet-act:not(.jl-pet-act-done):not(.jl-pet-act-rest) .jl-pet-act-note { color: #7fa08c; }

/* RESTING: dimmed but NOT struck through — it is coming back, unlike "enough for today". */
.jl-pet-act-rest {
  opacity: 0.6;
  cursor: default;
  text-decoration: none;
}

/* THE LINE THE PET SAYS, when it refuses or is waiting: louder than the usual mood line, and it
   fades back on its own. */
.jl-pet-said {
  color: #ffd54f;
  font-weight: 600;
}

/* ADORMECER, TUCKED IN. It stays visible but not tappable, so the player can see WHEN the pet
   wakes rather than the control simply vanishing. */
.jl-pet-sleep-off {
  color: #6f8a7c;
  border-style: solid;
  border-color: rgba(111, 138, 124, 0.3);
  cursor: default;
}

/* THE SPECIES, IN WORDS (`AM-6`): the drawing is the picture, this is the signal. */
.jl-pet-species {
  margin: 0;
  text-align: center;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: #7fa08c;
}

/* ======================================================================================
   INK — THE FOREGROUND FOLLOWS THE SKY
   --------------------------------------------------------------------------------------
   The scene is drawn on a canvas whose colours change with the time of day. The text sits
   on top of it, so it has to change too: near-white on a bright morning sky is invisible,
   and dark ink on a night sky is worse. `JLStorm.inkFor()` decides; these two blocks apply.

   Both blocks set the SAME property list, deliberately. A partial override would leave one
   colour from the other theme behind, which is how a button ends up unreadable at 11am only.
   ====================================================================================== */

.jl-pet-scene.jl-ink-dark {
  color: #14251f;
}
.jl-pet-scene.jl-ink-dark .jl-pet-nums span,
.jl-pet-scene.jl-ink-dark .jl-pet-mood,
.jl-pet-scene.jl-ink-dark .jl-pet-species {
  color: #1d3a30;
}
.jl-pet-scene.jl-ink-dark .jl-pet-line {
  color: #2a4a3d;
}
.jl-pet-scene.jl-ink-dark .jl-pet-nums > span {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(20, 37, 31, 0.16);
  color: #14251f;
}
.jl-pet-scene.jl-ink-dark .jl-pet-act {
  background: rgba(255, 255, 255, 0.66);
  border-color: rgba(20, 37, 31, 0.18);
  color: #14251f;
}
.jl-pet-scene.jl-ink-dark .jl-pet-act-note,
.jl-pet-scene.jl-ink-dark .jl-pet-act-rest .jl-pet-act-note {
  color: #3d6153;
}
.jl-pet-scene.jl-ink-dark .jl-pet-sleep {
  background: rgba(255, 255, 255, 0.5);
  border-color: rgba(20, 37, 31, 0.22);
  color: #14251f;
}
.jl-pet-scene.jl-ink-dark .jl-pet-sleep-off {
  color: #4a6c5e;
  border-color: rgba(20, 37, 31, 0.16);
}
.jl-pet-scene.jl-ink-dark .jl-pet-mim,
.jl-pet-scene.jl-ink-dark .jl-pet-more {
  color: #1d3a30;
  border-color: rgba(20, 37, 31, 0.22);
}
.jl-pet-scene.jl-ink-dark .jl-pet-tut-line {
  background: rgba(255, 255, 255, 0.92);
  color: #14251f;
}
.jl-pet-scene.jl-ink-dark .jl-pet-tut-shade {
  background: rgba(8, 20, 16, 0.55);
}
.jl-pet-scene.jl-ink-dark .jl-pet-sky {
  color: #2a4a3d;
}

/* the sky label: always small and quiet, in whichever ink the sky needs */
.jl-pet-sky {
  margin: 0;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7fa08c;
}

/* ======================================================================================
   THE LOGIN GATE (`LA-1`)
   --------------------------------------------------------------------------------------
   Shown instead of the game while signed out. It has to do two jobs at once: say WHY this page
   is different from the other 35, and not feel like a wall. So it leads with the pet and the
   promise ("it lives in your account, not your phone"), lists three plain reasons, and then
   offers one button.
   ====================================================================================== */
.jl-gate {
  margin: auto;
  max-width: 380px;
  padding: 26px 20px 22px;
  text-align: center;
  color: #e8f2ec;
  background: rgba(11, 29, 25, 0.92);
  border: 1px solid rgba(224, 164, 88, 0.3);
  border-radius: 16px;
}
.jl-gate-art {
  width: 68px; height: 68px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(242, 184, 75, 0.4), rgba(224, 164, 88, 0.1));
  border: 1px solid rgba(224, 164, 88, 0.35);
}
.jl-gate-title { margin: 0 0 8px; font-size: 18px; line-height: 1.3; }
.jl-gate-sub { margin: 0 0 14px; font-size: 13px; line-height: 1.55; opacity: 0.85; }
.jl-gate-why {
  margin: 0 0 18px; padding: 0; list-style: none;
  text-align: left; font-size: 13px; line-height: 1.6;
}
.jl-gate-why li { position: relative; padding-left: 20px; margin-bottom: 6px; opacity: 0.9; }
.jl-gate-why li::before {
  content: "\2713"; position: absolute; left: 0; color: #f2b84b; font-weight: 700;
}
.jl-gate-go {
  display: block; width: 100%; padding: 12px 16px;
  font: inherit; font-size: 15px; font-weight: 700;
  color: #14251f; background: #f2b84b;
  border: 0; border-radius: 11px; cursor: pointer;
}
.jl-gate-go:active { filter: brightness(0.94); }
.jl-gate-err {
  margin: 12px 0 8px; font-size: 12.5px; line-height: 1.5; color: #f0b9a0;
}
.jl-gate-retry {
  margin: 0 0 8px; padding: 8px 14px; font: inherit; font-size: 13px;
  color: #e8f2ec; background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 9px; cursor: pointer;
}
.jl-gate-back {
  display: inline-block; margin-top: 14px;
  font-size: 12.5px; color: #9fb9ab; text-decoration: none;
}
.jl-gate-back:hover { text-decoration: underline; }
/* A narrow phone: the panel fills the column rather than floating in it. */
@media (max-width: 400px) { .jl-gate { padding: 20px 14px 18px; border-radius: 14px; } }

/* THE TUTORIAL'S INTRO STEPS. A heading above the line, and a "Continuar" button — shown only on
   the steps that have nothing to tap. */
.jl-tut-title {
  margin: 0 0 4px;
  font-size: 13.5px;
  font-weight: 700;
  color: #f2b84b;
}
.jl-tut-go {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: #14251f;
  background: #f2b84b;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

/* ======================================================================================
   THE PET'S ONE ALL-TIME BOARD (`RK-1`)
   Deliberately plain and at the foot of the page: the pet is the point, the ranking is a
   scoreboard. No period tabs — the pet has one board, and a control that is always the same
   would only teach the player that a choice used to exist.
   ====================================================================================== */
.jl-pet-board-host {
  margin: 4px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.jl-pet-board-title {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
}
.jl-pet-board {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}
.jl-pet-board li {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.jl-pet-board li:last-child { border-bottom: 0; }
.jl-pet-board-rank { flex: 0 0 18px; opacity: 0.55; font-variant-numeric: tabular-nums; }
.jl-pet-board-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jl-pet-board-score { flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.jl-pet-board-me { color: #f2b84b; }
.jl-pet-board-empty { opacity: 0.6; font-size: 12.5px; }
