@font-face {
  font-family: Caveat;
  src: url("caveat.ttf") format("truetype");
  font-weight: 400 700;
  font-display: swap;
}

.journal-entry-view.admin-bar .site-header { top: var(--wp-admin--admin-bar--height, 32px); }
.entry-desk {
  padding-block: calc(var(--header-height) + clamp(1rem, 4vw, 3.75rem)) clamp(3rem, 7vw, 6rem);
  background:
    radial-gradient(ellipse at 65% 0%, #45342066, transparent 45rem),
    #171a16;
}

.entry-skip { position: fixed; left: 1rem; top: -8rem; z-index: 10; }
.entry-skip:focus { top: 3.5rem; background: #171a16; padding: .5rem 1rem; }
.entry-back {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  min-height: 44px;
  margin-bottom: 1rem;
  color: var(--gold);
  text-decoration: none;
}
.entry-back:hover { text-decoration: underline; text-underline-offset: .2em; }

.entry-book {
  --paper: #efdfbe;
  --paper-line: #84623c1d;
  color-scheme: light;
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(0, 3.1fr);
  border: 5px solid #392b20;
  border-radius: .55rem 1.05rem 1.05rem .55rem;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 3px 4px #ae9871, 7px 9px #4c3928, 0 26px 65px #0009;
}
.entry-leaf {
  position: relative;
  padding: clamp(1.3rem, 3.7vw, 3.4rem);
  background:
    linear-gradient(90deg, transparent 78%, #6b452335),
    repeating-linear-gradient(transparent 0 29px, var(--paper-line) 29px 30px),
    #e1cea7;
  border-radius: .2rem 0 0 .2rem;
}
.entry-leaf::after {
  content: "";
  position: absolute;
  top: .9rem;
  bottom: .9rem;
  right: .3rem;
  border-right: 1px dashed #957851;
  pointer-events: none;
}
.entry-hand {
  color: #6a4026;
  font: 700 clamp(2rem, 3.3vw, 3.1rem)/.92 Caveat, cursive;
  rotate: -4deg;
}
.entry-meta {
  display: grid;
  gap: .4rem;
  margin-top: 2.1rem;
  padding-top: .75rem;
  border-top: 1px solid #a9926e;
  color: #654a31;
  font-size: .89rem;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.entry-paper {
  min-width: 0;
  border-left: 1px solid #a9926e;
  border-radius: 0 .7rem .7rem 0;
  padding: clamp(1.3rem, 4.8vw, 4.5rem);
  background:
    linear-gradient(90deg, #a276482b, transparent 3rem),
    repeating-linear-gradient(transparent 0 29px, var(--paper-line) 29px 30px),
    var(--paper);
  overflow-wrap: anywhere;
}
.entry-paper h1 {
  max-width: 20ch;
  margin-bottom: clamp(1.2rem, 3vw, 2.2rem);
  font-size: clamp(2rem, 5.5vw, 4.8rem);
  line-height: 1.03;
  text-wrap: balance;
  scroll-margin-top: calc(var(--header-height) + 3rem);
}
.entry-cover {
  position: relative;
  margin: 0 0 clamp(1.5rem, 3vw, 2.3rem);
  padding: .4rem;
  background: #f7ebd1;
  box-shadow: 0 3px 9px #3a281e3d;
}
.entry-cover::after {
  content: "";
  position: absolute;
  top: -.5rem;
  right: .9rem;
  width: 4.75rem;
  height: 1.25rem;
  rotate: 6deg;
  background: #c5a266bc;
  clip-path: polygon(3% 0, 100% 5%, 96% 24%, 100% 39%, 95% 60%, 100% 82%, 96% 100%, 0 94%, 4% 74%, 0 53%, 5% 30%, 0 12%);
  pointer-events: none;
}
.entry-cover img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 24rem;
  object-fit: cover;
}

.entry-text { font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.65; }
.entry-text .entry-lead { color: #654a31; font-size: 1.12em; font-weight: 600; }
.entry-text .entry-contents {
  padding: .7rem 1rem;
  border: 1px solid #a9926e;
  background: #e4cfa8;
}
.entry-text .entry-contents summary { color: #53391f; font-weight: 750; }
.entry-text .entry-contents ol { margin: .45rem 0 .2rem; padding-inline-start: 1.55rem; }
.entry-text [id] { scroll-margin-block-start: calc(var(--header-height) + 2.75rem); }
.entry-text > * + * { margin-top: 1.15em; }
.entry-text > :is(h2,h3,h4) { margin-top: 1.7em; line-height: 1.17; }
.entry-text > :is(h2,h3,h4):first-child { margin-top: 0; }
.entry-text :is(h2,h3,h4) + p { margin-top: .5em; }
.entry-text :is(a,.wp-block-button__link), .entry-meta a, .entry-tags a {
  text-underline-offset: .2em;
}
.entry-text a:not(.wp-block-button__link), .entry-tags a { color: #713d21; }
.entry-text :is(img, video, iframe, input) { max-width: 100%; }
.entry-text :is(img, video) { height: auto; }
.entry-text iframe { border: 0; }
.entry-text .wp-block-embed.is-type-video iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; }
.entry-text :is(figure, blockquote) { margin-inline: 0; }
.entry-text figcaption { color: #654a31; font-size: .9em; }
.entry-text blockquote {
  border-left: 2px solid #9d6e43;
  padding: .4em 1em;
  background: #9d6e4315;
}
.entry-text blockquote cite { display: block; margin-top: .4em; }
.entry-text pre { overflow: auto; }
.entry-text :is(.wp-block-table, table) { max-width: 100%; }
.entry-text .wp-block-table { overflow: auto; }
.entry-text .wp-block-table table { width: 100%; border-collapse: collapse; }
.entry-text .wp-block-table :is(th, td) { border: 1px solid #a9926e; padding: .45em .65em; text-align: start; }
.entry-text .wp-block-table th { background: #e4cfa8; }
.entry-text img:not(.emoji, .wp-smiley, .avatar) {
  box-sizing: border-box;
  border: clamp(.28rem, .8vw, .48rem) solid #fffdf7;
  box-shadow: 0 3px 9px #3a281e3d;
}
.entry-text .wp-block-image img { display: block; }
.entry-text .wp-block-image figcaption { margin: .4em 0 0; text-align: start; }
.entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  border-top: 1px solid #af9670;
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: .875rem;
}
.entry-tags a {
  padding: .2rem .6rem;
  border: 1px solid #ad916a;
  border-radius: 2px;
  text-decoration: none;
}
.entry-tags a:hover { text-decoration: underline; }

.entry-desk .post-navigation { margin-top: 2.25rem; }
.entry-desk .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.entry-desk .nav-links { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; }
.entry-desk :is(.nav-previous, .nav-next) { flex: 1 1 18rem; }
.entry-desk .nav-next { text-align: right; }
.entry-desk .nav-links a { display: block; padding: .65rem 0; text-underline-offset: .2em; }
.entry-nav-label { display: block; color: var(--gold); font-size: .88rem; }

@media (max-width: 680px) {
  .entry-book { grid-template-columns: minmax(0, 1fr); }
  .entry-leaf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    border-bottom: 1px solid #a9926e;
    border-radius: .2rem .7rem 0 0;
  }
  .entry-leaf::after { inset: auto .6rem .22rem; border: 0; border-bottom: 1px dashed #957851; }
  .entry-meta { margin: 0; padding: 0; border: 0; text-align: right; }
  .entry-paper { border: 0; border-radius: 0 0 .7rem .2rem; }
  .entry-desk .nav-next { text-align: left; }
}

@media (max-width: 600px) {
  .journal-entry-view.admin-bar .site-header { top: 0; }
}
