:root {
  --paper: #f1e7e8;
  --ink: #2b1a1c;
  --ink-soft: #5a4446;
  --line: #2b1a1c;
  --hl: #2b1a1c;
  --hl-ink: #f1e7e8;
  --muted: #b9a9ab;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  padding: 12px;
  background: var(--paper);
  color: var(--ink);
  font-family: Texturina, "Times New Roman", Times, serif;
  font-size: 15px;
  line-height: 1.45;
}

a { color: var(--ink); }
a:hover { background: var(--ink); color: var(--paper); text-decoration: none; }

.page {
  width: 100%;
}

/* ---------- banner ---------- */
.banner {
  position: relative;
  line-height: 0;
}
.banner img {
  display: block;
  width: 100%;
  height: clamp(160px, 18vw, 280px);
  object-fit: cover;
  object-position: center 65%;
  image-rendering: pixelated;
}
.banner-title {
  user-select: none;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  font-family: "Pinyon Script", cursive;
  font-weight: 400;
  font-size: clamp(48px, 11vw, 84px);
  line-height: 1;
  color: var(--ink);
  text-shadow:
    0 0 4px var(--paper), 0 0 8px var(--paper), 0 0 14px var(--paper),
    2px 2px 0 var(--paper);
}

canvas.dither {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* ---------- nav ---------- */
.nav {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px dashed var(--line);
}
.nav > * {
  flex: 1 1 auto;
  text-align: center;
  padding: 2px 10px;
  border-left: 1px dashed var(--line);
  white-space: nowrap;
}
.nav a { text-decoration: none; }
.nav a:first-child { border-left: 0; text-align: center; font-weight: bold; flex-basis: 160px; flex-grow: 0; }
.nav-empty {
  color: var(--muted);
  background: color-mix(in srgb, var(--ink) 10%, var(--paper));
  user-select: none;
}

/* ---------- 3 column grid ---------- */
.grid {
  display: grid;
  grid-template-columns: clamp(160px, 15vw, 240px) 1fr clamp(162px, 15vw, 240px);
  border-bottom: 1px dashed var(--line);
}
/* profile column sits on the left, calendar/links column on the right */
.col-right { order: 1; }
.col-main { order: 2; }
.col-left { order: 3; }
.col-main {
  border-left: 1px dashed var(--line);
  border-right: 1px dashed var(--line);
  min-width: 0;
}

.box { border-bottom: 1px dashed var(--line); padding: 4px 0 6px; }
.box:last-child { border-bottom: 0; }
.box-title {
  margin: 0 0 4px;
  text-align: center;
  font-size: 15px;
  font-weight: bold;
}
.center { text-align: center; }
.small { font-size: 14px; margin: 4px 0 0; }

/* ---------- calendar ---------- */
.calendar {
  width: 100%;
  border-collapse: collapse;
  text-align: center;
  font-size: 14px;
}
.calendar th {
  background: var(--hl);
  color: var(--hl-ink);
  font-weight: normal;
  padding: 3px 0;
}
.calendar td {
  border: 1px solid var(--ink-soft);
  padding: 3px 0;
}
.calendar td.other { color: var(--muted); }
.calendar td.today { background: var(--hl); color: var(--hl-ink); }
.cal-nav { display: flex; justify-content: center; gap: 6px; margin-top: 4px; font-size: 13px; }

/* ---------- center ---------- */
.post { padding: 8px clamp(10px, 3vw, 48px) 4px; }
.post > * { max-width: 75ch; margin-left: auto; margin-right: auto; }
.post p { margin-top: 0; margin-bottom: 14px; text-align: justify; }
.post p.gone { user-select: none; }
.post p.gone-a { min-height: 4.35em; }
.post p.gone-b { min-height: 2.9em; }

.script-title {
  font-family: "Pinyon Script", cursive;
  font-weight: 400;
  font-size: clamp(30px, 6vw, 40px);
  text-align: center;
  margin: 2px 0 10px;
  line-height: 1.1;
}

.divider { border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); line-height: 0; }
.divider canvas { height: 70px; object-fit: cover; }


.post > .lab,
.post > .favs,
.post > .fav-split { max-width: none; }
.lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 1.7fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.machine { border: 1px solid var(--ink); padding: 0 0 6px; align-self: stretch; }
.machine h3 {
  margin: 0;
  padding: 2px 8px;
  background: var(--hl);
  color: var(--hl-ink);
  font-family: "IM Fell English SC", serif;
  font-weight: normal;
  font-size: 17px;
  letter-spacing: 1px;
}
.post .machine .spec { margin: 4px 8px 6px; font-size: 13px; color: var(--ink-soft); text-align: left; }
.machine dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  margin: 0 8px;
  font-size: 14px;
}
.machine dt { font-weight: bold; }
.machine dd { margin: 0; }
.crt { text-align: center; min-width: 0; }
.crt figure { margin: 0; }
.crt img { display: block; width: 100%; height: auto; margin: 0 auto; border: 1px solid var(--ink); }
.crt figcaption { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

/* ---------- diary ---------- */
.diary { list-style: none; padding: 0; }
.entry { padding: 10px 0; border-top: 1px dashed var(--line); }
.entry:first-child { border-top: 0; }
.entry-date {
  margin: 0 0 6px;
  font-family: Texturina, serif;
  font-size: 16px;
  font-weight: normal;
  letter-spacing: 1px;
}
.entry p:last-child { margin-bottom: 0; }
.post p.more { text-align: right; font-size: 14px; }

/* ---------- favourites ---------- */
.favs {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.fav { padding: 0; min-width: 0; }
.favs + .entry-date { margin-top: 18px; }
.fav-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 18px;
}
.fav-split .favs { margin-bottom: 0; }
.fav-split .fav-art { width: 85%; }
.fav-split .fav-title { font-size: 13px; }
.fav-art {
  position: relative;
  display: block;
  width: 100%;
  border: 1px solid var(--ink);
  line-height: 0;
  text-decoration: none;
}
.fav-art img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
a.fav-art:hover {
  background: none;
  color: inherit;
}
a.fav-art:hover img { opacity: 0.72; }
.fav-title {
  text-align: center;
  margin: 8px 0 0;
  font-size: 15px;
}

/* ---------- commandments ---------- */
.commandments { list-style: none; padding: 0; text-align: center; }
.commandments li { padding: 12px 0; border-top: 1px dashed var(--line); }
.commandments li:first-child { border-top: 0; }
.numeral {
  display: block;
  font-family: "IM Fell English SC", serif;
  font-size: 22px;
  letter-spacing: 2px;
  margin-bottom: 4px;
}
.post .commandments p { text-align: center; font-size: 17px; margin: 0 auto; max-width: 52ch; }

/* ---------- right ---------- */
.portrait { padding: 0 4px; }
.tags { margin: 6px 0 0; font-size: 14px; }
.status { padding: 4px 6px; }
.status a { font-weight: bold; }
.heart { color: #b3262e; }
.mood { margin: 0; text-align: center; }

.doing { list-style: none; margin: 0; padding: 0 6px; }
.doing li { margin: 6px 0; }
.ico { display: inline-block; width: 18px; text-align: center; }

.player {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--hl);
  color: var(--hl-ink);
  padding: 6px;
  font-size: 14px;
  border-bottom: 1px dashed var(--line);
}
.player button {
  border: 0;
  background: none;
  color: var(--hl-ink);
  font-size: 16px;
  cursor: pointer;
  padding: 0 2px;
  width: 20px;
}

.footer { text-align: right; padding: 4px 2px; font-size: 14px; }

/* ---------- phone ---------- */
@media (max-width: 640px) {
  body { padding: 8px 16px; }
  .grid { grid-template-columns: 1fr; }
  .col-main { border: 0; border-top: 1px dashed var(--line); border-bottom: 1px dashed var(--line); order: -1; }
  .col-left, .col-right { padding-top: 4px; }
  .col-right { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; align-items: start; }
  .col-right .player { grid-column: 1 / -1; }
  .nav > * { flex-basis: 33%; border-left: 0; }
  .nav > *:first-child { flex-basis: 100%; }
  .lab { grid-template-columns: 1fr; }
  .fav-split { grid-template-columns: 1fr; }
}

img.portrait {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}
