:root {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: #282626;
  font-synthesis: none;
}

* { box-sizing: border-box; }
button, input, textarea { font: inherit; }
button { color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: wait; opacity: .45; }
button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #ad485c; outline-offset: 3px; }
[hidden] { display: none !important; }

.reactions {
  position: fixed;
  z-index: 1;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 5px;
  border: 1px solid #fff9;
  border-radius: 32px;
  background: #fffffff0;
  box-shadow: 0 4px 24px #00000012;
  backdrop-filter: blur(16px);
}

.reaction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 72px;
  min-height: 42px;
  padding: 10px 14px;
  border: 0;
  border-radius: 24px;
  background: transparent;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.reaction:hover { background: #00000005; }
.reaction svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.reaction[aria-pressed="true"] { color: #b74762; }
.reaction[aria-pressed="true"] svg { fill: currentColor; }
.divider { width: 1px; background: #0000000c; margin: 11px 1px; }
.toast { position: fixed; z-index: 2; bottom: 88px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); margin: 0; padding: 10px 16px; border-radius: 14px; background: #fff; box-shadow: 0 4px 20px #0001; font-size: 13px; line-height: 1.5; text-align: center; }
.toast:empty { display: none; }

.guestbook {
  position: fixed;
  inset: auto 24px 24px auto;
  width: 390px;
  max-width: calc(100vw - 32px);
  height: 680px;
  max-height: calc(var(--keyboard-viewport, 100dvh) - 48px);
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #e8e5e5;
  border-radius: 24px;
  background: #fcfbfa;
  box-shadow: 0 16px 64px #0002;
  color: #282626;
}

.guestbook[open] { display: flex; flex-direction: column; }
.guestbook::backdrop { background: #00000020; backdrop-filter: blur(2px); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 8px; }
.panel-heading h1 { font-size: 18px; font-weight: 600; margin: 0; letter-spacing: -.5px; }
.close { border: 0; border-radius: 50%; background: transparent; width: 36px; height: 36px; font-size: 25px; line-height: 1; font-weight: 300; }
.close:hover { background: #00000006; }
.comment-scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 22px; min-height: 0; }
.entry { padding: 17px 0; border-top: 1px solid #ece8e8; }
.entry-meta { display: flex; align-items: center; gap: 8px; color: #8a8282; font-size: 11px; }
.entry-name { color: #635b5b; font-weight: 500; overflow-wrap: anywhere; min-width: 0; }
.entry-body { margin: 10px 0 0; font-size: 14px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.delete { margin-left: auto; padding: 4px 0 4px 8px; color: #9c8585; border: 0; background: transparent; font-size: 11px; }
.empty, .load-status { color: #928989; font-size: 13px; line-height: 1.7; text-align: center; margin: 24px 0; }
.load-status:empty { display: none; }
.more { display: block; margin: 10px auto 20px; border: 1px solid #ddd6d6; background: transparent; border-radius: 20px; padding: 9px 18px; font-size: 12px; }
.composer { border-top: 1px solid #e8e3e3; padding: 18px 22px 20px; background: #fff; }
.composer label, .login-form label { display: block; margin-bottom: 7px; font-size: 12px; color: #5b5353; }
input, textarea { width: 100%; border: 1px solid #e5dede; border-radius: 10px; background: #fcfbfa; color: #282626; padding: 10px 12px; font-size: 14px; line-height: 1.5; }
textarea { resize: vertical; min-height: 80px; max-height: 150px; }
.composer input { margin-bottom: 13px; }
input::placeholder, textarea::placeholder { color: #b0a8a8; }
.form-bottom { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-top: 10px; }
.counter { color: #a09595; font-size: 11px; }
.primary { background: #332c2e; color: #fff; border: 0; border-radius: 10px; padding: 10px 17px; font-size: 13px; min-height: 40px; }
.primary:hover { background: #56474b; }
.form-status { margin: 10px 0 0; color: #a24858; font-size: 12px; line-height: 1.5; }
.form-status:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.admin-page { margin: 0; background: #f6f4f3; padding: 48px 20px; }
.admin-shell { max-width: 680px; margin: auto; }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-heading h1 { font-size: 24px; letter-spacing: -1px; }
.admin-heading a { color: #827777; font-size: 13px; text-decoration: none; }
.admin-description { color: #8a7d7d; font-size: 13px; line-height: 1.8; }
.login-form { max-width: 360px; padding: 24px; margin: 36px auto; border: 1px solid #e9e2e2; border-radius: 18px; background: #fff; }
.login-form .primary { width: 100%; margin-top: 14px; }
.admin-entries { padding: 8px 24px; border: 1px solid #e9e2e2; border-radius: 18px; background: #fff; }
.admin-entries .entry:first-child { border-top: 0; }
.admin-entries .entry-name { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.admin-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 16px 0; }
.admin-actions .more { margin: 0; }


/* A photographic print resting on a light surface. */
.photo-page { margin: 0; background: #f7f7f5; }
.photo-stage { min-height: 100svh; display: grid; place-items: center; padding: 32px 24px 112px; }
.photo-print { width: min(580px, 100%, calc((100svh - 160px) * .66)); margin: 0; padding: clamp(12px, 2.3vw, 28px) clamp(12px, 2.3vw, 28px) clamp(36px, 6vw, 72px); background: #fff; border: 1px solid #e8e8e5; border-radius: 2px 2px 5px 3px; box-shadow: -2px 2px 2px #00000013, 0 5px 8px -5px #00000022; }
.photo-print img { display: block; width: 100%; height: auto; }
.reactions { bottom: max(24px, env(safe-area-inset-bottom)); padding: 6px; gap: 4px; background: #ffffffb8; border-color: #ffffffd9; box-shadow: 0 2px 3px #00000005, 0 8px 28px #0000000d, inset 0 0 0 1px #ffffff70; backdrop-filter: blur(24px) saturate(1.5); -webkit-backdrop-filter: blur(24px) saturate(1.5); }
.reaction { min-width: 70px; min-height: 44px; font-size: 14px; font-weight: 500; transition: transform .18s, background .18s; }
.reaction:active { transform: scale(.92); background: #00000008; }
.reaction svg { stroke-linecap: round; stroke-linejoin: round; }
.reaction[aria-pressed="true"] { color: #ff375f; }
.guestbook { width: 420px; height: 620px; border: 1px solid #ffffffb3; border-radius: 30px; background: #f2f2f7f5; color: #1c1c1e; box-shadow: 0 12px 60px #00000026; }
.guestbook[open] { animation: sheet-in .26s cubic-bezier(.2,.8,.2,1); }
.guestbook::backdrop { background: #00000026; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.panel-heading { position: relative; flex: none; justify-content: center; min-height: 76px; padding: 24px 60px 16px; }
.panel-heading::before { content: ""; position: absolute; top: 8px; width: 34px; height: 5px; border-radius: 3px; background: #3c3c4326; }
.panel-heading h1 { font-size: 17px; letter-spacing: -.3px; font-weight: 600; }
.close { position: absolute; right: 12px; top: 22px; width: 44px; height: 44px; font-size: 26px; color: #8e8e93; background: radial-gradient(circle, #e5e5ea 52%, transparent 54%); }
.close:hover { background: radial-gradient(circle, #dcdce1 52%, transparent 54%); }
.comment-scroll { padding: 4px 24px 16px; }
.guestbook .empty { margin: 64px 0; color: #8e8e93; font-size: 14px; }
.guestbook .entry { border-color: #3c3c4314; }
.guestbook .entry-body { color: #1c1c1e; font-size: 15px; }
.composer { flex: none; padding: 12px 16px 16px; background: transparent; border-top: 1px solid #3c3c4312; }
.composer-fields { background: #fff; border-radius: 20px; padding: 0 14px 10px; box-shadow: 0 1px 2px #00000004; }
.composer input, .composer textarea { background: transparent; border: 0; border-radius: 0; font-size: 16px; padding: 13px 2px; }
.composer input { margin: 0; border-bottom: 1px solid #3c3c4314; }
.composer textarea { min-height: 80px; max-height: 120px; resize: none; padding-bottom: 0; }
.composer input::placeholder, .composer textarea::placeholder { color: #8e8e93; }
.composer input:focus-visible, .composer textarea:focus-visible { outline: none; }
.composer-fields:focus-within { box-shadow: 0 0 0 2px #007aff40; }
.form-bottom { min-height: 44px; margin: 0; justify-content: flex-end; }
.counter { margin-right: auto; color: #8e8e93; }
.send { display: grid; place-items: center; width: 44px; height: 44px; padding: 6px; border: 0; border-radius: 50%; color: white; background: #007aff; background-clip: content-box; transition: opacity .15s, transform .15s; }
.send svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.send:disabled { cursor: default; opacity: .3; }
.send:active { transform: scale(.9); }
.send[aria-busy="true"] { opacity: .45; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 540px) {
  .photo-stage { padding: 28px 24px 112px; }
  .photo-print { width: min(100%, calc((100svh - 180px) * .7)); }
  .guestbook { inset: auto 8px calc(8px + var(--keyboard-inset, 0px)); width: auto; max-width: none; height: 72dvh; max-height: calc(var(--keyboard-viewport, 100dvh) - 24px); border-radius: 30px; }
  .composer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  input, textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .guestbook[open] { animation: none; }
  .reaction, .send { transition: none; }
}
