* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --font-title: "steinzeit", sans-serif;
  --font-titlefill: "steinzeit-fill-in", sans-serif;
  --font-body: "didactica", sans-serif;
  --font-body2: "chikki-devanagari", sans-serif;
  --font-italic: "meno-text", serif;
  --font-price: "video", serif;
  --font-squiggle: "comba", sans-serif;
}

body {
  color: #000;
  font-family: var(--font-body2);
  font-size: 15px;
  line-height: 1;
  background-size: 20px 20px;
  background-image:
    linear-gradient(to right, rgba(0, 221, 255, 0.8) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 221, 255, 0.8) 1px, transparent 1px);
}


a { color: #000; }

/* Header */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 2rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
 }

.header-eyebrow {
  font-family: var(--font-titlefill);
  font-size: clamp(1rem, 8vw, 8rem);
  color: #e9f312;
  z-index: 1;
  white-space: nowrap;
  position: relative;
  display: inline-block;
}

.header-eyebrow::after {
  content: attr(data-text);
  font-family: var(--font-title);
  color: #154af6;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.header-title {
  font-family: var(--font-title);
  font-size: clamp(1rem, 14vw, 8rem);
  font-weight: 100;
  color: #f60ccb;
  white-space: nowrap;
}
.header-subtitle { 
  font-family: var(--font-titlefill);
  color: #00f63c;
  font-size: clamp(0.9rem, 4vw, 3rem);
  text-align: center;
 }
 
.grid {
   position: absolute;
   inset: 0;
   height: 100%;
   width: 100%;
   background-image: linear-gradient(to right, #80808012 1px, transparent 1px),
     linear-gradient(to bottom, #80808012 1px, transparent 1px);
   background-size: 24px 24px;
 }

/* Filter bar */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.sort-select {
  background: white;
  border: 1px solid #000;
  border-radius: 0;
  padding: 0.3rem 0.85rem;
  padding-right: 2rem;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font-body);
  text-transform: uppercase;
  font-weight: bold;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.65rem center;
}

.status-filter { display: flex; gap: 0.5rem; }

.filter-bar-left { display: flex; margin-right: auto; }
.your-items-btn {
  text-decoration: none;
  background: white;
  border: 1px solid #000;
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  font-family: var(--font-body2);
  text-transform: uppercase;
  font-weight: bold;
}
.your-items-btn:hover { background: #00f63c;}

/* Grid */
#registry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.registry-card {
  background: #fff;
  display: flex;
  flex-direction: column;
  border: 2px solid #000000;
  overflow: hidden;
}



.registry-card.is-claimed { background: #f5f5f5; }

/* Image */
.card-image-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #ffffff;
}


.card-image { width: 100%; height: 100%; object-fit: contain; display: block; }
.is-claimed .card-image { opacity: 0.5; }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #aaa;
}

/* Body */
.card-body { 
  padding: 0.85rem 1rem; 
  flex: 1; 
  display: flex; 
  flex-direction: column; 
  gap: 0.3rem;
 }
.card-price { 
  font-family: var(--font-price);
  font-weight: bold; 
  font-size: 1.25rem;
 }
.card-name { 
  font-weight: bold; 
  font-size: 1rem;
  text-transform: uppercase;
 }
.is-claimed .card-name, .is-claimed .card-price { 
  color: #999;
 }
.card-notes {
  font-size: 0.85rem;
  color: #555;
  flex: 1; }
.card-qty { font-size: 0.8rem; color: #888; margin-top: 0.2rem; }

/* Footer */
.card-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid #eee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.is-claimed .card-footer { border-top-color: transparent; }

.card-link { font-size: 0.82rem; text-decoration: underline; color: #000; }
.card-link:hover { color: #00f63c; }

.claim-btn {
  background: #000;
  color: #fff;
  font-family: var(--font-body2);
  border: none;
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  cursor: pointer;
}

.claim-btn:hover { 
  background: #00f63c;
  
 }

.claimed-badge { font-size: 0.78rem; color: #999; }

/* Empty/loading */
.registry-empty { grid-column: 1 / -1; background: #fff; padding: 3rem; text-align: center; color: #555; }

.skeleton-card { background: #fff; }
.skeleton-img { width: 100%; aspect-ratio: 4/3; background: #eee; animation: shimmer 1.2s infinite; }
.skeleton-body { padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.skeleton-line { height: 0.8rem; background: #eee; animation: shimmer 1.2s infinite; }
.skeleton-line.short { width: 35%; }
.skeleton-line.medium { width: 65%; }

@keyframes shimmer { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* Modal */
dialog {
  border: 1px solid #000;
  padding: 2rem;
  width: min(460px, calc(100vw - 2rem));
  background: #fff;
  margin: auto;
}

dialog::backdrop { background: rgba(0,0,0,0.4); }

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
}

dialog h2 { font-size: 1.2rem; font-weight: bold; margin-bottom: 0.25rem; }
.modal-item-name { color: #555; font-size: 0.9rem; margin-bottom: 1.25rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }

.form-label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: #555;
  margin-bottom: 0.75rem;
}

.form-label input,
.form-label textarea {
  border: 1px solid #000;
  padding: 0.5rem 0.7rem;
  font-size: 0.95rem;
  font-family: sans-serif;
  color: #000;
  background: #fff;
  outline: none;
  width: 100%;
  resize: vertical;
}

.form-label input:focus,
.form-label textarea:focus { outline: 2px solid #000; }

.form-note { font-size: 0.78rem; color: #888; margin-bottom: 1rem; }

.modal-error { background: #fee; color: #900; padding: 0.5rem 0.75rem; font-size: 0.85rem; margin-bottom: 1rem; }

.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; }

.btn-primary {
  background: #000;
  color: #fff;
  border: none;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  font-family: sans-serif;
  cursor: pointer;
}

.btn-primary:hover:not(:disabled) { background: #333; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  background: #fff;
  color: #000;
  border: 1px solid #000;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-family: sans-serif;
  cursor: pointer;
}

.btn-secondary:hover { background: #f0f0f0; }

/* Toast */
#toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: #000;
  color: #fff;
  padding: 0.6rem 1.25rem;
  font-size: 0.88rem;
  z-index: 1000;
  white-space: nowrap;
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 2rem;
  color: #555;
  font-size: 0.85rem;
  border-top: 1px solid #000;
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 600px) {
  .site-header { padding: 2rem 1.25rem 1.5rem; }
  #registry-grid { padding: 0.75rem; gap: 0.75rem; grid-template-columns: repeat(2, 1fr); }
  .filter-bar { padding: 0.75rem 1.25rem; }
  .card-body { padding: 0.6rem 0.75rem; }
  .card-price { font-size: 1.1rem; }
  .card-name { font-size: 0.8rem; }
  .card-notes { font-size: 0.75rem; }
  .card-footer { padding: 0.5rem 0.75rem; }
  .card-link { font-size: 0.68rem; }
  .claim-btn { font-size: 0.68rem; padding: 0.4rem 0.6rem; }
  .form-row { grid-template-columns: 1fr; }
  dialog { padding: 1.25rem; }
}
