/* Shared family hub; individual app documents keep their own context. */
:root { --family-background: url('/assets/family-day-night.webp'); }
body { background: #f9f8f1; }
body::before { background-image: linear-gradient(180deg, #fffdf7bd 0%, #fffdf778 44%, #fffdf714 100%), var(--family-background); background-position: center; background-size: cover; background-repeat: no-repeat; }
body[data-app='pasakos'] { --ink: #362c57; --accent: #5a437e; --muted: #746983; --mint: #eee4f7; }
body:not([data-app='family'])::before { background-image: linear-gradient(180deg, #fffdf7e6, #fffdf7c9), var(--family-background); }
.site-header, .site-footer { width: min(1056px, calc(100% - 48px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-header { min-height: 110px; border: 0; }
.family-brand { color: #163c4b; text-decoration: none; }
.choose-link { font-size: 13px; font-weight: 700; color: #746983; }
.choose-link { min-height: 44px; display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.family-home, .app-home { width: min(840px, calc(100% - 40px)); margin: 0 auto; }
.family-home { padding-bottom: 45px; }
.family-intro { text-align: center; padding: 55px 0 32px; }
.family-intro h1 { font-family: Nunito, sans-serif; font-size: clamp(34px, 4.6vw, 54px); font-weight: 900; color: #163c4b; letter-spacing: -1.6px; margin: 0 0 20px; line-height: 1.15; text-wrap: balance; }
.family-choice { font-size: clamp(22px, 3vw, 30px); font-weight: 700; color: #163c4b; margin: 0; line-height: 1.3; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.app-card { display: block; position: relative; aspect-ratio: 1; overflow: hidden; padding: 0; background: transparent; border-radius: 26%; transition: transform .25s, box-shadow .25s; }
.app-card:hover { transform: translateY(-5px); box-shadow: 0 18px 35px #51446d13; }
.app-card:active { transform: scale(.98); }
/* Both source logos include outer padding; fill the tile with the artwork. */
.app-card > img { position: absolute; inset: -10%; display: block; width: 120%; height: 120%; max-width: none; object-fit: contain; }
.info-card > svg { width: 20px; height: 20px; flex-shrink: 0; }
.site-footer { min-height: 88px; padding: 24px 0; border: 0; background: transparent; font-size: 12px; color: #655772; text-align: left; }
.site-footer a { color: inherit; }
.family-footer { min-height: 68px; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 24px; padding: 10px 24px; border-radius: 24px; background: #f9f8f1; font-size: 12px; color: #163c4b; }
.family-footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.family-footer nav > a { display: inline-flex; align-items: center; min-height: 44px; text-underline-offset: 4px; }
.app-switcher { width: min(580px, calc(100% - 40px)); margin: 27px auto 19px; padding: 5px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; border-radius: 22px; background: #e8e4eb; }
.app-option { display: flex; align-items: center; justify-content: center; gap: 11px; min-height: 62px; padding: 8px 12px; border-radius: 17px; color: #72667f; font-size: 14px; font-weight: 700; text-decoration: none; transition: background .2s, color .2s; }
.app-option img { width: 40px; height: 40px; object-fit: contain; border-radius: 10px; }
.app-option:hover { background: #ffffff77; }
.app-option[aria-current='true'] { background: #fffdf9; color: #362c57; box-shadow: 0 3px 12px #40305209; }
.document-nav { max-width: 780px; width: calc(100% - 32px); display: flex; justify-content: center; flex-wrap: wrap; gap: 7px; margin: 0 auto 15px; }
.document-nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 7px 15px; border-radius: 14px; font-size: 13px; color: var(--muted); text-decoration: none; font-weight: 700; }
.document-nav a:hover, .document-nav a[aria-current='page'] { background: var(--mint); color: var(--accent); }
.app-home { padding: 25px 0 52px; }
.app-intro { display: grid; grid-template-columns: 108px minmax(0, 1fr); align-items: center; gap: 18px 25px; margin: 0 0 30px; padding: 20px 5px; }
.app-intro > img { width: 108px; height: 108px; object-fit: contain; border-radius: 25px; }
.app-intro h1 { font-size: clamp(29px, 4vw, 39px); margin: 0 0 8px; letter-spacing: -1px; }
.app-intro p:last-child { font-size: 15px; color: var(--muted); margin: 0; }
.store-buttons { grid-column: 2; display: flex; flex-wrap: wrap; gap: 12px; }
.store-button { display: inline-flex; align-items: center; justify-content: flex-start; gap: 12px; min-width: 172px; min-height: 62px; padding: 11px 18px; border: 1px solid transparent; border-radius: 16px; background: #183442; color: #fff; font-family: Nunito, sans-serif; text-align: left; text-decoration: none; line-height: 1.15; transition: transform .2s, box-shadow .2s; }
.store-button > svg { width: 28px; height: 28px; flex-shrink: 0; }
.store-button > span { display: grid; gap: 4px; }
.store-button small { font-size: 11px; font-weight: 400; }
.store-button strong { font-size: 18px; font-weight: 700; white-space: nowrap; }
.store-button[href]:hover { transform: translateY(-2px); box-shadow: 0 6px 15px #18344224; }
.store-button:disabled { cursor: default; background: #43545e; border-color: #ffffff55; border-style: dashed; }
body[data-app='pasakos'] .store-button { background: #49365e; }
body[data-app='pasakos'] .store-button:disabled { background: #62546e; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.info-card { display: flex; align-items: center; gap: 14px; padding: 23px 20px; border-radius: 23px; border: 2px solid white; background: #fffdf9; color: var(--ink); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.info-card:hover { transform: translateY(-3px); box-shadow: 0 9px 24px #40305209; }
.info-card > div { flex: 1; min-width: 0; }
.info-card h2 { font-size: 17px; margin: 0 0 5px; }
.info-card p { font-size: 12px; color: var(--muted); margin: 0; line-height: 1.6; }
.info-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 14px; background: var(--mint); color: var(--accent); flex-shrink: 0; }
.info-icon svg { width: 23px; height: 23px; }
.document { width: min(820px, calc(100% - 32px)); margin: 30px auto 42px; background: #fffdf9; border: 2px solid white; border-radius: 28px; padding: 36px; }
.document h1 { font-size: clamp(29px, 5vw, 42px); margin: 20px 0 15px; letter-spacing: -1px; }
.document h2 { font-size: 21px; margin-top: 30px; }
.document p, .document li { color: var(--muted); }
.document .back { font-size: 13px; font-weight: 700; }
.date { font-size: 12px; color: var(--muted); }
.notice { padding: 17px 20px; border-radius: 17px; background: #f3edf8; color: #746383; font-size: 13px; line-height: 1.65; }
.contact-box { background: var(--mint); padding: 18px 22px; border-radius: 20px; }
.contact-box h2 { margin-top: 0; }
body[data-app='pasakos'] .doc, body[data-app='pasakos'] .document { width: min(820px, calc(100% - 32px)); }
@media (min-width: 901px) { .doc { width: min(820px, calc(100% - 48px)); } }
@media (max-width: 600px) {
  :root { --family-background: url('/assets/family-day-night-mobile.webp'); }
  .site-header, .site-footer { width: calc(100% - 36px); }
  .site-header { min-height: 91px; gap: 12px; }
  .choose-link { font-size: 11px; }
  .family-intro { padding: 37px 0 25px; }
  .family-intro h1 { font-size: clamp(27px, 7vw, 36px); letter-spacing: -1px; }
  .family-home { width: calc(100% - 28px); }
  .app-grid { grid-template-columns: 1fr; width: min(100%, 320px); gap: 24px; margin-inline: auto; }
  .site-footer { flex-wrap: wrap; gap: 8px 16px; min-height: 80px; font-size: 10px; }
  .family-footer { justify-content: center; gap: 0; margin-bottom: 18px; padding: 12px 18px 8px; border-radius: 20px; font-size: 11px; text-align: center; }
  .family-footer > span { width: 100%; }
  .family-footer nav { justify-content: center; gap: 0 14px; }
  .app-option { gap: 7px; padding: 8px 6px; font-size: 12px; }
  .app-option img { width: 35px; height: 35px; }
  .document-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .document-nav a { padding: 6px 10px; font-size: 11px; }
  .app-intro { grid-template-columns: 85px minmax(0, 1fr); gap: 16px; padding: 8px 0; }
  .app-intro > img { width: 85px; height: 85px; border-radius: 19px; }
  .app-intro h1 { font-size: 27px; }
  .app-intro p:last-child { font-size: 13px; }
  .store-buttons { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .store-button { width: 100%; min-width: 0; gap: 9px; padding: 11px 12px; }
  .store-button strong { font-size: 16px; }
  .info-grid { grid-template-columns: 1fr; gap: 11px; }
  .info-card { padding: 18px; }
  .document { padding: 25px 23px; }
  body[data-app='pasakos'] .doc { margin: 25px auto; }
}
@media (max-width: 350px) {
  .store-buttons { grid-template-columns: 1fr; }
  .app-option { font-size: 10px; gap: 5px; }
  .app-option img { width: 30px; height: 30px; }
  .document-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .app-card, .app-option, .info-card, .store-button { transition: none; } .app-card:hover, .app-card:active, .info-card:hover, .store-button[href]:hover { transform: none; } }

.profile-update { margin: 0 0 22px; padding: clamp(18px, 3vw, 26px); border: 2px solid #fff; border-radius: 24px; background: #e5f2df; overflow-wrap: anywhere; }
.profile-update h2 { font-size: clamp(20px, 3vw, 25px); margin: 0 0 10px; color: #245d4e; }
.profile-update p { color: #42656a; margin: 0 0 10px; line-height: 1.7; }
.profile-update a { display: inline-flex; align-items: center; min-height: 44px; color: #245d4e; font-weight: 700; }
