/* Téa — slate, chalk, a few stars */

:root {
  --slate-deep: #171a20;
  --slate: #262b34;
  --chalk: #ece8de;
  --chalk-dim: #a4a9b6;
  --line: rgba(236, 232, 222, .16);
  --pink: #ff9fd6;
  --peri: #aab6ff;

  --f-black: "UnifrakturCook", "Old English Text MT", fantasy;
  --f-serif: "Cormorant Garamond", Georgia, serif;
  --f-pixel: "Silkscreen", "Courier New", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--chalk);
  font-family: var(--f-serif);
  font-size: 21px;
  line-height: 1.6;
  background: linear-gradient(175deg, var(--slate) 0%, var(--slate-deep) 100%) fixed;
}

#sky { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }

.page { position: relative; max-width: 680px; margin: 0 auto; padding: 0 20px; }

a { color: var(--pink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 2px dashed var(--pink); outline-offset: 3px; }

/* ---------- header ---------- */
.site {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 36px 0 18px;
  border-bottom: 1px solid var(--line);
}
.title {
  font-family: var(--f-black);
  font-size: 44px;
  line-height: 1.1;
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff 0%, #fdfbf4 50%, #ebe8df 78%, #cdd0da 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, .3));
}

.subline {
  margin: 4px 0 0;
  font-style: italic;
  font-size: 16px;
  line-height: 1.3;
  color: var(--chalk-dim);
}

.tags { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.tags button, .meta, .back, .pager a {
  font-family: var(--f-pixel);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: lowercase;
}
.tags button {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--chalk-dim);
  cursor: pointer;
}
.tags button:hover { color: #fff; }
.tags button[aria-pressed="true"] { color: var(--pink); }

/* ---------- posts ---------- */
.post { padding: 40px 0; border-bottom: 1px solid var(--line); }
.post:last-of-type { border-bottom: 0; }

.meta { margin: 0 0 6px; color: var(--peri); }
.meta span + span::before { content: " ✦ "; color: var(--chalk-dim); }

.post h2 {
  margin: 0 0 16px;
  font-weight: 600;
  font-size: 36px;
  line-height: 1.15;
  text-wrap: balance;
}
.post h2 a { color: inherit; text-decoration: none; }
.post h2 a:hover { color: var(--pink); }

.body p { margin: 0 0 1em; text-wrap: pretty; white-space: pre-line; }
.body > :last-child { margin-bottom: 0; }
.body blockquote {
  margin: 1.2em 0;
  padding-left: 18px;
  border-left: 2px solid var(--pink);
  font-style: italic;
  white-space: pre-line;
}
.body img, .post > img { display: block; max-width: 100%; height: auto; margin: 0 0 1em; border-radius: 4px; }

/* the one piece of manuscript left: a drop cap on the full post */
.single .body > p:first-of-type::first-letter {
  float: left;
  padding: 6px 10px 0 0;
  font-family: var(--f-black);
  font-size: 3.6em;
  line-height: .8;
  color: var(--pink);
}

.more { display: inline-block; margin-top: 12px; font-style: italic; }

.back { display: inline-block; margin-top: 28px; color: var(--chalk-dim); text-decoration: none; }
.back:hover { color: #fff; }

.pager { display: flex; justify-content: space-between; gap: 16px; padding: 22px 0 0; }
.pager a { color: var(--chalk-dim); text-decoration: none; }
.pager a:hover { color: #fff; }

.empty { padding: 60px 0; text-align: center; font-style: italic; color: var(--chalk-dim); }

.site-foot { padding: 30px 0 50px; text-align: center; color: var(--chalk-dim); font-size: 14px; }
.site-foot a { color: inherit; text-decoration: none; cursor: default; }

.song { display: block; width: 100%; margin: 18px 0 0; border: 0; border-radius: 12px; color-scheme: normal; }
.songs figure { position: relative; margin: 12px 0 0; }
.songs iframe { display: block; width: 100%; border: 0; border-radius: 12px; color-scheme: normal; }
.songs button {
  position: absolute; top: -8px; right: -8px;
  width: 24px; height: 24px; padding: 0;
  font-size: 11px; line-height: 1;
  color: var(--slate-deep); background: #fff; border: 0; border-radius: 50%; cursor: pointer;
}

.glint {
  position: fixed;
  z-index: 20;
  pointer-events: none;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  text-shadow: 0 0 8px var(--pink);
  animation: glint .8s ease-out forwards;
}
@keyframes glint { to { opacity: 0; transform: translate(var(--dx), 26px) scale(.2) rotate(140deg); } }

.write-link { font-family: var(--f-pixel); font-size: 11px; letter-spacing: .08em; padding: 4px 0; text-decoration: none; }

/* ---------- writing desk (write.html) ---------- */
.desk { padding: 36px 0 10px; }
.desk h2 { margin: 0 0 14px; font-weight: 600; font-size: 30px; }
.desk form + h2 { margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--line); }
.desk label { display: block; margin: 18px 0 6px; font-family: var(--f-pixel); font-size: 11px; letter-spacing: .08em; text-transform: lowercase; color: var(--peri); }
.desk label i { font-style: normal; color: var(--chalk-dim); }
.desk input[type="text"], .desk input[type="password"], .desk input[type="date"], .desk textarea {
  width: 100%;
  padding: 10px 12px;
  color: var(--chalk);
  font: inherit;
  background: rgba(0, 0, 0, .25);
  border: 1px solid var(--line);
  border-radius: 4px;
  color-scheme: dark;
}
.desk textarea { display: block; resize: vertical; line-height: 1.5; }
.desk input:focus, .desk textarea:focus { outline: none; border-color: var(--pink); }
.desk input[type="file"] { font-family: var(--f-serif); font-size: 17px; color: var(--chalk-dim); max-width: 100%; }
.row { display: flex; gap: 14px; align-items: flex-end; }
.row > div, .row > input { flex: 1; min-width: 0; }
.actions { margin-top: 26px; align-items: center; }
.hint { margin: 6px 0 0; font-size: 17px; font-style: italic; color: var(--chalk-dim); }
.btn {
  padding: 10px 22px;
  font-family: var(--f-pixel);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: lowercase;
  color: var(--slate-deep);
  background: linear-gradient(180deg, #fff 0%, #ffd0ec 45%, #e58abf 55%, #ffe3f4 100%);
  border: 1px solid #fff;
  border-radius: 999px;
  cursor: pointer;
}
.btn:disabled { opacity: .5; cursor: progress; }
.btn.quiet { background: none; color: var(--chalk-dim); border-color: var(--line); }
.status { min-height: 1.6em; margin: 14px 0 0; font-size: 18px; font-style: italic; }
.status.bad { color: #ff9a9a; }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.thumbs figure { position: relative; margin: 0; }
.thumbs img { display: block; width: 110px; height: 110px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.thumbs button {
  position: absolute; top: -8px; right: -8px;
  width: 24px; height: 24px; padding: 0;
  font-size: 11px; line-height: 1;
  color: var(--slate-deep); background: #fff; border: 0; border-radius: 50%; cursor: pointer;
}
.mine { margin: 0; padding: 0; list-style: none; }
.mine li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.mine small { margin-left: 8px; font-family: var(--f-pixel); font-size: 10px; color: var(--chalk-dim); }
.link { padding: 0 0 0 10px; font: inherit; font-style: italic; color: var(--pink); background: none; border: 0; cursor: pointer; }
.link:hover { color: #fff; }

@media (max-width: 560px) {
  body { font-size: 19px; }
  .title { font-size: 36px; }
  .post { padding: 30px 0; }
  .post h2 { font-size: 29px; }
}
