/* Chain Strays -- Municipal case file aesthetic */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; max-width: 100vw; }
body {
  background: #d4c9a8;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(0,0,0,.03) 28px, rgba(0,0,0,.03) 29px);
  font: 15px/1.7 "Courier New", Courier, monospace;
  color: #2c2416;
  padding: 48px 16px;
}
img { image-rendering: pixelated; max-width: 100%; }
a { color: #5c4a2a; }

.notice {
  max-width: 760px;
  margin: 0 auto;
  background: #f4f0e4;
  padding: 64px 72px 48px;
  box-shadow: 0 2px 20px rgba(0,0,0,.2);
  border: 1px solid #c4b898;
  position: relative;
  overflow: hidden;
}
.notice::before {
  content: "";
  position: absolute;
  top: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  border: 3px solid #8b0000;
  border-radius: 50%;
  opacity: 0.15;
}

.stamp {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8b0000;
  border: 2px solid #8b0000;
  display: inline-block;
  padding: 4px 12px;
  transform: rotate(-2deg);
  margin-bottom: 12px;
}
.dept {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8a7d65;
  margin-bottom: 24px;
}

header { text-align: center; border-bottom: 2px solid #2c2416; padding-bottom: 34px; }
h1 { font-size: 22px; margin-top: 12px; font-weight: bold; letter-spacing: 1px; }
.subtitle { font-size: 13px; margin-top: 8px; color: #5c4a2a; }

.hero-lineup {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 24px auto 0;
  flex-wrap: wrap;
}
.hero-lineup img {
  width: 96px;
  height: 96px;
  border: 1px solid #c4b898;
  image-rendering: pixelated;
}

.figcap { font-size: 11px; color: #8a7d65; margin-top: 8px; }
.ca { 
  margin-top: 16px; 
  font-size: 12px; 
  word-break: break-all; 
  background: #e8e2d0;
  padding: 6px 12px;
  border: 1px dashed #c4b898;
}

section { margin-top: 40px; }
h2 { 
  font-size: 16px; 
  font-weight: bold; 
  margin-bottom: 12px; 
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid #c4b898;
  padding-bottom: 4px;
}
section p { margin-bottom: 12px; text-align: justify; }
section ul { list-style: none; }
section li { margin-bottom: 10px; text-align: justify; }
section li::before { content: "\00A7\0020"; color: #8a7d65; }

/* Fee table */
.fee-table {
  margin: 20px 0;
  border: 1px solid #c4b898;
  font-size: 13px;
  overflow-x: auto;
}
.fee-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  border-bottom: 1px solid #e0dac8;
  min-width: 0;
}
.fee-row.header {
  background: #2c2416;
  color: #f4f0e4;
  font-weight: bold;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.fee-row.final { background: #e8e2d0; font-weight: bold; }
.fee-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fee-row span:last-child { text-align: right; flex: 0.6; }
.status-open { color: #2e7d32; font-weight: bold; }
.status-locked { color: #8a7d65; }
.status-done { color: #8b0000; text-decoration: line-through; }

.note {
  font-size: 12px;
  color: #8a7d65;
  font-style: italic;
}

/* Adopt panel */
.adopt-panel {
  margin-top: 28px;
  border: 2px solid #2c2416;
  padding: 28px;
  text-align: center;
  background: #ede8d8;
}
.pound-status { margin-bottom: 20px; }
.big-number {
  font-size: 64px;
  font-weight: bold;
  line-height: 1;
  color: #2c2416;
}
.big-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #8a7d65;
  margin-top: 4px;
}
.fee-now {
  margin-top: 10px;
  font-size: 13px;
  color: #5c4a2a;
}

.claimbox { margin-top: 16px; }
button {
  background: #2c2416;
  color: #f4f0e4;
  border: 0;
  font: bold 14px "Courier New", Courier, monospace;
  padding: 14px 28px;
  margin: 6px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
}
button:hover { background: #4a3a22; }
button:disabled { opacity: .35; cursor: default; }
#claimStatus {
  margin-top: 12px;
  min-height: 22px;
  font-size: 13px;
  color: #8b0000;
  text-align: center;
  word-break: break-word;
}

/* Grids */
.grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}
.dog { width: 100px; position: relative; text-align: center; }
.rare-grid .dog { width: 120px; }
.rare-grid .dog img { width: 120px; height: 120px; }
.dog img { 
  width: 100px; 
  height: 100px; 
  display: block; 
  border: 1px solid #c4b898; 
}
.dog .nm { font-size: 10px; margin-top: 3px; }
.dog .rr { font-size: 9px; color: #8b0000; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.dog .ow { font-size: 8px; color: #8a7d65; word-break: break-all; }
.dog.claimed img { outline: 3px solid #2e7d32; }
.dog .adopted {
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  font: bold 8px "Courier New", monospace;
  letter-spacing: 2px;
  color: #f4f0e4;
  background: #2e7d32;
  padding: 2px 0;
  transform: rotate(-8deg);
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.pagination button {
  padding: 6px 12px;
  font-size: 12px;
  min-width: 36px;
}
.pagination button.active {
  background: #5c4a2a;
  outline: 2px solid #2c2416;
}

.empty-msg {
  text-align: center !important;
  color: #8a7d65;
  font-style: italic;
  font-size: 13px;
}

/* Footer */
footer {
  margin-top: 48px;
  text-align: center;
  border-top: 2px solid #2c2416;
  padding-top: 20px;
}
.seal {
  font-size: 10px;
  letter-spacing: 3px;
  color: #8a7d65;
  margin-bottom: 12px;
}
.links { font-size: 13px; }
.links a, .links span { margin: 0 10px; }

/* Mobile */
@media (max-width: 640px) {
  body { padding: 16px 8px; }
  .notice { padding: 24px 14px 20px; }
  h1 { font-size: 15px; letter-spacing: 0; }
  .subtitle { font-size: 10px; }
  .dept { font-size: 7px; letter-spacing: 1px; margin-bottom: 12px; }
  .stamp { font-size: 8px; padding: 3px 8px; }
  h2 { font-size: 12px; }
  section p, section li { font-size: 12px; line-height: 1.5; }
  .hero-lineup img { width: 56px; height: 56px; }
  .hero-lineup { gap: 4px; }
  .fee-table { font-size: 10px; }
  .fee-row { padding: 6px 6px; }
  .fee-row.header { font-size: 8px; letter-spacing: 0; }
  .fee-row span { font-size: 10px; }
  .big-number { font-size: 42px; }
  .big-label { font-size: 10px; letter-spacing: 2px; }
  .adopt-panel { padding: 16px 10px; }
  button { padding: 12px 16px; font-size: 11px; letter-spacing: 0; }
  .note { font-size: 10px; }
  .ca { font-size: 9px; padding: 4px 6px; }
  .dog { width: 64px; }
  .dog img { width: 64px; height: 64px; }
  .rare-grid .dog { width: 80px; }
  .rare-grid .dog img { width: 80px; height: 80px; }
  .dog .nm { font-size: 8px; }
  .dog .rr { font-size: 7px; letter-spacing: 0; }
  .grid { gap: 6px; }
  .notice::before { display: none; }
  .fee-now { font-size: 11px; }
  .figcap { font-size: 9px; }
  footer { margin-top: 28px; }
  .seal { font-size: 8px; letter-spacing: 2px; }
  .links { font-size: 11px; }
}

@media (max-width: 380px) {
  .hero-lineup img { width: 48px; height: 48px; }
  .fee-row span:first-child { flex: 1.2; }
  .dog { width: 56px; }
  .dog img { width: 56px; height: 56px; }
  .rare-grid .dog { width: 68px; }
  .rare-grid .dog img { width: 68px; height: 68px; }
}
