  :root{
    --bg:#ffffff;
    --text:#5f5f5f;
    --title:#4c4c4c;
    --muted:#7b7b7b;
    --blue:#00a7d8;
    --yellow:#fef200;
    --border:#e6e6e6;
    --tileBorder: #666666;
    --shadow: 0 12px 30px rgba(0,0,0,.08);
    --radius: 16px;
    --gap: 18px;
    --maxW: 1200px;
    --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
    --serif: ui-serif, Georgia, "Times New Roman", Times, serif;
    
    /* Segédváltozók a magasság számoláshoz (F1 Kioszk scroll miatt) */
    --topbarH: 100px;
    --footerH: 80px;
  }

  /* --- KIOSK (1920×1080) – szélesebb törzs, hogy az iframe-ek ne legyenek "összenyomva" --- */
  html.mode-kiosk{
    --maxW: 100vw;
  }

  *{box-sizing:border-box}
  html,body{height:100%}
  body{
    margin:0;
    background:var(--bg);
    color:var(--text);
    font-family:var(--font);
    min-height:100vh;
    display:flex;
    flex-direction:column;
  }

  a{color:inherit; text-decoration:none}
  button{font-family:inherit}

  .container{max-width:var(--maxW); margin:0 auto; padding: 22px 24px 42px;}
  main.container{flex:1;}
  @media (max-width:720px){ .container{padding:16px 16px 34px} }

  /* ---- Header (a képernyőterv stílusában) ---- */
  .topbar{
    position:sticky; top:0; z-index:20;
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
  }
  .topbar-inner{
    max-width:var(--maxW);
    margin:0 auto;
    padding: 18px 24px;
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap: 18px;
  }

  .brand{display:block; min-width: 280px}
  .brand-line{
    display:flex; align-items:baseline; gap: 14px;
  }
  .brand-main{
    font-family: var(--serif);
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--title);
    font-size: clamp(34px, 4.1vw, 58px);
    line-height: 1.05;
  }
  .brand-arrow{
    font-family: var(--font);
    color: var(--blue);
    font-size: clamp(30px, 3.4vw, 54px);
    line-height: 1;
    transform: translateY(-2px);
  }
  .brand-sub{
    margin-top: 6px;
    color: var(--blue);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: clamp(13px, 1.4vw, 18px);
  }

  .top-actions{
    display:flex;
    align-items:center;
    gap: 16px;
    padding-top: 6px;
  }
  .page-link{
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
  }
  .back-link{
    color: var(--blue);
    font-weight: 700;
    font-size: 18px;
    margin-right: 8px;
    user-select:none;
  }

  .burger{
    width: 44px;
    height: 34px;
    display:flex;
    flex-direction: column;
    justify-content: center;
    gap: 7px;
    padding: 6px 4px;
  }
  .burger i{
    display:block;
    height: 3px;
    background: #666;
    border-radius: 3px;
  }

  /* ---- Typography ---- */
  .hero{padding: 14px 0 6px;}
  .h1{
    font-family: var(--serif);
    font-size: clamp(28px, 2.7vw, 42px);
    letter-spacing: .2px;
    color: var(--title);
    margin: 0 0 10px;
    text-transform: uppercase;
  }
  .lead{max-width: 78ch; color: var(--text); line-height:1.45; margin:0;}
  .hint{color: var(--muted); line-height:1.45; margin: 0;}

  .section{margin-top: 26px;}
  .section h2{
    margin: 0 0 10px;
    font-family: var(--serif);
    font-size: clamp(22px, 2.1vw, 34px);
    color: var(--title);
    letter-spacing: .2px;
    text-transform: uppercase;
  }

  /* ---- Főmenü: csempés (mosaic) ---- */
  .mosaic{
    margin-top: 18px;
    display:grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap);
  }
  @media (max-width: 980px){
    .mosaic{grid-template-columns: repeat(2, minmax(0, 1fr));}
  }

  .mosaicItem{
    grid-column: span 2;
    aspect-ratio: 1 / 1;
    border-radius: 0; /* a tervben szögletes */
    overflow:hidden;
    position:relative;
    background: #f3f3f3;
    box-shadow: none;
    border: 2px solid var(--tileBorder);
  }
  @media (max-width: 980px){
    .mosaicItem{grid-column: span 1;}
  }

  .mosaicItem img{
    width:100%; height:100%; object-fit:cover;
    filter: grayscale(100%) contrast(1.05);
    display:block;
  }
  .mosaicItem.yellow{background: var(--yellow); display:flex; align-items:center; justify-content:center;}
  .mosaicItem .tileLabel{
    padding: 20px;
    text-align:center;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #4f4f4f;
    font-weight: 700;
    font-size: clamp(18px, 2.1vw, 30px);
  }

  /* Képernyőterv-szerű nyilak (dekor) */
  .arrow{
    position:absolute;
    width: 0; height: 0;
    pointer-events:none;
    opacity: .95;
  }
  .arrowLine{
    position:absolute;
    width: 6px;
    height: 70px;
    background: currentColor;
    left: 0; top: 0;
  }
  .arrowHead{
    position:absolute;
    width: 0; height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 18px solid currentColor;
    left: -11px;
    bottom: -14px;
  }
  .arrow.yellow{color: var(--yellow)}
  .arrow.white{color: rgba(255,255,255,.92)}
  .arrow.down{left: 26px; bottom: 28px;}
  .arrow.down .arrowLine{height: 74px;}
  .arrow.downRight{right: 28px; bottom: 32px; transform: rotate(45deg)}
  .arrow.downRight .arrowLine{height: 90px;}
  .arrow.right{right: 30px; top: 30px; transform: rotate(90deg)}
  .arrow.right .arrowLine{height: 90px;}

  /* ---- Kártyák / listák (világos) ---- */
  .list{
    margin-top: 14px;
    display:grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gap);
  }
  .card{
    border: 2px solid var(--tileBorder);
    background: #fff;
    padding: 24px 16px; /* Nagyobb padding, hogy jobban mutasson a széles csempe */
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start; /* Szöveg balra igazítva, de lehet center is */
    min-height: 120px; /* Egyenletesebb magasság */
    transition: border-color 0.2s;
  }
  .card.isActive{
    border-color: var(--blue);
    box-shadow: inset 0 0 0 2px var(--blue);
  }
  .card:hover{ border-color: var(--blue); } /* Hoveren kicsit élénkebb a kártya */
  .card h3{margin:0 0 8px; font-size: 18px; color: var(--title); text-transform: uppercase; letter-spacing:.6px}
  .card p{margin:0; color: var(--text); line-height:1.45}
  .card .row{display:flex; gap:14px; align-items:center;}

  .thumb{
    width: 72px; height:72px;
    border: 2px solid var(--tileBorder);
    display:grid; place-items:center;
    color:#777;
    font-weight:800;
    background: #fafafa;
  }

  /* ---- Dokumentum gombok ---- */
  .doclist{margin-top: 16px; display:flex; flex-direction:column; gap: 14px;}
  .doc{
    border: 2px solid var(--tileBorder);
    background: #fff;
    padding: 14px 16px;
    border-radius: 0;
    display:flex;
    justify-content:space-between;
    gap: 16px;
    align-items:flex-start;
  }
  .doc .title{font-weight:800; color: var(--title); text-transform: uppercase; letter-spacing:.5px}
  .doc .meta{color: var(--muted); font-size: 14px}
  .doc .btn{
    align-self:center;
    border: 2px solid var(--blue);
    color: var(--blue);
    padding: 12px 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
  }
  .doc .btn:hover{background: rgba(0,167,216,.06)}

  /* ---- Galéria ---- */
  .gallery{
    margin-top: 14px;
    display:grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap);
  }
  @media (max-width: 980px){ .gallery{grid-template-columns: repeat(2, minmax(0, 1fr));} }
  figure{margin:0; cursor: zoom-in;}
  figure img{
    width:100%; height: 220px; object-fit: cover;
    display:block;
    filter: grayscale(100%) contrast(1.06);
  }
  figcaption{display:none}

  /* Artist strip (a tervben 4 kép egy sorban) */
  .artistStrip{
    margin-top: 12px;
    display:grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--gap);
  }
  @media (max-width: 980px){ .artistStrip{grid-template-columns: repeat(2, minmax(0, 1fr));} }
  .artistStrip figure img{height: 260px;}

  .artistNav{
    position: relative;
    margin-top: 10px;
    display:flex;
    justify-content: space-between;
  }
  .navArrow{
    font-size: 54px;
    line-height: 1;
    color: var(--blue);
    user-select:none;
    padding: 8px 12px;
  }
  .navArrow:active{transform: scale(.98)}

  /* ---- Iframe ---- */

  /* ---- Fekvő (kiosk) elrendezés segédosztály ---- */
  .split{
    display:block;
  }
  .split-left, .split-right{min-width:0;}
  @media (max-width: 820px){
    .split{display:block;}
  }

  /* F3 oldalon használt rács (tile-k) */
  .grid{
    margin-top: 14px;
    display:grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--gap);
  }

  /* Kiosk módban tegyük "fekvőbbé": bal oldalt lista, jobb oldalt beágyazás */
  .mode-kiosk .split{
    display:grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    align-items:start;
  }
  .mode-kiosk .split .iframeWrap{ margin-top: 0; }
  .mode-kiosk .split h2{ margin-top: 0; }

  /* Kioskban a split bal oldalán a listák legyenek 1 oszloposak (idővonal választó stb.) */
  .mode-kiosk .split-left .list{ grid-template-columns: 1fr; }

  /* Oldalspecifikus arányok: idővonalnál maradhat kicsit szélesebb a bal lista, Fortepannál legyen még keskenyebb */
  html.mode-kiosk body[data-page="f2"] .split{ grid-template-columns: 320px 1fr; }
  html.mode-kiosk body[data-page="f4"] .split{ grid-template-columns: 320px 1fr; }

  /* Fallback: ha valamiért nem kerül rá a mode-kiosk osztály (pl. linkváltásnál), nagy asztali nézetben ugyanazt a "fekvő" elrendezést alkalmazzuk.
    iPad-en nem lép életbe (hover/pointer feltétel). */
  @media (min-width: 1600px){
    html:not(.mode-ipad){ --maxW: 1840px; }
    html:not(.mode-ipad) .split{
      display:grid;
      grid-template-columns: 320px 1fr;
      gap: 28px;
      align-items:start;
    }
    html:not(.mode-ipad) body[data-page="f4"] .split{ grid-template-columns: 320px 1fr; }
    html:not(.mode-ipad) .split-left .list{ grid-template-columns: 1fr; }
  }

  /* PDF iframe kicsit alacsonyabb (hogy a galéria is kapjon helyet) */
  .mode-kiosk #pdfFrame{ height: 62vh; min-height: 620px; }

  /* F3 tile rács fekvősebb kioskban */
  .mode-kiosk .grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .iframeWrap{
    margin-top: 14px;
    border: 2px solid var(--tileBorder);
    background: #fff;
  }
  .iframeWrap iframe{width:100%; height: 70vh; border:0;}

  .footer{
    margin: 34px 0 0;
    font-size: 13px;
    color: var(--muted);
  }

  .pdfBar{
    display:flex;
    flex-wrap: wrap;
    align-items:baseline;
    gap:10px;
    margin:12px 0 6px;
  }
  .pdfHint{opacity:.75;font-size:13px;}
  .pdfOpen{
    margin-left: auto;
    font-weight: 900;
    letter-spacing: .8px;
    color: var(--blue);
    text-decoration: none;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0,167,216,.22);
    background: rgba(0,167,216,.06);
  }
  .pdfOpen:hover{ text-decoration: underline; }
  @media (max-width: 720px){
    .pdfOpen{ margin-left: 0; }
  }

  .footer .sponsors{
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }
  .footer .sponsors img{
    height: 34px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    display: block;
  }

  /* ---- Lightbox (képernyőterv jelleg) ---- */
  .lightbox{
    position:fixed; inset:0;
    background: rgba(0,0,0,.35);
    display:none;
    align-items:center;
    justify-content:center;
    padding: 18px;
    z-index: 60;
  }
  .lightbox[aria-hidden="false"]{display:flex}

  .lightbox-inner{
    width: min(1180px, 100%);
    background: rgba(80,80,80,.92);
    border: 6px solid rgba(255,255,255,.18);
    border-radius: 18px;
    overflow:hidden;
    box-shadow: var(--shadow);
    position: relative;
  }

  .lightbox img{
    width:100%;
    max-height: 78vh;
    object-fit: contain;
    display:block;
    background: rgba(0,0,0,.25);
  }

  .lightbox-top{
    position:absolute;
    inset: 0;
    pointer-events:none;
  }
  .lightbox-top .cap{
    position:absolute;
    left: 0; right: 0; bottom: 0;
    padding: 16px 20px;
    background: rgba(40,40,40,.55);
    color: rgba(255,255,255,.92);
    font-size: 15px;
    line-height: 1.35;
  }
  .lightbox-top .close{
    pointer-events:auto;
    position:absolute;
    right: 16px;
    top: 10px;
    width: 56px;
    height: 56px;
    border: 0;
    background: transparent;
    color: var(--yellow);
    font-size: 48px;
    font-weight: 900;
    cursor:pointer;
  }

  /* ---- kisebb finomhangolások ---- */
  @media (max-width: 520px){
    .topbar-inner{padding: 14px 16px;}
    .page-link{font-size: 16px;}
    .burger{width: 40px;}
  }


  /* ---- Slide-in Menü (burger) ---- */
  .menuOverlay{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.38);
    display: none;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 14px;
    z-index: 120;
  }
  .menuOverlay[aria-hidden="false"]{ display:flex; }

  .menuPanel{
    width: min(360px, calc(100% - 28px));
    background: rgba(255,255,255,.98);
    border: 2px solid var(--tileBorder);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
  }
  .menuHeader{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 10px;
  }
  .menuTitle{
    font-weight: 900;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #2c2c2c;
    font-size: 14px;
  }
  .menuClose{
    border: 0;
    background: var(--yellow);
    color: #111;
    font-weight: 900;
    border-radius: 999px;
    padding: 10px 12px;
    cursor: pointer;
  }
  .menuLinks{ display:flex; flex-direction:column; gap: 10px; padding-top: 8px; }

  /* Megjelenítés mód választó (iPad / 1920×1080 / Automatikus) */
  .menuModes{
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
  .menuModes .modeTitle{
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #2c2c2c;
    font-size: 13px;
    margin: 0 0 10px;
  }
  .modeButtons{ display:flex; flex-wrap:wrap; gap: 10px; }
  .modeBtn{
    border: 2px solid var(--blue);
    background: transparent;
    color: var(--blue);
    border-radius: 999px;
    padding: 10px 12px;
    font-weight: 900;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    cursor:pointer;
  }
  .modeBtn.active{
    background: var(--blue);
    color: #fff;
  }
  .modeBtn:focus-visible{ outline: 3px solid rgba(0,167,216,.45); outline-offset: 3px; }
  .menuLink{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,.06);
    background: #fff;
    color:#262626;
    font-weight: 900;
    letter-spacing: 1.4px;
    text-transform: uppercase;
  }
  .menuLink:hover{
    background: rgba(242,230,0,.30);
    border-color: rgba(242,230,0,.55);
  }
  .menuLink.current{
    background: rgba(0,167,216,.10);
    border-color: rgba(0,167,216,.28);
  }
  .menuLink small{
    font-weight: 800;
    letter-spacing: 0;
    text-transform:none;
    color: var(--muted);
  }
  .burger{ cursor: pointer; }
  .burger:focus-visible{ outline: 3px solid rgba(0,167,216,.45); outline-offset: 4px; border-radius: 10px; }

  /* ---- Eszköz-optimalizálás: Kiosk PC (1920×1080) + iPad Safari ---- */
  html{ -webkit-text-size-adjust: 100%; }

  /* iOS / iPad safe-area és dinamikus viewport */
  body{ padding-bottom: env(safe-area-inset-bottom); }
  @supports (height: 100dvh){
    body{ min-height: 100dvh; }
  }

  /* Tap élmény (iPad Safari / érintőképernyő) */
  :where(a, button, .card, .mosaicItem, .menuLink, .doc .btn, .navArrow, .burger){
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }

  /* Menü panel: iPad-en ne lógjon ki */
  .menuPanel{
    max-height: calc(100dvh - 28px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* KIOSK mód: nagyobb tipó + tágabb konténer */
  html.mode-kiosk{
    font-size: 18px;
    /* 1920×1080 kiosk: használjuk ki jobban a szélességet */
    --maxW: 1840px;
    --gap: 24px;
  }
  html.mode-kiosk .topbar-inner{ padding-left: 22px; padding-right: 22px; }
  html.mode-kiosk .container{ padding-left: 22px; padding-right: 22px; }
  html.mode-kiosk .iframeWrap iframe{ height: 74vh; min-height: 760px; }

  html.mode-kiosk body[data-page="f2"] .iframeWrap iframe{
    height:100% !important;
    min-height:0 !important;
  }
  /* KIOSK: rácsok legyenek nagyobbak, de maradjon a v3-as 4 oszlopos logika */
  html.mode-kiosk figure img{ height: 260px; }
  html.mode-kiosk .artistStrip figure img{ height: 300px; }

  /* --- A Módosítás Fő Része: F1 Művészek Rács Kioszk Módban --- */
  /* Kioszk módban garantáltan 4 vagy 5 oszlopos elrendezés a horizontális megjelenéshez */
  html.mode-kiosk .list{ 
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); /* Fixált minimum szélesség */
    gap: var(--gap);
  }
  html.mode-kiosk .lightbox-inner{ width: min(1480px, 100%); }

  /* KIOSK: hosszabb szöveg is kényelmesebb szélességen */
  html.mode-kiosk .lead{ max-width: 95ch; }

  /* iPad mód: kényelmesebb érintési célok + fókusz a kontrasztra */
  html.mode-ipad{
    font-size: 17px;
    /* iPad-en a 980px túl szűk: a galériák és listák összenyomódnak.
      Engedjünk több szélességet, és tegyük a rácsokat „kényelmesebbé”. */
    --maxW: 1200px;
  }
  html.mode-ipad .topbar-inner{ padding: 16px 18px; }
  html.mode-ipad .page-link{ font-size: 16px; }
  html.mode-ipad .brand{ min-width: 0; }
  html.mode-ipad .brand-sub{ letter-spacing: 1.6px; }
  html.mode-ipad .iframeWrap iframe{ height: 62vh; min-height: 460px; }

  /* iPad: a 4 oszlopos galéria túl „sűrű” – legyen kényelmesebb, nagyobb képekkel */
  html.mode-ipad .gallery{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.mode-ipad .artistStrip{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.mode-ipad figure img{ height: 240px; }
  html.mode-ipad .artistStrip figure img{ height: 280px; }

  /* iPad: kártyák kicsit nagyobb minimummal, kevesebb oszlop */
  html.mode-ipad .list{ grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

  /* Érintős eszközökön a hover ne legyen zavaró */
  @media (hover: none){
    .card:hover{ border-color: var(--tileBorder); }
    .menuLink:hover{ background: #fff; border-color: rgba(0,0,0,.06); }
  }


  /* F3 – cikkek (kioskban két oszlop) */
  .mode-kiosk body[data-page="f3"] .split{ grid-template-columns: 520px 1fr; }

  .iframeWrapPdf{ height: 70vh; }
  .mode-kiosk .iframeWrapPdf{ height: 82vh; }
  .mode-ipad .iframeWrapPdf{ height: 70vh; }

  .mode-kiosk .sponsors img{ height: 44px; max-width: 220px; }
  .mode-ipad .sponsors img{ height: 38px; max-width: 180px; }

  .iframeWrapPdf iframe{ width:100%; height:100%; min-height:0; border:0; }


  /* === KIOSK: F2/F4 szélesebb + oldal scroll tiltás (belső lista görgethető) === */
  html.mode-kiosk body[data-page="f2"] main.container{
    height: calc(100vh - var(--topbarH) - var(--footerH));
    padding-bottom: 0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  html.mode-kiosk body[data-page="f4"] main.container{
    height: calc(100vh - var(--topbarH) - var(--footerH));
    padding-bottom: 0;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }

  html.mode-kiosk body[data-page="f2"] .hero,
  html.mode-kiosk body[data-page="f4"] .hero{ padding: 0px 0 6px; }

  html.mode-kiosk body[data-page="f2"] .section.split,
  html.mode-kiosk body[data-page="f4"] .section.split{
    flex: 1 1 auto;
    min-height: 0;
    overflow:hidden;
    align-items:stretch;
  }

  html.mode-kiosk body[data-page="f2"] .split-left,
  html.mode-kiosk body[data-page="f4"] .split-left{
    overflow:auto;           /* belső lista scroll */
    max-height: 100%;
    padding-right: 10px;
  }

  html.mode-kiosk body[data-page="f2"] .split-right,
  html.mode-kiosk body[data-page="f4"] .split-right{
    overflow:hidden;
    min-height: 0;
  }

  html.mode-kiosk body[data-page="f2"] .iframeWrap,
  html.mode-kiosk body[data-page="f4"] .iframeWrap{
    flex: 1;
    display:flex;
  }

  html.mode-kiosk body[data-page="f2"] .iframeWrap iframe,
  html.mode-kiosk body[data-page="f4"] .iframeWrap iframe{
    flex:1;
    height:auto;
  }


  /* szélesebb beágyazások 1920×1080-on */
  html.mode-kiosk body[data-page="f2"] .split{ grid-template-columns: 360px 1fr; }
  html.mode-kiosk body[data-page="f4"] .split{ grid-template-columns: 360px 1fr; }

  /* Kioskban a footer ne tolja le az oldalt */
  html.mode-kiosk body[data-page="f2"] .footer,
  html.mode-kiosk body[data-page="f4"] .footer{
    margin: 0px 0 0;
    padding: 0px 0 0;
    flex: 0 0 auto;
  }

  /* --- Csempék: hover effekt kikapcsolása --- */
  .tile:hover::after { opacity: 0.10; }
  /* Ezt a duplikált sort töröltük, fentebb van kezelve a .card hover */

  /* --- F1 (Művészek) kiosk: oldal ne scrollozzon, belső lista scroll, rács megtartása --- */
  .mode-kiosk body[data-page="f1"] { overflow: hidden; }
  .mode-kiosk body[data-page="f1"] main.container {
    height: calc(100vh - var(--topbarH) - var(--footerH));
    display: flex;
    flex-direction: column;
  }
  .mode-kiosk body[data-page="f1"] .section {
    flex: 1; /* Kitölti a maradék helyet a hero alatt */
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .mode-kiosk body[data-page="f1"] .list {
    flex: 1;
    overflow-y: auto; /* Itt scrollolunk, ha túl sok a csempe */
    padding-right: 12px;
    align-content: start; /* Hogy a csempék felülre rendeződjenek, ne húzódjanak szét függőlegesen */
  }

  /* --- CV modal (F1) --- */
  .docModal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
  }
  .docModal.isOpen { display: flex; }
  .docModalDialog {
    width: min(1100px, calc(100vw - 48px));
    height: min(720px, calc(100vh - 48px));
    background: #fff;
    border: 2px solid var(--tileBorder);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
  }
  .docModalClose {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 2px solid var(--tileBorder);
    background: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
  }
  .docModalTitle {
    padding: 14px 52px 10px 16px;
    font-weight: 700;
    border-bottom: 1px solid #e6e6e6;
  }
  .docModalFrameWrap { flex: 1; }
  .docModalFrameWrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }

  /* ========================================================================== 
    2026-06 Művészoldal – portrérészletek + érintőkijelzős életrajznézet
    ========================================================================== */
  body[data-page="f1"], body[data-page="f1_artist"] { overflow: hidden; }
  .artistIndexMain,
  .artistDetailMain {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
  }
  .artistIndexMain {
    display: flex;
    flex-direction: column;
    padding-top: 12px;
    padding-bottom: 10px;
  }
  .artistIndexHero { flex: 0 0 auto; padding: 4px 0 12px; }
  .artistMosaic {
    flex: 1 1 auto;
    min-height: 0;
    width: min(1540px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
  .artistTile {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background: #eee;
    border: 1px solid #d5d5d5;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(254,242,0,.45);
  }
  .artistTile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--portrait-position, 50% 40%);
    filter: grayscale(100%) contrast(1.04);
    transition: transform .14s ease, filter .14s ease;
  }
  .artistTileName {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 42px;
    padding: 9px 12px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(254,242,0,.94);
    color: #3f3f3f;
    font-weight: 850;
    letter-spacing: .7px;
    text-transform: uppercase;
    text-align: center;
    font-size: clamp(14px, 1.05vw, 19px);
  }
  .artistTile:active img { transform: scale(.985); filter: grayscale(100%) contrast(1.09); }
  .artistTile:focus-visible { outline: 5px solid var(--blue); outline-offset: 2px; }

  .artistDetailMain {
    display: flex;
    flex-direction: column;
    padding-top: 12px;
    padding-bottom: 8px;
  }
  .artistDetailHeader {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 0 0 12px;
  }
  .artistDetailHeader .h1 { margin-bottom: 0; }
  .artistDetailKicker {
    margin: 0 0 5px;
    color: var(--title);
    font-family: var(--serif);
    font-size: clamp(17px, 1.35vw, 23px);
    font-weight: 700;
    text-transform: uppercase;
  }
  .artistBackButton,
  .artistNavButton {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    padding: 10px 17px;
    border: 2px solid var(--blue);
    color: var(--blue);
    background: #fff;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .7px;
    touch-action: manipulation;
  }
  .artistBackButton:active,
  .artistNavButton:active { background: rgba(0,167,216,.1); }
  .artistDetailLayout {
    flex: 1 1 auto;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.28fr) minmax(390px, .72fr);
    gap: 32px;
    align-items: stretch;
  }
  .artistBioPanel {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 6px 24px 26px 2px;
    scrollbar-gutter: stable;
  }
  .artistBioContent {
    max-width: 86ch;
    color: #333;
    font-size: clamp(15px, 1.03vw, 18px);
    line-height: 1.52;
  }
  .artistBioContent p { margin: 0 0 .78em; }
  .artistBioContent h2 {
    margin: 1.35em 0 .55em;
    color: var(--blue);
    font-family: var(--font);
    font-size: 1.02em;
    letter-spacing: .25px;
    text-transform: uppercase;
  }
  .artistBioContent h2:first-child { margin-top: .2em; }
  .artistBioContent a { color: var(--blue); text-decoration: underline; overflow-wrap: anywhere; }
  .artistPortraitPanel {
    min-height: 600px;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f5f5f5;
  }
  .artistPortraitPanel > img {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    object-fit: contain;
    object-position: center;
    filter: grayscale(100%);
    background: #f2f2f2;
  }
  .artistDetailNav {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: #fff;
  }
  .artistNavButton { min-height: 44px; padding: 8px 12px; font-size: 14px; }

  body[data-page="f1"] > .footer,
  body[data-page="f1_artist"] > .footer { flex: 0 0 auto; margin-top: 0; padding-top: 4px; padding-bottom: 4px; }
  body[data-page="f1"] > .footer .sponsors img,
  body[data-page="f1_artist"] > .footer .sponsors img { height: 34px; }

  /* Fortepan: a hosszabb új cím kényelmes tördelése. */
  body[data-page="f4"] .hero .h1 { max-width: 36ch; }
  body[data-page="f4"] .fortepanHint { font-size: 1.02em; }

  @media (max-width: 1400px) {
    body[data-page="f1"] { overflow: auto; }
    .artistMosaic {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      grid-template-rows: none;
      grid-auto-rows: 240px;
      overflow-y: auto;
    }
    .artistDetailLayout { grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr); gap: 22px; }
  }
  @media (max-width: 980px) {
    body[data-page="f1"], body[data-page="f1_artist"] { overflow: auto; }
    .artistIndexMain, .artistDetailMain { min-height: auto; }
    .artistMosaic {
      grid-template-columns: repeat(3, minmax(0, 1fr));
      grid-auto-rows: 250px;
      overflow: visible;
    }
    .artistDetailLayout { grid-template-columns: 1fr; }
    .artistPortraitPanel { order: -1; min-height: 520px; }
    .artistBioPanel { overflow: visible; padding-right: 0; }
  }
  @media (max-width: 640px) {
    .artistMosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 230px; }
    .artistDetailHeader { align-items: flex-start; flex-direction: column; }
    .artistPortraitPanel { min-height: 430px; }
  }

  html.mode-kiosk body[data-page="f1"] .artistIndexMain,
  html.mode-kiosk body[data-page="f1_artist"] .artistDetailMain {
    height: calc(100vh - var(--topbarH) - 58px);
    overflow: hidden;
  }
  html.mode-kiosk body[data-page="f1"] .artistMosaic {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    overflow: hidden;
  }
  html.mode-kiosk body[data-page="f1_artist"] .artistDetailLayout { min-height: 0; }

  /* --- 2026-07 végleges javítások --- */
  body[data-page="f1"] .artistTile img { filter: none !important; }
  body[data-page="f1"] .artistTile:active img { filter: none !important; }
  body[data-page="f1"] .artistTileName { background: rgba(254,242,0,.72); color:#222; }
  body[data-page="f1_artist"] .artistPortraitPanel > img { filter: none !important; }
  .artistBioFrame { width:100%; height:100%; border:0; background:#fff; }
  body[data-page="f1_artist"] .artistBioPanel { padding-right: 8px; }
  body[data-page="f1_artist"] .artistBioPanel, body[data-page="f1_artist"] .artistPortraitPanel { min-height: 0; }


  /* --- 2026-07 PDF dokumentumnéző javítás --- */
  .artistDocPanel {
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff;
    border: 2px solid #666;
  }
  .artistDocFrame {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: 0;
    background: #eee;
  }
  body[data-page="f1"] .artistTile img { filter: none !important; }
  body[data-page="f1"] .artistTile:active img { filter: none !important; }
  body[data-page="f1_artist"] .artistPortraitPanel > img { filter: none !important; }


  /* --- 2026-07 round2 artist mosaic tuning --- */
  html.mode-kiosk body[data-page="f1"] .artistMosaic {
    width: min(1370px, 100%);
    gap: 15px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-rows: 230px;
  }
  body[data-page="f1"] .artistMosaic {
    width: min(1370px, 100%);
    gap: 15px;
  }
  body[data-page="f1"] .artistTile img {
    filter: none !important;
    object-position: 50% 50% !important;
  }
  body[data-page="f1"] .artistTileName {
    min-height: 38px;
    padding: 8px 12px 7px;
    background: rgba(254,242,0,.78);
    color:#232323;
    font-weight: 900;
    letter-spacing: 1.3px;
    word-spacing: 3px;
    text-indent: 1px;
    font-size: clamp(13px, 0.95vw, 18px);
  }
  body[data-page="f1_artist"] .artistDetailKicker {
    margin-bottom: 10px;
  }
  body[data-page="f1_artist"] .artistDetailHeader .h1 {
    margin-top: 4px;
    letter-spacing: .6px;
  }


  /* --- 2026-07 round3 fixed-pixel artist mosaic for 1080p kiosk --- */
  html.mode-kiosk body[data-page="f1"] .artistMosaic {
    width: 1130px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 214px);
    grid-auto-rows: 230px;
    gap: 15px;
    align-content: start;
    justify-content: start;
  }
  html.mode-kiosk body[data-page="f1"] .artistTile {
    width: 214px;
    height: 230px;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  html.mode-kiosk body[data-page="f1"] .artistTile img {
    width: 214px;
    height: 230px;
    object-fit: cover;
    object-position: center center !important;
    transform: translateZ(0);
    backface-visibility: hidden;
    filter: none !important;
  }
  html.mode-kiosk body[data-page="f1"] .artistTileName {
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    background: rgba(254,242,0,.78);
    letter-spacing: 1.45px;
    word-spacing: 4px;
    text-indent: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  body[data-page="f1"] .artistMosaic {
    align-content: start;
  }
  body[data-page="f1_artist"] .artistDetailHeader {
    padding-bottom: 16px;
  }
  body[data-page="f1_artist"] .artistDetailKicker {
    margin: 0 0 10px;
  }

/* --- F1 művész adatlap: iPad álló nézetben kisebb portré --- */
@media (min-width: 641px) and (max-width: 980px) {
  html.mode-ipad body[data-page="f1_artist"] .artistPortraitPanel {
    height: clamp(330px, 32vh, 390px);
    min-height: 0 !important;
    max-height: 390px;
  }

  html.mode-ipad body[data-page="f1_artist"] .artistPortraitPanel > img {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    object-fit: contain;
  }
}
