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

body {
  min-height: 100vh;
  background-color: #b9a88c;
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(0,0,0,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(0,0,0,0.05) 0%, transparent 45%),
    repeating-linear-gradient(-12deg, transparent, transparent 3px, rgba(90,70,40,0.04) 3px, rgba(90,70,40,0.04) 4px);
  font-family: Georgia, "Times New Roman", serif;
  overflow-x: hidden;
  color: #2a2118;
}

.wall {
  position: relative;
  min-height: 1600px;
  padding: 24px 16px 60px;
  max-width: 1000px;
  margin: 0 auto;
}

/* torn-ish paper cards */
.poster {
  position: absolute;
  background: #f7f1e1;
  border: none;
  box-shadow:
    1px 1px 0 rgba(0,0,0,0.15),
    4px 5px 0 rgba(0,0,0,0.12);
  padding: 16px 18px 18px;
  transform-origin: center;
}
.poster::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  background: #8b2942;
  border-radius: 50%;
  top: -7px;
  left: 42%;
  box-shadow: inset -2px -2px 0 rgba(0,0,0,0.25), 0 1px 2px rgba(0,0,0,0.3);
  z-index: 2;
}
/* second pin sometimes */
.poster::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  background: #3a5a7a;
  border-radius: 50%;
  top: -4px;
  right: 22%;
  opacity: 0.0;
}

.p-title::after,
.p-main::after,
.p-note::after { opacity: 0.85; }

.tape {
  position: absolute;
  background: rgba(255, 228, 120, 0.65);
  height: 22px;
  width: 72px;
  top: -10px;
  left: 14px;
  transform: rotate(-9deg);
  box-shadow: 0 1px 1px rgba(0,0,0,0.1);
  z-index: 3;
  border-left: 1px solid rgba(255,255,255,0.4);
  border-right: 1px solid rgba(0,0,0,0.05);
}
.tape.r {
  left: auto;
  right: 12px;
  transform: rotate(14deg);
  background: rgba(200, 230, 255, 0.55);
  width: 54px;
}

h1, h2, h3 {
  font-family: Georgia, serif;
  font-weight: bold;
  letter-spacing: -0.5px;
}

button {
  font-family: Georgia, serif;
  font-weight: bold;
  cursor: pointer;
  border: 2px solid #2a2118;
  background: #f0d45a;
  padding: 9px 14px;
  font-size: 1rem;
  box-shadow: 2px 2px 0 #2a2118;
  border-radius: 2px 6px 3px 5px;
}
button:hover { filter: brightness(1.05); }
button:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 #2a2118;
}
button.danger {
  background: #e87878;
  border-radius: 5px 2px 6px 3px;
}
button.ok {
  background: #7dce8a;
  border-radius: 3px 5px 2px 6px;
}
button.ghost {
  background: #e8e0d0;
  border-radius: 4px;
}

input, select, textarea {
  font-family: Georgia, serif;
  font-size: 1rem;
  border: 2px solid #2a2118;
  padding: 6px 8px;
  background: #fffdf6;
  width: 100%;
  border-radius: 1px 4px 2px 3px;
}
label {
  display: block;
  margin: 8px 0 2px;
  font-size: 0.92rem;
  opacity: 0.9;
}

/* positions - uneven on purpose */
.p-title {
  top: 22px;
  left: 18px;
  width: 230px;
  transform: rotate(-4.5deg);
  background: #d94f4f;
  color: #fffaf0;
  padding: 18px 16px 20px;
}
.p-title h1 {
  font-size: 2rem;
  line-height: 0.95;
  font-style: italic;
}
.p-title p {
  font-size: 0.9rem;
  margin-top: 10px;
  opacity: 0.92;
  font-weight: normal;
  font-style: normal;
}

.p-main {
  top: 175px;
  left: 50%;
  transform: translateX(-48%) rotate(1.8deg);
  width: min(330px, 90vw);
  z-index: 5;
  background: #fff8e7;
  padding: 20px 18px 22px;
}
.p-main h2 {
  font-size: 1.25rem;
  margin-bottom: 6px;
  transform: rotate(-1deg);
}

.p-timer {
  top: 540px;
  left: 5%;
  width: 170px;
  transform: rotate(-8deg);
  background: #d2eaf8;
  text-align: center;
  z-index: 4;
  border: 2px dashed #3a5a7a;
}
.p-timer .big {
  font-family: "Courier New", monospace;
  font-size: 2.4rem;
  letter-spacing: 1px;
  margin-top: 4px;
}

.p-breathe {
  top: 70px;
  right: 4%;
  width: 165px;
  transform: rotate(6.5deg);
  background: #dff5e2;
}

.p-distract {
  top: 290px;
  right: 2%;
  width: 185px;
  transform: rotate(-5.5deg);
  background: #fce4ef;
  z-index: 3;
}

.p-log {
  top: 580px;
  right: 4%;
  width: min(250px, 88vw);
  transform: rotate(3deg);
  background: #ebe4f7;
  max-height: 280px;
  overflow-y: auto;
  z-index: 3;
}

.p-history {
  position: relative;
  margin: 760px auto 50px;
  width: min(500px, 94vw);
  transform: rotate(-0.8deg);
  background: #fffcf5;
  padding: 18px 16px 22px;
  z-index: 2;
  box-shadow: 3px 4px 0 rgba(0,0,0,0.14);
}
.p-history .tape { left: 38%; width: 90px; }

.p-note {
  top: 430px;  
  left: 3%;
  width: 155px;
  transform: rotate(7deg);                            
  background: #ffe9a8;
  font-size: 0.88rem;
  z-index: 3;  
}                        
                        
.p-pin {        
  top: 16px;
  right: 14px;  
  width: 140px;            
  transform: rotate(5deg);
  background: #2a2118;
  color: #f0e6d4;
  font-size: 0.82rem;
  z-index: 6;
}
.p-pin input {
  background: #3d3228;
  color: #f0e6d4;
  border-color: #666;
}

.hidden { display: none !important; }

.log-item {
  border-bottom: 1px dotted #8a7a60;
  padding: 7px 0;
  font-size: 0.88rem;
  line-height: 1.35;
}
.log-item strong {
  font-family: Georgia, serif;
}

.slider-row { display: flex; align-items: center; gap: 8px; }
.slider-row input[type=range] { flex: 1; }

.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.row button { flex: 1; min-width: 88px; }

.breath-circle {
  width: 64px;
  height: 64px;
  margin: 10px auto;
  border-radius: 50%;
  background: #6bbf80;
  border: 2px solid #2a2118;
}
.breath-circle.on {
  animation: breathe 8s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(0.65); opacity: 0.55; }
  50% { transform: scale(1.12); opacity: 1; }
}

.stamp {
  display: inline-block;
  border: 2px solid #a33;
  color: #a33;
  padding: 1px 7px;
  transform: rotate(-15deg);
  font-family: "Courier New", monospace;
  font-size: 0.78rem;
  margin-left: 4px;
  opacity: 0.85;
}

#clock {
  font-family: "Courier New", monospace;
  font-size: 2.3rem;
  text-align: center;
  margin: 12px 0;
  letter-spacing: 2px;
}

/* smudge / wear */
.p-main {
  background-image: linear-gradient(160deg, transparent 60%, rgba(180,150,100,0.06) 100%);
}
.p-title {
  box-shadow: 3px 4px 0 rgba(80,20,20,0.25), 1px 1px 0 rgba(0,0,0,0.2);
}

@media (max-width: 700px) {
  .poster {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    margin: 18px 0;
  }
  .p-title { transform: rotate(-2.5deg) !important; }
  .p-main { transform: rotate(1deg) !important; }
  .p-breathe { transform: rotate(3deg) !important; }
  .p-distract { transform: rotate(-2deg) !important; }
  .p-note { transform: rotate(2deg) !important; }
  .p-history { margin-top: 24px; transform: none; }
  .wall { padding: 14px 10px 40px; }
}


/* drag */
.poster {
  cursor: grab;
  user-select: none;
  touch-action: none;
}
.poster.dragging {
  cursor: grabbing;
  z-index: 50 !important;
  box-shadow: 6px 8px 0 rgba(0,0,0,0.2);
  opacity: 0.95;
}
.poster input,
.poster select,
.poster textarea,
.poster button,
.poster label {
  cursor: auto;
  user-select: text;
  touch-action: auto;
}
.poster button { cursor: pointer; }
.p-history {
  /* history stays in flow but can still be nudged if absolute later */
}
