/* v18.12.2.1 – real Android/mobile hardening */
html.lh-app-booting #appMain{visibility:hidden}
#v18943BootSplash{display:none}
html.lh-app-booting #v18943BootSplash{position:fixed;inset:0;z-index:999999;display:grid;place-items:center;background:linear-gradient(180deg,#f7f8ff,#eef2ff)}
.v18943-boot-card{display:grid;justify-items:center;gap:12px;padding:22px;color:#1b2850;font-weight:850;text-align:center}
.v18943-boot-card img{width:84px;height:84px;border-radius:24px;box-shadow:0 14px 36px rgba(56,48,125,.18)}
.v18943-boot-card small{color:#66728d;font-weight:700}

/* Never let long mobile labels escape their cards. */
.screen *,#parentScreen *,#adminScreen *{min-width:0}
.v1670-geometry-skill strong,.v16901-skill-card strong,.v16901-category-details li span,.v16901-category-state,.v16901-category-state em,.v16901-category-medal,
.v121-recommendation-chip,.v1840-privacy-grid label,.v13190-privacy-body,.v13190-export-options label,.v17041-admin,.v1711-panel{overflow-wrap:anywhere;word-break:normal}
.v16901-category-details li{display:grid;grid-template-columns:minmax(0,1fr) minmax(88px,auto);align-items:start}
.v16901-category-state{justify-items:end;max-width:100%}.v16901-category-state em,.v16901-category-medal{white-space:normal;text-align:right}

/* Family child switcher: explicit horizontal scroller on phones. */
.v1814-parent-child-list{overflow-x:auto!important;overscroll-behavior-x:contain;scroll-snap-type:x proximity;padding:3px 2px 10px!important;scrollbar-width:auto!important}
.v1814-parent-child-list::-webkit-scrollbar{height:8px}.v1814-parent-child-list::-webkit-scrollbar-thumb{background:#c7c9dd;border-radius:999px}.v1814-parent-child-list::-webkit-scrollbar-track{background:#eef0f6;border-radius:999px}
.v1814-parent-child-chip{scroll-snap-align:start;flex:0 0 min(72vw,230px);min-width:0!important;max-width:none!important}

/* Privacy layout: info button + checkbox never overlap, tooltip stays closeable. */
.v1840-privacy-grid label{grid-template-columns:minmax(0,1fr) auto!important;grid-template-areas:'label check' 'label state';align-items:start!important}
.v1840-privacy-grid .v18645-privacy-label{grid-area:label;display:grid!important;grid-template-columns:minmax(0,1fr) 22px;align-items:start;gap:7px;width:100%}
.v1840-privacy-grid input{grid-area:check;justify-self:end}.v1840-privacy-grid b{grid-area:state;justify-self:end;text-align:right}
.v1840-privacy-grid .v18645-privacy-info{justify-self:end}
.v13190-privacy-body,.v13190-privacy-note,.v13191-sensitive-info,.v13190-export-options,.v1840-parent-privacy{max-width:100%;width:100%}
.v13190-privacy-note,.v13191-sensitive-info{align-items:start}

/* Admin cards use available width and compact 2-column metrics on phone. */
.v17041-head,.v1711-head{min-width:0}.v17041-head>div,.v1711-head>div{min-width:0;flex:1}.v17041-head p,.v1711-head p{max-width:none!important;overflow-wrap:anywhere}
.v17041-badge,.v1711-badge{max-width:48%;white-space:normal!important;text-align:center;height:auto!important;min-height:26px;line-height:1.2!important;padding-block:6px!important}

@media(max-width:620px){
 body{padding:8px}
 .app{max-width:100%;overflow-x:clip}
 .card{padding:14px;border-radius:18px}
 .topbar{gap:8px;padding:10px!important}
 .v1600-brand{width:100%}
 /* Keep summary dashboards compact: two columns instead of tall one-column stacks. */
 .v125-stats-overview,.v12180-comparison-grid,.v12180-parent-comparison-grid,.v12230-insights-grid,.v1861-weekly-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .v125-stat-card,.v12180-comparison-card,.v12230-insight-card,.v12230-parent-insight{padding:10px!important;gap:8px!important}
 .v12180-comparison-card:last-child:nth-child(odd),.v12230-insight-card:last-child:nth-child(odd){grid-column:1/-1}
 /* Family profile detail: name full width, Sessions + Accuracy side by side, Latest activity full width. */
 .v1860-family-row{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
 .v1860-family-row>div:first-child,.v1860-family-row>div:nth-child(4){grid-column:1/-1}
 .v1860-family-row>div{padding:3px 0}
 .v1860-family-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .v1860-family-metrics>div:last-child:nth-child(odd){grid-column:1/-1}
 /* Offline Edvardas: all 3 figures fit in a single row. */
 .v1873-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
 .v1873-grid>div{padding:9px 6px!important;text-align:center}.v1873-grid strong{font-size:.95rem}.v1873-grid span{font-size:.68rem!important}
 .v1873-head,.v1870-head,.v17041-head,.v1711-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:start!important}
 .v1873-pill,.v1870-status{max-width:110px;white-space:normal;text-align:center;line-height:1.15}
 /* Environment/readiness/admin metrics: at least two columns. */
 .v17041-grid,.v1711-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 /* Privacy/export stays inside the outer card. */
 .v13190-privacy-details{overflow:hidden}.v13190-privacy-body{padding-inline:10px!important}.v13190-export-options{grid-template-columns:1fr!important}.v13190-export-options label{padding:10px!important}
 .v1840-parent-privacy{padding:10px!important}.v1840-privacy-grid{grid-template-columns:1fr!important}.v1840-privacy-grid label{padding:9px!important}
 /* Long labels should wrap before leaving skill/stat cards. */
 .v1670-geometry-skills{grid-template-columns:repeat(2,minmax(0,1fr))!important}.v1670-geometry-skill{padding:10px!important;min-height:0!important}
 .v16901-category-details li{grid-template-columns:minmax(0,1fr) minmax(76px,38%);gap:7px!important;padding:8px!important}
}
@media(max-width:390px){
 .v1670-geometry-skills{grid-template-columns:1fr!important}
 .v125-stats-overview,.v12180-comparison-grid,.v12180-parent-comparison-grid,.v12230-insights-grid{grid-template-columns:1fr!important}
 .v17041-grid,.v1711-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}

@media(max-width:620px){
 .v161611-readiness-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto;align-items:start!important;gap:8px!important}
 .v161611-readiness-badge{max-width:118px;white-space:normal!important;text-align:center;line-height:1.15;justify-content:center;padding:6px 8px!important}
 .v161611-readiness-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 .v161611-capability{display:grid!important;gap:4px!important;align-content:start;padding:8px!important}.v161611-capability span{text-align:left}
}

/* N5 Android density refinements: keep operational/admin summary cards compact. */
@media (max-width: 620px){
  .v1713-grid,
  .v16158-diagnostics-metrics,
  .v1751-core-grid,
  .v1752-session-grid,
  .v1753-nav-grid,
  .v1755-gate-grid,
  .v18002-scenarios-grid,
  .v18003-integrity-grid,
  .v18004-final-grid,
  .v1871-runtime-grid,
  .v1871-subgrid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .v1713-head,.v1755-gate-head,.v18002-scenarios-head,.v18003-integrity-head,.v18004-final-head{
    min-width:0;flex-wrap:wrap;
  }
  .v1713-badge,.v1755-gate-state,.v18004-final-state{max-width:100%;white-space:normal;text-align:center}
  .v16158-diagnostics-metric,.v1751-core-item,.v1752-session-item,.v1753-nav-item,.v1755-gate-item,
  .v18002-scenario,.v18003-integrity-item,.v18004-final-item,.v1871-runtime-grid>div,.v1871-subgrid>div{
    min-width:0;overflow-wrap:anywhere;
  }
}

/* Privacy help must sit above mobile actions and remain dismissible/scrollable. */
.v18645-privacy-tooltip{
  z-index:300000!important;
  max-height:min(46vh,360px);
  overflow:auto;
  overscroll-behavior:contain;
}

/* v18.12.2.1 – Android layout regression fixes */
:root{--v18943-mobile-layout:1}

/* Never split a Lithuanian word just to fill a narrow skill card. */
.v16901-skill-card strong,
.v1670-geometry-skill strong,
.v16901-category-details strong{
  overflow-wrap:normal!important;
  word-break:normal!important;
  hyphens:none!important;
}

@media(max-width:620px){
  /* Medal/skill dashboard cards: keep complete words together. */
  #v121MedalGrid .v121-medal-card{padding:10px 7px!important;min-width:0!important}
  #v121MedalGrid .v121-medal-card>strong{font-size:.86rem!important;line-height:1.2!important;overflow-wrap:normal!important;word-break:normal!important;hyphens:none!important}

  /* Skill titles: use the width better before creating a one-letter line. */
  .v16901-skill-card{padding:11px!important}
  .v16901-skill-head{gap:6px!important}
  .v16901-skill-head strong{font-size:.92rem!important;line-height:1.18!important}
  .v16901-skill-head>span,.v16901-skill-head>em{font-size:.72rem!important;max-width:42%;white-space:normal!important;text-align:right}

  /* Weekly comparison: period labels must fit inside their own halves. */
  .v12180-comparison-card{padding:9px!important}
  .v12180-period-values{gap:5px!important}
  .v12180-period-values>div{padding:7px 6px!important;min-width:0!important}
  .v12180-period-values small{font-size:.64rem!important;line-height:1.15!important;overflow-wrap:normal!important;word-break:normal!important}
  .v12180-metric-title{gap:6px!important}.v12180-metric-title>span{font-size:1.25rem!important}

  /* Detailed progress summary: reserve a real square for the chevron. */
  .v18832-parent-detailed-progress>.v16901-section-head{display:grid!important;grid-template-columns:minmax(0,1fr) 38px!important;gap:10px!important;align-items:start!important}
  .v18832-parent-detailed-progress>.v16901-section-head>div{min-width:0!important}
  .v18832-parent-details-chevron{
    display:grid!important;place-items:center!important;
    width:38px!important;min-width:38px!important;max-width:38px!important;height:38px!important;
    padding:0!important;writing-mode:horizontal-tb!important;overflow-wrap:normal!important;word-break:normal!important;
    border-radius:14px!important;font-size:18px!important;line-height:1!important
  }

  /* Recommendation title + long viewed child name: wrap as two rows instead of overlapping. */
  .v18835-section-head{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:7px!important}
  .v18835-section-head h3{min-width:0!important;overflow-wrap:normal!important}
  .v18835-viewing-badge{justify-self:start!important;align-items:flex-start!important;max-width:100%!important;width:auto!important;min-width:0!important}
  .v18835-viewing-badge strong{max-width:min(100%,76vw)!important;overflow-wrap:anywhere!important;white-space:normal!important}

  /* Privacy header: policy badge gets its own line and can use the full card width. */
  .v1840-privacy-head{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
  .v1840-privacy-head>div{min-width:0!important}
  .v1840-privacy-head p{max-width:none!important;width:100%!important;line-height:1.45!important}
  .v1841-scope-badge{justify-self:start!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.2!important;text-align:left!important}

  /* Privacy controls: label gets the usable width; info and checkbox stay separated. */
  .v1840-privacy-grid label{
    grid-template-columns:minmax(0,1fr) 24px!important;
    grid-template-areas:'label check' 'state state'!important;
    column-gap:8px!important;row-gap:5px!important;overflow:visible!important;
  }
  .v1840-privacy-grid .v18645-privacy-label{
    grid-area:label!important;display:grid!important;grid-template-columns:minmax(0,1fr) 24px!important;
    gap:6px!important;align-items:start!important;width:100%!important;min-width:0!important
  }
  .v1840-privacy-grid .v18645-privacy-info{justify-self:end!important}
  .v1840-privacy-grid input{grid-area:check!important;align-self:start!important;justify-self:end!important}
  .v1840-privacy-grid b{grid-area:state!important;justify-self:end!important}
  .v18645-privacy-row{overflow:visible!important}

  /* Info sheet sits above the fixed Diagnostics/Theory bar. */
  .v18645-privacy-tooltip{
    position:fixed!important;left:14px!important;right:14px!important;bottom:96px!important;
    width:auto!important;max-width:none!important;max-height:min(42vh,320px)!important;
    transform:translateY(8px)!important;z-index:700000!important
  }
  .v18645-privacy-info[data-open='1'] .v18645-privacy-tooltip,
  .v18645-privacy-info:focus-visible .v18645-privacy-tooltip{transform:translateY(0)!important}

  /* Restore visible grouping around import and privacy-action history. */
  #v13190PrivacyDetails .v13192-import-section,
  #v13190PrivacyDetails .v131950-history-section{
    margin-top:12px!important;padding:13px!important;
    border:1px solid #dfe5ef!important;border-radius:14px!important;background:#fff!important;
  }
  #v13190PrivacyDetails .v13192-import-section{border-top:1px solid #dfe5ef!important}
  #v13190PrivacyDetails .v131950-history-section{border-top:1px solid #dfe5ef!important}
  .v131950-history-heading{align-items:flex-start!important;flex-wrap:wrap!important}
  #v131950ClearHistoryBtn{width:100%!important}

  /* Status badges: on narrow phones, never squeeze text into a vertical strip. */
  .v17041-head,.v1711-head,.v161611-readiness-head{
    display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important
  }
  .v17041-badge,.v1711-badge,.v161611-readiness-badge,
  .v1713-badge,.v1755-gate-state,.v18004-final-state{
    justify-self:start!important;width:auto!important;max-width:100%!important;min-width:max-content!important;
    white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;
    padding:6px 10px!important;line-height:1.15!important;text-align:center!important
  }
  .v17041-head>div,.v1711-head>div,.v161611-readiness-head>div{width:100%!important;min-width:0!important}

  /* Environment card badge follows the same no-squeeze rule. */
  .v161611-readiness-head p{max-width:none!important;width:100%!important}
}

@media(max-width:390px){
  .v16901-skill-head strong{font-size:.88rem!important}
  .v12180-period-values small{font-size:.61rem!important}
}
