html, body, div, a, i, button, select, option, optgroup, hr, br {
    -webkit-touch-callout: none;
    -khtml-user-select: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

@font-face {
    font-family: 'StaffClefPitchesEasy';
    src: url('../font/StaffClefPitchesEasy.eot');
    src: local('StaffClefPitchesEasy'),
    url('../font/StaffClefPitchesEasy.eot?#iefix') format('embedded-opentype'),
    url('../font/StaffClefPitchesEasy.woff2') format('woff2'),
    url('../font/StaffClefPitchesEasy.woff') format('woff'),
    url('../font/StaffClefPitchesEasy.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


.music {
    font-family: StaffClefPitchesEasy;
    font-size: 14vh;
    font-size: min(20vh,20vw,5em);
    padding-top: 0.3em;
    text-align: center;
    line-height: 40vh;
    line-height: min(40vh,5em);
}

.piano{
    cursor: pointer;
}
/* Directional and typography styling */
[dir="rtl"],
body[dir="rtl"],
[dir="rtl"] body {
    direction: rtl;
    text-align: right;
}

[dir="ltr"],
body[dir="ltr"],
[dir="ltr"] body {
    direction: ltr;
    text-align: left;
}

/* RTL specific adjustments for text blocks and modal elements */
[dir="rtl"] .intro-box,
[dir="rtl"] .seo-box,
[dir="rtl"] .modal-content,
[dir="rtl"] .modal-body,
[dir="rtl"] .modal-header,
[dir="rtl"] .form-group {
    direction: rtl;
    text-align: right;
}

/* Musical staff and piano keyboard must always remain strictly LTR */#testprint,
.music,
#piano-container,
.piano,
#notekeys {
    direction: ltr !important;
    text-align: center !important;
    unicode-bidi: isolate;
}

/* RTL specific adjustments for Bootstrap components */
[dir="rtl"] .hint-col {
    text-align: left !important;}

[dir="ltr"] .hint-col {
    text-align: right !important;
}

[dir="rtl"] .alert-dismissible .close {
    right: auto;
    left: 0;
}

[dir="rtl"] .modal-header .close {
    margin: -1rem auto -1rem -1rem;
    float: left;
}

[dir="rtl"] .form-check {
    padding-right: 1.25rem;
    padding-left: 0;
}

[dir="rtl"] .form-check-input {
    margin-right: -1.25rem;
    margin-left: 0;
}

[dir="rtl"] ul:not(.piano) {
    padding-right: 1.5rem;
    padding-left: 0;
}

.intro-box, .modal-body, .seo-box {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.intro-box, .seo-box {
    margin-top: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    line-height: 1.8;
}

.seo-box {
    margin-top: 2rem;
}

html, body {
    min-height: 100%;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Tahoma, "Noto Sans", Arial, sans-serif;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.site-footer {
    margin-top: auto !important;
    padding-top: 1.5rem;
    padding-bottom: 1rem;
    font-size: 0.75rem;
    user-select: text;
}
.site-footer a {
    color: #6c757d;
    text-decoration: none;
}
.site-footer a:hover {
    color: #343a40;
    text-decoration: underline;
}

/* Studio Console Top Controls */
.top-controls {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 8px 10px;
	margin: 8px 0px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05), 0 2px 4px -1px rgba(15, 23, 42, 0.03);
}

.btn-music-tool {
    height: 36px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn-music-tool:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.08);
}

.btn-music-tool:active {
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    transform: translateY(1px);
}

.lang-select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-select-wrapper .lang-icon {
    position: absolute;
    pointer-events: none;
    color: #64748b;
    z-index: 1;
}

[dir="ltr"] .lang-select-wrapper .lang-icon { left: 11px; }
[dir="rtl"] .lang-select-wrapper .lang-icon { right: 11px; }

.custom-lang-select {
    appearance: none;
    -webkit-appearance: none;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    font-size: 0.84rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.15s ease-in-out;
    background-repeat: no-repeat;
    background-size: 9px 9px;
	max-width: 8rem;
}

[dir="ltr"] .custom-lang-select { padding: 0 26px 0 32px; background-position: right 10px center; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%2364748b' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E"); }
[dir="rtl"] .custom-lang-select { padding: 0 32px 0 26px; background-position: left 10px center; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%2364748b' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E"); }

.custom-lang-select:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.custom-lang-select:focus {
    border-color: #0284c7;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Acoustic Pitch Badge */
#note_hint {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 14px;
    border-radius: 9999px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(15, 23, 42, 0.08);
    min-height: 28px;
    line-height: 1.4;
}