@import url('https://fonts.googleapis.com/css2?family=Jacquard+12&family=Pixelify+Sans:wght@400..700&display=swap');

/* ---------- scrollbar ---------- */
::-webkit-scrollbar { width: 12px; }
::-webkit-scrollbar:horizontal { height: 12px; }
::-webkit-scrollbar-corner { background: #ffe3ef; }
::-webkit-scrollbar-track { background: linear-gradient(90deg, #ffd6e8, #fff0f6 20%); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #ffc2dc 45%, #ff8fbb 0, #ff5fa2);
  border: 1.5px solid #d6417d;
}
::-webkit-scrollbar-button { display: none; }

/* ---------- base ---------- */
* { box-sizing: border-box; }

html { font-size: clamp(14px, 1.6vw + 8px, 16px); }

body {
  margin: 0;
  padding: clamp(0.5rem, 2vw, 1.25rem) 0;
  color: #7a1249;
  font-family: 'Pixelify Sans', 'Courier New', Courier, monospace;
  text-align: center;
  background-color: #ffeaf3;
  background-image: url("https://64.media.tumblr.com/d7472374d6ef49b526afb812e13fd7e5/tumblr_inline_ml7yypi95s1qz4rgp.png");
  background-repeat: repeat;
}

a { color: #d6417d; }

/* ---------- shell ---------- */
.main-box {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: clamp(0.4rem, 1.2vw, 0.6rem);
  border: 3px solid #ff5fa2;
  margin: auto;
  min-height: 0;
  width: min(920px, 100% - 1.25rem);
  padding: clamp(0.4rem, 1.2vw, 0.6rem);
  background-color: #fff5fa;
  background-image: url("https://64.media.tumblr.com/4d6e0be2aad437bd24591c7096a7cda7/tumblr_inline_ml9dstLHNt1qz4rgp.png");
  background-repeat: repeat;
  box-shadow: 0 0 0 6px #fff, 0 0 0 8px #ff9fc4;
}

.headers {
  border-bottom: 3px solid #ff5fa2;
  background-color: #ff6fa8;
  background-image: url("https://64.media.tumblr.com/a6ef50fc47938ce42603a535c699ab7c/tumblr_inline_ml2hczr0IT1rfdbtm.gif");
  color: #fff;
  font-weight: bold;
  font-size: clamp(0.95rem, 1.1rem + 0.8vw, 1.5rem);
  letter-spacing: 1px;
  padding: 0.5rem 0.25rem;
  text-shadow: 1px 1px 0 #d6417d;
  font-family: 'Jacquard 12', system-ui;
}

.headers img { vertical-align: middle; height: 1.5rem; margin-right: 6px; }

/* ---------- left ---------- */
.showcase {
  border: 3px solid #ff5fa2;
  flex: 1 1 240px;
  max-width: 19rem;
  min-height: 0;
  background-color: #fff0f6;
  background-image: url("https://64.media.tumblr.com/b02536e804c11979d269d02b5e0e9588/tumblr_inline_mm1ahphf5I1qz4rgp.gif");
  background-repeat: repeat;
  overflow: auto;
  padding-bottom: 1rem;
}

.polaroid {
  width: min(14.5rem, 88%);
  margin: 1.25rem auto 0.4rem;
  background: #fffdfa;
  padding: 0.6rem 0.6rem 1.4rem;
  border: 1px solid #f0c4d8;
  box-shadow: 0 6px 14px rgba(122, 18, 73, 0.25);
  transform: rotate(-2.5deg);
  position: relative;
}

.polaroid .tape {
  position: absolute;
  top: -0.9rem;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 4.5rem;
  height: 1.6rem;
  background: repeating-linear-gradient(135deg, #ffd6e8, #ffd6e8 4px, #ffc2dc 4px, #ffc2dc 8px);
  opacity: 0.85;
  border: 1px solid rgba(214, 65, 125, 0.35);
}

.polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background-color: #ffc2dc;
}

.polaroid figcaption {
  margin-top: 0.5rem;
  font-family: 'Jacquard 12', system-ui;
  font-size: 1rem;
  color: #d6417d;
  letter-spacing: 1px;
}

.showcase-note {
  width: min(14.5rem, 88%);
  margin: 0.6rem auto 0;
  font-size: 0.7rem;
  line-height: 1.45;
  color: #e87aaa;
  text-align: left;
}

.slots-open {
  width: min(14.5rem, 88%);
  margin: 0.7rem auto 0;
  padding: 0.4rem 0.6rem;
  border: 2px dashed #ff5fa2;
  background: #ffffff;
  font-size: 0.75rem;
  text-align: left;
  color: #b5366e;
}
.slots-open b { color: #d6417d; }

/* ---------- right column ---------- */
.info-col {
  flex: 2 1 360px;
  display: flex;
  flex-direction: column;
  gap: clamp(0.4rem, 1.2vw, 0.6rem);
}

.info-col > .headers { border: 3px solid #ff5fa2; }

.intro-box {
  border: 2px dashed #ff5fa2;
  background: #ffffff;
  padding: 0.6rem 0.75rem;
  font-size: clamp(0.68rem, 0.55rem + 0.35vw, 0.8rem);
  line-height: 1.5;
  text-align: left;
}

/* ---------- ledger / receipt ---------- */
.ledger-frame {
  border: 3px solid #ff5fa2;
  background: #fff0f6;
  padding: 0.55rem 0.55rem 0.35rem;
}

.ledger-title {
  font-family: 'Jacquard 12', system-ui;
  font-size: 1.1rem;
  color: #d6417d;
  text-align: left;
  padding: 0 0.2rem 0.35rem;
  border-bottom: 2px dashed #ff9fc4;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.ledger-title span {
  font-family: 'Pixelify Sans', monospace;
  font-size: 0.65rem;
  color: #e87aaa;
  letter-spacing: 0.5px;
}

.receipt {
  background: #fffdfb;
  border: 1px solid #f0c4d8;
  box-shadow: 0 3px 10px rgba(122, 18, 73, 0.15);
  padding-top: 0.6rem;
  position: relative;
  mask-image: radial-gradient(circle 6px at 6px 0, transparent 6px, black 6.5px);
  mask-size: 12px 100%;
  mask-repeat: repeat-x;
  mask-position: top left;
  -webkit-mask-image: radial-gradient(circle 6px at 6px 0, transparent 6px, black 6.5px);
  -webkit-mask-size: 12px 100%;
  -webkit-mask-repeat: repeat-x;
  -webkit-mask-position: top left;
}

.ledger-scroll {
  max-height: 13.5rem;
  overflow-y: auto;
  overflow-x: auto;
}

table.ledger {
  width: 100%;
  min-width: 24rem;
  border-collapse: collapse;
  font-size: 0.68rem;
}

table.ledger thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffe3ee;
  color: #b5366e;
  font-family: 'Pixelify Sans', monospace;
  font-weight: bold;
  text-align: left;
  padding: 0.4rem 0.5rem;
  border-bottom: 2px dashed #ff9fc4;
  letter-spacing: 0.5px;
  text-transform: lowercase;
}

table.ledger tbody td {
  padding: 0.4rem 0.5rem;
  border-bottom: 1px dashed #ffd6e8;
  color: #7a1249;
  vertical-align: middle;
}

table.ledger tbody tr:hover { background: #fff0f6; }

table.ledger td.client { font-weight: bold; color: #b5366e; }
table.ledger td.piece { color: #e87aaa; font-size: 0.7rem; }

.stamp {
  display: inline-block;
  font-family: 'Pixelify Sans', monospace;
  font-weight: 700;
  font-size: 0.65rem;
  letter-spacing: 0.5px;
  padding: 0.15rem 0.45rem;
  border: 2px solid currentColor;
  border-radius: 3px;
  transform: rotate(-4deg);
  text-transform: uppercase;
  white-space: nowrap;
}

.stamp.paid { color: #3f8f5f; background: rgba(63, 143, 95, 0.08); }
.stamp.unpaid { color: #cf5b3a; background: rgba(207, 91, 58, 0.08); }
.stamp.partial { color: #c98a2e; background: rgba(201, 138, 46, 0.08); }

.stamp.done { color: #3f8f5f; background: rgba(63, 143, 95, 0.08); }
.stamp.progress { color: #c98a2e; background: rgba(201, 138, 46, 0.08); }
.stamp.queued { color: #a56ca0; background: rgba(165, 108, 160, 0.08); }

.receipt-foot {
  text-align: left;
  font-size: 0.65rem;
  color: #e2a9c3;
  padding: 0.4rem 0.6rem 0.2rem;
  border-top: 1px dashed #ffd6e8;
}

/* ---------- quick links ---------- */
.links-box {
  border: 2px dashed #ff5fa2;
  background: #ffffff;
  padding: 0.6rem 0.7rem;
}

.links-box .ledger-title { border-bottom: 2px dashed #ff9fc4; }

.link-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.4rem 0.2rem;
  border-bottom: 1px dashed #ffe3ee;
  text-align: left;
}
.link-row:last-child { border-bottom: none; }

.link-row img { width: 15px; height: 15px; margin-top: 2px; image-rendering: pixelated; flex-shrink: 0; }

.link-row a {
  font-weight: bold;
  font-size: 0.8rem;
  text-decoration: none;
}
.link-row a:hover { color: #b5366e; }

.link-row .desc { display: block; font-size: 0.68rem; color: #e2a9c3; margin-top: 1px; }

.home-link {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 6px 16px;
  border: 2px dashed #ff5fa2;
  background: #fffafc;
  font-size: 0.75rem;
  text-decoration: none;
  color: #b5366e;
  font-weight: bold;
}
.home-link:hover { background: #ff9fc4; color: #fff; }

/* ---------- responsive ---------- */
@media (max-width: 42rem) {
  .main-box { width: 100%; min-height: 0; }
  .showcase { flex-basis: 100%; max-width: none; }
  .info-col { flex-basis: 100%; }
  .ledger-scroll { max-height: 13rem; }
}

@media (max-width: 30rem) {
  .home-link { display: block; text-align: center; }
  table.ledger { min-width: 22rem; }
}
