@font-face {
  font-family: 'Amstrad';
  src: url('../fonts/Ac437_Amstrad_PC-2y.ttf') format('truetype');
}

html, body {
  overflow-y: auto !important;
  height: auto !important;
  margin: 0;
  padding: 0;
  font-family: 'Amstrad', monospace;
}

#backbutton {
  position: fixed;
  top: 16px;
  left: 20px;
  font-family: 'Amstrad', monospace;
  font-size: 1rem;
  color: #000;
  text-decoration: none;
  z-index: 999;
  background: rgba(255,255,255,0.6);
  padding: 4px 10px;
  border: 1.5px solid #333;
}

#backbutton:hover {
  background: rgba(255,255,255,0.9);
}

#decor-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px 80px 40px;
}

/* ── section ── */
.decor-section {
  margin-bottom: 60px;
}

.decor-section h2 {
  font-size: 1.2rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  border-bottom: 1px solid #333;
  padding-bottom: 6px;
}

/* ── 3-column grid ── */
.decor-group {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.decor-item {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.decor-item:hover {
  transform: rotate(1deg);
}

.decor-item img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
}

/* ── modal ── */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 1000;
}

#modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1001;
  background: rgba(255,255,255,0.97);
  border: 2px solid #333;
  padding: 16px;
  width: 85vw;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#modal-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#modal-name {
  font-size: 1rem;
  text-transform: lowercase;
  letter-spacing: 0.05em;
  font-weight: normal;
}

#modal-close {
  font-family: 'Amstrad', monospace;
  font-size: 0.8rem;
  border: 1.5px solid #333;
  background: transparent;
  padding: 2px 8px;
  cursor: pointer;
}

#modal-close:hover {
  background: #000;
  color: #fff;
}

#modal-img-wrap {
  width: 100%;
  height: 60vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  border: 1px solid #ccc;
  background: #f5f5f0;
}

#modal-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  user-select: none;
  pointer-events: none;
}

#modal-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

#zoom-label {
  font-family: 'Amstrad', monospace;
  font-size: 0.8rem;
  color: #444;
  min-width: 40px;
}

#zoom-slider {
  flex: 1;
  accent-color: #333;
  cursor: pointer;
}

#zoom-reset {
  font-family: 'Amstrad', monospace;
  font-size: 0.8rem;
  border: 1.5px solid #333;
  background: transparent;
  padding: 2px 10px;
  cursor: pointer;
}

#zoom-reset:hover {
  background: #000;
  color: #fff;
}

#modal-notes {
  font-family: 'Amstrad', monospace;
  font-size: 0.85rem;
  color: #444;
  line-height: 1.6;
  min-height: 1em;
}

.hidden {
  display: none !important;
}