.thinv-gallery {
  --th-ink: #172428;
  --th-muted: #53686d;
  --th-teal: #078da5;
  --th-teal-dark: #075e70;
  --th-aqua: #dff6f7;
  --th-sand: #f6efe2;
  --th-paper: #fffdf8;
  --th-gold: #e7b84b;
  color: var(--th-ink);
  font-family: Georgia, "Times New Roman", serif;
}

.thinv-gallery * { box-sizing: border-box; }
.thinv-artist-intro { max-width: 940px; margin: 1.5rem auto 0; padding: clamp(1.5rem, 4vw, 3rem); color: #eefafa; background: linear-gradient(145deg, rgba(7, 94, 112, .28), rgba(23, 36, 40, .2)); border: 1px solid rgba(53, 213, 233, .2); border-radius: 1rem; box-shadow: 0 22px 55px rgba(0, 0, 0, .14); }
.thinv-artist-intro p { color: #eefafa; font-size: 1.06rem; line-height: 1.75; }
.thinv-artist-intro > .thinv-kicker { color: #35d5e9; font-size: .78rem; }
.thinv-section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; scroll-margin-top: 110px; }
.thinv-section + .thinv-section { border-top: 1px solid rgba(7, 94, 112, .16); }
.thinv-heading { max-width: 820px; margin: 0 auto 2.8rem; text-align: center; }
.thinv-heading h2,
.thinv-second-intro h2,
.thinv-dialog h2 { margin: 0; font: 800 clamp(2.1rem, 5vw, 4rem)/1 Arial, sans-serif; letter-spacing: -.045em; }
.thinv-heading h2 { color: #35d5e9; text-shadow: 0 2px 22px rgba(53, 213, 233, .18); }
.thinv-second-intro h2,
.thinv-dialog h2 { color: var(--th-teal-dark); }
.thinv-heading > p:last-child { color: #eefafa; font-size: 1.12rem; font-weight: 700; line-height: 1.7; text-shadow: 0 1px 10px rgba(0, 0, 0, .2); }
.thinv-second-intro p { color: var(--th-muted); font-size: 1.08rem; line-height: 1.7; }
.thinv-kicker { margin: 0 0 .65rem; color: #29c7dc; font: 800 .73rem/1.2 Arial, sans-serif; letter-spacing: .16em; text-transform: uppercase; }

.thinv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.thinv-card { overflow: hidden; display: flex; flex-direction: column; min-width: 0; background: var(--th-paper); border: 1px solid rgba(7, 94, 112, .17); border-radius: 1rem; box-shadow: 0 16px 42px rgba(23, 36, 40, .09); }
.thinv-images { display: grid; grid-template-columns: 1fr; gap: 2px; background: #d5e4e5; }
.thinv-images.has-multiple { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.thinv-image-button { width: 100%; min-height: 320px; padding: 0; overflow: hidden; appearance: none; border: 0; background: #e8efef; cursor: pointer; }
.thinv-image-button img { width: 100%; height: 100%; min-height: 320px; aspect-ratio: 3 / 4; display: block; object-fit: cover; transition: transform .3s ease, filter .3s ease; }
.thinv-image-button:hover img,
.thinv-image-button:focus-visible img { transform: scale(1.035); filter: saturate(1.08) contrast(1.03); }
.thinv-card-body { flex: 1; display: flex; flex-direction: column; padding: 1.35rem; }
.thinv-card h3 { margin: 0 0 .55rem; color: var(--th-ink); font: 800 1.22rem/1.24 Arial, sans-serif; }
.thinv-card-body > p { margin: 0 0 1.1rem; color: var(--th-muted); line-height: 1.55; }
.thinv-file-note { padding: .7rem; border-radius: .4rem; background: #fff5d9; font: 700 .78rem/1.45 Arial, sans-serif; }
.thinv-select { display: flex; align-items: flex-start; gap: .55rem; margin: auto 0 .9rem; color: var(--th-muted); font: 700 .78rem/1.4 Arial, sans-serif; }
.thinv-select input { margin-top: .12rem; accent-color: var(--th-teal); }
.thinv-inquire,
.thinv-open-selected,
.thinv-submit { width: 100%; padding: .82rem 1rem; color: white; background: linear-gradient(135deg, var(--th-teal), var(--th-teal-dark)); border: 0; border-radius: .45rem; cursor: pointer; font: 800 .78rem/1.2 Arial, sans-serif; letter-spacing: .055em; text-transform: uppercase; box-shadow: 0 8px 20px rgba(7, 94, 112, .18); }
.thinv-inquire:hover,
.thinv-open-selected:hover,
.thinv-submit:hover { background: linear-gradient(135deg, #0aa7c2, #064c5a); }
.thinv-inquire:focus-visible,
.thinv-open-selected:focus-visible,
.thinv-submit:focus-visible,
.thinv-image-button:focus-visible,
.thinv-close:focus-visible { outline: 3px solid var(--th-gold); outline-offset: 3px; }

.thinv-second { background: linear-gradient(180deg, var(--th-sand), #fffaf0); margin-inline: calc(50% - 50vw); padding-inline: max(1.25rem, calc((100vw - 1170px) / 2)); }
.thinv-second-intro { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); align-items: center; gap: clamp(2rem, 6vw, 5rem); margin-bottom: 3rem; }
.thinv-second-intro img { width: 100%; height: auto; border-radius: 1rem; box-shadow: 0 18px 45px rgba(23, 36, 40, .16); }

.thinv-art-gallery .thinv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.thinv-art-gallery .thinv-image-button { min-height: 340px; padding: .65rem; background: #eaf1ef; }
.thinv-art-gallery .thinv-image-button img { height: 340px; min-height: 0; aspect-ratio: auto; object-fit: contain; }
.thinv-art-gallery .thinv-card-body { padding-top: 1.1rem; }
.thinv-art-gallery .thinv-card h3 { color: var(--th-teal-dark); }
.thinv-card-inside { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr); align-items: center; gap: clamp(1.5rem, 5vw, 3.5rem); margin: 0 0 3rem; padding: clamp(1.2rem, 3vw, 2rem); color: var(--th-ink); background: var(--th-paper); border: 1px solid rgba(7, 94, 112, .2); border-radius: 1rem; box-shadow: 0 16px 42px rgba(23, 36, 40, .1); }
.thinv-card-inside img { width: 100%; max-height: 390px; object-fit: contain; border-radius: .65rem; background: #edf3f2; }
.thinv-card-inside h3 { margin: 0 0 .65rem; color: var(--th-teal-dark); font: 800 clamp(1.5rem, 4vw, 2.3rem)/1.08 Arial, sans-serif; }
.thinv-card-inside p:last-child { margin: 0; color: var(--th-muted); line-height: 1.65; }
.thinv-art-paintings { background: linear-gradient(180deg, var(--th-sand), #fffaf0); margin-inline: calc(50% - 50vw); padding-inline: max(1.25rem, calc((100vw - 1170px) / 2)); }
.thinv-art-paintings .thinv-heading h2 { color: var(--th-teal-dark); text-shadow: none; }
.thinv-art-paintings .thinv-heading > p:last-child { color: var(--th-muted); text-shadow: none; }

.thinv-notice { margin: 1.5rem 0; padding: 1rem 1.2rem; border-radius: .55rem; font: 700 .95rem/1.5 Arial, sans-serif; }
.thinv-notice.is-success { color: #075b39; background: #dbf6e8; border: 1px solid #8ed9b3; }
.thinv-notice.is-error { color: #851d1d; background: #fde8e8; border: 1px solid #e8a0a0; }
.thinv-empty { padding: 2rem; text-align: center; color: var(--th-muted); background: var(--th-aqua); border-radius: .8rem; }

.thinv-selection-bar { position: fixed; left: 50%; bottom: 1rem; z-index: 9990; width: min(620px, calc(100% - 2rem)); transform: translateX(-50%); display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem .8rem .8rem 1.1rem; color: white; background: rgba(23, 36, 40, .96); border: 1px solid rgba(255, 255, 255, .16); border-radius: .75rem; box-shadow: 0 16px 50px rgba(0, 0, 0, .28); backdrop-filter: blur(14px); font: 700 .86rem Arial, sans-serif; }
.thinv-selection-bar[hidden] { display: none; }
.thinv-open-selected { width: auto; white-space: nowrap; }

.thinv-modal[hidden] { display: none; }
.thinv-modal { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 1rem; }
.thinv-backdrop { position: absolute; inset: 0; background: rgba(8, 18, 21, .78); backdrop-filter: blur(6px); }
.thinv-dialog { position: relative; z-index: 1; width: min(720px, 100%); max-height: calc(100vh - 2rem); overflow: auto; padding: clamp(1.4rem, 4vw, 2.5rem); background: var(--th-paper); border-radius: 1rem; box-shadow: 0 28px 90px rgba(0, 0, 0, .38); }
.thinv-dialog h2 { font-size: clamp(1.8rem, 5vw, 3rem); }
.thinv-close { position: absolute; top: .7rem; right: .7rem; width: 42px; height: 42px; display: grid; place-items: center; color: var(--th-ink); background: var(--th-sand); border: 0; border-radius: 50%; cursor: pointer; font: 400 1.8rem/1 Arial, sans-serif; }
.thinv-selected-names { margin: .8rem 0 1.3rem; color: var(--th-muted); font-weight: 700; line-height: 1.5; }
.thinv-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.thinv-form-grid label { display: grid; gap: .38rem; color: var(--th-ink); font: 800 .79rem/1.3 Arial, sans-serif; }
.thinv-form-grid input,
.thinv-form-grid textarea { width: 100%; padding: .78rem .82rem; color: var(--th-ink); background: white; border: 1px solid rgba(7, 94, 112, .28); border-radius: .4rem; font: 400 1rem/1.35 Arial, sans-serif; }
.thinv-form-grid input:focus,
.thinv-form-grid textarea:focus { outline: 3px solid rgba(7, 141, 165, .18); border-color: var(--th-teal); }
.thinv-notes { grid-column: 1 / -1; }
.thinv-submit { margin-top: 1.2rem; }
.thinv-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
body.thinv-modal-open { overflow: hidden; }

@media (max-width: 900px) {
  .thinv-grid,
  .thinv-art-gallery .thinv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .thinv-grid,
  .thinv-art-gallery .thinv-grid,
  .thinv-second-intro,
  .thinv-card-inside,
  .thinv-form-grid { grid-template-columns: 1fr; }
  .thinv-image-button,
  .thinv-image-button img { min-height: 280px; }
  .thinv-art-gallery .thinv-image-button,
  .thinv-art-gallery .thinv-image-button img { min-height: 0; height: 300px; }
  .thinv-selection-bar { align-items: stretch; flex-direction: column; }
  .thinv-open-selected { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .thinv-gallery * { scroll-behavior: auto !important; transition: none !important; }
}
