.eem-shell {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
    min-height: 100vh;
}

.eem-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #ccc;
}

.eem-brand .eem-subtitle {
    display: block;
    font-size: 0.85rem;
    font-weight: normal;
    opacity: 0.85;
}

.eem-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.eem-identity {
    font-size: 0.9rem;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eem-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #eee;
}

.eem-nav-link {
    color: #0b5ed7;
    text-decoration: none;
    font-size: 0.95rem;
}

.eem-nav-link.active {
    font-weight: 600;
    text-decoration: underline;
}

.eem-nav-disabled {
    color: #888;
    cursor: not-allowed;
}

.eem-main {
    padding-top: 1.25rem;
}

.eem-h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.eem-panel {
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fafafa;
}

.eem-panel-stack {
    display: grid;
    gap: 1rem;
}

.eem-muted {
    color: #666;
    font-size: 0.9rem;
}

.eem-error {
    color: #b32121;
}

.eem-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #0b5ed7;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font: inherit;
}

.eem-link-button {
    color: #0b5ed7;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.eem-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.eem-list {
    display: grid;
    gap: 0.75rem;
}

.eem-list-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

.eem-list-item-button {
    width: 100%;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.eem-cart-row {
    align-items: center;
}

.eem-check-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 0;
}

.eem-check-row input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    margin: 0;
    flex-shrink: 0;
    align-self: center;
}

.eem-filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .eem-filter-row {
        grid-template-columns: 1fr;
    }
}

.eem-form-field {
    display: grid;
    gap: 0.35rem;
}

.eem-entry-event {
    display: grid;
    gap: 0.65rem;
}

.eem-h3 {
    margin: 0.25rem 0 0;
    font-size: 1rem;
    font-weight: 600;
}

.eem-form-field + .eem-toolbar {
    margin-top: 1rem;
}

.eem-input {
    padding: 0.65rem 0.75rem;
    border: 1px solid #bbb;
    border-radius: 6px;
    font: inherit;
}

.eem-badge {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    background: #6c757d;
    color: #fff;
    font-size: 0.78rem;
    vertical-align: middle;
}

.eem-badge-info {
    background: #0b5ed7;
}

.eem-button-secondary {
    background: #6c757d;
}

.eem-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #666;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.eem-icon-button:hover:not(:disabled) {
    color: #b32121;
    background: #f8e8e8;
}

.eem-icon-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.eem-icon-button-img {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
}

.eem-button-danger {
    background: #b42318;
}

.eem-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.eem-form-row label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 12rem;
}

.eem-h4 {
    font-size: 1rem;
    margin: 0;
}

.eem-results-event-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin: 0.75rem 0 0.35rem;
}

.eem-results-event-date {
    white-space: nowrap;
}

.eem-results-item {
    padding: 0;
}

.eem-results-item-table {
    margin: 0;
    table-layout: fixed;
}

.eem-results-item-table td {
    border-bottom: none;
    vertical-align: middle;
}

.eem-results-col-name {
    width: 55%;
}

.eem-results-col-score {
    width: 25%;
    text-align: right;
}

.eem-results-col-place {
    width: 20%;
    text-align: right;
}

.eem-results-objection-cell {
    padding-top: 0;
}

.eem-results-link {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    color: inherit;
    text-decoration: none;
}

.eem-results-link:hover {
    text-decoration: underline;
}

.eem-table {
    width: 100%;
    border-collapse: collapse;
}

.eem-table th,
.eem-table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

.eem-competition-results-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
}

.eem-competition-results-competitor-cell {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
}

.eem-table-scroll {
    overflow-x: auto;
}

.eem-competition-results-table th.eem-competition-results-judge-col,
.eem-competition-results-table td.eem-competition-results-judge-col {
    text-align: center;
    min-width: 4.5rem;
}

.eem-competition-results-table th.eem-competition-results-total-col,
.eem-competition-results-table td.eem-competition-results-total-col {
    text-align: center;
    font-weight: 600;
    min-width: 4.5rem;
}

.eem-competition-results-judge-name {
    display: block;
    font-weight: 600;
}

.eem-badge-status-dnc {
    background: #f0f0f0;
    color: #444;
}

.eem-badge-status-eliminated {
    background: #fde8e8;
    color: #8b1a1a;
}

.eem-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.eem-h2 {
    font-size: 1.1rem;
    margin: 0;
}

/* Blazor host chrome (required by wwwroot/index.html). Without display:none the
   error banner is always visible during startup and looks like a real failure. */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #1b6ec2;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}
