@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;1,500&family=Inter:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;600&display=swap');
:root { color-scheme: dark; }
* { box-sizing: border-box; }
html { background: #151116; }
body { margin: 0; height: var(--viewport-height,100dvh); min-height: 0; display: flex; flex-direction: column; overflow: hidden; color: #f9f2e8; font-family: Inter,"Noto Sans SC",system-ui,sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.backdrop { position: fixed; inset: 0; z-index: -2; background: linear-gradient(110deg,rgba(16,11,15,.97),rgba(26,18,21,.88) 53%,rgba(29,20,24,.62)),url('../assets/birthday-desktop.webp') center/cover; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 75% 40%,rgba(221,163,125,.12),transparent 50%); }
header { min-height: 72px; flex: none; padding: 12px clamp(20px,5vw,70px); display: flex; justify-content: space-between; align-items: center; gap: 20px; font-size: 12px; letter-spacing: .12em; }
body.board-open > header { display: none; }
.brand { font-weight: 600; }
.back { color: #e3d9cc; }
.back:hover, .text-button:hover { text-decoration: underline; }
main { width: min(1280px,calc(100% - 48px)); margin: 0 auto; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.login-view { flex: 1; min-height: 0; overflow-y: auto; display: flex; align-items: center; padding: 35px 0 max(8vh,48px); }
.login-copy { width: min(100%,570px); }
small { font-size: 10px; letter-spacing: .24em; color: #d5b9a0; }
h1 { font-size: clamp(68px,9vw,134px); line-height: .98; letter-spacing: -.06em; font-weight: 500; margin: 25px 0; }
.login-copy .login-monogram { display: inline-block; margin: 0 0 .08em .02em; font-family: "Cormorant Garamond",Baskerville,Georgia,serif; font-size: .96em; font-weight: 500; font-style: italic; color: #ead4bd; letter-spacing: -.085em; line-height: 1; }
.login-copy form { margin-top: 54px; max-width: 470px; }
.login-copy label { display: block; font-size: 11px; letter-spacing: .1em; color: #d9c8b7; margin-bottom: 12px; }
.login-row { display: flex; align-items: center; border-bottom: 1px solid #b7a99a; min-height: 55px; }
.login-row input { border: 0; outline: 0; background: none; color: #fff; min-width: 0; flex: 1; padding: 12px 4px; font-size: 18px; }
.login-row button { border: 0; background: none; color: #f5d9be; padding: 10px 8px; white-space: nowrap; }
.status { min-height: 24px; color: #f0ba9e; font-size: 13px; }
.text-button { background: none; border: 0; padding: 8px 0; color: #e8d0b8; font-size: 12px; text-align: left; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.identity-picker { display: flex; align-items: center; gap: 12px; border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.identity-picker legend { font-size: 11px; letter-spacing: .1em; color: #d9c8b7; margin-bottom: 12px; }
.identity-option { display: flex !important; align-items: center; gap: 10px; min-width: 108px; padding: 10px 14px; border: 1px solid rgba(255,255,255,.23); border-radius: 5px; cursor: pointer; font-size: 15px !important; margin: 0 !important; transition: background .2s,border-color .2s; }
.identity-option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.identity-option:has(input:checked) { background: rgba(255,255,255,.09); border-color: currentColor; }
.identity-option:has(input:focus-visible) { outline: 2px solid #fff; outline-offset: 2px; }
.gender-icon { font-size: 24px; line-height: 1; }
.identity-option.male, .identity-badge.male { color: #86b9ff; }
.identity-option.female, .identity-badge.female { color: #f3a4c1; }
.identity-badge.unknown { color: #b9aaa3; }
#boardView { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.board-head { flex: none; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 7px 0 6px; border-bottom: 1px solid rgba(221,199,183,.28); }
.history-summary, .board-actions { display: inline-flex; align-items: center; gap: 7px; }
.history-summary { white-space: nowrap; }
.history-summary h2 { margin: 0; font-size: 13px; font-weight: 500; }
.history-summary #count { font-size: 12px; color: #c9b1a0; }
.board-actions { margin-left: auto; gap: 15px; }
.active-identity { display: inline-flex; align-items: center; gap: 6px; }
.identity-label { color: #c9b1a0; font-size: 12px; white-space: nowrap; }
.identity-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 21px; padding: 1px 5px; font-size: 12px; border: 1px solid currentColor; border-radius: 999px; white-space: nowrap; line-height: 1.2; }
.identity-badge.compact { min-width: 21px; padding: 1px 5px; font-size: 12px; }
.board-layout { --composer-height: 53px; width: min(850px,100%); margin: 0 auto; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 7px; padding: 7px 0 8px; }
.messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; padding: 0 4px 12px; }
.board-layout h2 { font-weight: 500; font-size: 21px; letter-spacing: -.04em; margin: 0; }
#importOld { margin-bottom: 12px; }
#entries { display: grid; gap: 9px; }
.empty { border: 1px solid rgba(221,199,183,.24); border-radius: 8px; padding: 32px 20px; color: #bcada3; font-size: 14px; }
.messages article { min-width: 0; border: 1px solid rgba(221,199,183,.23); border-radius: 9px; padding: 14px 17px 11px; background: rgba(31,24,28,.78); }
.messages article.pinned { border-color: rgba(231,188,145,.62); background: rgba(45,31,32,.91); }
.entry-heading, .comment-meta { display: flex; align-items: center; gap: 7px; min-width: 0; flex-wrap: wrap; }
.entry-heading time, .comment-meta time { color: #b9a69b; font-size: 12px; font-variant-numeric: tabular-nums; }
.pin-marker { padding: 2px 6px; border: 1px solid rgba(245,217,190,.48); border-radius: 999px; color: #edd3b7; font-size: 10px; white-space: nowrap; }
.entry-controls { display: flex; gap: 10px; margin-left: auto; }
.pin-button { flex: none; border: 0; background: transparent; color: #ebca9f; font-size: 12px; padding: 9px 5px; min-height: 38px; }
.pin-button:hover { text-decoration: underline; }
.pin-button:disabled { opacity: .55; cursor: wait; }
.delete-button { flex: none; margin-left: auto; border: 0; background: transparent; color: #dcb7a6; font-size: 12px; padding: 9px 5px; min-height: 38px; }
.delete-button:hover { text-decoration: underline; }
.delete-button:focus-visible, .pin-button:focus-visible, .comment-toggle:focus-visible, .submit:focus-visible { outline: 2px solid #f5d9be; outline-offset: 2px; }
.delete-button:disabled { opacity: .55; cursor: wait; }
.messages article p { white-space: pre-wrap; overflow-wrap: anywhere; color: #e8ded5; line-height: 1.58; font-size: 16px; }
.entry-body { margin: 5px 0 8px; }
.comment-list { margin: 0 0 2px 20px; padding: 0 0 0 13px; border-left: 1px solid rgba(221,199,183,.3); }
.comment { padding: 7px 0; }
.comment + .comment { border-top: 1px solid rgba(221,199,183,.16); }
.messages article .comment p { margin: 3px 0 0 27px; }
.image-gallery { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 7px; margin: 7px 0 10px; max-width: 640px; }
.image-gallery a { display: block; flex: none; width: fit-content; max-width: 100%; border: 1px solid rgba(221,199,183,.27); border-radius: 5px; overflow: hidden; }
.image-gallery img { display: block; width: auto; height: auto; max-width: 100%; max-height: 240px; }
.comment-images { margin-left: 27px; max-width: 490px; }
.comment-toggle { margin: 0 0 0 20px; min-height: 34px; border: 0; background: transparent; color: #e8cbb4; font-size: 12px; padding: 6px 0; }
.comment-toggle:hover { text-decoration: underline; }
.comment-form { margin: 4px 0 6px 20px; }
.comment-row, .composer-row { display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.comment-form textarea, .message-form textarea { flex: 1; display: block; width: 100%; min-width: 0; height: var(--composer-height); min-height: var(--composer-height); max-height: 38dvh; padding: 8px 10px; border: 1px solid #78665e; border-radius: 5px; background: rgba(255,255,255,.055); color: #fff; font-size: 14px; line-height: 1.5; resize: none; overflow-y: hidden; outline: none; }
.comment-row button, .submit { flex: none; min-width: 52px; min-height: 39px; padding: 7px 12px; border: 0; border-radius: 3px; background: #eddfcf; color: #231c1d; font-size: 12px; white-space: nowrap; }
.comment-form .status, .message-form .status { display: block; min-height: 0; margin: 4px 0 0; overflow-wrap: anywhere; color: #f0ba9e; }
.comment-form .status:empty, .message-form .status:empty { display: none; }
.comment-form textarea:focus, .message-form textarea:focus { border-color: #f5d9be; }
.photo-picker { flex: none; display: flex; align-items: flex-end; }
.comment-row .photo-add, .composer-row .photo-add { display: grid; place-items: center; min-width: 39px; width: 39px; height: 39px; padding: 0; border: 1px solid rgba(221,199,183,.4); border-radius: 4px; background: rgba(255,255,255,.04); color: #ead4bd; }
.photo-add svg { width: 19px; height: 19px; }
.photo-add:hover { border-color: #ead4bd; }
.photo-add:disabled { opacity: .5; cursor: default; }
.photo-previews { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 7px; }
.photo-preview { position: relative; width: 57px; height: 57px; border: 1px solid rgba(221,199,183,.4); border-radius: 4px; overflow: hidden; background: #211a1e; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-preview button { position: absolute; top: 0; right: 0; min-width: 23px; min-height: 23px; padding: 0; border: 0; border-radius: 0 0 0 4px; background: rgba(25,19,22,.86); color: #fff; font-size: 17px; line-height: 1; }
.photo-add:focus-visible, .photo-preview button:focus-visible, .image-gallery a:focus-visible { outline: 2px solid #f5d9be; outline-offset: 2px; }
.message-form { flex: none; min-width: 0; padding: 8px 12px; border: 1px solid rgba(221,199,183,.35); border-radius: 8px; background: rgba(31,24,28,.96); box-shadow: 0 -9px 24px rgba(12,8,12,.15); }
@media (max-width: 750px) {
  header { min-height: 60px; }
  main { width: calc(100% - 40px); }
  .login-view { align-items: center; padding: 36px 0 max(36px,env(safe-area-inset-bottom)); }
  .login-copy h1 { font-size: clamp(58px,13vw,96px); }
  .login-copy form { margin-top: 40px; }
  .board-layout { padding-top: 7px; padding-bottom: max(8px,env(safe-area-inset-bottom)); }
  body.comment-editing .message-form { display: none; }
  .backdrop { background-position: 65% center; }
}
@media (max-width: 490px) {
  .messages article { padding: 11px 12px 9px; }
  .comment-list { margin-left: 14px; padding-left: 11px; }
  .comment-toggle { margin-left: 14px; }
  .comment-form { margin-left: 14px; }
  .messages article .comment p { margin-left: 27px; }
  .board-layout { --composer-height: 47px; }
  .message-form { padding: 7px 9px; }
  .comment-row, .composer-row { gap: 6px; }
  .comment-row .photo-add, .composer-row .photo-add { min-width: 36px; width: 36px; height: 39px; }
}
@media (max-width: 390px) {
  main { width: calc(100% - 32px); }
  header { padding-inline: 16px; }
  .login-copy h1 { font-size: clamp(52px,14vw,64px); }
  .login-copy form { margin-top: 30px; }
  .identity-picker { gap: 10px; }
  .identity-option { min-width: 0; flex: 1; padding: 9px 11px; }
  .board-head { gap: 5px 7px; }
  .board-actions { gap: 8px; }
  .history-summary h2, .history-summary #count, .identity-label { font-size: 11px; }
  .entry-heading time, .comment-meta time { font-size: 11px; }
  .identity-badge, .identity-badge.compact { min-width: 19px; padding: 1px 4px; font-size: 11px; }
  .comment-list, .comment-toggle, .comment-form { margin-left: 10px; }
}
@media (max-height: 600px) {
  .login-view { align-items: flex-start; }
  .board-head { padding-top: 5px; padding-bottom: 5px; }
  .board-layout { --composer-height: 44px; }
}
