:root {
  --ink: #302a2d; --muted: #6b6263; --wine: #744252; --wine-dark: #542e3b;
  --paper: #fbf8f5; --line: #ddd2cc; --blush: #e9c1ae;
  --serif: "STIX Two Text", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "SimSun", Georgia, serif;
  --sans: "DM Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  font-family: var(--sans); font-size: 100%; color: var(--ink); background: #302931;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; min-height: 100svh; font-size: 1rem; line-height: 1.55; }
body.guest { position: relative; color: #fff5ee; background: #362d36; isolation: isolate; }
body.guest::before { content: ""; position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(0deg, rgba(33,25,34,.72),rgba(37,31,40,.12) 65%,rgba(28,24,31,.35)),
  linear-gradient(93deg, rgba(36,28,34,.44),rgba(34,24,29,.04) 51%,rgba(32,24,32,.12)),
  url("/assets/coast.webp") center 52% / cover no-repeat; }
body.member { background: var(--paper); }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { font-family: var(--serif); font-weight: 500; }
a { color: inherit; }
button,input,textarea { font: inherit; }
button,a,input,textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid #be825e; outline-offset: 3px; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 20; padding: .6rem 1rem; background: white; color: var(--ink); transform: translateY(-150%); }
.skip:focus { transform: none; }
.masthead { position: relative; margin-inline: auto; width: min(1392px, calc(100% - clamp(40px, 9.6vw, 156px)));
  min-height: 84px; display: flex; align-items: center; gap: 2.2rem; justify-content: space-between; border-bottom: 1px solid rgba(255,241,228,.4); }
.identity { display: inline-flex; align-items: center; flex: 0 0 auto; gap: .7rem; text-decoration: none; font: 600 1.35rem var(--serif); letter-spacing: .12em; }
.seal { position: relative; width: 36px; height: 32px; display: inline-block; color: inherit; }
.seal::before,.seal::after { content: ""; position: absolute; top: 3px; width: 17px; height: 26px; border: 1.45px solid; border-radius: 50%; }
.seal::before { left: 5px; transform: rotate(-32deg); }
.seal::after { left: 14px; transform: rotate(32deg); }
.privacy { font-size: .875rem; display: flex; align-items: center; gap: .65rem; }
.lock { width: 12px; height: 10px; border: 1.2px solid; border-radius: 2px; position: relative; display: inline-block; margin-top: 5px; }
.lock::before { content: ""; width: 6px; height: 6px; position: absolute; left: 1.7px; top: -7px; border: 1.2px solid; border-bottom: 0; border-radius: 5px 5px 0 0; }
.gate { width: min(1220px, calc(100% - clamp(40px, 15vw, 210px))); min-height: calc(100vh - 85px); min-height: calc(100svh - 85px);
  margin: auto; display: grid; grid-template-columns: minmax(0,1fr) minmax(330px, 422px); justify-content: space-between;
  align-items: center; gap: clamp(28px, 7vw, 140px); padding-block: clamp(48px, 8vh, 110px); }
.cover-copy { padding-bottom: 1.25rem; text-shadow: 0 2px 20px #30213345; }
.cover-line { height: 1px; width: 52px; background: #f9d3be; margin-bottom: 1.65rem; }
.cover-copy h1 { color: #fff8ee; font-size: clamp(3.5rem, 6.8vw, 6.85rem); letter-spacing: -.045em; line-height: 1.18; }
.cover-copy h1 em { font-style: normal; color: #f1c4b1; }
.cover-period { color: #f1c4b1; margin-left: -.18em; }
.cover-copy p { margin-top: 1.55rem; color: #fff2e8; font-size: clamp(1rem,1.25vw,1.18rem); line-height: 1.9; letter-spacing: .04em; }
.auth-panel { position: relative; border-radius: 4px; padding: clamp(27px,3.4vw,50px); color: var(--ink);
  background: rgba(252,247,240,.96); border: 1px solid rgba(255,248,240,.84); box-shadow: 0 20px 75px #271c283a; }
.panel-corner { height: 3px; width: 34px; background: var(--wine); margin-bottom: 1.2rem; }
.auth-panel h2 { font-size: clamp(1.85rem,2.65vw,2.55rem); line-height: 1.25; letter-spacing: .025em; margin-bottom: 1.8rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .94rem; font-weight: 600; margin-bottom: .42rem; }
.field input,.field textarea { display: block; width: 100%; min-width: 0; border-radius: 3px; border: 1px solid #bcada8; color: var(--ink); padding: .65rem .78rem; background: #fffcf8; }
.field input { min-height: 45px; }
.field input[type=file] { padding: .55rem; font-size: .875rem; }
.field input::file-selector-button { margin-right: .7rem; padding: .32rem .6rem; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 2px; }
.field textarea { resize: vertical; min-height: 6rem; }
.field input:focus,.field textarea:focus { outline-offset: 1px; }
.password-row { position: relative; }
.password-row input { padding-right: 3.8rem; }
.password-row button { position: absolute; top: 3px; bottom: 3px; right: 3px; min-width: 3.4rem; border: 0; background: transparent; font-size: .875rem; color: var(--muted); }
.hint,.section-info { color: var(--muted); font-size: .875rem; }
.field .hint { padding-top: .4rem; }
.button { border: 1px solid transparent; border-radius: 3px; min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: .18rem; padding: .55rem 1.12rem; font-size: .94rem; font-weight: 550; }
.button.primary { color: #fffaf5; background: var(--wine); }
.button.primary:hover { background: var(--wine-dark); }
.button.secondary { border-color: #c9b7b3; color: var(--wine-dark); background: transparent; }
.button.secondary:hover { background: #f2e7e3; }
.button.full { width: 100%; margin-top: .14rem; min-height: 46px; }
.feedback { font-size: .9rem; color: #873b40; white-space: pre-line; overflow-wrap: anywhere; }
.feedback:not(:empty) { margin: .65rem 0 .9rem; }
.mode-line { border-top: 1px solid var(--line); padding-top: 1.15rem; margin-top: 1.4rem; display: flex; align-items: baseline; gap: .3rem; font-size: .875rem; color: var(--muted); flex-wrap: wrap; }
.text-action { color: var(--wine); background: transparent; border: 0; padding: .12rem .18rem; font-weight: 600; font-size: .9rem; text-decoration: underline; text-decoration-color: #be9f9e; text-underline-offset: 3px; }
.member .masthead { border-color: var(--line); }
.member .identity { color: var(--wine-dark); }
nav { display: flex; align-self: stretch; align-items: stretch; justify-content: center; gap: 1.7rem; }
nav a { display: flex; align-items: center; font-size: .98rem; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; padding: 0 .13rem; }
nav a[aria-current=page] { color: var(--wine); border-bottom-color: var(--wine); font-weight: 600; }
.owner { min-width: 0; display: flex; align-items: center; gap: .75rem; }
.owner span { color: var(--muted); max-width: 10rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .9rem; }
.owner button { border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--ink); padding: .32rem .65rem; font-size: .875rem; }
.workspace { max-width: 1168px; width: calc(100% - clamp(32px,10vw,144px)); margin: 0 auto; padding: clamp(24px,4vw,60px) 0 6rem; }
.home-hero { display: flex; justify-content: space-between; align-items: end; gap: .75rem; padding: clamp(26px,5vw,74px);
  min-height: clamp(255px,33vw,415px); border-radius: 4px; color: #fff6ee; background:
  linear-gradient(0deg,#2d242edb, #2d242e20 95%),url("/assets/coast.webp") center 55%/cover no-repeat,#53414a; }
.hero-kicker { font-size: .91rem; margin-bottom: .5rem; display: inline-block; }
.home-hero h1 { font-size: clamp(2.5rem,5.2vw,5.3rem); line-height: 1.2; letter-spacing: -.025em; }
.home-hero-copy p { margin-top: .5rem; font-size: .975rem; }
.photo-button { border: 1px solid #fff6e9a6; background: #30273564; color: #fff7ed; padding: .53rem .85rem; border-radius: 3px; font-size: .875rem; flex: 0 0 auto; }
.collection { margin-top: clamp(30px,5vw,64px); }
.home-hero[hidden]+.collection,.collection:first-of-type { margin-top: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: 1.25rem; }
.section-head h2 { font-size: clamp(1.6rem,3.2vw,2.65rem); color: #392d35; }
.section-info { margin-top: .2rem; }
.entry-list { border-top: 1px solid var(--line); }
.entry-button { width: 100%; padding: 1.15rem .2rem; display: grid; grid-template-columns: 5.5rem 1fr; gap: clamp(16px,3vw,46px); text-align: left; align-items: start; border: 0; border-bottom: 1px solid var(--line); background: transparent; }
.entry-button:hover { background: #f4edeb; }
.entry-date { font: 1.45rem var(--serif); color: var(--wine); }
.entry-date small { display: block; font-family: var(--sans); color: var(--muted); font-size: .82rem; padding-top: .2rem; }
.entry-copy { min-width: 0; }
.entry-copy strong,.photo-card strong { display: block; overflow-wrap: anywhere; }
.entry-copy strong { font: 600 1.2rem var(--serif); }
.entry-copy .excerpt { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin-top: .32rem; color: var(--muted); }
.entry-copy small,.photo-card small { display: block; font-size: .83rem; color: var(--muted); margin-top: .35rem; overflow-wrap: anywhere; }
.photo-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: clamp(12px,2vw,28px); }
.photo-card { display: block; width: 100%; min-width: 0; border: 0; padding: 0; text-align: left; background: transparent; }
.photo-card img { display: block; aspect-ratio: 4/3; width: 100%; height: auto; object-fit: cover; border-radius: 3px; background: #e6dcd5; }
.photo-card strong { margin-top: .55rem; font-weight: 500; }
.all-link { display: inline-block; margin-top: 1.1rem; font-size: .9rem; color: var(--wine); text-underline-offset: .22em; }
.empty { margin: 0; grid-column: 1/-1; padding: 1.45rem 1.1rem; text-align: center; background: #f3edeb; border-radius: 2px; color: var(--muted); }
dialog { border: 1px solid var(--line); border-radius: 5px; padding: clamp(20px,4vw,36px); background: var(--paper); color: var(--ink); width: min(574px,calc(100% - 24px)); max-height: calc(100svh - 32px); overflow: auto; }
dialog::backdrop { background: #251f27a8; }
.dialog-head,.dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: .65rem; }
.dialog-head { margin-bottom: 1.1rem; }
.dialog-head h2, #read-title { font-size: clamp(1.5rem,4vw,2.1rem); overflow-wrap: anywhere; }
.close { flex: 0 0 auto; margin-left: auto; border: 0; background: transparent; width: 40px; height: 40px; color: var(--muted); font-size: 1.7rem; line-height: 1; }
.dialog-actions { justify-content: end; flex-wrap: wrap; margin-top: 1.1rem; }
#remove-item { margin-right: auto; }
#reader { width: min(720px,calc(100% - 24px)); }
#read-body { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; margin: 1rem 0; }
#read-image { width: 100%; max-height: 58svh; object-fit: contain; background: #eae1dd; margin-top: .8rem; }
.noscript { background: #fbf3e9; color: var(--ink); padding: .5rem; text-align: center; }
@media (max-width: 720px) {
  .masthead { min-height: 64px; width: calc(100% - 36px); gap: .8rem; }
  .gate { min-height: calc(100svh - 64px); width: min(100% - 40px,480px); grid-template-columns: 1fr; align-content: center; gap: clamp(20px,4vh,34px); padding-block: 34px; }
  .cover-copy { padding: 0; }
  .cover-copy h1 { font-size: clamp(2.7rem,8.6vw,4rem); line-height: 1.17; }
  .cover-copy h1 br { display: none; }
  .cover-copy h1 em { display: inline; }
  .cover-copy p { font-size: .96rem; margin-top: .65rem; }
  .cover-copy p br { display: none; }
  .cover-line { width: 34px; margin-bottom: .8rem; }
  .auth-panel { padding: 24px; }
  .member .masthead { flex-wrap: wrap; row-gap: 0; padding-top: .9rem; }
  nav { order: 3; width: 100%; justify-content: start; gap: 1.6rem; height: 44px; }
  .owner span { max-width: 7rem; }
  .photo-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .member .workspace { width: calc(100% - 36px); }
  .home-hero { align-items: start; flex-direction: column; justify-content: end; gap: 1rem; }
}
@media (max-width: 440px) {
  .cover-copy h1 { font-size: clamp(2.05rem,8.5vw,2.48rem); }
  .cover-period { display: none; }
  .identity { font-size: 1.13rem; gap: .4rem; }
  .auth-panel h2 { margin-bottom: 1.22rem; }
  .entry-button { grid-template-columns: 4rem 1fr; gap: .75rem; }
}
@media (prefers-reduced-motion: no-preference) { .button,.text-action,nav a { transition: background-color .16s,color .16s,border-color .16s; } }
