@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&family=Noto+Sans+Coptic&display=swap');

/* Safe local aliases for traditional Unicode Coptic fonts when installed by the user */
@font-face {
font-family: 'Antinoou Local';
src: local('Antinoou');
font-display: swap;
}

@font-face {
font-family: 'New Athena Unicode Local';
src: local('New Athena Unicode');
font-display: swap;
}

@font-face {
font-family: 'Arial Coptic Local';
src: url('../fonts/ArialCoptic.ttf') format('truetype'), local('ArialCoptic'), local('Arial Coptic');
font-display: swap;
}

:root{
--coptic-font-modern: 'Noto Sans Coptic', 'Segoe UI Historic', 'Gentium Plus', 'Noto Sans', Arial, sans-serif;
--coptic-font-traditional: 'Arial Coptic Local', 'ArialCoptic', 'Arial Coptic', 'Antinoou Local', 'Antinoou', 'New Athena Unicode Local', 'New Athena Unicode', 'Avva Shenouda', 'Noto Sans Coptic', 'Segoe UI Historic', serif;
--coptic-font-active: var(--coptic-font-modern);
--audio-bar-top: 64px;
--audio-bar-height: 60px;
--page-max-width: 1120px;
--content-max-width: 860px;
}

body.coptic-font-traditional{
--coptic-font-active: var(--coptic-font-traditional);
}

*,
*::before,
*::after{
box-sizing: border-box;
}

body{
font-family: 'Open Sans', 'Noto Sans Coptic', Arial, sans-serif;
width: min(100%, var(--page-max-width));
min-height: 100vh;
margin: 0 auto;
padding: 20px clamp(14px, 2.6vw, 30px) 48px;
background:
radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 32%),
radial-gradient(circle at top right, rgba(153, 224, 242, 0.55), rgba(153, 224, 242, 0) 28%),
linear-gradient(180deg, #e8f9fc 0%, #cdeff4 48%, #b7e4ee 100%);
color: #333;
}

body.home-page{
min-height: 100vh;
}

.page-shell{
width: min(100%, var(--content-max-width));
margin: 0 auto;
}

.page-shell > :first-child{
margin-top: 0;
}

.home-banner{
position: relative;
overflow: hidden;
padding: 28px 24px;
margin: 10px 0 18px;
border-radius: 24px;
background: linear-gradient(135deg, rgba(4, 74, 122, 0.96), rgba(10, 129, 151, 0.92) 55%, rgba(244, 180, 0, 0.82));
color: #f8fdff;
box-shadow: 0 16px 30px rgba(12, 61, 92, 0.22);
}

.home-banner::after{
content: "";
position: absolute;
inset: auto -40px -60px auto;
width: 180px;
height: 180px;
border-radius: 50%;
background: radial-gradient(circle, rgba(255,255,255,0.28), rgba(255,255,255,0));
pointer-events: none;
}

.home-mark{
display: inline-flex;
align-items: center;
justify-content: center;
width: auto;
height: 58px;
padding: 0 18px;
margin-bottom: 14px;
border-radius: 18px;
background: linear-gradient(135deg, rgba(255,255,255,0.25), rgba(255,255,255,0.08));
border: 1px solid rgba(255,255,255,0.28);
box-shadow: inset 0 1px 0 rgba(255,255,255,0.16);
font-family: var(--coptic-font-traditional);
font-size: 28px;
font-weight: 700;
color: #fff7d0;
}

.home-badge{
display: inline-block;
padding: 6px 12px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.16);
border: 1px solid rgba(255, 255, 255, 0.24);
font-size: 12px;
font-weight: 700;
letter-spacing: 0.12em;
text-transform: uppercase;
}

.home-title{
margin: 14px 0 8px;
font-size: clamp(34px, 7vw, 52px);
line-height: 1.05;
color: #ffffff;
text-shadow: 0 3px 14px rgba(0,0,0,0.16);
}

.home-coptic-subtitle{
margin: 0 0 10px;
font-family: var(--coptic-font-traditional);
font-size: 22px;
line-height: 1.35;
letter-spacing: 0.03em;
color: #fff3bf;
}

.home-subtitle{
margin: 0;
font-size: 17px;
line-height: 1.6;
color: rgba(248, 253, 255, 0.94);
}

.home-section-title{
margin: 0 0 10px;
font-size: 22px;
}

.audio-spacer{
height: calc(var(--audio-bar-height) + 16px);
}

.button{
display:block;
padding:20px;
margin:15px 0;
background: linear-gradient(to bottom, #81c784, #4caf50);
border-radius:15px;
text-align:center;
font-size:clamp(22px, 2.2vw, 28px);
font-weight: bold;
text-decoration:none;
color:white;
box-shadow: 0 12px 24px rgba(17, 94, 87, 0.16);
transition: transform 0.2s, box-shadow 0.2s;
min-height: 44px;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
gap: 4px;
}

.button-title{
display: block;
}

.button-subtitle{
display: block;
font-size: 14px;
font-weight: 600;
line-height: 1.35;
opacity: 0.92;
}

.button:hover{
transform: translateY(-2px);
box-shadow: 0 18px 32px rgba(17, 94, 87, 0.22);
}

.button:active{
transform: translateY(0);
}

.home-mahragan-logo{
width: 100%;
margin: 18px auto 0;
display: flex;
justify-content: center;
align-items: center;
}

.home-mahragan-logo-link{
display: inline-block;
width: min(100%, 520px);
border-radius: 16px;
transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-mahragan-logo-link:hover{
transform: translateY(-2px);
box-shadow: 0 10px 24px rgba(12, 61, 92, 0.2);
}

.home-mahragan-logo-link:focus-visible{
outline: 3px solid rgba(4, 74, 122, 0.5);
outline-offset: 4px;
}

.home-mahragan-logo img{
width: 100%;
height: auto;
display: block;
}

@media (min-width: 900px) {
.home-mahragan-logo-link{
width: 74%;
max-width: 640px;
}
}

.home-theme-verse{
margin: 16px auto 0;
max-width: 860px;
text-align: center;
font-family: var(--coptic-font-traditional);
font-size: clamp(24px, 3.4vw, 34px);
font-weight: 700;
line-height: 1.35;
color: #0d4771;
text-shadow: 0 1px 0 rgba(255,255,255,0.55);
}

.grade-groups{
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 16px;
margin: 24px 0;
}

.grade-button{
aspect-ratio: 1;
border-radius: 16px;
text-align: center;
text-decoration: none;
color: white;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
font-weight: 600;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
transition: transform 0.2s, box-shadow 0.2s;
}

.grade-button:hover{
transform: translateY(-4px);
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.grade-button:active{
transform: translateY(-1px);
}

.grade-icon{
width: 44px;
height: 44px;
flex-shrink: 0;
filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
}

.grade-button-label{
display: block;
font-size: clamp(13px, 3.5vw, 17px);
font-weight: 700;
line-height: 1.2;
padding: 0 4px;
}

@media (max-width: 600px) {
.grade-groups{
grid-template-columns: repeat(3, 1fr);
gap: 12px;
}
}

@media (max-width: 360px) {
.grade-groups{
grid-template-columns: repeat(3, 1fr);
gap: 10px;
}

.grade-button{
aspect-ratio: auto;
min-height: 80px;
}
}

.line{
padding:18px;
border-bottom:2px solid #ddd;
border-radius:10px;
margin:5px 0;
background: rgba(255,255,255,0.8);
cursor: pointer;
min-height: 50px;
display: flex;
flex-direction: column;
justify-content: center;
}

.line.color-group-0{
background: rgba(213, 229, 255, 0.9);
}

.line.color-group-1{
background: rgba(227, 254, 235, 0.9);
}

.line-label{
padding: 8px 18px 4px;
margin: 10px 0 2px;
font-size: 13px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #888;
border-left: 3px solid #bbb;
background: transparent;
pointer-events: none;
user-select: none;
}

.line.line-static{
cursor: default;
opacity: 0.75;
}

.line.line-static:hover{
opacity: 0.85;
}

.coptic{
font-size:32px;
font-weight:bold;
color: #1b5e20;
font-family: var(--coptic-font-active);
line-height: 1.5;
letter-spacing: 0.02em;
text-shadow: 0 1px 1px rgba(0,0,0,0.1);
}

.word{
display: inline-block;
padding: 0 0.12em;
border-radius: 0.35em;
transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.active-word{
background: #ff7043;
color: #fffde7;
transform: translateY(-1px);
box-shadow: 0 3px 8px rgba(255, 112, 67, 0.35);
}

.active-stanza{
background: #ff7043;
color: #fffde7;
border-radius: 0.35em;
padding: 0 0.12em;
box-shadow: 0 3px 8px rgba(255, 112, 67, 0.35);
}

.translation{
font-size:18px;
color:#555;
font-style: italic;
margin-top: 4px;
}

.active{
background: linear-gradient(to right, #fff9c4, #ffeb3b);
border-left:8px solid #ff9800;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@keyframes pulse {
0% { transform: scale(1); }
50% { transform: scale(1.02); }
100% { transform: scale(1); }
}

body.pulse-enabled .active{
animation: pulse 1s infinite;
}

nav.nav-bar{
position: sticky;
top: 0;
display: flex;
align-items: center;
gap: clamp(10px, 1.8vw, 18px);
background: rgba(255,255,255,0.82);
backdrop-filter: blur(16px);
padding: 12px 14px;
z-index: 20;
margin: 0 auto 22px;
border-radius: 24px;
border: 1px solid rgba(15, 109, 133, 0.12);
box-shadow: 0 16px 30px rgba(12, 86, 108, 0.16);
}

nav.nav-bar > a,
.nav-actions > a{
flex: 0 0 auto;
padding: 12px 16px;
border-radius: 16px;
font-weight: 700;
background: linear-gradient(to right, #29b6f6, #0288d1);
color: white;
text-decoration: none;
min-height: 50px;
min-width: 110px;
display: flex;
align-items: center;
justify-content: center;
box-shadow: 0 10px 18px rgba(2, 136, 209, 0.2);
}

.nav-brand{
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 4px;
margin: 0 10px;
padding: 12px 16px;
border-radius: 18px;
background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(227, 248, 252, 0.88));
box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 8px 20px rgba(0, 112, 140, 0.08);
border: 1px solid rgba(33, 150, 183, 0.14);
min-height: 76px;
}

.nav-brand-link{
color: inherit;
text-decoration: none;
}

body.player-page .nav-brand{
background: linear-gradient(135deg, rgba(6, 116, 190, 0.96), rgba(12, 164, 177, 0.92) 58%, rgba(244, 180, 0, 0.78));
border-color: rgba(255,255,255,0.3);
box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 10px 22px rgba(10, 96, 122, 0.18);
}

body.player-page .nav-brand-title{
color: #f8fdff;
text-shadow: 0 2px 10px rgba(0,0,0,0.16);
}

body.player-page .nav-brand-subtitle{
color: #fff1a8;
text-shadow: 0 1px 6px rgba(0,0,0,0.18);
}

.nav-brand-title{
display: block;
font-family: 'Open Sans', 'Noto Sans Coptic', Arial, sans-serif;
font-size: clamp(26px, 2.5vw, 38px);
font-weight: 800;
letter-spacing: 0.01em;
line-height: 1.05;
color: #0d5e73;
text-shadow: 0 1px 0 rgba(255,255,255,0.55);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
text-align: center;
}

.nav-brand-subtitle{
display: block;
font-family: var(--coptic-font-traditional);
font-size: 14px;
font-weight: 700;
line-height: 1.2;
letter-spacing: 0.02em;
color: #1b7b62;
white-space: normal;
overflow-wrap: anywhere;
max-width: 100%;
text-align: center;
}

.nav-actions{
display: flex;
align-items: center;
gap: 8px;
}

.nav-actions > a,
.nav-actions > button{
flex: 0 0 auto;
}

.nav-settings-btn{
border: none;
border-radius: 16px;
min-height: 50px;
min-width: 50px;
padding: 8px 14px;
background: linear-gradient(to right, #26c6da, #00acc1);
color: #fff;
font-size: 22px;
line-height: 1;
font-weight: 700;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
box-shadow: 0 10px 18px rgba(0, 172, 193, 0.2);
}

.audio-nav {
position: sticky;
top: 58px;
z-index: 4;
background: rgba(255,255,255,0.92);
backdrop-filter: blur(6px);
padding: 8px;
border-radius: 10px;
box-shadow: 0 2px 8px rgba(0,0,0,0.12);
margin-bottom: 10px;
}

/* Fixed playback bar on player page for consistent behavior across browsers */
body.player-page .audio-nav{
position: fixed !important;
top: var(--audio-bar-top, 64px);
left: 50%;
transform: translateX(-50%);
width: min(var(--content-max-width), calc(100vw - 24px));
z-index: 25;
}

/* ==== Shared drawer scrim (used by settings + hymn drawers) ==== */
.drawer-scrim{
position: fixed;
inset: 0;
background: rgba(7, 22, 37, 0.38);
backdrop-filter: blur(2px);
opacity: 0;
pointer-events: none;
transition: opacity 220ms ease;
z-index: 40;
}

.drawer-scrim.is-open{
opacity: 1;
pointer-events: auto;
}

.settings-drawer{
position: fixed;
top: 0;
right: 0;
height: 100dvh;
width: 320px;
max-width: 92vw;
background: #ffffff;
box-shadow: -18px 0 40px rgba(10, 30, 60, 0.18);
transform: translateX(100%);
transition: transform 260ms cubic-bezier(0.22, 0.9, 0.3, 1);
z-index: 50;
display: flex;
flex-direction: column;
overflow: hidden;
}

.settings-drawer.is-open{
transform: translateX(0);
}

.settings-drawer[hidden]{
display: flex;
}

.settings-drawer-header{
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 18px;
background: linear-gradient(135deg, #1565c0 0%, #00acc1 100%);
color: #fff;
}

.settings-drawer-title{
margin: 0;
font-size: 20px;
font-weight: 700;
color: #fff;
text-shadow: none;
text-align: left;
}

.settings-drawer-close{
width: 36px;
height: 36px;
border: none;
border-radius: 50%;
background: rgba(255, 255, 255, 0.18);
color: #fff;
font-size: 16px;
font-weight: 700;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
transition: background 160ms ease, transform 160ms ease;
}

.settings-drawer-close:hover{
background: rgba(255, 255, 255, 0.28);
}

.settings-drawer-close:active{
transform: scale(0.94);
}

.settings-drawer-body{
flex: 1 1 auto;
overflow-y: auto;
padding: 10px 12px 18px;
-webkit-overflow-scrolling: touch;
}

.settings-list{
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 2px;
}

.settings-list li{
margin: 0;
}

.settings-row{
width: 100%;
display: flex;
align-items: center;
gap: 14px;
padding: 14px 12px;
border: none;
border-radius: 12px;
background: transparent;
color: #0f2a44;
text-align: left;
cursor: pointer;
min-height: 56px;
transition: background 140ms ease;
}

.settings-row:hover{
background: rgba(0, 172, 193, 0.08);
}

.settings-row:active{
background: rgba(0, 172, 193, 0.14);
}

.settings-row + .settings-row,
.settings-list li + li .settings-row{
position: relative;
}

.settings-list li + li .settings-row::before{
content: "";
position: absolute;
top: 0;
left: 50px;
right: 12px;
height: 1px;
background: rgba(15, 42, 68, 0.08);
}

.settings-row-icon{
flex: 0 0 auto;
width: 36px;
height: 36px;
border-radius: 10px;
background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
color: #00838f;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 18px;
font-weight: 700;
}

.settings-row-text{
flex: 1 1 auto;
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}

.settings-row-label{
font-size: 15px;
font-weight: 600;
color: #0f2a44;
line-height: 1.2;
}

.settings-row-value{
font-size: 12px;
color: #5a7690;
line-height: 1.2;
}

.settings-row-check{
flex: 0 0 auto;
width: 24px;
height: 24px;
display: inline-flex;
align-items: center;
justify-content: center;
color: #00acc1;
font-size: 20px;
font-weight: 800;
opacity: 0;
transform: scale(0.6);
transition: opacity 160ms ease, transform 160ms ease;
}

.settings-row.is-on .settings-row-check{
opacity: 1;
transform: scale(1);
}

.settings-row.is-on .settings-row-icon{
background: linear-gradient(135deg, #26c6da, #00acc1);
color: #ffffff;
}

.settings-row.is-on .settings-row-value{
color: #00838f;
font-weight: 700;
}

.settings-advanced-toggle{
margin-top: 14px;
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
padding: 12px 14px;
border: none;
border-radius: 12px;
background: rgba(15, 42, 68, 0.04);
color: #0f2a44;
font-size: 14px;
font-weight: 700;
cursor: pointer;
min-height: 44px;
transition: background 140ms ease;
}

.settings-advanced-toggle:hover{
background: rgba(15, 42, 68, 0.08);
}

.settings-advanced-caret{
font-size: 14px;
transition: transform 180ms ease;
}

.settings-advanced-toggle[aria-expanded="true"] .settings-advanced-caret{
transform: rotate(180deg);
}

.settings-advanced-panel{
margin-top: 10px;
}

/* ==== Left-side hymn drawer ==== */
.nav-menu-btn{
border: none;
border-radius: 16px;
min-height: 50px;
padding: 8px 14px;
background: linear-gradient(to right, #26c6da, #00acc1);
color: #fff;
font-weight: 700;
font-size: 15px;
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 8px;
box-shadow: 0 10px 18px rgba(0, 172, 193, 0.2);
}

.nav-menu-icon{
font-size: 20px;
line-height: 1;
}

.nav-menu-label{
font-size: 15px;
}

.hymn-drawer{
position: fixed;
top: 0;
left: 0;
height: 100dvh;
width: 340px;
max-width: 92vw;
background: #ffffff;
box-shadow: 18px 0 40px rgba(10, 30, 60, 0.18);
transform: translateX(-100%);
transition: transform 260ms cubic-bezier(0.22, 0.9, 0.3, 1);
z-index: 50;
display: flex;
flex-direction: column;
overflow: hidden;
}

.hymn-drawer.is-open{
transform: translateX(0);
}

.hymn-drawer[hidden]{
display: flex;
}

/* Shared drawer chrome */
.drawer-header{
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
padding: 16px 18px;
background: linear-gradient(135deg, #1565c0 0%, #00acc1 100%);
color: #fff;
}

.drawer-header-text{
flex: 1 1 auto;
min-width: 0;
}

.drawer-title{
margin: 0;
font-size: 20px;
font-weight: 700;
color: #fff;
text-shadow: none;
text-align: left;
}

.drawer-subtitle{
margin: 4px 0 0;
font-size: 12px;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
opacity: 0.9;
}

.drawer-close{
flex: 0 0 auto;
width: 36px;
height: 36px;
border: none;
border-radius: 50%;
background: rgba(255, 255, 255, 0.18);
color: #fff;
font-size: 16px;
font-weight: 700;
cursor: pointer;
display: inline-flex;
align-items: center;
justify-content: center;
transition: background 160ms ease, transform 160ms ease;
}

.drawer-close:hover{
background: rgba(255, 255, 255, 0.28);
}

.drawer-close:active{
transform: scale(0.94);
}

.drawer-body{
flex: 1 1 auto;
overflow-y: auto;
padding: 12px 12px 18px;
-webkit-overflow-scrolling: touch;
display: flex;
flex-direction: column;
gap: 12px;
}

.hymn-list{
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
gap: 4px;
}

.hymn-list li{
margin: 0;
}

.hymn-drawer-row{
width: 100%;
display: flex;
align-items: center;
gap: 12px;
padding: 12px;
border-radius: 12px;
background: rgba(15, 42, 68, 0.035);
color: #0f2a44;
text-decoration: none;
min-height: 56px;
transition: background 140ms ease, transform 140ms ease;
}

.hymn-drawer-row:hover{
background: rgba(0, 172, 193, 0.10);
transform: none;
}

.hymn-drawer-row:active{
background: rgba(0, 172, 193, 0.18);
}

.hymn-drawer-row-icon{
flex: 0 0 auto;
width: 36px;
height: 36px;
border-radius: 10px;
background: linear-gradient(135deg, #fde4ea, #fbb6c2);
color: #ad1457;
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 18px;
}

.hymn-drawer-row-title{
flex: 1 1 auto;
font-size: 15px;
font-weight: 600;
line-height: 1.25;
min-width: 0;
overflow-wrap: anywhere;
}

.hymn-drawer-row-check{
flex: 0 0 auto;
color: #00acc1;
font-size: 18px;
font-weight: 800;
opacity: 0;
}

.hymn-drawer-row.is-current{
background: linear-gradient(135deg, rgba(21, 101, 192, 0.12), rgba(0, 172, 193, 0.14));
outline: 2px solid rgba(0, 172, 193, 0.45);
outline-offset: -2px;
}

.hymn-drawer-row.is-current .hymn-drawer-row-title{
color: #0b3a72;
}

.hymn-drawer-row.is-current .hymn-drawer-row-check{
opacity: 1;
}

.hymn-drawer-row.is-current .hymn-drawer-row-icon{
background: linear-gradient(135deg, #26c6da, #00acc1);
color: #fff;
}

.hymn-drawer-empty{
padding: 16px;
text-align: center;
color: #5a7690;
font-size: 14px;
}

.drawer-footer{
padding-top: 4px;
border-top: 1px solid rgba(15, 42, 68, 0.08);
display: flex;
justify-content: center;
}

.drawer-footer-link{
display: inline-block;
padding: 10px 14px;
font-size: 14px;
font-weight: 700;
color: #1565c0;
text-decoration: none;
border-radius: 10px;
transition: background 140ms ease;
}

.drawer-footer-link:hover{
background: rgba(21, 101, 192, 0.08);
}

.timestamps-panel{
background: rgba(0, 0, 0, 0.78);
color: #fff;
padding: 10px;
border-radius: 10px;
font-size: 13px;
line-height: 1.5;
margin-bottom: 0;
max-height: 140px;
overflow-y: auto;
white-space: pre-wrap;
}

audio{
position: static;
display: block;
width:100%;
margin-bottom:0;
border-radius:10px;
}

h1, h2{
text-align: center;
color: #1565c0;
text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

h1{
font-size: clamp(36px, 4vw, 54px);
margin-bottom: 10px;
}

h2{
font-size: clamp(24px, 2.8vw, 36px);
margin-top: 0;
}

#subtitle,
#youtubeLink,
#lyrics,
.audio-nav,
.audio-spacer,
.timestamps-panel{
width: min(100%, var(--content-max-width));
margin-left: auto;
margin-right: auto;
}

#youtubeLink{
display: inline-flex;
align-items: center;
justify-content: center;
width: auto;
}

/* Disable hover on touch devices */
@media (hover: none) and (pointer: coarse) {
.button:hover,
nav.nav-bar > a:hover,
.nav-actions > a:hover,
.nav-brand-link:hover{
transform: none;
}

.button:active,
nav.nav-bar > a:active,
.nav-actions > a:active,
.nav-brand-link:active{
transform: scale(0.95);
}
}
@media (max-width: 900px) {
body{
padding-left: 14px;
padding-right: 14px;
}

nav.nav-bar{
padding: 10px;
gap: 10px;
}

nav.nav-bar > a,
.nav-actions > a{
min-width: 96px;
padding: 11px 14px;
}

.nav-brand{
margin: 0;
padding: 10px 12px;
}
}

@media (max-width: 480px) {
body{
padding: 12px;
}

.page-shell{
width: 100%;
}

.home-banner{
padding: 24px 18px;
margin-top: 4px;
}

.home-mark{
width: 52px;
height: 52px;
font-size: 24px;
margin-bottom: 12px;
}

.home-coptic-subtitle{
font-size: 18px;
}

.home-subtitle{
font-size: 15px;
}

.home-section-title{
font-size: 20px;
}

body.player-page .audio-nav{
position: fixed !important;
top: var(--audio-bar-top, 64px);
left: 50%;
transform: translateX(-50%);
width: calc(100vw - 24px);
margin-bottom: 0;
}

body.player-page .audio-spacer{
display: block;
height: calc(var(--audio-bar-height, 60px) + 16px);
}

nav.nav-bar{
flex-wrap: wrap;
padding: 10px;
gap: 8px;
border-radius: 20px;
}

nav.nav-bar a{
flex: 1 1 0;
min-width: 0;
padding: 10px 12px;
font-size: 15px;
}

.nav-brand{
order: -1;
width: 100%;
flex-basis: 100%;
margin: 0;
padding: 10px 12px;
min-height: 0;
}

.nav-brand-title{
font-size: 24px;
white-space: normal;
}

.nav-brand-subtitle{
font-size: 12px;
}

.nav-actions{
display: flex;
align-items: center;
gap: 6px;
flex: 1 1 0;
min-width: 0;
}

.nav-actions > a,
.nav-actions > button{
flex: 1 1 0;
min-width: 0;
}

.nav-settings-btn{
min-width: 0;
min-height: 44px;
font-size: 20px;
padding: 6px 10px;
}

.nav-menu-btn{
min-width: 0;
min-height: 44px;
font-size: 15px;
padding: 6px 12px;
gap: 6px;
}

body.player-page nav.nav-bar{
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
align-items: stretch;
}

body.player-page .nav-brand{
grid-column: 1 / -1;
order: 0;
}

body.player-page .nav-actions{
grid-column: 1 / -1;
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
width: 100%;
}

body.player-page .nav-actions > a,
body.player-page .nav-actions > button{
width: 100%;
min-height: 56px;
}

#subtitle,
#lyrics,
.audio-nav,
.timestamps-panel{
width: 100%;
}

.settings-drawer{
width: min(360px, 92vw);
}

.button{
padding: 18px;
font-size: 20px;
margin: 12px 0;
}

.button-subtitle{
font-size: 12px;
}

h1{
font-size: 24px;
}

h2{
font-size: 20px;
}

.coptic{
font-size: 28px;
line-height: 1.6;
}

.translation{
font-size: 16px;
}

.line{
padding: 16px;
margin: 4px 0;
}

audio{
margin-bottom: 12px;
}
}

@media (max-width: 360px) {
body{
padding: 8px;
}

body.player-page .audio-nav{
width: calc(100vw - 16px);
}

body.player-page .audio-spacer{
display: block;
}

.button{
padding: 16px;
font-size: 18px;
}

.button-subtitle{
font-size: 11px;
}

.coptic{
font-size: 24px;
}

.translation{
font-size: 14px;
}

nav.nav-bar > a,
.nav-actions > a{
padding: 6px 10px;
font-size: 13px;
}

.nav-brand-title{
font-size: 21px;
}

.nav-brand-subtitle{
font-size: 10px;
}
}