:root {
  --unit: 2.5;
  --aubergine: 86, 41, 56;
  --dusky-pink: #cfadaf;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body.wall {
  font-family: var(--font);
  color: #fff;
  background: var(--dusky-pink) url("../img/bg-wall.jpg") center / cover no-repeat fixed;
  overflow: hidden;
  cursor: none;
  -webkit-font-smoothing: antialiased;
}
.stage {
  display: flex;
  align-items: stretch;
  gap: 3vh;
  height: 100vh;
  padding: 4vh 3.2vw;
}
.card {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: calc(16px * var(--unit));
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: calc(26px * var(--unit));
  position: relative;
}
.card-title {
  margin: 0 0 calc(12px * var(--unit));
  font-size: calc(17px * var(--unit));
  font-weight: 600;
  letter-spacing: calc(1.5px * var(--unit));
  line-height: 1.25;
  color: #fff;
}
.constellation {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.empty[hidden] { display: none; }
.empty {
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  font-size: calc(13px * var(--unit));
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 0 10%;
}
.chip {
  position: absolute;
  left: 0;
  top: 0;
  transform: translate(-50%, -50%);
  white-space: nowrap;
  color: #fff;
  background: rgba(var(--aubergine), 0.35);
  border-radius: 999px;
  line-height: 1.22;
  pointer-events: none;
  opacity: 1;
  transition:
    left 1.1s cubic-bezier(0.22, 0.61, 0.36, 1),
    top 1.1s cubic-bezier(0.22, 0.61, 0.36, 1),
    font-size 1.1s ease,
    padding 1.1s ease,
    opacity 0.7s ease,
    transform 0.7s ease;
}
.chip.entering { opacity: 0; transform: translate(-50%, -50%) scale(0.6); transition: none; }
.chip.leaving  { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }

/* Tier typography. App mode (≤14) is the iOS headline / subheadline / caption2 scale. */
.mode-app .chip.large  { font-size: calc(17px * var(--unit)); font-weight: 600; padding: calc(8px * var(--unit)) calc(14px * var(--unit)); }
.mode-app .chip.medium { font-size: calc(15px * var(--unit)); padding: calc(7px * var(--unit)) calc(12px * var(--unit)); }
.mode-app .chip.small  { font-size: calc(11px * var(--unit)); padding: calc(6px * var(--unit)) calc(10px * var(--unit)); }
/* Extended mode (>14) opens the hierarchy up and adds a fourth tier. */
.mode-ext .chip.large  { font-size: calc(19px * var(--unit)); font-weight: 600; padding: calc(8px * var(--unit)) calc(14px * var(--unit)); }
.mode-ext .chip.medium { font-size: calc(15px * var(--unit)); padding: calc(7px * var(--unit)) calc(12px * var(--unit)); }
.mode-ext .chip.small  { font-size: calc(12px * var(--unit)); padding: calc(6px * var(--unit)) calc(10px * var(--unit)); }
.mode-ext .chip.tiny   { font-size: calc(10px * var(--unit)); padding: calc(5px * var(--unit)) calc(9px * var(--unit)); }

.measure { position: absolute; left: -100000px; top: 0; width: 5000px; height: 1000px; visibility: hidden; }
.measure .chip { transition: none !important; }

.qr {
  flex: 0 0 auto;
  width: 24vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
}
.wall-logo { display: block; width: 88%; height: auto; margin: 0 auto 3.2vh; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.12)); }
.qr-block { width: 100%; display: flex; flex-direction: column; align-items: center; }
.qr-card {
  width: 100%;
  padding: 1.6vh;
  background: #fff;
  border-radius: 2.4vh;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
}
.qr-card img { display: block; width: 100%; height: auto; }
.qr-caption { margin: 1.8vh 0 0; font-size: 2.2vh; font-weight: 600; letter-spacing: 0.02em; line-height: 1.3; }
.qr-url { margin: 0.8vh 0 0; font-size: 1.7vh; color: rgba(255, 255, 255, 0.85); }

/* Co-brand: pinned to the top of the right-hand column (the auto margin takes
   the free space); the TALIA logo and QR stay at the bottom. */
.cobrand { width: 100%; margin-bottom: auto; padding-bottom: 3vh; display: flex; flex-direction: column; align-items: center; }
.cobrand-label { margin: 0 0 1.4vh; font-size: 1.9vh; font-weight: 600; letter-spacing: 0.02em; line-height: 1.3; color: rgba(255, 255, 255, 0.85); overflow-wrap: anywhere; }
.cobrand-mark { width: 100%; display: flex; align-items: center; justify-content: center; }
.cobrand-mark.panel { padding: 1.6vh; background: #fff; border-radius: 2.4vh; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16); }
.cobrand-logo { display: block; flex: 0 1 auto; min-width: 0; max-width: 100%; max-height: 14vh; width: auto; height: auto; object-fit: contain; }
.cobrand-mark:not(.panel) .cobrand-logo { filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.12)); }
.cobrand-name { font-size: 3vh; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; }
.cobrand-mark.panel .cobrand-name { color: rgb(var(--aubergine)); }
.cobrand-text { margin: 1.6vh 0 0; font-size: 2.1vh; font-weight: 600; line-height: 1.3; white-space: pre-line; overflow-wrap: anywhere; }

.status {
  position: fixed;
  left: 1.2vh;
  bottom: 1.2vh;
  width: 1.4vh;
  height: 1.4vh;
  border-radius: 50%;
  background: #ff5e57;
  box-shadow: 0 0 0 0.4vh rgba(255, 94, 87, 0.3);
}

/* "(Live)" after the title, in TALIA Sand */
:root { --sand: #e0dad2; }
.title-live { color: #fde8b8; font-weight: 500; letter-spacing: 0.04em; } /* TALIA's warm gold for (Live) */

/* The symptoms someone has just added */
.chip.mine {
  background: rgba(224, 218, 210, 0.42);
  box-shadow: 0 0 0 calc(1.5px * var(--unit)) var(--sand), 0 0 calc(18px * var(--unit)) rgba(224, 218, 210, 0.75);
  z-index: 2;
}
.card-note, .card-countries, .card-baseline { margin: calc(8px * var(--unit)) 0 0; text-align: center; font-size: calc(12px * var(--unit)); color: rgba(255, 255, 255, 0.9); }
.card-note { min-height: 1.35em; font-weight: 600; color: var(--sand); opacity: 0; transition: opacity 0.4s ease; }
.card-note.show { opacity: 1; }
body.wall .card-note { display: none; }
.preview-flag { position: fixed; top: 1vh; left: 50%; transform: translateX(-50%); padding: 0.6vh 1.4vh; border-radius: 999px; background: #fff4d6; color: #7a5a00; font: 600 1.6vh/1.2 var(--font); }
