:root {
  --bg: #fff;
  --text: #000;
  --muted: #000;
  --rule: #d8d4cc;
  --hover: #ededed;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  padding:
    0
    env(safe-area-inset-right)
    env(safe-area-inset-bottom)
    env(safe-area-inset-left);
}

/* keep notch clearance only when launched as a home-screen PWA */
@media (display-mode: standalone) {
  body { padding-top: env(safe-area-inset-top); }
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 14px 80px;
}

.clock {
  font-family: Arial, sans-serif;
  font-size: 12px;
  color: var(--muted);
  text-align: left;
  padding: 14px 0 18px;
}

.topnav {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  align-items: baseline;
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.topnav::-webkit-scrollbar { display: none; }

.topnav a,
.topnav .inline-form,
.topnav button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.topnav a {
  color: var(--text);
  text-decoration: none;
}

/* the jar mark above the nav */
.site-mark {
  display: block;
  width: max-content;
  margin: 8px 0 16px;
}

.site-mark img {
  display: block;
  height: 46px;
  width: auto;
}

.topnav a:hover { text-decoration: underline; }

.topnav a.active { font-weight: bold; }

.topnav .en { color: var(--muted); }

.inline-form { display: inline; margin: 0; padding: 0; }

button {
  -webkit-appearance: none;
  appearance: none;
  font-family: 'Arial', Times, serif;
  font-size: 15px;
  font-weight: normal;
  color: #000;
  outline: 0;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  background-color: #f7f7f7;
  background-image: none;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid #c0c0c0;
}

button:hover {
  border-color: #9c9c9c;
}

a.btn {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
  font-size: 15px;
  color: #000;
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  background-color: #f7f7f7;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid #c0c0c0;
}

a.btn:hover {
  border-color: #9c9c9c;
  text-decoration: none;
}

.linklike {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--text);
  cursor: pointer;
}

.linklike:hover { text-decoration: underline; }

h1 {
  font-size: 28px;
  font-weight: normal;
  margin: 0 0 28px;
  line-height: 1.25;
}

h1 .en {
  display: block;
  font-size: 22px;
  color: var(--muted);
  margin-top: 4px;
}

.lang { margin-bottom: 28px; }
.lang p { margin: 0 0 14px; }
.lang.en { color: var(--muted); }

h2 {
  font-size: 17px;
  font-weight: normal;
  margin: 28px 0 8px;
}

h2 .en {
  color: var(--muted);
  margin-left: 6px;
}

ul {
  margin: 0 0 24px;
  padding-left: 20px;
}

ul li { margin-bottom: 4px; }
ul li .en { color: var(--muted); margin-left: 6px; }

.schedule-day { margin: 0 0 24px; }

.schedule-day h3 {
  font-size: 15px;
  font-weight: normal;
  margin: 24px 0 10px;
}

.schedule-day h3 .en { color: var(--muted); margin-left: 6px; }

.howto-section,
.howto-section * {
  color: #999 !important;
}

.howto-step {
  font-size: 14px;
  font-weight: normal;
  margin: 18px 0 6px;
}

.colophon-rule {
  margin: 36px 0 14px;
}

.colophon {
  font-size: 11px;
  color: #999;
  line-height: 1.5;
  margin: 0;
}

.colophon a {
  color: var(--text);
  text-decoration: underline;
}

ol.howto {
  margin: 0 0 18px;
  padding-left: 22px;
  font-size: 15px;
}

ol.howto li { margin-bottom: 4px; }
ol.howto li .en { color: var(--muted); }

.memory-feature {
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 36px 0;
  padding: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
}

@media (max-width: 600px) {
  .memory-feature {
    aspect-ratio: 1 / 1;
  }
}

.memory-feature img {
  display: block;
  width: auto;
  height: auto;
  max-width: 80%;
  max-height: 55%;
  object-fit: contain;
  opacity: 1;
  transition: opacity 2.5s ease;
  margin: 8px 0;
  flex: 0 1 auto;
  min-height: 0;
}

.memory-feature.fading img,
.memory-feature.fading .memory-feature-from,
.memory-feature.fading .memory-feature-info {
  opacity: 0;
}

.memory-feature-label {
  font-size: 13px;
  margin: 0 0 6px;
  color: #fff;
  text-align: center;
}

.memory-feature-from,
.memory-feature-info {
  color: #fff;
  font-size: 14px;
  margin: 4px 0 0;
  text-align: center;
  transition: opacity 2.5s ease;
}

.memory-feature-from .dot {
  width: 9px;
  height: 9px;
  vertical-align: middle;
  margin: 0 4px 0 0;
}

.memory-feature-info {
  font-size: 13px;
  color: #fff;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.schedule-day table {
  width: 100%;
  border-collapse: collapse;
}

.schedule-day td {
  padding: 8px 12px;
  vertical-align: top;
  font-size: 15px;
  line-height: 1.4;
  border: 1px solid #000;
}

.schedule-day td.schedule-time {
  width: 1%;
  white-space: nowrap;
  color: var(--muted);
  background: #f7f7f7;
}

.schedule-day td .en { color: var(--muted); font-size: 14px; }

.schedule-day tr.happening td { background: yellow; }
.schedule-day tr.happening td.schedule-time { background: #fffacd; }

.next-up-box {
  /* border: 1px solid var(--text); */
  /* border-radius: 6px; */
  padding: 14px;
  margin: 0 0 24px;
  text-align: center;
  background-color: yellow;
}

.profile-card {
  border: 1px solid #000;
  border-radius: 0;
  padding: 0;
  margin: 0 0 24px;
  aspect-ratio: 1.75 / 1;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  position: relative;
  background: #fff;
  overflow: hidden;
  border-radius: 10px;
}

.profile-card.is-guide {
  border: 2px solid #3a4fc0;
}

.guide-tag {
  display: inline-block;
  font-size: 11px;
  color: #fff;
  background: #3a4fc0;
  border: 1px solid #3a4fc0;
  padding: 1px 6px;
  border-radius: 0;
  margin-left: 6px;
  vertical-align: middle;
  font-weight: normal;
}

.profile-card > * {
  border-bottom: 1px solid #000;
  padding: 8px 12px;
  margin: 0;
}

.profile-card > *:last-child {
  border-bottom: none;
}

.profile-card-color {
  display: inline-block;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  margin-right: 8px;
  margin-top: -2px;
}

.profile-card-name {
  font-size: 22px;
  font-weight: normal;
  line-height: 1.15;
}

.profile-card-username {
  font-size: 14px;
  color: var(--muted);
}

.profile-card-bio {
  margin-top: auto;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
}

.next-up-box[hidden] { display: none; }

.next-up-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
}

.next-up-event {
  font-size: 16px;
  margin-bottom: 4px;
}

.next-up-event .en { color: var(--muted); font-size: 14px; margin-left: 4px; }

.next-up-countdown {
  font-size: 13px;
  color: var(--muted);
}

.illustration {
  display: block;
  max-width: 140px;
  width: 100%;
  height: auto;
  margin: 36px auto;
}

.illustration-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 36px auto;
}

.illustration-row .illustration {
  margin: 0;
  flex: 0 1 auto;
  max-width: 130px;
}

/* memory new */
.photo-picker {
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 16px 14px;
  margin: 0;
  text-align: center;
}

.photo-picker legend {
  font-size: 15px;
  padding: 0 4px;
  text-align: center;
}

.photo-picker-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 8px;
}

.photo-status {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0 0;
}

.photo-preview {
  display: block;
  max-width: 100%;
  max-height: 240px;
  margin-top: 10px;
  border-radius: 4px;
}

.upload-status {
  font-size: 13px;
  color: #999;
  margin: 6px 0 0;
}

/* salt room window */
.window-photo,
.window-photo-box {
  display: block;
  width: calc(100% - 20px);
  max-width: 300px;
  aspect-ratio: 1 / 1;
  border: 1px solid #000;
  background: #fff;
  margin: 10px 10px 26px;
  box-shadow: 0 0 0 10px #fff, 0 0 0 11px #000;
}

.window-photo { object-fit: cover; }

.window-photo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.window-photo-box.has-photo { padding: 0; }

.window-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.window-photo-prompt {
  text-align: center;
  color: #999;
  padding: 18px;
  font-size: 14px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.window-photo-prompt p { margin: 0; }

.window-replace {
  margin: 0 0 24px;
}

.push-row {
  margin: 0 0 14px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 0 0 24px;
}
.admin-table th,
.admin-table td {
  border: 1px solid #000;
  padding: 6px 10px;
  text-align: left;
  font-weight: normal;
  vertical-align: middle;
}
.admin-table th { background: #f7f7f7; font-size: 12px; color: #555; }
.admin-table button.danger {
  color: #b22222;
  border-color: #b22222;
}

.memory-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 24px;
  font-size: 15px;
}

/* memory */
.memories {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.memory {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 28px;
}

.memory:last-child {
  border-bottom: none;
}

.memory-img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 10px;
}

.memory-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 15px;
}

.memory-author {
  color: var(--text);
  text-decoration: none;
}

.memory-author:hover { text-decoration: underline; }

.memory-time {
  color: var(--muted);
  font-size: 12px;
}

.memory-line {
  margin: 4px 0;
  font-size: 15px;
}

.memory-line strong {
  font-weight: normal;
  color: var(--muted);
  font-size: 13px;
}

.memory-delete {
  margin: 10px 0 0;
}

.memory-delete-btn {
  color: #b22222;
  font-size: 13px;
}

.dot {
  display: inline-block;
  vertical-align: middle;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  margin-top: -2px;
}

hr {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 36px 0 24px;
}

.links {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #000;
  border-left: 1px solid #000;
  margin: 0 0 24px;
}

.links a,
.links a:focus,
.links a:active,
.links a:visited {
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  border: 0;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  border-radius: 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  background: transparent;
  -webkit-tap-highlight-color: transparent;
}

.links a:hover {
  background: var(--hover);
}

@media (max-width: 600px) {
  .links a {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .links a > .en {
    font-size: 12px;
    line-height: 1.25;
  }
}

.tool-icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
  margin-right: 8px;
  margin-top: -2px;
}

.people-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid #000;
  border-left: 1px solid #000;
  margin: 0 0 24px;
}

.people-list a {
  color: var(--text);
  text-decoration: none;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  -webkit-tap-highlight-color: transparent;
}

.people-list a:hover {
  background: var(--hover);
}

.people-list .en { color: var(--muted); font-size: 14px; }

.links a .en { color: var(--muted); font-size: 15px; }

.links a code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--hover);
  color: var(--text);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}

/* forms */
.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 28px;
}

.stack label {
  display: block;
  font-size: 15px;
}

.stack label > input,
.stack label > textarea,
.stack label > select {
  margin-top: 4px;
}

.stack label .en {
  color: var(--muted);
  margin-left: 2px;
}

.stack input,
.stack textarea,
.stack select {
  font: inherit;
  font-size: 16px; /* iOS Safari zooms in on inputs under 16px */
  padding: 6px 10px;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  color: var(--text);
  width: 100%;
}

.stack select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%),
                    linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: right 16px top 18px, right 11px top 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}

.stack textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.stack input:focus,
.stack textarea:focus,
.stack select:focus {
  outline: none;
  border-color: var(--text);
}

.stack button {
  align-self: flex-start;
}

.stack button.danger {
  color: #b22222;
}

.stack input[type="color"] {
  display: block;
  width: 60px;
  height: 40px;
  padding: 2px;
  cursor: pointer;
}

.stack .cancel {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

.stack .cancel:hover { text-decoration: underline; }

.error {
  color: #b22222;
  border: 1px solid #b22222;
  border-radius: 4px;
  padding: 10px 12px;
  background: #fdecec;
}

.muted-note {
  font-size: 14px;
  color: var(--muted);
  margin: -8px 0 0;
}

.muted-note code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--hover);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}

/* chat */
.chat {
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  padding: 0;
  height: 55vh;
  min-height: 320px;
  overflow-y: auto;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
}

.chat-msg {
  font-size: 15px;
  line-height: 1.5;
  padding: 8px 12px;
  border-bottom: 1px solid #000;
}

.chat-msg:last-child {
  border-bottom: none;
}

.chat-meta {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}

.chat-meta .dot { margin: 0; vertical-align: baseline; }

.chat-time {
  color: var(--muted);
  font-size: 12px;
  margin-left: 4px;
}

.chat-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.chat-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 32px;
}

.chat-form textarea {
  font: inherit;
  font-size: 16px; /* iOS Safari zooms in on inputs under 16px */
  padding: 6px 10px;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  resize: vertical;
  min-height: 60px;
}

.chat-form textarea:focus {
  outline: none;
  border-color: var(--text);
}

.chat-form button {
  align-self: flex-start;
}

/* profile */
.bio { margin-bottom: 24px; }

.contact {
  display: grid;
  grid-template-columns: max-content 1fr;
  margin: 0 0 24px;
  font-size: 15px;
  border-top: 1px solid #000;
  border-left: 1px solid #000;
}

.contact dt,
.contact dd {
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 8px 12px;
  margin: 0;
}

.contact dt {
  color: var(--muted);
  background: #f7f7f7;
  white-space: nowrap;
}

.contact dt .en { font-size: 13px; margin-left: 4px; }

.contact dd a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--rule);
}

.contact dd code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  background: var(--hover);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 13px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.notes {
  white-space: pre-wrap;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.6;
}

@media (min-width: 600px) {
  main { padding: 20px 20px; }
  h1 { font-size: 32px; }
  h1 .en { font-size: 24px; }
}

/* ---------- sun notes ---------- */

/* The dithered photo lives inside a tone wrapper. photocopy shows the
   1-bit image as-is; sun print is a cyanotype — white forms on prussian
   blue, made by inverting the image and screening it over a blue field. */
.note-photo,
.photo-preview-wrap {
  display: block;
  line-height: 0;
  overflow: hidden;
}

.photo-preview-wrap {
  display: inline-block;
  margin: 10px auto 0;
  border-radius: 4px;
}

.note-photo .memory-img,
.photo-preview-wrap .photo-preview {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0;
  image-rendering: pixelated;
}

.tone-sun-print { background: #0f3b8c; }
.tone-sun-print .memory-img,
.tone-sun-print .photo-preview {
  filter: invert(1);
  mix-blend-mode: screen;
}

.memory-img {
  image-rendering: pixelated;
}

/* the image and, in its place, the words it leaves behind */
.note-media {
  position: relative;
  margin-bottom: 10px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

.note-media .note-photo { display: block; }

.note-media .memory-img {
  width: 100%;
  height: auto;
  transition: opacity 0.9s ease;
}

.note-media.is-faded {
  min-height: 170px;
  background: #f2f2f2;
  cursor: default;
}

.note-size {
  position: absolute;
  right: 6px;
  bottom: 5px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
  background: transparent;
  padding: 1px 2px;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.note-media.tone-photocopy .note-size { color: #000; }
.note-media.tone-sun-print .note-size { color: #fff; }

.note-media.revealed .memory-img { opacity: 0 !important; }
.note-media.revealed .note-size { opacity: 0; }

.note-meta-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  padding: 28px 14px 14px;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 0.9s ease;
}

.note-media.revealed .note-meta-overlay,
.note-media.is-faded .note-meta-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* the words, centered in the space where the image was; margin:auto keeps
   them centred but still lets the overlay scroll when they overflow */
.note-meta-text {
  margin: auto;
  max-width: 100%;
  text-align: center;
}

.note-meta-text p {
  margin: 0 0 12px;
}

.note-meta-text p:last-child { margin-bottom: 0; }

.note-meta-text strong {
  display: block;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 1px;
  color: #888; /* grey labels */
}

.note-meta-text span {
  display: block;
  font-size: 15px;
  line-height: 1.45;
  color: #000;
}

.note-meta-text a { color: inherit; }

/* the sun's place that day, inside the card */
.note-sun {
  margin: 14px 0 2px;
  color: #000;
}

.note-sun .sun-arc {
  width: 130px;
  height: auto;
  margin: 0 auto 2px;
}

.note-sun .sun-arc path { stroke: currentColor; }
.note-sun .sun-arc circle { stroke: currentColor; fill: #fff; }

.note-when {
  margin: 10px 0 0;
  font-size: 12px;
  color: #888;
}

.note-actions {
  margin: 12px 0 0;
  display: flex;
  gap: 14px;
  justify-content: center;
  align-items: baseline;
  font-size: 13px;
}

.note-actions a,
.note-actions .linklike { color: #888; font-size: 13px; }
.note-actions .memory-delete-btn { color: #b22222; }

/* black & white notes: gray card, black text */
.note-media.tone-photocopy .note-meta-overlay {
  background: #e6e6e6;
}

.note-media.tone-photocopy .note-meta-text strong { color: #000; }
.note-media.tone-photocopy .note-when,
.note-media.tone-photocopy .note-actions a,
.note-media.tone-photocopy .note-actions .linklike { color: #555; }

/* cyanotype notes carry their blue into the revealed metadata */
.note-media.tone-sun-print .note-meta-overlay {
  background: #0f3b8c;
  color: #fff;
}

.note-media.tone-sun-print .note-meta-text strong,
.note-media.tone-sun-print .note-meta-text span,
.note-media.tone-sun-print .note-sun,
.note-media.tone-sun-print .note-when,
.note-media.tone-sun-print .note-actions a,
.note-media.tone-sun-print .note-actions .linklike {
  color: #fff;
}

.note-media.tone-sun-print .note-sun .sun-arc circle { fill: #0f3b8c; }

/* metadata table under each post */
.note-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid #000;
  border-left: 1px solid #000;
  font-size: 14px;
  margin: 0 0 10px;
}

.note-table th,
.note-table td {
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  padding: 6px 10px;
  text-align: left;
  vertical-align: top;
  font-weight: normal;
  line-height: 1.45;
}

.note-table th {
  width: 1%;
  white-space: nowrap;
  color: var(--muted);
  background: #f7f7f7;
  font-size: 13px;
}

.note-table td a { color: var(--text); }

/* instagram-style grid of a person's sunnotes */
.note-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
  margin: 0 0 24px;
}

.note-grid-cell {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f2f2f2;
}

.note-grid-cell .note-photo {
  margin: 0;
  border-radius: 0;
  width: 100%;
  height: 100%;
}

.note-grid-cell .memory-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.note-grid-faded {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #bbb;
}

/* fade-length slider */
.stack input[type="range"] {
  width: 100%;
  accent-color: #000;
  padding: 0;
  border: none;
}

.sun-fieldset .muted-note { margin: 6px 0 0; }

.avatar-dot {
  display: inline-block;
  width: 34px;
  height: 34px;
  object-fit: cover;
  vertical-align: middle;
  margin-right: 9px;
  margin-top: -2px;
  border: 1px solid #000;
  image-rendering: pixelated;
}

.avatar-big {
  display: block;
  width: 96px;
  height: 96px;
  object-fit: cover;
  border: 1px solid #000;
  margin-bottom: 12px;
  image-rendering: pixelated;
}

.avatar-preview {
  max-width: 160px;
  image-rendering: pixelated;
}

.sun-arc {
  display: block;
  height: auto;
}

.sunline-label {
  display: block;
  font-size: 11px;
  color: inherit;
  margin-top: 2px;
}

.note-foot {
  display: flex;
  gap: 14px;
  align-items: baseline;
  font-size: 12px;
  color: #999;
  margin: 10px 0 0;
}

.note-foot a { color: #999; }
.note-foot .linklike { font-size: 12px; color: #999; }
.note-foot .memory-delete-btn { color: #b22222; }

.night-box {
  text-align: center;
  padding: 60px 20px;
}

.night-moon {
  font-size: 64px;
  margin-bottom: 18px;
}

.night-box h1 { margin-bottom: 12px; }

.night-sunrise {
  color: var(--muted);
  font-size: 14px;
}

.site-logo {
  display: block;
  width: 90px;
  height: auto;
  margin: 6px 0 24px;
}

.footer-sun {
  text-align: center;
  margin: 0 0 20px;
}

.footer-arc {
  display: block;
  width: 130px;
  height: auto;
  margin: 0 auto 6px;
}

.footer-hours {
  font-size: 11px;
  color: #999;
  margin: 0;
}

.footer-logo {
  display: block;
  width: 54px;
  height: auto;
  margin: 28px auto 40px;
  opacity: 0.85;
}

/* the logo stands in for a missing avatar — show the whole jar, don't crop it */
img.avatar-dot[src$="logo.svg"],
img.avatar-big[src$="logo.svg"] {
  object-fit: contain;
  background: #fff;
}
