@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #f7efaa;
  --yellow: #f5c400;
  --ink: #24231d;
  --muted: #6e6b59;
  --line: rgba(36,35,29,.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-x: hidden;
}

.topbar {
  padding: 52px 5.1vw 26px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 27px);
}

.board {
  padding: 54px 5.1vw 180px;
  max-width: 1500px;
}
.message { margin: 0 0 70px; }
.message-line {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  font-size: clamp(18px, 2vw, 30px);
}
.author { font-weight: 500; }
.time { margin-left: 2px; }
.cipher {
  margin-top: 20px;
  font-size: clamp(18px, 2vw, 30px);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  letter-spacing: .01em;
}
.copy-btn {
  margin-left: 18px;
  border: 0;
  background: transparent;
  color: #4e4c40;
  font: inherit;
  font-size: .78em;
  cursor: pointer;
  padding: 8px 10px;
}
.copy-btn:hover { text-decoration: underline; }
.prompt, .colon { flex: none; }

.footer-note {
  position: fixed;
  left: 5.1vw;
  bottom: 30px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 15px;
  z-index: 2;
}
.write-btn {
  position: fixed;
  right: 5.1vw;
  bottom: 30px;
  border: 0;
  border-radius: 60px;
  background: #f2bd00;
  color: var(--ink);
  padding: 23px 42px;
  font: 600 24px Inter, sans-serif;
  cursor: pointer;
  box-shadow: 0 7px 22px rgba(90,70,0,.13);
  z-index: 3;
}
.write-btn:hover { transform: translateY(-1px); }
.pen { font-size: 28px; margin-right: 10px; }

.modal {
  position: fixed;
  inset: 0;
  background: rgba(36,35,29,.13);
  display: grid;
  place-items: center;
  z-index: 10;
  padding: 24px;
}
.hidden { display: none; }
.modal-card {
  width: min(900px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  background: #f5c400;
  border-radius: 48px;
  padding: 68px 86px 52px;
  position: relative;
  box-shadow: 0 22px 70px rgba(50,40,0,.22);
}
.modal-card.small { width: min(650px, 94vw); }
.close {
  position: absolute;
  top: 28px;
  right: 35px;
  border: 0;
  background: transparent;
  font-size: 38px;
  color: #75621b;
  cursor: pointer;
}
h2 {
  font: 500 clamp(21px, 2.3vw, 31px) Inter, sans-serif;
  margin: 25px 0 18px;
}
input, textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(36,35,29,.55);
  background: transparent;
  color: var(--ink);
  outline: none;
  font: 400 23px "IBM Plex Mono", monospace;
  padding: 4px 0 15px;
}
textarea {
  min-height: 125px;
  resize: vertical;
  border-top: 0;
}
input::placeholder, textarea::placeholder { color: #c19f20; }
.local-note {
  font: 400 16px/1.6 Inter, sans-serif;
  max-width: 720px;
  margin: 34px 0 8px;
}
.error { color: #7e2100; min-height: 22px; font: 500 15px Inter, sans-serif; }
.send-btn {
  margin-top: 16px;
  border: 0;
  border-radius: 18px;
  background: #24231d;
  color: #f8f1b4;
  padding: 19px 34px;
  font: 600 18px Inter, sans-serif;
  cursor: pointer;
}
.send-btn:disabled { opacity: .5; cursor: wait; }

@media (max-width: 700px) {
  .topbar { padding-top: 26px; }
  .board { padding-top: 28px; }
  .message-line { flex-wrap: wrap; gap: 6px; }
  .copy-btn { margin-left: 0; }
  .modal-card { padding: 58px 28px 32px; border-radius: 30px; }
  .write-btn { right: 18px; bottom: 18px; padding: 18px 26px; font-size: 19px; }
  .footer-note { left: 18px; bottom: 24px; font-size: 12px; }
}
