:root{--ink:#173d35;--muted:#5d776d;--paper:#f5f8f5;--line:#dce9e2;--green:#11764c;--blue:#2866a5;--orange:#c96815;--purple:#704799;--soft-blue:#e8f2fe;font-family:'Plus Jakarta Sans',Arial,sans-serif;color:var(--ink);background:var(--paper);font-size:17px}*{box-sizing:border-box}body{margin:0;background:radial-gradient(circle at 100% 0,#e3f0ff 0,transparent 31%),var(--paper)}button{font:inherit}.app{max-width:680px;margin:auto;min-height:100vh;padding:25px 17px 42px}.app-header{display:flex;justify-content:space-between;align-items:start}.date{font-size:.8rem;font-weight:700;letter-spacing:.02em;text-transform:capitalize;color:var(--muted);margin:0 0 8px}h1{font-size:2rem;letter-spacing:-.055em;line-height:1.1;margin:0}h2{font-size:1.6rem;letter-spacing:-.04em;margin:0}.round-button{width:48px;height:48px;border:0;border-radius:50%;display:grid;place-items:center;background:#dff0e7;color:var(--green);cursor:pointer}.round-button svg{width:22px;height:22px}.prompt{font-size:1.16rem;font-weight:600;margin:30px 0 17px}.activity-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.activity{border:0;min-height:170px;border-radius:24px;padding:17px;text-align:left;color:white;box-shadow:0 8px 18px #16352b20;cursor:pointer;transition:transform .14s}.activity:active{transform:scale(.97)}.activity-icon{display:grid;place-items:center;width:49px;height:49px;border-radius:16px;background:#ffffff27;margin-bottom:25px}.activity-icon svg{width:25px}.activity strong{display:block;font-size:1.13rem;line-height:1.1}.activity small{display:block;font-size:.78rem;margin-top:7px;opacity:.92}.worship{background:linear-gradient(145deg,#259461,#0e6641)}.bible{background:linear-gradient(145deg,#438bcb,#20588e)}.routine{background:linear-gradient(145deg,#e18a31,#ba570b)}.family{background:linear-gradient(145deg,#9869ba,#68428f)}.help-card{display:flex;align-items:center;gap:13px;width:100%;margin-top:20px;padding:15px;border:0;border-radius:18px;background:#fff;box-shadow:0 4px 15px #16352b10;text-align:left;color:var(--ink);cursor:pointer}.help-card>span{display:grid;place-items:center;width:42px;height:42px;border-radius:50%;background:#fff0d4;color:#b76a0b}.help-card svg{width:22px}.help-card div{display:grid;gap:3px}.help-card small,.family-card small,.album small{color:var(--muted);font-size:.76rem}.help-card>svg{margin-left:auto;color:var(--green)}.screen{padding-top:4px}.screen-header{display:flex;align-items:center;gap:14px;margin-bottom:22px}.back{border:0;background:#e2f1e8;color:var(--green);border-radius:12px;padding:11px 13px;font-weight:800;display:flex;align-items:center;gap:6px;cursor:pointer}.back svg{width:19px}.intro{color:var(--muted);line-height:1.5;margin:0 0 20px}.cards,.routine-list{display:grid;gap:12px}.routine-list label{display:flex;align-items:center;gap:14px;padding:17px;background:#fff;border:0;border-radius:17px;box-shadow:0 3px 12px #16352b12;font-weight:700;text-align:left;cursor:pointer}.routine-list input{height:27px;width:27px;accent-color:var(--green)}.today-word{display:flex;align-items:center;gap:13px;padding:17px;background:var(--soft-blue);border-radius:19px}.today-word>span{color:var(--blue)}.today-word svg{width:26px}.today-word small{color:var(--blue);font-weight:800;font-size:.66rem;letter-spacing:.08em}.today-word strong{display:block;font-size:1.13rem;margin-top:3px}.today-word p{font-size:.76rem;color:#55728e;line-height:1.4;margin:5px 0 0}.today-word .round-button{margin-left:auto;background:var(--blue);color:#fff}.testament-tabs{display:flex;gap:8px;margin:22px 0 10px}.tab{border:0;border-radius:12px;padding:11px 13px;background:#e8eee9;color:var(--muted);font-size:.78rem;font-weight:800;cursor:pointer}.tab.active{background:var(--blue);color:#fff}.book-count{font-size:.76rem;font-weight:700;color:var(--muted);margin:0 0 11px}.book-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.book{border:1px solid var(--line);border-radius:13px;padding:13px 11px;background:#fff;text-align:left;color:var(--ink);font-weight:800;cursor:pointer}.book small{display:block;color:var(--muted);font-size:.68rem;font-weight:500;margin-top:3px}.reading{background:#fff;border-radius:18px;padding:20px;box-shadow:0 3px 12px #16352b12}.reading h3{margin:8px 0;font-size:1.45rem}.reading p{line-height:1.6;color:#416158}.reading .round-button{margin-top:10px}.family-card{display:flex;align-items:center;gap:13px;padding:15px;margin-bottom:13px;background:#fff;border-radius:18px;box-shadow:0 3px 12px #16352b12}.photo{width:62px;height:62px;flex:0 0 62px;border-radius:17px;display:grid;place-items:end center;padding-bottom:6px;color:#fff;font-size:.61rem;font-weight:800;letter-spacing:.09em}.ana{background:linear-gradient(145deg,#f3c5ad 0 30%,#704930 31% 54%,#e8aa83 55% 72%,#d97e72 73%)}.joao{background:linear-gradient(145deg,#8bc0d8 0 30%,#503627 31% 54%,#bc805a 55% 73%,#265b71 74%)}.family-card div:nth-child(2){min-width:0}.family-card strong{display:block}.family-card small{display:block;margin-top:3px}.family-card p{font-size:.74rem;line-height:1.4;color:#456156;margin:6px 0 0}.family-card .round-button{margin-left:auto;flex:0 0 auto;background:#f0e8f8;color:var(--purple)}.album{border:0;width:100%;display:flex;align-items:center;gap:13px;padding:17px;text-align:left;background:#fff1f4;color:var(--ink);border-radius:18px;cursor:pointer}.album>svg{color:#b54b68}.album span{display:grid;gap:3px}.album small{font-size:.75rem}@media(max-width:355px){.app{padding-left:13px;padding-right:13px}.activity{min-height:151px;padding:14px}.activity-icon{margin-bottom:16px}.activity strong{font-size:1rem}.book-grid{grid-template-columns:1fr}}

/* Visual language shared by home and Louvores. */
[hidden] { display: none !important; }

@media (prefers-reduced-motion: no-preference) {
  .app.has-navigated > :is(.app-header, .home, .screen):not([hidden]) {
    animation: screen-enter 180ms ease-out;
  }
}

@keyframes screen-enter {
  from { opacity: .65; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
:root {
  --ink: #26243a;
  --muted: #514e62;
  --paper: #f6f5f9;
  --line: #ded8e8;
  --violet: #533c76;
  --lilac: #efe5f9;
  --playing: #e0f1e9;
  --playing-ink: #174e42;
}
body {
  --canvas-left: #e6effa;
  --canvas-right: #eee6f7;
  --canvas-lower: #f9efe9;
  background:
    radial-gradient(circle at 1px 1px, rgb(61 46 83 / 4%) .55px, transparent .9px) 0 0 / 5px 5px,
    radial-gradient(ellipse 70% 25rem at 8% 2rem, var(--canvas-left), transparent),
    radial-gradient(ellipse 65% 27rem at 94% 7rem, var(--canvas-right), transparent),
    radial-gradient(ellipse 58% 22rem at 52% 36rem, var(--canvas-lower), transparent),
    var(--paper);
}

body:has(.app > #familiar:not([hidden])) {
  --canvas-left: #f8e8ef;
  --canvas-right: #ebe3f7;
  --canvas-lower: #f7eadf;
}
.app { max-width: 790px; padding: clamp(22px, 5vw, 44px) clamp(16px, 4vw, 36px) 42px; }
h1 { font-size: clamp(1.85rem, 5vw, 2.75rem); letter-spacing: -.045em; }
.date { font-size: .88rem; text-transform: none; }
.date::first-letter { text-transform: uppercase; }
.prompt { margin: 30px 0 14px; font-weight: 800; }
.activity-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2vw, 16px); }
.activity {
  min-width: 0;
  min-height: 154px;
  padding: clamp(13px, 3vw, 22px);
  border-radius: 20px;
  color: var(--ink);
  box-shadow: none;
}
.activity strong { font-size: clamp(1.05rem, 2.8vw, 1.34rem); line-height: 1.18; }
.activity small, .help-card small { font-size: .9rem; color: var(--muted); opacity: 1; }
.activity-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: #ffffffad;
  color: var(--tile-icon, var(--violet));
}
.activity-icon svg { width: 24px; height: 24px; }
.activity.worship {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 24px);
  grid-column: 1 / -1;
  min-height: 142px;
  background: #f5dfeb;
}
.worship::before, .worship::after {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
}
.worship::before {
  width: clamp(110px, 26vw, 240px);
  aspect-ratio: 1;
  inset: auto -4% -67% auto;
  background: #f8e7a8;
}
.worship::after {
  width: clamp(80px, 17vw, 152px);
  aspect-ratio: 1;
  inset: -58% 13% auto auto;
  background: #edcae4;
}
.activity.worship strong {
  color: #462742;
  font-size: clamp(1.42rem, 4.5vw, 1.9rem);
}
.worship .activity-icon {
  flex: 0 0 auto;
  width: clamp(54px, 11vw, 68px);
  height: clamp(54px, 11vw, 68px);
  margin: 0;
  color: #763660;
  font-size: 1.8rem;
  font-weight: 800;
}
.bible { --tile-icon: #2e5774; background: #dcecfa; }
.routine { --tile-icon: #664b0b; background: #fff1bf; }
.family { --tile-icon: var(--violet); background: var(--lilac); }
.help-card { min-height: 72px; border: 1px solid var(--line); box-shadow: none; }
.help-card > span { flex: 0 0 auto; background: var(--lilac); color: var(--violet); }
.help-card > svg { color: var(--violet); }
.round-button { flex: 0 0 auto; }
.app-header .round-button { background: var(--lilac); color: var(--violet); }
.app-header { gap: 14px; }
.home-voice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 48px;
  padding: 9px 13px;
  border: 0;
  border-radius: 999px;
  background: var(--lilac);
  color: var(--violet);
  font-weight: 800;
  font-size: .88rem;
  cursor: pointer;
}
.home-voice svg { width: 19px; height: 19px; }
.home-instructions, .recipient-status {
  line-height: 1.55;
  color: var(--muted);
}
.home-instructions {
  margin: 12px 0 0;
  padding: 16px;
  border-radius: 16px;
  background: var(--lilac);
  color: var(--ink);
}
#routine-date { margin: 10px 0 0; }
.routine-list label {
  min-height: 64px;
  border: 2px solid var(--line);
  box-shadow: none;
  font-size: 1.02rem;
}
.routine-list label:has(input:checked) {
  border-color: #6a9d8e;
  background: var(--playing);
}
.routine-list input { flex: 0 0 auto; }
button:focus-visible { outline: 3px solid #48346a; outline-offset: 4px; }

.worship-nav {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 0;
  background: var(--paper);
}
.worship-back {
  min-height: 58px;
  padding: 10px 18px;
  gap: 12px;
  border: 1px solid #d2c2e3;
  border-radius: 999px;
  background: var(--lilac);
  color: var(--violet);
}
.back-icon {
  display: inline-grid;
  flex: 0 0 1.2em;
  place-items: center;
  width: 1.2em;
  font-size: 1.18em;
  line-height: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .back-icon { transition: transform 160ms ease-out; }
  .back:focus-visible .back-icon { transform: translateX(-3px); }
  .back:active .back-icon { transform: translateX(-4px) scale(.94); }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .back:hover .back-icon { transform: translateX(-3px); }
}
.rounded-navigation {
  --rounded-nav-padding: clamp(9px, 2vw, 14px);
  top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 24px;
  padding: var(--rounded-nav-padding);
  border: 1px solid #dcd6e9;
  border-radius: calc(26px + var(--rounded-nav-padding));
  background: linear-gradient(110deg, #fff, #f4eefb);
  box-shadow: 0 5px 16px #39274912;
}

.rounded-navigation .worship-back {
  min-height: 50px;
  gap: 8px;
  padding-inline: clamp(10px, 2.5vw, 16px);
}

.rounded-navigation h2 {
  margin: 0;
  padding-block: .14em;
  padding-inline-end: clamp(6px, 2vw, 14px);
  color: var(--ink);
  font-size: clamp(1.3rem, 4.3vw, 1.85rem);
  line-height: 1.25;
  letter-spacing: .035em;
}

.worship-heading { margin: 24px 0; }
.worship-heading .intro { margin: 10px 0 0; font-size: 1.06rem; }
@media (max-width: 480px) {
  .activity-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .activity { min-height: 138px; }
  .activity-icon { margin-bottom: 14px; }
  .activity.family { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  .activity { transition: none; }
}

.worship-list-section,
#now-playing-title,
#worship-list-title {
  scroll-margin-top: 96px;
}
#worship-list-title { margin: 26px 0 12px; font-size: 1.25rem; }
.worship-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.worship-track {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 86px;
  padding: 14px clamp(12px, 3vw, 22px);
  border: 2px solid var(--line);
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.worship-track:hover { border-color: #a893c5; }
.worship-track[aria-current] { border-color: #508b76; background: var(--playing); }
.worship-track-icon {
  flex: 0 0 48px;
  display: grid;
  place-items: center;
  height: 48px;
  border-radius: 50%;
  background: var(--lilac);
  color: var(--violet);
  font-size: 1.15rem;
}
.worship-track[aria-current] .worship-track-icon { background: var(--playing-ink); color: #fff; }
.worship-track-copy { display: grid; flex: 1; min-width: 0; gap: 5px; overflow-wrap: anywhere; }
.worship-track-copy strong { font-size: clamp(1.03rem, 3vw, 1.25rem); line-height: 1.25; }
.worship-track-copy > span { font-size: .89rem; color: var(--muted); }
.worship-track-state {
  border-radius: 999px;
  padding: 5px 9px;
  background: #cde7db;
  color: var(--playing-ink);
  font-size: .85rem;
  font-weight: 800;
}

.now-playing {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 24px #39274912;
}
.now-playing-summary {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 23px);
  padding: clamp(18px, 4vw, 28px);
  background: #dfefd9;
  color: #2e3e34;
}
.now-playing-note {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: clamp(48px, 12vw, 74px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffffad;
  color: var(--playing-ink);
  font-size: clamp(1.5rem, 5vw, 2.3rem);
}
.now-playing-copy { min-width: 0; overflow-wrap: anywhere; }
.now-playing-copy h3 { margin: 0; font-size: clamp(1.23rem, 4vw, 2rem); line-height: 1.15; }
.now-playing-copy p { margin: 7px 0 0; color: #43554b; font-size: .92rem; }
.worship-video { display: grid; min-height: 200px; aspect-ratio: 16 / 9; background: #292437; }
.worship-video iframe { display: block; width: 100%; height: 100%; min-height: 200px; border: 0; }
.now-playing-controls { display: grid; gap: 12px; padding: clamp(16px, 4vw, 24px); }
.worship-toggle {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border: 0;
  border-radius: 14px;
  padding: 12px 18px;
  background: var(--violet);
  color: #fff;
  font-size: 1.12rem;
  font-weight: 800;
  cursor: pointer;
}
.worship-status, .worship-up-next { margin: 0; line-height: 1.4; overflow-wrap: anywhere; }
.worship-toggle:disabled { opacity: .8; cursor: default; }
.worship-status { color: var(--ink); font-weight: 700; }
.worship-up-next { color: var(--muted); }
.worship-list-jump {
  justify-content: center;
  min-height: 52px;
  border: 1px solid #d2c2e3;
  background: var(--lilac);
  color: var(--violet);
}
@media (max-width: 540px) {
  .worship-track { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 8px 12px; }
  .worship-track-state { grid-column: 2; justify-self: start; }
}
.app:has(> .portal-entry:not([hidden])) {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding-block: clamp(23px, 4.5vh, 54px);
}
.app:has(> #primeiro-acesso:not([hidden])) { max-width: 1040px; }
.portal-entry, #familiar.family-entry-layout {
  --entry-surface: #fffcf9;
  --entry-peach: #fae7da;
  --entry-rose: #f3d8dc;
  --entry-outline: #ead9d7;
  --entry-control-border: #9b87aa;
  --entry-control-radius: 15px;
  --entry-control-height: 52px;
  --entry-primary: var(--violet);
  --entry-primary-hover: #422d63;
  --entry-primary-soft: #f5edf9;
}
:is(.portal-entry, #familiar.family-entry-layout) .familiar-form :is(input, select, textarea) {
  min-height: var(--entry-control-height);
  border-color: var(--entry-control-border);
  border-radius: var(--entry-control-radius);
  background-color: #fff;
  color: var(--ink);
}
:is(.portal-entry, #familiar.family-entry-layout) .familiar-form button[type="submit"] {
  min-height: var(--entry-control-height);
  border-radius: var(--entry-control-radius);
  background: var(--entry-primary);
  color: #fff;
}
:is(.portal-entry, #familiar.family-entry-layout) .familiar-form button[type="submit"]:hover:not(:disabled) {
  background: var(--entry-primary-hover);
}
:is(.portal-entry, #familiar.family-entry-layout) details > summary {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--entry-control-radius);
  color: var(--entry-primary);
  font-weight: 750;
  cursor: pointer;
}
:is(.portal-entry, #familiar.family-entry-layout) details[open] > summary {
  background-color: var(--entry-primary-soft);
}
:is(.portal-entry, #familiar.family-entry-layout) :is(.familiar-form :is(input, select, textarea, button), details > summary):focus-visible {
  outline: 3px solid var(--entry-primary);
  outline-offset: 2px;
}
.portal-entry {
  width: 100%;
  max-width: 720px;
  margin: auto;
  padding-top: 0;
}
.portal-entry h2 {
  margin-bottom: 10px;
  font-size: clamp(1.55rem, 5vw, 2.85rem);
  line-height: 1.14;
  letter-spacing: -.045em;
}
.portal-entry :is(h2, h3)[tabindex="-1"]:focus { outline: none; }
#primeiro-acesso {
  --welcome-padding: clamp(10px, 2vw, 18px);
  display: grid;
  gap: 4px;
  max-width: 940px;
  padding: var(--welcome-padding);
  border: 1px solid var(--entry-outline);
  border-radius: clamp(25px, 4vw, 38px);
  background: var(--entry-surface);
  box-shadow: 0 18px 55px #6141541c;
}
.portal-entry-hero {
  display: grid;
  align-content: center;
  gap: clamp(12px, 2.8vw, 23px);
  min-width: 0;
  padding: clamp(15px, 3.1vw, 33px);
  border-radius: clamp(18px, 3.2vw, 28px);
  background: radial-gradient(ellipse at 100% 0, var(--entry-rose), transparent 72%), linear-gradient(142deg, var(--entry-peach), #f9efe6);
}
.portal-entry-hero-copy h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 5.1vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -.048em;
}
.portal-entry-hero-copy h2 span:first-child { display: block; }
.portal-entry-art-frame {
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: clamp(3px, .55vw, 6px) solid #fff8f0;
  border-radius: clamp(14px, 2.3vw, 20px);
  background: #e9c7b6;
  box-shadow: 0 9px 27px #6c383226;
}
.portal-entry-hero-art {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.portal-entry-choice {
  display: grid;
  align-content: center;
  gap: clamp(11px, 2.1vw, 17px);
  min-width: 0;
  padding: clamp(10px, 2.9vw, 29px);
}
.portal-entry-choice h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.15rem, 3.1vw, 1.55rem);
  line-height: 1.25;
  letter-spacing: -.022em;
}
.portal-entry-actions { display: grid; gap: clamp(8px, 1.45vw, 13px); }
.portal-entry-action {
  --entry-tone: #573571;
  --entry-border: #ded0e9;
  --entry-tint: var(--entry-primary-soft);
  --entry-icon: #ead9f1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 1.6vw, 15px);
  min-height: clamp(76px, 10vw, 99px);
  padding: clamp(9px, 1.75vw, 16px);
  border: 1px solid var(--entry-border);
  border-radius: clamp(15px, 2.8vw, 21px);
  background: var(--entry-tint);
  box-shadow: 0 3px 7px #4833520a;
  color: var(--ink);
  text-decoration: none;
}
.portal-entry-action--receiver {
  --entry-tone: #225e49;
  --entry-border: #c6e2d3;
  --entry-tint: #e4f2e9;
  --entry-icon: #d2ebde;
}
.portal-entry-action-icon, .portal-entry-action-arrow {
  display: grid;
  place-items: center;
  color: var(--entry-tone);
}
.portal-entry-action-icon {
  width: clamp(40px, 6.1vw, 54px);
  aspect-ratio: 1;
  border-radius: 16px;
  background: var(--entry-icon);
}
.portal-entry-action-icon svg { width: 23px; height: 23px; }
.portal-entry-action-arrow {
  width: clamp(23px, 4.1vw, 32px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ffffff9c;
}
.portal-entry-action-arrow svg { width: 17px; height: 17px; }
.portal-entry-action-copy strong, .portal-entry-action-copy small { display: block; }
.portal-entry-action-copy { overflow-wrap: anywhere; }
.portal-entry-action-copy strong { font-size: clamp(.97rem, 2.4vw, 1.18rem); line-height: 1.25; }
.portal-entry-action-copy small { margin-top: 3px; color: var(--muted); font-size: clamp(.82rem, 1.6vw, .93rem); line-height: 1.35; }
.portal-entry-action:focus-visible, .portal-entry a.back:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}
.portal-entry-action:focus-visible, .portal-entry-action:active { border-color: var(--entry-tone); }
.portal-entry-action:active .portal-entry-action-arrow { background: #fff; }
@media (max-width: 699px) {
  #primeiro-acesso { max-width: 500px; }
}
@media (min-width: 700px) {
  #primeiro-acesso { grid-template-columns: minmax(0, .97fr) minmax(0, 1.03fr); }
  .portal-entry-art-frame { aspect-ratio: 3 / 2; }
  .portal-entry-choice { padding-inline: clamp(13px, 2.15vw, 28px); }
  .portal-entry-actions { grid-auto-rows: 1fr; }
}
@media (min-width: 700px) and (max-height: 480px) {
  .portal-entry-hero { gap: 11px; padding: 16px; }
  .portal-entry-hero-copy h2 { font-size: clamp(1.75rem, 4.4vw, 2.25rem); }
  .portal-entry-art-frame { aspect-ratio: 2 / 1; }
  .portal-entry-choice { padding-block: 10px; }
  .portal-entry-action { min-height: 76px; }
}
.portal-entry a.back {
  width: fit-content;
  min-height: 44px;
  margin-bottom: 16px;
  padding: 9px 14px;
  border: 1px solid #e0d3ed;
  border-radius: 999px;
  background: var(--lilac);
  color: var(--violet);
  font-size: .87rem;
  text-decoration: none;
}
#acesso-leitura { max-width: 540px; }
#acesso-leitura > .back { min-height: 44px; }
.portal-device-card {
  --device-inset: clamp(14px, 3.8vw, 22px);
  display: grid;
  gap: clamp(14px, 3.3vw, 22px);
  padding: clamp(8px, 1.8vw, 13px);
  border: 1px solid var(--entry-outline);
  border-radius: clamp(24px, 5vw, 34px);
  background: var(--entry-surface);
  box-shadow: 0 18px 45px #6141541c;
}
.portal-device-heading {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: clamp(15px, 3.6vw, 24px) var(--device-inset);
  border-radius: clamp(17px, 3.6vw, 23px);
  background:
    radial-gradient(ellipse at 3% 108%, #f9dfe3, transparent 62%),
    radial-gradient(ellipse at 97% -15%, #e2d2f2, transparent 59%),
    #f4eaf7;
  text-align: center;
}
.portal-device-heading h2 {
  margin: 0;
  font-size: clamp(1.35rem, 4.85vw, 2.08rem);
  text-wrap: balance;
}
.portal-device-heading .intro {
  margin: 0;
  font-size: clamp(.88rem, 2.65vw, 1rem);
  text-wrap: balance;
}
.portal-device-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(51px, 13.5vw, 70px);
  aspect-ratio: 1;
  margin-bottom: 5px;
  border: 1px solid #fff;
  border-radius: 28%;
  background: #fffbfd;
  color: var(--entry-primary);
  box-shadow: 0 5px 16px #533c761a;
}
.portal-device-icon > svg { width: 53%; height: 53%; }
.portal-device-icon-badge {
  position: absolute;
  inset: auto -5px -4px auto;
  display: grid;
  place-items: center;
  width: 47%;
  aspect-ratio: 1;
  border: 2px solid #fffbfd;
  border-radius: 50%;
  background: #d8eee4;
  color: #235a47;
}
.portal-device-icon-badge svg { width: 57%; height: 57%; }
.portal-device-content {
  display: grid;
  gap: clamp(13px, 3.5vw, 18px);
  padding-inline: var(--device-inset);
}
#receiver-access-form, #receiver-legacy-form {
  position: relative;
  gap: 9px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.portal-device-code-field {
  position: relative;
  display: flex;
  align-items: center;
}
.portal-device-code-field > svg {
  position: absolute;
  inset-inline-start: 13px;
  width: 19px;
  height: 19px;
  color: var(--entry-primary);
  pointer-events: none;
}
#receiver-device-code {
  padding-inline-start: 42px;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}
#receiver-device-code::placeholder { color: #6d647b; }
#acesso-leitura .familiar-form [role="status"] { display: block; }
.portal-device-card [role="status"]:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.portal-device-card [role="status"]:not(:empty) {
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--entry-primary-soft);
  color: var(--muted);
  font-size: .85rem;
  line-height: 1.45;
}
.portal-device-card [role="status"][data-state="error"] {
  background: #fbe9ed;
  color: #7b3049;
}
.portal-device-card button[type="submit"] {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.portal-device-card button[type="submit"] svg { width: 19px; height: 19px; flex: none; }
.portal-device-hint {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 13px;
  background: var(--entry-primary-soft);
  color: var(--muted);
  font-size: .79rem;
  line-height: 1.45;
}
.portal-device-hint strong { color: var(--entry-primary); }
.portal-device-hint p { margin: 2px 0 0; }
.portal-device-hint > svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--entry-primary);
}
.portal-device-legacy {
  margin-inline: var(--device-inset);
  padding-top: 4px;
  border-top: 1px solid var(--entry-outline);
}
.portal-entry .portal-device-legacy > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-inline: 8px;
  font-size: .87rem;
  list-style: none;
}
.portal-device-legacy summary::-webkit-details-marker { display: none; }
.portal-device-legacy summary > svg { width: 17px; height: 17px; flex: none; }
.portal-device-legacy summary > svg:last-child { margin-inline-start: auto; }
.portal-device-legacy[open] summary > svg:last-child { transform: rotate(180deg); }
#receiver-legacy-form { margin-block: 12px 8px; }
@media (hover: hover) and (pointer: fine) {
  .portal-device-legacy summary:hover { background: var(--entry-primary-soft); }
}
@media (prefers-reduced-motion: no-preference) {
  .portal-device-legacy summary > svg:last-child { transition: transform 180ms ease; }
}
@media (prefers-reduced-motion: no-preference) {
  .portal-entry-action { transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease; }
  .portal-entry-action:active { transform: scale(.985); }
  #primeiro-acesso:not([hidden]) .portal-entry-hero,
  #primeiro-acesso:not([hidden]) .portal-entry-actions,
  #acesso-leitura:not([hidden]) .portal-device-card { animation: screen-enter 240ms ease-out both; }
  #primeiro-acesso:not([hidden]) .portal-entry-actions { animation-delay: 50ms; }
}
@media (hover: hover) and (pointer: fine) {
  .portal-entry-action:hover { border-color: var(--entry-tone); box-shadow: 0 12px 25px #48335219; }
  .portal-entry-action:hover .portal-entry-action-arrow { background: #fff; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .portal-entry-action:hover:not(:active) { transform: translateY(-2px); }
}
@media (max-width: 480px) {
  #familia .rounded-navigation {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px;
    padding: 8px 10px;
    border-radius: 28px;
  }
  #familia .rounded-navigation .worship-back {
    min-height: 44px;
    gap: 4px;
    padding-inline: 9px;
    font-size: .84rem;
  }
  #familia .rounded-navigation h2 {
    padding-inline-end: 4px;
    font-size: clamp(1.05rem, 4.25vw, 1.3rem);
    letter-spacing: .015em;
    text-align: end;
    overflow-wrap: break-word;
  }
  #familia .family-feedback { padding-inline: 16px; }
}
