

/* CDA-D6 · Hacia la fidelidad editorial de los mockups aprobados.
   Imágenes y texto permanecen en capas distintas: las fotografías/ilustraciones
   son decorativas; los contenidos religiosos y las fechas proceden de content.js. */
html[data-theme]{
  --p6-plum:var(--d4-primary);
  --p6-paper:var(--d4-paper);
  --p6-gold:#bc894a;
  --p6-pink:#f2dade;
  --p6-line:#e8d5bf;
  --p6-shadow:0 5px 18px rgba(84,46,54,.10);
  --p6-heading:Georgia,"Times New Roman",serif;
}
html[data-theme] body{
  background:radial-gradient(ellipse at 47% 0%,#fffaef 0,var(--d4-bg) 62%);
  color:var(--d4-ink);font-size:16px;
}
html[data-theme] .app-shell{max-width:1120px}
html[data-theme] .topbar{
  display:flex;position:relative;min-height:120px;gap:10px;justify-content:center;
  background:transparent;color:var(--p6-plum);box-shadow:none;
  border-radius:0;border-bottom:0;margin-inline:0;padding:27px 0 20px;
}
html[data-theme] .topbar .brand{
  display:flex;flex-direction:column;gap:4px;text-align:center;
  font-family:var(--p6-heading);color:var(--p6-plum);max-width:calc(100% - 130px)
}
html[data-theme] .topbar .brand-mark{
  display:block;width:auto;height:auto;color:var(--p6-gold);
  font-size:27px;line-height:1;background:transparent;margin:0 auto;
}
html[data-theme] .topbar .brand-text{
  color:var(--p6-plum);font:normal clamp(23px,3vw,34px)/1.12 var(--p6-heading);
  display:block;letter-spacing:-.035em;
}
html[data-theme] .topbar .brand-text small{
  display:block;color:#81572e;margin-top:9px;
  font:600 10px/1.5 system-ui,sans-serif;letter-spacing:2px
}
html[data-theme] .topbar-actions{
  position:absolute;right:0;top:24px;height:50px;
}
html[data-theme] .topbar .edition{display:none}
html[data-theme] .appearance-trigger{
  width:48px;height:48px;min-width:48px;padding:10px;border-radius:50%;
  color:var(--p6-plum);background:var(--p6-paper);
  border:1px solid var(--p6-line);box-shadow:var(--p6-shadow);
}
html[data-theme] .appearance-trigger span{display:none}
html[data-theme] .appearance-trigger:hover{background:var(--d4-wash)}
html[data-theme] .appearance-trigger:focus-visible{outline:3px solid var(--d4-accent);outline-offset:3px}
html[data-theme] .hero.hero-d6{
  display:grid;grid-template-columns:minmax(0,1.3fr) minmax(200px,.7fr);
  position:relative;align-items:center;min-height:270px;
  margin:5px 0 16px;border:0;border-radius:0;
  background:transparent;box-shadow:none;overflow:hidden;
}
html[data-theme] .hero.hero-d6::after{display:none}
html[data-theme] .hero.hero-d6 .hero-copy{padding:18px 0 18px 8px;z-index:2}
html[data-theme] .hero.hero-d6 .eyebrow{
  font-size:10px;letter-spacing:2px;color:#98683a;margin-bottom:12px
}
html[data-theme] .hero.hero-d6 h1{
  max-width:590px;font:normal clamp(29px,4.5vw,46px)/1.16 var(--p6-heading);
  letter-spacing:-.035em;color:var(--p6-plum);text-wrap:balance;
}
html[data-theme] .hero.hero-d6 h1 em{color:var(--p6-plum);font-style:italic}
html[data-theme] .hero.hero-d6 .hero-sub{
  color:var(--d4-ink);font:normal clamp(15px,1.8vw,19px)/1.65 var(--p6-heading);
  max-width:570px;margin:14px 0 20px;
}
html[data-theme] .hero.hero-d6 .hero-art{
  height:260px;min-height:260px;border:0;background:transparent;
  position:relative;overflow:hidden;
}
html[data-theme] .hero.hero-d6 .hero-illustration{
  width:100%;height:100%;object-fit:cover;object-position:60% center;
  -webkit-mask-image:linear-gradient(90deg,transparent 0,#000 22%);
  mask-image:linear-gradient(90deg,transparent 0,#000 22%);
}
html[data-theme] .hero.hero-d6 .hero-art-glow{
  position:absolute;inset:0;background:radial-gradient(circle at 62% 52%,#fff4d68c,transparent 75%);
  z-index:1;pointer-events:none;mix-blend-mode:screen
}
html[data-theme] .hero.hero-d6 .hero-actions{gap:10px}
html[data-theme] .hero.hero-d6 .hero-actions .btn{
  min-height:45px;font:700 12px system-ui,sans-serif;border-radius:999px;
}
html[data-theme] .status-strip{
  margin:0 0 23px;border:1px solid var(--p6-line);border-radius:20px;
  background:var(--p6-paper);box-shadow:var(--p6-shadow);
  padding:13px 8px;
}
html[data-theme] .status-strip .tiny-label{color:var(--d4-muted);font-size:9px}
html[data-theme] .status-strip strong{
  font:normal clamp(12px,1.6vw,16px)/1.3 var(--p6-heading);
  color:var(--p6-plum);text-align:center;
}
html[data-theme] .status-divider{background:var(--p6-line)}
html[data-theme] .content-block{margin:0 0 27px}
html[data-theme] .content-block .section-title-row{margin:0 0 11px}
html[data-theme] .content-block .section-title-row .eyebrow{
  margin:0 0 5px;color:#96622f;font-size:10px
}
html[data-theme] .content-block .section-title-row h2{
  margin:0;font:normal clamp(23px,3vw,33px)/1.2 var(--p6-heading);
  color:var(--p6-plum);letter-spacing:-.035em
}
html[data-theme] .section-symbol{color:var(--p6-gold)}
html[data-theme] .featured-card{
  position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) auto;
  align-items:end;gap:20px;min-height:235px;padding:25px 28px;
  color:#fff;background:linear-gradient(110deg,#431127 0%,#6e1749 46%,#542034 100%);
  border:1px solid #723d49;border-radius:27px;overflow:hidden;
  box-shadow:0 13px 26px #5b294126;
}
html[data-theme] .featured-card::before{
  content:"";position:absolute;inset:0;background:
  linear-gradient(90deg,rgba(41,4,27,.94) 0%,rgba(71,12,43,.91) 47%,rgba(61,22,45,.08) 100%),
  url("./assets/hero-clasica.svg") right center / 59% auto no-repeat;
  z-index:-1;
}
html[data-theme] .featured-card .featured-tag{color:#f6d591;font-size:11px}
html[data-theme] .featured-card h3{
  margin:7px 0 10px;color:#fff;font:normal clamp(23px,3.5vw,37px)/1.18 var(--p6-heading);
  max-width:410px;text-wrap:balance;
}
html[data-theme] .featured-card p{
  color:#fff6e9;font:normal 14px/1.65 var(--p6-heading);max-width:500px;
  display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;
}
html[data-theme] .featured-card .btn{
  white-space:normal;color:#502543;background:#f8d99a;
  border-radius:999px;min-height:48px;box-shadow:0 5px 15px #21081e44
}
html[data-theme] .featured-card .btn:hover{background:#ffedba}
html[data-theme] .featured-card .btn:disabled{opacity:.78}
html[data-theme] .journey-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
html[data-theme] .journey-grid .journey-card{
  display:flex;align-items:center;text-align:center;
  padding:0 12px 17px;min-width:0;min-height:205px;
  border:1px solid var(--p6-line);border-radius:22px;
  background:linear-gradient(145deg,var(--p6-paper),var(--d4-wash));
  box-shadow:var(--p6-shadow);transition:transform .16s ease;
}
html[data-theme] .journey-grid .journey-card:hover{transform:translateY(-2px)}
html[data-theme] .journey-illustration-art{
  height:90px;width:calc(100% + 24px);margin:0 -12px 9px;
  border-radius:20px 20px 0 0;overflow:hidden;
}
html[data-theme] .journey-illustration-art img{height:100%;width:100%;object-fit:cover}
html[data-theme] .journey-grid .journey-card strong{
  color:var(--p6-plum);font:normal clamp(18px,2.5vw,27px)/1.15 var(--p6-heading);
  margin:6px 0 8px;
}
html[data-theme] .journey-grid .journey-card>span:nth-last-child(2){
  font:normal 12px/1.4 system-ui,sans-serif;text-align:center;color:var(--d4-ink)
}
html[data-theme] .journey-grid .journey-card .journey-tag{
  margin:0;border-radius:999px;background:#faeddf;color:#74472f;font-size:9px
}
html[data-theme] .journey-grid .journey-card .journey-link{
  padding:8px 0 0;color:var(--p6-plum);font-size:11px
}
html[data-theme] .journey-card-personal{
  justify-content:center
}
html[data-theme] .journey-personal-symbol{display:grid;place-items:center;height:90px;color:var(--p6-plum)}
html[data-theme] .journey-personal-symbol svg{width:50px;height:50px;stroke-width:1.25px}
html[data-theme] .theme-feature-card{border-radius:22px;box-shadow:var(--p6-shadow);background:var(--p6-paper)}
html[data-theme] .note-card{background:var(--d4-wash);border:1px solid var(--p6-line);color:var(--d4-ink)}
/* Calendar: two visible paths, grouped weeks and one large reachable row per day. */
html[data-theme] .page-intro{
  max-width:850px;margin:25px auto 14px;text-align:center;
}
html[data-theme] .page-intro h1{
  font:normal clamp(34px,5vw,48px)/1.18 var(--p6-heading);color:var(--p6-plum);
}
html[data-theme] .page-intro p{color:var(--d4-ink)}
html[data-theme] .calendar-tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:16px auto 20px;max-width:680px}
html[data-theme] .calendar-tab{
  background:var(--p6-paper);color:var(--p6-plum);border:1px solid var(--p6-line);
  border-radius:999px;min-height:50px;font:normal 17px var(--p6-heading);
  box-shadow:0 3px 10px #4424380a;
}
html[data-theme] .calendar-tab.active{background:var(--p6-plum);color:#fff}
html[data-theme] .calendar-tab:focus-visible{outline:3px solid var(--d4-accent);outline-offset:3px}
html[data-theme] .calendar-art,html[data-theme] .guadalupe-art{
  height:190px;border-radius:23px;margin:12px 0 17px;overflow:hidden;
}
html[data-theme] .calendar-art img,html[data-theme] .guadalupe-art img{object-position:center 48%}
html[data-theme] .progress-card{
  margin:13px 0 11px;background:var(--p6-paper);border:1px solid var(--p6-line);
  border-radius:22px;box-shadow:var(--p6-shadow);padding:16px 20px;
}
html[data-theme] .progress-card strong{color:var(--p6-plum);font-family:var(--p6-heading)}
html[data-theme] .reader-discovery{font-size:12px;line-height:1.5;margin:10px 0}
html[data-theme] .day-grid{
  display:grid;grid-template-columns:1fr;gap:7px;margin:17px 0 36px;
}
html[data-theme] .week-heading{
  grid-column:1/-1;background:#f0dfe2;color:var(--p6-plum);
  margin:14px 0 1px;padding:10px 18px;border-radius:18px;
  font:600 17px/1.28 var(--p6-heading);
}
html[data-theme] .day-card{
  display:grid;grid-template-columns:62px minmax(0,1fr) 28px;grid-template-rows:auto auto;
  gap:1px 13px;align-items:center;min-height:82px;padding:13px 17px;
  background:var(--p6-paper);border:1px solid var(--p6-line);border-radius:18px;
  box-shadow:0 3px 10px rgba(72,45,38,.06);color:var(--d4-ink);
}
html[data-theme] .day-card .day-top{display:none}
html[data-theme] .day-card .day-number{
  grid-column:1;grid-row:1/3;align-self:center;justify-self:center;
  display:grid;place-items:center;font:normal 28px/1 var(--p6-heading);
  width:50px;height:50px;border-radius:50%;background:#f1e0cc;color:#784a32;
}
html[data-theme] .day-card.completed .day-number{background:#6d9355;color:white;font-size:29px}
html[data-theme] .day-card strong{
  grid-column:2;grid-row:1;margin:0;
  color:var(--p6-plum);font:700 clamp(15px,2.2vw,19px)/1.25 var(--p6-heading);
}
html[data-theme] .day-card .day-caption{
  grid-column:2;grid-row:2;white-space:normal;overflow-wrap:anywhere;
  font:normal 14px/1.4 var(--p6-heading);color:var(--d4-ink);
}
html[data-theme] .day-card .day-bottom{
  grid-column:3;grid-row:1/3;justify-self:end;align-self:center;
  font:normal 37px/1 system-ui,sans-serif;color:var(--p6-plum);
}
html[data-theme] .day-card:hover{border-color:var(--d4-accent);transform:none}
html[data-theme] .day-card:focus-visible{outline:3px solid var(--d4-accent)}
html[data-theme] .day-card[aria-label*="disponible a partir"] .day-number{opacity:.78}
html[data-theme] .guadalupe-banner{border-radius:19px;background:var(--d4-wash)}
/* Reading: warm paper, prominent editorial title, accessible controls. */
html[data-theme] #detail-dialog{
  width:min(95vw,720px);max-width:720px;max-height:min(92dvh,930px);
  background:var(--p6-paper);border:1px solid var(--p6-line);border-radius:26px;
  box-shadow:0 22px 90px rgba(36,11,30,.25);color:var(--d4-ink);
}
html[data-theme] #detail-dialog .dialog-head{
  position:sticky;top:0;z-index:5;background:var(--p6-paper);
  border-bottom:1px solid var(--p6-line);padding:12px 18px;
}
html[data-theme] #detail-dialog .dialog-head .eyebrow{color:var(--p6-plum)}
html[data-theme] #detail-dialog .detail-art{
  height:185px;border-radius:0 0 24px 24px;overflow:hidden;margin:0 0 12px;
}
html[data-theme] #detail-dialog .detail-art img{height:100%;width:100%;object-fit:cover}
html[data-theme] #detail-dialog .reader-toolbar{
  justify-content:end;gap:9px;margin:13px 0;
}
html[data-theme] #detail-dialog .reader-toolbar .btn{
  background:#fff8ea;color:var(--p6-plum);border-color:#ddc49d;
  border-radius:14px;min-height:44px;min-width:46px
}
html[data-theme] #detail-dialog .detail-title{
  font:normal calc(2.25rem * var(--reader-scale))/1.13 var(--p6-heading);
  color:var(--p6-plum);margin:18px 0 24px;text-align:center;
}
html[data-theme] #detail-dialog .detail-section h3{
  font:600 calc(1.1rem * var(--reader-scale))/1.35 var(--p6-heading);
  color:var(--p6-plum);margin:20px 0 9px;
}
html[data-theme] #detail-dialog .detail-section p{
  font:normal calc(1.06rem * var(--reader-scale))/1.7 var(--p6-heading);
  color:var(--d4-ink);margin:0 0 12px;
}
html[data-theme] #detail-dialog .detail-section.prayer,
html[data-theme] #detail-dialog .meditation-card{
  background:var(--d4-wash);border-radius:20px;padding:17px 20px;
}
html[data-theme] #detail-dialog .dialog-actions{gap:9px;flex-wrap:wrap}
/* My camino: privacy-forward, editorial and clean rather than a settings page. */
html[data-theme] #view-camino .page-intro{max-width:680px}
html[data-theme] #view-camino .page-intro p:last-child{
  font:italic 17px/1.65 var(--p6-heading);color:var(--d4-ink);
}
html[data-theme] .camino-decorative{
  height:115px;max-width:660px;margin:5px auto 12px;position:relative;overflow:hidden;
  -webkit-mask-image:linear-gradient(90deg,transparent 0%,#000 45%,transparent 100%);
  mask-image:linear-gradient(90deg,transparent 0%,#000 45%,transparent 100%);
}
html[data-theme] .camino-decorative img{width:100%;height:100%;object-fit:cover;object-position:center 30%}
html[data-theme] .my-stats{border:1px solid var(--p6-line);background:var(--p6-paper);border-radius:23px;box-shadow:var(--p6-shadow)}
html[data-theme] .intention-card{
  background:var(--p6-paper);border:1px solid var(--p6-line);
  border-radius:24px;box-shadow:var(--p6-shadow);
}
html[data-theme] .intention-card .intention-form{border-radius:19px;background:#fffaf3}
html[data-theme] .intention-card h2,html[data-theme] .intention-card h3{font-family:var(--p6-heading);color:var(--p6-plum)}
html[data-theme] .intention-card .btn-primary{border-radius:14px}
html[data-theme] .intention-item{border-radius:16px;border-color:var(--p6-line);background:#fffdf8}
html[data-theme] .privacy-card{background:var(--d4-wash);border-color:var(--p6-line)}
/* Four destinations remain visible; look like a native tab bar. */
html[data-theme] .bottom-nav{
  position:sticky;bottom:0;z-index:8;
  display:flex;gap:5px;justify-content:space-around;
  width:100%;padding:9px 10px max(9px,env(safe-area-inset-bottom));
  background:var(--p6-paper);border:1px solid var(--p6-line);
  border-radius:22px 22px 0 0;box-shadow:0 -4px 20px rgba(75,40,54,.07);
}
html[data-theme] .nav-button{
  display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:4px;
  min-width:0;min-height:57px;padding:7px 3px;border-radius:16px;
  color:var(--p6-plum);background:transparent;
  font:normal 12px/1.15 system-ui,sans-serif;
}
html[data-theme] .nav-button.active{
  background:#f3e1e8;color:var(--p6-plum);font-weight:700;
}
html[data-theme] .nav-icon{
  display:grid;place-items:center;font-size:0;width:27px;height:27px;min-height:27px;
}
html[data-theme] .nav-icon svg{width:25px;height:25px;display:block}
/* Respect the 4 distinct themes, but share fidelity/layout architecture. */
html[data-theme="serena"]{
  --p6-plum:#1b3b5d;--p6-pink:#e5eaf5;--p6-line:#d4dfec;
}
html[data-theme="serena"] .week-heading{background:#e5eaf6}
html[data-theme="serena"] .featured-card{background:#1c405e;border-color:#58768a}
html[data-theme="serena"] .featured-card::before{
 background:linear-gradient(90deg,rgba(23,46,78,.91) 0%,rgba(28,48,78,.88) 48%,rgba(30,60,91,.08) 100%),
 url("./assets/hero-serena.svg") right center / 59% auto no-repeat;
}
html[data-theme="serena"] .nav-button.active{background:#e5eaf6}
html[data-theme="serena"] .journey-grid .journey-card strong{font-family:system-ui,sans-serif}
html[data-theme="mexicana"] .week-heading{background:#eddfd6}
html[data-theme="mexicana"] .featured-card::before{
 background:linear-gradient(90deg,rgba(20,55,44,.95) 0%,rgba(26,75,65,.89) 46%,rgba(26,75,65,.07) 100%),
 url("./assets/hero-mexicana.svg") right center / 53% auto no-repeat;
}
html[data-theme="mexicana"] .featured-card{background:#1f5545;border-color:#699381}
html[data-theme="clasica"] .featured-card::before{
 background:linear-gradient(90deg,rgba(54,19,49,.95),rgba(80,35,62,.72),rgba(80,35,62,.09)),
 url("./assets/hero-clasica.svg") right center / 59% auto no-repeat;
}
/* Avoid clipping and horizontal overflow on phones as narrow as 320px. */
@media(max-width:740px){
  html[data-theme] .app-shell{padding:0 15px}
  html[data-theme] .topbar{min-height:112px;padding:18px 0 18px}
  html[data-theme] .topbar .brand{max-width:calc(100% - 90px)}
  html[data-theme] .topbar .brand-text{font-size:clamp(22px,5vw,29px)}
  html[data-theme] .topbar .brand-text small{font-size:8px;letter-spacing:1.6px}
  html[data-theme] .topbar-actions{top:20px;right:0}
  html[data-theme] .hero.hero-d6{
    min-height:200px;display:grid;grid-template-columns:minmax(0,1.25fr) minmax(90px,.65fr);
  }
  html[data-theme] .hero.hero-d6 .hero-copy{padding:12px 0}
  html[data-theme] .hero.hero-d6 h1{font-size:clamp(24px,6.2vw,35px)}
  html[data-theme] .hero.hero-d6 .hero-sub{font-size:clamp(13px,3.1vw,17px)}
  html[data-theme] .hero.hero-d6 .hero-art{height:205px;min-height:205px}
  html[data-theme] .hero.hero-d6 .hero-actions{display:none}
  html[data-theme] .featured-card{grid-template-columns:1fr;min-height:220px;gap:14px;padding:20px}
  html[data-theme] .featured-card::before{background-size:66% auto;background-position:right 45%}
  html[data-theme] .featured-card>div{position:relative;max-width:74%;z-index:1}
  html[data-theme] .featured-card .btn{justify-self:start;position:relative;z-index:1;font-size:12px}
  html[data-theme] .featured-card h3{font-size:clamp(23px,5.5vw,31px)}
  html[data-theme] .featured-card p{font-size:13px;line-height:1.45}
  html[data-theme] .journey-grid{gap:9px}
  html[data-theme] .journey-grid .journey-card{min-height:185px;padding:0 7px 12px}
  html[data-theme] .journey-illustration-art{margin:0 -7px 8px;width:calc(100% + 14px);height:76px}
  html[data-theme] .journey-grid .journey-card strong{font-size:clamp(15px,3.6vw,21px)}
  html[data-theme] .journey-grid .journey-card>span:nth-last-child(2){font-size:10px}
  html[data-theme] .journey-grid .journey-card .journey-tag{font-size:8px;letter-spacing:0}
  html[data-theme] .journey-grid .journey-card .journey-link{font-size:9px}
  html[data-theme] .journey-personal-symbol{height:76px}
  html[data-theme] .journey-personal-symbol svg{width:41px;height:41px}
  html[data-theme] .calendar-art,html[data-theme] .guadalupe-art{height:142px}
  html[data-theme] .page-intro{margin:17px auto 8px}
  html[data-theme] .page-intro h1{font-size:clamp(29px,7vw,39px)}
  html[data-theme] .day-card{min-height:76px;padding:11px;grid-template-columns:51px minmax(0,1fr) 24px;gap:1px 9px}
  html[data-theme] .day-card .day-number{height:44px;width:44px}
  html[data-theme] .day-card strong{font-size:15px}
  html[data-theme] .day-card .day-caption{font-size:13px}
  html[data-theme] .day-card .day-bottom{font-size:28px}
  html[data-theme] #detail-dialog{width:min(100vw - 10px,720px);max-width:calc(100% - 10px)}
  html[data-theme] #detail-dialog .detail-art{height:140px}
  html[data-theme] .bottom-nav{padding:7px 5px max(7px,env(safe-area-inset-bottom));gap:2px}
  html[data-theme] .nav-button{font-size:11px;min-height:56px}
}
@media(max-width:365px){
  html[data-theme] .topbar .brand-text{font-size:20px}
  html[data-theme] .hero.hero-d6 h1{font-size:23px}
  html[data-theme] .hero.hero-d6 .eyebrow{font-size:8px}
  html[data-theme] .hero.hero-d6 .hero-sub{font-size:13px;line-height:1.45}
  html[data-theme] .hero.hero-d6 .hero-art{height:182px;min-height:182px}
  html[data-theme] .journey-grid .journey-card>span:nth-last-child(2){font-size:9px}
  html[data-theme] .journey-grid .journey-card strong{font-size:14px}
  html[data-theme] .day-card{grid-template-columns:43px minmax(0,1fr) 16px;gap:1px 7px;padding:10px 8px}
  html[data-theme] .day-card .day-number{height:38px;width:38px;font-size:23px}
  html[data-theme] .day-card strong{font-size:13px}
  html[data-theme] .day-card .day-caption{font-size:12px}
  html[data-theme] .nav-button{font-size:10px}
}
@media(prefers-reduced-motion:reduce){
 html[data-theme] .journey-grid .journey-card{transition:none;transform:none}
 html[data-theme] .progress-fill{transition:none}
}


/* D10-BW: el recorte de vela D6 queda fuera del runtime.
   Se restauran las reglas de fondo originales, ya aprobadas, por cada tema. */


/* CDA-D8 P0: full-width four-column bottom navigation on Android/Chrome/PWA.
   Overrides legacy left:50%+translateX layout that was visibly cut on Samsung.
   Do not use overflow clipping on the page itself: preserve zoom 200% and dialogs. */
html[data-theme] .bottom-nav{
  position:fixed;
  left:0;right:0;bottom:0;
  inset-inline:0;
  transform:none;
  margin-inline:auto;
  width:100%;
  max-width:600px;
  box-sizing:border-box;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:stretch;
  gap:3px;
  padding:8px max(8px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  background:var(--d4-paper,#fffaf2);
  border:1px solid var(--d4-border,#e9d8c6);
  border-bottom:0;
  border-radius:18px 18px 0 0;
  z-index:40;
}
html[data-theme] .bottom-nav .nav-button{
  display:flex;
  flex-direction:column;
  min-width:0;
  width:100%;
  max-width:100%;
  min-height:60px;
  padding:5px 1px 6px;
  box-sizing:border-box;
  align-items:center;justify-content:center;
  gap:4px;
  white-space:normal;
  overflow-wrap:normal;
  text-align:center;
  font-size:clamp(10px,2.7vw,12px);
  border-radius:15px;
}
html[data-theme] .bottom-nav .nav-button .nav-icon{
  display:flex;align-items:center;justify-content:center;
  width:25px;height:26px;
  flex:none;
}
html[data-theme] .bottom-nav .nav-button .nav-icon svg{
  width:24px;height:24px;
  display:block;
}
html[data-theme] .bottom-nav .nav-button span:last-child{
  display:block;
  min-width:0;
  max-width:100%;
}
@media(max-width:420px){
  html[data-theme] .bottom-nav{border-radius:16px 16px 0 0;}
}
