:root {
  color-scheme: light;
  font-family: Tahoma, "Microsoft YaHei", sans-serif;
  color: #1b1b1b;
  background: #008080;
  --guestbook-blue: #000080;
  --guestbook-blue-light: #1269c5;
  --guestbook-paper: #faf6ed;
  --guestbook-shadow: rgba(0, 24, 35, .44);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow: hidden;
  background: #008080;
  display: grid;
  place-items: center;
}

button,
a,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px dotted #fff;
  outline-offset: 2px;
}

a {
  color: inherit;
}

.guestbook-shell {
  position: relative;
  width: min(100vw, calc(100dvh * 16 / 9));
  height: min(100dvh, calc(100vw * 9 / 16));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
}

.guestbook-scene {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-color: #008080;
  background-image: url("./guestbook-scene.png?v=20260804-2");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  image-rendering: pixelated;
}

.guestbook-topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  height: clamp(50px, 7.25vh, 78px);
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(14px, 1.55vw, 30px);
  color: #fff;
  background: #000080;
  border-bottom: 2px solid #000;
  box-shadow: 0 1px 0 #1269c5;
}

.guestbook-brand,
.guestbook-nav,
.guestbook-nav a {
  display: flex;
  align-items: center;
}

.guestbook-brand {
  gap: clamp(7px, .65vw, 13px);
  color: #fff;
  font-size: clamp(15px, 1.52vw, 27px);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.guestbook-brand img {
  width: clamp(20px, 1.55vw, 29px);
  height: clamp(20px, 1.55vw, 29px);
  image-rendering: pixelated;
}

.guestbook-brand b {
  color: #fff6a7;
  font-size: clamp(18px, 1.65vw, 30px);
  font-weight: 400;
  line-height: 1;
}

.guestbook-nav {
  height: 100%;
  margin-left: auto;
}

.guestbook-nav a {
  position: relative;
  height: 100%;
  gap: clamp(4px, .4vw, 8px);
  padding: 0 clamp(9px, 1.05vw, 21px);
  color: #fff;
  font-size: clamp(12px, .86vw, 17px);
  text-decoration: none;
  white-space: nowrap;
}

.guestbook-nav a:hover,
.guestbook-nav a:focus-visible {
  background: rgba(255, 255, 255, .08);
}

.guestbook-nav a.is-current::after {
  position: absolute;
  right: 10%;
  bottom: 0;
  left: 10%;
  height: 3px;
  background: #fff;
  content: "";
}

.guestbook-nav img {
  width: clamp(15px, 1.15vw, 22px);
  height: clamp(15px, 1.15vw, 22px);
  object-fit: contain;
  image-rendering: pixelated;
}

.guestbook-window,
.guestbook-content {
  position: absolute;
  inset: 0;
}

.guestbook-window {
  z-index: 1;
  pointer-events: none;
}

.guestbook-content {
  padding: 0;
  background: transparent;
}

.guestbook-board {
  position: absolute;
  z-index: 2;
  top: 13.1%;
  left: 13.7%;
  width: 79.3%;
  height: 76.8%;
  overflow: visible;
  pointer-events: auto;
}

.guestbook-board-surface {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
}

.guestbook-board-heading {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.guestbook-header-reference {
  position: absolute;
  z-index: 5;
  top: -.1%;
  left: 0;
  display: block;
  width: 46.102%;
  height: auto;
  pointer-events: none;
  image-rendering: pixelated;
}

.guestbook-sign {
  position: absolute;
  top: -.3%;
  left: .2%;
  display: flex;
  width: 19.2%;
  height: 14.8%;
  align-items: center;
  gap: 7%;
  padding: 1.5% 2.2%;
  border: 2px solid #9a6f2a;
  background: #f3d88d;
  box-shadow: 4px 5px 0 rgba(71, 39, 11, .38);
  transform: rotate(-1.4deg);
  opacity: 0;
}

.guestbook-sign img {
  width: 23%;
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
}

.guestbook-sign-title,
.guestbook-sign-subtitle {
  margin: 0;
}

.guestbook-sign-title {
  color: #39210d;
  font-size: clamp(17px, 1.65vw, 31px);
  font-weight: 900;
  line-height: 1;
}

.guestbook-sign-subtitle {
  margin-top: 5px;
  color: #62431c;
  font-size: clamp(8px, .57vw, 11px);
  letter-spacing: .16em;
}

.guestbook-intro-note {
  position: absolute;
  top: 0;
  left: 21.4%;
  width: 20%;
  height: 10.8%;
  padding: 1.1% 1.6%;
  color: #563719;
  background: #f4e6bd;
  border: 1px solid #ad8750;
  box-shadow: 2px 3px 0 rgba(71, 39, 11, .25);
  transform: rotate(.7deg);
  opacity: 0;
}

.guestbook-intro-note::after {
  position: absolute;
  right: -1px;
  top: -1px;
  width: 22%;
  height: 36%;
  background: #fff4d4;
  border-left: 1px solid #ad8750;
  border-bottom: 1px solid #ad8750;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
  content: "";
}

.guestbook-intro-note p {
  margin: 0;
  font-size: clamp(8px, .55vw, 11px);
  line-height: 1.65;
}

.guestbook-write {
  position: absolute;
  top: 3.5%;
  right: .3%;
  display: inline-flex;
  width: 14.2%;
  height: 7.7%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 8px;
  border: 2px solid;
  border-color: #a9d4ff #00145f #00145f #a9d4ff;
  color: #fff;
  background: #0d4bb5;
  box-shadow: 3px 4px 0 rgba(0, 28, 73, .4);
  font-size: clamp(11px, .86vw, 17px);
  font-weight: 700;
  cursor: pointer;
  pointer-events: auto;
}

.guestbook-write span {
  color: #fff3a2;
  font-size: 1.2em;
}

.guestbook-write::after {
  position: absolute;
  top: -12px;
  right: -10px;
  display: grid;
  width: clamp(18px, 1.35vw, 26px);
  height: clamp(18px, 1.35vw, 26px);
  place-items: center;
  border: 2px solid #fff0f5;
  border-radius: 50%;
  color: #fff;
  background: #f15c9c;
  box-shadow: 1px 2px 0 rgba(86, 18, 55, .45);
  content: "+";
  font-size: clamp(14px, 1vw, 19px);
  font-weight: 900;
  line-height: 1;
}

.guestbook-write:hover,
.guestbook-write:focus-visible {
  background: #1769d1;
}

.guestbook-write:active,
.guestbook-submit:active,
.guestbook-dialog-close:active,
.guestbook-pagination button:active {
  border-color: #404040 #fff #fff #404040;
  box-shadow: inset 1px 1px 0 #808080;
  transform: translate(1px, 1px);
}

.guestbook-privacy-note {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.guestbook-note-grid {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: block;
  min-height: 0;
  padding: 0;
  pointer-events: none;
}

.guestbook-note {
  position: absolute;
  top: var(--note-y, 0%);
  left: var(--note-x, 0%);
  display: flex;
  width: var(--note-w, 12%);
  height: var(--note-h, 22%);
  min-width: 0;
  min-height: 0;
  padding: clamp(9px, .8vw, 15px) clamp(8px, .72vw, 14px) clamp(8px, .62vw, 12px);
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid rgba(69, 48, 26, .52);
  border-radius: 0;
  color: #2e241b;
  box-shadow: 3px 5px 0 rgba(70, 41, 17, .36);
  cursor: pointer;
  text-align: left;
  transform: rotate(var(--note-rotate, 0deg));
  transition: transform 160ms ease, box-shadow 160ms ease;
  z-index: var(--note-z, 2);
  pointer-events: auto;
}

.guestbook-note:hover,
.guestbook-note:focus-visible {
  z-index: 8;
  box-shadow: 5px 9px 0 rgba(70, 41, 17, .38);
  transform: translateY(-4px) rotate(var(--note-rotate, 0deg));
}

.guestbook-note.is-selected {
  outline: 2px dashed #fff;
  outline-offset: 3px;
  box-shadow:
    0 0 0 4px rgba(28, 117, 205, .92),
    4px 6px 0 rgba(35, 70, 93, .45);
}

.guestbook-note-pointer {
  position: absolute;
  right: -7px;
  bottom: -13px;
  color: #fff;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
  font-size: clamp(22px, 2vw, 34px);
  line-height: 1;
  text-shadow: 1px 1px 0 #111, -1px 0 0 #111, 0 -1px 0 #111;
  transform: rotate(-12deg);
  pointer-events: none;
}

.guestbook-note:active {
  transform: translateY(-1px) scale(.985) rotate(var(--note-rotate, 0deg));
}

.guestbook-note::before {
  position: absolute;
  top: 4%;
  left: 50%;
  width: clamp(12px, 1.05vw, 22px);
  height: clamp(12px, 1.05vw, 22px);
  border: 1px solid rgba(0, 0, 0, .34);
  border-radius: 50%;
  background: var(--pin-color, #d22b25);
  box-shadow: 1px 2px 0 rgba(0, 0, 0, .35);
  content: "";
  transform: translateX(-50%);
}

.guestbook-note::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 0;
  height: 0;
  border-top: clamp(10px, 1vw, 19px) solid transparent;
  border-right: clamp(10px, 1vw, 19px) solid rgba(255, 255, 255, .48);
  content: "";
}

.guestbook-note.tone-yellow {
  --pin-color: #e4aa12;
  background:
    repeating-linear-gradient(0deg, rgba(155, 106, 27, .03) 0 1px, transparent 1px 4px),
    #f8dfa0;
}

.guestbook-note.tone-blue {
  --pin-color: #1c6abd;
  background:
    repeating-linear-gradient(0deg, rgba(20, 75, 131, .035) 0 1px, transparent 1px 4px),
    #b8def1;
}

.guestbook-note.tone-pink {
  --pin-color: #d93944;
  background:
    repeating-linear-gradient(0deg, rgba(137, 41, 63, .035) 0 1px, transparent 1px 4px),
    #efb2bd;
}

.guestbook-note-author,
.guestbook-note-summary,
.guestbook-note-date {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.guestbook-note-author {
  width: 100%;
  font-size: clamp(10px, .72vw, 15px);
  font-weight: 700;
  white-space: nowrap;
}

.guestbook-note-summary {
  display: -webkit-box;
  width: 100%;
  margin: 7px 0 8px;
  flex: 1;
  font-size: clamp(9px, .63vw, 13px);
  line-height: 1.52;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.guestbook-note-date {
  width: 100%;
  color: #5f513d;
  font-size: clamp(7px, .48vw, 10px);
  white-space: nowrap;
}

.guestbook-wall-empty {
  position: absolute;
  top: 48%;
  right: 0;
  left: 0;
  margin: 0;
  color: #3d2a19;
  font-size: 14px;
  text-align: center;
}

.guestbook-board-footer {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: -.4%;
  left: 0;
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: flex-end;
}

.guestbook-wall-meta {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.guestbook-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.guestbook-pagination[hidden] {
  display: none;
}

.guestbook-pagination button {
  display: grid;
  width: 29px;
  height: 27px;
  place-items: center;
  padding: 0;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  color: #111;
  background: #c0c0c0;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.guestbook-pagination button:disabled {
  color: #777;
  cursor: default;
  opacity: .65;
}

.guestbook-page-dots {
  display: inline-flex;
  min-width: 16px;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.guestbook-page-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 1px solid #222;
  border-radius: 50%;
  background: #f5f3eb;
  cursor: pointer;
}

.guestbook-page-dot.is-current {
  background: #000080;
}

.guestbook-side-rail {
  position: absolute;
  z-index: 3;
  top: 8.8%;
  left: 0;
  width: 13.5%;
  height: 81%;
  pointer-events: none;
}

.guestbook-side-note {
  position: absolute;
  top: 31%;
  left: 20%;
  width: 65%;
  height: 22%;
  padding: 37% 8% 5%;
  color: #574328;
  background: transparent;
  border: 0;
  box-shadow: none;
  transform: rotate(-1.2deg);
}

.guestbook-side-note::before {
  display: none;
}

.guestbook-side-note p {
  margin: 0;
  font-size: clamp(9px, .6vw, 12px);
  line-height: 1.7;
  text-align: center;
}

.guestbook-side-note span {
  display: block;
  margin-top: 8%;
  color: #ed9d15;
  font-size: clamp(17px, 1.4vw, 27px);
  text-align: center;
}

.guestbook-since-card {
  position: absolute;
  top: 56%;
  left: 21%;
  width: 64%;
  height: 8%;
  padding-top: 24%;
  color: #fff;
  background: transparent;
  border: 0;
  box-shadow: none;
  font-size: clamp(8px, .55vw, 11px);
  text-align: center;
  text-shadow: 1px 1px #16607b;
  transform: rotate(-1deg);
}

.guestbook-since-card::before {
  display: none;
}

.guestbook-computer-screen {
  position: absolute;
  top: 75%;
  left: 28%;
  width: 43%;
  height: 8%;
  padding-top: 5%;
  color: #8df58f;
  font: 700 clamp(6px, .52vw, 10px)/1.05 "Courier New", monospace;
  text-align: center;
  text-shadow: 1px 1px #14251c;
  transform: rotate(-1deg);
}

.guestbook-footer {
  position: absolute;
  z-index: 4;
  right: 27%;
  bottom: .8%;
  left: 27%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, .8vw, 16px);
  color: #b6eeee;
  font-size: clamp(9px, .76vw, 13px);
  line-height: 1.35;
  text-align: left;
  text-shadow: 1px 1px #005c5c;
}

.guestbook-footer img {
  width: clamp(21px, 1.65vw, 32px);
  height: clamp(21px, 1.65vw, 32px);
  object-fit: contain;
  image-rendering: pixelated;
}

.guestbook-footer img:last-child {
  width: clamp(30px, 2.2vw, 34px);
  height: clamp(30px, 2.2vw, 34px);
}

.guestbook-dialog {
  position: fixed;
  z-index: 50;
  width: min(386px, calc(100vw - 22px));
  max-height: calc(100vh - 20px);
  padding: 0;
  border: 2px solid;
  border-color: #fff #202020 #202020 #fff;
  background: #c0c0c0;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #808080,
    4px 5px 0 #000;
  color: #111;
}

.guestbook-dialog::backdrop {
  background: rgba(0, 15, 20, .08);
}

.guestbook-detail-dialog {
  position: absolute;
  z-index: 30;
  top: 15.4%;
  right: auto;
  bottom: auto;
  left: 46.1%;
  width: 38.2%;
  height: 75.2%;
  max-height: none;
  margin: 0;
  transform: translateX(-50%);
}

.guestbook-detail-dialog::backdrop {
  background: transparent;
}

.guestbook-dialog-frame {
  max-height: calc(100vh - 24px);
  overflow: auto;
}

.guestbook-detail-dialog .guestbook-dialog-frame {
  height: 100%;
  overflow: hidden;
}

.guestbook-detail-dialog .guestbook-dialog-body {
  display: flex;
  height: calc(100% - 30px);
  min-height: 0;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}

.guestbook-dialog-titlebar {
  position: relative;
  display: flex;
  min-height: 30px;
  align-items: center;
  justify-content: space-between;
  padding: 3px 5px;
  color: #fff;
  background: linear-gradient(90deg, #000080, #1269c5);
}

.guestbook-dialog-caption {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.guestbook-dialog-caption::after {
  content: none;
}

.guestbook-dialog-caption::before {
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url("./win98-icons/notepad_0.png") center / contain no-repeat;
  content: "";
  image-rendering: pixelated;
}

#compose-title::after {
  position: absolute;
  top: 1px;
  right: 14px;
  color: #fff3a2;
  content: "✦";
  font-size: 18px;
}

#guestbook-compose-dialog .guestbook-dialog-close {
  color: transparent;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.guestbook-dialog-close {
  display: grid;
  width: 22px;
  height: 21px;
  flex: 0 0 auto;
  place-items: center;
  color: #000;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.guestbook-dialog-body {
  padding: 14px 18px 9px;
  background: var(--guestbook-paper);
  border: 1px solid;
  border-color: #808080 #fff #fff #808080;
}

.guestbook-form {
  display: grid;
  gap: 8px;
  margin: 0;
}

.guestbook-field {
  display: grid;
  gap: 5px;
  color: #18305f;
  font-size: 12px;
  font-weight: 700;
}

.guestbook-field > span {
  display: inline-flex;
  min-height: 17px;
  align-items: center;
  gap: 5px;
}

.guestbook-field > span img {
  width: 14px;
  height: 14px;
  object-fit: contain;
  image-rendering: pixelated;
}

.guestbook-field b {
  color: #d51c38;
}

.guestbook-field small,
.guestbook-hint {
  color: #666;
  font-size: 10px;
  font-weight: 400;
}

.guestbook-field input,
.guestbook-field textarea {
  width: 100%;
  padding: 6px 9px;
  border: 1px solid #b9b9b9;
  border-radius: 4px;
  color: #111;
  background: #fff;
  font: 12px/1.4 Tahoma, "Microsoft YaHei", sans-serif;
}

.guestbook-field input {
  height: 31px;
}

.guestbook-field textarea {
  height: 90px;
  resize: vertical;
}

.guestbook-message-control {
  position: relative;
  display: block !important;
  min-height: 0 !important;
}

.guestbook-message-control .guestbook-counter {
  position: absolute;
  right: 8px;
  bottom: 6px;
  color: #69717d;
  font-size: 10px;
  font-weight: 400;
  pointer-events: none;
}

.guestbook-field input:focus,
.guestbook-field textarea:focus {
  outline: 1px dotted #000;
  outline-offset: 1px;
}

.guestbook-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.guestbook-toggle {
  position: relative;
  display: grid;
  min-height: 39px;
  grid-template-columns: 20px 1fr 32px;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 1px solid #d8d5cc;
  border-radius: 7px;
  background: #fbfaf5;
  color: #1b315d;
}

.guestbook-toggle > img,
.guestbook-option-lock {
  width: 17px;
  height: 17px;
  object-fit: contain;
  image-rendering: pixelated;
}

.guestbook-option-lock {
  position: relative;
  margin-left: 1px;
  border: 2px solid #193c75;
  background: #3f70ae;
}

.guestbook-option-lock::before {
  position: absolute;
  top: -8px;
  left: 2px;
  width: 7px;
  height: 8px;
  border: 2px solid #193c75;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  content: "";
}

.guestbook-toggle-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.guestbook-toggle-copy strong,
.guestbook-toggle-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guestbook-toggle-copy strong {
  font-size: 12px;
}

.guestbook-toggle-copy small {
  color: #69717d;
  font-size: 9px;
  font-weight: 400;
}

.guestbook-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.guestbook-switch {
  position: relative;
  display: block;
  width: 32px;
  height: 17px;
  grid-column: 3;
  border: 1px solid #aeb1b5;
  border-radius: 10px;
  background: #c8c9ca;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .12);
}

.guestbook-switch::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .28);
  content: "";
  transition: transform 150ms ease;
}

.guestbook-toggle input:checked + .guestbook-switch {
  background: #4b8ce4;
}

.guestbook-toggle input:checked + .guestbook-switch::after {
  transform: translateX(15px);
}

.guestbook-toggle input:focus-visible + .guestbook-switch {
  outline: 1px dotted #000;
  outline-offset: 2px;
}

.guestbook-actions {
  display: block;
  margin-top: 1px;
}

.guestbook-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 31px;
  padding: 0 15px;
  border: 2px solid;
  border-color: #fff #404040 #404040 #fff;
  background: #c0c0c0;
  color: #111;
  font: 700 12px Tahoma, "Microsoft YaHei", sans-serif;
  cursor: pointer;
}

.guestbook-submit {
  border-color: #b8c8e8 #00145f #00145f #b8c8e8;
  background: #143dad;
  color: #fff;
}

.guestbook-submit::before {
  content: "✈";
  font-size: 14px;
  line-height: 1;
}

.guestbook-submit:disabled {
  cursor: wait;
  opacity: .65;
}

.guestbook-status {
  min-height: 0;
  margin: 0;
  color: #000080;
  font-size: 11px;
  line-height: 1.4;
}

.guestbook-status.is-error {
  color: #9d1111;
  font-weight: 700;
}

.guestbook-status.is-success {
  color: #176b26;
  font-weight: 700;
}

.guestbook-form-note {
  margin: 3px 0 0;
  color: #d9443d;
  font-size: 11px;
  text-align: center;
}

.guestbook-status:empty {
  display: none;
}

.guestbook-detail-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed #8d8d8d;
}

.guestbook-detail-heading img {
  width: 39px;
  height: 39px;
  object-fit: contain;
  image-rendering: pixelated;
}

.guestbook-detail-heading h2,
.guestbook-detail-heading p {
  margin: 0;
}

.guestbook-detail-heading h2 {
  font-size: 15px;
  line-height: 1.4;
}

.guestbook-detail-heading p {
  margin-top: 3px;
  color: #6a6a6a;
  font-size: 10px;
}

.guestbook-detail-message {
  min-height: 0;
  margin: 12px 0;
  padding: 0;
  flex: 1;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border: 0;
  background: transparent;
  font-size: 12px;
  line-height: 1.65;
}

.guestbook-reply {
  padding: 10px 12px;
  border: 1px solid #8a845f;
  background: #f8e9ae;
}

.guestbook-reply-heading {
  display: flex;
  align-items: center;
  gap: 6px;
}

.guestbook-reply-heading img {
  width: 17px;
  height: 17px;
  image-rendering: pixelated;
}

.guestbook-reply-heading h3 {
  margin: 0;
  font-size: 12px;
}

.guestbook-reply p {
  margin: 6px 0 0;
  color: #4f4421;
  font-size: 11px;
  line-height: 1.6;
}

@media (max-width: 1100px) {
  .guestbook-nav a {
    padding-inline: 7px;
  }

  .guestbook-nav a:not(.is-current) span {
    display: none;
  }

  .guestbook-board {
    left: 15%;
    width: 79%;
  }
}

@media (max-width: 760px) {
  body {
    display: block;
    overflow: auto;
    overflow-x: hidden;
  }

  .guestbook-shell {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    aspect-ratio: auto;
    overflow: visible;
  }

  .guestbook-scene {
    position: fixed;
    background-size: auto 100%;
    background-position: center top;
  }

  .guestbook-topbar {
    position: relative;
    height: auto;
    min-height: 50px;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    padding: 7px 10px 0;
  }

  .guestbook-brand {
    font-size: 16px;
  }

  .guestbook-nav {
    width: 100%;
    height: 33px;
    overflow-x: auto;
    margin: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .guestbook-nav::-webkit-scrollbar {
    display: none;
  }

  .guestbook-nav a,
  .guestbook-nav a:not(.is-current) span {
    display: flex;
    height: 33px;
    flex: 0 0 auto;
    gap: 4px;
    padding-inline: 9px;
    font-size: 11px;
  }

  .guestbook-side-rail {
    display: none;
  }

  .guestbook-window {
    position: relative;
    min-height: 820px;
  }

  .guestbook-board {
    position: relative;
    top: auto;
    left: auto;
    width: calc(100% - 18px);
    height: 780px;
    margin: 20px auto 25px;
    overflow: hidden;
    background: #bd762d url("./guestbook-board-bg.png?v=20260803-1") center / 100% 100% no-repeat;
  }

  .guestbook-board-surface {
    padding: 15px;
  }

  .guestbook-board-heading {
    position: relative;
    inset: auto;
    height: 118px;
  }

  .guestbook-header-reference {
    top: 0;
    left: 0;
    width: 96%;
    max-width: 430px;
  }

  .guestbook-sign {
    top: 0;
    left: 0;
    width: 55%;
    height: 66px;
    padding: 7px 10px;
  }

  .guestbook-sign-title {
    font-size: 22px;
  }

  .guestbook-intro-note {
    top: 73px;
    left: 0;
    width: 76%;
    height: 43px;
    padding: 5px 7px;
  }

  .guestbook-intro-note p {
    font-size: 9px;
  }

  .guestbook-write {
    top: 8px;
    right: 0;
    width: 34%;
    height: 40px;
    font-size: 12px;
  }

  .guestbook-note-grid {
    position: absolute;
    top: 139px;
    right: 7px;
    bottom: 38px;
    left: 7px;
    inset-inline: 7px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: 145px;
    gap: 14px;
    overflow-x: hidden;
    overflow-y: auto;
    pointer-events: auto;
  }

  .guestbook-note {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    z-index: auto;
    padding: 27px 10px 9px;
  }

  .guestbook-note-author {
    font-size: 12px;
  }

  .guestbook-note-summary {
    font-size: 11px;
  }

  .guestbook-note-date {
    font-size: 9px;
  }

  .guestbook-board-footer {
    right: 7px;
    bottom: 6px;
    left: 7px;
  }

  .guestbook-footer {
    position: relative;
    right: auto;
    bottom: auto;
    left: auto;
    width: 90%;
    margin: 0 auto 16px;
    font-size: 10px;
  }

  .guestbook-detail-dialog {
    position: fixed;
    z-index: 50;
    top: 50%;
    left: 50%;
    width: calc(100vw - 24px);
    height: auto;
    max-height: calc(100vh - 18px);
    transform: translate(-50%, -50%);
  }

  .guestbook-dialog-frame {
    max-height: calc(100vh - 22px);
  }

  .guestbook-detail-dialog .guestbook-dialog-frame {
    height: auto;
    overflow: auto;
  }

  .guestbook-detail-dialog .guestbook-dialog-body {
    display: block;
    height: auto;
  }
}

@media (max-width: 440px) {
  .guestbook-note-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Reference composition: the guestbook is a small retro app inside the page.
   These rules intentionally stay scoped to guestbook.html and supersede the
   earlier full-canvas corkboard treatment without touching shared UI.
   -------------------------------------------------------------------------- */

.guestbook-page {
  color: #2b241d;
  background: #0a9692;
  font-family: Tahoma, "Microsoft YaHei", sans-serif;
}

.guestbook-scene {
  z-index: -2;
  background-color: #0a9692;
  background-image:
    linear-gradient(rgba(0, 71, 76, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 71, 76, .18) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 10px 10px, 10px 10px, 5px 5px, 5px 5px;
}

.guestbook-scene::before,
.guestbook-scene::after {
  position: absolute;
  z-index: 0;
  color: rgba(222, 255, 239, .78);
  font-family: "Segoe UI Symbol", Tahoma, sans-serif;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
  text-shadow: 2px 2px 0 rgba(0, 69, 74, .25);
}

.guestbook-scene::before {
  top: 16%;
  left: 3%;
  content: "☁\A\A +";
  font-size: clamp(20px, 3vw, 44px);
  white-space: pre;
}

.guestbook-scene::after {
  right: 3%;
  bottom: 23%;
  content: "✦\A\A♥";
  color: rgba(255, 239, 209, .76);
  font-size: clamp(18px, 2.8vw, 40px);
  white-space: pre;
  text-align: center;
}

.guestbook-topbar {
  height: clamp(50px, 7.25vh, 78px);
  background: linear-gradient(90deg, #061775, #073c92 72%, #0a4a98);
  border-bottom: 2px solid #00163f;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .35);
}

.guestbook-brand img {
  content: url("./guestbook-footer-avatar.png?v=20260804-24");
  width: clamp(22px, 1.8vw, 34px);
  height: clamp(22px, 1.8vw, 34px);
}

.guestbook-nav a {
  padding-inline: clamp(10px, 1.12vw, 22px);
}

.guestbook-nav a[aria-label="返回主页"] {
  display: none;
}

.guestbook-nav img {
  display: none;
}

.guestbook-window,
.guestbook-content {
  pointer-events: none;
}

.guestbook-app-window {
  position: absolute;
  z-index: 3;
  top: 9.25%;
  left: 9.8%;
  width: 80.3%;
  height: 87.45%;
  overflow: hidden;
  pointer-events: auto;
  background: #f8f1df;
  border: 3px solid #111;
  border-radius: 15px;
  box-shadow:
    inset 0 0 0 2px #f7edcf,
    7px 8px 0 rgba(0, 28, 42, .38),
    0 0 0 1px rgba(255, 255, 255, .7);
}

.guestbook-app-titlebar {
  display: flex;
  height: 6.45%;
  min-height: 31px;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px 0 10px;
  color: #fff;
  background: linear-gradient(90deg, #00318f, #176bc9);
  border-bottom: 2px solid #0b1f56;
  font-size: clamp(12px, 1vw, 18px);
  font-weight: 700;
}

.guestbook-app-caption {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.guestbook-app-caption img {
  width: clamp(15px, 1.25vw, 23px);
  height: clamp(15px, 1.25vw, 23px);
  image-rendering: pixelated;
}

.guestbook-window-controls {
  display: flex;
  gap: 5px;
}

.guestbook-window-controls button {
  display: grid;
  width: clamp(19px, 1.65vw, 29px);
  height: clamp(18px, 1.5vw, 26px);
  padding: 0;
  place-items: center;
  color: #111;
  background: #eff4f8;
  border: 2px solid;
  border-color: #fff #123154 #123154 #fff;
  box-shadow: 1px 1px 0 #6b7480;
  font: 700 clamp(12px, .8vw, 16px)/1 Arial, sans-serif;
}

.guestbook-app-content {
  position: relative;
  display: flex;
  height: calc(100% - 6.45%);
  padding: 1.2% 1.25% .6%;
  flex-direction: column;
  background: #fbf5e8;
  border: 1px solid #d8c7a7;
}

.guestbook-app-hero {
  position: relative;
  height: 23%;
  flex: 0 0 23%;
  overflow: visible;
}

.guestbook-postbox-art {
  position: absolute;
  top: 0;
  left: 2.2%;
  width: 15.3%;
  height: 96%;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.guestbook-hero-copy {
  position: absolute;
  top: 6%;
  left: 18.8%;
  color: #3a2417;
}

.guestbook-hero-copy h1,
.guestbook-hero-copy p {
  margin: 0;
}

.guestbook-hero-copy h1 {
  font-family: "Arial Black", Tahoma, "Microsoft YaHei", sans-serif;
  font-size: clamp(28px, 3.25vw, 55px);
  font-weight: 900;
  letter-spacing: .08em;
  line-height: .96;
}

.guestbook-hero-subtitle {
  margin-top: 4px !important;
  color: #1768ba;
  font-size: clamp(14px, 1.38vw, 25px);
  font-weight: 700;
  letter-spacing: .16em;
}

.guestbook-hero-intro {
  margin-top: 8px !important;
  color: #694c37;
  font-size: clamp(9px, .7vw, 13px);
  line-height: 1.4;
}

.guestbook-hero-spark {
  position: absolute;
  pointer-events: none;
}

.guestbook-hero-spark-one {
  top: 10%;
  left: 37%;
  color: #eca72d;
  font-size: clamp(14px, 1.35vw, 25px);
}

.guestbook-hero-spark-two {
  top: 34%;
  left: 38.5%;
  color: #ed789a;
  font-size: clamp(20px, 2vw, 35px);
  opacity: .8;
  transform: rotate(12deg);
}

.guestbook-write {
  top: 26%;
  right: 3.1%;
  width: 16.8%;
  height: 38%;
  border-width: 2px;
  font-size: clamp(11px, .92vw, 18px);
  box-shadow: 3px 4px 0 rgba(0, 28, 73, .44);
}

.guestbook-app-body {
  display: grid;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: 23.5% minmax(0, 1fr);
  gap: 1.65%;
}

.guestbook-form-panel {
  min-height: 0;
  overflow: hidden;
  padding: clamp(8px, .85vw, 16px) clamp(9px, .92vw, 17px) clamp(7px, .8vw, 14px);
  background: linear-gradient(180deg, #fffaf0, #f8f0dc);
  border: 1px solid #a58a67;
  border-radius: 11px;
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .95),
    2px 3px 0 rgba(72, 42, 13, .25);
}

.guestbook-form-panel-heading {
  display: flex;
  min-height: 27px;
  align-items: center;
  gap: 8px;
  padding-bottom: 7px;
  color: #174a8c;
  border-bottom: 1px solid #c7b58e;
}

.guestbook-form-panel-heading img {
  width: 17px;
  height: 17px;
  image-rendering: pixelated;
}

.guestbook-form-panel-heading h2 {
  margin: 0;
  font-size: clamp(13px, 1.05vw, 19px);
  line-height: 1.1;
}

.guestbook-form-panel .guestbook-form {
  gap: 6px;
  margin-top: 7px;
}

.guestbook-form-panel .guestbook-field {
  gap: 3px;
  font-size: clamp(9px, .64vw, 12px);
}

.guestbook-form-panel .guestbook-field > span {
  min-height: 14px;
  gap: 4px;
}

.guestbook-form-panel .guestbook-field > span img {
  width: 12px;
  height: 12px;
}

.guestbook-form-panel .guestbook-field input,
.guestbook-form-panel .guestbook-field textarea {
  padding: 5px 7px;
  border-color: #c9c2b5;
  border-radius: 6px;
  background: #fffefa;
  font-size: clamp(9px, .63vw, 12px);
}

.guestbook-form-panel .guestbook-field input {
  height: clamp(25px, 3.1vh, 31px);
}

.guestbook-form-panel .guestbook-field textarea {
  height: clamp(47px, 6.6vh, 64px);
  resize: none;
}

.guestbook-form-panel .guestbook-toggle {
  min-height: clamp(29px, 4.25vh, 38px);
  grid-template-columns: 17px 1fr 27px;
  gap: 6px;
  padding: 3px 6px;
  border-color: #ded6c5;
  border-radius: 6px;
  background: rgba(255, 255, 255, .42);
}

.guestbook-form-panel .guestbook-toggle > img,
.guestbook-form-panel .guestbook-option-lock {
  width: 14px;
  height: 14px;
}

.guestbook-form-panel .guestbook-toggle-copy strong {
  font-size: clamp(9px, .66vw, 12px);
}

.guestbook-form-panel .guestbook-toggle-copy small {
  font-size: clamp(7px, .5vw, 10px);
}

.guestbook-form-panel .guestbook-switch {
  width: 27px;
  height: 15px;
}

.guestbook-form-panel .guestbook-switch::after {
  width: 10px;
  height: 10px;
}

.guestbook-form-panel .guestbook-toggle input:checked + .guestbook-switch::after {
  transform: translateX(11px);
}

.guestbook-form-panel .guestbook-actions {
  margin-top: 2px;
}

.guestbook-form-panel .guestbook-submit {
  min-height: clamp(29px, 4.1vh, 38px);
  padding-inline: 8px;
  font-size: clamp(10px, .78vw, 14px);
}

.guestbook-form-panel .guestbook-submit::before {
  content: "➤";
  font-size: 13px;
}

.guestbook-form-panel .guestbook-form-note {
  margin-top: 2px;
  font-size: clamp(8px, .54vw, 10px);
  line-height: 1.2;
}

.guestbook-form-panel .guestbook-status {
  font-size: clamp(8px, .54vw, 10px);
}

.guestbook-board {
  position: relative;
  top: auto;
  left: auto;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #bb7632 url("./guestbook-board-bg.png?v=20260804-1") center / 100% 100% no-repeat;
  border: 0;
  border-radius: 9px;
  box-shadow: 1px 2px 0 rgba(57, 33, 13, .35);
}

.guestbook-board-surface {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 0;
}

.guestbook-note-grid {
  position: absolute;
  z-index: 2;
  top: 9%;
  right: 3.6%;
  bottom: 7.6%;
  left: 3.6%;
  display: block;
  min-height: 0;
  padding: 0;
  pointer-events: none;
}

.guestbook-note {
  padding: clamp(5px, .55vw, 10px) clamp(5px, .52vw, 10px) clamp(4px, .45vw, 8px);
  border-color: rgba(87, 53, 26, .4);
  box-shadow: 2px 3px 0 rgba(70, 41, 17, .35);
}

.guestbook-note::before {
  width: clamp(10px, .82vw, 16px);
  height: clamp(10px, .82vw, 16px);
}

.guestbook-note::after {
  border-top-width: clamp(8px, .72vw, 14px);
  border-right-width: clamp(8px, .72vw, 14px);
}

.guestbook-note-author {
  font-size: clamp(8px, .58vw, 11px);
}

.guestbook-note-summary {
  margin: 4px 0 5px;
  font-size: clamp(7px, .52vw, 10px);
  line-height: 1.38;
  -webkit-line-clamp: 3;
}

.guestbook-note-date {
  font-size: clamp(6px, .4vw, 8px);
}

.guestbook-note.is-selected {
  outline: 2px dashed #78d8b2;
  outline-offset: 2px;
  box-shadow:
    0 0 0 2px #f0ffd0,
    2px 4px 0 rgba(35, 70, 93, .45);
}

.guestbook-note:hover,
.guestbook-note:focus-visible {
  box-shadow: 3px 5px 0 rgba(70, 41, 17, .4);
}

.guestbook-note-pointer {
  right: -5px;
  bottom: -10px;
  font-size: clamp(18px, 1.3vw, 26px);
}

.guestbook-wall-empty {
  top: 48%;
  color: #fff2c9;
  text-shadow: 1px 1px 0 #60330f;
}

.guestbook-board-footer {
  right: 3%;
  bottom: 2%;
  left: 3%;
  min-height: 18px;
}

.guestbook-pagination {
  gap: 5px;
}

.guestbook-pagination button {
  width: 22px;
  height: 20px;
  font-size: 15px;
}

.guestbook-page-dots {
  gap: 4px;
}

.guestbook-page-dot {
  width: 6px;
  height: 6px;
}

.guestbook-footer {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  display: flex;
  width: 100%;
  height: 7%;
  min-height: 20px;
  flex: 0 0 7%;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(6px, .65vw, 12px);
  padding: 2px 1.5% 0;
  color: #6e604e;
  font-size: clamp(8px, .58vw, 11px);
  line-height: 1.25;
  text-shadow: none;
}

.guestbook-footer img {
  width: clamp(18px, 1.2vw, 23px);
  height: clamp(18px, 1.2vw, 23px);
}

.guestbook-footer img:last-child {
  width: clamp(22px, 1.5vw, 28px);
  height: clamp(22px, 1.5vw, 28px);
}

.guestbook-dialog {
  color: #1c2732;
}

.guestbook-detail-dialog {
  position: absolute;
  z-index: 20;
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  width: 42%;
  height: 69%;
  max-height: none;
  margin: 0;
  padding: 0;
  transform: translate(-50%, -50%);
  background: #f6f0df;
  box-shadow: 4px 5px 0 rgba(0, 0, 0, .52);
}

.guestbook-detail-dialog[open] {
  display: block;
}

.guestbook-detail-dialog .guestbook-dialog-frame {
  height: 100%;
  max-height: none;
}

.guestbook-detail-dialog .guestbook-dialog-titlebar {
  min-height: 24px;
  height: 10%;
  padding: 2px 4px;
}

.guestbook-detail-dialog .guestbook-dialog-caption {
  font-size: clamp(9px, .62vw, 12px);
}

.guestbook-detail-dialog .guestbook-dialog-caption::before {
  width: 11px;
  height: 11px;
}

.guestbook-detail-dialog .guestbook-dialog-close {
  width: 18px;
  height: 17px;
  font-size: 13px;
}

.guestbook-detail-dialog .guestbook-dialog-body {
  display: flex;
  height: 90%;
  padding: 7% 7% 5%;
  flex-direction: column;
  border: 0;
}

.guestbook-detail-heading {
  gap: 7px;
  padding-bottom: 6px;
}

.guestbook-detail-heading img {
  width: clamp(24px, 2.25vw, 40px);
  height: clamp(24px, 2.25vw, 40px);
}

.guestbook-detail-heading h2 {
  font-size: clamp(10px, .78vw, 14px);
}

.guestbook-detail-heading p {
  margin-top: 2px;
  font-size: clamp(7px, .46vw, 9px);
}

.guestbook-detail-message {
  margin: 8px 0;
  font-size: clamp(8px, .58vw, 11px);
  line-height: 1.48;
}

.guestbook-reply {
  padding: 7px 8px;
}

.guestbook-reply-heading img {
  width: 13px;
  height: 13px;
}

.guestbook-reply-heading h3,
.guestbook-reply p {
  font-size: clamp(8px, .54vw, 10px);
}

.guestbook-reply p {
  margin-top: 4px;
  line-height: 1.45;
}

@media (max-width: 760px) {
  body {
    overflow: auto;
    overflow-x: hidden;
  }

  .guestbook-scene {
    position: fixed;
  }

  .guestbook-app-window {
    position: relative;
    top: auto;
    left: auto;
    width: calc(100% - 18px);
    height: auto;
    min-height: 0;
    margin: 18px auto 20px;
  }

  .guestbook-app-titlebar {
    height: 37px;
    min-height: 37px;
  }

  .guestbook-app-content {
    height: auto;
    min-height: 0;
    padding: 10px;
  }

  .guestbook-app-hero {
    height: 150px;
    flex-basis: 150px;
  }

  .guestbook-postbox-art {
    left: 1%;
    width: 34%;
    height: 98%;
  }

  .guestbook-hero-copy {
    top: 13%;
    left: 34%;
  }

  .guestbook-hero-copy h1 {
    font-size: 36px;
  }

  .guestbook-hero-subtitle {
    font-size: 16px;
  }

  .guestbook-hero-intro {
    max-width: 210px;
    font-size: 10px;
  }

  .guestbook-write {
    top: auto;
    right: 3%;
    bottom: 8px;
    width: 36%;
    height: 37px;
    font-size: 12px;
  }

  .guestbook-app-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .guestbook-form-panel {
    min-height: 360px;
    padding: 12px;
  }

  .guestbook-form-panel .guestbook-field input {
    height: 32px;
  }

  .guestbook-form-panel .guestbook-field textarea {
    height: 82px;
  }

  .guestbook-form-panel .guestbook-toggle {
    min-height: 40px;
  }

  .guestbook-board {
    height: 430px;
    min-height: 430px;
  }

  .guestbook-note-grid {
    top: 8%;
    right: 4%;
    bottom: 6%;
    left: 4%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 116px;
    gap: 12px;
    overflow-y: auto;
    pointer-events: auto;
  }

  .guestbook-note {
    position: relative;
    top: auto;
    left: auto;
    width: auto;
    height: auto;
    min-height: 0;
    padding: 22px 9px 8px;
    z-index: auto;
  }

  .guestbook-note-author {
    font-size: 11px;
  }

  .guestbook-note-summary {
    font-size: 10px;
  }

  .guestbook-note-date {
    font-size: 8px;
  }

  .guestbook-detail-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    width: calc(100vw - 28px);
    height: auto;
    max-height: calc(100vh - 20px);
    transform: translate(-50%, -50%);
  }

  .guestbook-detail-dialog .guestbook-dialog-frame {
    height: auto;
    overflow: auto;
  }

  .guestbook-detail-dialog .guestbook-dialog-body {
    display: block;
    height: auto;
    padding: 18px 16px 14px;
  }

  .guestbook-footer {
    height: 48px;
    min-height: 48px;
    flex-basis: 48px;
    justify-content: center;
    padding: 3px 0;
    font-size: 9px;
  }
}

@media (max-width: 440px) {
  .guestbook-note-grid {
    grid-template-columns: 1fr;
  }
}

/* Desktop reference calibration: the app is a fixed scene, not a fluid card grid. */
@media (min-width: 761px) {
  .guestbook-app-hero {
    height: 23.75%;
    flex-basis: 23.75%;
  }

  .guestbook-app-body {
    width: auto;
    margin-right: .4%;
    margin-left: 1%;
    padding-bottom: 11px;
    grid-template-columns: 23.65% minmax(0, 1fr);
  }

  .guestbook-footer {
    height: 6%;
    flex-basis: 6%;
  }

  .guestbook-postbox-art {
    top: 4%;
    left: 3.2%;
    transform: none;
    transform-origin: center bottom;
  }

  .guestbook-write {
    right: 4.5%;
  }

  .guestbook-note-grid {
    top: 5%;
    right: 2.4%;
    bottom: 7%;
    left: 2.4%;
  }

  .guestbook-detail-dialog {
    top: 29%;
    left: 40%;
    width: 41.5%;
    height: 69%;
    transform: translateX(-50%);
  }

  .guestbook-hero-copy {
    top: 9%;
  }

  .guestbook-hero-copy h1 {
    font-size: clamp(28px, 3.8vw, 55px);
  }

  .guestbook-hero-subtitle {
    margin-top: 5px !important;
  }

  .guestbook-hero-intro {
    margin-top: 9px !important;
  }

  .guestbook-write {
    top: 24.5%;
  }

  .guestbook-form-panel-heading {
    min-height: 30px;
    gap: 11px;
    padding-bottom: 7px;
  }

  .guestbook-form-panel .guestbook-form {
    gap: 8px;
    margin-top: 8px;
  }

  .guestbook-form-panel .guestbook-field {
    gap: 5px;
  }

  .guestbook-form-panel .guestbook-field input {
    height: 28px;
  }

  .guestbook-form-panel .guestbook-field textarea {
    height: 52px;
  }

  .guestbook-form-panel .guestbook-toggle {
    min-height: 32px;
  }

  .guestbook-form-panel .guestbook-submit {
    min-height: 33px;
  }

  .guestbook-topbar {
    padding-left: 28px;
  }

  .guestbook-brand {
    gap: 12px;
    font-size: 20px;
  }

  .guestbook-nav {
    gap: 40px;
  }

  .guestbook-app-titlebar {
    padding-left: 14px;
    font-size: clamp(13px, 1.15vw, 18px);
  }

  .guestbook-app-caption {
    gap: 10px;
  }

  .guestbook-footer {
    justify-content: flex-start;
    gap: 8px;
    padding-right: 1.5%;
    padding-left: 1.5%;
    font-size: clamp(9px, .8vw, 12px);
  }

  .guestbook-footer > span {
    flex: 1 1 auto;
  }

  .guestbook-footer > img:first-child {
    display: none;
    width: 19px;
    height: 19px;
    object-fit: contain;
    content: none;
    opacity: 0;
  }

  .guestbook-footer::before {
    width: 19px;
    color: #e7808c;
    content: "♥";
    font-size: 17px;
    line-height: 1;
    text-align: center;
  }

  .guestbook-footer > img:last-child {
    width: 25px;
    height: 25px;
  }
}

/* 2026-08-04 scene reflow: the corkboard is the main stage; compose is on demand. */
@media (min-width: 761px) {
  body.guestbook-compose-open {
    overflow: hidden;
  }

  .guestbook-app-window {
    left: 4%;
    width: 92%;
  }

  .guestbook-app-body {
    position: relative;
    display: block;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0 0 .8%;
  }

  .guestbook-board {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background-color: #c07a35;
    background-size: 112% 112%;
    background-position: center;
    box-shadow: 1px 2px 0 rgba(57, 33, 13, .35);
  }

  .guestbook-board-surface {
    overflow: hidden;
  }

  .guestbook-note-grid {
    top: 5%;
    right: 2.4%;
    bottom: 7%;
    left: 2.4%;
    overflow: hidden;
  }

  .guestbook-note {
    padding: clamp(8px, .7vw, 14px) clamp(8px, .68vw, 13px) clamp(7px, .58vw, 11px);
  }

  .guestbook-note-author {
    font-size: clamp(10px, .72vw, 14px);
  }

  .guestbook-note-summary {
    margin: 5px 0 7px;
    font-size: clamp(9px, .65vw, 13px);
    line-height: 1.42;
  }

  .guestbook-note-date {
    font-size: clamp(8px, .5vw, 10px);
  }

  .guestbook-hero-copy {
    left: 17.4%;
  }

  .guestbook-hero-subtitle {
    font-size: clamp(15px, 1.48vw, 28px);
  }

  .guestbook-hero-intro {
    font-size: clamp(11px, .82vw, 16px);
  }

  .guestbook-nav a {
    font-size: clamp(14px, 1.05vw, 20px);
  }

  .guestbook-brand {
    font-size: clamp(17px, 1.7vw, 29px);
  }

  .guestbook-app-titlebar {
    font-size: clamp(14px, 1.22vw, 20px);
  }

  .guestbook-form-panel {
    position: fixed;
    z-index: 70;
    top: calc(50% + 10px);
    left: 50%;
    display: none;
    width: 50vw;
    max-width: 760px;
    max-height: calc(100vh - 72px);
    min-height: 0;
    overflow-y: auto;
    padding: 20px 24px 18px;
    transform: translate(-50%, -50%);
    border: 2px solid #8c7350;
    border-radius: 12px;
    box-shadow:
      0 0 0 3px #f8edcf,
      7px 8px 0 rgba(38, 25, 10, .36),
      0 18px 38px rgba(0, 20, 30, .3);
  }

  .guestbook-form-panel.is-open {
    display: block;
  }

  .guestbook-form-panel-heading {
    min-height: 38px;
    gap: 10px;
    padding-bottom: 9px;
  }

  .guestbook-form-panel-heading h2 {
    font-size: clamp(18px, 1.55vw, 26px);
  }

  .guestbook-compose-close {
    display: grid;
    width: 26px;
    height: 24px;
    margin-left: auto;
    padding: 0;
    place-items: center;
    color: #111;
    background: #eef3f7;
    border: 2px solid;
    border-color: #fff #26394b #26394b #fff;
    box-shadow: 1px 1px 0 #7b8490;
    cursor: pointer;
    font: 700 18px/1 Arial, sans-serif;
  }

  .guestbook-compose-backdrop {
    position: fixed;
    z-index: 69;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(8, 25, 36, .28);
    cursor: default;
  }

  .guestbook-compose-backdrop[hidden] {
    display: none;
  }

  .guestbook-form-panel .guestbook-form {
    gap: 11px;
    margin-top: 12px;
  }

  .guestbook-form-panel .guestbook-field {
    gap: 6px;
    font-size: clamp(12px, .82vw, 16px);
  }

  .guestbook-form-panel .guestbook-field > span {
    min-height: 18px;
    gap: 5px;
  }

  .guestbook-form-panel .guestbook-field > span img {
    width: 15px;
    height: 15px;
  }

  .guestbook-form-panel .guestbook-field input,
  .guestbook-form-panel .guestbook-field textarea {
    padding: 8px 10px;
    border-radius: 7px;
    font-size: clamp(12px, .82vw, 16px);
  }

  .guestbook-form-panel .guestbook-field input {
    height: 42px;
  }

  .guestbook-form-panel .guestbook-field textarea {
    height: 112px;
  }

  .guestbook-form-panel .guestbook-toggle {
    min-height: 48px;
    grid-template-columns: 22px 1fr 38px;
    gap: 9px;
    padding: 6px 9px;
    border-radius: 7px;
  }

  .guestbook-form-panel .guestbook-toggle > img,
  .guestbook-form-panel .guestbook-option-lock {
    width: 18px;
    height: 18px;
  }

  .guestbook-form-panel .guestbook-toggle-copy strong {
    font-size: clamp(12px, .8vw, 16px);
  }

  .guestbook-form-panel .guestbook-toggle-copy small {
    font-size: clamp(10px, .62vw, 12px);
  }

  .guestbook-form-panel .guestbook-switch {
    width: 38px;
    height: 21px;
  }

  .guestbook-form-panel .guestbook-switch::after {
    width: 15px;
    height: 15px;
  }

  .guestbook-form-panel .guestbook-toggle input:checked + .guestbook-switch::after {
    transform: translateX(15px);
  }

  .guestbook-form-panel .guestbook-submit {
    min-height: 46px;
    font-size: clamp(14px, .92vw, 18px);
  }

  .guestbook-form-panel .guestbook-form-note,
  .guestbook-form-panel .guestbook-status {
    font-size: clamp(10px, .62vw, 13px);
  }

  .guestbook-detail-dialog {
    top: 16%;
  }

  .guestbook-detail-heading h2 {
    font-size: clamp(12px, .9vw, 17px);
  }

  .guestbook-detail-heading p,
  .guestbook-detail-message,
  .guestbook-reply-heading h3,
  .guestbook-reply p {
    font-size: clamp(10px, .68vw, 13px);
  }

  .guestbook-footer {
    font-size: clamp(10px, .88vw, 14px);
  }
}

@media (max-width: 760px) {
  body.guestbook-compose-open {
    overflow: hidden;
  }

  .guestbook-app-body {
    position: relative;
    display: block;
    min-height: 0;
  }

  .guestbook-board {
    width: 100%;
    height: 430px;
    min-height: 430px;
    background-size: 112% 112%;
    background-position: center;
  }

  .guestbook-form-panel {
    position: fixed;
    z-index: 70;
    top: 50%;
    left: 50%;
    display: none;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 16px;
    transform: translate(-50%, -50%);
  }

  .guestbook-form-panel.is-open {
    display: block;
  }

  .guestbook-compose-backdrop {
    position: fixed;
    z-index: 69;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(8, 25, 36, .28);
  }

  .guestbook-compose-backdrop[hidden] {
    display: none;
  }
}

/* Final desktop scene calibration: six compact notes per row, with every
   pagination page reusing the same fixed two-row coordinate system. */
@media (min-width: 761px) {
  .guestbook-topbar {
    right: 4%;
    left: 4%;
  }

  .guestbook-scene::before {
    top: 18%;
    left: .35%;
  }

  .guestbook-scene::after {
    right: .35%;
    bottom: 22%;
  }

  .guestbook-gutter-decor {
    position: absolute;
    z-index: 4;
    top: 35%;
    width: 4%;
    height: 22%;
    pointer-events: none;
  }

  .guestbook-gutter-decor img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
  }

  .guestbook-gutter-left {
    left: 0;
  }

  .guestbook-gutter-right {
    right: 0;
  }

  .guestbook-hero-mascots {
    position: absolute;
    z-index: 2;
    inset: 0;
    pointer-events: none;
  }

  .guestbook-hero-panda {
    position: absolute;
    top: 8%;
    left: 50.5%;
    width: 9%;
    height: 82%;
    object-fit: contain;
    image-rendering: pixelated;
    opacity: .96;
  }

  .guestbook-hero-copy {
    left: 16.2%;
    z-index: 3;
  }

  .guestbook-hero-spark {
    z-index: 3;
  }

  .guestbook-write {
    z-index: 4;
  }

  .guestbook-note-grid {
    top: 4%;
    right: 2.1%;
    bottom: 8%;
    left: 2.1%;
  }

  .guestbook-note {
    padding: clamp(8px, .62vw, 13px) clamp(8px, .6vw, 12px) clamp(7px, .54vw, 11px);
  }

  .guestbook-note-author {
    font-size: clamp(12px, .92vw, 17px);
  }

  .guestbook-note-summary {
    margin: 7px 0 8px;
    font-size: clamp(11px, .78vw, 15px);
    line-height: 1.36;
    -webkit-line-clamp: 4;
  }

  .guestbook-note-date {
    font-size: clamp(9px, .56vw, 12px);
  }

  .guestbook-note::before {
    width: clamp(12px, .82vw, 17px);
    height: clamp(12px, .82vw, 17px);
  }

  .guestbook-detail-dialog {
    top: 10%;
    left: 50%;
    width: 42%;
    height: 74%;
    transform: translateX(-50%);
  }

  .guestbook-footer {
    display: grid;
    width: 100%;
    height: 7%;
    flex: 0 0 7%;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: clamp(7px, .65vw, 13px);
    padding: 2px 2% 0;
    color: #6e604e;
    font-size: clamp(12px, .95vw, 17px);
    line-height: 1.2;
    text-shadow: none;
  }

  .guestbook-footer::before {
    display: none;
  }

  .guestbook-footer > img:first-child {
    display: block;
    grid-column: 1;
    width: clamp(18px, 1.25vw, 24px);
    height: clamp(18px, 1.25vw, 24px);
    opacity: 1;
  }

  .guestbook-footer-thanks {
    grid-column: 2;
    white-space: nowrap;
  }

  .guestbook-footer-copyright {
    grid-column: 3;
    white-space: nowrap;
  }

  .guestbook-footer > img:last-child {
    grid-column: 4;
    width: clamp(24px, 1.65vw, 31px);
    height: clamp(24px, 1.65vw, 31px);
    margin-left: 2px;
  }
}

@media (max-width: 760px) {
  .guestbook-gutter-decor,
  .guestbook-hero-mascots {
    display: none;
  }

  .guestbook-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  .guestbook-footer-copyright {
    white-space: nowrap;
  }
}

/* Decorative character layer: keep the supplied figures outside the board so
   they enrich the scene without covering notes, controls, or the navigation. */
@media (min-width: 761px) {
  .guestbook-side-assets {
    position: absolute;
    z-index: 5;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }

  .guestbook-side-asset {
    position: absolute;
    display: block;
    max-width: none;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(1px 2px 0 rgba(0, 25, 32, .36));
  }

  .guestbook-side-goku {
    top: 17%;
    left: 12px;
    width: 7.8%;
    height: 32%;
  }

  .guestbook-side-vegeta {
    top: 17%;
    right: 12px;
    width: 7.8%;
    height: 32%;
  }

  .guestbook-side-pikachu {
    top: 68%;
    left: 12px;
    width: 6.9%;
    height: 19%;
  }

  .guestbook-side-dragonball-one,
  .guestbook-side-dragonball-two,
  .guestbook-side-dragonball-three,
  .guestbook-side-dragonball-four,
  .guestbook-side-dragonball-five,
  .guestbook-side-dragonball-six,
  .guestbook-side-dragonball-seven {
    width: 5.4%;
    height: 10.5%;
  }

  .guestbook-side-dragonball-one {
    top: 42%;
    left: 12px;
  }

  .guestbook-side-dragonball-three {
    top: 51%;
    left: 12px;
  }

  .guestbook-side-dragonball-five {
    top: 60%;
    left: 12px;
  }

  .guestbook-side-dragonball-two {
    top: 42%;
    right: 12px;
  }

  .guestbook-side-dragonball-four {
    top: 51%;
    right: 12px;
  }

  .guestbook-side-dragonball-six {
    top: 60%;
    right: 12px;
  }

  .guestbook-side-dragonball-seven {
    top: 69%;
    right: 12px;
  }

  .guestbook-hero-mascots {
    overflow: hidden;
  }

  .guestbook-hero-panda {
    top: 6%;
    left: 44%;
    width: 20%;
    height: 96%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .guestbook-board,
  .guestbook-board-surface {
    overflow: visible;
  }

  .guestbook-board-mario {
    position: absolute;
    z-index: 8;
    top: calc(-16% - 26px);
    left: 56%;
    width: 27%;
    height: 27%;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(1px 2px 0 rgba(47, 28, 10, .45));
    pointer-events: none;
  }
}

@media (max-width: 760px) {
  .guestbook-side-assets,
  .guestbook-board-mario {
    display: none;
  }

  .guestbook-hero-mascots {
    overflow: hidden;
  }
}

/* Detail dialog readability: enlarge every visible text item together. */
.guestbook-detail-dialog .guestbook-dialog-caption {
  font-size: clamp(14px, .94vw, 18px);
}

.guestbook-detail-dialog .guestbook-dialog-close {
  position: relative;
  font-size: 18px;
  color: transparent;
}

.guestbook-detail-dialog .guestbook-dialog-close::after {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #000;
  content: "×";
  line-height: 1;
  transform: translate(calc(-50% - 1px), calc(-50% - 1px));
}

.guestbook-detail-dialog .guestbook-detail-heading h2 {
  font-size: clamp(16px, 1.17vw, 21px);
}

.guestbook-detail-dialog .guestbook-detail-heading p {
  font-size: clamp(12px, .75vw, 14px);
}

.guestbook-detail-dialog .guestbook-detail-message {
  font-size: clamp(13px, .89vw, 17px);
  line-height: 1.5;
}

.guestbook-detail-dialog .guestbook-reply-heading h3,
.guestbook-detail-dialog .guestbook-reply p {
  font-size: clamp(13px, .83vw, 16px);
}

.guestbook-detail-dialog .guestbook-reply p {
  line-height: 1.5;
}

/* Public reply controls. Private messages remain owner-only in the API. */
.guestbook-reply-heading {
  width: 100%;
}

.guestbook-reply-action {
  min-width: 54px;
  min-height: 28px;
  margin-left: auto;
  padding: 2px 9px;
  border: 1px solid #8a845f;
  border-radius: 3px;
  color: #2f3d66;
  background: #fff8d7;
  box-shadow: 1px 1px 0 rgba(75, 61, 21, .24);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.guestbook-reply-action:hover,
.guestbook-reply-action:focus-visible {
  outline: none;
  background: #fff2ad;
}

.guestbook-replies {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.guestbook-reply-empty {
  margin: 0 !important;
  color: #6a5b2e !important;
}

.guestbook-reply-item {
  padding: 7px 8px;
  border: 1px solid #d6c489;
  border-radius: 3px;
  background: rgba(255, 252, 229, .72);
}

.guestbook-reply-item.is-owner {
  border-color: #e1a0a0;
  background: #fff1f1;
}

.guestbook-reply-item-head {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.guestbook-reply-author {
  color: #3b321a;
  font-size: 11px;
}

.guestbook-reply-item.is-owner .guestbook-reply-author,
.guestbook-reply-owner-label {
  color: #c62828;
}

.guestbook-reply-owner-label {
  font-size: 10px;
  font-weight: 700;
}

.guestbook-reply-date {
  margin-left: auto;
  color: #776b4d;
  font-size: 9px;
}

.guestbook-reply-item-body {
  margin: 4px 0 0 !important;
  color: #4f4421 !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.guestbook-reply-editor {
  margin-top: 9px;
}

.guestbook-reply-nickname {
  display: block;
  margin-bottom: 6px;
}

.guestbook-reply-nickname span {
  display: block;
  margin-bottom: 3px;
  color: #5b4c25;
  font-size: 10px;
}

.guestbook-reply-nickname input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 27px;
  padding: 4px 8px;
  border: 1px solid #b9aa70;
  border-radius: 3px;
  color: #302916;
  background: #fffdf0;
  font: inherit;
  font-size: 12px;
}

.guestbook-reply-nickname input:disabled {
  color: #c62828;
  background: #fff1f1;
}

.guestbook-reply-editor textarea {
  display: block;
  width: 100%;
  height: 86px;
  min-height: 70px;
  max-height: 160px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  resize: vertical;
  padding: 8px 9px;
  border: 1px solid #b9aa70;
  border-radius: 3px;
  color: #302916;
  background: #fffdf0;
  font: inherit;
  font-size: 12px;
  line-height: 1.55;
}

.guestbook-reply-editor-actions {
  display: flex;
  gap: 7px;
  justify-content: flex-end;
  margin-top: 7px;
}

.guestbook-reply-editor-actions button {
  min-height: 27px;
  padding: 2px 9px;
  border: 1px solid #8a845f;
  border-radius: 3px;
  color: #3b321a;
  background: #fff8d7;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.guestbook-reply-editor-actions button:last-child {
  color: #fff;
  background: #285da9;
  border-color: #1d4b8b;
}

.guestbook-reply-editor-actions button:hover,
.guestbook-reply-editor-actions button:focus-visible {
  outline: none;
  filter: brightness(1.06);
}

.guestbook-reply-editor-status {
  min-height: 1.3em;
  margin: 5px 0 0 !important;
  color: #9e4037 !important;
  font-size: 11px !important;
}

.guestbook-note.is-private::after {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 1px 4px;
  border: 1px solid rgba(112, 73, 14, .35);
  border-radius: 2px;
  color: #77521c;
  background: rgba(255, 246, 187, .82);
  content: "私密";
  font-size: 9px;
  line-height: 1.2;
}

@media (max-width: 760px) {
  .guestbook-reply-action {
    min-height: 25px;
    padding-inline: 7px;
    font-size: 11px;
  }

  .guestbook-reply-editor textarea {
    min-height: 76px;
    font-size: 13px;
  }

  .guestbook-reply-nickname input {
    min-height: 30px;
    font-size: 13px;
  }
}

/* Keep the titlebar fixed and scroll the detail body when replies grow. */
.guestbook-detail-dialog {
  height: 84%;
  max-height: calc(100dvh - 20px);
}

.guestbook-detail-dialog .guestbook-dialog-frame {
  display: flex;
  height: 100%;
  max-height: 100%;
  flex-direction: column;
  overflow: hidden;
}

.guestbook-detail-dialog .guestbook-dialog-titlebar {
  flex: 0 0 auto;
}

.guestbook-detail-dialog .guestbook-dialog-body {
  display: flex;
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.guestbook-detail-dialog .guestbook-detail-message {
  flex: none;
}

/* Mobile topbar: reserve a complete brand row and navigation row so the
   browser's compact viewport cannot clip the first navigation links. */
@media (max-width: 760px) {
  .guestbook-topbar {
    min-height: 73px;
    padding: 7px 10px 6px;
    gap: 4px;
    overflow: visible;
  }

  .guestbook-brand {
    width: 100%;
    min-height: 26px;
    line-height: 1.2;
  }

  .guestbook-nav {
    display: flex;
    width: 100%;
    min-height: 33px;
    height: 33px;
    align-items: center;
    overflow-x: auto;
    overflow-y: visible;
  }

  .guestbook-nav a,
  .guestbook-nav a:not(.is-current) span {
    display: flex;
    min-height: 33px;
    line-height: 1.2;
    align-items: center;
  }
}
