/* Variables */

:root{
	/* blue theme */
	--theme-color: #122C4A;
	--theme-color-2: #193E68;
	
	/* burgundy theme */
	/*--theme-color: #40070E;*/
	/*--theme-color-2: #500D12;*/

	--1vh: 1vh;
	--scale: 1.0;
	
	--bs-danger: #dc3545;
}

.light{
	--text-color: black;
	--bg-color: white;
	--border-color: rgb(222, 226, 230);
	
	--light: rgb(255, 255, 255);
	--light-hover: rgb(220, 220, 220);
	--light-active: rgb(175, 175, 175);
	
	--grey: rgb(220, 220, 220);

	--dark: rgb(0, 0, 0);
	--dark-hover: rgb(55, 55, 55);
	--dark-active: rgb(100, 100, 100);
	
	--link-color: #0d6efd;
}
.dark{
	--text-color: white;
	--bg-color: #212529;
	--border-color: rgb(73, 80, 87);
	
	--light: rgb(33, 37, 41);
	--light-hover: rgb(55, 55, 55);
	--light-active: rgb(100, 100, 100);

	--grey: rgb(30, 30, 30);
	
	--dark: rgb(255, 255, 255);
	--dark-hover: rgb(220, 220, 220);
	--dark-active: rgb(175, 175, 175);

	--link-color: #0d6efd;
}

/* Global Styles */

html, body{
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: calc(16px * var(--scale));
	padding: 0;
	margin: 0;
	line-height: 1.5;
	
	color: var(--text-color);
	background-color: var(--bg-color);
}

button{
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
}

/* text input */
input[type='text']{
	color: var(--text-color);
	background-color: var(--light);
	font-size: calc(16px * var(--scale));
}

textarea{
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: calc(16px * var(--scale));
	line-height: 1.5;
	color: var(--text-color);
	background-color: var(--light);
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(4px * var(--scale));
	padding: calc(10px * var(--scale));
	width: 100%;
	box-sizing: border-box;
	resize: vertical;
}

/* Prevent mobile blue highlight */
button, div{
	-webkit-tap-highlight-color: transparent;
}


#loading{
	position: fixed;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	animation: show 1s ease-in forwards;
}

#loading > div{
	position: absolute;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	justify-content: center;
	align-items: center;
}

@keyframes show {
  0%,
  25% { opacity: 0; }
  100% { opacity: 1; }
}

#loading > div > span {
  width: calc(50px * var(--scale));
  height: calc(50px * var(--scale));
  border: calc(3px * var(--scale)) solid rgba(0, 0, 0, .3);
  border-radius: 50%;
  border-top-color: #000;
  animation: spin 1s ease-in-out infinite;
  -webkit-animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { -webkit-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
  to { -webkit-transform: rotate(360deg); }
}


#main-page{
	position: fixed;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	display: none;
	flex-direction: column;
}

.header{
	height: calc(60px * var(--scale));
	background-color:var(--theme-color-2);
	color: white;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: calc(20px * var(--scale));
	font-weight: bold;
}

.fullscreen .header, .fullscreen .footer{
	display: none;
}

#main-book, #search-book{
	width: 0;
	flex-grow: 1;
	white-space: nowrap;
	color: white;
	font-size: calc(20px * var(--scale));
	font-weight: bold;
	background-color: transparent;
	height: 100%;
	padding-left: calc(16px * var(--scale));
	display: flex;
	align-items: center;
	border: none;
	cursor: pointer;
	text-align: start;
}

#main-book-text, #search-book-text {
	width:0;
	flex-grow:1;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: fit-content;
}

#main-book-arrow, #search-book-arrow{
	display: inline-block;
	margin-left: .255em;
	vertical-align: .255em;
	content: "";
	border-top: .3em solid;
	border-right: .3em solid transparent;
	border-bottom: 0;
	border-left: .3em solid transparent;
}

/* Book Menu */
#main-book-menu, #search-book-menu{
	display: none;
	position: fixed;
	top: calc(50px * var(--scale));
	left: calc(10px * var(--scale));
	width: calc(250px * var(--scale));
	background-color: var(--bg-color);
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(4px * var(--scale));
	z-index: 200;
	color: var(--text-color);

	opacity: 0;
	animation: show-menu 100ms ease-in forwards;
}

@keyframes show-menu {
	0% { opacity: 0; }
	100% { opacity: 1; }
}

#main-book-menu > button, #search-book-menu > button{
	transition: background-color 300ms;
	cursor: pointer;
	padding: calc(8px * var(--scale)) calc(12px * var(--scale));
	width: 100%;
	text-align: start;
	color: var(--text-color);
	background-color: var(--light);
	border: none;
}

#main-book-menu > button:hover, #search-book-menu > button:hover{
	background-color: var(--light-hover);
}

#main-book-menu > button:active, #search-book-menu > button:active{
	background-color: var(--light-active);
}

.open-main-menu-button{
	height: 100%;
	padding: 0 calc(16px * var(--scale));
	display: flex;
	align-items: center;
	border: none;
	background-color: transparent;
	color: white;
	cursor: pointer;
	font-size: calc(20px * var(--scale));
}

/* Main hymn container hymn scrolling */
#hymn-page-container{
	height: 0;
	flex-grow: 1;
	display: flex;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
}

#hymn-page-container::-webkit-scrollbar{
	display: none;
}

.hymn-page{
	width: calc(100% - 32px);
	height: calc(100% - 16px);
	min-width: calc(100% - 32px * var(--scale));
	scroll-snap-align: start;
	padding: calc(8px * var(--scale)) calc(16px * var(--scale));
	position:relative;
	overflow-y:auto;
}

.fullscreen .hymn-page{
	/*padding-top: calc(8px + env(safe-area-inset-top, 0));*/
}

#hymn-header{
	display: flex;
	justify-content: space-between;
	margin-bottom: calc(4px * var(--scale));
}

.hymn-note{
	flex: 0 1 auto;
	min-width: 0;
	margin-right: auto;
	margin-left: calc(8px * var(--scale));
	align-self: center;
	text-align: left;
	font-style: italic;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	opacity: 0.85;
}

.hymn-note-footer{
	margin-bottom: calc(30px * var(--scale));
	font-style: italic;
	white-space: pre-wrap;
	overflow-wrap: break-word;
	opacity: 0.85;
}

.fullscreen #hymn-header{
	margin-top: calc(env(safe-area-inset-top, 0));
}

.center-hymn .hymn-wrapper{
	min-width: calc(400px * var(--scale));
	width: fit-content;
	margin-left: auto;
	margin-right: auto;
}

.tablet{
	/* Selector #main-page when body contains .window-visible class */
	#main-page{
		transition: right 250ms;
	}

	.window{
		left: unset !important;
		width: min(40vw, calc(600px * var(--scale))) !important;
		/* border-left: 4px solid #aaa; */
		box-shadow: 0 0 calc(10px * var(--scale)) rgba(0, 0, 0, .5);
	}

}

body.tablet:has(.window-visible) #main-page{
	right: min(40vw, calc(600px * var(--scale))) !important;
}

body.tablet:has(.window-visible) #video-container{
	right: min(40vw, calc(600px * var(--scale))) !important;
}

body:not(.developer-mode) .developer-mode-only{
	display: none;
}

#wake-lock-status{
	position: fixed;
	bottom: 60px;
	left: 10px;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #444;
	z-index: 100;
	pointer-events: none;
}

#wake-lock-status.active{
	background: #4caf50;
}















.clear-button{
	transition: background-color 300ms;
	cursor: pointer;
	padding: calc(6px * var(--scale)) calc(8px * var(--scale));
}

.clear-button:hover{
	background-color:rgba(0, 0, 0, 0.1);
}

.clear-button:active{
	background-color:rgba(0, 0, 0, 0.3);
}

.footer{
	height: calc(48px * var(--scale));
	display:flex;
	border-top: calc(1px * var(--scale)) solid var(--border-color);
}

.footer-item{
	width: 0;
	flex-grow: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: background-color 300ms;
	cursor: pointer;
	flex-direction: column;
}

.footer-item svg{
	width: calc(24px * var(--scale));
	height: calc(24px * var(--scale));
}

.footer-item .subtitle{
	font-size: calc(10px * var(--scale));
}

.footer-item:hover{
	background-color:rgba(0, 0, 0, 0.1);
}

.footer-item:active{
	background-color:rgba(0, 0, 0, 0.3);
}


.px-safe-area{
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

.pb-safe-area{
	padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Menu */
.menu{
	position: fixed;
	top: calc(10px * var(--scale));
	right: calc(10px * var(--scale));
	width: calc(150px * var(--scale));
	background-color: var(--bg-color);
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(2px * var(--scale));

	opacity: 0;
	animation: show-menu 100ms ease-in forwards;
}

.menu-item{
	transition: background-color 300ms;
	cursor: pointer;
	padding: calc(8px * var(--scale)) calc(12px * var(--scale));
}

.menu-item:hover{
	background-color:rgba(0, 0, 0, 0.1);
}

.menu-item:active{
	background-color:rgba(0, 0, 0, 0.3);
}


/* Main Menu */
.main-menu-wrapper{
	height: 100%;
	position: relative;
}

#main-menu{
	display: none;
	position: absolute;
	top: calc(10px * var(--scale));
	right: calc(10px * var(--scale));
	width: calc(150px * var(--scale));
	background-color: var(--bg-color);
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(2px * var(--scale));

	opacity: 0;
	animation: show-menu 100ms ease-in forwards;
	z-index: 100;
}

#main-menu button{
	transition: background-color 300ms;
	cursor: pointer;
	padding: calc(8px * var(--scale)) calc(12px * var(--scale));
	color: var(--text-color);
	background-color: var(--light);
	border: none;
	width: 100%;
	text-align: start;
}

#main-menu button:hover{
	background-color: var(--light-hover);
}

#main-menu button:active{
	background-color: var(--light-active);
}





.basic-button{
	transition: background-color 300ms;
	cursor: pointer;
	padding: calc(6px * var(--scale)) calc(8px * var(--scale));
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(4px * var(--scale));
}
.basic-button:hover{
	background-color:var(--light-hover);
}

.basic-button:active{
	background-color:var(--light-active);
}




.tab-container{
	display: flex;
	overflow-x: auto;
}

.tab{
	flex-grow: 1;
	text-align: center;
	background-color: var(--theme-color-2);
	color: white;
	padding: calc(10px * var(--scale)) calc(4px * var(--scale));
	cursor: pointer;
	border-bottom: calc(4px * var(--scale)) solid var(--theme-color-2);
	transition: border-bottom-color 200ms;
	font-size: calc(15px * var(--scale));
	display: flex;
	align-items: center;
	justify-content: center;
}

.tab:active{
	/*border-bottom: 4px solid white;*/
}


.tab.active{
	border-bottom: calc(4px * var(--scale)) solid white;
}

input{
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(4px * var(--scale));
	padding: calc(10px * var(--scale));
}

#search-result-list > div{
	display: flex;
	padding: calc(8px * var(--scale)) calc(16px * var(--scale));
	border-bottom: calc(1px * var(--scale)) solid var(--border-color);
	cursor: pointer;
	transition: background-color 300ms;
}

#search-result-list > div:hover{
	background-color: rgba(0, 0, 0, 0.1);
}


#search-result-list > div:active{
	background-color: rgba(0, 0, 0, 0.3);
}

#search-result-list > div > div:nth-child(1){
	font-weight: bold;
	margin-right: calc(8px * var(--scale));
}


#first-line-list > div{
	display: flex;
	padding: calc(8px * var(--scale)) calc(16px * var(--scale));
	border-bottom: calc(1px * var(--scale)) solid var(--border-color);
	cursor: pointer;
	transition: background-color 300ms;
}

#first-line-list > div:hover{
	background-color: rgba(0, 0, 0, 0.1);
}

#first-line-list > div:active{
	background-color: rgba(0, 0, 0, 0.3);
}

#first-line-list > div > div:nth-child(1){
	font-weight: bold;
	margin-right: calc(8px * var(--scale));
}

#first-line-list.alphabetical > div > div:nth-child(1){
	min-width: calc(45px * var(--scale));
}

.first-line-sort{
	display: flex;
	border: calc(1px * var(--scale)) solid var(--border-color);
	margin: calc(8px * var(--scale));
	border-radius: calc(6px * var(--scale));
	background-color: var(--grey);
}

.first-line-sort > div{
	width: 0;
	flex-grow: 1;
	text-align: center;
	padding: calc(4px * var(--scale));
}

.first-line-sort > div > div{
	padding: calc(4px * var(--scale)) 0;
	cursor: pointer;
}

.first-line-sort > div > div.active{
	background-color: var(--light);
	border-radius: calc(6px * var(--scale));
}

.list > div{
	display: flex;
	padding: calc(8px * var(--scale)) calc(16px * var(--scale));
	border-bottom: calc(1px * var(--scale)) solid var(--border-color);
	cursor: pointer;
	transition: background-color 300ms;
}

.list > div:hover{
	background-color: rgba(0, 0, 0, 0.1);
}

.list > div:active{
	background-color: rgba(0, 0, 0, 0.3);
}

.list > div > div:nth-child(1){
	font-weight: bold;
	margin-right: calc(8px * var(--scale));
}


.window{
	position: fixed;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	background-color: var(--bg-color);
	display: none;
	z-index: 100;
}

.window-showing{
	display: block;
	opacity: 0;
	transform: translateX(calc(25px * var(--scale)));
	animation: show-window 200ms ease-out forwards;
}

.window-visible{
	display: block;
}

.window-hiding{
	display: block;
	animation: hide-window 200ms ease-out forwards;
	pointer-events: none;
}


@keyframes show-window {
  0% { opacity: 0; transform: translateX(calc(25px * var(--scale))) }
  100% { opacity: 1; transform: translateX(0px); }
}

@keyframes hide-window {
  0% { opacity: 1; transform: translateY(0px); }
  100% { opacity: 0; transform: translateY(calc(25px * var(--scale))) scale(0.9) }
}


.window-10{
	z-index: 200;
}

.window-20{
	z-index: 300;
}

/* General */
.btn-light, .btn-dark{
	text-align: center;
	padding: calc(6px * var(--scale)) calc(12px * var(--scale));
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(6px * var(--scale));
	transition: background-color 300ms;
	cursor: pointer;
}

.btn-light{
	color: var(--dark);
	background-color: var(--light);
}
.btn-light:hover{
	background-color:var(--light-hover);
}

.btn-light:active{
	background-color:var(--light-active);
}

.btn-dark{
	color: var(--light);
	background-color: var(--dark);
}
.btn-dark:hover{
	background-color:var(--dark-hover);
}

.btn-dark:active{
	background-color:var(--dark-active);
}

input[type='checkbox'] {
    width: calc(20px * var(--scale));
    height: calc(20px * var(--scale));
	cursor: pointer;
}


/* Settings Window... */

.settings-list{
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(4px * var(--scale));
}

.settings-list-item{
	padding: calc(12px * var(--scale)) calc(16px * var(--scale));
}

.settings-header{
	font-size: calc(20px * var(--scale));
	padding-bottom: calc(16px * var(--scale));
}

.settings-list-item:not(:last-child){
	border-bottom: calc(1px * var(--scale)) solid var(--border-color);
}

#current-theme{
	padding: calc(4px * var(--scale)) calc(12px * var(--scale));
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(6px * var(--scale));
}

#overall-size-warning{
	color: rgb(102, 77, 3);
	background-color: rgb(255, 243, 205);
	padding: calc(6px * var(--scale)) calc(12px * var(--scale));
	margin-top: calc(10px * var(--scale));
	border-radius: calc(6px * var(--scale));
}

/* ...Settings Window */


/* Search Window... */

.search-tab-container{
	height:0;
	flex-grow:1;
	display:flex;
	overflow-x:scroll;
	scroll-snap-type:x mandatory
}

.search-tab-container::-webkit-scrollbar{
	display: none;
}

.search-tab-content{
	width: 100%;
	min-width: 100%;
	height: 100%;
	scroll-snap-align:start;
	display: flex;
	flex-direction: column;
}

.keypad > div{
	/*height: 60px;*/
	display: flex;
}

.keypad > div{
}

.keypad > div > button{
	width: 0;
	flex-grow: 1;
	display: flex;
	justify-content: center;
	align-items: center;
	transition: background-color 300ms;
	cursor: pointer;
	font-size: calc(36px * var(--scale));
	font-weight: bold;
	color: var(--dark);
	
	background-color: var(--light);
	border: none;
	
	padding: calc(4px * var(--scale));
}

.keypad > div > button[checked='true'] > div {
    color: var(--light);
    background-color: var(--dark);
	border-radius: calc(6px * var(--scale));
	padding: calc(4px * var(--scale)) calc(8px * var(--scale));
	
}

.keypad > div:last-child > button{
	background-color: var(--grey);
	border-radius: calc(6px * var(--scale));
	margin: calc(8px * var(--scale));
}

@media (hover: hover){
	.keypad > div > button:hover{
		background-color: var(--light-hover);
	}
}

.keypad > div > button:active{
	background-color: var(--light-active);
}


/* ...Search Window */



/* Panels... */

.panel{
	position: absolute;
	left: 0;
	bottom: 0;
	right: 0;
	background-color: var(--bg-color);
	z-index: 200;
}

.panel.showing{
	animation: panel-showing 200ms ease-in forwards;
	pointer-events: none;
}

.panel.hiding{
	animation: panel-hiding 200ms ease-out forwards;
	pointer-events: none;
}

.panel.hidden{
	opacity: 0;
	pointer-events: none;
}

@keyframes panel-showing {
  0% { opacity: 0; transform: translateY(calc(50px * var(--scale))) }
  100% { opacity: 1; transform: translateY(0px); }
}

@keyframes panel-hiding {
  0% { opacity: 1; transform: translateY(0px); }
  100% { opacity: 0; transform: translateY(calc(50px * var(--scale))) }
}

/* ...Panels */

.border-top{
	border-top: calc(1px * var(--scale)) solid var(--border-color);
}

.border-bottom{
	border-bottom: calc(1px * var(--scale)) solid var(--border-color);
}


.info-item{
	padding: calc(8px * var(--scale)) calc(16px * var(--scale));
}




#video-container{
	opacity: 0;
	position: absolute;
	right: 0;
	bottom: calc(calc(50px * var(--scale)) + env(safe-area-inset-bottom, 0));
	overflow: hidden;
	width: calc(40px * var(--scale));
	height: calc(40px * var(--scale));
	pointer-events: none;
}

.developer-mode #video-container{
	opacity: 0.1;
}

#video-container video {
	width: calc(40px * var(--scale));
	height: calc(40px * var(--scale));
}

/* Break within a verse (the ^h marker in the hymn data) — a vertical gap */
.hymn-verse-break{
	height: 0.7em;
}

.hymn-verse-reference-container{
	padding-left: calc(46px * var(--scale));
	display: flex;
	flex-wrap: wrap;
}

.hymn-verse-reference-item{
	color: var(--dark-hover) !important;
	padding: calc(2px * var(--scale)) calc(8px * var(--scale));
	cursor: pointer;
}
.hymn-verse-reference-item:hover{
	color: var(--text-color) !important;
}
.hymn-verse-reference-item:active{
	color: var(--link-color) !important;
}

.tune-item{
	background-color: var(--light-hover);
	padding: calc(2px * var(--scale)) calc(4px * var(--scale));
	border-radius: calc(4px * var(--scale));
	margin-bottom: calc(4px * var(--scale));
	cursor: pointer;
}
.tune-item:active{
	background-color: var(--light-active);
}
.tune-item.active{
	background-color: var(--dark);
	color: var(--light);
}

#bookmark-list > div{
	display: flex;
	padding: calc(8px * var(--scale)) calc(16px * var(--scale));
	border-bottom: calc(1px * var(--scale)) solid var(--border-color);
	cursor: pointer;
	transition: background-color 300ms;
}

#bookmark-list > div:hover{
	background-color: rgba(0, 0, 0, 0.1);
}

#bookmark-list > div:active{
	background-color: rgba(0, 0, 0, 0.3);
}

#bookmark-list > div > div:nth-child(1){
	font-weight: bold;
	margin-right: calc(8px * var(--scale));
}

#search-history-list > div{
	padding: calc(8px * var(--scale)) calc(16px * var(--scale));
	border-bottom: calc(1px * var(--scale)) solid var(--border-color);
	cursor: pointer;
	transition: background-color 300ms;
}

#search-history-list > div > div{
	display: flex;
	gap: calc(4px * var(--scale));
}

#search-history-list > div:hover{
	background-color: rgba(0, 0, 0, 0.1);
}

#search-history-list > div:active{
	background-color: rgba(0, 0, 0, 0.3);
}

#search-history-list > div > div > div:nth-child(1){
	font-weight: bold;
	margin-right: calc(8px * var(--scale));
}


#install-main button{
	border: none;
	color: white;
	font-size: 28px;
	width: 100%;
	height: 80px;
	margin-bottom: calc(12px * var(--scale));
	border-radius: 6px;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.install{
	position: fixed;
	left: 0;
	top: 0;
	right: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
}

.install-header{
	height: 60px;
	background-color: var(--theme-color-2);
	color: white;
	font-size: 20px;
	display: flex;
	align-items: center;
}

.install-content{
	height: 0;
	flex-grow: 1;
	overflow-y: auto;
	padding: calc(24px * var(--scale));
}

.install-content .step{
	font-weight: bold;
	margin-bottom: calc(8px * var(--scale));
}

.install-content .image{
	display: flex;
	justify-content: center;
	margin-bottom: calc(16px * var(--scale));
}

/* ==========================================================================
   Guitar chords
   ========================================================================== */

.light{
	--chord-color: #b4461f;
	--chord-soft: #fbece5;
	--chord-surface: #f2f4f7;
	--chord-muted: #5c6672;
	--chord-accent: #193E68;
	--chord-hover: rgba(0, 0, 0, 0.06);
	--chord-active: rgba(0, 0, 0, 0.12);
	--chord-danger: #c0392b;
	--chord-backdrop: rgba(0, 0, 0, 0.3);
	--chord-shadow-sheet: 0 -4px 20px rgba(0, 0, 0, 0.18);
	--chord-shadow-menu: 0 6px 20px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.12);
}
.dark{
	--chord-color: #f0a27c;
	--chord-soft: #3b2a22;
	--chord-surface: #2a2f35;
	--chord-muted: #a9b2bd;
	--chord-accent: #8fb7e6;
	--chord-hover: rgba(255, 255, 255, 0.08);
	--chord-active: rgba(255, 255, 255, 0.16);
	--chord-danger: #ff8a80;
	--chord-backdrop: rgba(0, 0, 0, 0.5);
	--chord-shadow-sheet: 0 -4px 24px rgba(0, 0, 0, 0.5);
	--chord-shadow-menu: 0 8px 24px rgba(0, 0, 0, 0.5), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.chord-icon{
	width: calc(18px * var(--scale));
	height: calc(18px * var(--scale));
	flex: none;
	fill: currentColor;
}

.chord-btn{
	display: inline-flex;
	align-items: center;
	gap: calc(6px * var(--scale));
	font-size: calc(15px * var(--scale));
}
.chord-btn-danger{
	border: none;
	background: none;
	color: var(--chord-danger);
	padding: calc(6px * var(--scale)) calc(8px * var(--scale));
	border-radius: calc(6px * var(--scale));
	cursor: pointer;
}
.chord-btn-danger:hover{ background: var(--chord-hover); }

#chord-editor select,
#chord-editor textarea{
	font-family: inherit;
	font-size: calc(16px * var(--scale));
	color: var(--text-color);
	background-color: var(--bg-color);
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(8px * var(--scale));
	padding: calc(8px * var(--scale)) calc(10px * var(--scale));
}
#chord-editor textarea{
	width: 100%;
	box-sizing: border-box;
	resize: vertical;
	line-height: 1.4;
}

.chord-sheet-close{
	display: grid;
	place-items: center;
	width: calc(32px * var(--scale));
	height: calc(32px * var(--scale));
	border: none;
	border-radius: 50%;
	background: var(--chord-surface);
	color: var(--text-color);
	cursor: pointer;
}
.chord-segmented{
	display: inline-flex;
	padding: calc(2px * var(--scale));
	border-radius: calc(8px * var(--scale));
	background: var(--chord-surface);
}
.chord-segmented button{
	border: none;
	background: transparent;
	color: var(--text-color);
	padding: calc(6px * var(--scale)) calc(12px * var(--scale));
	border-radius: calc(6px * var(--scale));
	font-size: calc(14px * var(--scale));
	cursor: pointer;
}
.chord-segmented button.active{
	background: var(--bg-color);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	font-weight: 600;
}

#chord-toast{
	position: fixed;
	left: 50%;
	bottom: calc(64px * var(--scale) + env(safe-area-inset-bottom, 0px));
	transform: translate(-50%, calc(12px * var(--scale)));
	z-index: 500;
	display: flex;
	align-items: center;
	gap: calc(12px * var(--scale));
	width: max-content;
	max-width: calc(100% - 32px);
	box-sizing: border-box;
	padding: calc(10px * var(--scale)) calc(16px * var(--scale));
	border-radius: calc(12px * var(--scale));
	background: var(--text-color);
	color: var(--bg-color);
	font-size: calc(14px * var(--scale));
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
	opacity: 0;
	pointer-events: none;
	transition: opacity 200ms, transform 200ms;
}
#chord-toast.visible{
	opacity: 1;
	pointer-events: auto;
	transform: translate(-50%, 0);
}
#chord-toast button{
	border: none;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	padding: 0;
}

#chord-editor{
	height: 0;
	flex-grow: 1;
	overflow-y: auto;
}
   ========================================================================== */


.chord-label{
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: calc(11px * var(--scale));
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--chord-muted);
}

/* Chords above syllables: each syllable is a column with its chord on top */
.chord-word{
	display: inline-flex;
	align-items: flex-end;
	white-space: nowrap;
	text-indent: 0;
	/* Line words up by the bottom of their text, whether or not they have a chord */
	vertical-align: bottom;
}
.chord-syllable{
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	border-radius: calc(4px * var(--scale));
}
.chord-above{
	height: 1.3em;
	min-height: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-weight: 700;
	font-size: 0.85em;
	line-height: 1.3em;
	color: var(--chord-color);
	white-space: nowrap;
	padding-right: .35em;
}
.chord-text{
	white-space: pre;
}
.chord-syllable.overhang .chord-above{
	width: 0;
	overflow: visible;
}
.chord-syllable.gap .chord-text::after{
	content: "–";
	color: var(--chord-muted);
	padding: 0 .1em;
}
.chord-verse.no-chords .chord-above,
.chord-verse .chord-line:not(:has(.chord-name)) .chord-above{
	display: none;
}
.chord-verse:not(.no-chords) .verse-number{
	padding-top: 1.1em;
}
.chord-line{
	margin-bottom: calc(2px * var(--scale));
}

.chord-name{
	line-height: inherit;
	vertical-align: top;
	border: none;
	background: none;
	padding: 0 calc(2px * var(--scale));
	margin-left: calc(-2px * var(--scale));
	border-radius: calc(4px * var(--scale));
	font: inherit;
	color: inherit;
	cursor: pointer;
}
.chord-name:hover{ background: var(--chord-soft); }
.chord-name:active{ background: var(--chord-active); }

/* Key, transpose and capo at the top of a hymn with chords */
.chord-bar{
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
	margin: 0 0 calc(12px * var(--scale)) calc(4px * var(--scale));
	padding: calc(8px * var(--scale)) calc(10px * var(--scale));
	border-radius: calc(8px * var(--scale));
	background: var(--chord-surface);
	font-size: calc(14px * var(--scale));
}
.chord-bar-row{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: calc(6px * var(--scale)) calc(14px * var(--scale));
}
.chord-bar-group{
	display: inline-flex;
	align-items: center;
	gap: calc(6px * var(--scale));
}
.chord-key{
	font-weight: 700;
	font-size: calc(16px * var(--scale));
	color: var(--chord-color);
}
.chord-stepper{
	display: inline-flex;
	align-items: center;
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(8px * var(--scale));
	background: var(--bg-color);
	overflow: hidden;
}
.chord-stepper button{
	border: none;
	background: transparent;
	color: var(--text-color);
	width: calc(32px * var(--scale));
	height: calc(30px * var(--scale));
	font-size: calc(18px * var(--scale));
	line-height: 1;
	cursor: pointer;
}
.chord-stepper button:hover{ background: var(--chord-hover); }
.chord-stepper button:active{ background: var(--chord-active); }
.chord-stepper button:disabled{ opacity: .35; cursor: default; background: transparent; }
.chord-stepper output{
	min-width: calc(30px * var(--scale));
	text-align: center;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}
.chord-edit-button{
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	gap: calc(4px * var(--scale));
	border: none;
	background: transparent;
	color: var(--chord-accent);
	font-size: calc(14px * var(--scale));
	font-weight: 600;
	padding: calc(4px * var(--scale)) calc(8px * var(--scale));
	border-radius: calc(8px * var(--scale));
	cursor: pointer;
}
.chord-edit-button:hover{ background: var(--chord-hover); }
.chord-bar-summary{
	margin-top: calc(6px * var(--scale));
	color: var(--chord-muted);
	font-size: calc(13px * var(--scale));
}
.chord-link{
	border: none;
	background: none;
	padding: 0;
	color: var(--chord-accent);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.chord-notes{
	margin-top: calc(8px * var(--scale));
	padding-top: calc(8px * var(--scale));
	border-top: calc(1px * var(--scale)) solid var(--border-color);
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	font-size: calc(14px * var(--scale));
}

/* Strip along the bottom with the shape of a tapped chord. It doesn't block the hymn,
   so other chords can be tapped while it's open. */
#chord-sheet{
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	max-width: calc(560px * var(--scale));
	margin: 0 auto;
	z-index: 401;
	background: var(--bg-color);
	color: var(--text-color);
	border-radius: calc(12px * var(--scale)) calc(12px * var(--scale)) 0 0;
	box-shadow: var(--chord-shadow-sheet);
	padding: calc(10px * var(--scale)) calc(12px * var(--scale)) calc(10px * var(--scale) + env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
	transform: translateY(100%);
	visibility: hidden;
	transition: transform 200ms cubic-bezier(.2, 0, 0, 1), visibility 0s linear 200ms;
}
#chord-sheet.above-footer{
	padding-bottom: calc(10px * var(--scale));
	border-bottom: calc(1px * var(--scale)) solid var(--border-color);
}
#chord-sheet.visible{
	transform: translateY(0);
	visibility: visible;
	transition: transform 200ms cubic-bezier(.2, 0, 0, 1);
}
/* Room to scroll the last lines of a hymn above the strip */
.chord-strip-open .hymn-page{
	padding-bottom: calc(var(--chord-strip-height, 0px) + 8px * var(--scale));
}
.chord-strip-open .chord-name{
	scroll-margin-bottom: calc(var(--chord-strip-height, 0px) + 12px * var(--scale));
}
.chord-name.current{
	box-shadow: 0 0 0 calc(2px * var(--scale)) var(--chord-color);
}
.chord-strip{
	display: flex;
	align-items: center;
	gap: calc(10px * var(--scale));
}
.chord-strip-shape{
	flex: none;
	border: none;
	background: none;
	padding: 0;
	color: inherit;
	cursor: pointer;
	border-radius: calc(8px * var(--scale));
}
/* Swiped and tapped like strings, so it mustn't scroll or select */
.chord-strip-shape[role="button"]{
	touch-action: none;
	user-select: none;
	-webkit-user-select: none;
	-webkit-touch-callout: none;
}
.chord-strip-shape .chord-diagram{ display: block; }
.chord-diagram-string.muted{ opacity: .3; }
.chord-diagram-string.ringing{
	animation: chord-string-ring 600ms ease-out;
}
@keyframes chord-string-ring{
	0%{ stroke: var(--chord-color); stroke-width: 3; }
	100%{ stroke: var(--text-color); stroke-width: 1; }
}
@media (prefers-reduced-motion: reduce){
	.chord-diagram-string.ringing{ animation: none; }
}
.chord-strip-arrows .chord-sheet-close{
	touch-action: manipulation;
}
.chord-strip-none{
	width: calc(102px * var(--scale));
	text-align: center;
	color: var(--chord-muted);
	font-size: calc(13px * var(--scale));
}
.chord-strip-info{
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: calc(6px * var(--scale));
}
.chord-strip-name-row{
	display: flex;
	align-items: baseline;
	gap: calc(8px * var(--scale));
}
.chord-strip-name-row .chord-diagram-name{
	font-size: calc(26px * var(--scale));
	line-height: 1;
}
.chord-strip-count{
	color: var(--chord-muted);
	font-size: calc(13px * var(--scale));
}
.chord-strip-info .chord-segmented{
	flex-wrap: wrap;
}
.chord-strip-info .chord-segmented button{
	padding: calc(4px * var(--scale)) calc(8px * var(--scale));
	font-size: calc(13px * var(--scale));
}
.chord-strip-info .chord-diagram-tones,
.chord-strip-info .chord-diagram-caption{
	font-size: calc(13px * var(--scale));
	text-align: left;
}
.chord-strip-nav{
	flex: none;
	align-self: stretch;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: space-between;
	gap: calc(8px * var(--scale));
}
.chord-strip-arrows{
	display: flex;
	gap: calc(6px * var(--scale));
}
.chord-strip-arrows .chord-sheet-close{
	width: calc(40px * var(--scale));
	height: calc(40px * var(--scale));
}
.chord-sheet-close:disabled{
	opacity: .35;
	cursor: default;
}

/* Sound on or off for picking chords in the editor */
.chord-sound-button{
	display: grid;
	place-items: center;
	width: calc(36px * var(--scale));
	height: calc(36px * var(--scale));
	border: none;
	border-radius: 50%;
	background: none;
	color: inherit;
	cursor: pointer;
}
.chord-sound-button[aria-pressed="false"]{ opacity: .6; }
.chord-sound-button .chord-icon{
	width: calc(20px * var(--scale));
	height: calc(20px * var(--scale));
}

.chord-diagram text{ fill: var(--chord-muted); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif; }
.chord-diagram-line{ stroke: var(--text-color); stroke-width: 1; }
.chord-diagram-ink{ fill: var(--text-color); }
.chord-diagram-dot{ fill: var(--chord-color); }
.chord-diagram-open{ fill: none; stroke: var(--text-color); }
.chord-diagram-muted{ stroke: var(--chord-muted); }

.chord-diagram-view{
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: calc(10px * var(--scale));
	padding-bottom: calc(8px * var(--scale));
}
.chord-diagram-name{
	font-size: calc(32px * var(--scale));
	font-weight: 700;
	color: var(--chord-color);
}
.chord-diagram-tones{
	color: var(--chord-muted);
	font-size: calc(14px * var(--scale));
}
.chord-diagram-tones b{ color: var(--text-color); }
.chord-diagram-caption{
	color: var(--chord-muted);
	font-size: calc(13px * var(--scale));
	text-align: center;
	max-width: 34ch;
}

.chord-chip{
	min-width: calc(40px * var(--scale));
	height: calc(38px * var(--scale));
	padding: 0 calc(10px * var(--scale));
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(8px * var(--scale));
	background: var(--bg-color);
	color: var(--text-color);
	font-size: calc(15px * var(--scale));
	font-weight: 600;
	cursor: pointer;
}
.chord-chip:hover{ background: var(--chord-hover); }
.chord-chip[aria-pressed="true"]{
	background: var(--chord-color);
	border-color: var(--chord-color);
	color: var(--bg-color);
}
/* Chord input under a syllable in the editor */
.chord-popover{
	position: absolute;
	z-index: 5;
	width: max-content;
	max-width: min(calc(100% - 16px), calc(330px * var(--scale)));
	display: flex;
	flex-direction: column;
	gap: calc(6px * var(--scale));
	padding: calc(8px * var(--scale));
	box-sizing: border-box;
	background: var(--bg-color);
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(12px * var(--scale));
	box-shadow: var(--chord-shadow-menu);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.chord-popover-arrow{
	position: absolute;
	top: calc(-6px * var(--scale));
	width: calc(10px * var(--scale));
	height: calc(10px * var(--scale));
	margin-left: calc(-5px * var(--scale));
	background: var(--bg-color);
	border-left: calc(1px * var(--scale)) solid var(--border-color);
	border-top: calc(1px * var(--scale)) solid var(--border-color);
	transform: rotate(45deg);
}
.chord-popover-row{
	display: flex;
	flex-wrap: wrap;
	gap: calc(4px * var(--scale));
}
.chord-popover-row + .chord-popover-row{
	padding-top: calc(6px * var(--scale));
	border-top: calc(1px * var(--scale)) solid var(--border-color);
}
.chord-popover .chord-chip{
	min-width: calc(36px * var(--scale));
	height: calc(36px * var(--scale));
	padding: 0 calc(8px * var(--scale));
	font-size: calc(15px * var(--scale));
}
.chord-chip-remove{
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--chord-danger);
}

/* Editor window */
#chord-window .header{
	justify-content: space-between;
}
#chord-editor{
	position: relative;
	padding: calc(16px * var(--scale));
	box-sizing: border-box;
}
.chord-confirm{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: calc(8px * var(--scale));
	padding: calc(10px * var(--scale)) calc(12px * var(--scale));
	margin-bottom: calc(14px * var(--scale));
	border-radius: calc(8px * var(--scale));
	background: var(--chord-soft);
}
.chord-confirm span{
	flex: 1;
	min-width: calc(160px * var(--scale));
}
.chord-editor-settings{
	display: grid;
	gap: calc(12px * var(--scale));
	margin-bottom: calc(14px * var(--scale));
}
.chord-editor-field{
	display: grid;
	gap: calc(6px * var(--scale));
}
.chord-editor-field select{
	justify-self: start;
}
.chord-editor-tools{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: calc(8px * var(--scale));
	margin-bottom: calc(14px * var(--scale));
}
.chord-editor-hint{
	color: var(--chord-muted);
	font-size: calc(14px * var(--scale));
}
.chord-editor-hymn{
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	font-size: calc(18px * var(--scale));
	line-height: 1.2;
}
.chord-editor-verse{
	display: grid;
	grid-template-columns: calc(26px * var(--scale)) minmax(0, 1fr);
	margin-bottom: calc(16px * var(--scale));
}
.chord-editor-number{
	padding-top: 1.1em;
	color: var(--chord-muted);
	font-weight: 600;
}
.chord-editor-lines{
	min-width: 0;
}
.chord-editor-hymn .chord-syllable{
	cursor: pointer;
	padding: 0 1px;
}
.chord-editor-hymn .chord-syllable:hover{ background: var(--chord-hover); }
.chord-editor-hymn .chord-syllable:not(.chord-between):has(+ .chord-syllable:not(.chord-between)) .chord-text::after{
	content: "·";
	color: var(--chord-muted);
	padding: 0 1px;
}
.chord-editor-hymn .chord-syllable.selected{
	background: var(--chord-soft);
	box-shadow: inset 0 -2px 0 var(--chord-color);
}
.chord-editor-hymn .chord-above:empty::before{
	content: "+";
	color: var(--chord-muted);
	opacity: .35;
	font-weight: 400;
}
.chord-editor-hymn .chord-syllable:hover .chord-above:empty::before{ opacity: .8; }
.chord-editor-footer{
	margin-top: calc(8px * var(--scale));
	padding-top: calc(12px * var(--scale));
	border-top: calc(1px * var(--scale)) solid var(--border-color);
}

/* Key button and circle-of-fifths wheel in the editor */
.chord-key-button{
	justify-self: start;
	display: inline-flex;
	align-items: center;
	gap: calc(6px * var(--scale));
	padding: calc(8px * var(--scale)) calc(10px * var(--scale)) calc(8px * var(--scale)) calc(14px * var(--scale));
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(8px * var(--scale));
	background: var(--bg-color);
	color: var(--text-color);
	font-size: calc(16px * var(--scale));
	cursor: pointer;
}
.chord-key-button:hover{ background: var(--chord-hover); }
.chord-key-button-name{
	font-weight: 600;
}
.chord-key-button-arrow{
	transition: transform 200ms;
}
.chord-key-button[aria-expanded="true"] .chord-key-button-arrow{
	transform: rotate(180deg);
}

.chord-key-wheel{
	display: flex;
	justify-content: center;
	padding-top: calc(8px * var(--scale));
}
.chord-key-wheel svg{
	width: min(100%, calc(280px * var(--scale)));
	height: auto;
	overflow: visible;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.chord-key-slice{
	cursor: pointer;
	outline: none;
}
.chord-key-slice path{
	fill: var(--bg-color);
	stroke: var(--border-color);
	stroke-width: 1;
	transition: fill 120ms;
}
.chord-key-slice.minor path{
	fill: var(--chord-surface);
}
.chord-key-slice:hover path{
	fill: var(--chord-soft);
}
.chord-key-slice:focus-visible path{
	stroke: var(--chord-accent);
	stroke-width: 2;
}
.chord-key-slice text{
	fill: var(--text-color);
	font-size: 15px;
	font-weight: 600;
	text-anchor: middle;
	dominant-baseline: central;
	pointer-events: none;
}
.chord-key-slice.minor text{
	font-size: 12px;
	font-weight: 500;
	fill: var(--chord-muted);
}
.chord-key-slice.selected path{
	fill: var(--chord-color);
	stroke: var(--chord-color);
}
.chord-key-slice.selected text{
	fill: var(--bg-color);
}
.chord-key-wheel-name{
	fill: var(--chord-color);
	font-size: 24px;
	font-weight: 700;
	text-anchor: middle;
	dominant-baseline: central;
}
.chord-key-wheel-mode{
	fill: var(--chord-muted);
	font-size: 11px;
	text-anchor: middle;
	dominant-baseline: central;
	letter-spacing: .06em;
	text-transform: uppercase;
}

/* Marks guitar chords as an early feature */
.chord-insider-badge{
	display: inline-block;
	margin-left: calc(8px * var(--scale));
	padding: 0 calc(7px * var(--scale));
	border-radius: 999px;
	background: var(--chord-soft);
	color: var(--chord-color);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: calc(11px * var(--scale));
	font-weight: 700;
	line-height: 1.7;
	letter-spacing: .06em;
	text-transform: uppercase;
	vertical-align: middle;
}
.chord-bar .chord-insider-badge{
	margin-left: auto;
}
.chord-bar .chord-insider-badge + .chord-edit-button{
	margin-left: 0;
}
#chord-window-title .chord-insider-badge{
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
}

/* Key button with the transpose control beside it */
.chord-editor-key-row{
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: calc(8px * var(--scale)) calc(16px * var(--scale));
}
.chord-editor-key-note{
	color: var(--chord-muted);
	font-size: calc(13px * var(--scale));
}

/* Who changed a hymn's chords and when */
.chord-last-edited{
	margin-bottom: calc(12px * var(--scale));
	color: var(--chord-muted);
	font-size: calc(13px * var(--scale));
}
.chord-history{
	margin-top: calc(8px * var(--scale));
	padding-top: calc(12px * var(--scale));
	border-top: calc(1px * var(--scale)) solid var(--border-color);
	display: grid;
	gap: calc(8px * var(--scale));
	font-size: calc(14px * var(--scale));
}
.chord-history-empty{
	color: var(--chord-muted);
}
.chord-history-list{
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: calc(6px * var(--scale));
}
.chord-history-list li{
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: calc(6px * var(--scale));
}
.chord-history-who{
	font-weight: 600;
}
.chord-history-list time{
	margin-left: auto;
	color: var(--chord-muted);
	font-size: calc(13px * var(--scale));
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* Shown when someone else saved a hymn's chords before this device could */
.chord-conflict{
	display: grid;
	gap: calc(6px * var(--scale));
	margin-bottom: calc(10px * var(--scale));
	padding: calc(10px * var(--scale)) calc(12px * var(--scale));
	border-radius: calc(8px * var(--scale));
	background: var(--chord-soft);
	border: calc(1px * var(--scale)) solid var(--chord-color);
	font-size: calc(14px * var(--scale));
}
.chord-conflict-title{
	font-weight: 700;
}
.chord-conflict-actions{
	display: flex;
	flex-wrap: wrap;
	gap: calc(8px * var(--scale));
}

/* Whose chords: one button per version at the top of a hymn */
.chord-bar-row + .chord-bar-row{
	margin-top: calc(8px * var(--scale));
}
.chord-versions{
	display: inline-flex;
	flex-wrap: wrap;
	gap: calc(2px * var(--scale));
	padding: calc(2px * var(--scale));
	border: calc(1px * var(--scale)) solid var(--border-color);
	border-radius: calc(9px * var(--scale));
	background: var(--bg-color);
}
.chord-versions button{
	display: inline-flex;
	align-items: baseline;
	gap: calc(5px * var(--scale));
	border: none;
	background: transparent;
	color: var(--text-color);
	font-size: calc(14px * var(--scale));
	font-weight: 600;
	padding: calc(5px * var(--scale)) calc(10px * var(--scale));
	border-radius: calc(7px * var(--scale));
	cursor: pointer;
}
.chord-versions button:hover{ background: var(--chord-hover); }
.chord-versions-key{
	font-weight: 700;
	color: var(--chord-color);
}
.chord-versions button[aria-pressed="true"]{
	background: var(--chord-color);
	color: var(--bg-color);
}
.chord-versions button[aria-pressed="true"] .chord-versions-key{
	color: inherit;
	opacity: .85;
}

/* Asking before your chords are replaced with someone else's */
.chord-copy-ask{
	display: grid;
	gap: calc(8px * var(--scale));
	margin-top: calc(8px * var(--scale));
	padding: calc(10px * var(--scale));
	border-radius: calc(8px * var(--scale));
	background: var(--bg-color);
	border: calc(1px * var(--scale)) solid var(--border-color);
}
.chord-copy-ask-actions{
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: calc(8px * var(--scale));
}
.chord-btn-solid-danger{
	border: none;
	background: var(--chord-danger);
	color: var(--bg-color);
	font-weight: 600;
	padding: calc(6px * var(--scale)) calc(12px * var(--scale));
	border-radius: calc(6px * var(--scale));
	cursor: pointer;
}

/* Editor: starting from someone else's chords, and deleting your own */
.chord-from{
	margin-bottom: calc(12px * var(--scale));
	padding: calc(10px * var(--scale)) calc(12px * var(--scale));
	border-radius: calc(8px * var(--scale));
	background: var(--chord-soft);
	font-size: calc(14px * var(--scale));
}
.chord-editor-footer-note{
	padding: calc(2px * var(--scale)) calc(8px * var(--scale));
	color: var(--chord-muted);
	font-size: calc(13px * var(--scale));
}

/* More than one chord on a syllable */
.chord-name + .chord-name{
	margin-left: calc(4px * var(--scale));
}
.chord-slot-empty{
	color: var(--chord-muted);
	font-weight: 400;
}
.chord-slots{
	align-items: center;
}
.chord-popover .chord-slot{
	min-width: calc(44px * var(--scale));
	color: var(--chord-color);
	border-style: dashed;
}
.chord-popover .chord-slot[aria-current="true"]{
	border: calc(2px * var(--scale)) solid var(--chord-color);
	background: var(--chord-soft);
}
.chord-slots-then{
	color: var(--chord-muted);
	font-size: calc(13px * var(--scale));
}
.chord-popover .chord-slot-add{
	color: var(--chord-accent);
	border-style: dashed;
	font-size: calc(18px * var(--scale));
}

/* A chord in the space after a word: a column of its own, over blank space */
.chord-between{
	padding-left: .3em;
}
.chord-between .chord-text{
	min-width: .2em;
}
.chord-editor-hymn .chord-syllable.chord-between{
	padding: 0 calc(2px * var(--scale));
	margin: 0 calc(1px * var(--scale));
}
.chord-editor-hymn .chord-between .chord-above:empty::before{
	content: "·";
	font-weight: 700;
	opacity: .6;
}
.chord-editor-hymn .chord-between .chord-text{
	min-width: .55em;
	border-bottom: calc(1.5px * var(--scale)) dotted var(--border-color);
}
.chord-editor-hymn .chord-between.selected .chord-text{
	border-bottom-color: var(--chord-color);
}
.chord-popover-place{
	padding: 0 calc(2px * var(--scale));
	color: var(--chord-muted);
	font-size: calc(13px * var(--scale));
}
.chord-popover-place b{
	color: var(--text-color);
	font-weight: 600;
}
