@charset "UTF-8";
:root {
  color-scheme: light;
  --paper: #f7f6ef;
  --panel: #fffef9;
  --ink: #252823;
  --muted: #61665b;
  --line: #d8d8cb;
  --rust: #993e28;
  --rust-hover: #7b301f;
  --rust-pale: #f3e4d9;
  --sage: #3e5948;
  --serif: "STZhongsong", "Songti SC", "Noto Serif CJK SC", "SimSun", Georgia, serif;
  --sans: "Instrument Sans", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 16px/1.6 var(--sans); }
img { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; }
button, input, textarea, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .58; }
button, input, textarea, select, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #407cb4; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
.gate, #app { max-width: 1264px; padding: 0 clamp(20px, 5vw, 74px); margin: 0 auto; }
.masthead, .workspace-head { min-height: 96px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.mast-brand, .wordmark { display: inline-flex; gap: 11px; align-items: center; }
.mast-brand strong, .wordmark { font-family: var(--serif); font-size: 23px; font-weight: 700; letter-spacing: .045em; }
.mast-brand i { font-family: "Instrument Serif", Georgia, serif; font-weight: 400; letter-spacing: -.045em; font-size: 21px; color: var(--muted); margin-left: 4px; }
.role-pill, .workspace-label { display: inline-flex; gap: 8px; align-items: center; color: #3b5143; font-size: 13px; font-weight: 650; letter-spacing: .07em; border: 1px solid #cdd2c4; border-radius: 99px; padding: 4px 11px; background: #eef0e6; }
.role-dot { width: 6px; height: 6px; background: #60735b; border-radius: 50%; }
.workspace-head .workspace-label { margin-left: auto; }
.workspace-head .btn.text { padding-inline: 4px; font-size: 14px; }
.gate-spread { display: grid; grid-template-columns: 1.16fr 1fr; min-height: min(620px, calc(100svh - 155px)); margin: clamp(24px,4vh,44px) 0 34px; background: var(--panel); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.cover { position: relative; isolation: isolate; min-height: 480px; overflow: hidden; background: #866144; color: #fff9ec; }
.cover-photo, .cover::after { position: absolute; inset: 0; width: 100%; height: 100%; }
.cover-photo { object-fit: cover; object-position: 53% center; z-index: -2; }
.cover::after { content: ""; background: linear-gradient(0deg,rgba(31,21,14,.68),transparent 54%); z-index: -1; }
.cover-copy { position: absolute; bottom: clamp(30px,4.5vw,68px); left: clamp(27px,4.1vw,60px); }
.cover-kicker { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 650; letter-spacing: .16em; }
.cover-kicker span { display: inline-block; width: 30px; height: 2px; background: #f3c997; }
.cover h1 { font-family: var(--serif); font-size: clamp(46px,5vw,74px); line-height: 1.17; letter-spacing: .015em; margin: 11px 0 0; font-weight: 700; }
.cover-period { color: #ffae77; font-family: Georgia,serif; }
.frame-corner { position: absolute; width: 30px; height: 30px; top: 23px; right: 23px; border-top: 1px solid #fff9; border-right: 1px solid #fff9; }
.gate-form-pane { display: flex; align-items: center; justify-content: center; padding: 48px clamp(25px,4vw,65px); }
.gate-form-inner { width: 100%; max-width: 360px; }
.gate-icon { width: 50px; height: 50px; display: grid; place-items: center; background: var(--rust-pale); color: var(--rust); border-radius: 13px; margin-bottom: 24px; }
.gate-form-pane h2, .view-head h1 { font-family: var(--serif); font-size: clamp(32px,3.5vw,47px); line-height: 1.22; letter-spacing: .02em; }
.gate-description { color: var(--muted); margin: 13px 0 30px; line-height: 1.8; }
#gate-form label, .field > label, label.field > span { display: block; font-size: 14px; font-weight: 650; margin-bottom: 7px; }
.key-input { height: 52px; display: flex; align-items: center; gap: 11px; border: 1px solid #a8ae9e; border-radius: 6px; padding: 0 15px; color: #77806e; background: white; }
.key-input:focus-within { outline: 3px solid #d9b8a7; border-color: var(--rust); }
.key-input input { border: 0; background: transparent; outline: 0; flex: 1 1 auto; width: 0; min-width: 0; height: 100%; color: var(--ink); }
::placeholder { color: #74786e; opacity: 1; }
.gate-error { color: #942c20; font-size: 14px; margin-top: 7px; }
.gate-error:empty { margin: 0; }
.btn { display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 46px; padding: 10px 19px; background: var(--panel); border: 1px solid #aeb4a5; border-radius: 6px; color: var(--ink); font-weight: 650; font-size: 15px; line-height: 1.5; transition: background .16s, border-color .16s, transform .12s; }
.btn:not(:disabled):active { transform: translateY(1px); }
.btn.primary { color: white; border-color: var(--rust); background: var(--rust); }
.btn.primary:not(:disabled):hover { background: var(--rust-hover); border-color: var(--rust-hover); }
.btn.secondary:not(:disabled):hover { border-color: #7d8976; background: #efefe5; }
.btn.danger, .btn.text { background: transparent; border-color: transparent; padding-inline: 10px; }
.btn.danger { color: #983723; }
.btn.text { color: var(--sage); }
.enter { width: 100%; min-height: 51px; margin-top: 15px; }
.gate-footnote { font-size: 13px; line-height: 1.65; color: var(--muted); margin-top: 20px; display: flex; gap: 7px; align-items: flex-start; }
.gate-footnote svg { flex: none; margin-top: 2px; }
.wordmark::before { content: ""; display: inline-block; width: 36px; height: 36px; background: url("/static/mark.svg") center/contain no-repeat; flex: none; }
.tabbar { display: flex; flex-wrap: wrap; gap: 5px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.tab { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 6px; padding: 9px 18px; min-height: 44px; font-weight: 650; }
.tab[aria-selected="true"], .tab.active { color: var(--rust); border-color: #d9bbaa; background: #f1e6da; }
.tab:hover { color: var(--ink); }
#app { padding-bottom: 60px; }
.panel { max-width: 840px; margin: 0 auto; min-width: 0; }
.view-head { margin: 36px 0 25px; }
.view-head h1 { margin-bottom: 10px; }
.view-head p, .meta, .empty p { color: var(--muted); }
.eyebrow { font-size: 13px; letter-spacing: .09em; font-weight: 650; color: var(--rust) !important; margin-bottom: 8px; }
.section-title { font-family: var(--serif); font-size: 24px; line-height: 1.35; margin: 16px 0; }
.card, .record, .capture-card, .empty { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: clamp(17px,3vw,28px); min-width: 0; }
.stack, .records { display: grid; gap: 14px; }
.card + .card, .card + .records, .capture-card + section { margin-top: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { color: var(--ink); }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea, .record textarea, #app select, #app input[type=text], #app textarea { color: var(--ink); padding: 10px 13px; border: 1px solid #aab09f; background: #fffefa; border-radius: 6px; min-height: 46px; width: 100%; max-width: 100%; font-size: 16px; }
.field textarea, #app textarea { resize: vertical; min-height: 96px; }
.actions, .capture-actions, .choices { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.capture-card { position: relative; overflow: hidden; }
.capture-actions { margin-top: 15px; }
.check { display: inline-flex; gap: 8px; align-items: center; min-height: 42px; cursor: pointer; }
#app input[type=checkbox], #app input[type=radio] { accent-color: var(--rust); width: 18px; height: 18px; }
.record { display: flow-root; overflow-wrap: anywhere; }
.thumb { width: 112px; height: 96px; object-fit: cover; border-radius: 5px; background: #e3dfd3; }
.record-body { min-width: 0; }
.record-title { font-size: 19px; font-weight: 700; line-height: 1.5; }
.meta { font-size: 14px; line-height: 1.7; }
.status { display: inline-flex; align-items: center; padding: 3px 9px; font-size: 13px; font-weight: 620; border-radius: 4px; background: #e9eee3; color: #385541; }
.status.pending { background: #f8edcf; color: #735414; }
.reply { border-left: 3px solid #718b71; padding: 9px 14px; background: #eef1e8; margin-top: 12px; }
.empty { padding: 25px; border-style: dashed; text-align: center; background: #f2f2e9; }
.notice:not(:empty) { position: sticky; top: 8px; z-index: 4; padding: 12px 16px; margin: 10px auto; max-width: 840px; background: #e9eee3; border: 1px solid #b7c4ad; color: #284c36; border-radius: 6px; font-size: 15px; }
.notice.error:not(:empty) { color: #8b2b1e; background: #faeae4; border-color: #d7af9c; }
.section-title, .record-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.section-title h2 { font: 700 23px/1.35 var(--serif); }
.section-title .count, h2 .count { color: var(--sage); font: 650 14px/1.4 var(--sans); padding: 3px 8px; border-radius: 4px; background: #e8ebdf; }
.capture-summary .section-title { margin: 0; }
.capture-summary { border-top: 3px solid #8a987c; }
.capture-card .field label { margin-bottom: 0; }
.capture-card .capture-actions { margin-top: 3px; }
.btn[data-action="camera"]::before, .btn[data-action="album"]::before { content: ""; display: inline-block; width: 19px; height: 19px; background-color: currentColor; mask: var(--button-icon) center / contain no-repeat; }
.btn[data-action="camera"] { --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M3 7h4l2-3h6l2 3h4v13H3z'/%3E%3Ccircle cx='12' cy='13' r='3.4'/%3E%3C/svg%3E"); min-width: 130px; }
.btn[data-action="album"] { --button-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='2'/%3E%3Ccircle cx='8' cy='9' r='1.5'/%3E%3Cpath d='m4 17 6-5 3 3 3-3 5 5'/%3E%3C/svg%3E"); }
.view-head:has(+ .capture-card) { border-radius: 8px; overflow: hidden; color: white; padding: 32px; background: linear-gradient(90deg,rgba(39,34,24,.88),rgba(44,34,22,.72) 47%,rgba(48,32,18,.08)), url("/static/courtyard.webp") 50% 53% / cover; }
.view-head:has(+ .capture-card) p { color: #fffbf1; }
.view-head:has(+ .capture-card) .eyebrow { color: #ffe0a8 !important; }
.record-main { display: flex; align-items: flex-start; gap: 16px; }
.thumb-link { flex: none; border-radius: 5px; }
.record-body { flex: 1; }
.record-note, .feedback-part p, .reply p { margin-top: 5px; white-space: pre-wrap; }
.record-actions, .record > .actions, .record #reply-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.record-actions .check { margin-right: auto; }
.inline-error { color: #8c2d20; }
.identity-choice { border: 0; padding: 0; margin: 0; }
.identity-choice legend { font-size: 14px; font-weight: 650; }
.identity-choice .check { margin-right: 18px; }
.choices .btn.choice { color: #455441; background: #f0f1e7; border-color: #ccd2c3; padding: 5px 10px; font-size: 13px; font-weight: 500; min-height: 36px; }
.feedback-part { margin-top: 16px; }
.feedback-part strong, .reply strong { font-size: 14px; }
.panel > .section-title { margin-top: 26px; }
.submit-bar { margin-top: 14px; }
@media (min-width: 1400px) { .gate-spread { min-height: 610px; } }
@media (max-width: 800px) {
  .masthead, .workspace-head { min-height: 74px; }
  .gate-spread { grid-template-columns: 1fr 1fr; }
  .gate-form-pane { padding: 26px; }
  .cover { min-height: 400px; }
}
@media (max-width: 650px) {
  .gate, #app { padding-inline: 19px; }
  .masthead, .workspace-head { min-height: 66px; }
  .mast-brand, .wordmark { gap: 8px; }
  .mast-brand img, .wordmark::before { width: 31px; height: 31px; }
  .mast-brand strong, .wordmark { font-size: 20px; }
  .mast-brand i { font-size: 17px; margin-left: 1px; }
  .role-pill, .workspace-label { font-size: 12px; padding: 3px 9px; }
  .gate-spread { display: block; margin: 16px 0 22px; min-height: auto; }
  .cover { min-height: 0; height: clamp(145px,23svh,212px); }
  .cover-photo { object-position: center 56%; }
  .cover-copy { bottom: 15px; left: 21px; }
  .cover-kicker { font-size: 12px; gap: 8px; }
  .cover-kicker span { width: 21px; height: 1px; }
  .cover h1 { font-size: 39px; margin: 4px 0 0; }
  .frame-corner { top: 13px; right: 13px; width: 17px; height: 17px; }
  .gate-form-pane { padding: 23px 21px; justify-content: flex-start; }
  .gate-form-inner { max-width: none; }
  .gate-icon { display: none; }
  .gate-form-pane h2 { font-size: 29px; }
  .gate-description { margin: 6px 0 17px; font-size: 15px; }
  .gate-footnote { margin-top: 14px; }
  .tabbar { padding: 9px 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; }
  .tab { padding: 7px 4px; font-size: 15px; }
  .view-head { margin: 23px 0 17px; }
  .view-head h1 { font-size: 32px; }
  .view-head:has(+ .capture-card) { padding: 20px; }
  .record-main { gap: 10px; }
  .capture-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .btn[data-action="camera"] { min-width: 0; }
  .thumb { width: 87px; height: 80px; }
  #app { padding-bottom: max(48px,env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
