/* Gallo V63. This ENTIRE file is mobile-only. Original desktop CSS remains byte-for-byte V54. */
@media screen and (max-width: 767px) {
  html.gm-ready body > header:not(.gm-header) {display:none!important}
  .gm-header {
    --gm-ink:#342a22;--gm-line:rgba(139,96,46,.23);--gm-fill:#f6ede2;
    position:sticky;top:0;z-index:45;isolation:isolate;
    display:block;flex:none;width:100%;min-width:0;margin:0;
    padding:8px 10px 6px;box-sizing:border-box;background:var(--gm-fill);
    border:0;border-bottom:1px solid var(--gm-line);color:var(--gm-ink);
    font:600 13px/1.3 Arial,Helvetica,sans-serif;letter-spacing:normal;
  }
  .gm-header[data-kind="books"] {--gm-ink:#eee4d2;--gm-fill:#0e191e;--gm-line:rgba(236,210,155,.24)}
  .gm-header * {box-sizing:border-box}
  .gm-header a,.gm-header button {font-family:Arial,Helvetica,sans-serif;text-decoration:none;letter-spacing:normal;opacity:1;transform:none;box-shadow:none;text-transform:none;margin:0;cursor:pointer}
  .gm-header a:focus-visible,.gm-header button:focus-visible {outline:2px solid #ae7b37;outline-offset:2px}
  .gm-top {display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.85fr) minmax(0,1.2fr) 88px;gap:6px;align-items:center;min-width:0}
  .gm-header .gm-brand {display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:0;color:var(--gm-ink);padding:0;background:none;border:0}
  .gm-header .gm-emblem {display:block;flex:none;width:34px;height:34px;max-width:100%;object-fit:contain;border:0;border-radius:50%;padding:0;background:none}
  .gm-name {display:block;text-align:center;font:700 10.5px/1.15 Georgia,"Times New Roman",serif;letter-spacing:.025em;max-width:100%}
  .gm-name span {display:block}
  .gm-header .gm-top-link {align-self:stretch;display:flex;align-items:center;justify-content:center;min-width:0;min-height:42px;padding:6px 4px;border:1px solid rgba(72,129,151,.45);border-radius:14px;background:linear-gradient(135deg,#173b4b,#2c6178);color:white;font-size:12px;font-weight:700;line-height:1.25;text-align:center;white-space:normal;overflow-wrap:normal}
  .gm-languages {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;align-items:center;width:88px;min-width:0;padding:2px;border:1px solid var(--gm-line);border-radius:24px;background:transparent}
  .gm-header .gm-language {display:flex;align-items:center;justify-content:center;width:100%;min-width:0;min-height:36px;padding:4px 0;border:0;border-radius:20px;background:transparent;color:var(--gm-ink);font-size:11px;line-height:1;font-weight:700}
  .gm-header .gm-language[aria-pressed="true"] {background:linear-gradient(135deg,#a17436,#cba15c);color:white}
  .gm-header[data-kind="books"] .gm-language[aria-pressed="true"] {color:#10191e}
  .gm-header[data-kind="gateway"] {padding-top:8px;padding-bottom:8px}
  .gm-header[data-kind="gateway"] .gm-top {grid-template-columns:minmax(0,1fr) minmax(0,1.6fr) 88px;gap:8px}
  .gm-site-logo {display:flex;align-items:center;justify-content:center;min-width:0;max-width:100%}
  .gm-site-logo img {display:block;width:100%;max-width:260px;height:auto;max-height:56px;object-fit:contain;mix-blend-mode:multiply}
  .gm-paint-sections {position:relative;display:grid;grid-template-columns:minmax(max-content,1fr) minmax(0,1.35fr) minmax(max-content,1fr) 46px;gap:6px;align-items:center;min-width:0;margin-top:7px}
  .gm-paint-sections.gm-without-basket {grid-template-columns:repeat(3,minmax(0,1fr))}
  .gm-header .gm-link {display:flex;align-items:center;justify-content:center;gap:3px;min-width:0;min-height:40px;padding:5px 2px;border:0;border-radius:8px;background:none;color:var(--gm-ink);font-size:12px;line-height:1.25;font-weight:700;text-align:center;white-space:normal;overflow-wrap:anywhere}
  .gm-header .gm-link:hover {background:rgba(174,123,55,.08)}
  /* Keep the Paintings category button interactive, but hide the extra mobile chevron. */
  .gm-chevron {display:none!important}
  .gm-header .gm-basket {position:relative;display:flex;align-items:center;justify-content:center;min-width:46px;width:46px;height:46px;padding:8px;border:1px solid var(--gm-line);border-radius:14px;background:rgba(255,255,255,.25);color:#8b6132}
  .gm-basket svg {display:block;width:24px;height:24px}
  .gm-count {position:absolute;top:0;right:0;display:flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 3px;background:#976729;color:white;border:1px solid var(--gm-fill);border-radius:20px;font-size:10px;line-height:1}
  .gm-categories {position:absolute;left:10px;right:10px;top:calc(100% + 2px);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;max-height:60vh;overflow:auto;padding:10px;background:var(--gm-fill);border:1px solid var(--gm-line);border-radius:14px;box-shadow:0 12px 30px rgba(0,0,0,.2)}
  .gm-categories[hidden] {display:none!important}
  .gm-header .gm-category-link {display:flex;align-items:center;justify-content:center;min-width:0;min-height:42px;padding:8px;border:1px solid var(--gm-line);border-radius:8px;color:var(--gm-ink);font-size:13px;line-height:1.3;text-align:center;white-space:normal;overflow-wrap:anywhere}
  /* Match the original desktop bronze-gold All Paintings item, not the other neutral categories. */
  .gm-categories .gm-category-link:first-child {grid-column:1/-1;background:linear-gradient(180deg,#e2c8a7,#caa57a);color:#4e3827;border-color:rgba(111,76,41,.32);font-weight:800}
  .gm-categories .gm-category-link:first-child:hover,.gm-categories .gm-category-link:first-child:focus-visible {background:linear-gradient(180deg,#d5b58d,#b88d5e);color:#39271b}
  .gm-book-sections {display:flex;align-items:stretch;gap:8px;max-width:100%;min-width:0;padding:3px 0 5px;margin-top:7px;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#997b47 transparent;-webkit-overflow-scrolling:touch}
  .gm-book-sections .gm-link {flex:1 0 auto;min-width:max-content;padding:6px 7px;white-space:nowrap;font-size:13px;overflow-wrap:normal}

  /* Content fixes are also mobile-only. No blanket zoom/scale or page-wide overflow hiding. */
  #book,#other-writings,#ideas,#chapters,#author {scroll-margin-top:calc(var(--gm-header-height,130px) + 14px)!important}
  .landing-main,.landing-choices,.landing-choice,.section-head,.hero-copy,.author-copy,.contact-card {min-width:0!important;max-width:100%!important}
  .emblem-intro,.emblem-row {min-width:0!important;max-width:100%!important}
  .emblem-intro .kicker {white-space:normal!important;overflow-wrap:anywhere!important}
  .landing-label {left:16px!important;right:16px!important;max-width:calc(100% - 32px)!important}
  .book-choice .landing-label {padding:14px!important}
  .landing-label h2 {font-size:clamp(28px,7vw,42px)!important;line-height:1.1!important;overflow-wrap:anywhere!important}
  .landing-label .landing-quote {font-size:17px!important;max-width:100%!important}
  .landing-choice {min-height:390px!important}
  .author-panel .author-photo-card {align-self:start!important;margin:0!important;padding:0!important;min-height:0!important;height:auto!important;background:transparent!important}
  .author-panel .author-photo-frame {display:block!important;position:relative!important;min-height:0!important;height:auto!important;flex:none!important;aspect-ratio:auto!important;background:none!important;border-radius:inherit!important}
  .author-panel .author-photo-frame img {display:block!important;position:static!important;width:100%!important;height:auto!important;object-fit:contain!important;background:none!important;border-radius:inherit!important}
  .author-panel .photo-monogram {display:none!important}
  .portrait-panel:has(img[src*="professor-cover"]) {min-height:0!important;height:auto!important;padding:0!important;align-self:start!important;background:transparent!important}
  .portrait-panel img[src*="professor-cover"] {position:static!important;width:100%!important;height:auto!important;object-fit:contain!important}
  .contact-direct-section .contact-layout {grid-template-columns:minmax(0,1fr)!important;gap:18px!important}
  .contact-direct-section .contact-card {padding:18px 14px!important;overflow-wrap:anywhere!important}
  .contact-direct-section .field-grid {grid-template-columns:minmax(0,1fr)!important}
  .contact-direct-section .quote-add-bar {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  .contact-direct-section input,.contact-direct-section select,.contact-direct-section textarea {min-width:0!important;max-width:100%!important;font-size:16px!important}
  .contact-direct-section .quote-work-row {min-width:0!important;max-width:100%!important}
  .enquiry-cart-panel {width:min(440px,100vw)!important;max-width:100vw!important;padding:16px 12px!important}
  .enquiry-cart-item-copy {min-width:0!important;overflow-wrap:anywhere!important}
  .artwork-quote-actions {display:flex!important;flex-wrap:wrap!important;gap:8px!important;max-width:100%!important}
  .artwork-quote-actions .btn {flex:1 1 140px!important;min-width:0!important;white-space:normal!important;text-align:center!important}
  @media (min-width: 520px) {
    .gm-header {padding:9px 14px 6px}
    .gm-top {grid-template-columns:minmax(0,1.4fr) minmax(0,.8fr) minmax(0,1.1fr) 108px;gap:10px}
    .gm-header .gm-brand {flex-direction:row;justify-content:flex-start;gap:7px}
    .gm-header .gm-emblem {width:40px;height:40px}
    .gm-name {font-size:13px;text-align:left}
    .gm-header .gm-top-link {font-size:13px}
    .gm-languages {width:108px}
    .gm-header .gm-language {font-size:12px;min-height:38px}
    .gm-header[data-kind="gateway"] .gm-top {grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) 108px}
    .gm-header .gm-link {font-size:14px}
    .gm-paint-sections {grid-template-columns:repeat(3,minmax(0,1fr)) 46px;gap:10px}
  }
  /* V61: equal-sized blue buttons with genuinely uniform outer gaps.
     Cap their growth on wider phones while distributing extra room evenly. */
  .gm-header[data-kind="paintings"] .gm-top,
  .gm-header[data-kind="books"] .gm-top {
    display:flex;align-items:center;justify-content:space-between;gap:clamp(4px,1vw,10px)
  }
  .gm-header[data-kind="paintings"] .gm-top .gm-brand,
  .gm-header[data-kind="books"] .gm-top .gm-brand {flex:0 0 auto}
  .gm-header[data-kind="paintings"] .gm-top .gm-top-link,
  .gm-header[data-kind="books"] .gm-top .gm-top-link {
    flex:1 1 0;max-width:188px;min-width:0;align-self:stretch
  }
  .gm-header[data-kind="paintings"] .gm-top .gm-languages,
  .gm-header[data-kind="books"] .gm-top .gm-languages {flex:0 0 88px}
  @media (min-width: 520px) {
    .gm-header[data-kind="paintings"] .gm-top .gm-languages,
    .gm-header[data-kind="books"] .gm-top .gm-languages {flex-basis:108px}
  }
  @media (max-width: 359px) {
    .gm-top {gap:4px;grid-template-columns:minmax(0,.7fr) minmax(0,.95fr) minmax(0,1.2fr) 88px}
    .gm-header .gm-top-link {font-size:11.5px;padding:6px 3px}
    .gm-header .gm-link {font-size:11.5px}
    .gm-book-sections .gm-link {font-size:13px}
  }
  /* V62: compact oval blue links, matching dimensions across both sections.
     Never stretch a blue link to the full height of the two-line brand. */
  .gm-header[data-kind="paintings"] .gm-top .gm-top-link,
  .gm-header[data-kind="books"] .gm-top .gm-top-link {
    align-self:center;flex:1 1 0;min-width:0;
    height:48px;min-height:48px;max-height:48px;
    padding:5px 5px;border-radius:999px;
    font-weight:700;line-height:1.2;text-align:center;
  }
  /* V62: legible second-row navigation and bronze, pill-shaped Paintings selector. */
  .gm-header[data-kind="paintings"] .gm-paint-sections .gm-link {
    font-size:clamp(13px,3.4vw,15px);line-height:1.2;
  }
  .gm-header[data-kind="paintings"] .gm-paint-sections .gm-category-toggle {
    min-width:0;min-height:40px;width:100%;padding:6px 6px;
    border:1px solid rgba(111,76,41,.32);border-radius:999px;
    background:linear-gradient(180deg,#e2c8a7,#caa57a);
    color:#4e3827;font-weight:800;
  }
  .gm-header[data-kind="paintings"] .gm-paint-sections .gm-category-toggle:is(:hover,[aria-expanded="true"]) {
    background:linear-gradient(180deg,#d5b58d,#b88d5e);color:#39271b;
  }
  @media (max-width:359px) {
    /* Give the full Hungarian Bemutatkozás label enough room at 320px. */
    .gm-header[data-kind="paintings"] .gm-paint-sections {gap:3px}
    .gm-header[data-kind="paintings"] .gm-category-toggle {padding-inline:3px}
  }
  @media (max-width:340px) {
    /* V62 narrow-phone exception; V63 overrides the common navigation type scale below. */
    .gm-header[data-kind="paintings"] .gm-paint-sections .gm-link[href="about.html"] {font-size:12.3px}
  }

  /* V63 — compact four blue capsules; typography harmonised on mobile ONLY. */
  .gm-header[data-kind="paintings"] .gm-top .gm-top-link,
  .gm-header[data-kind="books"] .gm-top .gm-top-link {
    flex:1 1 0;
    max-width:158px;
    min-width:0;
    height:42px;min-height:42px;max-height:42px;
    padding:4px 3px;
    margin-inline:3px;
    border-radius:999px;
    align-self:center;
    font-size:12px;line-height:1.16;
  }
  /* Paintings second-row labels, book section labels and blue buttons use the same mobile size. */
  .gm-header[data-kind="paintings"] .gm-paint-sections .gm-link,
  .gm-header[data-kind="books"] .gm-book-sections .gm-link {
    font-size:12px;
    line-height:1.2;
  }
  /* Give longer translated labels the space they need on narrow phones. */
  @media (max-width:359px) {
    .gm-header[data-kind="paintings"] .gm-top .gm-top-link,
    .gm-header[data-kind="books"] .gm-top .gm-top-link {margin-inline:1px;font-size:11.5px}
    .gm-header[data-kind="paintings"] .gm-paint-sections {
      grid-template-columns:minmax(0,1.15fr) minmax(0,1.25fr) minmax(0,.85fr) 46px;
      gap:3px;
    }
    .gm-header[data-kind="paintings"] .gm-paint-sections .gm-link,
    .gm-header[data-kind="books"] .gm-book-sections .gm-link {font-size:11.5px}
    .gm-header[data-kind="paintings"] .gm-paint-sections .gm-link[href="about.html"] {font-size:11.5px}
  }
  @media (min-width:520px) {
    .gm-header[data-kind="paintings"] .gm-top .gm-top-link,
    .gm-header[data-kind="books"] .gm-top .gm-top-link {font-size:13px;margin-inline:4px}
    .gm-header[data-kind="paintings"] .gm-paint-sections .gm-link,
    .gm-header[data-kind="books"] .gm-book-sections .gm-link {font-size:13px}
  }

}
