html, body { height: 100%; margin: 0; padding: 0; }
html { color-scheme: light only; }
body.kiosk {
    font-family: Arial, system-ui, sans-serif;
    background: #f7f7f7;
    text-align: center;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
    color: #111827;
    -webkit-text-size-adjust: 100%;
}
button {
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}
h1 { font-size: 7vw; margin: 6px 0 0; }
h2 { font-size: 6vw; margin: 10px 0 5px; }

.kiosk-auth {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.kiosk-login {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
}
.kiosk-login input {
    width: 9.5rem;
    padding: 8px 10px;
    font-size: 16px;
    border: 1px solid #c5d0de;
    border-radius: 8px;
}
.kiosk-login button,
.kiosk-auth__link {
    -webkit-appearance: none;
    appearance: none;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: #111827;
    background-color: #111827;
    color: #fff;
    -webkit-text-fill-color: #fff;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
}
.kiosk-auth__who { font-weight: 700; }
.kiosk-auth__link { display: inline-block; background: #374151; }

.kiosk-power {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-height: 1.4rem;
}
.kiosk-power__state {
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1;
}
.kiosk-power__state.is-on { color: #15803d; }
.kiosk-power__state.is-off { color: #b91c1c; }
.kiosk-power__state.is-unknown { color: #9ca3af; }
.kiosk-power__plan {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.06);
}
.kiosk-power__plan.is-green { background: #22c55e; }
.kiosk-power__plan.is-red { background: #ef4444; }

.box {
    background: #fff;
    border-radius: 12px;
    padding: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}
.muted { opacity: .75; }
.kiosk-err { color: #b91c1c; font-weight: 800; }
.kiosk-ok { color: #15803d; font-weight: 800; }
.kiosk-volume {
    font-size: 10vw;
    font-weight: 900;
    margin: 10px 0 15px;
}

.kiosk-nav {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.kiosk-nav a {
    padding: 10px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #111827;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    font-size: 3.6vw;
    font-weight: 700;
}
.kiosk-nav a.is-active { background: #111827; color: #fff; }

.kiosk-vol-btns { display: grid; gap: 10px; }
.kiosk-vol-btns button,
.buttons button {
    -webkit-appearance: none;
    appearance: none;
    width: 90%;
    max-width: 400px;
    height: 22vw;
    max-height: 180px;
    font-size: 6vw;
    margin: 8px auto;
    border: none;
    color: #fff;
    -webkit-text-fill-color: #fff;
    cursor: pointer;
    border-radius: 12px;
    font-weight: 800;
    display: block;
    opacity: 1;
}
.btn-green,
.btn-green:not(:disabled) {
    background: #16a34a;
    background-color: #16a34a;
    color: #fff;
    -webkit-text-fill-color: #fff;
}
.btn-red,
.btn-red:not(:disabled) {
    background: #dc2626;
    background-color: #dc2626;
    color: #fff;
    -webkit-text-fill-color: #fff;
}
.btn-orange,
.btn-orange:not(:disabled),
#noShowBtn:not(:disabled),
#noShowBtn.is-on {
    background: #f97316;
    background-color: #f97316;
    color: #fff;
    -webkit-text-fill-color: #fff;
}

.crowd-controls { display: flex; gap: 12px; }
.crowd-controls button {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    padding: 16px 14px;
    font-size: 20px;
    font-weight: 900;
    border-radius: 14px;
    border: 0;
    color: #fff;
    opacity: 1;
}
#btnPause:not(:disabled),
#btnPause.is-on {
    background: #f97316 !important;
    background-color: #f97316 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    opacity: 1 !important;
}
#btnNext:not(:disabled),
#btnNext.is-on {
    background: #16a34a !important;
    background-color: #16a34a !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    opacity: 1 !important;
}
.crowd-controls button:disabled,
.btn-orange:disabled,
.btn-green:disabled,
.btn-red:disabled,
.light-btn:disabled,
#noShowBtn:disabled {
    background: #d1d5db !important;
    background-color: #d1d5db !important;
    color: #6b7280 !important;
    -webkit-text-fill-color: #6b7280;
    cursor: not-allowed;
    opacity: 1;
}

.light-panel {
    margin: 6px 0 12px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}
.light-btn {
    -webkit-appearance: none;
    appearance: none;
    border: 0;
    color: #fff;
    -webkit-text-fill-color: #fff;
    padding: 12px 16px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 800;
    opacity: 1;
}
.light-btn--tma:not(:disabled) { background: #141414; background-color: #141414; }
.light-btn--svetlo:not(:disabled) {
    background: #ff9f00;
    background-color: #ff9f00;
    color: #111;
    -webkit-text-fill-color: #111;
}
.light-btn--dia:not(:disabled) { background: #0a77ff; background-color: #0a77ff; }
.light-status { font-weight: 600; min-height: 1.2em; }

.kiosk-cam {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #111;
    line-height: 0;
}
.kiosk-cam iframe,
.kiosk-cam video {
    display: block;
    width: 100%;
    height: auto;
    border: 0;
    vertical-align: top;
    object-fit: contain;
    background: #111;
    pointer-events: none;
}
.kiosk-cam-status { min-height: 1.2em; }

.projekce-msg { margin-top: 12px; padding: .7rem .8rem; }
.projekce-msg.ok { color: #15803d; }
.projekce-msg.err { color: #b91c1c; }

.kiosk-projekce {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 44rem;
    margin: 0 auto;
    align-self: center;
}
.kiosk-projekce .page--projekce {
    text-align: center;
}
.kiosk-projekce .projekce-status {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.35;
}

.kiosk-log {
    margin-top: 12px;
    overflow-x: auto;
    text-align: left;
}
.kiosk-log table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.kiosk-log th,
.kiosk-log td {
    padding: 8px 6px;
    border-bottom: 1px solid #e5e7eb;
}
.kiosk-log th {
    text-align: left;
    font-size: 13px;
    color: #6b7280;
}

.playlist-box {
    text-align: left;
    padding: 8px;
    flex: 0 0 auto;
    width: 100%;
    max-width: none;
    margin: 0;
}
.spl-head { margin: 0 0 8px; }
.spl-head__show {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 2px;
    word-break: break-word;
}
.spl-head__clip {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    min-height: 1.2em;
    word-break: break-word;
}
.spl-head__time {
    margin: 4px 0 0;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: 16px;
    color: #111827;
}
.spl-track {
    overflow: hidden;
    border: 1px solid #c5c9ce;
    background: #2b2b2b;
    display: flex;
    flex-direction: column;
}
.spl-clips {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
}
.spl-row {
    padding: 6px 8px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.spl-row__meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
    margin-bottom: 4px;
}
.spl-row__kind {
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #e5e7eb;
    white-space: nowrap;
}
.spl-row__name {
    flex: 1 1 auto;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #f3f4f6;
}
.spl-row__bar {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.spl-clip {
    width: 100%;
    height: 1.55rem;
    box-sizing: border-box;
    border-radius: 3px;
    overflow: hidden;
    color: #111;
}
.spl-clip--feature { background: #7cb342; color: #fff; }
.spl-clip--trailer { background: #ffa000; color: #1a1200; }
.spl-clip--ad { background: #29b6f6; color: #062033; }
.spl-clip--rating { background: #ab47bc; color: #fff; }
.spl-clip--cpl { background: #90a4ae; color: #102027; }
.spl-clip__track {
    position: relative;
    height: 100%;
    width: 100%;
}
.spl-clip__played {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: #6b7280;
    transition: width .15s linear;
}
.spl-clip__time {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    font-size: 11px;
    white-space: nowrap;
    color: #d1d5db;
    padding-left: 1px;
}
.spl-empty {
    padding: 18px 10px;
    color: #d1d5db;
    background: #2b2b2b;
    list-style: none;
}

@media (min-width: 768px) {
    h1 { font-size: 32px; }
    h2 { font-size: 26px; }
    .kiosk-nav a { font-size: 16px; }
    .kiosk-volume { font-size: 72px; }
    .kiosk-vol-btns button, .buttons button { font-size: 26px; height: 80px; }
}
