.dm-page { --dm-stage: #EEF3F5; --dm-dot: rgba(15, 23, 42, .09); }
html:not(.cf-light) .dm-page { --dm-stage: #050708; --dm-dot: rgba(255, 255, 255, .07); }

.dm-hero { padding-bottom: 24px; }
.dm-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.dm-main { padding: 4px 0 24px; }
.dm-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.dm-app { border: 1px solid var(--cc-line); border-radius: 24px; background: var(--cc-card); box-shadow: var(--cc-shadow); }

.dm-bar { position: sticky; top: var(--dm-sticky, 0px); z-index: 30; display: flex; gap: 10px; padding: 16px; border-bottom: 1px solid var(--cc-line); border-radius: 23px 23px 0 0; background: var(--cc-card); transition: border-radius .25s, box-shadow .25s; }
.dm-bar.is-stuck { border-radius: 0 0 16px 16px; box-shadow: 0 14px 30px -18px rgba(15, 23, 42, .35); }
.dm-url { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; height: 50px; border: 1px solid var(--cc-line); border-radius: 14px; background: var(--cc-soft); transition: border-color .2s, box-shadow .2s; }
.dm-url:focus-within { border-color: var(--cc-teal); box-shadow: 0 0 0 3px rgba(6, 147, 139, .15); }
.dm-url > i { position: absolute; left: 17px; color: var(--cc-teal); font-size: 15px; pointer-events: none; }
html:not(.cf-light) .dm-url > i { color: var(--cc-bright); }
.dm-url input { flex: 1; min-width: 0; height: 100%; padding: 0 44px 0 46px; border: 0; outline: 0; background: transparent; color: var(--cc-ink); font: 500 .95rem 'Poppins', sans-serif; }
.dm-url input::placeholder { color: var(--cc-ink-3); font-weight: 400; }
.dm-clear { position: absolute; right: 8px; width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--cc-ink-3); cursor: pointer; transition: background .2s, color .2s; }
.dm-clear:hover { background: var(--cc-teal-soft); color: var(--cc-teal); }

.dm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 14px; font: 600 .9rem 'Poppins', sans-serif; white-space: nowrap; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s, color .2s, opacity .2s; }
.dm-btn i { font-size: 13px; }
.dm-btn-main { background: var(--cc-teal); color: #fff; }
.dm-btn-main:hover { background: var(--cc-teal-h); }
.dm-btn-ghost { height: 42px; padding: 0 16px; border-color: var(--cc-line); border-radius: 12px; background: var(--cc-card); color: var(--cc-ink-2); font-size: .84rem; }
.dm-btn-ghost:hover { border-color: rgba(6, 147, 139, .45); color: var(--cc-teal); }
html:not(.cf-light) .dm-btn-ghost:hover { color: var(--cc-bright); }
.dm-btn:disabled { opacity: .45; cursor: not-allowed; }
.dm-btn-ghost:disabled:hover { border-color: var(--cc-line); color: var(--cc-ink-2); }
.dm-foot .dm-btn-main { height: 42px; border-radius: 12px; font-size: .86rem; }

.dm-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px 26px; padding: 16px; border-bottom: 1px solid var(--cc-line); }
.dm-ctl { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.dm-ctl-devices { flex: 0 1 auto; max-width: 100%; }
.dm-ctl-label { font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cc-ink-3); }

.dm-seg, .dm-chips { display: inline-flex; flex-wrap: nowrap; gap: 4px; padding: 4px; border: 1px solid var(--cc-line); border-radius: 12px; background: var(--cc-soft); }
.dm-seg button, .dm-chips button { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: var(--cc-ink-3); font: 600 .8rem 'Poppins', sans-serif; white-space: nowrap; cursor: pointer; transition: background .2s, color .2s, box-shadow .2s; }
.dm-seg button i, .dm-chips button i { font-size: 12px; }
.dm-seg button:hover, .dm-chips button:hover { color: var(--cc-ink); }
.dm-seg button.is-active, .dm-chips button.is-active { background: var(--cc-card); color: var(--cc-teal); box-shadow: 0 1px 2px rgba(15, 23, 42, .08), 0 0 0 1px rgba(6, 147, 139, .25); }
html:not(.cf-light) .dm-seg button.is-active, html:not(.cf-light) .dm-chips button.is-active { background: var(--cc-teal-soft); color: var(--cc-bright); }
.dm-chips.is-off { opacity: .45; pointer-events: none; }
.dm-chips { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.dm-chips::-webkit-scrollbar { display: none; }
.dm-chips button { flex: 0 0 auto; }

.dm-custom { display: inline-flex; align-items: center; gap: 8px; color: var(--cc-ink-3); font-size: .8rem; font-weight: 600; }
.dm-custom[hidden] { display: none; }
.dm-custom > i { font-size: 11px; }
.dm-custom input { width: 84px; height: 36px; padding: 0 10px; border: 1px solid var(--cc-line); border-radius: 10px; background: var(--cc-soft); color: var(--cc-ink); font: 600 .85rem 'Poppins', sans-serif; text-align: center; outline: 0; -moz-appearance: textfield; }
.dm-custom input::-webkit-outer-spin-button, .dm-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dm-custom input:focus { border-color: var(--cc-teal); }

.dm-swatches { display: inline-flex; gap: 8px; padding: 4px 0; }
.dm-swatches button { position: relative; width: 34px; height: 34px; padding: 0; border: 1px solid var(--cc-line); border-radius: 10px; cursor: pointer; transition: transform .15s, box-shadow .2s; }
.dm-swatches button:hover { transform: translateY(-1px); }
.dm-swatches button.is-active { box-shadow: 0 0 0 2px var(--cc-card), 0 0 0 4px var(--cc-teal); }
.dm-sw-transparent { background-color: #fff; background-image: linear-gradient(45deg, #CBD5E1 25%, transparent 25%), linear-gradient(-45deg, #CBD5E1 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #CBD5E1 75%), linear-gradient(-45deg, transparent 75%, #CBD5E1 75%); background-size: 10px 10px; background-position: 0 0, 0 5px, 5px -5px, -5px 0; }
.dm-sw-light { background: #F1F5F9; }
.dm-sw-dark { background: #0F172A; }
.dm-sw-teal { background: linear-gradient(135deg, #2DD4BF, #06938B 55%, #0F172A); }

.dm-stage { position: relative; height: clamp(440px, 68vh, 760px); overflow: hidden; background-color: var(--dm-stage); background-image: radial-gradient(circle, var(--dm-dot) 1px, transparent 1.2px); background-size: 22px 22px; transition: background-color .3s; }
.dm-stage.bg-light { background-color: #F1F5F9; background-image: none; }
.dm-stage.bg-dark { background-color: #0F172A; background-image: none; }
.dm-stage.bg-teal { background-image: linear-gradient(135deg, #2DD4BF, #06938B 55%, #0F172A); }

.dm-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 32px 24px; text-align: center; }
.dm-empty-ico { width: 74px; height: 74px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--cc-line); border-radius: 22px; background: var(--cc-card); color: var(--cc-teal); font-size: 28px; box-shadow: var(--cc-shadow); }
html:not(.cf-light) .dm-empty-ico { color: var(--cc-bright); }
.dm-empty h2 { margin: 6px 0 0; font-size: clamp(1.25rem, 2.6vw, 1.6rem); font-weight: 700; line-height: 1.3; color: var(--cc-ink); }
.dm-empty p { max-width: 420px; margin: 0; font-size: .9rem; line-height: 1.7; color: var(--cc-ink-3); }
.dm-try { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 6px; }
.dm-try span { font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--cc-ink-3); }
.dm-try button { height: 32px; padding: 0 13px; border: 1px solid var(--cc-line); border-radius: 99px; background: var(--cc-card); color: var(--cc-ink-2); font: 500 .8rem 'Poppins', sans-serif; cursor: pointer; transition: border-color .2s, color .2s; }
.dm-try button:hover { border-color: rgba(6, 147, 139, .45); color: var(--cc-teal); }

.dm-scene { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.dm-scene[hidden] { display: none; }
.dm-dev { position: absolute; left: 0; top: 0; transform-origin: 0 0; filter: drop-shadow(0 30px 40px rgba(15, 23, 42, .28)); }
.dm-part { position: absolute; }
.dm-screen { position: absolute; z-index: 1; overflow: hidden; background: #fff; }
.dm-part-front, .dm-addr { z-index: 3; }
.dm-view { position: absolute; left: 0; right: 0; overflow: hidden; background: #fff; }
.dm-sbar { position: absolute; left: 0; right: 0; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; background: #fff; color: #0F172A; line-height: 1; }
.dm-sbar svg { display: block; fill: currentColor; }
.dm-home { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; justify-content: center; background: #fff; }
.dm-home i { display: block; border-radius: 99px; background: #0F172A; }
.dm-screen iframe { display: block; width: 100%; height: 100%; border: 0; background: #fff; }
.dm-screen img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.dm-screen .dm-shot-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: #F1F5F9; color: #64748B; font: 600 28px 'Poppins', sans-serif; }
.dm-addr { position: absolute; display: flex; align-items: center; gap: 8px; overflow: hidden; color: #64748B; font: 500 13px 'Poppins', sans-serif; white-space: nowrap; }
.dm-addr i { font-size: 11px; color: #06938B; }

.dm-status { position: absolute; top: 16px; left: 50%; z-index: 5; display: flex; align-items: center; gap: 9px; max-width: calc(100% - 32px); padding: 8px 16px; border: 1px solid rgba(6, 147, 139, .3); border-radius: 99px; background: var(--cc-card); color: var(--cc-ink-2); font-size: .8rem; font-weight: 600; white-space: nowrap; box-shadow: var(--cc-shadow); opacity: 0; transform: translate(-50%, -8px); transition: opacity .25s, transform .25s; pointer-events: none; }
.dm-status span:last-child { overflow: hidden; text-overflow: ellipsis; }
.dm-status.is-show { opacity: 1; transform: translate(-50%, 0); }
.dm-status.is-error { border-color: rgba(220, 38, 38, .35); color: #DC2626; }
.dm-status-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: var(--cc-teal); animation: dmPulse 1.4s infinite; }
.dm-status.is-error .dm-status-dot { background: #DC2626; animation: none; }
@keyframes dmPulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }

.dm-note { position: absolute; left: 50%; bottom: 14px; z-index: 4; display: flex; align-items: center; gap: 9px; width: max-content; max-width: calc(100% - 28px); padding: 9px 14px; border: 1px solid var(--cc-line); border-radius: 12px; background: var(--cc-card); color: var(--cc-ink-2); font-size: .78rem; line-height: 1.5; box-shadow: var(--cc-shadow); transform: translateX(-50%); }
.dm-note[hidden] { display: none; }
.dm-note i { color: var(--cc-teal); }

.dm-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-top: 1px solid var(--cc-line); }
.dm-size { font-size: .8rem; font-weight: 600; color: var(--cc-ink-3); white-space: nowrap; }
.dm-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.dm-actions label.dm-btn { margin: 0; }
.dm-actions [hidden] { display: none; }

@media (min-width: 901px) {
    .dm-controls { flex-wrap: nowrap; justify-content: space-between; gap: 14px; padding: 14px 16px; }
    .dm-ctl { flex: 0 0 auto; gap: 7px; }
    .dm-ctl-devices { flex: 0 1 auto; min-width: 0; }
    .dm-ctl-label { font-size: .6rem; }
    .dm-seg, .dm-chips { gap: 2px; padding: 3px; border-radius: 11px; }
    .dm-seg button, .dm-chips button { height: 32px; padding: 0 11px; gap: 6px; font-size: .76rem; }
    .dm-swatches { gap: 6px; padding: 4px 0; }
    .dm-swatches button { width: 32px; height: 32px; border-radius: 9px; }
    .dm-custom input { width: 70px; height: 32px; }
}
@media (min-width: 901px) and (max-width: 1240px) {
    .dm-seg button i, .dm-chips button i { display: none; }
    .dm-seg button, .dm-chips button { padding: 0 9px; font-size: .74rem; }
}
@media (max-width: 900px) {
    .dm-controls { gap: 16px; }
}

@media (max-width: 640px) {
    .dm-wrap { padding: 0 14px; }
    .dm-app { border-radius: 20px; }
    .dm-bar { padding: 12px; gap: 8px; border-radius: 19px 19px 0 0; }
    .dm-bar.is-stuck { border-radius: 0 0 14px 14px; }
    .dm-url { height: 46px; border-radius: 12px; }
    .dm-url input { font-size: .9rem; padding-left: 42px; }
    .dm-url > i { left: 15px; }
    .dm-bar .dm-btn-main { height: 46px; padding: 0 16px; border-radius: 12px; }
    .dm-bar .dm-btn-main span { display: none; }
    .dm-controls { padding: 12px; gap: 14px; }
    .dm-ctl { width: 100%; }
    .dm-seg { display: flex; }
    .dm-seg button { flex: 1; justify-content: center; }
    .dm-stage { height: 62vh; min-height: 420px; }
    .dm-foot { flex-direction: column; align-items: stretch; padding: 12px; }
    .dm-size { text-align: center; }
    .dm-actions { display: flex; flex-wrap: wrap; }
    .dm-actions .dm-btn { flex: 1 1 auto; padding: 0 12px; }
    .dm-actions .dm-btn-main { flex-basis: 100%; }
    .dm-note { bottom: 10px; font-size: .74rem; }
}
.dm-empty[hidden] { display: none; }
@media (min-width: 901px) and (max-width: 1080px) {
    .dm-controls { gap: 10px; padding: 14px 12px; }
    .dm-seg button, .dm-chips button { height: 30px; padding: 0 7px; font-size: .7rem; }
    .dm-swatches { padding: 5px 0; }
    .dm-swatches button { width: 28px; height: 28px; }
}
.dm-bar { transition: border-radius .25s, box-shadow .25s, padding .25s; }
.dm-url, .dm-bar .dm-btn-main { transition: height .25s, border-color .2s, box-shadow .2s, background .2s; }
.dm-bar.is-stuck { padding: 8px 12px; }
.dm-bar.is-stuck .dm-url, .dm-bar.is-stuck .dm-btn-main { height: 40px; border-radius: 11px; }
.dm-bar.is-stuck .dm-url input { font-size: .88rem; }
@media (max-width: 640px) {
    .dm-bar.is-stuck { padding: 6px 8px; }
    .dm-bar.is-stuck .dm-url, .dm-bar.is-stuck .dm-btn-main { height: 36px; border-radius: 10px; }
    .dm-bar.is-stuck .dm-url input { font-size: .84rem; }
}