@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --red: #EB2030;
  --blue: #97D7FF;
  --yellow: #FBF2B3;
  --purple: #312D52;
  --sage: #A8B89F;
  --white: #FFFDF8;
  --black: #17151C;
  --pink: #F7C8D0;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Poppins', sans-serif;
  color: var(--purple);
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.9) 0 2px, transparent 3px),
    radial-gradient(circle at 84% 72%, rgba(255,255,255,.8) 0 2px, transparent 3px),
    var(--yellow);
  background-size: 75px 75px, 95px 95px;
}

a { color: inherit; text-decoration: none; }

.site {
  width: min(1180px, calc(100% - 28px));
  margin: 24px auto 50px;
}

.topbar {
  background: var(--purple);
  color: white;
  border: 3px solid var(--black);
  box-shadow: 7px 7px 0 var(--red);
  padding: 11px 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .6px;
}

.nav { display: flex; gap: 15px; flex-wrap: wrap; }
.nav a:hover { color: var(--blue); }

.hero {
  margin: 25px 0;
  background: var(--white);
  border: 3px solid var(--black);
  padding: 34px 28px;
  position: relative;
  box-shadow: 9px 9px 0 var(--blue);
}

.hero h1 {
  margin: 0;
  color: var(--red);
  font-size: clamp(42px, 8vw, 82px);
  line-height: .95;
  letter-spacing: -3px;
  font-weight: 800;
}

.hero p {
  max-width: 650px;
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.8;
}

.sticker {
  position: absolute;
  right: 28px;
  top: 24px;
  background: var(--blue);
  color: var(--purple);
  border: 3px solid var(--black);
  padding: 13px 15px;
  transform: rotate(7deg);
  font-weight: 700;
  font-size: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 36px 0 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: var(--purple);
}

.section-title span {
  font-size: 11px;
  background: var(--red);
  color: white;
  padding: 6px 10px;
  border: 2px solid var(--black);
  font-weight: 700;
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.month-card {
  min-height: 145px;
  padding: 18px;
  border: 3px solid var(--black);
  background: var(--white);
  position: relative;
  transition: .18s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.month-card:nth-child(4n+1) { background: var(--red); color: white; }
.month-card:nth-child(4n+2) { background: var(--blue); }
.month-card:nth-child(4n+3) { background: var(--sage); }
.month-card:nth-child(4n) { background: var(--white); }

.month-card:hover {
  transform: translate(-4px, -5px) rotate(-1deg);
  box-shadow: 7px 7px 0 var(--purple);
}

.month-card .num {
  font-size: 11px;
  font-weight: 700;
  opacity: .75;
}

.month-card h3 {
  margin: 0;
  font-size: 29px;
  line-height: 1;
  font-weight: 800;
  text-transform: lowercase;
}

.month-card .arrow {
  align-self: flex-end;
  font-size: 22px;
  font-weight: 800;
}

.home-columns {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 22px;
  align-items: start;
}

.panel {
  background: var(--white);
  border: 3px solid var(--black);
  box-shadow: 7px 7px 0 var(--sage);
  padding: 22px;
}

.bag-area {
  height: 430px;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(151,215,255,.28) 1px, transparent 1px),
    linear-gradient(90deg, rgba(151,215,255,.28) 1px, transparent 1px),
    #fff;
  background-size: 22px 22px;
  border: 3px dashed var(--purple);
}

.bag-note {
  font-size: 11px;
  line-height: 1.6;
  margin: 0 0 12px;
}

.bag-item {
  position: absolute;
  width: 120px;
  min-height: 110px;
  background: var(--yellow);
  border: 3px solid var(--black);
  padding: 7px;
  cursor: grab;
  user-select: none;
  box-shadow: 4px 4px 0 var(--red);
}

.bag-item:active { cursor: grabbing; }

.bag-item img {
  width: 100%;
  height: 78px;
  object-fit: cover;
  display: block;
  border: 2px solid var(--black);
  background: var(--pink);
}

.bag-item .caption {
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  margin-top: 5px;
}

.upload-note {
  margin-top: 10px;
  font-size: 10px;
  color: #665f76;
}

.diary-preview {
  background: var(--purple);
  color: white;
  border: 3px solid var(--black);
  padding: 22px;
  min-height: 430px;
  position: relative;
}

.diary-preview h3 {
  margin: 0 0 15px;
  color: var(--yellow);
  font-size: 28px;
}

.diary-preview p {
  font-size: 13px;
  line-height: 1.9;
}

.tiny-heart { color: var(--red); }

.footer {
  margin-top: 32px;
  text-align: center;
  font-size: 10px;
  line-height: 1.8;
}

/* Month pages */

.back {
  display: inline-block;
  background: var(--blue);
  border: 2px solid var(--black);
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 15px;
}

.month-hero {
  background: var(--red);
  color: white;
  border: 3px solid var(--black);
  box-shadow: 8px 8px 0 var(--purple);
  padding: 26px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}

.month-hero h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 62px);
  line-height: .95;
  font-weight: 800;
}

.month-hero p {
  margin: 8px 0 0;
  font-size: 12px;
}

.month-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.month-nav a {
  background: var(--yellow);
  color: var(--purple);
  border: 2px solid var(--black);
  padding: 7px 9px;
  font-size: 10px;
  font-weight: 700;
}

.calendar-wrap {
  margin-top: 25px;
  background: var(--white);
  border: 3px solid var(--black);
  padding: 18px;
  box-shadow: 7px 7px 0 var(--blue);
}

.weekdays, .calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
}

.weekday {
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  padding: 8px 0;
  color: var(--red);
}

.date {
  min-height: 105px;
  background: var(--blue);
  border: 2px solid var(--purple);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: .18s ease;
}

.date:hover {
  transform: translateY(-3px);
  box-shadow: 3px 4px 0 var(--red);
}

.date.empty {
  background: #f4f1e7;
  border-color: #c9c5b8;
  cursor: default;
}

.date.empty:hover { transform: none; box-shadow: none; }

.date-number {
  position: absolute;
  left: 6px;
  top: 5px;
  z-index: 2;
  background: var(--yellow);
  border: 1px solid var(--black);
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 800;
}

.date-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.date.has-entry::before {
  content: "♥";
  position: absolute;
  right: 5px;
  top: 4px;
  z-index: 3;
  color: var(--red);
  font-size: 12px;
}

.entry-area {
  margin-top: 28px;
}

.entry-card {
  background: var(--yellow);
  border: 3px solid var(--black);
  box-shadow: 7px 7px 0 var(--red);
  padding: 20px;
}

.entry-card .date-label {
  font-size: 10px;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 1px;
}

.entry-card .entry-text {
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 2;
}

.entry-card .entry-text p {
  margin: 10px 0 0;
  white-space: pre-wrap;
}
.entry-card .entry-text p:first-child { margin-top: 10px; }

.hover-instruction {
  font-size: 10px;
  margin-top: 13px;
  color: #716b72;
}

/* Modal */

.modal {
  display: none;
  position: fixed;
  z-index: 100;
  inset: 0;
  background: rgba(49,45,82,.72);
  padding: 20px;
  overflow-y: auto;
  place-items: center;
}

.modal.show { display: grid; }

.modal-box {
  width: min(700px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--white);
  border: 3px solid var(--black);
  box-shadow: 10px 10px 0 var(--red);
  padding: 24px;
  position: relative;
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 8px;
  z-index: 2;
  border: 2px solid var(--black);
  background: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

.modal-box h2 { margin-top: 0; color: var(--red); }

.modal-box img {
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  background: var(--yellow);
  border: 2px solid var(--black);
}

.modal-box p {
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1.9;
  white-space: pre-wrap;
}

/* Responsive */

@media (max-width: 850px) {
  .month-grid { grid-template-columns: repeat(2, 1fr); }
  .home-columns { grid-template-columns: 1fr; }
  .sticker { position: static; display: inline-block; margin-top: 18px; }
}

@media (max-width: 560px) {
  .site { width: min(100% - 16px, 1180px); }
  .topbar { flex-direction: column; align-items: flex-start; }
  .month-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .month-card { min-height: 120px; padding: 13px; }
  .month-card h3 { font-size: 22px; }
  .calendar-wrap { padding: 8px; }
  .weekdays, .calendar { gap: 3px; }
  .date { min-height: 60px; }
  .weekday { font-size: 8px; }
  .month-hero { display: block; }
  .month-nav { margin-top: 18px; }
}

/* =====================================================
   CORKBOARD HOME
===================================================== */

.corkboard-hero { margin: 22px 0 8px; }

.board-frame {
  border: 3px solid var(--black);
  box-shadow: 9px 9px 0 var(--blue);
  padding: 16px;
  background:
    repeating-linear-gradient(90deg, #a9724a 0 26px, #9a6640 26px 30px);
}

/* Deliberately short, like the reference screenshot. */
.board {
  position: relative;
  height: 480px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  border: 2px solid var(--black);
  background-color: #c8996b;
  background-image:
    radial-gradient(circle, rgba(90,58,30,.35) 1.6px, transparent 1.7px),
    radial-gradient(circle, rgba(90,58,30,.35) 1.6px, transparent 1.7px),
    radial-gradient(circle, rgba(255,232,196,.25) 1.4px, transparent 1.5px);
  background-size: 34px 34px, 22px 22px, 27px 27px;
  background-position: 0 0, 11px 17px, 6px 4px;
}
.board::-webkit-scrollbar { height: 8px; }

.board-hint {
  margin-top: 10px;
  font-size: 10px;
  color: #716b72;
  text-align: center;
}

.board-item {
  position: absolute;
  user-select: none;
  z-index: 2;
}

/* ONLY these items can move. */
.board-item.draggable {
  cursor: grab;
  touch-action: none;
}
.board-item.draggable:active,
.board-item.draggable.dragging { cursor: grabbing; z-index: 30; }
.board-item.active { outline: 2px dashed var(--purple); outline-offset: 4px; }

/* nameplate */
.item-nameplate {
  width: 140px;
  background: var(--red);
  border: 2px solid var(--black);
  box-shadow: 3px 3px 0 var(--black);
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nameplate-tag { color: white; font-size: 8px; font-weight: 700; letter-spacing: 1px; }
.nameplate-name { background: var(--white); color: var(--purple); font-size: 15px; font-weight: 800; padding: 1px 4px; font-style: italic; }
.item-nameplate {
  z-index: 80 !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  position: absolute;
}
.item-nameplate:hover {
  filter: brightness(1.05);
}


/* small draggable emoji stickers */
.item-sticker {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  background: var(--yellow);
  border: 2px solid var(--black);
  border-radius: 50%;
  font-size: 15px;
  box-shadow: 2px 2px 0 var(--black);
}
.sticker-b { background: var(--pink); }

/* Pinned images: fixed in the collage, hoverable/clickable only. */
.img-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item-calendar-img { width: 400px; height: 400px; z-index: 6; }
.item-strip { width: 300px; height: 300px; }
.item-strip-one { width: 300px; height: 310px; }
.item-strip-two { width: 300px; height: 300px; }
.item-strip-three { width: 300px; height: 300px; }
.item-strip-four { width: 300px; height: 285px; }

/* washi tape */
.item-tape {
  width: 125px;
  background: var(--sage);
  color: var(--purple);
  border: 2px solid var(--black);
  padding: 6px 4px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  opacity: .92;
  z-index: 5;
}

/* keychain / pin */
.item-keychain { font-size: 26px; filter: drop-shadow(2px 2px 0 rgba(0,0,0,.35)); }
.item-pin { font-size: 20px; }

/* floating hover label */
.board-tooltip {
  position: fixed;
  z-index: 200;
  pointer-events: none;
  background: var(--purple);
  color: white;
  border: 2px solid var(--black);
  padding: 5px 9px;
  font-size: 10px;
  font-weight: 700;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
  max-width: 200px;
}
.board-tooltip.show { opacity: 1; transform: translateY(0); }

/* reveal panels (calendar / likes) */
.reveal-panel {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .45s ease, opacity .35s ease;
}
.reveal-panel.open {
  max-height: 2000px;
  opacity: 1;
  margin-top: 10px;
}

/* letter modal tweaks */
.sticker-inline {
  position: static;
  display: inline-block;
  transform: rotate(-3deg);
  margin-bottom: 14px;
}

@media (max-width: 560px) {
  .board { height: 480px; }
  .board-frame { padding: 10px; }
}