/* ── POPUP WRAPPER ── */
  #win-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 340px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow:
      0 8px 32px rgba(0,0,0,.28),
      0 2px 8px rgba(0,0,0,.18),
      inset 0 1px 0 rgba(255,255,255,.15);
    animation: popIn .35s cubic-bezier(.34,1.56,.64,1) both;
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  }

  @keyframes popIn {
    from { opacity: 0; transform: translateY(24px) scale(.96); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
  }

  /* ── TITLE BAR ── */
  #win-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 10px 9px 12px;
    background: linear-gradient(180deg, #2E8B57 0%, #FF7F2A 100%);
    user-select: none;
  }

  #win-titlebar .title-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
  }

  #win-titlebar .title-text {
    flex: 1;
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .2px;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Window control buttons */
  .win-controls {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
  }

  .win-btn {
    width: 22px;
    height: 20px;
    border: none;
    cursor: pointer;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: background .12s;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
  }

  .win-btn:hover { background: rgba(255,255,255,.22); }
  .win-btn.close-btn:hover { background: #c0392b; }
  .win-btn.close-btn:active { background: #962d22; }

  /* ── CONTENT AREA ── */
  #win-body {
    background: #f8f9fb;
    padding: 16px 16px 18px;
    border: 1px solid #b0c4de;
    border-top: none;
    border-radius: 0 0 8px 8px;
  }

  .win-alert-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
  }

  .win-alert-icon {
    flex-shrink: 0;
    margin-top: 2px;
  }

  .win-alert-icon svg {
    width: 38px;
    height: 38px;
  }

  .win-message {
    flex: 1;
  }

  .win-message h3 {
    font-size: 14px;
    font-weight: 700;
    color: #1a3c6e;
    margin-bottom: 6px;
    letter-spacing: .1px;
  }

  .win-message p {
    font-size: 12.5px;
    color: #444;
    line-height: 1.55;
  }

  .win-message p strong {
    color: #c0392b;
  }

  /* Divider */
  .win-divider {
    height: 1px;
    background: linear-gradient(90deg, #c8d8ec, #e8eef6, #c8d8ec);
    margin: 14px 0 12px;
  }

  /* Bottom OK button */
  .win-footer {
    display: flex;
    justify-content: flex-end;
  }

  .win-ok-btn {
    padding: 5px 22px;
    font-size: 12.5px;
    font-family: inherit;
    font-weight: 600;
    color: #1a3c6e;
    background: linear-gradient(180deg, #f5f8ff 0%, #dce7f5 100%);
    border: 1px solid #7fa8d4;
    border-radius: 4px;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
    box-shadow: 0 1px 2px rgba(0,0,0,.1);
  }

  .win-ok-btn:hover {
    background: linear-gradient(180deg, #e8f0fb 0%, #c8d8f0 100%);
    box-shadow: 0 2px 6px rgba(0,0,0,.15);
  }

  .win-ok-btn:active {
    background: linear-gradient(180deg, #c8d8f0 0%, #b0c8e8 100%);
  }

  /* Hide animation */
  #win-popup.closing {
    animation: popOut .25s ease-in forwards;
  }

  @keyframes popOut {
    to { opacity: 0; transform: translateY(16px) scale(.95); }
  }

  /* Demo label */
  .demo-note {
    color: #888;
    font-size: 14px;
    font-family: 'Segoe UI', sans-serif;
  }