.treehole-page {
  min-height: 100vh;
  padding-bottom: 80px;
}

.treehole-section {
  padding-top: 56px;
}

.treehole-back {
  display: inline-flex;
  margin-bottom: 36px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
}

.treehole-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 48px;
  align-items: end;
  margin-bottom: 42px;
}

.treehole-heading h2 {
  margin: 12px 0 18px;
  font-size: clamp(2.7rem, 6vw, 5.6rem);
  line-height: 0.98;
}

.treehole-heading p:not(.eyebrow) {
  max-width: 610px;
  color: var(--muted);
  line-height: 1.9;
}

.treehole-privacy {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 22px 24px;
  border: 2px solid var(--ink);
  border-radius: 26px;
  background: #fff4cf;
  box-shadow: 7px 7px 0 var(--ink);
}

.treehole-lock {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: 17px;
  background: var(--wine);
  color: #fff;
  font-size: 1.8rem;
}

.treehole-privacy strong,
.treehole-privacy small {
  display: block;
}

.treehole-privacy strong {
  margin-bottom: 5px;
}

.treehole-privacy small {
  color: var(--muted);
  line-height: 1.6;
}

.treehole-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: 28px;
  align-items: start;
}

.treehole-compose,
.treehole-history {
  border: 2px solid var(--ink);
  border-radius: 30px;
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--ink);
}

.treehole-compose {
  position: sticky;
  top: 100px;
  padding: 28px;
}

.treehole-compose-head,
.treehole-history-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
}

.treehole-compose-head span,
.treehole-history-head span {
  color: var(--wine);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.treehole-compose-head h3,
.treehole-history-head h3 {
  margin: 7px 0 0;
  font-size: 1.35rem;
}

.treehole-compose-head img {
  width: 64px;
  height: 64px;
}

.treehole-text-label {
  display: block;
  margin-top: 26px;
}

.treehole-text-label > span {
  display: block;
  margin-bottom: 10px;
  font-size: 0.82rem;
  font-weight: 800;
}

.treehole-text-label textarea {
  width: 100%;
  min-height: 230px;
  resize: vertical;
  border-color: #d9c6ae;
  border-radius: 22px;
  background: #fffdf7;
  line-height: 1.85;
}

.treehole-form-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.74rem;
}

.treehole-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

.treehole-save,
.treehole-cancel,
.treehole-action {
  min-height: 46px;
  padding: 0 20px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.treehole-save {
  background: var(--wine);
  color: #fff;
}

.treehole-cancel {
  background: #fff;
  color: var(--ink);
}

.treehole-save:disabled {
  cursor: wait;
  opacity: 0.55;
}

.treehole-status {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.treehole-status.is-error {
  color: #b44337;
}

.treehole-history {
  padding: 28px;
}

.treehole-history-head > strong {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 999px;
  background: #fff4cf;
  font-size: 0.8rem;
}

.treehole-list {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.treehole-entry {
  position: relative;
  padding: 22px;
  border: 1.5px solid #d9c6ae;
  border-radius: 22px;
  background: #fffdf7;
}

.treehole-entry::before {
  position: absolute;
  top: 20px;
  left: -1.5px;
  width: 5px;
  height: 40px;
  border-radius: 0 8px 8px 0;
  background: var(--wine);
  content: "";
}

.treehole-entry time {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.treehole-entry p {
  margin: 0;
  color: var(--ink);
  line-height: 1.9;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.treehole-entry-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
}

.treehole-entry-footer small {
  color: var(--muted);
  font-size: 0.68rem;
}

.treehole-entry-meta {
  display: grid;
  gap: 5px;
}

.treehole-schedule-badge {
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff0b8;
  color: #8c5d1c;
  font-size: 0.68rem;
  font-weight: 900;
}

.treehole-schedule-badge.is-sent {
  background: #dff0d8;
  color: #426d3c;
}

.treehole-entry-actions {
  display: flex;
  gap: 8px;
}

.treehole-action {
  min-height: 34px;
  padding: 0 13px;
  background: #fff;
  color: var(--ink);
  font-size: 0.72rem;
}

.treehole-action.is-delete {
  border-color: #d8a49c;
  color: #a94d43;
}

.treehole-action.is-schedule {
  background: #fff0b8;
}

.treehole-empty {
  padding: 54px 24px;
  border: 1.5px dashed #d9c6ae;
  border-radius: 22px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
}

body.treehole-modal-open {
  overflow: hidden;
}

.treehole-send-modal[aria-hidden="true"] {
  display: none;
}

.treehole-send-modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
}

.treehole-send-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(48, 35, 26, 0.54);
  backdrop-filter: blur(6px);
}

.treehole-send-card {
  position: relative;
  width: min(580px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  padding: 30px;
  border: 2px solid var(--ink);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 9px 9px 0 var(--ink);
}

.treehole-send-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.4rem;
  cursor: pointer;
}

.treehole-send-kicker {
  margin: 0 0 8px;
  color: var(--wine-dark);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.treehole-send-card h2 {
  margin: 0;
  padding-right: 46px;
  font-size: clamp(1.7rem, 5vw, 2.5rem);
}

.treehole-send-intro {
  margin: 12px 0 18px;
  color: var(--muted);
  line-height: 1.75;
}

.treehole-send-card blockquote {
  max-height: 190px;
  overflow: auto;
  margin: 0;
  padding: 18px;
  border: 1.5px solid #d9c6ae;
  border-radius: 18px;
  background: #fffaf0;
  color: var(--ink);
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.treehole-send-time {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.8rem;
  font-weight: 800;
}

.treehole-send-time input {
  min-height: 48px;
  border-color: #d9c6ae;
  border-radius: 14px;
  background: #fff;
}

.treehole-send-warning {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff0b8;
  color: #77521b;
  font-size: 0.74rem;
  line-height: 1.65;
}

.treehole-send-status {
  min-height: 22px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.treehole-send-status.is-error {
  color: #b44337;
}

.treehole-send-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.treehole-send-actions button {
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.treehole-send-cancel-schedule {
  margin-right: auto;
  background: #fff;
  color: var(--wine-dark);
}

.treehole-send-dismiss {
  background: #fff4cf;
  color: var(--ink);
}

.treehole-send-confirm {
  background: var(--wine);
  color: #fff;
}

.treehole-send-actions button:disabled {
  cursor: wait;
  opacity: 0.55;
}

@media (max-width: 860px) {
  .treehole-section {
    padding-top: 30px;
  }

  .treehole-heading,
  .treehole-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .treehole-heading {
    margin-bottom: 28px;
  }

  .treehole-compose {
    position: static;
  }

  .treehole-privacy {
    box-shadow: 5px 5px 0 var(--ink);
  }
}

@media (max-width: 520px) {
  .treehole-compose,
  .treehole-history {
    padding: 20px;
    border-radius: 24px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .treehole-heading h2 {
    font-size: 2.7rem;
  }

  .treehole-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .treehole-save,
  .treehole-cancel {
    width: 100%;
  }

  .treehole-entry-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .treehole-send-card {
    padding: 24px 20px;
    border-radius: 24px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .treehole-send-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .treehole-send-actions button {
    width: 100%;
  }

  .treehole-send-cancel-schedule {
    margin-right: 0;
  }
}
