/* ==============================================
   Jonas Pettersson — Custom Styles
   Composer & Visual Artist
   ============================================== */

/* -----------------------------------------------
   Color Palette Override
   Nordic minimalism: warm greys, off-white,
   deep charcoal with desaturated vermillion accent
   ----------------------------------------------- */
:root {
  --tt-main-color: #3aa5b5;
  --tt-dark-color: #1a1816;
  --tt-light-color: #f0ece7;

  --tt-bg-color: #0e0d0c;
  --tt-text-color: #f0ece7;
  --tt-text-muted-color: #8a8580;
  --tt-border-color: rgb(138 133 128 / 40%);

  --tt-page-trans-overlay-bg-color: #1a1816;
  --tt-ball-border-color: #6b6560;
  --tt-ball-magnetic-color: var(--tt-main-color);

  /* Custom Jonas palette tokens */
  --jp-ochre: #c4973b;
  --jp-warm-grey: #3d3835;
  --jp-cream: #f5f0e8;
  --jp-forest: #2a3a2e;
}

/* Light mode overrides */
body.tt-lightmode .tt-section,
body.tt-lightmode #tt-page-content,
body.tt-lightmode #body-inner {
  --tt-bg-color: #f5f0e8;
  --tt-text-color: #1a1816;
  --tt-text-muted-color: #6b6560;
  --tt-border-color: rgb(138 133 128 / 25%);
}


/* -----------------------------------------------
   Crane Logo
   ----------------------------------------------- */

/* Header logo sizing */
.tt-logo .jp-logo-crane {
  height: 50px;
  width: auto;
  object-fit: contain;
}

/* Invert for dark mode (default): white bg crane becomes transparent */
.tt-logo .jp-logo-crane.tt-logo-light {
  filter: invert(1);
}

/* Light mode: show dark crane as-is */
body.tt-lightmode .tt-logo .jp-logo-crane.tt-logo-dark {
  filter: none;
}

body.tt-lightmode .tt-logo .jp-logo-crane.tt-logo-light {
  filter: none;
}

/* Footer crane logo */
.tt-footer-logo .jp-logo-crane {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.tt-footer-logo .jp-logo-crane.tt-logo-light {
  filter: invert(1);
}

.tt-footer-logo .jp-logo-crane-invert {
  filter: none;
}

/* Page transition preloader crane */
.tt-ptr-prel-image.jp-logo-preloader {
  height: 420px !important;
  max-height: 420px !important;
  width: auto !important;
  max-width: 80vw !important;
  object-fit: contain;
  filter: invert(1);
  opacity: 0.9;
}


/* -----------------------------------------------
   Typography — Editorial feel
   Swap alter font to a serif for artistic headings
   ----------------------------------------------- */
:root {
  --tt-alter-font: "Big Shoulders Display", sans-serif;
}

/* Section subtitles get a delicate treatment */
.tt-heading-subtitle {
  letter-spacing: 0.15em;
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.85em;
  color: var(--tt-main-color);
}


/* -----------------------------------------------
   Hero Section — Composer & Artist
   ----------------------------------------------- */
#page-header .ph-caption-title {
  font-weight: 800;
  letter-spacing: -0.02em;
}

#page-header .ph-caption-subtitle {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 300;
  font-size: 1.1rem;
  color: var(--tt-main-color);
}

#page-header .ph-caption-description {
  font-weight: 300;
  letter-spacing: 0.02em;
  opacity: 0.85;
}

/* Hero abstract background */
.jp-hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.jp-hero-bg canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.jp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(14, 13, 12, 0.3) 0%,
    rgba(14, 13, 12, 0.6) 50%,
    rgba(14, 13, 12, 0.85) 100%
  );
  z-index: 1;
}


/* -----------------------------------------------
   Compositions Section
   ----------------------------------------------- */

/* Filter bar */
.jp-compositions-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
  align-items: center;
}

.jp-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.jp-filter-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tt-text-muted-color);
  margin-right: 4px;
  font-weight: 500;
}

.jp-filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border: 1px solid var(--tt-border-color);
  border-radius: 50px;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s ease;
  background: transparent;
  color: var(--tt-text-color);
  font-family: var(--tt-body-font);
  white-space: nowrap;
}

.jp-filter-pill:hover {
  border-color: var(--tt-main-color);
  color: var(--tt-main-color);
}

.jp-filter-pill.active {
  background: var(--tt-main-color);
  border-color: var(--tt-main-color);
  color: #fff;
}

/* Search input */
.jp-search-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 400px;
}

.jp-search-input {
  width: 100%;
  padding: 8px 16px 8px 40px;
  border: 1px solid var(--tt-border-color);
  border-radius: 50px;
  background: transparent;
  color: var(--tt-text-color);
  font-family: var(--tt-body-font);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.jp-search-input::placeholder {
  color: var(--tt-text-muted-color);
}

.jp-search-input:focus {
  border-color: var(--tt-main-color);
}

.jp-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--tt-text-muted-color);
  font-size: 0.85rem;
  pointer-events: none;
}

/* Filter row layout */
.jp-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.jp-filter-row:last-child {
  margin-bottom: 0;
}

.jp-active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  min-height: 0;
  transition: all 0.3s ease;
}

.jp-active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: var(--jp-warm-grey);
  border-radius: 50px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tt-text-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.jp-active-filter-tag:hover {
  background: var(--tt-main-color);
}

.jp-active-filter-tag .remove {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.7;
}

.jp-clear-filters {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tt-text-muted-color);
  cursor: pointer;
  padding: 4px 0;
  border: none;
  background: none;
  font-family: var(--tt-body-font);
  transition: color 0.3s ease;
}

.jp-clear-filters:hover {
  color: var(--tt-main-color);
}

/* Composition cards grid */
.jp-compositions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

@media (max-width: 768px) {
  .jp-compositions-grid {
    grid-template-columns: 1fr;
  }
}

/* Composition card */
.jp-comp-card {
  border: 1px solid var(--tt-border-color);
  border-radius: 4px;
  padding: 28px;
  transition: all 0.4s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.jp-comp-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--tt-main-color);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s ease;
}

.jp-comp-card:hover {
  border-color: var(--tt-main-color);
}

.jp-comp-card:hover::before {
  transform: scaleY(1);
  transform-origin: top;
}

.jp-comp-card-title {
  font-family: var(--tt-alter-font);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.2;
  color: var(--tt-text-color);
}

.jp-comp-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 0.8rem;
  color: var(--tt-text-muted-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.jp-comp-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.jp-comp-card-meta i {
  font-size: 0.7rem;
  color: var(--tt-main-color);
}

.jp-comp-card-desc {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--tt-text-muted-color);
  margin-bottom: 16px;
}

.jp-comp-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jp-comp-tag {
  padding: 3px 10px;
  border: 1px solid var(--tt-border-color);
  border-radius: 50px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--tt-text-muted-color);
}

.jp-comp-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--tt-border-color);
}

.jp-comp-learn-more {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tt-main-color);
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.jp-comp-card:hover .jp-comp-learn-more {
  opacity: 0.8;
}

/* No results */
.jp-no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--tt-text-muted-color);
  display: none;
}

.jp-no-results.visible {
  display: block;
}

.jp-no-results h3 {
  font-family: var(--tt-alter-font);
  font-size: 1.5rem;
  margin-bottom: 8px;
  color: var(--tt-text-color);
}

.jp-results-count {
  font-size: 0.8rem;
  color: var(--tt-text-muted-color);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

/* Card enter animation */
.jp-comp-card {
  opacity: 0;
  transform: translateY(20px);
  animation: jpCardIn 0.5s ease forwards;
}

.jp-comp-card:nth-child(1) { animation-delay: 0s; }
.jp-comp-card:nth-child(2) { animation-delay: 0.08s; }
.jp-comp-card:nth-child(3) { animation-delay: 0.16s; }
.jp-comp-card:nth-child(4) { animation-delay: 0.24s; }
.jp-comp-card:nth-child(5) { animation-delay: 0.32s; }
.jp-comp-card:nth-child(6) { animation-delay: 0.40s; }
.jp-comp-card:nth-child(7) { animation-delay: 0.48s; }
.jp-comp-card:nth-child(8) { animation-delay: 0.56s; }

@keyframes jpCardIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* -----------------------------------------------
   Composition Detail Modal
   ----------------------------------------------- */
.jp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 13, 12, 0.9);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.jp-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.jp-modal {
  background: var(--tt-bg-color);
  border: 1px solid var(--tt-border-color);
  border-radius: 4px;
  max-width: 700px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 48px;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.4s ease;
}

.jp-modal-overlay.active .jp-modal {
  transform: translateY(0);
}

.jp-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--tt-border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: none;
  color: var(--tt-text-color);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.jp-modal-close:hover {
  border-color: var(--tt-main-color);
  color: var(--tt-main-color);
}

.jp-modal-title {
  font-family: var(--tt-alter-font);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.jp-modal-subtitle {
  font-size: 0.9rem;
  color: var(--tt-text-muted-color);
  margin-bottom: 24px;
}

.jp-modal-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
  padding: 20px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
}

.jp-modal-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.jp-modal-detail-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--tt-text-muted-color);
}

.jp-modal-detail-value {
  font-size: 0.95rem;
  color: var(--tt-text-color);
}

.jp-modal-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--tt-text-muted-color);
  margin-bottom: 24px;
}

.jp-modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .jp-modal {
    padding: 32px 24px;
    margin: 20px;
  }

  .jp-modal-details {
    grid-template-columns: 1fr;
  }
}


/* -----------------------------------------------
   Gallery Section
   ----------------------------------------------- */

/* Sticky portfolio stacking fix:
   When sticky cards get pinned (position: fixed), they float
   to the top of the viewport. Sections ABOVE the sticky
   portfolio need a higher z-index and background so pinned
   cards slide behind them. The gallery HEADING section does
   NOT get elevated z-index — it scrolls naturally to reveal
   the first pinned card beneath it. */

/* Sections ABOVE sticky gallery: block pinned cards from showing */
#compositions {
  position: relative;
  z-index: 3;
  background-color: var(--tt-bg-color);
}

/* About teaser above compositions */
#tt-page-content > .tt-section:first-child {
  position: relative;
  z-index: 3;
  background-color: var(--tt-bg-color);
}

/* Gallery heading also blocks pinned cards while it's on-screen */
#gallery {
  position: relative;
  z-index: 3;
  background-color: var(--tt-bg-color);
}
body.tt-lightmode #gallery {
  background-color: var(--tt-bg-color);
}

/* Push the sticky cards further down so the gallery heading has
   enough scroll distance to fully exit the viewport before the
   first card's pin animation completes. This prevents the heading
   from covering The Crane Couple for the entire pin duration. */
.tt-section.no-padding-top:has(.tt-sticky-portfolio) {
  padding-top: 50vh !important;
}

/* Sections BELOW sticky gallery: block pinned cards from overlapping */
#biography,
#cv,
#news,
#contact,
#tt-page-content > .tt-section:has(.tt-avards-list),
.tt-section.padding-top-xlg-120.no-padding-bottom.border-top {
  position: relative;
  z-index: 3;
  background-color: var(--tt-bg-color);
}

body.tt-lightmode #compositions,
body.tt-lightmode #tt-page-content > .tt-section:first-child,
body.tt-lightmode #biography,
body.tt-lightmode #cv,
body.tt-lightmode #news,
body.tt-lightmode #contact,
body.tt-lightmode #tt-page-content > .tt-section:has(.tt-avards-list),
body.tt-lightmode .tt-section.padding-top-xlg-120.no-padding-bottom.border-top {
  background-color: var(--tt-bg-color);
}

.jp-gallery-caption {
  text-align: center;
  padding: 12px 0 0;
}

.jp-gallery-title {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--tt-text-color);
}

.jp-gallery-medium {
  font-size: 0.75rem;
  color: var(--tt-text-muted-color);
  margin-top: 2px;
}


/* -----------------------------------------------
   News / Events Timeline
   ----------------------------------------------- */
.jp-events-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.jp-event-item {
  display: flex;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--tt-border-color);
  align-items: flex-start;
  transition: all 0.3s ease;
}

.jp-event-item:first-child {
  padding-top: 0;
}

.jp-event-date {
  min-width: 120px;
  font-family: var(--tt-alter-font);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tt-main-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.jp-event-content h4 {
  font-family: var(--tt-alter-font);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.jp-event-location {
  font-size: 0.85rem;
  color: var(--tt-text-muted-color);
}

.jp-event-description {
  font-size: 0.85rem;
  color: var(--tt-text-muted-color);
  margin-top: 8px;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .jp-event-item {
    flex-direction: column;
    gap: 8px;
  }
  .jp-event-date {
    min-width: auto;
  }
}


/* -----------------------------------------------
   CV Accordion
   ----------------------------------------------- */
.jp-cv-accordion {
  border-top: 1px solid var(--tt-border-color);
}

.jp-cv-section {
  border-bottom: 1px solid var(--tt-border-color);
}

.jp-cv-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
  cursor: pointer;
  transition: color 0.3s ease;
}

.jp-cv-header:hover {
  color: var(--tt-main-color);
}

.jp-cv-header h3 {
  font-family: var(--tt-alter-font);
  font-size: 1.3rem;
  font-weight: 600;
}

.jp-cv-toggle {
  width: 32px;
  height: 32px;
  border: 1px solid var(--tt-border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.jp-cv-section.open .jp-cv-toggle {
  transform: rotate(45deg);
  border-color: var(--tt-main-color);
  color: var(--tt-main-color);
}

.jp-cv-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.jp-cv-section.open .jp-cv-body {
  max-height: 2000px;
}

.jp-cv-body-inner {
  padding: 0 0 24px;
}

.jp-cv-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.jp-cv-list li {
  padding: 8px 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--tt-text-muted-color);
  border-bottom: 1px solid rgba(138, 133, 128, 0.15);
}

.jp-cv-list li:last-child {
  border-bottom: none;
}

.jp-cv-list .cv-year {
  display: inline-block;
  min-width: 45px;
  color: var(--tt-main-color);
  font-weight: 500;
  font-size: 0.8rem;
}


/* -----------------------------------------------
   Contact Section
   ----------------------------------------------- */
.jp-contact-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.jp-contact-links a {
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.jp-contact-links a:hover {
  color: var(--tt-main-color);
}


/* -----------------------------------------------
   Pull Quote
   ----------------------------------------------- */
.jp-pull-quote {
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.6;
  color: var(--tt-text-color);
  border-left: 3px solid var(--tt-main-color);
  padding-left: 24px;
  margin: 32px 0;
  max-width: 600px;
}

@media (max-width: 768px) {
  .jp-pull-quote {
    font-size: 1.1rem;
  }
}


/* -----------------------------------------------
   Biography — Text Reveal Contrast
   Body text needs higher contrast than headings
   for readability before the reveal animation.
   ----------------------------------------------- */
#biography .tt-col-lg-6 .tt-text-reveal > span {
  -webkit-text-fill-color: rgb(255 255 255 / 45%);
}

body.tt-lightmode #biography .tt-col-lg-6 .tt-text-reveal > span {
  -webkit-text-fill-color: rgb(0 0 0 / 35%);
}


/* -----------------------------------------------
   Contact Form
   ----------------------------------------------- */
.jp-contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.jp-form-group {
  position: relative;
}

.jp-form-input {
  width: 100%;
  padding: 14px 0;
  border: none;
  border-bottom: 1px solid var(--tt-border-color);
  background: transparent;
  color: var(--tt-text-color);
  font-family: var(--tt-body-font);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.3s ease;
  border-radius: 0;
  -webkit-appearance: none;
}

.jp-form-input::placeholder {
  color: var(--tt-text-muted-color);
}

.jp-form-input:focus {
  border-bottom-color: var(--tt-main-color);
}

select.jp-form-input {
  cursor: pointer;
}

select.jp-form-input option {
  background: var(--tt-bg-color);
  color: var(--tt-text-color);
}

textarea.jp-form-input {
  resize: vertical;
  min-height: 120px;
}

.jp-form-footer {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.jp-form-status {
  font-size: 0.85rem;
  margin: 0;
  transition: all 0.3s ease;
}

.jp-form-status.success {
  color: #5a9a6b;
}

.jp-form-status.error {
  color: var(--tt-main-color);
}

.jp-form-input:disabled,
button[type="submit"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* -----------------------------------------------
   Score Viewer (PDF.js)
   ----------------------------------------------- */
.jp-score-viewer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.97);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.jp-score-viewer.open {
  opacity: 1;
  visibility: visible;
}

.jp-score-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.jp-score-viewer-title {
  font-family: var(--tt-alter-font);
  font-size: 1.1rem;
  color: var(--tt-text-color);
}

.jp-score-viewer-close {
  background: none;
  border: none;
  color: var(--tt-text-color);
  font-size: 2rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.3s ease;
}

.jp-score-viewer-close:hover {
  color: var(--tt-main-color);
}

.jp-score-viewer-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px;
  -webkit-user-select: none;
  user-select: none;
}

.jp-score-viewer-body canvas {
  max-width: 100%;
  height: auto;
  box-shadow: 0 4px 40px rgba(0,0,0,0.5);
}

.jp-score-viewer-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}

.jp-score-prev,
.jp-score-next {
  background: none;
  border: 1px solid var(--tt-main-color);
  color: var(--tt-main-color);
  padding: 8px 20px;
  font-family: var(--tt-body-font);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.jp-score-prev:hover,
.jp-score-next:hover {
  background: var(--tt-main-color);
  color: #fff;
}

.jp-score-prev:disabled,
.jp-score-next:disabled {
  opacity: 0.3;
  cursor: default;
}

.jp-score-prev:disabled:hover,
.jp-score-next:disabled:hover {
  background: none;
  color: var(--tt-main-color);
}

.jp-score-page-info {
  font-size: 0.9rem;
  color: var(--tt-text-muted-color);
  font-variant-numeric: tabular-nums;
}

.jp-score-zoom-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 24px;
  padding-left: 24px;
  border-left: 1px solid rgba(255,255,255,0.12);
}

.jp-score-zoom-in,
.jp-score-zoom-out {
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--tt-text-muted-color);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.jp-score-zoom-in:hover,
.jp-score-zoom-out:hover {
  border-color: var(--tt-main-color);
  color: var(--tt-main-color);
}

.jp-score-zoom-in:disabled,
.jp-score-zoom-out:disabled {
  opacity: 0.3;
  cursor: default;
}

.jp-score-zoom-level {
  font-size: 0.85rem;
  color: var(--tt-text-muted-color);
  min-width: 45px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 600px) {
  .jp-score-viewer-controls {
    flex-wrap: wrap;
    gap: 12px;
  }
  .jp-score-zoom-controls {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    width: 100%;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .jp-score-viewer-header {
    padding: 12px 16px;
  }
  .jp-score-viewer-body {
    padding: 12px;
  }
}


/* -----------------------------------------------
   Score Request Form (inside modal)
   ----------------------------------------------- */
.jp-score-request {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--tt-border-color);
}

.jp-score-request-heading {
  font-family: var(--tt-alter-font);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.jp-score-request-intro {
  color: var(--tt-text-muted-color);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.jp-score-request-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.jp-score-request-form input,
.jp-score-request-form textarea {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--tt-border-color);
  color: var(--tt-text-color);
  font-family: var(--tt-body-font);
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s ease;
  border-radius: 0;
  -webkit-appearance: none;
}

.jp-score-request-form input:focus,
.jp-score-request-form textarea:focus {
  border-bottom-color: var(--tt-main-color);
}

.jp-score-request-form input::placeholder,
.jp-score-request-form textarea::placeholder {
  color: var(--tt-text-muted-color);
}

.jp-score-request-form textarea {
  resize: vertical;
  min-height: 60px;
}

.jp-score-request-footer {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.jp-score-request-status {
  font-size: 0.85rem;
  margin: 0;
  min-height: 1.2em;
}

.jp-score-request-status.success {
  color: #5a9a6b;
}

.jp-score-request-status.error {
  color: var(--tt-main-color);
}


/* -----------------------------------------------
   Scrollbar (subtle)
   ----------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--tt-bg-color);
}

::-webkit-scrollbar-thumb {
  background: var(--jp-warm-grey);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tt-main-color);
}
