/* ============================================================
   jogo.css: a app do participante (jogo.html), com o visual do template Roche (R_ITOV029a):
   parede de tijolos do pptx como fundo, faixa escura do rodapé no cabeçalho e nos separadores,
   rosa (#E1609E) nos destaques, amarelo (#FFEA09) nos acertos e na ação (sem verdes, 17 nov), amarelo só em frases pequenas,
   cartões brancos com texto escuro. Tiempos Headline nos títulos, Akkurat no resto.
   Telemóvel pessoal, retrato, a partir de 360 px, uma mão, botões com 48 px.
   Nunca text-transform: uppercase.
   ============================================================ */
:root {
  --ph-bg: #2A1F6E;              /* tom base dos tijolos do template */
  --ph-accent: #E1609E;          /* rosa Roche: botões e destaques */
  --ph-navy: #281D62;            /* a faixa do rodapé do template: cabeçalho, separadores, cartões escuros */
  --ph-purple: #35267E;          /* roxo Roche: temporizador, selos */
  --ph-cream: #FFFFFF;
  --ph-ink: #1E1B2E;
  --ph-card: #FFFFFF;
  --ph-line: rgba(30, 27, 46, .14);
  --ph-ok: #1D9E75;
  --ph-no: #C0392B;
  --ph-green: #68FB00;
  --ph-yellow: #FFEA09;
  --ph-orange: #FF5900;
  --ph-on-dark: #FFFFFF;
  --ph-on-dark-soft: rgba(255, 255, 255, .82);
  --ph-tabs-h: 64px;
}
html:has(body.jogo-body) { background: var(--ph-bg); }
body.jogo-body {
  margin: 0; background: var(--ph-bg) url('assets/img/tijolos.jpg') left top / 1280px auto repeat-y; color: var(--ph-on-dark);
  font: 17px/1.45 var(--font-body); min-height: 100vh; min-height: 100dvh; -webkit-tap-highlight-color: transparent;
}
.ph { min-height: 100vh; min-height: 100dvh; }
.ph h1, .ph h2, .ph h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.15; margin: 0; }
.ph-title { font-size: clamp(24px, 6.2vw, 32px); color: var(--ph-on-dark); }
.ph-title.big { font-size: clamp(36px, 10vw, 56px); text-align: center; }
.ph-h2 { font-size: 22px; margin: 28px 0 10px; color: var(--ph-accent); }
.ph-kicker { margin: 0 0 6px; font: 700 13px/1.3 var(--font-body); color: var(--ph-yellow); }
.ph-lead { margin: 0 0 6px; font-weight: 700; color: var(--ph-on-dark); }
.ph-sub { margin: 8px 0 0; font-size: 16px; color: var(--ph-on-dark-soft); }
.ph-hint { margin: 10px 0 0; padding: 12px 14px; border-left: 3px solid var(--ph-accent); background: rgba(255, 255, 255, .1); border-radius: 0 10px 10px 0; font-size: 15px; color: var(--ph-on-dark); }
.ph-version { margin-top: 20px; font-size: 12px; opacity: .6; }
.link { border: 0; background: none; padding: 8px 2px; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

/* ---- botões e campos ---- */
.ph-btn {
  display: block; width: 100%; min-height: 52px; margin-top: 14px; padding: 12px 18px; border: 0; border-radius: 14px;
  background: var(--ph-accent); color: #fff; font: 700 18px/1.2 var(--font-body); text-align: center; text-decoration: none; cursor: pointer;
}
.ph-btn:active { transform: scale(.99); }
.ph-btn:disabled { opacity: .45; cursor: not-allowed; }
.ph-btn.ph-ghost { background: transparent; color: var(--ph-on-dark); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.ph-form { display: grid; gap: 6px; margin-top: 14px; }
.ph-label { display: grid; gap: 6px; font-weight: 700; font-size: 15px; color: var(--ph-on-dark); }
.ph-input {
  width: 100%; min-height: 52px; padding: 10px 14px; border-radius: 12px; border: 2px solid transparent; background: var(--ph-card);
  font: 500 20px/1.2 var(--font-body); color: var(--ph-ink);
}
.ph-input:focus { outline: none; border-color: var(--ph-accent); box-shadow: 0 0 0 3px rgba(225, 96, 158, .3); }
.ph-textarea { min-height: 110px; font-size: 17px; resize: vertical; }
.ph-count { margin: 0; font-size: 13px; color: var(--ph-on-dark-soft); text-align: right; }
.ph-msg { margin: 4px 0 0; min-height: 1.3em; font-weight: 700; color: var(--ph-on-dark); }
.ph-msg.ok { color: var(--ph-yellow); }
.ph-msg.no, .ph-msg.over { color: #FF8E7A; }
.ph-msg.big { font-size: 20px; padding: 16px 0; }
.ph-msg small { display: block; font-weight: 400; font-size: 14px; color: var(--ph-on-dark-soft); }
.ph-retry { display: block; font: 500 24px/1.2 var(--font-display); color: #FF8E7A; }
.ph-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }
.ph-actions .ph-btn { margin-top: 8px; }
.shake { animation: phShake .4s; }
@keyframes phShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* ---- entrada ---- */
.ph-entry { max-width: 480px; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 20px 32px; }
.ph-entry-logos { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.ph-entry-logos img { height: 22px; width: auto; }
.ph-entry-logos img + img { height: 34px; }
.ph-entry .ph-title { font-size: clamp(26px, 7vw, 34px); color: var(--ph-accent); }
.ph-entry-name { margin: 22px 0 4px; font-size: 20px; }
.ph-privacy { margin: 22px 0 0; font-size: 13px; line-height: 1.45; color: var(--ph-on-dark-soft); }

/* ---- a app ---- */
.ph-app { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.ph-topwrap { position: sticky; top: 0; z-index: 20; }
.ph-top {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: calc(8px + env(safe-area-inset-top)) 14px 8px; background: var(--ph-navy); color: var(--ph-cream); border-top: 3px solid var(--ph-accent);
}
.ph-top-logos { display: flex; align-items: center; gap: 10px; }
.ph-top-logos img { height: 16px; width: auto; display: block; background: none; }
.ph-top-logos img + img { height: 26px; }
.ph-top-name { flex: 1; min-width: 0; font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ph-sound { min-height: 36px; padding: 4px 12px; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; background: transparent; color: var(--ph-cream); font: 700 13px var(--font-body); }
.ph-sound.off { opacity: .6; text-decoration: line-through; }
.ph-pill { flex-basis: 100%; padding: 4px 10px; border-radius: 8px; background: var(--ph-accent); color: #fff; font: 700 13px var(--font-body); text-align: center; }
.ph-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-bottom: calc(var(--ph-tabs-h) + env(safe-area-inset-bottom) + 12px); }
.ph-screen { width: 100%; max-width: 520px; margin: 0 auto; padding: 18px 16px 24px; box-sizing: border-box; }
.ph-center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 60vh; }
.ph-head { display: grid; gap: 4px; }
.ph-timer-slot:empty { display: none; }
.ph-timer { display: inline-flex; align-items: baseline; gap: 8px; margin: 10px 0 4px; padding: 6px 14px; border-radius: 12px; background: var(--ph-purple); color: var(--ph-cream); }
.ph-timer-num { font: 500 30px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.ph-timer-lbl { font-size: 13px; opacity: .7; }
.ph-timer.low { background: var(--ph-accent); color: #fff; animation: phPulse .5s ease-in-out infinite alternate; }
.ph-timer.done { background: var(--ph-no); color: #fff; animation: none; }
.ph-timer.paused { opacity: .7; }
.ph-timer-slot.small .ph-timer { margin-top: 24px; }
@keyframes phPulse { from { transform: scale(1); } to { transform: scale(1.04); } }
.ph-done { margin-top: 18px; padding: 18px 16px; border-radius: 16px; background: var(--ph-card); color: var(--ph-ink); }
.ph-done.ok { background: var(--ph-ok); color: #fff; }
.ph-done.no { background: var(--ph-no); color: #fff; }
.ph-done.ph-over { background: rgba(255, 255, 255, .14); color: var(--ph-on-dark); }
.ph-done-text { margin: 0; font: 500 20px/1.3 var(--font-display); }
.ph-done-val { margin: 8px 0 0; font: 500 40px/1 var(--font-display); }
.ph-blocked .ph-lock { width: 64px; height: 64px; margin: 10px 0 18px; border-radius: 50%; background: var(--ph-card); position: relative; }
.ph-blocked .ph-lock::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 22px; transform: translate(-50%, -50%); border-radius: 50% 50% 4px 4px; background: var(--ph-accent); }

/* ---- notificação dentro da app ---- */
.ph-notif {
  position: fixed; left: 12px; right: 12px; top: calc(10px + env(safe-area-inset-top)); z-index: 60; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px; background: var(--ph-card); color: var(--ph-ink); box-shadow: 0 12px 32px rgba(0, 0, 0, .3); cursor: pointer;
}
.ph-notif.in { animation: phDown .4s cubic-bezier(.2, .8, .2, 1); }
.ph-notif.warn { background: var(--ph-accent); color: #fff; }
.ph-notif strong { display: block; font-size: 16px; }
.ph-notif small { font-size: 13px; opacity: .7; }
.ph-notif-logo { flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--ph-navy); position: relative; }
.ph-notif-logo::after { content: ''; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--ph-accent); }
@keyframes phDown { from { transform: translateY(-120%); opacity: 0; } to { transform: none; opacity: 1; } }
.ph-notif-card { width: 100%; padding: 22px 18px; border-radius: 18px; background: var(--ph-card); color: var(--ph-ink); text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.ph-notif-dot { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--ph-accent); animation: phPulse .6s ease-in-out infinite alternate; }
.ph-notif-title { margin: 10px 0 2px; font: 500 24px/1.2 var(--font-display); }
.ph-notif-sub { margin: 0; color: rgba(30, 27, 46, .7); }

/* ---- separadores ---- */
.ph-tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; min-height: var(--ph-tabs-h);
  padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); background: var(--ph-navy); color: var(--ph-cream); border-top: 2px solid var(--ph-accent);
}
.ph-tab { position: relative; flex: 1 1 0; min-width: 0; min-height: 52px; padding: 6px 2px; border: 0; border-radius: 10px; background: none; color: inherit; font: 700 13px/1.15 var(--font-body); }
.ph-tab.on { background: var(--ph-accent); color: #fff; }
.ph-tab.hot:not(.on) { box-shadow: inset 0 0 0 2px var(--ph-accent); }
.ph-tab-dot { position: absolute; top: 6px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: var(--ph-yellow); }
.ph-tab.on .ph-tab-dot { background: #fff; }
.ph-tab-lbl { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- curiosidades (transição suave entre cartões) ---- */
.ph-wait-sub { font-size: 18px; margin-top: 10px; }
.ph-curio-slot { margin-top: 16px; }
.ph-curio { padding: 18px 16px 16px; border-radius: 16px; background: var(--ph-card); color: var(--ph-ink); opacity: 0; transform: translateY(10px); transition: opacity .6s ease, transform .6s ease; }
.ph-curio.in { opacity: 1; transform: none; }
.ph-curio-kicker { margin: 0 0 6px; font: 700 13px var(--font-body); color: var(--ph-orange); }
.ph-curio-title { font-size: 22px; color: var(--ph-purple); }
.ph-curio-text { margin: 8px 0 0; font-size: 16px; line-height: 1.45; }

/* ---- conversa ---- */
.ph-chat { margin-top: 10px; padding: 14px; border-radius: 18px; background: #E9EEF2; color: var(--ph-ink); }
.ph-chat-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--ph-line); }
.ph-chat-head strong { display: block; font-size: 16px; }
.ph-chat-head small { font-size: 12px; color: rgba(30, 27, 46, .7); }
.ph-avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--ph-purple); color: var(--ph-cream); font: 700 14px var(--font-body); flex: none; }
.ph-avatar.lc { width: 34px; height: 34px; margin-right: 8px; vertical-align: middle; font-size: 12px; background: var(--ph-accent); }
.ph-bubble { position: relative; margin: 14px 24px 4px 0; padding: 12px 14px 22px; border-radius: 4px 16px 16px 16px; background: var(--ph-card); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.ph-bubble p { margin: 0; font-size: 16px; line-height: 1.45; }
.ph-bubble-time { position: absolute; right: 10px; bottom: 6px; font-size: 11px; color: rgba(30, 27, 46, .55); }
.ph-details { margin-top: 18px; }
.ph-details summary { font-weight: 700; cursor: pointer; padding: 8px 0; }

/* ---- peças de Scrabble: a grelha estica até ao fundo do ecrã ---- */
.ph-scrabble { display: flex; flex-direction: column; flex: 1; min-height: calc(100dvh - 150px - var(--ph-tabs-h)); }
.ph-rack { display: flex; flex-wrap: wrap; gap: 6px; min-height: 64px; margin-top: 14px; padding: 8px; border-radius: 12px; background: var(--ph-navy); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.ph-rack-empty { align-self: center; padding: 0 8px; color: rgba(255, 255, 255, .6); font-size: 14px; }
.ph-tiles { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: minmax(50px, 1fr); gap: 8px; margin-top: 12px; min-height: 220px; }
.ph-tile {
  display: grid; place-items: center; min-height: 52px; border: 0; border-radius: 8px; background: #F2DDB5; color: #3A2A10;
  font: 700 26px var(--font-body); box-shadow: inset 0 -3px 0 #D7B983, 0 1px 2px rgba(0, 0, 0, .18); cursor: pointer;
}
.ph-tile.used { opacity: .2; }
.ph-tile.on { background: #FFD0E6; box-shadow: inset 0 -3px 0 var(--ph-accent); }
.ph-tile:disabled { cursor: default; }
.ph-scrabble .ph-actions { position: sticky; bottom: calc(var(--ph-tabs-h) + env(safe-area-inset-bottom) + 8px); margin-top: auto; padding-top: 12px; }

/* ---- escolha com cor ---- */
.ph-choices { display: grid; gap: 10px; margin-top: 14px; }
.ph-choice { min-height: 64px; padding: 14px 16px; border: 0; border-radius: 14px; font: 700 18px/1.2 var(--font-body); text-align: left; cursor: pointer; box-shadow: 0 2px 4px rgba(0, 0, 0, .12); }
/* a opção escolhida (ainda por submeter) leva um anel branco e rosa */
.ph-choices:not(.plain) .ph-choice.on { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--ph-accent); }
.ph-choices + .ph-msg { margin-top: 10px; }
.ph-white { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: #fff; color: var(--ph-ink); border-radius: 0; }
.ph-white-text { margin: 0; font: 500 26px/1.25 var(--font-display); }
.ph-app[data-step="m2-escolha"] .ph-stage, .ph-app[data-step="m2-cor"] .ph-stage { background: #fff; }
.ph-fullcolor { min-height: 70vh; }
.ph-cor { position: fixed; inset: 0; z-index: 100; }
body.ph-has-color .ph-topwrap, body.ph-has-color .ph-tabs, body.ph-has-color .ph-notif { display: none !important; }
/* o "i" com a legenda das cores, por cima do ecrã de cor */
.ph-info { position: fixed; right: 16px; bottom: calc(var(--ph-tabs-h) + 16px + env(safe-area-inset-bottom)); z-index: 110; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--ph-ink); color: #fff; font: italic 500 24px/1 var(--font-display); box-shadow: 0 6px 18px rgba(0, 0, 0, .3); cursor: pointer; }
.ph-legend { position: fixed; left: 16px; right: 16px; bottom: calc(var(--ph-tabs-h) + 76px + env(safe-area-inset-bottom)); z-index: 110; padding: 16px; border-radius: 16px; background: var(--ph-card); color: var(--ph-ink); box-shadow: 0 12px 32px rgba(0, 0, 0, .3); }
.ph-legend-title { margin: 0 0 8px; font: 700 14px var(--font-body); color: var(--ph-accent); }
.ph-legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ph-legend li { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
body.ph-has-color .ph-info { bottom: calc(16px + env(safe-area-inset-bottom)); }
body.ph-has-color .ph-legend { bottom: calc(76px + env(safe-area-inset-bottom)); }

/* ---- revelado / decisões ---- */
.ph-mark { display: inline-block; width: 1.2em; font-weight: 700; }
.ph-decs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 10px; }
.ph-decs li { padding: 12px 14px; border-radius: 14px; background: var(--ph-card); color: var(--ph-ink); border-left: 5px solid var(--ph-line); }
.ph-decs li.ok { border-left-color: var(--ph-ok); }
.ph-decs li.no { border-left-color: var(--ph-no); }
.ph-dec-m { margin: 0; font-size: 12px; font-weight: 700; color: var(--ph-accent); }
.ph-dec-mine { margin: 2px 0 0; font-size: 15px; }
.ph-empty { text-align: center; padding: 30px 0; }

/* ---- palavra-passe (Pigpen) ---- */
.ph-effects { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.ph-effects li { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 12px; background: var(--ph-card); color: var(--ph-ink); font-weight: 700; }
.ph-glyph { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--ph-purple); color: var(--ph-cream); }
.ph-glyph svg { width: 40px; height: 40px; }
.ph-pass { font: 700 28px/1 var(--font-body); letter-spacing: .3em; text-align: center; }

/* ---- exames e códigos: a folha rasgada ao meio (slide do cliente, 17 nov) ----
   Cada metade mostra os exames por inteiro; só os códigos vêm rasgados (dois algarismos em cada metade). */
.ph-paper-wrap { position: relative; width: 100%; margin: 12px auto 0; overflow: hidden; }
.ph-paper {
  width: 100%; padding: 16px 26px 16px 18px; box-sizing: border-box; color: #1E1B2E; text-align: left;
  font: 400 15px/1.3 'American Typewriter', 'Courier New', Courier, monospace;
  background: #BFD6E0 repeating-linear-gradient(to bottom, transparent 0 29px, rgba(30, 27, 46, .08) 29px 30px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.ph-paper-a { transform: rotate(-1.5deg); clip-path: polygon(0 0, 97% 0, 100% 3%, 96% 7%, 99% 11%, 95% 16%, 98% 21%, 96% 26%, 100% 31%, 97% 36%, 95% 41%, 99% 46%, 96% 51%, 98% 56%, 95% 61%, 99% 66%, 96% 71%, 100% 76%, 97% 81%, 95% 86%, 98% 91%, 96% 96%, 97% 100%, 0 100%); }
.ph-paper-b { transform: rotate(1.5deg); clip-path: polygon(3% 0, 100% 0, 100% 100%, 2% 100%, 5% 96%, 1% 91%, 4% 86%, 2% 81%, 5% 76%, 0 71%, 3% 66%, 1% 61%, 4% 56%, 2% 51%, 5% 46%, 1% 41%, 3% 36%, 0 31%, 4% 26%, 2% 21%, 5% 16%, 1% 11%, 4% 7%, 0 3%); }
.ph-paper-b .ph-paper { padding: 16px 18px 16px 26px; }
.ph-paper p { margin: 0; }
.ph-paper-title { font-size: 16px; font-weight: 700; margin-bottom: 10px !important; }
.ph-paper-line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 8px !important; }
.ph-paper-label { flex: 1; min-width: 0; }
.ph-paper-code { flex: none; display: inline-flex; gap: 4px; font-weight: 700; font-size: 18px; }
.ph-paper-code span { display: inline-block; width: 1.1em; text-align: center; }
.ph-paper-code span.gone { border-bottom: 2px dashed rgba(30, 27, 46, .35); }
.ph-codes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ph-code { font: 700 26px/1 var(--font-body); letter-spacing: .15em; text-align: center; }

/* ---- calendário (frequência) ---- */
.ph-flip { margin-top: 16px; }
.ph-flip-hint { margin-bottom: 14px; }
/* lembrete de que há mais ecrã em baixo (o cartão da ação), fixo por cima dos separadores */
.ph-scroll-hint { position: fixed; left: 50%; bottom: calc(var(--ph-tabs-h) + 14px + env(safe-area-inset-bottom)); z-index: 25; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px; border: 0; border-radius: 999px; background: var(--ph-accent); color: #fff; font: 700 14px var(--font-body); box-shadow: 0 8px 20px rgba(0, 0, 0, .35); cursor: pointer; white-space: nowrap; }
.ph-scroll-arrow { width: 10px; height: 10px; border-right: 3px solid #fff; border-bottom: 3px solid #fff; transform: rotate(45deg); animation: phBounce 1s ease-in-out infinite; }
@keyframes phBounce { 0%, 100% { transform: translateY(-2px) rotate(45deg); } 50% { transform: translateY(3px) rotate(45deg); } }
.ph-flip-card { padding: 24px 18px; border-radius: 16px; background: var(--ph-purple); color: var(--ph-cream); text-align: center; transform: rotate(180deg); }
.ph-flip-day { margin: 0; font-size: 14px; opacity: .7; }
.ph-flip-action { margin: 6px 0 0; font: 500 26px/1.25 var(--font-display); }
.ph-action { background: var(--ph-yellow); color: #1E1650; border-radius: 20px; margin: 16px; min-height: 60vh; }
.ph-action .ph-title { color: #1E1650; }
.ph-freqs { margin-top: 12px; }
.ph-cal { margin-top: 14px; padding: 10px; border-radius: 14px; background: var(--ph-card); color: var(--ph-ink); }
.ph-cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ph-dow { font-size: 11px; font-weight: 700; text-align: center; color: rgba(30, 27, 46, .6); padding-bottom: 2px; }
.ph-cday { display: grid; place-items: center; min-height: 40px; border-radius: 8px; font-size: 14px; color: rgba(30, 27, 46, .7); position: relative; }
.ph-cday b { font-weight: 500; }
.ph-cday small { position: absolute; top: 2px; right: 4px; font-size: 9px; color: var(--ph-accent); font-weight: 700; }
.ph-cday.empty { visibility: hidden; }
.ph-cday.on { background: var(--ph-orange); color: #fff; }
.ph-cday.on b { font-weight: 700; }
.ph-cday.on small { color: #fff; }

/* ---- sistema bloqueado (momento 3) ---- */
.ph-locked { margin-top: 8px; padding: 18px 16px 20px; border-radius: 16px; background: var(--ph-card); color: var(--ph-ink); text-align: center; }
.ph-locked .ph-lock { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; background: var(--ph-navy); position: relative; }
.ph-locked .ph-lock::after { content: ''; position: absolute; left: 50%; top: 50%; width: 12px; height: 20px; transform: translate(-50%, -50%); border-radius: 50% 50% 4px 4px; background: var(--ph-accent); }
.ph-locked-title { margin: 0; font: 500 22px/1.2 var(--font-display); color: var(--ph-no); }
.ph-locked-sub { margin: 8px 0 0; font-size: 16px; color: rgba(30, 27, 46, .8); }

/* ---- envelopes 1 e 2: o desenho do envelope por cima do título ---- */
.ph-envelope-wrap { display: flex; justify-content: center; margin: 22px 0 16px; }
.ph-envelope { position: relative; width: 180px; height: 116px; border-radius: 10px; background: #FFF7D6; box-shadow: 0 12px 28px rgba(0, 0, 0, .35); overflow: hidden; }
.ph-envelope::before { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom right, transparent 49.5%, rgba(30, 22, 80, .14) 50%) left top / 50% 55% no-repeat, linear-gradient(to bottom left, transparent 49.5%, rgba(30, 22, 80, .14) 50%) right top / 50% 55% no-repeat; }
.ph-envelope-flap { position: absolute; left: 0; right: 0; top: 0; height: 55%; background: var(--ph-yellow); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.ph-envelope-n { position: absolute; right: 14px; bottom: 6px; font: 500 40px/1 var(--font-display); color: var(--ph-accent); }

/* ---- envelope 2 ---- */
.ph-folds { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.ph-folds li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--ph-card); color: var(--ph-ink); font-weight: 700; }
.ph-swatch { width: 28px; height: 28px; border-radius: 8px; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); }

/* ---- caso clínico ---- */
.ph-case-sec { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: var(--ph-card); color: var(--ph-ink); }
.ph-case-sec h3 { font-size: 15px; font-family: var(--font-body); font-weight: 700; color: var(--ph-accent); margin-bottom: 4px; }
.ph-case-sec p { margin: 6px 0 0; font-size: 16px; line-height: 1.45; }
.ph-case-sec p.new { background: rgba(225, 96, 158, .12); border-left: 3px solid var(--ph-accent); padding: 6px 8px; border-radius: 0 8px 8px 0; }
.ph-new { display: inline-block; padding: 1px 8px; border-radius: 999px; background: var(--ph-accent); color: #fff; font-size: 11px; font-weight: 700; vertical-align: middle; }

/* ---- perguntas ---- */
.ph-qs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.ph-qs li { padding: 10px 14px; border-radius: 12px; background: var(--ph-card); color: var(--ph-ink); border-left: 3px solid var(--ph-accent); }

/* ---- final e regulamentar ---- */
.ph-final-logos { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ph-final-logos img { height: 22px; width: auto; }
.ph-final-logos img + img { height: 34px; }
.ph-link { text-decoration: none; }
.ph-reg-scroll { max-height: 60vh; overflow-y: auto; padding: 14px; border-radius: 14px; background: var(--ph-card); -webkit-overflow-scrolling: touch; }
.ph-reg-title { font-family: var(--font-body); font-weight: 700; font-size: 15px; color: #7D7D7D; margin-bottom: 8px; }
.ph-reg-p { margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: #7D7D7D; overflow-wrap: anywhere; }
.ph-reg-p a { color: #35267E; }

/* ---- pré-visualização ---- */
html.ph-preview .ph-stage, html.ph-preview .ph-tabs, html.ph-preview .ph-sound { pointer-events: none; }

@media (min-width: 700px) { .ph-screen { padding-top: 26px; } }

/* ---- faixa do momento atual ---- */
.ph-moment { padding: 6px 14px 8px; background: var(--ph-navy); color: var(--ph-cream); border-top: 1px solid rgba(255, 255, 255, .12); }
.ph-moment-lbl { margin: 0; font: 700 13px/1.2 var(--font-body); color: var(--ph-yellow); }
.ph-app.is-preview .ph-topwrap { position: static; }

/* ---- escolhas sem cor (incidência, frequência) ---- */
.ph-choices.plain .ph-choice { background: var(--ph-card); color: var(--ph-ink); border: 2px solid transparent; min-height: 56px; }
.ph-choices.plain .ph-choice.on { border-color: var(--ph-accent); background: #FFE6F2; box-shadow: 0 0 0 3px rgba(225, 96, 158, .3); }
.ph-done-val.small { font-size: 24px; }

/* ---- cartão do laboratório ---- */
.ph-lab { margin-top: 14px; padding: 18px 18px 8px; border-radius: 18px; background: var(--ph-card); color: var(--ph-ink); box-shadow: 0 8px 24px rgba(0, 0, 0, .25); }
.ph-lab-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--ph-line); }
.ph-lab-head strong { display: block; font-size: 15px; }
.ph-lab-head small { font-size: 12px; color: rgba(30, 27, 46, .65); }
.ph-lab-title { margin: 22px 0 16px; font-size: 24px; line-height: 1.2; color: var(--ph-purple); }
.ph-lab-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-top: 1px solid var(--ph-line); font-size: 16px; line-height: 1.35; }
.ph-lab-row b { font: 500 20px/1.2 var(--font-display); color: var(--ph-purple); text-align: right; }

/* ---- veredicto (revelado) ---- */
.ph-verdict { margin-top: 14px; padding: 22px 18px; border-radius: 18px; background: var(--ph-card); color: var(--ph-ink); text-align: center; }
.ph-verdict.ok { background: var(--ph-ok); color: #fff; }
.ph-verdict.no { background: var(--ph-no); color: #fff; }
.ph-verdict.none { background: var(--ph-purple); color: var(--ph-cream); }
.ph-verdict-mark { display: block; font: 700 56px/1 var(--font-body); margin-bottom: 6px; }
.ph-verdict .ph-title { font-size: clamp(28px, 7vw, 36px); color: inherit; }
.ph-verdict-mine { margin: 10px 0 0; font-size: 16px; opacity: .92; }

/* ---- decisões (por baixo do momento e no fim) ---- */
.ph-decs-sec { padding-top: 0; }
.ph-decs li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.ph-decs li .ph-mark { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--ph-line); color: var(--ph-ink); font-size: 18px; }
.ph-decs li.ok .ph-mark { background: var(--ph-ok); color: #fff; }
.ph-decs li.no .ph-mark { background: var(--ph-no); color: #fff; }
.ph-dec-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.ph-dec-body .ph-dec-m { font-size: 14px; color: var(--ph-ink); }
.ph-dec-mine { font-size: 14px; color: rgba(30, 27, 46, .75); }
.ph-dec-state { flex: none; max-width: 42%; text-align: right; font-size: 13px; font-weight: 700; color: rgba(30, 27, 46, .7); }
.ph-decs li.ok .ph-dec-state { color: var(--ph-ok); }
.ph-decs li.no .ph-dec-state { color: var(--ph-no); }
.ph-decs.compact li { padding: 10px 14px; }

/* ---- peças no suporte ---- */
.ph-rack .ph-tile { min-width: 40px; min-height: 48px; padding: 0 10px; }

/* ---- final: secções recolhidas ---- */
.ph-final .ph-sub { margin-top: 10px; }
.ph-final .ph-h2 { margin-top: 26px; }
.ph-fold { margin-top: 14px; border-radius: 14px; background: rgba(255, 255, 255, .1); padding: 4px 14px; }
.ph-fold summary { padding: 12px 0; font: 700 17px var(--font-body); color: var(--ph-on-dark); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.ph-fold summary::-webkit-details-marker { display: none; }
.ph-fold summary::after { content: '+'; font-size: 22px; color: var(--ph-accent); }
.ph-fold[open] summary::after { content: '−'; }
.ph-fold .ph-reg-scroll { margin-bottom: 12px; }
.ph-fold .ph-case-sec { margin-top: 10px; }
.ph-fold > .ph-sub { margin-top: 0; }
