/* One live application, three viewport-driven device presentations. */
.practice-responsive { display: none; }
.demo-device-island, .demo-home-indicator { display: none; }
/* Device presentation follows html.dv-* (auto-detected or picked with the preview buttons). */
html.dv-tablet #act1 .laptop { width: min(100%, 820px); }
html.dv-tablet #act1 .laptop-screen { padding: 22px; border-radius: 34px; }
html.dv-tablet #act1 .laptop-display { border-radius: 14px; overflow: hidden; }
html.dv-tablet #act1 .desktop-scene { height: 560px; }
html.dv-tablet #act1 .step-bar { flex-basis: 105px; padding: 12px 7px; }
html.dv-tablet #act1 .step-label { white-space: normal; }
html.dv-tablet #act1 .laptop-cam { top: 9px; }
html:is(.dv-tablet,.dv-phone) #act1 .monitor-desk { display: none; }
html:is(.dv-tablet,.dv-phone) #act1 .pms-img, html:is(.dv-tablet,.dv-phone) #act1 .desktop-bar { display: none; }
html:is(.dv-tablet,.dv-phone) #act1 .pms-overlay-text { top: auto; bottom: 74px; left: 50%; font-size: 18px; white-space: normal; width: 90%; color: var(--demo-muted); text-shadow: none; }
html:is(.dv-tablet,.dv-phone) #act1 .practice-responsive { display: flex; flex-direction: column; gap: 16px; height: 100%; overflow-y: auto; padding: 22px; background: var(--demo-surface); color: var(--demo-ink); }
html:is(.dv-tablet,.dv-phone) .practice-mobile-header { display: flex; align-items: center; gap: 9px; padding-bottom: 16px; border-bottom: 1px solid var(--demo-border); }
html:is(.dv-tablet,.dv-phone) .practice-mobile-header img { width: 34px; height: 34px; object-fit: contain; }
html:is(.dv-tablet,.dv-phone) .practice-mobile-header strong { font-size: 16px; }
html:is(.dv-tablet,.dv-phone) .practice-specialty-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: var(--demo-paper); border: 1px solid var(--demo-border); border-radius: 8px; flex-shrink: 0; }
html:is(.dv-tablet,.dv-phone) .practice-patient { background: var(--demo-paper); border: 1px solid var(--demo-border); border-radius: 8px; padding: 18px; }
html:is(.dv-tablet,.dv-phone) .practice-patient h4 { font-size: 20px; margin: 6px 0 12px; }
html:is(.dv-tablet,.dv-phone) .practice-field-label { color: var(--demo-muted); font-size: 12px; margin-bottom: 4px; }
html:is(.dv-tablet,.dv-phone) .practice-patient p { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
html:is(.dv-tablet,.dv-phone) .practice-procedures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html:is(.dv-tablet,.dv-phone) .practice-procedure { padding: 12px; border-radius: 8px; border: 1px solid var(--demo-border); background: var(--demo-paper); font-size: 14px; line-height: 1.4; }
html:is(.dv-tablet,.dv-phone) #act1 .popup-panel { right: 16px; top: 16px; bottom: 16px; width: min(360px, calc(100% - 32px)); }
html:is(.dv-tablet,.dv-phone) #act1 .popup-body { padding: 16px; }
html:is(.dv-tablet,.dv-phone) #act1 .popup-title { font-size: 16px; }
html:is(.dv-tablet,.dv-phone) #act1 .popup-tab, html:is(.dv-tablet,.dv-phone) #act1 .pf-label { font-size: 12px; }
html:is(.dv-tablet,.dv-phone) #act1 .popup-tab, html:is(.dv-tablet,.dv-phone) #act1 .p-pill, html:is(.dv-tablet,.dv-phone) #act1 .pr-pill, html:is(.dv-tablet,.dv-phone) #act1 .scan-btn-popup, html:is(.dv-tablet,.dv-phone) #act1 .popup-close { min-height: 44px; }
html:is(.dv-tablet,.dv-phone) #act1 .popup-close { min-width: 44px; }
html:is(.dv-tablet,.dv-phone) #act1 .pr-pill, html:is(.dv-tablet,.dv-phone) #act1 .p-pill { font-size: 14px; }
html:is(.dv-tablet,.dv-phone) #act1 .pf-input { min-height: 44px; font-size: 15px; min-width: 0; }
html:is(.dv-tablet,.dv-phone) #act1 .float-guide { display: none; }
html:is(.dv-tablet,.dv-phone) #act1 .laptop-app { min-height: 0; }
html:is(.dv-tablet,.dv-phone) #act1 .pms-screen { min-height: 0; overflow: hidden; }
html:is(.dv-tablet,.dv-phone) #act1 .edge-widget { top: auto; bottom: 20px; transform: none; }
html:is(.dv-tablet,.dv-phone) #act1 .edge-badge { width: 54px; height: 54px; }
html:is(.dv-tablet,.dv-phone) #careStage { max-width: 100% !important; }
html:is(.dv-tablet,.dv-phone) #nextDayBtn { position: static !important; transform: none !important; align-items: center !important; margin-top: 18px; animation: none !important; }
@media (max-width: 767px) {
  #demo { padding-left: 6px; padding-right: 6px; }
  /* Phones: compact specialty chips so they claim less vertical space. */
  #demo .spec-label { font-size: 10px; letter-spacing: .08em; margin-bottom: 5px; }
  #demo .spec-grid { gap: 5px; margin-bottom: 22px; }
  #demo .spec-chip { min-height: 30px; padding: 4px 9px; gap: 4px; font-size: 11.5px; border-radius: 7px; border-width: 1px; }
  #demo .spec-chip svg { width: 12px; height: 12px; }
  #demo .demo-heading { margin-bottom: 12px; }
  #demo .demo-heading h2 { font-size: 22px; margin-bottom: 10px; }
  #demo .stage-title h3 { font-size: 21px; }
  #demo .stage-title p { font-size: 14px; }
}
/* iPhone preview: real phone shell with the mobile practice layout (follows html.dv-phone, not viewport width). */
html.dv-phone #act1 .laptop { width: min(100%, 350px); }
html.dv-phone #act1 .laptop-screen { padding: 10px; border-radius: 46px; background: var(--demo-device); border: 1px solid var(--demo-device-border); }
html.dv-phone #act1 .laptop-display { flex-direction: column; border-radius: 36px; overflow: hidden; height: 690px; max-height: none; background: var(--demo-paper); position: relative; padding-top: 44px; padding-bottom: 20px; }
html.dv-phone #act1 .laptop-cam { display: none; }
html.dv-phone #act1 .demo-device-island { display: block; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 94px; height: 25px; border-radius: 20px; background: var(--demo-device); z-index: 40; }
html.dv-phone #act1 .demo-home-indicator { display: block; position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 100px; height: 4px; border-radius: 4px; background: var(--demo-device); z-index: 40; }
html.dv-phone #act1 .step-bar { flex: 0 0 55px; width: 100%; flex-direction: row; padding: 8px 14px; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--demo-border); }
html.dv-phone #act1 .step-label { display: none; }
html.dv-phone #act1 .step-line { width: 12px; height: 2px; margin: 0; }
html.dv-phone #act1 .step-wrap { flex-shrink: 0; }
html.dv-phone #act1 .laptop-app { display: flex; flex: 1; }
html.dv-phone #act1 .desktop-scene { height: auto; width: 100%; flex: 1; }
html.dv-phone #act1 .practice-responsive { padding: 16px; gap: 12px; }
html.dv-phone #act1 .practice-mobile-header strong { font-size: 14px; }
html.dv-phone #act1 .practice-patient { padding: 14px; }
html.dv-phone #act1 .practice-procedures { grid-template-columns: 1fr; padding-bottom: 86px; }
html.dv-phone #act1 .popup-panel { inset: 0; width: 100%; border-radius: 0; box-shadow: none; }
html.dv-phone #act1 .scanning-screen .popup-panel { opacity: 0; pointer-events: none; visibility: hidden; transform: translateX(14px) scale(0.96); }
html.dv-phone #act1 .scanning-screen .edge-widget { visibility: hidden; pointer-events: none; }
html.dv-phone #act1 .popup-header { padding: 8px 12px; }
html.dv-phone #act1 .popup-sub { font-size: 10px; max-width: 180px; }
html.dv-phone #act1 .popup-body { padding: 12px; overscroll-behavior: contain; }
html.dv-phone #act1 .proc-grid2 { grid-template-columns: 1fr; }
html.dv-phone #act1 .popup-footer { padding: 8px 12px; }
html.dv-phone #act1 .pms-overlay-text { font-size: 16px; }
html.dv-phone #act1 .laptop { width: 360px; max-width: 100%; margin: 0 auto; }
html.dv-phone #act1 .laptop-display { height: 720px; }
html.dv-phone #act1 .edge-widget { right: 0; }
/* Computer/tablet previews on a smaller screen render at native size, scaled to fit. */
html.dv-desktop #act1 .laptop { width: 1040px; max-width: none; zoom: var(--dv-zoom, 1); }
html.dv-tablet #act1 .laptop { width: 820px; max-width: none; zoom: var(--dv-zoom, 1); }
html.dv-desktop #act1 .laptop-screen { padding: 20px 20px 22px; border-radius: 18px; }
html.dv-desktop #act1 .step-bar { flex-basis: 132px; padding: 16px 10px; align-items: flex-start; }
html.dv-desktop #act1 .step-bar .step-label { display: block; }
html.dv-desktop #act1 .step-bar .step-line { margin-left: 12px; }
/* Device preview buttons */
.device-switch { display: flex; justify-content: center; align-items: center; gap: 6px; flex-wrap: wrap; margin: -12px 0 22px; }
.device-switch-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #9ca3af; margin-right: 4px; }
.device-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(47,174,191,0.45); background: rgba(47,174,191,0.08); color: #1f7f8c; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .18s, color .18s; }
.device-btn svg { width: 15px; height: 15px; }
.device-btn:hover { background: rgba(47,174,191,0.18); }
.device-btn.active { background: #2faebf; border-color: #2faebf; color: #fff; }
.device-btn small { font-size: 10px; font-weight: 600; opacity: .8; }
html.dark .device-btn { color: #8fd6df; background: rgba(47,174,191,0.12); }
html.dark .device-btn.active { color: #fff; background: #2faebf; }
@media (max-width: 767px) { .device-switch { margin: -10px 0 16px; gap: 5px; } .device-switch-label { width: 100%; text-align: center; font-size: 10px; margin: 0 0 2px; } .device-btn { min-height: 32px; padding: 5px 10px; font-size: 12px; } }
@media (prefers-reduced-motion: reduce) {
  #act1 .popup-panel { transition: none; }
  #act1 .edge-badge, #demo .spec-chip::after { animation: none; }
}
/* device switch fade */
.act{transition:opacity .16s ease,transform .16s ease;}
.act.dv-fading{opacity:0;transform:scale(.985);}
html.dv-phone #act1 .pms-overlay-text { display: none; }
