@font-face {
   font-family: "GHKTaunggyi";
   src: url("/css/fonts/GHKTaunggyi.woff2") format("woff2"),
   url("/css/fonts/GHKTaunggyi.woff") format("woff"),
   url("/css/fonts/GHKTaunggyi.ttf") format("truetype"),
   url("/css/fonts/GHKTaunggyi.svg#GHKTaunggyi") format("svg"),
   url("/css/fonts/GHKTaunggyi.eot?#iefix") format("embedded-opentype");
   font-display: swap;
}
@font-face {
   font-family: "GHKTachileik";
   src: url("/css/fonts/GHKTachileik.woff2") format("woff2"),
   url("/css/fonts/GHKTachileik.woff") format("woff"),
   url("/css/fonts/GHKTachileik.ttf") format("truetype"),
   url("/css/fonts/GHKTachileik.svg#GHKTachileik") format("svg"),
   url("/css/fonts/GHKTachileik.eot?#iefix") format("embedded-opentype");
   font-display: swap;
}
@font-face {
   font-family: "GHKKengtung";
   src: url("/css/fonts/GHKKengtung.woff2") format("woff2"),
   url("/css/fonts/GHKKengtung.woff") format("woff"),
   url("/css/fonts/GHKKengtung.ttf") format("truetype"),
   url("/css/fonts/GHKKengtung.svg#GHKKengtung") format("svg"),
   url("/css/fonts/GHKKengtung.eot?#iefix") format("embedded-opentype");
   font-display: swap;
}

:root {
   --bs-body-font-family: "GHKTaunggyi", sans-serif;
}

body {
   font-family: "GHKTaunggyi", sans-serif;
}

.navbar,
.card,
.table,
.list-group-item,
.btn,
.form-control,
.form-select,
.dropdown-menu,
.dropdown-item {
   font-family: "GHKTaunggyi", sans-serif;
}

button,
input,
select,
textarea {
   font-family: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
   font-family: "GHKKengtung", "GHKTaunggyi", sans-serif;
}

.backend-font,
.backend-font div,
.backend-font span,
.backend-font p,
.backend-font a,
.backend-font button,
.backend-font input,
.backend-font select,
.backend-font textarea,
.backend-font label,
.backend-font h1,
.backend-font h2,
.backend-font h3,
.backend-font h4,
.backend-font h5,
.backend-font h6,
.backend-font th,
.backend-font td,
.backend-font li,
.backend-font small,
.backend-font strong {
   font-family: "GHKTaunggyi", sans-serif !important;
}

.backend-font .fa-solid,
.backend-font .fa-solid::before {
   font-family: "Font Awesome 6 Free" !important;
   font-weight: 900 !important;
}

.backend-font .fa-regular,
.backend-font .fa-regular::before {
   font-family: "Font Awesome 6 Free" !important;
   font-weight: 400 !important;
}

.backend-font .fa-brands,
.backend-font .fa-brands::before {
   font-family: "Font Awesome 6 Brands" !important;
   font-weight: 400 !important;
}

.practice-shell {
   max-width: 1320px;
}

.practice-filters {
   margin-top: 0.1rem;
   margin-bottom: 0.1rem;
}

.practice-filters .input-group-text,
.practice-filters .form-select {
   padding-top: 0.2rem;
   padding-bottom: 0.2rem;
   line-height: 1.4;
}

.practice-filters .input-group-text {
   margin-bottom: 0;
}

.typing-reference {
   font-size: 1.35rem;
   line-height: 1.9;
   letter-spacing: 0.02em;
   white-space: pre-wrap;
   word-break: break-word;
   height: calc(1.9em * 3 + 1.2rem);
   overflow-y: auto;
}

.typing-reference .char-correct {
   background-color: rgba(25, 135, 84, 0.18);
   color: #146c43;
}

.typing-reference .char-wrong {
   background-color: rgba(220, 53, 69, 0.18);
   color: #b02a37;
}

.typing-reference .char-current {
   background-color: rgba(13, 110, 253, 0.18);
   border-bottom: 2px solid #0d6efd;
}

.typing-reference .char-special {
   color: #6c757d;
   font-style: italic;
}

.typing-area {
   min-height: 180px;
   resize: vertical;
   font-size: 1.05rem;
}

.stat-card h2 {
   font-size: 1.8rem;
   font-weight: 700;
}

.metric-card {
   border: 1px solid #e9ecef;
   border-radius: 9999px;
   background: #fff;
   width: 6.3rem;
   height: 6.3rem;
   padding: 0.35rem;
   font-size: 0.78rem;
   font-weight: 600;
   box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.08);
   display: inline-flex;
   flex-direction: column;
   align-items: center;
   justify-content: center;
   text-align: center;
   line-height: 1.05;
}

.metric-card small {
   display: block;
   font-size: 0.72rem;
   color: #6c757d;
   margin-bottom: 0.2rem;
}

.metric-card span {
   display: block;
   font-size: 1.55rem;
   font-weight: 700;
}

.metrics-overlay {
   position: fixed;
   top: 8.4rem;
   right: 0.85rem;
   z-index: 1040;
   display: flex;
   flex-direction: column;
   align-items: flex-end;
   gap: 0.45rem;
   max-width: min(92vw, 7rem);
}

@media (max-width: 991.98px) {
   .metrics-overlay {
      position: static;
      margin-bottom: 0.75rem;
      max-width: 100%;
      flex-direction: row;
      justify-content: flex-start;
      align-items: center;
      flex-wrap: wrap;
   }
}

.navbar-flag {
   width: 18px;
   height: 18px;
   object-fit: cover;
   border-radius: 50%;
   border: 1px solid rgba(255, 255, 255, 0.45);
}

.site-icon {
   width: 40px;
   height: 40px;
   object-fit: cover;
   border-radius: 4px;
   vertical-align: middle;
}

.app-navbar {
   min-height: 52px;
   padding-top: 0.2rem;
   padding-bottom: 0.2rem;
}

.app-navbar .navbar-brand {
   line-height: 1.1;
   margin-bottom: 0;
   font-size: 1.05rem;
}

.app-navbar .btn.btn-sm {
   padding-top: 0.2rem;
   padding-bottom: 0.2rem;
}

.app-navbar .dropdown-menu {
   z-index: 2000;
}

.keyboard-layout {
   background: #f8f9fa;
   border: 1px solid #dee2e6;
   border-radius: 0.5rem;
   padding: 0.75rem;
}

.keyboard-row {
   display: flex;
   gap: 0.35rem;
   margin-bottom: 0.35rem;
   flex-wrap: wrap;
}

.keyboard-row:last-child {
   margin-bottom: 0;
}

.keyboard-key {
   min-width: 2.1rem;
   height: 2.1rem;
   padding: 0 0.35rem;
   border: 1px solid #ced4da;
   border-radius: 0.35rem;
   background: #fff;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   font-size: 0.85rem;
   line-height: 1;
   transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.keyboard-key.key-tab,
.keyboard-key.key-caps {
   min-width: 3.1rem;
}

.keyboard-key.key-shift {
   min-width: 4rem;
}

.keyboard-key.key-enter {
   min-width: 4.2rem;
}

.keyboard-key.key-backspace {
   min-width: 4.4rem;
}

.keyboard-key.key-ctrl,
.keyboard-key.key-alt,
.keyboard-key.key-meta {
   min-width: 2.8rem;
}

.keyboard-key.key-space {
   min-width: 10.5rem;
}

.keyboard-key.keyboard-key-active {
   background: #fd7e14;
   color: #fff;
   border-color: #c75a00;
   box-shadow: 0 0 0 2px rgba(253, 126, 20, 0.28);
}

.keyboard-key.keyboard-key-modifier {
   background: #fd7e14;
   color: #fff;
   border-color: #c75a00;
   box-shadow: 0 0 0 2px rgba(253, 126, 20, 0.2);
}

.key-hint {
   font-size: 0.92rem;
   min-height: 1.3rem;
}

.timer-up-overlay {
   position: fixed;
   inset: 0;
   background: rgba(0, 0, 0, 0.45);
   z-index: 1080;
   display: flex;
   align-items: center;
   justify-content: center;
   padding: 1rem;
}

.timer-up-card {
   width: min(100%, 420px);
   border-radius: 0.6rem;
   background: #fff;
   border: 1px solid #dee2e6;
   padding: 1rem 1.1rem;
}

.result-overlay-alert {
   position: fixed;
   top: 50%;
   left: 50%;
   transform: translate(-50%, -50%);
   z-index: 1090;
   width: min(92vw, 44rem);
   box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.16);
}
