body.phase-a {
  background-color: var(--a-bg);
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.2) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.16) 0 1px, transparent 1px);
  background-size: 32px 32px;
}

.window {
  background: var(--a-card);
  border: 2px solid #8fa2ad;
  box-shadow: 8px 8px 0 rgba(35, 48, 58, .2);
}
.titlebar {
  background: var(--a-blue);
  color: #fff;
}
.titlebar i {
  width: 14px;
  height: 14px;
  border: 1px solid #fff;
  background: #c7c7c7;
}

.content-window { padding-bottom: 22px; }
.content-window header { padding: 24px 28px 0; }
.posts {
  padding: 0 28px;
  display: grid;
  gap: 10px;
}
.posts p {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  margin: 0;
  border-bottom: 1px dotted #bac8d0;
  padding: 8px 0;
}
.posts b { color: var(--a-title); }
.secret span { color: var(--a-card); background: var(--a-card); }
.secret span::selection { color: var(--a-text); background: #c8dce4; }
.fake-form {
  margin: 18px 28px 0;
  border: 1px solid var(--a-line);
  padding: 12px;
  display: grid;
  gap: 8px;
}
.fake-form label {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
}
.fake-form input {
  min-width: 0;
  border: 1px solid #8fa2ad;
  background: var(--a-paper);
  padding: 6px;
}
.fake-form button { justify-self: start; }

.gallery-grid {
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.photo-frame {
  margin: 0;
  border: 1px solid var(--a-line);
  background: var(--a-paper);
  padding: 10px;
}
.photo-slot {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  margin: 0;
  padding: 0;
  border: 2px solid #343034;
  position: relative;
  overflow: hidden;
  background: #0c1620;
  image-rendering: pixelated;
  appearance: none;
}
.photo-slot img,
.pixel-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.photo-slot img {
  object-fit: fill;
  image-rendering: pixelated;
  opacity: 0;
}
.photo-frame.is-loaded .photo-slot img { opacity: 1; }
.pixel-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  background-image: linear-gradient(90deg, transparent 0 15px, rgba(255,255,255,.18) 15px);
  background-size: 16px 16px;
}
.fallback-corridor {
  background:
    linear-gradient(90deg, #0c1620, #1d4e89 45%, #0c1620),
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(95,214,200,.35) 14px 15px);
}
.fallback-stairs {
  background: linear-gradient(135deg, #0c1620 0 36%, #b8cad6 36% 42%, #0c1620 42% 52%, #5fd6c8 52% 57%, #0c1620 57%);
  transform: scaleX(-1);
}
.fallback-room {
  background:
    radial-gradient(circle at 68% 50%, #ff5b5b 0 8px, transparent 9px),
    linear-gradient(#455252 0 32%, #0c1620 32% 100%);
}
.fallback-missing {
  background: repeating-linear-gradient(45deg, var(--a-card) 0 8px, #44494D 8px 16px);
}
figcaption {
  margin-top: 8px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  word-break: break-all;
}
.gallery-note { margin: 16px 28px 0; color: #5f6d74; }
.reveal-note { margin: 10px 28px 0; color: #4b6270; font-size: 13px; }

.memo-window { width: min(100%, 760px); }
.memo-list {
  margin: 0 28px 18px;
  display: grid;
  gap: 10px;
}
.memo-list article {
  border-bottom: 1px dotted #bac8d0;
  padding: 8px 0 10px;
}
.memo-list time {
  display: block;
  margin-bottom: 5px;
  color: var(--a-notice);
  font-family: "Courier New", monospace;
  font-size: 13px;
}
.memo-list p { margin-bottom: 0; line-height: 1.7; }
.vertical-key b { color: var(--a-title); font-weight: 700; }
.notice-table {
  width: calc(100% - 56px);
  margin: 0 28px 18px;
  border-collapse: collapse;
  background: var(--a-paper);
}
.notice-table th,
.notice-table td {
  border: 1px solid var(--a-line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
}
.notice-table th {
  width: 132px;
  color: var(--a-notice);
  font-family: "Courier New", monospace;
  font-weight: 400;
}
.notice-table .struck td {
  color: #6f7f87;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.link-list {
  margin: 0 28px 18px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}
.link-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--a-line);
  background: var(--a-paper);
  padding: 8px;
}
.link-list button {
  border: 0;
  background: transparent;
  color: #1b3e6b;
  text-align: left;
  padding: 0;
  cursor: pointer;
  font-family: "Courier New", monospace;
  word-break: break-all;
}
.link-list span { color: #5f6d74; font-size: 13px; }
.cache-box {
  margin: 0 28px 16px;
  padding: 14px;
  border: 1px solid var(--a-line);
  background: #eef6f8;
  color: #23303a;
  font-family: "Courier New", monospace;
  line-height: 1.65;
  overflow: auto;
}

body.phase-a.cute-subpage {
  background-color: var(--a-bg);
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.28) 0 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.2) 0 1px, transparent 1px);
  background-size: 30px 30px;
}
.cute-subpage .window {
  width: min(100%, 780px);
  border-color: #7fa1b2;
  border-radius: 10px;
  background: #fffdfd;
  box-shadow: 10px 10px 0 rgba(43, 61, 75, .15);
  overflow: hidden;
}
.cute-subpage .titlebar {
  min-height: 36px;
  background: linear-gradient(90deg, #9ce0de, #ffc3dc 62%, #e7e3ff);
  color: #263948;
  border-bottom: 2px solid #7fa1b2;
}
.cute-subpage .titlebar i {
  border: 2px solid #7597aa;
  background: #fff;
}
.cute-subpage .content-window { padding-bottom: 0; }
.cute-subpage .content-window header {
  padding: 22px 24px 10px;
  background:
    linear-gradient(90deg, rgba(255,255,255,.88), rgba(255,255,255,.54)),
    linear-gradient(135deg, rgba(255,224,236,.38), rgba(220,248,239,.28));
  border-bottom: 1px solid #8baabc;
}
.cute-subpage .meta { color: #617985; }
.cute-subpage h1 { color: #8a3a56; font-size: 34px; }
.cute-subpage .page-copy { margin-bottom: 8px; }
.cute-subpage .posts {
  padding: 18px 24px 0;
  gap: 8px;
}
.cute-subpage .posts p {
  grid-template-columns: 72px minmax(0, 1fr);
  border: 1px solid #8baabc;
  background: #fff;
  padding: 9px 10px;
}
.cute-subpage .posts b { color: #8a3a56; }
.cute-subpage .fake-form {
  margin: 14px 24px 20px;
  border-color: #8baabc;
  background: linear-gradient(#fff, #f7fcfd);
}
.cute-subpage .fake-form input,
.cute-subpage .address-form input {
  border-color: #8baabc;
  background: #fafdff;
}
.cute-subpage .plain-button,
.cute-subpage .address-form button {
  border-color: #8baabc;
  background: #edf8fa;
}
.cute-subpage .gallery-grid {
  padding: 18px 24px 0;
  gap: 12px;
}
.cute-subpage .photo-frame {
  border-color: #8baabc;
  background: #fff;
  box-shadow: 4px 4px 0 rgba(43, 61, 75, .08);
}
.cute-subpage .gallery-note,
.cute-subpage .reveal-note {
  margin-left: 24px;
  margin-right: 24px;
}
.cute-subpage .gallery-note {
  border: 1px dashed #a6bbc6;
  background: #fff3c4;
  color: #617985;
  padding: 9px 10px;
}
.cute-subpage .site-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  background: #fff;
  padding: 10px 24px;
}
.cute-subpage .address-panel { width: min(100%, 780px); }

@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .posts p { grid-template-columns: 64px minmax(0, 1fr); }
  .notice-table {
    width: calc(100% - 36px);
    margin: 0 18px 16px;
    font-size: 14px;
  }
  .notice-table th,
  .notice-table td {
    display: block;
    width: 100%;
  }
  .memo-list,
  .link-list,
  .cache-box {
    margin-left: 18px;
    margin-right: 18px;
  }
  .link-list li { grid-template-columns: 1fr; }
  .cute-subpage .window { border-radius: 6px; }
  .cute-subpage .content-window header { padding: 18px 18px 10px; }
  .cute-subpage h1 { font-size: 29px; }
  .cute-subpage .posts,
  .cute-subpage .gallery-grid {
    padding-left: 18px;
    padding-right: 18px;
  }
  .cute-subpage .posts p { grid-template-columns: 58px minmax(0, 1fr); }
  .cute-subpage .fake-form {
    margin-left: 18px;
    margin-right: 18px;
  }
  .cute-subpage .gallery-note,
  .cute-subpage .reveal-note {
    margin-left: 18px;
    margin-right: 18px;
  }
}
