/* One back affordance for every utility, including nested readers. */
body main button.app-back{display:inline-flex!important;align-items:center;gap:8px;min-height:44px!important;width:auto;max-width:100%;padding:8px 0!important;margin:0 0 12px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:var(--ui-accent)!important;font:inherit!important;font-size:14px!important;font-weight:500!important;line-height:1.6!important;text-align:left}
body main button.app-back::before{content:'';width:8px;height:8px;flex:0 0 8px;margin-left:3px;border-left:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg)}
body main button.app-back>svg{display:none}
body main button.app-back[hidden]{display:none!important}
body main button.app-back:focus-visible{outline:2px solid var(--ui-accent);outline-offset:3px}

/* Festivals: compact filters and a chronological month list. */
body #festivals{max-width:800px;margin-inline:auto}
body #festivals .festival-filters{grid-template-columns:minmax(90px,.65fr) minmax(0,1fr);gap:12px;padding:16px;background:var(--ui-surface);border-radius:12px}
body #festivals .festival-filters label{min-width:0}
body #festivals .festival-filters :is(input,select){min-width:0;max-width:100%;min-height:48px;border:1px solid var(--ui-line);border-radius:10px;background:var(--ui-page);color:var(--ui-text);font-size:16px}
body #festivals .festival-search-label{grid-column:1/-1}
body #festivals #festivalCoverage{font-size:13px;line-height:1.75;margin:12px 0;color:var(--ui-muted)}
body #festivals #festivalResultCount{margin:16px 0 8px;font-size:13px;color:var(--ui-muted)}
body #festivals .festival-month-heading{font-size:18px;line-height:1.6;font-weight:600;margin:24px 0 6px;color:var(--ui-accent)}
body #festivals button.festival-result{display:grid;grid-template-columns:88px minmax(0,1fr);align-items:start;gap:4px 14px;min-height:64px;padding:14px 0;margin:0;border:0;border-bottom:1px solid var(--ui-line);border-radius:0;background:transparent;box-shadow:none}
body #festivals .festival-result .festival-date{grid-column:1;grid-row:1/3;font-size:13px;line-height:1.7;color:var(--ui-muted)}
body #festivals .festival-result strong{font-size:16px;line-height:1.7;font-weight:500;color:var(--ui-text);overflow-wrap:anywhere}
body #festivals button.festival-result>small{grid-column:2;font-size:12px;line-height:1.6;color:var(--ui-accent)}
body #festivals article.festival-result{padding:16px;margin-top:20px;background:var(--ui-surface);border:0;border-radius:12px}
body #festivals article.festival-result p{margin:0;font-size:14px;line-height:1.75}
@media(hover:hover){body #festivals button.festival-result:hover,body #pooja .pooja-card:hover{background:var(--ui-surface)}}

/* Smaller library chrome; user-selected prayer font size stays unchanged. */
body #mantras .mantra-heading h1,body #mantras .mantra-reader-heading h1{font-size:22px;line-height:1.6;margin:0}
body #mantras .mantra-heading,body #mantras .mantra-reader-heading{margin-bottom:14px}
body #mantras .mantra-heading p{font-size:13px;margin-top:4px}
body #mantras .mantra-categories{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
body #mantras .mantra-category{padding:10px 8px;gap:4px;border-radius:10px;min-width:0}
body #mantras .mantra-category .artwork-icon{width:44px;height:42px}
body #mantras .mantra-category strong{font-size:14px;font-weight:500;line-height:1.65}
body #mantras .mantra-category small{font-size:12px;line-height:1.5}
body #mantras .mantra-tabs{gap:8px;margin-bottom:16px}
body #mantras .mantra-tabs button{padding:8px 14px;min-height:44px;border-radius:10px}
body #mantras .mantra-row{padding:6px 0}
body #mantras .mantra-open{font-size:16px;min-height:48px}
@media(min-width:640px){body #mantras .mantra-categories{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Preparation: scan names and material counts, then open a checklist. */
body #pooja .pooja-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:auto;gap:0;margin-top:16px}
body #pooja .pooja-card{display:grid;grid-template-columns:minmax(0,1fr) 10px;align-items:center;justify-content:initial;gap:2px 14px;width:100%;height:auto;min-height:72px;padding:12px 0;text-align:left;border:0;border-bottom:1px solid var(--ui-line);border-radius:0;background:transparent;overflow:visible}
body #pooja .pooja-card-title{grid-column:1;font-size:16px;line-height:1.7;max-height:none;overflow:visible}
body #pooja .pooja-card-count{grid-column:1;font-size:13px;line-height:1.6;color:var(--ui-muted)}
body #pooja .pooja-card::after{content:'';grid-column:2;grid-row:1/3;width:6px;height:6px;border-top:1.5px solid var(--ui-accent);border-right:1.5px solid var(--ui-accent);transform:rotate(45deg)}
body #pooja .pooja-item{padding:14px 0;gap:8px 16px}
body #pooja .pooja-item-name{font-size:16px;line-height:1.75}
body #pooja .pooja-share{display:block;width:100%;margin:16px 0 20px}
body #pooja>label{display:grid;gap:6px;font-size:14px;color:var(--ui-muted)}
