
    .emsuk-paed-als {
      --bg: #eef8f8;
      --ink: #1f2933;
      --muted: #5d6b78;
      --purple: #b985f4;
      --pale-purple: #e5c6ff;
      --pink: #ff6b9a;
      --red: #ff3b5f;
      --orange: #f9b94e;
      --green: #74ef4f;
      --line: #9aa8ad;
      --shadow: 0 10px 25px rgba(0,0,0,0.12);
      font-family: Arial, Helvetica, sans-serif;
      color: var(--ink);
      max-width: 1280px;
      margin: 0 auto;
    }

    .emsuk-paed-als * {
      box-sizing: border-box;
    }

    .emsuk-paed-als .paed-wrapper {
      padding: 18px;
      background: #f5f7f9;
    }

    .emsuk-paed-als .paed-header {
      background: #fff;
      border-radius: 20px;
      box-shadow: var(--shadow);
      padding: 18px 22px;
      margin-bottom: 18px;
      border-top: 8px solid #d71920;
    }

    .emsuk-paed-als .paed-header-row {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: center;
      flex-wrap: wrap;
    }

    .emsuk-paed-als .paed-brand {
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .emsuk-paed-als .paed-heart {
      width: 46px;
      height: 46px;
      background: linear-gradient(135deg, #d71920 50%, #111 50%);
      border-radius: 50%;
      position: relative;
      flex-shrink: 0;
    }

    .emsuk-paed-als .paed-heart::after {
      content: "";
      position: absolute;
      width: 18px;
      height: 32px;
      background: #fff;
      transform: rotate(35deg);
      left: 16px;
      top: 8px;
      border-radius: 10px;
    }

    .emsuk-paed-als h1 {
      margin: 0;
      font-size: clamp(24px, 3vw, 38px);
      line-height: 1.1;
    }

    .emsuk-paed-als h2,
    .emsuk-paed-als h3 {
      margin: 0 0 8px;
    }

    .emsuk-paed-als p {
      margin: 6px 0;
    }

    .emsuk-paed-als .paed-muted {
      color: var(--muted);
      font-size: 14px;
    }

    .emsuk-paed-als .paed-badge {
      background: #111827;
      color: #fff;
      padding: 10px 14px;
      border-radius: 14px;
      font-weight: 800;
      text-align: center;
      min-width: 120px;
    }

    .emsuk-paed-als .paed-notice {
      background: #fff4d6;
      border: 1px solid #f2d27b;
      color: #5a4300;
      border-radius: 14px;
      padding: 12px 14px;
      margin-top: 14px;
      font-size: 14px;
    }

    .emsuk-paed-als .paed-layout {
      display: flex;
      flex-direction: column;
      gap: 18px;
    }

    .emsuk-paed-als .paed-flow-area {
      background: var(--bg);
      border-radius: 24px;
      box-shadow: var(--shadow);
      padding: 22px;
      overflow: hidden;
    }

    .emsuk-paed-als .paed-flow {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 16px;
    }

    .emsuk-paed-als .paed-start-row {
      width: 100%;
      display: grid;
      grid-template-columns: minmax(260px, 380px) minmax(280px, 420px);
      gap: 18px;
      justify-content: center;
      align-items: stretch;
    }

    .emsuk-paed-als .paed-node {
      border: 2px solid rgba(0,0,0,0.12);
      border-radius: 18px;
      padding: 15px 18px;
      text-align: center;
      min-width: 230px;
      max-width: 380px;
      box-shadow: 0 6px 12px rgba(0,0,0,0.11);
      cursor: pointer;
      transition: 0.2s ease;
      position: relative;
      user-select: none;
    }

    .emsuk-paed-als .paed-start-row .paed-node {
      width: 100%;
      max-width: none;
    }

    .emsuk-paed-als .paed-node:hover {
      transform: translateY(-2px);
      box-shadow: 0 12px 22px rgba(0,0,0,0.15);
    }

    .emsuk-paed-als .paed-node.paed-disabled {
      background: #d1d5db !important;
      color: #6b7280 !important;
      border-color: #9ca3af;
      cursor: not-allowed;
      opacity: 0.55;
      filter: grayscale(1);
      box-shadow: none;
    }

    .emsuk-paed-als .paed-node.paed-disabled:hover {
      transform: none;
      box-shadow: none;
    }

    .emsuk-paed-als .paed-node.paed-disabled::after {
      content: "Locked";
      position: absolute;
      top: -10px;
      right: -10px;
      background: #374151;
      color: #fff;
      font-size: 11px;
      padding: 4px 8px;
      border-radius: 999px;
    }

    .emsuk-paed-als .paed-purple { background: var(--purple); }
    .emsuk-paed-als .paed-pale-purple { background: var(--pale-purple); }
    .emsuk-paed-als .paed-red { background: var(--red); color: #fff; }
    .emsuk-paed-als .paed-pink { background: var(--pink); }
    .emsuk-paed-als .paed-orange { background: var(--orange); }
    .emsuk-paed-als .paed-green { background: var(--green); }
    .emsuk-paed-als .paed-cream { background: #ffd68c; }

    .emsuk-paed-als .paed-active {
      outline: 5px solid rgba(47,128,237,0.35);
      border-color: #2f80ed;
    }

    .emsuk-paed-als .paed-completed {
      opacity: 0.9;
      outline: 4px solid rgba(34,197,94,0.35);
    }

    .emsuk-paed-als .paed-arrow {
      width: 4px;
      height: 28px;
      background: var(--line);
      position: relative;
    }

    .emsuk-paed-als .paed-arrow::after {
      content: "";
      position: absolute;
      left: -8px;
      bottom: -4px;
      border-left: 10px solid transparent;
      border-right: 10px solid transparent;
      border-top: 14px solid var(--line);
    }

    .emsuk-paed-als .paed-branch-row {
      width: 100%;
      display: grid;
      grid-template-columns: 1fr 1fr 1fr;
      gap: 22px;
      align-items: start;
      margin-top: 8px;
    }

    .emsuk-paed-als .paed-branch {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 14px;
    }

    .emsuk-paed-als .paed-loop-box {
      border: 3px dashed #94a3b8;
      border-radius: 18px;
      padding: 10px;
      background: rgba(255,255,255,0.35);
      width: 100%;
    }

    .emsuk-paed-als .paed-card,
    .emsuk-paed-als .paed-dose-card {
      background: #fff;
      border-radius: 20px;
      box-shadow: var(--shadow);
      padding: 16px;
    }

    .emsuk-paed-als .paed-dose-card {
      border: 2px solid #dbe3ea;
      border-radius: 18px;
    }

    .emsuk-paed-als .paed-grid-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
    }

    .emsuk-paed-als .paed-command-strip {
      display: grid;
      grid-template-columns: 1fr 1fr 1fr 1fr;
      gap: 18px;
      align-items: stretch;
    }

    .emsuk-paed-als .paed-command-strip .paed-card,
    .emsuk-paed-als .paed-command-strip .paed-drug-box {
      height: 100%;
    }

    .emsuk-paed-als .paed-drug-box {
      border: 3px solid #d1d5db;
      border-radius: 20px;
      padding: 20px;
      background: #f3f4f6;
      cursor: pointer;
      transition: 0.2s ease;
      min-height: 150px;
    }

    .emsuk-paed-als .paed-drug-box:hover {
      transform: translateY(-2px);
    }

    .emsuk-paed-als .paed-drug-box.paed-locked {
      background: #e5e7eb;
      color: #6b7280;
      border-color: #cbd5e1;
      cursor: not-allowed;
      opacity: 0.75;
    }

    .emsuk-paed-als .paed-drug-box.paed-ready {
      background: #fff7ed;
      border-color: #fdba74;
      color: #7c2d12;
      box-shadow: 0 0 0 6px rgba(251,146,60,0.22);
      animation: paedDrugFlash 0.9s infinite;
    }

    .emsuk-paed-als .paed-drug-box.paed-given {
      background: #ecfdf5;
      border-color: #86efac;
      color: #14532d;
    }

    .emsuk-paed-als .paed-drug-box.paed-overdue {
      background: #fef2f2;
      border-color: #fecaca;
      color: #7f1d1d;
      animation: paedDrugFlashRed 0.7s infinite;
    }

    .emsuk-paed-als .paed-drug-title {
      font-size: 24px;
      font-weight: 900;
      margin-bottom: 8px;
    }

    .emsuk-paed-als .paed-drug-text {
      font-size: 16px;
      line-height: 1.5;
      margin-bottom: 12px;
    }

    .emsuk-paed-als .paed-drug-dose {
      display: block;
      margin-top: 10px;
      padding: 9px 10px;
      border-radius: 12px;
      background: rgba(17,24,39,0.08);
      font-size: 15px;
      line-height: 1.4;
    }

    .emsuk-paed-als .paed-drug-state {
      display: inline-block;
      font-size: 14px;
      font-weight: 900;
      padding: 8px 14px;
      border-radius: 999px;
      background: rgba(17,24,39,0.08);
    }

    @keyframes paedDrugFlash {
      0% { transform: scale(1); box-shadow: 0 0 0 4px rgba(251,146,60,0.18); }
      50% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(251,146,60,0.35); }
      100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(251,146,60,0.18); }
    }

    @keyframes paedDrugFlashRed {
      0% { transform: scale(1); box-shadow: 0 0 0 4px rgba(239,68,68,0.18); }
      50% { transform: scale(1.03); box-shadow: 0 0 0 10px rgba(239,68,68,0.35); }
      100% { transform: scale(1); box-shadow: 0 0 0 4px rgba(239,68,68,0.18); }
    }

    .emsuk-paed-als .paed-timer,
    .emsuk-paed-als .paed-drug-timer {
      font-size: 38px;
      font-weight: 900;
      text-align: center;
      background: #111827;
      color: #fff;
      padding: 12px;
      border-radius: 16px;
      letter-spacing: 1px;
    }

    .emsuk-paed-als .paed-drug-timer {
      font-size: 32px;
      background: #064e3b;
    }

    .emsuk-paed-als .paed-not-started { background: #374151; }
    .emsuk-paed-als .paed-due { background: #b45309; }
    .emsuk-paed-als .paed-overdue-timer {
      background: #991b1b;
      animation: paedPulse 1s infinite;
    }

    @keyframes paedPulse {
      0% { transform: scale(1); }
      50% { transform: scale(1.025); }
      100% { transform: scale(1); }
    }

    .emsuk-paed-als .paed-status {
      border-radius: 14px;
      padding: 12px;
      font-size: 14px;
      margin-top: 10px;
      border: 1px solid #d1d5db;
      background: #f3f4f6;
      color: #374151;
    }

    .emsuk-paed-als .paed-status-ready {
      background: #fff7ed;
      border-color: #fdba74;
      color: #7c2d12;
      font-weight: 800;
    }

    .emsuk-paed-als .paed-status-good {
      background: #ecfdf5;
      border-color: #86efac;
      color: #14532d;
    }

    .emsuk-paed-als .paed-status-danger {
      background: #fef2f2;
      border-color: #fecaca;
      color: #7f1d1d;
      font-weight: 800;
    }

    .emsuk-paed-als .paed-stat-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
    }

    .emsuk-paed-als .paed-stat {
      background: #f1f5f9;
      border-radius: 14px;
      padding: 10px;
      text-align: center;
    }

    .emsuk-paed-als .paed-stat strong {
      display: block;
      font-size: 24px;
    }

    .emsuk-paed-als input,
    .emsuk-paed-als select {
      width: 100%;
      padding: 11px;
      border: 1px solid #cbd5e1;
      border-radius: 12px;
      font-size: 16px;
    }

    .emsuk-paed-als button {
      border: 0;
      border-radius: 12px;
      padding: 10px 12px;
      font-weight: 800;
      cursor: pointer;
      background: #111827;
      color: #fff;
      transition: 0.2s ease;
    }

    .emsuk-paed-als button:hover {
      transform: translateY(-1px);
      opacity: 0.92;
    }

    .emsuk-paed-als .paed-btn-secondary {
      background: #e5e7eb;
      color: #111827;
    }

    .emsuk-paed-als .paed-btn-blue {
      background: #2563eb;
    }

    .emsuk-paed-als .paed-btn-red {
      background: #dc2626;
    }

    .emsuk-paed-als .paed-btn-row {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .emsuk-paed-als .paed-result {
      background: #ecfdf5;
      border: 1px solid #bbf7d0;
      border-radius: 14px;
      padding: 12px;
      margin-top: 10px;
      font-size: 14px;
      line-height: 1.5;
    }

    .emsuk-paed-als .paed-warning {
      background: #fff1f2;
      border: 1px solid #fecdd3;
      color: #7f1d1d;
      border-radius: 14px;
      padding: 10px;
      font-size: 14px;
      margin-top: 10px;
    }

    .emsuk-paed-als .paed-info-box {
      background: #f8fafc;
      border: 1px solid #dbe3ea;
      border-radius: 14px;
      padding: 12px;
      margin-bottom: 10px;
    }

    .emsuk-paed-als .paed-check-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .emsuk-paed-als .paed-check {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      font-weight: 700;
      background: #fff;
      border: 1px solid #dbe3ea;
      border-radius: 12px;
      padding: 9px 10px;
      cursor: pointer;
      margin: 0;
    }

    .emsuk-paed-als .paed-check input[type="checkbox"] {
      width: auto;
      margin-top: 2px;
      transform: scale(1.2);
      cursor: pointer;
      flex-shrink: 0;
    }

    .emsuk-paed-als .paed-check span {
      line-height: 1.3;
      font-size: 14px;
    }

    .emsuk-paed-als .paed-check.paed-checked {
      background: #ecfdf5;
      border-color: #86efac;
      color: #14532d;
    }

    .emsuk-paed-als .paed-check-entry {
      flex-direction: column;
      cursor: default;
    }

    .emsuk-paed-als .paed-check-main {
      display: flex;
      align-items: flex-start;
      gap: 10px;
      width: 100%;
    }

    .emsuk-paed-als .paed-entry-row {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 8px;
      width: 100%;
      margin-top: 8px;
    }

    .emsuk-paed-als .paed-mini-btn {
      padding: 8px 10px;
      border-radius: 10px;
      font-size: 12px;
      white-space: nowrap;
      background: #111827;
      color: #fff;
    }

    .emsuk-paed-als .paed-recorded {
      font-size: 13px;
      font-weight: 800;
      border-radius: 10px;
      padding: 7px 9px;
      display: none;
      width: 100%;
    }

    .emsuk-paed-als .paed-recorded.paed-green-result {
      display: block;
      color: #14532d;
      background: #ecfdf5;
      border: 1px solid #86efac;
    }

    .emsuk-paed-als .paed-recorded.paed-red-result {
      display: block;
      color: #7f1d1d;
      background: #fef2f2;
      border: 1px solid #fecaca;
    }

    .emsuk-paed-als .paed-log {
      max-height: 320px;
      overflow: auto;
      background: #f8fafc;
      border: 1px solid #dbe3ea;
      border-radius: 14px;
      padding: 10px;
      font-size: 13px;
    }

    .emsuk-paed-als .paed-log-entry {
      padding: 8px;
      border-bottom: 1px solid #e2e8f0;
    }

    .emsuk-paed-als .paed-log-entry:last-child {
      border-bottom: 0;
    }

    .emsuk-paed-als .paed-path-note {
      background: #e0f2fe;
      border: 1px solid #7dd3fc;
      border-radius: 14px;
      padding: 12px;
      margin-top: 10px;
      color: #075985;
      font-size: 14px;
    }

    .emsuk-paed-als .paed-lock-note {
      background: #f3f4f6;
      border: 1px solid #d1d5db;
      color: #374151;
      border-radius: 14px;
      padding: 10px;
      font-size: 13px;
      margin-top: 10px;
    }

    .emsuk-paed-als .paed-hidden {
      display: none;
    }

    @media (max-width: 1100px) {
      .emsuk-paed-als .paed-command-strip {
        grid-template-columns: 1fr 1fr;
      }
    }

    @media (max-width: 900px) {
      .emsuk-paed-als .paed-grid-2,
      .emsuk-paed-als .paed-branch-row {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 800px) {
      .emsuk-paed-als .paed-start-row {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 700px) {
      .emsuk-paed-als .paed-command-strip,
      .emsuk-paed-als .paed-stat-grid {
        grid-template-columns: 1fr;
      }
    }
  
/* Scoped theme compatibility and keyboard support. */
.emsuk-paed-als {width:100%; line-height:1.5; text-align:left;}
.emsuk-paed-als h1,.emsuk-paed-als h2,.emsuk-paed-als h3 {text-transform:none; color:inherit; letter-spacing:normal; font-family:inherit;}
.emsuk-paed-als .paed-node {min-width:0; width:100%;}
.emsuk-paed-als .paed-flow-area {overflow:visible;}
.emsuk-paed-als .paed-branch,.emsuk-paed-als .paed-card,.emsuk-paed-als .paed-dose-card {min-width:0;}
.emsuk-paed-als [role=button]:focus-visible,.emsuk-paed-als button:focus-visible {outline:4px solid #1764bb;outline-offset:4px;}
.emsuk-paed-als button {font-family:inherit;cursor:pointer;text-transform:none;letter-spacing:normal;}
.emsuk-paed-als .paed-reference {background:white;border-radius:16px;padding:16px;margin-top:16px;}
.emsuk-paed-als .paed-reference summary {font-weight:bold;cursor:pointer;padding:8px;}
.emsuk-paed-als .paed-reference img {max-width:100%;height:auto;display:block;margin:15px auto;}
.emsuk-paed-als .paed-table-wrap {overflow-x:auto;}
.emsuk-paed-als table {width:100%;border-collapse:collapse;}
.emsuk-paed-als th,.emsuk-paed-als td {padding:8px;border:1px solid #ddd;text-align:left;}
@media(max-width:500px){.emsuk-paed-als .paed-wrapper{padding:8px}.emsuk-paed-als .paed-header{padding:14px}.emsuk-paed-als .paed-entry-row{grid-template-columns:1fr}.emsuk-paed-als .paed-header h1{font-size:23px}.emsuk-paed-als .paed-brand{min-width:0}.emsuk-paed-als .paed-heart{flex-shrink:0}}
@media(prefers-reduced-motion:reduce){.emsuk-paed-als *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
