
:root{
  --bg:#f4f3ef;--card:#ffffff;--ink:#1f2328;--muted:#6d737a;
  --line:#dedfdf;--accent:#173b63;--accent2:#edf2f7;--linegreen:#06c755;
  --radius:16px;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic","Noto Sans JP","Segoe UI",sans-serif;
  line-height:1.75;
  -webkit-font-smoothing:antialiased;
}
button,input,a{font:inherit}
.shell{max-width:720px;margin:0 auto;padding:14px 14px 40px}

/* HOME */
.homeHeader{text-align:center;padding:10px 2px 14px}
.eyebrow{letter-spacing:.08em;font-size:.74rem;font-weight:800;color:var(--accent);margin:0}
h1{font-size:clamp(1.75rem,6.5vw,2.35rem);line-height:1.2;margin:.18rem 0 .35rem;letter-spacing:-.02em}
h2{font-size:clamp(1.25rem,5vw,1.65rem);line-height:1.45;margin:.25rem 0 1rem}
.dateDisplay{font-size:1.05rem;font-weight:800;color:var(--muted);margin-top:.45rem}
.dateNav{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin:2px 0 8px}
.dateBtn{
  border:1px solid var(--line);background:var(--card);color:var(--accent);
  border-radius:14px;padding:10px 8px;font-size:.92rem;font-weight:800;cursor:pointer
}
.todayBtn{background:var(--accent2)}
.datePicker{
  display:block;width:100%;border:0;background:transparent;color:var(--muted);
  text-align:center;padding:4px 8px 12px;font-size:.86rem
}
.homeMenu{display:grid;gap:10px;margin-top:4px}
.homeCard{
  width:100%;min-height:76px;border:1px solid var(--line);background:var(--card);color:var(--ink);
  border-radius:var(--radius);padding:14px 16px;
  display:grid;grid-template-columns:42px 1fr auto;gap:12px;align-items:center;
  text-align:left;cursor:pointer;box-shadow:none
}
.homeCard:active{transform:scale(.995)}
.icon{
  width:42px;height:42px;border-radius:12px;background:var(--accent2);color:var(--accent);
  display:grid;place-items:center;font-size:1.05rem;font-weight:900
}
.homeCardText small{display:block;color:var(--muted);font-size:.72rem;font-weight:700;letter-spacing:.03em}
.homeCardText strong{display:block;font-size:1.1rem;line-height:1.35;margin-top:2px;font-weight:800}
.arrow{font-size:2rem;line-height:1;color:#9b9288}

/* READER */
.readerHeader{
  position:sticky;top:0;z-index:20;background:rgba(247,243,234,.97);
  backdrop-filter:blur(8px);border-bottom:1px solid var(--line);
  margin:-16px -14px 8px;padding:10px 14px 8px;display:block
}
.readerHeaderText{text-align:center;min-width:0}
.miniBrand{font-size:.72rem;color:var(--muted);font-weight:800;letter-spacing:.03em}
.readerTitle{font-size:1.08rem;font-weight:900;line-height:1.3;margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.readerActions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.topActions{position:sticky;top:52px;z-index:19;background:var(--bg);padding:8px 0 12px}
.bottomActions{margin-top:14px;padding:2px 0 4px}
.menuAction,.lineAction{
  width:100%;min-height:54px;border-radius:16px;padding:13px 10px;
  font-size:1.05rem;font-weight:900;cursor:pointer
}
.menuAction{border:1px solid var(--line);background:#fff;color:var(--accent)}
.lineAction{border:0;background:var(--linegreen);color:#fff}

.contentPage{
  background:var(--card);border:1px solid var(--line);border-radius:16px;
  padding:20px 18px 24px;box-shadow:none
}
.meta,.status{color:var(--muted);font-size:.92rem}
.reading{
  font-family:"Hiragino Mincho ProN","Yu Mincho","Noto Serif JP",serif;
  font-size:clamp(1.1rem,4.5vw,1.28rem);line-height:2.02;white-space:pre-wrap;letter-spacing:.01em
}
.empty{
  color:var(--muted);
  font-family:-apple-system,BlinkMacSystemFont,"Hiragino Sans","Yu Gothic","Noto Sans JP",sans-serif
}
.audioHelp{font-weight:900;background:var(--accent2);border-radius:14px;padding:12px 14px;margin:8px 0 16px}
audio{display:block;width:100%;margin:10px 0}

/* sub menu */
.subMenu{display:grid;gap:12px;margin-top:8px}
.subCard{
  width:100%;border:1px solid var(--line);background:#fff;border-radius:17px;
  display:grid;grid-template-columns:42px 1fr auto;gap:12px;align-items:center;
  padding:16px;text-align:left;color:var(--ink);cursor:pointer
}
.subCard span{
  width:42px;height:42px;border-radius:50%;background:var(--accent2);color:var(--accent);
  display:grid;place-items:center;font-weight:900
}
.subCard strong{font-size:1.05rem}
.subCard b{font-size:1.8rem;color:#9b9288}

/* official prayer */
.leadText{font-size:1.03rem;line-height:1.8}
.officialButton{
  display:block;text-decoration:none;text-align:center;background:#274d7d;color:#fff;
  border-radius:16px;padding:15px 14px;font-size:1.05rem;font-weight:900;margin:18px 0
}
.smallNote{font-size:.9rem;color:var(--muted)}

@media(max-width:480px){
  .shell{padding-left:12px;padding-right:12px}
  .readerHeader{margin-left:-12px;margin-right:-12px}
  .homeCard{padding:15px}
  .homeCardText strong{font-size:1.05rem}
  .readerActions{gap:8px}
  .menuAction,.lineAction{min-height:52px;font-size:1rem;padding:12px 8px}
}


/* Risorse bibliche secondarie: separate dai contenuti quotidiani */
.studySection{
  margin-top:26px;
  padding-top:6px;
}
.studyDivider{
  height:1px;
  background:var(--line);
  margin:0 6px 18px;
}
.studyTitle{
  font-size:1rem;
  line-height:1.5;
  color:var(--muted);
  font-weight:900;
  margin:0 4px 12px;
}
.studyCard{
  display:grid;
  grid-template-columns:42px 1fr auto;
  gap:12px;
  align-items:center;
  text-decoration:none;
  color:var(--ink);
  background:var(--card);
  border:1px solid var(--line);
  border-radius:14px;
  padding:13px 14px;
  margin-top:9px;
}
.studyIcon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:13px;
  background:#f2eee6;
  font-size:1.08rem;
}
.studyText strong{
  display:block;
  font-size:.98rem;
  line-height:1.35;
}
.studyText small{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:.75rem;
  line-height:1.5;
}
.studyArrow{
  color:#9b9288;
  font-size:1.15rem;
  font-weight:900;
}


/* Liturgical day on home */
.liturgicalDay{
  margin-top:5px;
  font-size:1.08rem;
  line-height:1.45;
  font-weight:800;
  color:var(--accent);
  letter-spacing:.01em;
}


/* Le due letture del ciclo biennale, una dopo l'altra */
.readingBlock{margin:0}
.readingLabel{
  display:inline-block;
  margin:0 0 6px;
  padding:5px 10px;
  border-radius:999px;
  background:var(--accent2);
  color:var(--accent);
  font-size:.82rem;
  font-weight:900;
}
.readingBlock h3{
  font-size:clamp(1.15rem,4.5vw,1.45rem);
  line-height:1.5;
  margin:.25rem 0 1rem;
}
.readingDivider{
  height:1px;
  background:var(--line);
  margin:30px 0 26px;
}


/* 朝の祈り：一続きのページ */
.laudsPage{padding-bottom:28px}
.laudsSection{margin:0 0 26px}
.laudsHeading{
  margin:0 0 10px;
  padding-bottom:7px;
  border-bottom:1px solid var(--line);
  color:var(--accent);
  font-size:1.08rem;
  line-height:1.45;
  font-weight:900;
}
.laudsNote{
  margin:-3px 0 10px;
  color:var(--muted);
  font-size:.9rem;
  line-height:1.6;
}
.laudsText{
  font-family:"Hiragino Mincho ProN","Yu Mincho","Noto Serif JP",serif;
  font-size:clamp(1.06rem,4.3vw,1.22rem);
  line-height:1.95;
  white-space:pre-wrap;
  letter-spacing:.01em;
}
.laudsInserted{
  margin:34px -4px;
  padding:22px 14px 24px;
  border-top:2px solid var(--accent);
  border-bottom:2px solid var(--accent);
  background:var(--accent2);
  border-radius:14px;
}
.laudsInsertedTitle{
  margin:0 0 20px;
  text-align:center;
  color:var(--accent);
  font-size:1.15rem;
  font-weight:900;
}
.laudsInserted .readingBlock{background:#fff;border:1px solid var(--line);border-radius:13px;padding:16px}
.laudsInserted .readingDivider{margin:18px 0}


/* Singolo pulsante blu per 朝の祈り, senza emoji né sottotitoli. */
.prayerSpotlight{margin:12px 0 15px}
.prayerSpotlightButton{
  display:block;width:100%;min-height:79px;padding:16px;
  border:1px solid #173b63;border-radius:16px;
  background:#173b63;color:#fff;
  font-size:clamp(1.2rem,5.2vw,1.42rem);
  line-height:1.4;font-weight:900;text-align:center;cursor:pointer
}
.prayerSpotlightButton:active{transform:scale(.995)}
/* Le altre ore: pulsanti reali, sopra la Bibbia e il Dizionario Dufour. */
.homeSectionTitle{font-size:1rem;color:var(--accent);font-weight:900;margin:4px 2px 12px}
.hoursPanel{margin:23px 0 24px;padding:16px;background:#fff;border:1px solid var(--line);border-radius:16px}
.hourNames{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 10px}
.hourLink{
  display:flex;align-items:center;justify-content:space-between;gap:7px;
  min-height:57px;padding:11px 10px;border:1px solid #dce4ec;
  border-radius:11px;color:#25496f;background:#f0f4f9;
  font-size:.88rem;line-height:1.4;font-weight:900;text-decoration:none
}
.hourLink span{color:#50749b;font-size:1.05rem}
.hourLink:focus-visible{outline:3px solid #4d9ddd;outline-offset:2px}
.hoursGo{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:12px 14px;margin-top:12px;border-radius:12px;border:1px solid #cfdeeb;background:#ecf2f8;color:#173b63;text-decoration:none;font-size:.9rem;font-weight:900}
.hoursNote{font-size:.76rem;line-height:1.6;color:var(--muted);margin:9px 2px}
@media(max-width:375px){.hourNames{grid-template-columns:1fr}}

/* Source access for Sunday: clear distinction from the adapted prayer outline. */
.laudsSourceNotice{
  background:#f0f5fb;border:1px solid #cbdbea;border-radius:14px;
  padding:14px 15px;margin:2px 0 24px;color:#274560
}
.laudsSourceNotice p{font-size:.9rem;line-height:1.7;margin:0 0 11px}
.laudsSourceNotice a{
  display:block;padding:12px;text-align:center;background:#173b63;color:white;
  border-radius:11px;text-decoration:none;font-weight:900;line-height:1.5
}

/* Explicitly separate Sunday Mass reading references from the Office of Readings. */
.massReadings{margin:0 0 18px;background:#f3f6f9;border:1px solid #dce5ed;border-radius:13px;padding:12px 14px}
.massReadings h3{font-size:.94rem;color:var(--accent);margin:0 0 4px}
.massReadings p{font-size:.87rem;line-height:1.7;color:#4b5c6c;margin:0;white-space:pre-line}

/* Refined mobile-first presentation. The approved plain blue Lauds card is unchanged. */
:root{--bg:#f6f4f0;--card:#fffefa;--ink:#182838;--muted:#63717d;--line:#e1e4e5;--accent:#173b63;--accent2:#eaf0f6;--reader-scale:1}
body{background:var(--bg)}
.shell{max-width:690px;padding:14px 15px max(40px,env(safe-area-inset-bottom))}
.homeHeader{padding:19px 8px 18px;position:relative}
.homeHeader:after{content:"";display:block;width:54px;height:3px;border-radius:8px;background:#c7ad75;margin:15px auto 0}
.eyebrow{font-size:.7rem;color:#62778b;letter-spacing:.17em}
.homeHeader h1{font-family:"Hiragino Mincho ProN","Yu Mincho",serif;font-weight:800;letter-spacing:.02em;font-size:clamp(1.84rem,7vw,2.4rem);color:#153a62}
.dateDisplay{display:block;color:#60748a;font-size:.9rem;font-weight:700;margin:.75rem 0 0}
.liturgicalDay{font-size:1.06rem;margin-top:4px}
.dateNav{gap:8px;margin:4px 0}
.dateBtn{min-height:45px;background:#fffdf9;border-color:#dce1e5;border-radius:12px}
.todayBtn{background:#eaf1f9}
.datePickerLabel{display:block;text-align:center;font-size:.72rem;color:#768493;font-weight:800;margin:10px 0 0}
.datePicker{display:block;max-width:235px;margin:0 auto 4px;padding:4px 8px;font-size:.88rem;border-radius:10px;min-height:38px}
.prayerSpotlight{margin:17px 0 14px}
.prayerSpotlightButton{background:#173b63;border:1px solid #173b63;min-height:78px;box-shadow:0 6px 18px rgba(19,59,100,.12);font-size:1.43rem;border-radius:16px}
.homeMenu{gap:9px}
.homeCard{position:relative;overflow:hidden;border:1px solid #e2e6e7;background:#fffdf9;border-radius:15px;min-height:69px;padding:13px 15px;grid-template-columns:39px minmax(0,1fr) 18px;gap:12px;box-shadow:0 2px 8px rgba(16,39,59,.025)}
.homeCard:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#c3cad4}
.homeCard--office:before{background:#738ba7}
.homeCard--gospel:before{background:#beaa79}
.homeCard--commentary:before{background:#6687b5}
.homeCard--audio:before{background:#5e9584}
.homeCard--church:before{background:#b29577}
.homeCard .icon{height:39px;width:39px;font-size:1.04rem;background:#f1f4f5}
.homeCard--audio .icon{color:#326b5b;background:#e8f3ee}
.homeCard--commentary .icon{color:#315c89;background:#eaf1fa}
.homeCard--church .icon{color:#87683b;background:#faf1e4}
.homeCardText small{font-size:.73rem;line-height:1.25;letter-spacing:.02em}
.homeCardText strong{font-size:1.02rem;line-height:1.42;margin-top:3px}
.arrow{font-size:1.45rem;color:#80909b}
.hoursPanel{margin:24px 0 19px;padding:16px 15px 18px;background:#fffefa;box-shadow:0 1px 5px rgba(20,55,89,.025)}
.hourNames{gap:9px}
.hourLink{background:#f1f5f9;border-color:#dae4ee;font-size:.87rem}
.hoursGo{background:#edf2f8}
.studySection{margin-top:18px;padding-top:5px}
.studyDivider{margin-bottom:16px}
.studyCard{background:#fffefa;box-shadow:0 1px 4px rgba(16,39,59,.02)}
.homeShare{margin:23px 0 4px}
.shareToday{width:100%;padding:13px 15px;background:transparent;border:1px solid #cdd9e4;border-radius:12px;color:#1d507a;font-weight:850;font-size:.92rem;display:flex;align-items:center;justify-content:center;gap:12px;cursor:pointer}
.shareToday span{font-size:1.1rem}
.readerHeader{background:rgba(246,244,240,.96)}
.readerTitle{color:#173b63;font-size:1.03rem}
.contentPage{border-color:#e2e6e7;background:#fffefa;border-radius:17px;padding:23px 18px 28px}
.contentPage h2{color:#153a62}
.laudsText,.reading{font-size:calc(1.12rem * var(--reader-scale));line-height:2.05;overflow-wrap:anywhere}
.laudsHeading{padding-top:4px;margin-bottom:12px}
.laudsSection{margin:0 0 30px}
.laudsInserted{background:#f3f5f8;border-color:#547295}
.laudsInsertedTitle{color:#173b63}
.fontTools{display:flex;gap:7px;align-items:center;justify-content:flex-end;padding:5px 0 10px;flex-wrap:wrap}
.fontTools span{font-size:.72rem;color:var(--muted);margin-right:auto;font-weight:750}
.fontTools button{border:1px solid #d8e0e7;color:#285477;border-radius:10px;background:white;font-size:.82rem;font-weight:800;min-width:48px;min-height:38px;padding:6px 8px;cursor:pointer}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #4784ba;outline-offset:3px}
@media(max-width:440px){
 .shell{padding:12px 12px max(35px,env(safe-area-inset-bottom))}
 .homeHeader h1{font-size:1.93rem}
 .homeCard{padding:12px 12px;min-height:66px}
 .homeCardText strong{font-size:1rem}
 .readerActions{gap:8px}
 .fontTools span{font-size:.69rem}
 .contentPage{padding:20px 15px 25px}
 .laudsText,.reading{line-height:1.97}
}
@media(prefers-reduced-motion:no-preference){
 .homeCard,.prayerSpotlightButton,.hourLink,.dateBtn{transition:box-shadow .2s ease,transform .12s ease}
 .homeCard:active,.prayerSpotlightButton:active{transform:scale(.992)}
}
