

:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #202536;
  background: #f4f6fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #202536;
  --muted: #848b9d;
  --line: #e8ebf2;
  --accent: #5b68d8;
  --accent-soft: #eef0ff;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 83% 8%, rgba(208, 219, 255, .42), transparent 32rem),
    radial-gradient(ellipse at 8% 48%, rgba(238, 220, 250, .3), transparent 34rem),
    #f7f8fc;
}

button, input, textarea { font: inherit; }
button { cursor: pointer; }

.page-shell { width: min(1060px, calc(100% - 48px)); margin: 0 auto; }
.site-header { height: 88px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(220, 224, 235, .8); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 17px; font-weight: 700; letter-spacing: -.04em; text-decoration: none; }
.brand-mark { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 9px; background: var(--ink); color: white; font: 500 19px Georgia, serif; }
.brand-dot { color: var(--accent); }
.header-note { display: flex; align-items: center; gap: 9px; color: #737a8b; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #68b68d; box-shadow: 0 0 0 4px rgba(104, 182, 141, .13); }

.intro { padding: 77px 0 55px; max-width: 620px; }
.eyebrow, .card-kicker { display: flex; align-items: center; gap: 10px; color: var(--muted); font: 500 10px "DM Mono", monospace; letter-spacing: .12em; }
.eyebrow-line { width: 22px; height: 1px; background: #9da5b5; }
.eyebrow span:last-child { color: #c0c5d0; }
h1 { margin: 22px 0 18px; font-size: clamp(42px, 6vw, 66px); font-weight: 600; line-height: 1.2; letter-spacing: -.065em; }
h1 span { color: var(--accent); }
.intro-copy { max-width: 480px; margin: 0; color: #747c8e; font-size: 14px; line-height: 1.95; }
.intro-foot { display: flex; align-items: center; gap: 9px; margin-top: 25px; color: #a0a6b4; font-size: 11px; }
.sparkle { color: #a99ae5; font-size: 16px; }

.guestbook-layout { display: grid; grid-template-columns: minmax(300px, .86fr) minmax(0, 1.14fr); gap: 72px; align-items: start; padding-bottom: 68px; }
.compose-card { padding: 30px; border: 1px solid rgba(225, 228, 237, .9); border-radius: 16px; background: rgba(255, 255, 255, .82); box-shadow: 0 16px 45px rgba(50, 59, 99, .055); }
.card-kicker { gap: 8px; font-size: 9px; }
.card-kicker > span { color: var(--accent); }
h2 { margin: 16px 0 5px; font-size: 20px; font-weight: 600; letter-spacing: -.04em; }
.card-description { margin: 0 0 27px; color: #969cac; font-size: 11px; }
.field-label { display: block; margin-bottom: 9px; color: #545b6c; font-size: 11px; font-weight: 600; }
input, textarea { width: 100%; border: 1px solid #e7e9f0; border-radius: 8px; outline: none; background: #fbfcfe; color: var(--ink); font-size: 12px; transition: border-color .18s, box-shadow .18s, background .18s; }
input { height: 42px; padding: 0 12px; }
textarea { min-height: 125px; padding: 12px; resize: vertical; line-height: 1.75; }
input::placeholder, textarea::placeholder { color: #b8bdc9; }
input:focus, textarea:focus { border-color: #abb1ee; background: white; box-shadow: 0 0 0 3px rgba(91, 104, 216, .09); }
.message-label-row { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.character-count { color: #aeb3c0; font: 10px "DM Mono", monospace; }
.anonymous-toggle { display: flex; align-items: center; gap: 11px; margin-top: 16px; padding: 12px; border: 1px solid #e8eaf3; border-radius: 9px; background: #fafbff; cursor: pointer; }
.anonymous-toggle > input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.anonymous-checkbox { display: grid; flex: 0 0 17px; width: 17px; height: 17px; place-items: center; border: 1px solid #cfd3e1; border-radius: 5px; background: white; color: white; font-size: 12px; transition: background .15s, border-color .15s; }
.anonymous-toggle > input:checked + .anonymous-checkbox { border-color: var(--accent); background: var(--accent); }
.anonymous-toggle > input:checked + .anonymous-checkbox::after { content: "✓"; }
.anonymous-toggle > input:focus-visible + .anonymous-checkbox { outline: 3px solid rgba(91, 104, 216, .2); outline-offset: 2px; }
.anonymous-copy { display: grid; gap: 3px; }
.anonymous-copy strong { color: #535a6d; font-size: 10px; font-weight: 600; }
.anonymous-copy small { color: #979eae; font-size: 9px; line-height: 1.6; }
.anonymous-notice { margin: 9px 0 0; padding: 10px 12px; border: 1px solid #e5e7f7; border-radius: 8px; background: #f5f6ff; color: #666d9b; font-size: 10px; line-height: 1.7; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; }
.privacy-note { color: #a0a6b4; font-size: 9px; line-height: 1.6; }
.privacy-note span { color: #a99ae5; }
.form-footer button { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-width: 118px; height: 38px; padding: 0 14px; border: 0; border-radius: 7px; background: var(--ink); color: white; font-size: 11px; transition: transform .15s, background .15s; }
.form-footer button:hover { transform: translateY(-1px); background: var(--accent); }
.form-footer button:disabled { cursor: wait; opacity: .65; transform: none; }
.form-status { min-height: 17px; margin: 10px 0 -7px; color: #57886e; font-size: 10px; }
.form-status.is-error { color: #c45b69; }
.hp-field { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.entries-column { min-width: 0; padding-top: 6px; }
.entries-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.entries-heading h2 { display: flex; align-items: center; gap: 9px; margin-top: 13px; }
.entry-count { display: inline-flex; min-width: 22px; height: 20px; align-items: center; justify-content: center; padding: 0 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font: 10px "DM Mono", monospace; }
.refresh-button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: white; color: #83899a; font-size: 18px; transition: transform .3s, color .15s; }
.refresh-button:hover { color: var(--accent); transform: rotate(35deg); }
.refresh-button:disabled { opacity: .55; }
.entries-list { min-height: 205px; }
.entry { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 13px; padding: 22px 0; border-bottom: 1px solid var(--line); animation: arrive .3s ease both; }
@keyframes arrive { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
.entry-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 12px; background: var(--avatar-bg, #eef0ff); color: var(--avatar-fg, #626bd0); font-size: 13px; font-weight: 600; }
.entry-content { min-width: 0; }
.entry-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; }
.entry-name { color: #343a4a; font-size: 12px; font-weight: 600; }
.entry-time { color: #abb0bd; font: 9px "DM Mono", monospace; }
.entry-message { margin: 8px 0 0; color: #6d7485; font-size: 12px; line-height: 1.85; overflow-wrap: anywhere; white-space: pre-wrap; }
.entry-placeholder { padding: 24px 0 18px 51px; border-bottom: 1px solid var(--line); }
.entry-placeholder span { display: block; height: 8px; margin: 0 0 9px; border-radius: 5px; background: linear-gradient(90deg, #eceef5, #f4f5f9); animation: shimmer 1.4s ease-in-out infinite alternate; }
.entry-placeholder span:first-child { width: 28%; height: 9px; }
.entry-placeholder span:nth-child(2) { width: 88%; }
.entry-placeholder span:last-child { width: 58%; margin-bottom: 0; }
@keyframes shimmer { to { opacity: .45; } }
.empty-state { padding: 49px 15px; text-align: center; }
.empty-mark { display: grid; width: 42px; height: 42px; margin: 0 auto 14px; place-items: center; border-radius: 14px; background: #eeeffa; color: #7f84d3; font-size: 19px; }
.empty-state strong { display: block; color: #656c7e; font-size: 12px; font-weight: 600; }
.empty-state p { margin: 7px 0 0; color: #a1a7b5; font-size: 10px; }
.list-status { min-height: 16px; margin: 12px 0 0; color: #b46b74; font-size: 10px; }
.board-footer { margin-top: 23px; color: #a0a6b4; font-size: 10px; }
.footer-star { margin-right: 7px; color: #a99ae5; }
.site-footer { display: flex; justify-content: space-between; gap: 16px; padding: 21px 0 28px; border-top: 1px solid rgba(220, 224, 235, .8); color: #a2a8b6; font-size: 10px; }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 36px, 560px); }
  .site-header { height: 72px; }
  .intro { padding: 59px 0 42px; }
  .guestbook-layout { grid-template-columns: 1fr; gap: 37px; padding-bottom: 48px; }
  .compose-card { padding: 25px; }
  .entries-column { padding-top: 0; }
}

@media (max-width: 420px) {
  .page-shell { width: calc(100% - 28px); }
  .header-note { font-size: 10px; }
  h1 { font-size: 43px; }
  .compose-card { padding: 21px; }
  .form-footer { align-items: flex-end; }
  .privacy-note { max-width: 142px; }
  .site-footer { font-size: 9px; }
}

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