:root {
    color-scheme: light;
    --app-bg-color: #f5f5f5;
    --app-text-color: #171717;
    --app-primary-color: #d71821;
    --app-secondary-color: #f5f5f5;
    --app-border-color: #e5e5e5;
    --app-button-color: #eee9db;
    --app-gray-color: darkgray;
    --app-btn-border-color: #cfaf89;
}

button, a {
    cursor: pointer;
}

.app-bg-black {
    background-color: #171717;
}

.app-text-black {
    color: #171717;
}

.app-bg-white {
    background-color: #f5f5f5;
}

.app-text-white {
    color: #f5f5f5;
}

.app-bg-red {
    background-color: #d71821;
}

.app-text-red {
    color: #d71821;
}

.app-link {
    color: #d71821;
    text-decoration: underline;
}

.app-link:hover {
    color: #f5f5f5;
}

.app-btn {
    align-items: center;
    background-color: var(--app-button-color);
    border: 1px solid var(--app-btn-border-color);
    border-radius: 8px;
    color: var(--app-text-color);
    display: inline-flex;
    justify-content: center;
    min-height: 45px;
    min-width: 45px !important;
    padding: .5rem 1rem;
}

.img-explain .app-btn {
	white-space: nowrap;
}

.desc-btn {
    border-radius: 50%;
    height: 35px;
    margin-right: .5rem;
    min-height: 35px;
    min-width: 35px !important;
    padding: .5rem;
    transform: translateY(6px);
    width: 35px;
}

.app-primary-btn {
    background-color: var(--app-primary-color);
    color: var(--app-secondary-color);
    border: 1px solid var(--app-border-color);
}

ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
}

body.app-body {
    margin: 0;
    min-height: 100vh;
    background: var(--app-text-color);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.app-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 2.5rem 1rem;
}

.app-shell, main > header, main > footer {
    width: min(100%, 34rem);
}

.app-brand {
    margin-bottom: 1.5rem;
    text-align: center;
}

.app-brand-mark {
    width: 3.5rem;
    height: 3.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: linear-gradient(135deg, var(--app-primary-color), #8f1016);
    color: var(--app-secondary-color);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    box-shadow: 0 18px 40px rgba(23, 23, 23, 0.22);
    border: 1px solid rgba(245, 245, 245, 0.2);
}

.app-brand-title {
    margin: 0.9rem 0 0;
    color: var(--app-secondary-color);
    font-size: clamp(1.85rem, 3vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.03em;
}

.app-brand-title small {
    color: rgba(245, 245, 245, 0.7);
    font-size: 0.95rem;
    vertical-align: super;
}

.app-brand-caption {
    margin: 0.4rem 0 0;
    color: rgba(245, 245, 245, 0.8);
    font-size: 1rem;
}

.app-card {
    background: rgba(245, 245, 245, 0.97);
    border: 1px solid var(--app-border-color);
    border-radius: .25rem;
    box-shadow: 0 24px 60px rgba(23, 23, 23, 0.12);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.app-card-body {
    padding: 2rem min(2.5rem, 4vw);
}

.app-form-title {
    margin: 0;
    color: var(--app-text-color);
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-form-copy,
.app-copy {
    margin: 0.45rem 0 0;
    color: #4b4b4b;
    font-size: 0.95rem;
    line-height: 1.6;
}

.app-form-stack {
    display: grid;
    gap: 1rem;
}

.app-field {
    display: grid;
    gap: 0.45rem;
}

.app-label {
    color: var(--app-text-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.app-input {
    width: 100%;
    border: 1px solid var(--app-text-color);
    border-radius: .25rem;
    background: #ffffff;
    padding: 0.85rem 1rem;
    color: var(--app-text-color);
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.app-input::placeholder {
    color: var(--app-gray-color);
}

.app-input:focus {
    outline: none;
    border-color: var(--app-primary-color);
    box-shadow: 0 0 0 4px rgba(215, 24, 33, 0.12);
    transform: translateY(-1px);
}

.app-toggle-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--app-text-color);
    font-size: 0.93rem;
}

.app-toggle-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    border-radius: 0.35rem;
    accent-color: var(--app-primary-color);
}

.app-button {
    width: 100%;
    align-items: center;
    border: 1px solid var(--app-border-color);
    border-radius: 9999px;
    background: var(--app-primary-color);
    color: var(--app-secondary-color);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.98rem;
    font-weight: 600;
    justify-content: center;
    min-height: 45px;
    padding: 0.9rem 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    box-shadow: 0 18px 30px rgba(23, 23, 23, 0.14);
}

.app-button:hover {
    filter: brightness(0.96);
    transform: translateY(-1px);
}

.app-button:focus-visible {
    outline: 3px solid rgba(215, 24, 33, 0.2);
    outline-offset: 3px;
}

.app-link,
.app-inline-note a {
    color: var(--app-primary-color);
    font-weight: 600;
    text-decoration: underline;
}

.app-link:hover,
.app-inline-note a:hover {
    color: var(--app-text-color);
}

.app-inline-note {
    margin: 0;
    color: #4b4b4b;
    font-size: 0.93rem;
    line-height: 1.55;
    text-align: center;
}

.app-inline-note + .app-inline-note {
    margin-top: 0.35rem;
}

.alert {
    border: 1px solid transparent;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
		text-align: center;
}

.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.alert-danger,
.alert-error {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.alert-info {
    background-color: #cff4fc;
    border-color: #b6effb;
    color: #055160;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

/* Base table styles */
.responsive-table {
  width: 100%;
  border-collapse: collapse;
}

.responsive-table th, 
.responsive-table td {
  text-align: left;
  border-bottom: 1px solid #ddd;
	padding: 0 .5rem;
}

/* Mobile styles (Screens under 600px wide) */
@media screen and (max-width: 600px) {
  /* Hide the desktop header */
  .responsive-table thead {
    display: none;
  }

  /* Force elements to behave like block cards */
  .responsive-table tr {
    display: block;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    padding: 10px;
    background: #fff;
  }

  .responsive-table td {
    display: block;
    text-align: right; /* Pushes cell data to the right */
    border-bottom: 1px dashed #eee;
    position: relative;
    padding-left: 50%; /* Makes room for the label on the left */
  }

  .responsive-table td:last-child {
    border-bottom: none;
  }

  /* Insert the header label using the data-label attribute */
  .responsive-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    width: 45%;
    text-align: left;
    font-weight: bold;
  }
}


.app-alert {
    border-radius: 1rem;
    border: 1px solid transparent;
    padding: 0.9rem 1rem;
    font-size: 0.92rem;
    line-height: 1.55;
}

.app-alert + .app-alert {
    margin-top: 0.75rem;
}

.app-alert-error {
    border-color: rgba(215, 24, 33, 0.2);
    background: rgba(215, 24, 33, 0.08);
    color: #8f1016;
}

.app-alert-success {
    border-color: rgba(40, 167, 69, 0.25);
    background: rgba(212, 237, 218, 0.9);
    color: #155724;
}

.app-alert-list {
    margin: 0;
    padding-left: 1rem;
}

.app-alert-list li + li {
    margin-top: 0.25rem;
}

.app-stack-sm {
    display: grid;
    gap: 0.85rem;
}

.toggle-container {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
}
.switch-toggle {
    display: flex;
    height: 100%;
    align-items: center;

    & + span {
        padding: .5rem 0 .5rem 1rem;
    }
}
.switch-btn, .layer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.button-check {
    position: relative;
    width: 60px;
    height: 31px;
    overflow: hidden;
    border-radius: 50px;
    -webkit-border-radius: 50px;
    -moz-border-radius: 50px;
    -ms-border-radius: 50px;
    -o-border-radius: 50px;
}
.checkbox {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
}

.switch-btn {
    z-index: 2;
}

.layer {
    width: 100%;
    background-color: #fdd1d1;
    transition: 0.3s ease all;
    z-index: 1;
}
#button-check .switch-btn:before, #button-check .switch-btn:after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 23px;
    height: 23px;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    line-height: 1;
    padding: 9px 4px;
    background-color: #00921c;
    border-radius: 50%;
    transition: 0.3s cubic-bezier(0.18, 0.89, 0.35, 1.15) all;
    display: flex;
    align-items: center;
    justify-content: center;
}

#button-check .switch-btn:before {
    content: '\02713';
}

#button-check .switch-btn:after {
    content: '\02715';
}
#button-check .checkbox + .switch-btn:after {
    background-color: #F44336;
    left: auto;
    right: 4px;
}

#button-check .checkbox:checked + .switch-btn:after {
    right: -50px;
}

#button-check .checkbox + .switch-btn:before {
    left: -50px;
}
#button-check .checkbox:checked + .switch-btn:before {
    left: 4px;
}

#button-check .checkbox:checked ~ .layer {
    background-color: #8cf7a0;
}

.app-sm {
		font-size: 0.85rem;
		padding: .25rem .5rem;
		min-width: 15px !important;
		min-height: 15px !important;
}



.menu-number {
    align-items: center;
    border: 1px solid black;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    height: 30px;
    position: absolute;
    right: 100%; top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
}

.record-btns {
    button {
        background-color: var(--app-text-color);
        border-radius: 50%;
        padding: .75rem;

        svg {
            stroke: white;
        }

        &.stop-btn svg { stroke: red; }
        &.play-btn svg { stroke: green; }
        &.play-last-btn svg { stroke: #87cefa }
    }
}

[x-cloak] { display: none !important; }

