/* GENERADO por scripts/build.sh desde src/ — no editar a mano. */
/* ==========================================================================
   Socialo TV v3 — plain HTML/CSS/JS port of the v2 Flutter app.
   Sizes/colors/timings mirror lib/config/theme.dart and the v2 widgets 1:1.
   ========================================================================== */

:root {
  /* Neutral colors (constant) */
  --bg: #FAFAFA;
  --white: #FFFFFF;
  --bar-h: 55.5px;              /* bottom bar height, measured by app.js; event slides also cover its strip */
  --text: #1F2937;
  --text-rgb: 31, 41, 55;
  --subtle: #F3F4F6;
  --border: #E5E7EB;

  /* Accent colors — overwritten from the API primaryColor (see theme.js part of app.js) */
  --primary: #B91C1C;
  --primary-rgb: 185, 28, 28;   /* kept in sync by applyTheme() */
  --on-primary: #FFFFFF;        /* text on a primary fill: white, or black on a light brand */
  --on-primary-tag: #FFFFFF;    /* tag text: white, or a deep shade of a light brand */
  --dark: #8B1515;
  --light: #DC7B7B;
  --card: #BF3B3B;
  --grad-a: #B91C1C;
  --grad-b: #991B1B;
  --card-grad-a: #BF3B3B;
  --card-grad-b: #A83232;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: 'Inter', sans-serif;
  cursor: none;
  -moz-user-select: none;
       user-select: none;
  -webkit-user-select: none;
}

[hidden] { display: none !important; }

img { display: block; -webkit-user-drag: none; }

/* Material Symbols Rounded (≈ Flutter Icons.*_rounded) */
.msr {
  font-family: 'Material Symbols Rounded', 'Material Icons';
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  direction: ltr;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  -webkit-font-feature-settings: 'liga';
          font-feature-settings: 'liga';
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
.msr.outlined { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

.center-fill {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
          align-items: center;
  -webkit-justify-content: center;
          justify-content: center;
}

/* ===== Background watermark (cover logo, right-centered) ================= */
#watermark {
  position: fixed;
  top: 17.5%;
  right: 0;
  width: 32%;
  height: 65%;
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}
#watermark img { width: 100%; height: 100%; object-fit: contain; }

/* ===== Main layout ======================================================== */
#layout {
  position: relative;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
          flex-direction: column;
  height: 100%;
  z-index: 1;
}

#carousel {
  position: relative;
  -webkit-flex: 1;
          flex: 1;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-y; /* horizontal swipes drive the carousel */
}

#track { position: relative; height: 100%; }

/* Stacked; app.js shows one (.is-active) and sequences the changes. */
.slide {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--bar-h); /* slides end above the bar; .slide-event reaches under it */
  overflow: hidden;
  visibility: hidden;
}
.slide.is-active { visibility: visible; }
.slide.is-top { z-index: 1; }
.slide.sl-in { -webkit-animation: sl-fade 700ms ease both; animation: sl-fade 700ms ease both; }
@-webkit-keyframes sl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sl-fade { from { opacity: 0; } to { opacity: 1; } }

/* CircularProgressIndicator */
.spinner {
  width: 36px;
  height: 36px;
  border: 4px solid rgba(var(--primary-rgb), 0.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  -webkit-animation: spin 0.9s linear infinite;
          animation: spin 0.9s linear infinite;
}
.spinner.small { width: 26px; height: 26px; border-width: 3px; }
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }
@keyframes spin { to { -webkit-transform: rotate(360deg); transform: rotate(360deg); } }

/* ===== "You must input a valid TV code" ================================== */
#no-code {
  font-family: 'Poppins', sans-serif;
  font-size: 24px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg);
  z-index: 50;
}

/* ===== Bottom bar ========================================================= */
#bottom-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
          align-items: center;
  -webkit-justify-content: space-between;
          justify-content: space-between;
  gap: 12px;
  padding: 10px 32px;
  background: var(--white);
  box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.04);
  z-index: 2;
  transition: opacity 500ms ease, visibility 500ms;
}
#layout.bar-off #bottom-bar { opacity: 0; visibility: hidden; }
.bb-date, .bb-time { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; min-width: 0; }
.bb-icon {
  font-size: 18px;
  color: rgba(var(--primary-rgb), 0.5);
  margin-right: 10px;
}
#bb-date-text {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.2px;
  color: rgba(var(--text-rgb), 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#bb-hm, #bb-s {
  font-family: 'Space Mono', monospace;
  font-size: 24px;
  font-weight: 700;
  color: rgba(var(--text-rgb), 0.7);
}
#bb-s { color: rgba(var(--text-rgb), 0.3); }

/* Next slide chip */
#next-chip { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; min-width: 0; }
.nc-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: rgba(var(--primary-rgb), 0.7);
  margin-right: 6px;
}
.nc-dots { display: -webkit-inline-flex; display: inline-flex; margin-right: 10px; }
.nc-dots i {
  width: 4px;
  height: 4px;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--primary);
  -webkit-animation: dot-pulse 1.4s linear infinite;
          animation: dot-pulse 1.4s linear infinite;
}
.nc-dots i:nth-child(2) { -webkit-animation-delay: 0.21s; animation-delay: 0.21s; }
.nc-dots i:nth-child(3) { -webkit-animation-delay: 0.42s; animation-delay: 0.42s; }
@-webkit-keyframes dot-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes dot-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.nc-icon { font-size: 14px; color: var(--primary); margin-right: 6px; }
.nc-title-box { max-width: 260px; overflow: hidden; }
#nc-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: rgba(var(--text-rgb), 0.8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#nc-title.slide-in { -webkit-animation: nc-slide-in 400ms ease-out both; animation: nc-slide-in 400ms ease-out both; }
@-webkit-keyframes nc-slide-in {
  from { opacity: 0; -webkit-transform: translateX(-16px); transform: translateX(-16px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}
@keyframes nc-slide-in {
  from { opacity: 0; -webkit-transform: translateX(-16px); transform: translateX(-16px); }
  to { opacity: 1; -webkit-transform: translateX(0); transform: translateX(0); }
}

/* ===== Entrance animations (animate_do equivalents) ======================
   Elements start hidden; when the slide first becomes visible the JS adds
   .animate on the slide and the keyed animations run once. */
.slide .anim { opacity: 0; }
.slide.animate .a-fi   { -webkit-animation: fadeIn      var(--dur, 800ms) cubic-bezier(0.215, 0.61, 0.355, 1) var(--delay, 0ms) both; animation: fadeIn      var(--dur, 800ms) cubic-bezier(0.215, 0.61, 0.355, 1) var(--delay, 0ms) both; }
.slide.animate .a-fid  { -webkit-animation: fadeInDown  var(--dur, 500ms) cubic-bezier(0.215, 0.61, 0.355, 1) var(--delay, 0ms) both; animation: fadeInDown  var(--dur, 500ms) cubic-bezier(0.215, 0.61, 0.355, 1) var(--delay, 0ms) both; }
.slide.animate .a-fiu  { -webkit-animation: fadeInUp    var(--dur, 500ms) cubic-bezier(0.215, 0.61, 0.355, 1) var(--delay, 0ms) both; animation: fadeInUp    var(--dur, 500ms) cubic-bezier(0.215, 0.61, 0.355, 1) var(--delay, 0ms) both; }
.slide.animate .a-fil  { -webkit-animation: fadeInLeft  var(--dur, 500ms) cubic-bezier(0.215, 0.61, 0.355, 1) var(--delay, 0ms) both; animation: fadeInLeft  var(--dur, 500ms) cubic-bezier(0.215, 0.61, 0.355, 1) var(--delay, 0ms) both; }
.slide.animate .a-fir  { -webkit-animation: fadeInRight var(--dur, 400ms) cubic-bezier(0.215, 0.61, 0.355, 1) var(--delay, 0ms) both; animation: fadeInRight var(--dur, 400ms) cubic-bezier(0.215, 0.61, 0.355, 1) var(--delay, 0ms) both; }
@-webkit-keyframes fadeIn      { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeIn      { from { opacity: 0; } to { opacity: 1; } }
@-webkit-keyframes fadeInDown  { from { opacity: 0; -webkit-transform: translateY(-100px); transform: translateY(-100px); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@keyframes fadeInDown  { from { opacity: 0; -webkit-transform: translateY(-100px); transform: translateY(-100px); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@-webkit-keyframes fadeInUp    { from { opacity: 0; -webkit-transform: translateY(100px); transform: translateY(100px); }  to { opacity: 1; -webkit-transform: none; transform: none; } }
@keyframes fadeInUp    { from { opacity: 0; -webkit-transform: translateY(100px); transform: translateY(100px); }  to { opacity: 1; -webkit-transform: none; transform: none; } }
@-webkit-keyframes fadeInLeft  { from { opacity: 0; -webkit-transform: translateX(-100px); transform: translateX(-100px); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@keyframes fadeInLeft  { from { opacity: 0; -webkit-transform: translateX(-100px); transform: translateX(-100px); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@-webkit-keyframes fadeInRight { from { opacity: 0; -webkit-transform: translateX(100px); transform: translateX(100px); }  to { opacity: 1; -webkit-transform: none; transform: none; } }
@keyframes fadeInRight { from { opacity: 0; -webkit-transform: translateX(100px); transform: translateX(100px); }  to { opacity: 1; -webkit-transform: none; transform: none; } }

/* ===== Event slide =========================================================
   Full screen, exactly as TV—Socialo.ai (1920×1080, Universidad Villanueva):
   it also covers the bottom bar's strip and carries its own logo, date and
   clock. Every size is the design's own pixels / 10 — in em of a 10px base
   at 1920×1080, scaled with the screen: by width up to 16:9, by height
   beyond. Positions are measured from the design file; the card's 1.08px
   stroke sits on the drawn outline, half inside and half out.

   Type is Akkurat LL (Lineto, licensed): drop AkkuratLL-Regular/-Bold as
   .woff2 + .woff into public/fonts/. Until then Inter Tight stands in, at
   570 instead of Bold and with tracking matched to Akkurat's widths; the
   design's own values apply under html.brand-font (set by app.js). */
@font-face {
  font-family: 'Akkurat LL';
  font-style: normal;
  font-weight: 400;
  src: local('Akkurat LL Regular'), local('AkkuratLL-Regular'),
    url('fonts/AkkuratLL-Regular.woff2') format('woff2'), url('fonts/AkkuratLL-Regular.woff') format('woff');
}
@font-face {
  font-family: 'Akkurat LL';
  font-style: normal;
  font-weight: 700;
  src: local('Akkurat LL Bold'), local('AkkuratLL-Bold'),
    url('fonts/AkkuratLL-Bold.woff2') format('woff2'), url('fonts/AkkuratLL-Bold.woff') format('woff');
}

.slide-event {
  bottom: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: stretch;
          align-items: stretch;
  font-family: 'Akkurat LL', 'Inter Tight', 'Inter', sans-serif;
  font-size: 0.5208333vw;
}
@media (min-aspect-ratio: 16/9) {
  .slide-event { font-size: 0.9259259vh; }
}
/* Portrait (tablets): cover on top, the right column below at full width. */
@media (max-aspect-ratio: 1/1) {
  .slide-event { -webkit-flex-direction: column; flex-direction: column; font-size: 0.915vw; }
  .slide-event .ev-media { width: 100%; height: auto; -webkit-flex: 1; flex: 1; min-height: 0; }
  .slide-event .ev-panel { -webkit-flex: none; flex: none; padding-top: 20em; padding-bottom: 7.2em; }
}

.ev-media {
  position: relative;
  -webkit-flex: none;
          flex: none;
  width: 43.054%; /* 826.64 of 1920 */
  height: 100%;
}
/* Mask and picture: the wipe slides the mask in and the picture the other
   way, so the picture is uncovered without moving. */
.ev-mask, .ev-pic, .ev-pic .rimg { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.ev-mask { overflow: hidden; background: #000; }
.ev-pic .rimg .ph { background: #000; }

/* The column grows up from the card, which sits 89.38px off the foot.
   Left padding: the title's origin (903.97); right: the card's edge. */
.ev-panel {
  position: relative;
  -webkit-flex: 1;
          flex: 1;
  min-width: 0;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
          flex-direction: column;
  -webkit-justify-content: flex-end;
          justify-content: flex-end;
  padding: 20em 7.572em 8.884em 7.733em;
  background: var(--white);
}

.ev-ico { display: block; -webkit-flex: none; flex: none; fill: var(--primary); }

/* Header: the logo on the title's left edge (its ink, 906.5), and in the
   corner the time over the date: icons in a column, text ranged left, each
   line centred on one of the logo's two lines of type; the block ends on
   the card's right edge. */
.ev-head { position: absolute; top: 0; left: 0; right: 0; }
.ev-logo {
  position: absolute;
  left: 7.986em;
  top: 7.619em;
  width: 32.564em;
  height: 8.761em;
}
.ev-now {
  position: absolute;
  top: 8.3em;     /* first line centred on "Universidad" (y 96) */
  right: 7.52em;  /* the card's outer edge */
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
          flex-direction: column;
  -webkit-align-items: flex-start;
          align-items: flex-start;
  color: #A6A6A6; /* black at 35% */
}
.ev-now-row { display: -webkit-flex; display: flex; -webkit-align-items: center; align-items: center; height: 2.6em; }
.ev-now-row + .ev-now-row { margin-top: 1.925em; } /* second on "Villanueva" (y 141) */
.ev-now .ev-ico { margin-right: 1.1em; }
.ev-now .ev-ico-clock { width: 2.6em; height: 2.6em; }
.ev-now .ev-ico-cal { width: 2.532em; height: 2.6em; margin-left: 0.034em; margin-right: 1.134em; }
.ev-now-date, .ev-now-time {
  font-size: 2.4em;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.ev-now-time { -webkit-font-feature-settings: 'tnum'; font-feature-settings: 'tnum'; } /* the clock must not jitter */
.brand-font .ev-now-date, .brand-font .ev-now-time { letter-spacing: -0.031em; }

/* Socialo, a third line on the same rhythm and grey, set apart by its
   weight; its icon in the column */
.ev-brand { color: #A6A6A6; }
.ev-brand .ev-brand-ico {
  display: block;
  width: 2.4em;
  height: 2.4em;
  margin: 0 1.2em 0 0.1em; /* centred in the icons' 2.6em column */
  fill: currentColor;
}
.ev-brand span { font-size: 2.4em; font-weight: 570; line-height: 1; letter-spacing: -0.01em; }
.brand-font .ev-brand span { font-weight: 700; letter-spacing: -0.03em; }

/* Attendees · tags */
.ev-meta {
  -webkit-flex: none;
          flex: none;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
          align-items: center;
  height: 3.418em;
  margin: 0 0 1.401em -0.266em;
}
.brand-font .ev-meta { margin-bottom: 1.007em; }
.ev-stat {
  -webkit-flex: none;
          flex: none;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
          align-items: flex-start;
  height: 5.7em;
  margin: -0.613em 0 -1.669em;
  padding-right: 3.025em; /* 111px wide for "508"; reaches 11px under the tag */
  background: #FCFCFC;
  color: #575757;
}
/* As drawn: the app's own attendee count (Material group icon, Roboto) */
.ev-stat .msr {
  font-size: 2.56em;
  margin: 0.469em 0 0 0.293em;
  font-variation-settings: 'FILL' 0, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}
.ev-stat .n {
  font-family: 'Roboto', sans-serif;
  font-size: 2.4em;
  font-weight: 400;
  line-height: 1;
  margin: 0.48em 0 0 0.3em;
  white-space: nowrap;
}
.ev-tag {
  position: relative; /* over the attendees' box */
  -webkit-flex: none;
          flex: none;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
          align-items: center;
  height: 3.418em;
  margin-right: 0.8em;
  padding: 0 1.725em;
  border-radius: 1.709em;
  background: var(--primary);
}
.ev-stat + .ev-tag { margin-left: -1.134em; }
.ev-tag span {
  font-size: 1.6em;
  font-weight: 570;
  line-height: 1;
  letter-spacing: 0.053em;
  color: var(--on-primary-tag);
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-font .ev-tag span { font-weight: 700; letter-spacing: 0.043em; }

.ev-title {
  -webkit-flex: none;
          flex: none;
  font-size: 8em;
  font-weight: 570;
  line-height: 1.1;
  letter-spacing: 0.004em;
  word-spacing: -0.085em;
  color: #000;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 100%;
}
.brand-font .ev-title { font-weight: 700; letter-spacing: -0.03em; word-spacing: 0; }

/* Date · time · place, and the sign-up QR */
.ev-card {
  -webkit-flex: none;
          flex: none;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: flex-start;
          align-items: flex-start;
  margin: 3.787em -0.054em 0 -1.23em;
  background: #F9F9F9;
  border: 0.108em solid #EDEDED;
  border-radius: 2.192em;
}
.brand-font .ev-card { margin-top: 4.181em; }
.ev-rows { -webkit-flex: 1; flex: 1; min-width: 0; padding-top: 0.544em; }
.ev-row {
  position: relative;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
          align-items: center;
  height: 9.205em;
  padding-left: 2.304em;
}
.ev-row + .ev-row:before {
  content: '';
  position: absolute;
  top: -0.5px;
  left: 2.732em;
  right: 4.323em;
  height: 1px;
  background: rgba(31, 41, 55, 0.15); /* the design's 0.75px line at 20% */
}
.ev-row .ic {
  -webkit-flex: none;
          flex: none;
  width: 4.26em;
  height: 4.26em;
  margin-right: 2.127em;
  border-radius: 0.682em;
  background: #FEF9ED;
}
.ev-row .ic .ev-ico { width: 2.436em; height: 2.502em; margin: 0.821em 0 0 0.879em; }
.ev-row .val {
  min-width: 0;
  font-size: 3.2em;
  font-weight: 570;
  line-height: 1;
  letter-spacing: -0.015em;
  color: #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ev-row .val .dash { margin: 0 0.116em; }
.brand-font .ev-row .val { font-weight: 700; letter-spacing: -0.032em; }
.ev-qr {
  -webkit-flex: none;
          flex: none;
  width: 16.601em;
  margin: 3.45em 3.561em 2.238em 0;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
          flex-direction: column;
  -webkit-align-items: flex-end;
          align-items: flex-end;
}
/* 41 modules at exactly 4px each on a 1080p screen; the empty card around
   it is the quiet zone. */
.ev-qr img { width: 16.4em; height: 16.4em; }
.ev-qr-tri {
  -webkit-align-self: center;
          align-self: center;
  width: 0;
  height: 0;
  margin-top: 1.396em;
  border-left: 1.217em solid transparent;
  border-right: 1.217em solid transparent;
  border-bottom: 0.856em solid var(--primary);
}
.ev-qr-label {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
          align-items: center;
  -webkit-justify-content: center;
          justify-content: center;
  width: 100%;
  height: 3.818em;
  padding-top: 0.232em;
  border-radius: 0.75em;
  background: var(--primary);
}
.ev-qr-label span {
  font-size: 1.547em;
  font-weight: 570;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--on-primary);
  text-transform: uppercase;
  white-space: nowrap;
}
.brand-font .ev-qr-label span { font-weight: 700; letter-spacing: 0.046em; }

/* ===== Event to event =====================================================
   Out: the text fades away, lifting a touch. In: the picture is uncovered
   by a wipe over the old one (from the left going forwards, from the right
   going back), settling from a 6% zoom; tags, title, card, its rows and the
   QR rise in after it, a few dozen milliseconds apart. Soft ease-outs, small
   distances; nothing bounces. app.js: OUT_MS 360, IN_MS 1700. */
.ev-out .ev-meta, .ev-out .ev-title, .ev-out .ev-card { -webkit-animation: ev-leave 340ms cubic-bezier(0.4, 0, 1, 1) both; animation: ev-leave 340ms cubic-bezier(0.4, 0, 1, 1) both; }
.ev-out .ev-title { -webkit-animation-name: ev-leave-title; animation-name: ev-leave-title; -webkit-animation-delay: 20ms; animation-delay: 20ms; }
.ev-out .ev-card { -webkit-animation-delay: 40ms; animation-delay: 40ms; }
@-webkit-keyframes ev-leave { from { opacity: 1; -webkit-transform: none; transform: none; } to { opacity: 0; -webkit-transform: translateY(-1.2em); transform: translateY(-1.2em); } }
@keyframes ev-leave { from { opacity: 1; -webkit-transform: none; transform: none; } to { opacity: 0; -webkit-transform: translateY(-1.2em); transform: translateY(-1.2em); } }
@-webkit-keyframes ev-leave-title { from { opacity: 1; -webkit-transform: none; transform: none; } to { opacity: 0; -webkit-transform: translateY(-0.15em); transform: translateY(-0.15em); } }
@keyframes ev-leave-title { from { opacity: 1; -webkit-transform: none; transform: none; } to { opacity: 0; -webkit-transform: translateY(-0.15em); transform: translateY(-0.15em); } } /* em of 80px type */

.ev-in .ev-mask { -webkit-animation: ev-wipe 900ms cubic-bezier(0.77, 0, 0.175, 1) both; animation: ev-wipe 900ms cubic-bezier(0.77, 0, 0.175, 1) both; }
.ev-in .ev-pic { -webkit-animation: ev-wipe-pic 900ms cubic-bezier(0.77, 0, 0.175, 1) both; animation: ev-wipe-pic 900ms cubic-bezier(0.77, 0, 0.175, 1) both; }
.ev-in.back .ev-mask { -webkit-animation-name: ev-wipe-back; animation-name: ev-wipe-back; }
.ev-in.back .ev-pic { -webkit-animation-name: ev-wipe-pic-back; animation-name: ev-wipe-pic-back; }
@-webkit-keyframes ev-wipe { from { -webkit-transform: translateX(-100%); transform: translateX(-100%); } to { -webkit-transform: none; transform: none; } }
@keyframes ev-wipe { from { -webkit-transform: translateX(-100%); transform: translateX(-100%); } to { -webkit-transform: none; transform: none; } }
@-webkit-keyframes ev-wipe-pic { from { -webkit-transform: translateX(100%); transform: translateX(100%); } to { -webkit-transform: none; transform: none; } }
@keyframes ev-wipe-pic { from { -webkit-transform: translateX(100%); transform: translateX(100%); } to { -webkit-transform: none; transform: none; } }
@-webkit-keyframes ev-wipe-back { from { -webkit-transform: translateX(100%); transform: translateX(100%); } to { -webkit-transform: none; transform: none; } }
@keyframes ev-wipe-back { from { -webkit-transform: translateX(100%); transform: translateX(100%); } to { -webkit-transform: none; transform: none; } }
@-webkit-keyframes ev-wipe-pic-back { from { -webkit-transform: translateX(-100%); transform: translateX(-100%); } to { -webkit-transform: none; transform: none; } }
@keyframes ev-wipe-pic-back { from { -webkit-transform: translateX(-100%); transform: translateX(-100%); } to { -webkit-transform: none; transform: none; } }
.ev-in .ev-pic .rimg { -webkit-animation: ev-settle 1700ms cubic-bezier(0.16, 1, 0.3, 1) both; animation: ev-settle 1700ms cubic-bezier(0.16, 1, 0.3, 1) both; }
@-webkit-keyframes ev-settle { from { -webkit-transform: scale(1.06); transform: scale(1.06); } to { -webkit-transform: none; transform: none; } }
@keyframes ev-settle { from { -webkit-transform: scale(1.06); transform: scale(1.06); } to { -webkit-transform: none; transform: none; } }

.ev-in .ev-meta, .ev-in .ev-title, .ev-in .ev-card, .ev-in .ev-row, .ev-in .ev-qr {
  -webkit-animation: ev-enter 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
          animation: ev-enter 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.ev-in .ev-meta { -webkit-animation-delay: 180ms; animation-delay: 180ms; }
.ev-in .ev-title { -webkit-animation-name: ev-enter-title; animation-name: ev-enter-title; -webkit-animation-delay: 240ms; animation-delay: 240ms; }
.ev-in .ev-card { -webkit-animation-delay: 330ms; animation-delay: 330ms; }
.ev-in .ev-row { -webkit-animation-name: ev-enter-row; animation-name: ev-enter-row; -webkit-animation-delay: 410ms; animation-delay: 410ms; }
.ev-in .ev-row + .ev-row { -webkit-animation-delay: 470ms; animation-delay: 470ms; }
.ev-in .ev-row + .ev-row + .ev-row { -webkit-animation-delay: 530ms; animation-delay: 530ms; }
.ev-in .ev-qr { -webkit-animation-name: ev-fade; animation-name: ev-fade; -webkit-animation-delay: 580ms; animation-delay: 580ms; }
@-webkit-keyframes ev-enter { from { opacity: 0; -webkit-transform: translateY(2.4em); transform: translateY(2.4em); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@keyframes ev-enter { from { opacity: 0; -webkit-transform: translateY(2.4em); transform: translateY(2.4em); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@-webkit-keyframes ev-enter-title { from { opacity: 0; -webkit-transform: translateY(0.4em); transform: translateY(0.4em); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@keyframes ev-enter-title { from { opacity: 0; -webkit-transform: translateY(0.4em); transform: translateY(0.4em); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@-webkit-keyframes ev-enter-row { from { opacity: 0; -webkit-transform: translateX(1.6em); transform: translateX(1.6em); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@keyframes ev-enter-row { from { opacity: 0; -webkit-transform: translateX(1.6em); transform: translateX(1.6em); } to { opacity: 1; -webkit-transform: none; transform: none; } }
@-webkit-keyframes ev-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ev-fade { from { opacity: 0; } to { opacity: 1; } }

/* ===== Home slide (mendel) =============================================== */
.slide-home { border-bottom: 4px solid var(--primary); }
.home-grid {
  height: 100%;
  padding: 48px 56px 32px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: stretch;
          align-items: stretch;
}
.home-left { -webkit-flex: 5; flex: 5; min-width: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; -webkit-align-items: flex-start; align-items: flex-start; }
.home-right { -webkit-flex: 4; flex: 4; min-width: 0; margin-left: 48px; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.home-heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 44px;
  letter-spacing: 2px;
  color: var(--primary);
}
.home-left .home-heading { margin-bottom: 20px; }
.info-card {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
          align-items: center;
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 14px;
  background: var(--white);
  border: 2px solid rgba(var(--primary-rgb), 0.2);
  border-radius: 16px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.info-card .ic {
  -webkit-flex: none;
          flex: none;
  padding: 10px;
  background: rgba(var(--primary-rgb), 0.1);
  border-radius: 12px;
  margin-right: 16px;
  display: -webkit-flex;
  display: flex;
}
.info-card .ic .msr { font-size: 26px; color: var(--primary); }
.info-card .t {
  font-family: 'Poppins', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
}
.info-card .s {
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: rgba(var(--text-rgb), 0.6);
}
.home-menu-title { margin: 16px 0 20px; }
.home-menu-row { -webkit-flex: 1; flex: 1; min-height: 0; width: 100%; display: -webkit-flex; display: flex; -webkit-align-items: stretch; align-items: stretch; gap: 16px; }
.menu-card {
  -webkit-flex: 1;
          flex: 1;
  min-width: 0;
  padding: 24px;
  background: linear-gradient(135deg, var(--card-grad-a), var(--card-grad-b));
  border-radius: 18px;
  box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.3);
}
.menu-card .t {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 32px;
  letter-spacing: 1.5px;
  color: var(--white);
  margin-bottom: 12px;
}
.menu-card .d {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.95);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.home-right .home-heading { text-align: center; margin-bottom: 24px; }
.bday-card-wrap { -webkit-flex: 1; flex: 1; min-height: 0; display: -webkit-flex; display: flex; -webkit-flex-direction: column; flex-direction: column; }
.bday-card-wrap:not(:last-child) { padding-bottom: 10px; }
.bday-card {
  -webkit-flex: 1;
          flex: 1;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
          align-items: center;
  padding: 14px 24px;
  background: linear-gradient(135deg, var(--card-grad-a), var(--card-grad-b));
  border-radius: 14px;
  box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.25);
}
.bday-card .n {
  -webkit-flex: 1;
          flex: 1;
  min-width: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 12px;
}
.bday-card .d {
  font-family: 'Poppins', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}
.home-logo {
  position: absolute;
  right: 32px;
  top: 32px;
  width: 110px;
  height: 110px;
  pointer-events: none;
}
.home-logo .rimg, .home-logo img { width: 100%; height: 100%; object-fit: contain; }

/* ===== Custom slide ======================================================= */
.slide-custom { border-bottom: 4px solid var(--primary); }
.slide-custom .rimg { width: 100%; height: 100%; }
.slide-custom img { width: 100%; height: 100%; object-fit: contain; }

/* ===== Retrying network image ============================================ */
.rimg { position: relative; overflow: hidden; }
.rimg img { width: 100%; height: 100%; }
.rimg.cover img { object-fit: cover; }
.rimg.contain img { object-fit: contain; }
.rimg .ph {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: #EEEEEE;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-direction: column;
          flex-direction: column;
  -webkit-align-items: center;
          align-items: center;
  -webkit-justify-content: center;
          justify-content: center;
  gap: 8px;
}
.rimg .ph .msr { font-size: 60px; color: #BDBDBD; }
.rimg .ph .e1 { font-size: 12px; color: #757575; }
.rimg .ph .e2 { font-size: 10px; color: #9E9E9E; }

/* ===== Stale data warning ================================================= */
#stale {
  position: fixed;
  top: 8px;
  right: 12px;
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: center;
          align-items: center;
  padding: 4px 10px;
  background: rgba(178, 106, 0, 0.10);
  border-radius: 20px;
  z-index: 40;
}
.stale-icon { font-size: 16px; color: rgba(178, 106, 0, 0.85); margin-right: 6px; }
#stale-text { font-size: 13px; font-weight: 600; color: #B26A00; }

/* ==========================================================================
   Old LG webOS panels (Chromium 53 on webOS 4.x, up to 108 on webOS 24).
   `html.no-flex-gap` is set by app.js when flexbox `gap` (Chrome 84) is
   missing.
   ========================================================================== */
.no-flex-gap #bottom-bar > * + * { margin-left: 12px; }
.no-flex-gap .home-menu-row > * + * { margin-left: 16px; }
.no-flex-gap .rimg .ph > * + * { margin-top: 8px; }

/* No CSS custom properties (Chrome < 49, Safari < 9.1 — webOS 3 and older):
   the `animation: … var(--dur) … var(--delay)` shorthand never resolves,
   which would leave `.slide .anim { opacity: 0 }` standing and every slide
   blank. app.js sets `html.no-css-vars` there and normally re-serves this file
   with the variables substituted; these rules are the safety net, with the
   default timings (app.js puts the per-element stagger back). */
.no-css-vars .slide .anim { opacity: 1; }
.no-css-vars .slide.animate .a-fi   { -webkit-animation: fadeIn      800ms cubic-bezier(0.215, 0.61, 0.355, 1) both; animation: fadeIn      800ms cubic-bezier(0.215, 0.61, 0.355, 1) both; }
.no-css-vars .slide.animate .a-fid  { -webkit-animation: fadeInDown  500ms cubic-bezier(0.215, 0.61, 0.355, 1) both; animation: fadeInDown  500ms cubic-bezier(0.215, 0.61, 0.355, 1) both; }
.no-css-vars .slide.animate .a-fiu  { -webkit-animation: fadeInUp    500ms cubic-bezier(0.215, 0.61, 0.355, 1) both; animation: fadeInUp    500ms cubic-bezier(0.215, 0.61, 0.355, 1) both; }
.no-css-vars .slide.animate .a-fil  { -webkit-animation: fadeInLeft  500ms cubic-bezier(0.215, 0.61, 0.355, 1) both; animation: fadeInLeft  500ms cubic-bezier(0.215, 0.61, 0.355, 1) both; }
.no-css-vars .slide.animate .a-fir  { -webkit-animation: fadeInRight 400ms cubic-bezier(0.215, 0.61, 0.355, 1) both; animation: fadeInRight 400ms cubic-bezier(0.215, 0.61, 0.355, 1) both; }
