/* --- Container and visual --- */
  .preview {
    --radius: 14px;            /* curve amount, change to taste */
    --width: 100%;
    --height: 480px;
    position: relative;
    width: var(--width);
    height: var(--height);
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(180deg,#f7f7f9,#ffffff);
    box-shadow: 0 6px 18px rgba(20,20,30,0.08);
    border: 1px solid rgba(0,0,0,0.06);
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  }

  /* --- iframe preview --- */
  .preview iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    transform-origin: center;
  }

  /* --- fallback view when iframe blocked --- */
  .preview .fallback {
    display: none;
    width: 100%;
    height: 100%;
    padding: 16px;
    box-sizing: border-box;
    text-align: left;
  }
  .preview .fallback .title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
  }
  .preview .fallback .host {
    font-size: 12px;
    color: #666;
    margin-bottom: 12px;
  }
  .preview .fallback .open-link {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    background: #0b63ff;
    color: white;
    text-decoration: none;
    font-size: 13px;
  }

  /* --- full-screen / open button top-right inside the border --- */
  .preview__open-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 5;
    border: 0;
    background: rgba(255,255,255,0.9);
    width: 40px;
    height: 40px;
    border-radius: 10px; /* subtle rounded button */
    display: inline-grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(10,10,20,0.06);
    transition: transform .12s ease, background .12s;
    backdrop-filter: blur(4px);
    opacity: 0.9;
  }
  .preview__open-btn:hover { transform: translateY(-2px); }
  .preview__open-btn:active { transform: translateY(0); }

  .preview__open-btn svg { width: 18px; height: 18px; display: block; }

  /* small attribution row (optional) */
  .preview__meta {
    position: absolute;
    left: 12px;
    bottom: 10px;
    font-size: 12px;
    color: rgba(0,0,0,0.55);
    background: rgba(255,255,255,0.6);
    padding: 6px 8px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
  }

  /* responsive example */
  @media (max-width:420px){
    .preview { width: 100%; height: 200px; }
  }