/* =========================================================
   SHARED AESTHETIC LAYER  v2
   Paper scrapbook look. Loaded after each page CSS so it can
   override via targeted selectors + !important.
   ========================================================= */

:root{
  --paper-bg: #faf4e6;
  --paper-ink: #2d241a;
  --paper-accent: #f9b35a;
  --paper-accent-soft: rgba(249, 179, 90, 0.32);
  --paper-accent-ring: rgba(249, 179, 90, 0.55);
  --paper-shadow: rgba(90, 60, 20, 0.10);
}

/* =========================================================
   1. PAPER SURFACE
   Warm off-white + visible grain + very faint ruled lines +
   vignette corners.
   ========================================================= */
#menu,
#education_section,
#music_section,
#short_films_section,
#contact_section,
#jobs_section,
#apps_section{
  background:
    /* grain */
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.38  0 0 0 0 0.28  0 0 0 0 0.18  0 0 0 0.13 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
    /* very faint horizontal ruled lines */
    repeating-linear-gradient(to bottom,
      transparent 0,
      transparent 31px,
      rgba(90, 60, 20, 0.05) 31px,
      rgba(90, 60, 20, 0.05) 32px),
    /* warm vignette */
    radial-gradient(ellipse at 50% 0%, rgba(249, 179, 90, 0.08), transparent 60%),
    radial-gradient(ellipse at 50% 100%, rgba(90, 60, 20, 0.06), transparent 55%),
    var(--paper-bg) !important;
  background-blend-mode: multiply, normal, normal, normal, normal;
  box-shadow:
    inset 0 0 80px rgba(90, 60, 20, 0.08),
    inset 0 0 0 1px rgba(90, 60, 20, 0.05);
  position: relative;
}

/* =========================================================
   DESKTOP / TABLET LANDSCAPE NARROW VIEWPORTS
   Keep the desktop composition fluid instead of forcing a
   1400px-wide canvas that pushes the content panel off-screen.
   ========================================================= */
@media (min-width: 901px) and (max-width: 1399px){
  body{
    --side-panel-w: clamp(320px, 26vw, 420px);
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  #menu,
  #education_section,
  #music_section,
  #short_films_section,
  #contact_section,
  #jobs_section,
  #apps_section{
    width: clamp(320px, 26vw, 420px) !important;
    box-sizing: border-box !important;
    padding: clamp(24px, 3vw, 40px) !important;
  }

  body:has(#menu)::before{
    left: var(--side-panel-w) !important;
    right: 0 !important;
    background-position: right top !important;
  }

  body:has(#education_section)::before,
  body:has(#music_section)::before,
  body:has(#short_films_section)::before,
  body:has(#contact_section)::before,
  body:has(#jobs_section)::before,
  body:has(#apps_section)::before{
    left: 0 !important;
    right: var(--side-panel-w) !important;
    background-position: left top !important;
  }

  #menu{
    margin-right: auto !important;
    justify-content: flex-start !important;
  }

  #education_section,
  #music_section,
  #short_films_section,
  #contact_section,
  #jobs_section,
  #apps_section{
    margin-left: auto !important;
  }

  .sheet-content{
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* =========================================================
   MOBILE: the actual surface sits on ::before. Paint paper there.
   ========================================================= */
@media (max-width: 900px), (max-width: 767px) and (orientation: portrait),
       (min-width: 768px) and (max-width: 1024px) and (orientation: portrait){
  #menu,
  #education_section,
  #music_section,
  #short_films_section,
  #contact_section,
  #jobs_section,
  #apps_section{
    background: transparent !important;
    box-shadow: 0 -18px 40px rgba(0, 0, 0, 0.18);
    outline: 3px dashed rgb(255, 181, 84) !important;
    outline-offset: -3px;
  }

  /* The ::before is the static paper surface: grain + paper color.
     No ruled lines here — they live on the scrolling container so they
     move with the text (notebook writing feel). Because ::before has
     the same paper color visible in both the content area and the
     overscroll bounce area, there's no tonal shift at the sheet edges. */
  #menu::before,
  #education_section::before,
  #music_section::before,
  #short_films_section::before,
  #contact_section::before,
  #jobs_section::before,
  #apps_section::before{
    background:
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='300'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.38  0 0 0 0 0.28  0 0 0 0 0.18  0 0 0 0.14 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"),
      var(--paper-bg) !important;
    background-blend-mode: multiply, normal !important;
  }

  /* Scrolling container: ruled lines painted with `background-attachment:
     local` so they move with the text (notebook-writing feel) AND cover
     the full scrollable area.
     -webkit-overflow-scrolling: touch breaks `local` on iOS Safari, so
     we disable it here — iOS 13+ has momentum scrolling by default. */
  #menu .sheet-content,
  #education_section .sheet-content,
  #music_section .sheet-content,
  #short_films_section .sheet-content,
  #contact_section .sheet-content,
  #jobs_section .sheet-content,
  #apps_section .sheet-content{
    background:
      repeating-linear-gradient(to bottom,
        transparent 0,
        transparent 31px,
        rgba(90, 60, 20, 0.06) 31px,
        rgba(90, 60, 20, 0.06) 32px) !important;
    background-attachment: local !important;
    background-color: var(--paper-bg) !important;
    position: relative !important;
    -webkit-overflow-scrolling: auto !important;
    /* Kill top rubber-band so the section title stays fixed at the top.
       Side effect: iOS no longer bounces at the bottom either — but the
       tall ::after below provides real scrollable tail lines, which is
       the "more distant lines that eventually end" effect we want. */
    overscroll-behavior-y: none !important;
  }

  /* Full-width bottom-sheet: remove body margin/radius so the sheet
     stretches edge-to-edge on mobile. */
  body{
    margin: 0 !important;
    border-radius: 0 !important;
  }

  /* Safari iOS reads the html background for the address bar color. */
  html{
    background-color: #c9a270 !important;
  }

  /* KRAFT HEADER - the top strip with the drag handle looks like the
     cardboard back of a notepad (different color than the paper surface). */
  #menu .sheet-handle,
  #education_section .sheet-handle,
  #music_section .sheet-handle,
  #short_films_section .sheet-handle,
  #contact_section .sheet-handle,
  #jobs_section .sheet-handle,
  #apps_section .sheet-handle{
    background:
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='300' height='80'><filter id='k'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.34  0 0 0 0 0.22  0 0 0 0 0.12  0 0 0 0.22 0'/></filter><rect width='100%25' height='100%25' filter='url(%23k)'/></svg>"),
      linear-gradient(180deg, #c9a270 0%, #b98955 60%, #a77944 100%) !important;
    background-blend-mode: multiply, normal !important;
    border-bottom: 1px dashed rgba(60, 40, 15, 0.55) !important;
    box-shadow: inset 0 -2px 0 rgba(60, 40, 15, 0.15),
                inset 0 1px 0 rgba(255, 240, 210, 0.25) !important;
  }

  /* Drag handle pill: darker on the kraft surface */
  .sheet-handle::before{
    background: rgba(50, 30, 10, 0.45) !important;
  }
}

/* Landscape tablets and narrow desktop windows should keep the desktop
   side-panel composition. Phones in landscape stay on the compact rules. */
@media (max-width: 900px) and (orientation: landscape) and (min-height: 500px){
  body{
    --side-panel-w: clamp(300px, 36vw, 340px);
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    display: flex !important;
    justify-content: flex-end !important;
    align-items: flex-start !important;
  }

  body::before{
    background-size: cover !important;
    scale: 1 !important;
  }

  body:has(#menu)::before{
    left: var(--side-panel-w) !important;
    right: 0 !important;
    background-position: right top !important;
  }

  body:has(#education_section)::before,
  body:has(#music_section)::before,
  body:has(#short_films_section)::before,
  body:has(#contact_section)::before,
  body:has(#jobs_section)::before,
  body:has(#apps_section)::before{
    left: 0 !important;
    right: var(--side-panel-w) !important;
    background-position: left top !important;
  }

  #menu,
  #education_section,
  #music_section,
  #short_films_section,
  #contact_section,
  #jobs_section,
  #apps_section{
    position: relative !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    transition: none !important;
    width: clamp(300px, 36vw, 340px) !important;
    min-height: 100vh !important;
    height: auto !important;
    padding: 24px !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    background:
      repeating-linear-gradient(to bottom,
        transparent 0,
        transparent 31px,
        rgba(90, 60, 20, 0.05) 31px,
        rgba(90, 60, 20, 0.05) 32px),
      var(--paper-bg) !important;
    box-shadow: none !important;
    outline: 0 !important;
  }

  #menu{
    margin-right: auto !important;
    justify-content: flex-start !important;
    align-items: center !important;
  }

  #education_section,
  #music_section,
  #short_films_section,
  #contact_section,
  #jobs_section,
  #apps_section{
    margin-left: auto !important;
  }

  .sheet-handle{
    display: none !important;
  }

  #menu .sheet-content,
  #education_section .sheet-content,
  #music_section .sheet-content,
  #short_films_section .sheet-content,
  #contact_section .sheet-content,
  #jobs_section .sheet-content,
  #apps_section .sheet-content{
    width: 100% !important;
    height: auto !important;
    padding: 28px 0 !important;
    overflow: visible !important;
    background: transparent !important;
    box-sizing: border-box !important;
  }
}

/* =========================================================
   2. HAND-DRAWN HR - uniform dotted line with orange asterisk
   ========================================================= */
hr{
  border: 0 !important;
  height: 24px !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 85% 100% !important;
  opacity: 0.65 !important;
  margin: 28px 0 !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 24' fill='none' stroke='%232d241a' stroke-width='1.4' stroke-linecap='round'><circle cx='30' cy='12' r='1.4' fill='%232d241a'/><circle cx='55' cy='12' r='1.4' fill='%232d241a'/><circle cx='80' cy='12' r='1.4' fill='%232d241a'/><circle cx='105' cy='12' r='1.4' fill='%232d241a'/><path d='M140 4 L 160 20 M140 20 L 160 4 M150 2 L 150 22 M136 12 L 164 12' stroke='%23f9b35a' stroke-width='1.8'/><circle cx='195' cy='12' r='1.4' fill='%232d241a'/><circle cx='220' cy='12' r='1.4' fill='%232d241a'/><circle cx='245' cy='12' r='1.4' fill='%232d241a'/><circle cx='270' cy='12' r='1.4' fill='%232d241a'/></svg>") !important;
}

/* =========================================================
   3. SECTION TITLES (h1) - handwritten + highlighter + ornament
   ========================================================= */
#music > h1,
#education > h1,
#short_films > h1,
#contact > h1,
#jobs_stages > h1,
#apps_sites > h1,
#menu .sheet-content > h2{
  font-family: 'Starboard DEMO', 'Bradley Hand', 'Comic Sans MS', cursive !important;
  text-transform: none !important;
  text-decoration: none !important;
  font-size: 2.5em !important;
  letter-spacing: 1px !important;
  color: var(--paper-ink) !important;
  position: relative;
  display: inline-block;
  padding: 4px 24px 8px !important;
  isolation: isolate;
}

#menu .sheet-content > h2{
  font-size: 1.3em !important;
}

#music > h1::before,
#education > h1::before,
#short_films > h1::before,
#contact > h1::before,
#jobs_stages > h1::before,
#apps_sites > h1::before,
#menu .sheet-content > h2::before{
  content: "";
  position: absolute;
  left: 4px; right: 4px;
  bottom: 10px;
  height: 48%;
  background: var(--paper-accent-soft);
  transform: rotate(-1.2deg);
  z-index: -1;
  border-radius: 4px 10px 6px 12px;
  filter: blur(0.3px);
}

#music > h1::after,
#education > h1::after,
#short_films > h1::after,
#contact > h1::after,
#jobs_stages > h1::after,
#apps_sites > h1::after,
#menu .sheet-content > h2::after{
  content: "";
  position: absolute;
  right: -18px;
  top: -10px;
  width: 26px;
  height: 26px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 26' fill='none' stroke='%23f9b35a' stroke-width='1.8' stroke-linecap='round'><path d='M13 3 L13 23 M3 13 L23 13 M6 6 L20 20 M20 6 L6 20'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  transform: rotate(-12deg);
}

/* =========================================================
   4. WASHI TAPE v2 - striped translucent with torn ends
   ========================================================= */
#mcjoes > h2,
#zaffa > h2,
#hot-dogs > h2,
#spiked_flower > h2,
#lilu1 > h2,
#cisa > h2,
#usi > h2,
#la_sapienza > h2,
#io_lui_e_l_altro > h2,
#mini_cuchi > h2,
#etnic > h2,
#jazzascona > h2,
#lff > h2,
#spring > h2,
#weathaff > h2,
#turntale > h2,
#pronto_pizza_da_fabio > h2,
#popaci > h2,
#merge_film_festival > h2,
#ondus_tattoo > h2,
#samuel_rhawi > h2,
#echo_maze > h2{
  position: relative;
  display: inline-block;
  padding: 8px 22px !important;
  isolation: isolate;
  font-weight: 600 !important;
}

#mcjoes > h2::before,
#zaffa > h2::before,
#hot-dogs > h2::before,
#spiked_flower > h2::before,
#lilu1 > h2::before,
#cisa > h2::before,
#usi > h2::before,
#la_sapienza > h2::before,
#io_lui_e_l_altro > h2::before,
#mini_cuchi > h2::before,
#etnic > h2::before,
#jazzascona > h2::before,
#lff > h2::before,
#spring > h2::before,
#weathaff > h2::before,
#turntale > h2::before,
#pronto_pizza_da_fabio > h2::before,
#popaci > h2::before,
#merge_film_festival > h2::before,
#ondus_tattoo > h2::before,
#samuel_rhawi > h2::before,
#echo_maze > h2::before{
  content: "";
  position: absolute;
  inset: 0 -8px;
  z-index: -1;
  box-shadow: 0 2px 4px rgba(90, 60, 20, 0.12);
  clip-path: polygon(
    2% 12%, 8% 0, 15% 18%, 24% 4%, 33% 14%, 42% 2%, 52% 18%, 62% 6%, 72% 16%, 82% 2%, 90% 18%, 98% 8%,
    100% 88%, 92% 100%, 84% 84%, 74% 98%, 66% 82%, 56% 96%, 46% 82%, 36% 96%, 26% 80%, 16% 94%, 8% 82%, 0 96%);
}

#mcjoes > h2::before{
  background: repeating-linear-gradient(45deg, rgba(249, 179, 90, 0.55) 0 8px, rgba(249, 179, 90, 0.35) 8px 16px);
  transform: rotate(-1.5deg);
}
#zaffa > h2::before{
  background: repeating-linear-gradient(45deg, rgba(168, 202, 156, 0.60) 0 8px, rgba(168, 202, 156, 0.40) 8px 16px);
  transform: rotate(1.8deg);
}
#hot-dogs > h2::before{
  background: repeating-linear-gradient(45deg, rgba(221, 136, 136, 0.55) 0 8px, rgba(221, 136, 136, 0.38) 8px 16px);
  transform: rotate(-1.2deg);
}
#spiked_flower > h2::before{
  background: repeating-linear-gradient(45deg, rgba(156, 178, 212, 0.60) 0 8px, rgba(156, 178, 212, 0.40) 8px 16px);
  transform: rotate(1.5deg);
}
#lilu1 > h2::before{
  background: repeating-linear-gradient(45deg, rgba(249, 179, 90, 0.55) 0 8px, rgba(249, 179, 90, 0.35) 8px 16px);
  transform: rotate(-1.5deg);
}
#cisa > h2::before{
  background: repeating-linear-gradient(45deg, rgba(168, 202, 156, 0.60) 0 8px, rgba(168, 202, 156, 0.40) 8px 16px);
  transform: rotate(1.8deg);
}
#usi > h2::before{
  background: repeating-linear-gradient(45deg, rgba(221, 136, 136, 0.55) 0 8px, rgba(221, 136, 136, 0.38) 8px 16px);
  transform: rotate(-1.2deg);
}
#la_sapienza > h2::before{
  background: repeating-linear-gradient(45deg, rgba(156, 178, 212, 0.60) 0 8px, rgba(156, 178, 212, 0.40) 8px 16px);
  transform: rotate(1.5deg);
}

/* shortfilms */
#io_lui_e_l_altro > h2::before{
  background: repeating-linear-gradient(45deg, rgba(249, 179, 90, 0.55) 0 8px, rgba(249, 179, 90, 0.35) 8px 16px);
  transform: rotate(-1.5deg);
}

/* jobs-stages */
#mini_cuchi > h2::before{
  background: repeating-linear-gradient(45deg, rgba(168, 202, 156, 0.60) 0 8px, rgba(168, 202, 156, 0.40) 8px 16px);
  transform: rotate(1.8deg);
}
#etnic > h2::before{
  background: repeating-linear-gradient(45deg, rgba(221, 136, 136, 0.55) 0 8px, rgba(221, 136, 136, 0.38) 8px 16px);
  transform: rotate(-1.2deg);
}
#jazzascona > h2::before{
  background: repeating-linear-gradient(45deg, rgba(156, 178, 212, 0.60) 0 8px, rgba(156, 178, 212, 0.40) 8px 16px);
  transform: rotate(1.5deg);
}
#lff > h2::before{
  background: repeating-linear-gradient(45deg, rgba(249, 179, 90, 0.55) 0 8px, rgba(249, 179, 90, 0.35) 8px 16px);
  transform: rotate(-1.5deg);
}
#spring > h2::before{
  background: repeating-linear-gradient(45deg, rgba(168, 202, 156, 0.60) 0 8px, rgba(168, 202, 156, 0.40) 8px 16px);
  transform: rotate(1.8deg);
}

/* apps */
#weathaff > h2::before{
  background: repeating-linear-gradient(45deg, rgba(221, 136, 136, 0.55) 0 8px, rgba(221, 136, 136, 0.38) 8px 16px);
  transform: rotate(-1.2deg);
}
#turntale > h2::before{
  background: repeating-linear-gradient(45deg, rgba(156, 178, 212, 0.60) 0 8px, rgba(156, 178, 212, 0.40) 8px 16px);
  transform: rotate(1.5deg);
}
#pronto_pizza_da_fabio > h2::before{
  background: repeating-linear-gradient(45deg, rgba(168, 202, 156, 0.60) 0 8px, rgba(168, 202, 156, 0.40) 8px 16px);
  transform: rotate(1.8deg);
}
#popaci > h2::before{
  background: repeating-linear-gradient(45deg, rgba(156, 178, 212, 0.60) 0 8px, rgba(156, 178, 212, 0.40) 8px 16px);
  transform: rotate(1.5deg);
}
#merge_film_festival > h2::before{
  background: repeating-linear-gradient(45deg, rgba(249, 179, 90, 0.55) 0 8px, rgba(249, 179, 90, 0.35) 8px 16px);
  transform: rotate(-1.5deg);
}
#ondus_tattoo > h2::before{
  background: repeating-linear-gradient(45deg, rgba(221, 136, 136, 0.55) 0 8px, rgba(221, 136, 136, 0.38) 8px 16px);
  transform: rotate(-1.2deg);
}
#samuel_rhawi > h2::before{
  background: repeating-linear-gradient(45deg, rgba(156, 178, 212, 0.60) 0 8px, rgba(156, 178, 212, 0.40) 8px 16px);
  transform: rotate(1.5deg);
}
#echo_maze > h2::before{
  background: repeating-linear-gradient(45deg, rgba(249, 179, 90, 0.55) 0 8px, rgba(249, 179, 90, 0.35) 8px 16px);
  transform: rotate(-1.5deg);
}

/* =========================================================
   5. EDUCATION ICONS - hover scale (same as other icons)
   ========================================================= */
#lilu1 .icon{ width: 21% !important; }
#cisa .icon{ width: 18% !important; }

#lilu1 .icon:hover,
#cisa .icon:hover,
#usi .icon:hover,
#la_sapienza .icon:hover{
  transform: scale(1.2) !important;
  box-shadow: none !important;
  filter: grayscale(0%) !important;
}

/* =========================================================
   6. TEXT TONE ON PAPER
   ========================================================= */
#menu h2, #menu h3, #menu p,
#education_section h2, #education_section h3, #education_section p,
#music_section h2, #music_section h3, #music_section p,
#short_films_section h2, #short_films_section h3, #short_films_section p,
#contact_section h2, #contact_section h3, #contact_section p,
#jobs_section h2, #jobs_section h3, #jobs_section p,
#apps_section h2, #apps_section h3, #apps_section p{
  color: var(--paper-ink);
}

/* =========================================================
   7. COPYRIGHT with handwritten signature flourish
   ========================================================= */
#copyright{
  font-style: italic;
  opacity: 0.75;
  position: relative;
  display: inline-block;
}

#copyright::after{
  content: "";
  display: block;
  width: 90px;
  height: 26px;
  margin: 10px auto 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 26' fill='none' stroke='%23f9b35a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><path d='M4 18 Q 10 4, 18 14 Q 24 22, 30 10 Q 36 2, 42 14 Q 48 22, 54 8 Q 62 2, 72 16 L 80 10 L 86 18'/><path d='M32 20 L 58 20' stroke-dasharray='2 3'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.85;
}

/* =========================================================
   8. LINK HOVER - hand-drawn wavy underline
   ========================================================= */
#menu a:hover,
#education_section a:hover,
#music_section a:hover,
#short_films_section a:hover,
#contact_section a:hover,
#jobs_section a:hover,
#apps_section a:hover{
  text-decoration: none !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 6' preserveAspectRatio='none' fill='none' stroke='%23d99040' stroke-width='1.6' stroke-linecap='round'><path d='M2 3 Q 12 0, 22 3 T 42 3 T 62 3 T 82 3 T 98 3'/></svg>") !important;
  background-repeat: repeat-x !important;
  background-position: 0 100% !important;
  background-size: 80px 6px !important;
  padding-bottom: 3px;
}

.privacy-mini {
  text-align: center;
  font-size: 0.82rem;
  margin: 22px 0 0 !important;
  opacity: 0.78;
}
.privacy-mini a,
#copyright a {
  color: inherit !important;
  text-decoration: underline !important;
  text-decoration-color: var(--paper-accent) !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 3px !important;
}

/* =========================================================
   9. HELLO hover color tuned to paper palette
   ========================================================= */
#hello:hover h3,
#hello:hover p{
  color: #d99040 !important;
}

/* =========================================================
   10. APPS ICONS - force block so they center on a new line
   (the <span class="badge"> after the h2 breaks inline-flow
   in a way that pushes the icon sideways on some viewports)
   ========================================================= */
#weathaff > a,
#turntale > a,
#pronto_pizza_da_fabio > a,
#merge_film_festival > a,
#ondus_tattoo > a{
  margin: 8px 0 !important;
}

/* =========================================================
   11. OVERSCROLL / SAFARI IOS RUBBER-BAND
   Paint html with the SAME notebook pattern (paper + ruled lines)
   so when the user scrolls past the sheet limits on iOS, the bounce
   area looks like the notebook continues infinitely instead of a
   flat cream background.
   body stays transparent so body::before (the hero image) is visible.
   ========================================================= */
html{
  background-color: var(--paper-bg);
  background-image:
    repeating-linear-gradient(to bottom,
      transparent 0,
      transparent 31px,
      rgba(90, 60, 20, 0.06) 31px,
      rgba(90, 60, 20, 0.06) 32px);
}

html, body{
  overscroll-behavior-y: contain;
}

/* =========================================================
   12. MOBILE / IPAD ORIENTATION GUARD
   Browsers, especially iOS Safari, do not allow a website to
   hard-lock orientation. In landscape on touch devices, block the
   page with a fixed portrait-only message instead.
   ========================================================= */
@media screen and (orientation: landscape) and (hover: none) and (pointer: coarse) and (max-width: 1366px),
       screen and (orientation: landscape) and (any-pointer: coarse) and (max-width: 1366px) and (max-height: 1024px){
  html,
  body{
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 100dvh !important;
    overflow: hidden !important;
    background:
      radial-gradient(circle at 50% 20%, rgba(249, 179, 90, 0.18), transparent 42%),
      repeating-linear-gradient(to bottom,
        transparent 0,
        transparent 31px,
        rgba(90, 60, 20, 0.06) 31px,
        rgba(90, 60, 20, 0.06) 32px),
      var(--paper-bg) !important;
  }

  body > *{
    visibility: hidden !important;
    pointer-events: none !important;
  }

  body::before{
    opacity: 0 !important;
  }

  body::after{
    content: "Rotate your device\Ato portrait mode";
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: grid;
    place-items: center;
    padding: max(28px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left));
    box-sizing: border-box;
    visibility: visible !important;
    pointer-events: auto !important;
    background:
      radial-gradient(circle at 50% 20%, rgba(249, 179, 90, 0.18), transparent 42%),
      repeating-linear-gradient(to bottom,
        transparent 0,
        transparent 31px,
        rgba(90, 60, 20, 0.06) 31px,
        rgba(90, 60, 20, 0.06) 32px),
      var(--paper-bg);
    color: var(--paper-ink);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.45rem, 4.8vw, 2.8rem);
    font-weight: 700;
    line-height: 1.12;
    text-align: center;
    white-space: pre-line;
    letter-spacing: 0;
  }
}
