.plugin-modal[hidden] {
      display: none;
    }

    .plugin-modal {
      position: fixed;
      inset: 0;
      z-index: 1200;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 20px;
      background: rgba(8, 12, 16, 0.62);
      backdrop-filter: blur(10px);
    }

    .plugin-modal-dialog {
      width: min(100%, 1180px);
      height: min(88vh, 900px);
      border-radius: 24px;
      overflow: hidden;
      background: #0b0d10;
      box-shadow: 0 32px 90px rgba(0, 0, 0, 0.36);
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr);
    }

    .plugin-modal-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
      padding: 16px 18px;
      border-bottom: 1px solid rgba(255, 255, 255, 0.08);
      background: rgba(255, 255, 255, 0.04);
    }

    .plugin-modal-title {
      margin: 0;
      color: #f3f6f8;
      font-size: 18px;
      font-weight: 600;
      min-width: 0;
    }

    .plugin-modal-actions {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }

    .plugin-modal-actions .btn {
      white-space: nowrap;
    }

    #pluginModalShare {
      background: #ffffff;
      color: #0b0d10;
      border-color: #ffffff;
      box-shadow: 0 10px 24px rgba(255, 255, 255, 0.18);
    }

    #pluginModalShare:hover,
    #pluginModalShare:focus-visible {
      background: #f2f4f6;
      border-color: #f2f4f6;
      color: #0b0d10;
    }

    .plugin-modal-share-hint {
      margin: 0;
      padding: 0 18px 14px;
      color: rgba(243, 246, 248, 0.78);
      font-size: 13px;
      line-height: 1.6;
    }

    .plugin-modal-share-hint.is-warning {
      color: #ffd1bf;
    }

    .plugin-modal-share-panel[hidden] {
      display: none;
    }

    .plugin-modal-share-panel {
      display: flex;
      align-items: center;
      gap: 18px;
      width: min(100% - 36px, 540px);
      margin: 0 18px 16px;
      padding: 14px 16px;
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 18px;
      background: rgba(255, 255, 255, 0.05);
      box-sizing: border-box;
    }

    .plugin-modal-share-qr {
      width: clamp(84px, 18vw, 116px);
      aspect-ratio: 1;
      height: auto;
      border-radius: 12px;
      background: #ffffff;
      object-fit: cover;
      flex: 0 0 auto;
    }

    .plugin-modal-share-copy {
      min-width: 0;
      display: grid;
      gap: 8px;
    }

    .plugin-modal-share-copy strong {
      color: #f3f6f8;
      font-size: 14px;
    }

    .plugin-modal-share-copy p {
      margin: 0;
      color: rgba(243, 246, 248, 0.78);
      font-size: 12px;
      line-height: 1.55;
    }

    .plugin-modal-share-link {
      color: #ffffff;
      word-break: break-all;
      font-size: 12px;
      line-height: 1.5;
      text-decoration: underline;
      text-underline-offset: 3px;
    }

    .plugin-modal-frame {
      width: 100%;
      height: 100%;
      border: 0;
      background: #0b0d10;
      min-height: 0;
    }

    .plugin-modal-focus-guard {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    @media (max-width: 720px) {
      .plugin-modal {
        align-items: stretch;
        padding: 6px;
      }

      .plugin-modal-dialog {
        width: 100%;
        height: calc(100dvh - 12px);
        max-height: calc(100dvh - 12px);
        border-radius: 16px;
      }

      .plugin-modal-bar {
        align-items: center;
        flex-direction: row;
        gap: 10px;
        padding: 10px 12px;
      }

      .plugin-modal-title {
        flex: 1 1 auto;
        font-size: 15px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .plugin-modal-actions {
        margin-left: auto;
        gap: 8px;
        flex-wrap: nowrap;
      }

      .plugin-modal-actions .btn {
        min-height: 36px;
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 999px;
      }

      .plugin-modal-share-hint {
        padding: 0 12px 10px;
        font-size: 12px;
        line-height: 1.5;
      }

      .plugin-modal-share-panel {
        align-items: flex-start;
        flex-direction: column;
        width: 100%;
        margin: 0 0 12px;
        padding: 12px;
        gap: 12px;
        border-radius: 14px;
      }

      .plugin-modal-share-qr {
        width: min(96px, 30vw);
      }

      .plugin-modal-share-copy {
        gap: 6px;
      }
    }
