   :root{
      --bg0:#070A10;
      --bg1:#0A1020;

      --glass: rgba(255,255,255,.07);
      --stroke: rgba(255,255,255,.14);

      --txt: rgba(255,255,255,.92);
      --muted: rgba(255,255,255,.70);

      --gold:#E7D2A6;
      --mint:#B6F7E2;

      --shadow: 0 22px 80px rgba(0,0,0,.58);
      --r: 28px;
      --r2: 18px;
    }

    *{box-sizing:border-box}
    html,body{height:100%; overflow:hidden;}
    body{
      margin:0;
      color:var(--txt);
      background:
        radial-gradient(1200px 900px at 18% 15%, rgba(182,247,226,.10), transparent 60%),
        radial-gradient(1100px 900px at 82% 26%, rgba(231,210,166,.10), transparent 60%),
        linear-gradient(180deg, var(--bg0), var(--bg1));
      font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
      letter-spacing:.2px;
    }

    /* FX canvas */
    #fx{
      position:fixed; inset:0;
      width:100%; height:100%;
      z-index:0;
      pointer-events:none;
      opacity:.95;
      filter: drop-shadow(0 0 18px rgba(231,210,166,.10));
    }

    /* ambient glows */
    .glow{
      position:fixed;
      width:620px;height:620px;border-radius:999px;
      background: radial-gradient(circle at 30% 30%, rgba(231,210,166,.22), rgba(231,210,166,.02) 60%, transparent 70%);
      filter: blur(12px);
      pointer-events:none;
      z-index:0;
      animation: drift 11s ease-in-out infinite;
      opacity:.85;
    }
    .glow.g2{
      width:720px;height:720px;
      background: radial-gradient(circle at 30% 30%, rgba(182,247,226,.18), rgba(182,247,226,.02) 60%, transparent 70%);
      animation-duration: 15s;
      opacity:.75;
    }
    @keyframes drift{
      0%,100%{ transform: translate3d(0,0,0) scale(1); }
      50%{ transform: translate3d(18px,-14px,0) scale(1.03); }
    }

    /* layout */
    .wrap{
      position:relative;
      z-index:1;
      height:100vh;
      padding: clamp(16px, 2.4vw, 30px);
      display:grid;
      grid-template-rows: auto 1fr auto;
      gap: clamp(12px, 1.8vw, 18px);
    }

    header{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:14px;
    }

    .brand{
      display:flex;
      align-items:center;
      gap:12px;
      min-width:0;
    }
    .mark{
      width:44px;height:44px;border-radius:14px;
      background:
        radial-gradient(circle at 30% 30%, rgba(231,210,166,.45), rgba(231,210,166,.06) 60%),
        linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
      border:1px solid rgba(255,255,255,.16);
      box-shadow: 0 12px 40px rgba(0,0,0,.35);
      position:relative;
      overflow:hidden;
    }
    .mark::after{
      content:"";
      position:absolute; inset:-30%;
      background: conic-gradient(from 220deg, transparent, rgba(182,247,226,.22), transparent 60%);
      animation: spin 9s linear infinite;
      opacity:.75;
    }
    @keyframes spin{ to{ transform: rotate(360deg);} }

    .brand h1{
      margin:0;
      font-size: 14px;
      font-weight: 650;
      color: rgba(255,255,255,.92);
      line-height:1.1;
      white-space:nowrap;
      overflow:hidden;text-overflow:ellipsis;
    }
    .brand p{
      margin:3px 0 0 0;
      font-size: 12.5px;
      color: var(--muted);
      white-space:nowrap;
      overflow:hidden;text-overflow:ellipsis;
    }

    .top-actions{
      display:flex; gap:10px; align-items:center; justify-content:flex-end;
      flex-wrap:wrap;
    }

    .pill{
      display:inline-flex;
      align-items:center;
      gap:8px;
      padding:10px 12px;
      border-radius: 999px;
      background: rgba(255,255,255,.06);
      border:1px solid rgba(255,255,255,.14);
      color: rgba(255,255,255,.86);
      box-shadow: 0 10px 32px rgba(0,0,0,.25);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      font-size: 13px;
      user-select:none;
      text-decoration:none;
      cursor:pointer;
      transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
    }
    .pill:hover{
      transform: translateY(-1px);
      background: rgba(255,255,255,.085);
      border-color: rgba(255,255,255,.22);
      box-shadow: 0 18px 46px rgba(0,0,0,.30);
    }
    .pill:active{ transform: translateY(0px) scale(.99); }

    .pill.primary{
      background: linear-gradient(180deg, rgba(231,210,166,.22), rgba(231,210,166,.08));
      border-color: rgba(231,210,166,.30);
    }
    .pill.primary:hover{
      background: linear-gradient(180deg, rgba(231,210,166,.28), rgba(231,210,166,.10));
      border-color: rgba(231,210,166,.42);
    }

    main{
      display:grid;
      grid-template-columns: 1.05fr .95fr;
      gap: clamp(14px, 2.2vw, 22px);
      min-height:0;
    }

    .card{
      border-radius: var(--r);
      background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.05));
      border: 1px solid rgba(255,255,255,.14);
      box-shadow: var(--shadow);
      backdrop-filter: blur(18px);
      -webkit-backdrop-filter: blur(18px);
      overflow:hidden;
      position:relative;
      min-height:0;
    }

    /* left */
    .hero{
      padding: clamp(18px, 2.3vw, 28px);
      display:flex;
      flex-direction:column;
      justify-content:center;
      gap: 18px;
    }

    .kicker{
      display:inline-flex;
      align-items:center;
      gap:10px;
      color: rgba(255,255,255,.86);
      font-size: 13px;
      letter-spacing: .5px;
      text-transform: uppercase;
      user-select:none;
    }
    .dot{
      width:9px;height:9px;border-radius:99px;
      background: radial-gradient(circle at 30% 30%, rgba(182,247,226,.9), rgba(182,247,226,.18));
      box-shadow: 0 0 0 5px rgba(182,247,226,.08);
    }

    .title{
      margin: 0;
      line-height: 1.02;
      font-weight: 750;
      font-size: clamp(44px, 4.4vw, 76px);
      letter-spacing: -0.02em;
    }
    .title span{
      background: linear-gradient(90deg, rgba(231,210,166,.95), rgba(255,255,255,.92), rgba(182,247,226,.85));
      -webkit-background-clip:text;
      background-clip:text;
      color: transparent;
      text-shadow: 0 14px 65px rgba(231,210,166,.08);
    }

    .wish{
      margin: 10px 0 0 0;
      color: rgba(255,255,255,.80);
      font-size: clamp(15px, 1.15vw, 17px);
      line-height: 1.7;
      max-width: 62ch;
    }

    .sig{
      margin-top: 18px;
      display:flex; align-items:flex-end; justify-content:space-between; gap:12px;
      flex-wrap:wrap;
      border-top: 1px solid rgba(255,255,255,.12);
      padding-top: 14px;
    }
    .who{
      display:flex; flex-direction:column; gap:2px;
    }
    .who b{ font-size: 14px; letter-spacing:.2px; }
    .who small{ color: rgba(255,255,255,.66); }
    .micro{
      display:flex; gap:8px; align-items:center; flex-wrap:wrap;
      color: rgba(255,255,255,.62);
      font-size: 12.5px;
    }
    .badge{
      padding: 6px 10px;
      border-radius: 999px;
      background: rgba(255,255,255,.06);
      border:1px solid rgba(255,255,255,.14);
    }

    /* right */
    .preview{
      display:grid;
      grid-template-rows: 1fr;
      padding: 14px;
      gap: 12px;
    }

    .frame{
      position:relative;
      border-radius: 22px;
      overflow:hidden;
      border: 1px solid rgba(255,255,255,.14);
      background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.10));
      box-shadow: 0 24px 90px rgba(0,0,0,.60);
      min-height:0;
      transform: translateZ(0);
    }
    .frame::before{
      content:"";
      position:absolute; inset:-1px;
      background:
        radial-gradient(600px 420px at 25% 25%, rgba(231,210,166,.15), transparent 60%),
        radial-gradient(520px 420px at 70% 40%, rgba(182,247,226,.10), transparent 62%);
      pointer-events:none;
      z-index:1;
      opacity:.9;
    }
    .pf-img{
      position:absolute; inset:0;
      width:100%; height:100%;
      object-fit: cover;
      transform: scale(1.02);
      filter: contrast(1.02) saturate(1.03);
      transition: transform .45s ease, filter .45s ease;
    }
    .frame:hover .pf-img{
      transform: scale(1.06);
      filter: contrast(1.05) saturate(1.06);
    }

    .frame-overlay{
      position:absolute;
      inset:auto 12px 12px 12px;
      z-index:2;
      padding: 12px 14px;
      border-radius: 18px;
      background: rgba(0,0,0,.25);
      border: 1px solid rgba(255,255,255,.12);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap: 10px;
    }
    .frame-overlay .small{
      font-size: 12.5px;
      color: rgba(255,255,255,.80);
      line-height:1.2;
    }
    .frame-overlay .small span{
      color: rgba(231,210,166,.92);
      font-weight: 650;
    }

    footer{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:12px;
      color: rgba(255,255,255,.55);
      font-size: 12px;
      user-select:none;
    }
    footer a{
      color: rgba(255,255,255,.78);
      text-decoration:none;
      border-bottom: 1px dashed rgba(255,255,255,.26);
    }
    footer a:hover{
      color: rgba(255,255,255,.92);
      border-bottom-color: rgba(231,210,166,.55);
    }

    /* responsive (still no scroll) */
    @media (max-width: 980px){
      main{ grid-template-columns: 1fr; }
      .frame{ min-height: 42vh; }
      .sig{ justify-content:flex-start; }
    }
    @media (max-height: 760px){
      .title{ font-size: clamp(34px, 5.2vh, 58px); }
      .wish{ font-size: 14px; }
      .sig{ padding-top: 10px; margin-top: 12px; }
    }

    /* a11y */
    @media (prefers-reduced-motion: reduce){
      .glow, .mark::after, .pf-img{ animation:none !important; transition:none !important; }
      #fx{ display:none; }
    }


/* Lepší práce s mobilním viewportem (iOS address bar) */
.wrap{
  height: 100vh;
  height: 100svh; /* stable viewport height */
  height: 100dvh; /* dynamic viewport height */
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
           max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
}

/* MOBIL: kompaktní layout */
@media (max-width: 480px){
  .wrap{
    gap: 10px;
    padding: 12px;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  /* Header: zmenšit, odstranit zbytečnosti */
  .brand p{ display:none; }
  .mark{ width:38px; height:38px; border-radius: 12px; }

  .top-actions{ gap: 8px; }
  .pill{
    padding: 8px 10px;
    font-size: 12px;
  }

  /* Main: zmenšit mezery */
  main{ gap: 12px; }

  /* HERO karta: menší padding, menší písmo */
  .hero{ padding: 16px; gap: 12px; }
  .kicker{ font-size: 12px; }
  .title{
    font-size: clamp(34px, 9vw, 46px);
    line-height: 1.02;
  }
  .wish{
    font-size: 13.5px;
    line-height: 1.55;
    margin-top: 6px;
  }

  /* Signature: zjednodušit, schovat štítky */
  .sig{ margin-top: 10px; padding-top: 10px; }
  .micro{ display:none; }

  /* Preview: menší padding */
  .preview{ padding: 10px; }
  .frame{ border-radius: 18px; }

  /* KLÍČOVÉ: obrázek nesmí sežrat půl obrazovky */
  .frame{ min-height: 28vh; }

  /* Footer: menší, aby se vešel */
  footer{ font-size: 11px; }
}

/* Extra malé výšky (např. iPhone s adresním řádkem) */
@media (max-height: 700px){
  .wrap{ gap: 8px; }
  footer{ display:none; } /* radši schovat než řezat obsah */
  .frame{ min-height: 30vh; }

  /* aby se text nepřetlačil přes vše – jemně zkrátíme */
  .wish{
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}


