body {
    margin: 0px;
}

.index-img {
    height: 4rem;
}

#firstHeading {
    position: sticky;
    top: 0%;
    background-color: white;
    border-bottom: 1px solid black;
    border-radius: 10px;
    padding: 5px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

table th {
    background-color: #f2f2f2;
    border: 1px solid #cecece;
}

table td {
    border: 1px solid #cecece;
}

table tr.active {
    background-color: yellow;
}

footer {
    position: sticky;
    bottom: 0%;
    background-color: white;
    border-top: 1px solid black;
    border-radius: 10px;
    padding: 5px;
    font-size: 0.9rem;
}

#hardship[hidden] {
    display: none;
}

#hardship {
    margin-top: 0.4rem;
    padding: 0.35rem;
    min-height: 1.5rem;
    max-height: 8rem;
    overflow-y: auto;
    background: #fafafa;
    border-radius: 6px;
    border: 1px solid #eee;
    font-size: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

#hardship .hardship-empty {
    color: #888;
}

#hardship .hardship-item {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

#hardship .hardship-item:active {
    opacity: 0.8;
}

#hardship .hardship-item-img {
    height: 2.8em;
    width: auto;
    vertical-align: middle;
    display: block;
}

#hardship .hardship-qty {
    display: block;
    font-size: 0.75em;
    text-align: center;
    color: #555;
    line-height: 1.2;
}

#hardship .hardship-item-fallback {
    font-size: 0.9em;
    color: #06c;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.progress-summary-wrap {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    overflow: visible;
}

.progress-summary {
    font-size: 0.8rem;
    color: #444;
    white-space: nowrap;
    flex-shrink: 0;
}

.progress-bar {
    width: 56px;
    height: 5px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    flex-shrink: 0;
}

.progress-bar-fill {
    height: 100%;
    background: #5a9;
    border-radius: 3px;
    width: 0%;
    transition: width 0.2s ease;
}

.footer-settings-btn {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    font-size: 1rem;
    border: 1px solid #cecece;
    border-radius: 4px;
    background: #f2f2f2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.footer-settings-btn:hover {
    background: #e0e0e0;
}

.hardship-settings-panel {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f8f8;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-size: 0.85rem;
}

.hardship-settings-panel[hidden] {
    display: none;
}

.hardship-settings-title {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.hardship-settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.35rem;
}

.hardship-settings-row label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.hardship-settings-category-img {
    height: 1.25em;
    width: auto;
    vertical-align: middle;
}

.hardship-settings-row input,
.hardship-settings-row select {
    width: 4rem;
    padding: 0.25rem;
    font-size: 0.9rem;
}

.hardship-settings-row select {
    text-align: center;
}

.footer-nav {
    flex: 0 0 auto;
    min-width: 10rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    overflow: visible;
}

.footer-nav-btn {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    font-size: 0.85rem;
    line-height: 1;
    border: 1px solid #cecece;
    border-radius: 4px;
    background: #f2f2f2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.footer-nav-btn:hover {
    background: #e0e0e0;
}

.footer-nav-btn:active {
    background: #d0d0d0;
}
