:root {
    --bg: #14161a;
    --panel: #1b1e24;
    --line: #2c313a;
    --text: #e6e8ec;
    --dim: #8b929e;
    --accent: #f2b632;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.45 "Segoe UI", system-ui, -apple-system, sans-serif;
}

#app {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: 100%;
}

aside {
    background: var(--panel);
    border-right: 1px solid var(--line);
    padding: 16px;
    overflow-y: auto;
}

h1 {
    font-size: 17px;
    margin: 0 0 14px;
    font-weight: 600;
}

h2 {
    font-size: 13px;
    margin: 20px 0 8px;
    font-weight: 600;
    color: var(--dim);
}

.row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 6px 0;
}

button,
select {
    background: #252a33;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 7px 10px;
    font: inherit;
    width: 100%;
}

button {
    cursor: pointer;
    text-align: left;
}

button:hover {
    border-color: var(--accent);
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

input[type=file] {
    display: none;
}

input[type=color] {
    width: 40px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--line);
    background: none;
}

label.chk {
    display: flex;
    gap: 8px;
    align-items: center;
    cursor: pointer;
}

#mats {
    max-height: 38vh;
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.mat {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 10px;
    padding: 5px 8px;
    border-bottom: 1px solid var(--line);
    align-items: center;
}

.mat:last-child {
    border-bottom: 0;
}

.mat span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mat small {
    color: var(--dim);
}

#status {
    color: var(--dim);
    font-size: 12px;
    margin-top: 10px;
    min-height: 18px;
}

#thumb {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    margin-top: 8px;
    display: none;
    background: #000;
}

main {
    position: relative;
    min-width: 0;
}

#view {
    width: 100%;
    height: 100%;
    display: block;
}

#hint {
    position: absolute;
    left: 16px;
    bottom: 12px;
    color: var(--dim);
    font-size: 12px;
    pointer-events: none;
}

#sponsorThumb {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    margin-top: 8px;
    display: none;
    background: #fff;
    /* white so dark text and yellow logos both stay readable */ }

@media (max-width: 760px) {
    #app {
        grid-template-columns: 1fr;
        grid-template-rows: auto 60vh;
    }

    aside {
        border-right: 0;
        border-bottom: 1px solid var(--line);
        max-height: 45vh;
    } }