/* Native device presentation. References: React Bits Device and Ali Imam's Mac (21st).
   Own HTML/CSS implementation: no third-party component source or device trademark used. */
.dt-device{--dt-metal:#5a5d62;--dt-edge:#96999e;position:relative;display:block;box-sizing:border-box;margin-inline:auto;isolation:isolate}
.dt-display{position:relative;display:block;overflow:hidden;background:#080a0e}
.dt-device .dt-display img{display:block;width:100%;height:auto;max-height:none;object-fit:contain;object-position:center;background:transparent}
.dt-phone{width:250px;max-width:100%;padding:18px 7px 14px;border:2px solid var(--dt-metal);border-radius:35px;background:linear-gradient(105deg,#45484d,#101113 12%,#191b1e 80%,#62666d);box-shadow:inset 0 0 0 2px #08090a,inset 2px 0 2px #b0b3b8,3px 2px 0 #202226,12px 24px 26px -18px #0009}
.dt-phone>.dt-display{border:1px solid #000;border-radius:23px}
.dt-phone::before{content:"";position:absolute;top:6px;left:50%;width:36px;height:4px;transform:translateX(-50%);background:#050607;border:1px solid #34363a;border-radius:5px}
.dt-phone::after{content:"";position:absolute;bottom:5px;left:50%;width:48px;height:3px;transform:translateX(-50%);background:#7a7d84;border-radius:3px}
.dt-desktop{width:100%;padding:13px 9px 24px;border:1px solid #797d84;border-radius:13px;background:linear-gradient(110deg,#81858d,#4b4e55 48%,#686c74);box-shadow:inset 0 1px 0 #c7cad1,0 14px 26px -20px #000b;margin-bottom:48px}
.dt-desktop>.dt-display{border:2px solid #121316;border-radius:4px;box-shadow:0 0 0 3px #24262a}
.dt-desktop::before{content:"";position:absolute;top:4px;left:50%;width:3px;height:3px;border-radius:50%;background:#121316;box-shadow:0 0 0 1px #8b8e92;transform:translateX(-50%)}
.dt-desktop::after{content:"";position:absolute;z-index:-1;top:calc(100% - 1px);left:36%;width:28%;height:48px;background:linear-gradient(#383a3e 0%,#8b8e94 75%,#bdc0c5 92%,#60636a 96%);clip-path:polygon(24% 0,76% 0,81% 80%,100% 91%,100% 100%,0 100%,0 91%,19% 80%);border-radius:0 0 3px 3px}
/* Gallery controls remain outside the frame and keep the original zoom behavior. */
:is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview{background:transparent;border:0;border-radius:0;padding:14px 20px 0;overflow:visible;width:100%;margin-inline:auto}
:is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview--phone{width:min(100%,320px)}
:is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview .dt-device{position:relative;right:auto;bottom:auto;font:inherit;color:inherit;white-space:normal}
:is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview .dt-phone{padding:18px 7px 14px;border:2px solid var(--dt-metal);border-radius:35px;width:250px;max-width:100%;margin:0 auto;background:linear-gradient(105deg,#45484d,#101113 12%,#191b1e 80%,#62666d)}
:is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview .dt-desktop{max-width:800px;padding:13px 9px 24px;border:1px solid #797d84;border-radius:13px;margin:0 auto 48px;background:linear-gradient(110deg,#81858d,#4b4e55 48%,#686c74)}
:is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview .dt-display{display:block;position:relative;right:auto;bottom:auto;padding:0;margin:0;width:100%;max-width:none;background:#080a0e;color:inherit;border:1px solid #000;border-radius:23px}
:is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview .dt-desktop>.dt-display{border:2px solid #121316;border-radius:4px}
:is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview .dt-display img{width:100%;height:auto;max-height:none;object-fit:contain;background:transparent}
:is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview>span:not(.dt-device){position:relative;display:table;right:auto;bottom:auto;transform:none;margin:18px auto 0;background:var(--panel,#191a1c);color:var(--white,#f4f1e9);border:1px solid var(--line,#36383c);padding:10px 14px;border-radius:7px;font:550 12px/1.2 Inter,Arial,sans-serif}
/* Catalog and on-demand showcase use the same monitor, at their existing compact size. */
.catalog-image.dt-showcase{padding:26px!important;overflow:visible!important}
.catalog-image.dt-showcase>.dt-desktop{max-width:100%;padding:10px 7px 20px;margin-bottom:36px}
.catalog-image.dt-showcase>.dt-desktop::after{height:36px}
.catalog-image.dt-showcase .dt-display img{width:100%;height:auto;max-height:none;aspect-ratio:auto;object-fit:contain;border-radius:0;transform:none}
.launch-preview.dt-showcase{aspect-ratio:auto;overflow:visible;background:transparent;padding:0}
.launch-preview.dt-showcase .dt-device{margin-bottom:48px}
.launch-preview.dt-showcase img{aspect-ratio:16/9;object-fit:contain;height:auto}
/* Replace existing phone frames, including the homepage fan, with this single treatment. */
.portfolio-fan-stage .portfolio-fan-card.dt-phone{position:absolute;width:28cqw;height:auto;top:9%;padding:12px 5px 10px;border:2px solid var(--dt-metal);border-radius:24px;overflow:visible;box-shadow:inset 0 0 0 1px #08090a,0 18px 34px #0005}
.portfolio-fan-card.dt-phone>.dt-display{border-radius:16px}
.portfolio-fan-card.dt-phone .dt-display img{width:100%;height:auto;aspect-ratio:390/844;object-fit:contain;border-radius:0}
.portfolio-fan-card.dt-phone::before{top:4px;width:25px;height:3px}
.portfolio-fan-card.dt-phone::after{bottom:3px;width:34px;height:2px}
.portfolio-brand-screens .portfolio-device.dt-phone{padding:18px 7px 14px;border:2px solid var(--dt-metal);border-radius:35px;overflow:visible;background:linear-gradient(105deg,#45484d,#101113 12%,#191b1e 80%,#62666d)}
.portfolio-brand-screens .portfolio-device.dt-phone img{width:100%;height:auto;aspect-ratio:auto;object-fit:contain;border-radius:0}
/* Real iframe viewport stays unchanged: only its surrounding device is replaced. */
.inline-demo-grid{grid-template-columns:minmax(0,1fr) 290px;gap:38px}
.portfolio-detail .portfolio-demo-detail{width:min(1160px,calc(100% - 64px))}
.inline-demo-device.dt-device{overflow:visible}
.inline-demo-device.dt-desktop{padding:13px 9px 24px;border:1px solid #797d84;border-radius:13px;background:linear-gradient(110deg,#81858d,#4b4e55 48%,#686c74);margin-bottom:48px}
.inline-demo-mobile .inline-demo-device.dt-phone{padding:18px 7px 14px;border:2px solid var(--dt-metal);border-radius:35px;background:linear-gradient(105deg,#45484d,#101113 12%,#191b1e 80%,#62666d);width:100%}
.inline-demo-mobile .inline-demo-device.dt-phone::before{top:6px;width:36px;height:4px}
.inline-demo-mobile .inline-demo-viewport.dt-display{border-radius:23px}
.dt-poster .portfolio-chrome{display:none}
.dt-poster .portfolio-screen{aspect-ratio:16/9}
.portfolio-demo-dialog .dt-live-dialog{width:calc(100% - 40px);height:calc(100% - 156px);margin-top:10px}
.portfolio-demo-dialog .dt-live-dialog>.dt-display{height:100%}
.portfolio-demo-dialog .dt-live-dialog iframe{display:block;width:100%;height:100%;border:0}
/* The enlarged image is intentionally unframed for inspecting the actual pixels. */
@media(max-width:1100px){.inline-demo-grid{grid-template-columns:minmax(0,1fr)}.inline-demo-mobile{width:min(290px,100%);justify-self:center}}
@media(max-width:640px){
 :is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview{padding:10px 0 0}
 :is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview .dt-desktop{padding:9px 6px 18px;border-radius:9px;margin-bottom:34px}
 :is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview .dt-desktop::after{height:34px}
 :is(.resource-panels .resource-image,.model-features .model-feature-zoom).dt-preview .dt-phone{width:236px;transform:none}
 .catalog-image.dt-showcase{padding:20px 16px!important}
 .portfolio-demo-dialog .dt-live-dialog{width:calc(100% - 20px);height:calc(100% - 160px)}
 .portfolio-fan-stage .portfolio-fan-card.dt-phone{border-width:1px;border-radius:17px;padding:9px 3px 8px}
 .portfolio-fan-card.dt-phone>.dt-display{border-radius:11px}
 .portfolio-fan-card.dt-phone::before{top:3px;width:20px;height:2px}
 .portfolio-fan-card.dt-phone::after{bottom:3px;width:26px;height:2px}
}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
 .dt-preview--phone{perspective:1000px}
 .dt-preview--phone>.dt-phone{transform:rotateY(var(--dt-y,-5deg)) rotateX(var(--dt-x,1deg));transition:transform .3s ease}
}
@media(prefers-reduced-motion:reduce){.dt-device{transition:none!important}.dt-preview--phone>.dt-phone{transform:none!important}}

.model-features .model-feature-figure .model-feature-zoom.dt-preview{width:100%;max-width:none;border:0;border-radius:0;background:transparent;overflow:visible;padding:0}
.model-features .model-feature-figure .model-feature-zoom.dt-preview--phone{width:min(100%,260px);margin:auto}
