.c33-cctv {
    --c33-cctv-ink: #1e293b;
    --c33-cctv-muted: #64748b;
    --c33-cctv-line: #d9e2ec;
    --c33-cctv-soft: #f7f9fc;
    --c33-cctv-accent: #9a4d16;
    --c33-cctv-accent-dark: #71380f;
    --c33-cctv-danger: #a23a32;
    color: var(--c33-cctv-ink);
    font-family: inherit;
    margin: 1.5rem 0;
    overflow-wrap: anywhere;
    width: 100%;
}

.c33-cctv *,
.c33-cctv *::before,
.c33-cctv *::after {
    box-sizing: border-box;
}

.c33-cctv [hidden] {
    display: none !important;
}

.c33-cctv__header {
    align-items: center;
    background: linear-gradient(135deg, #fff5eb 0%, #fffdfa 55%, #f2f6fb 100%);
    border: 1px solid var(--c33-cctv-line);
    border-radius: 22px 22px 0 0;
    display: flex;
    gap: 1.25rem;
    justify-content: space-between;
    padding: 1.5rem;
}

.c33-cctv__header h2,
.c33-cctv__panel-head h3,
.c33-cctv__method h3 {
    color: var(--c33-cctv-ink);
    line-height: 1.2;
    margin: 0;
}

.c33-cctv__header h2 {
    font-size: clamp(1.45rem, 3vw, 2rem);
}

.c33-cctv__header p:not(.c33-cctv__eyebrow),
.c33-cctv__panel-head p {
    color: var(--c33-cctv-muted);
    margin: 0.55rem 0 0;
    max-width: 820px;
}

.c33-cctv__eyebrow {
    color: var(--c33-cctv-accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    margin: 0 0 0.45rem;
    text-transform: uppercase;
}

.c33-cctv__badge {
    align-items: center;
    background: #fff;
    border: 1px solid var(--c33-cctv-line);
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(30, 41, 59, 0.08);
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    min-width: 98px;
    padding: 0.8rem 1rem;
}

.c33-cctv__badge span {
    color: var(--c33-cctv-muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.c33-cctv__badge strong {
    color: var(--c33-cctv-accent);
    font-size: 1.45rem;
    line-height: 1.2;
}

.c33-cctv__body {
    border: 1px solid var(--c33-cctv-line);
    border-radius: 0 0 22px 22px;
    border-top: 0;
    overflow: hidden;
}

.c33-cctv__form {
    background: #fff;
    padding: 1.35rem;
}

.c33-cctv__panel {
    border: 1px solid var(--c33-cctv-line);
    border-radius: 16px;
    padding: 1.1rem;
}

.c33-cctv__panel + .c33-cctv__panel {
    margin-top: 1rem;
}

.c33-cctv__panel-head {
    margin-bottom: 1rem;
}

.c33-cctv__panel-head h3,
.c33-cctv__method h3 {
    font-size: 1.1rem;
}

.c33-cctv__grid,
.c33-cctv__custom-resolution,
.c33-cctv__duration-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.c33-cctv__duration {
    border: 0;
    margin: 1rem 0 0;
    min-width: 0;
    padding: 0;
}

.c33-cctv__duration legend {
    color: var(--c33-cctv-ink);
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 0.55rem;
    padding: 0;
}

.c33-cctv__duration-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.c33-cctv__custom-resolution {
    background: var(--c33-cctv-soft);
    border: 1px dashed #c7b89f;
    border-radius: 12px;
    margin-top: 1rem;
    padding: 1rem;
}

.c33-cctv label {
    color: var(--c33-cctv-ink);
    display: flex;
    flex-direction: column;
    font-size: 0.92rem;
    font-weight: 700;
    gap: 0.4rem;
    min-width: 0;
}

.c33-cctv label small {
    color: var(--c33-cctv-muted);
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.45;
}

.c33-cctv input,
.c33-cctv select,
.c33-cctv button {
    font: inherit;
}

.c33-cctv input,
.c33-cctv select {
    background: #fff;
    border: 1px solid #bac7d8;
    border-radius: 10px;
    color: var(--c33-cctv-ink);
    min-height: 46px;
    padding: 0.7rem 0.8rem;
    width: 100%;
}

.c33-cctv input:focus,
.c33-cctv select:focus,
.c33-cctv button:focus-visible {
    border-color: var(--c33-cctv-accent);
    box-shadow: 0 0 0 3px rgba(154, 77, 22, 0.16);
    outline: none;
}

.c33-cctv__input-unit,
.c33-cctv__compound {
    display: flex;
    min-width: 0;
}

.c33-cctv__input-unit input,
.c33-cctv__compound input {
    border-radius: 10px 0 0 10px;
    min-width: 0;
}

.c33-cctv__input-unit b,
.c33-cctv__compound select {
    align-items: center;
    background: var(--c33-cctv-soft);
    border: 1px solid #bac7d8;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    color: var(--c33-cctv-muted);
    display: flex;
    flex: 0 0 auto;
    font-size: 0.82rem;
    justify-content: center;
    min-width: 64px;
    padding: 0.5rem;
    width: auto;
}

.c33-cctv__compound select {
    min-width: 84px;
}

.c33-cctv__check {
    background: var(--c33-cctv-soft);
    border: 1px solid var(--c33-cctv-line);
    border-radius: 12px;
    display: grid !important;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    padding: 0.85rem;
}

.c33-cctv__check input {
    grid-row: 1 / span 2;
    height: 20px;
    margin: 0.05rem 0.35rem 0 0;
    min-height: 0;
    width: 20px;
}

.c33-cctv__check small {
    grid-column: 2;
}

.c33-cctv label.is-disabled {
    opacity: 0.55;
}

.c33-cctv__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.1rem;
}

.c33-cctv button {
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 800;
    min-height: 46px;
    padding: 0.72rem 1rem;
}

.c33-cctv__actions button:first-child {
    background: var(--c33-cctv-accent);
    color: #fff;
}

.c33-cctv__actions button:first-child:hover {
    background: var(--c33-cctv-accent-dark);
}

.c33-cctv__secondary,
.c33-cctv [data-c33-cctv-copy] {
    background: #eaf0f7;
    color: var(--c33-cctv-ink);
}

.c33-cctv__secondary:hover,
.c33-cctv [data-c33-cctv-copy]:hover {
    background: #dce6f1;
}

.c33-cctv__error {
    background: #fff0ef;
    border: 1px solid #efc2be;
    border-radius: 10px;
    color: var(--c33-cctv-danger);
    font-weight: 700;
    margin: 1rem 0 0;
    padding: 0.85rem 1rem;
}

.c33-cctv__results {
    background: var(--c33-cctv-soft);
    border-top: 1px solid var(--c33-cctv-line);
    outline: none;
    padding: 1.35rem;
}

.c33-cctv__answer-row {
    align-items: center;
    background: #fff;
    border: 1px solid var(--c33-cctv-line);
    border-radius: 16px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.1rem;
}

.c33-cctv__answer-row span,
.c33-cctv__answer-row small,
.c33-cctv__metrics span {
    color: var(--c33-cctv-muted);
}

.c33-cctv__answer-row strong {
    display: block;
    font-size: clamp(1.55rem, 4vw, 2.35rem);
    line-height: 1.15;
    margin: 0.25rem 0;
}

.c33-cctv__answer-row small {
    display: block;
    line-height: 1.4;
}

.c33-cctv__status {
    background: #fff1e6;
    border: 1px solid #e7c7aa;
    border-radius: 12px;
    margin-top: 1rem;
    padding: 0.85rem 1rem;
}

.c33-cctv__status b {
    color: var(--c33-cctv-accent-dark);
}

.c33-cctv__status p {
    color: var(--c33-cctv-muted);
    margin: 0.25rem 0 0;
}

.c33-cctv__metrics {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.c33-cctv__metrics article {
    background: #fff;
    border: 1px solid var(--c33-cctv-line);
    border-radius: 12px;
    min-width: 0;
    padding: 0.85rem;
}

.c33-cctv__metrics span {
    display: block;
    font-size: 0.78rem;
    line-height: 1.35;
}

.c33-cctv__metrics strong {
    display: block;
    font-size: 1rem;
    margin-top: 0.35rem;
}

.c33-cctv__method {
    background: #fff;
    border: 1px solid var(--c33-cctv-line);
    border-radius: 14px;
    margin-top: 1rem;
    padding: 1rem;
}

.c33-cctv__method ol {
    color: var(--c33-cctv-muted);
    margin: 0.75rem 0 0;
    padding-left: 1.25rem;
}

.c33-cctv__method li + li {
    margin-top: 0.55rem;
}

.c33-cctv__warnings {
    background: #fff8df;
    border: 1px solid #ead89b;
    border-radius: 12px;
    color: #6d5010;
    margin: 1rem 0 0;
    padding: 0.9rem 1rem 0.9rem 2rem;
}

.c33-cctv__warnings li + li {
    margin-top: 0.45rem;
}

.c33-cctv__note {
    color: var(--c33-cctv-muted);
    font-size: 0.82rem;
    line-height: 1.55;
    margin: 1rem 0 0;
}

@media (max-width: 780px) {
    .c33-cctv__header {
        align-items: flex-start;
    }

    .c33-cctv__badge {
        min-width: 82px;
    }

    .c33-cctv__grid,
    .c33-cctv__custom-resolution {
        grid-template-columns: 1fr;
    }

    .c33-cctv__metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .c33-cctv__header,
    .c33-cctv__form,
    .c33-cctv__results {
        padding: 1rem;
    }

    .c33-cctv__header {
        display: block;
    }

    .c33-cctv__badge {
        align-items: center;
        flex-direction: row;
        gap: 0.5rem;
        margin-top: 1rem;
        width: fit-content;
    }

    .c33-cctv__duration-grid,
    .c33-cctv__metrics {
        grid-template-columns: 1fr;
    }

    .c33-cctv__answer-row {
        align-items: stretch;
        flex-direction: column;
    }

    .c33-cctv__answer-row button {
        width: 100%;
    }

    .c33-cctv__compound {
        align-items: stretch;
    }
}
