:root{color-scheme:light;--paper:#f7f3eb;--surface:#fffdf8;--ink:#302c27;--muted:#74695b;--line:#ded6c8;--accent:#94452f;--accent-hover:#753522;--success:#315b46;--error:#9b3527;--kai:"Wedding Kai","Kaiti SC",KaiTi,STKaiti,serif;--xingkai:"Wedding Xingkai","STXingkai","Xingkai SC",var(--kai);--serif:var(--xingkai);--sans:var(--xingkai)}
*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-size:16px;line-height:1.6;-webkit-font-smoothing:antialiased}button,input,a{-webkit-tap-highlight-color:transparent}button,input{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}a{color:var(--accent);text-underline-offset:4px}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--accent);outline-offset:4px}::selection{background:#ead0ba;color:#302c27}input{caret-color:var(--accent)}[hidden]{display:none!important}svg{stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}h1,h2,p{margin:0}h2{font-size:18px;letter-spacing:.02em}button{border:0}button,a,input{transition:background-color .15s,color .15s,border-color .15s}button:disabled:hover{background-color:revert}img{display:block;max-width:100%}.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.guest-shell{width:min(100% - 48px,560px);margin:0 auto;min-height:100svh;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top)}.site-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:28px 0 20px;border-bottom:1px solid var(--line)}.event-name{font-family:var(--serif);font-size:19px;font-weight:600;overflow-wrap:anywhere}.header-note{font-size:11px;letter-spacing:.08em;color:var(--muted);flex-shrink:0}.guest-intro{padding:45px 0 28px}.guest-intro h1{font-family:var(--serif);font-size:clamp(50px,12vw,66px);font-weight:500;line-height:1.23;letter-spacing:.01em;text-wrap:balance;overflow-wrap:anywhere}.intro-copy{margin-top:22px;color:var(--muted);font-size:15px;line-height:1.95}.notice{margin:0 0 16px;padding:12px 14px;border:1px solid var(--line);font-size:14px;overflow-wrap:anywhere}.notice.error{color:var(--error);border-color:#cfa391}.notice:empty{display:none}.capture-actions{padding-bottom:16px}.capture-button{display:flex;align-items:center;gap:18px;width:100%;padding:21px 23px;border-radius:8px;background:var(--accent);color:#fffaf1;text-align:left;min-height:96px}.capture-button:hover{background:var(--accent-hover)}.capture-button>svg:first-child{width:34px;height:34px}.capture-button strong{font-size:20px;font-weight:550;letter-spacing:.05em;display:block}.capture-button span span{display:block;font-size:12px;letter-spacing:.03em;opacity:.85;margin-top:3px}.capture-button .button-arrow{width:23px;height:23px;margin-left:auto}.album-button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:53px;padding:12px 18px;margin-top:12px;border:1px solid #bbad99;border-radius:8px;background:transparent;color:var(--ink);font-size:16px}.album-button:hover{background:#eee6d9}.album-button svg{width:20px;height:20px}.privacy-note{margin-top:17px;text-align:center;font-size:11px;letter-spacing:.02em;color:var(--muted)}.guest-footer{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:auto;padding:38px 0 max(25px,env(safe-area-inset-bottom));font-family:var(--serif);font-size:13px;color:var(--muted)}.footer-flower{font-family:var(--serif);font-size:23px;color:var(--accent)}
.upload-section{margin-top:23px;padding-top:24px;border-top:1px solid var(--line)}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}.section-heading>span{font-size:12px;color:var(--muted)}.upload-list{list-style:none;margin:0;padding:0}.upload-item{display:grid;grid-template-columns:54px 1fr auto;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid var(--line);animation:arrive .3s ease-out}.photo-thumb{width:54px;height:62px;object-fit:cover;border-radius:3px;background:#e8e0d3}.photo-fallback{display:flex;align-items:center;justify-content:center;color:var(--muted);font-size:11px}.file-body{min-width:0}.file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.file-status{font-size:12px;color:var(--muted);overflow-wrap:anywhere;margin-top:3px}.file-status.complete{color:var(--success)}.file-status.error{color:var(--error)}.upload-item progress{display:block;width:100%;height:3px;border:none;margin-top:9px;background:#e2d9cc;accent-color:var(--accent)}progress::-webkit-progress-bar{background:#e2d9cc}progress::-webkit-progress-value{background:var(--accent);transition:width .15s}progress::-moz-progress-bar{background:var(--accent)}.item-retry{font-size:12px;color:var(--accent);background:transparent;padding:10px 0 10px 10px;min-height:44px}.item-complete{width:20px;height:20px;color:var(--success)}.upload-hint{margin-top:16px;font-size:12px;color:var(--muted)}.success-note{display:flex;align-items:center;gap:10px;margin:8px 0 10px;color:var(--success);font-size:13px}.success-note svg{width:19px;height:19px}
.admin-shell{max-width:1120px;width:calc(100% - 64px);margin:0 auto;padding-bottom:45px}.admin-header{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:28px 0 20px;border-bottom:1px solid var(--line);margin-bottom:32px}.admin-header h1{font-family:var(--serif);font-weight:600;font-size:26px}.plain-button{background:none;color:var(--muted);padding:8px 0;font-size:14px;min-height:44px}.login-form{max-width:380px;margin:84px auto 0}.login-form h2{font-family:var(--serif);font-size:32px;font-weight:500;margin-bottom:14px}.login-form>p{color:var(--muted);font-size:14px;margin-bottom:27px}.field-label{display:block;font-size:14px;margin-bottom:8px}.text-input{display:block;width:100%;border:1px solid #b9ab97;border-radius:5px;background:var(--surface);padding:12px 14px;font-size:16px;min-height:49px;color:var(--ink)}.primary-button,.secondary-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 18px;border-radius:5px;font-size:14px;font-weight:500;text-decoration:none}.primary-button{background:var(--accent);color:#fffaf1}.primary-button:hover{background:var(--accent-hover)}.secondary-button{background:transparent;border:1px solid #b9ab97;color:var(--ink)}.secondary-button:hover{background:#eee6d9}.login-submit{width:100%;margin-top:20px}.form-error{color:var(--error);font-size:13px;margin-top:15px;min-height:21px}.admin-overview{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:25px}.admin-overview h2{font-size:22px;font-family:var(--serif);font-weight:600}.overview-caption{color:var(--muted);font-size:13px;margin-top:5px}.event-state{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--success);margin-right:8px}.event-state:before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}.event-state.closed{color:var(--muted)}.admin-stats{display:flex;align-items:center;gap:22px;font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums}.admin-stats strong{color:var(--ink);font-weight:600;margin-right:5px}.invite-panel{display:grid;grid-template-columns:160px 1fr;align-items:center;gap:32px;padding:26px 30px;background:var(--surface);border:1px solid var(--line);margin-bottom:34px}.qr-image{width:160px;height:160px;object-fit:contain}.invite-description h2{font-size:17px}.invite-description p{font-size:13px;color:var(--muted);margin-top:7px}.guest-link{display:block;overflow-wrap:anywhere;margin-top:15px;font-size:12px;color:var(--muted)}.invite-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:17px}.photos-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:22px}.toolbar-actions{display:flex;align-items:center;gap:16px}.photo-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px 18px}.photo-card{min-width:0}.photo-card .photo-preview{width:100%;aspect-ratio:4/3;object-fit:cover;background:#e5ddd1;border-radius:3px}.photo-card .preview-fallback{display:flex;align-items:center;justify-content:center;font-size:13px;color:var(--muted)}.photo-card .photo-name{margin-top:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.photo-card .photo-meta{font-size:11px;color:var(--muted);margin:3px 0 8px}.download-link{font-size:12px}.empty-state{padding:72px 20px;text-align:center;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}.empty-state h3{font-size:18px;font-weight:500;margin:0 0 10px}.empty-state p{font-size:13px;color:var(--muted)}.pagination{display:flex;align-items:center;justify-content:center;gap:22px;margin-top:32px}.pagination span{font-size:13px;color:var(--muted)}.toast{position:fixed;bottom:max(25px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);padding:11px 20px;background:var(--ink);color:var(--paper);font-size:13px;border-radius:5px;max-width:calc(100% - 40px);width:max-content;z-index:20;text-align:center}.admin-notice{margin-bottom:20px}
.capture-secondary-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}.capture-secondary-actions .album-button{margin-top:0;padding:12px 10px;gap:8px}.capture-help{margin-top:12px;font-size:12px;line-height:1.8;color:var(--muted)}.video-thumb{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:3px;font-size:10px;color:var(--muted)}.video-thumb svg{width:23px;height:23px}.photo-card .video-preview{display:block;max-width:100%;object-fit:contain}.preview-fallback{text-align:center;padding:12px}video:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
@keyframes arrive{from{opacity:.7;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:900px){.guest-shell{padding-top:15px}.guest-intro{padding-top:52px}.guest-intro h1{font-size:70px}.capture-actions{margin-top:3px}.guest-footer{padding-top:48px;padding-bottom:38px}}
@media(max-width:720px){.admin-shell{width:calc(100% - 40px)}.admin-header{margin-bottom:25px}.admin-header h1{font-size:23px}.admin-overview{align-items:flex-start;flex-direction:column;gap:12px}.admin-stats{gap:16px;font-size:12px}.invite-panel{grid-template-columns:105px 1fr;gap:18px;padding:20px 16px}.qr-image{width:105px;height:105px}.invite-actions{gap:8px}.invite-actions .secondary-button{padding:8px 10px;font-size:12px}.photo-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 14px}.photos-toolbar{align-items:flex-start}.toolbar-actions{gap:12px}.toolbar-actions a{font-size:12px}.guest-link{font-size:11px}.invite-description p{font-size:12px}.invite-description h2{font-size:15px}.login-form{margin-top:55px}.event-state{font-size:11px}}
@media(max-width:360px){.guest-shell{width:calc(100% - 36px)}.header-note{font-size:10px;letter-spacing:0}.guest-intro{padding-top:32px}.guest-intro h1{font-size:50px}.intro-copy{font-size:14px}.capture-button{padding:18px;gap:14px}.invite-panel{grid-template-columns:1fr}.qr-image{width:150px;height:150px}.admin-stats{flex-wrap:wrap;gap:6px 16px}.photos-toolbar{flex-wrap:wrap}.admin-shell{width:calc(100% - 32px)}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* A photograph-led invitation: the content sits directly on the portrait.
   The full-page scrim protects text without adding a content card. */
.guest-page {
  --ink: #fff7e7;
  --muted: #eee1c8;
  --line: rgba(255, 242, 218, .36);
  --success: #d4edcd;
  --error: #ffdbca;
  --accent: #fff0d2;
  --accent-hover: #fff7e7;
  position: relative;
  isolation: isolate;
  color: var(--ink);
  background: #181612;
  scrollbar-color: #99836a #181612;
}
.guest-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(180deg, rgba(24, 22, 18, .4), rgba(24, 22, 18, .04) 28%, rgba(24, 22, 18, .16) 42%, rgba(24, 22, 18, .86) 69%, rgba(24, 22, 18, .96)),
    url('/wedding-background.jpg');
  background-size: cover, 100% auto;
  background-position: center, center top;
  background-repeat: no-repeat;
}
.guest-page::selection { background: #fff0d2; color: #302c27; }
.guest-page .guest-shell {
  width: min(100% - 48px, 480px);
  min-height: 100svh;
  padding-top: env(safe-area-inset-top);
}
.guest-page .site-header {
  display: block;
  padding: 24px 0 18px;
  border: 0;
  text-align: center;
  color: var(--ink);
}
.guest-page .event-name {
  font-size: clamp(18px, 4.9vw, 22px);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: .02em;
  text-wrap: balance;
  text-shadow: 0 2px 10px rgba(24, 22, 18, .45);
}
.guest-page #main-content {
  margin-top: max(250px, calc(100svh - 516px));
  padding: 0;
  border: 0;
  background: transparent;
}
.guest-page .guest-intro { padding: 0 0 25px; text-align: center; }
.guest-page .guest-intro h1 {
  font-family: var(--kai);
  font-size: clamp(36px, 10.8vw, 46px);
  line-height: 1.25;
  font-weight: 400;
  letter-spacing: .03em;
  text-shadow: 0 2px 12px rgba(24, 22, 18, .4);
}
.guest-page .guest-intro h1 br { display: none; }
.gallery-settings { margin: 0 0 28px; padding: 22px 0; border-block: 1px solid var(--line); }
.gallery-settings fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.gallery-settings legend { padding: 0; font-size: 21px; font-weight: 400; }
.gallery-settings #gallery-settings-help { margin-top: 7px; font-size: 15px; color: var(--muted); }
.gallery-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin-top: 18px; }
.gallery-option { display: flex; gap: 10px; align-items: flex-start; min-height: 44px; padding: 8px 0; cursor: pointer; }
.gallery-option input { accent-color: var(--accent); width: 18px; height: 18px; flex: 0 0 18px; margin: 4px 0 0; }
.gallery-option strong { display: block; font-size: 18px; font-weight: 400; }
.gallery-option span span { display: block; margin-top: 3px; font-size: 15px; line-height: 1.7; color: var(--muted); }
.gallery-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; margin-top: 18px; }
.gallery-settings-actions p { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.gallery-settings-actions button { flex-shrink: 0; font-size: 16px; }
/* Running script needs a little more room for operational text. */
.admin-header h1, .admin-overview h2, .login-form h2 { font-weight: 400; }
.admin-shell .plain-button, .admin-shell .primary-button, .admin-shell .secondary-button,
.admin-shell .field-label, .admin-shell .form-error, .admin-shell .event-state,
.admin-shell .overview-caption, .admin-shell .admin-stats, .admin-shell .invite-description p,
.admin-shell .photo-card .photo-name, .admin-shell .photo-card .photo-meta,
.admin-shell .download-link, .admin-shell .pagination span, .admin-shell .toolbar-actions a,
.admin-shell .login-form > p, .admin-shell .empty-state p, .admin-shell .guest-link { font-size: 16px; }
.admin-shell .gallery-option span span, .admin-shell #gallery-settings-help,
.admin-shell .gallery-settings-actions p { font-size: 17px; }
.admin-shell .primary-button, .admin-shell .secondary-button, .admin-stats strong { font-weight: 400; }
.admin-shell .invite-description h2 { font-size: 20px; font-weight: 400; }
.admin-shell .photo-card .photo-meta { line-height: 1.7; }
@media (max-width: 600px) {
  .gallery-options { grid-template-columns: 1fr; gap: 4px; }
  .gallery-settings-actions { align-items: flex-start; flex-direction: column; }
}
.guest-page .intro-copy { margin-top: 15px; font-size: 16px; line-height: 1.85; color: var(--muted); }
.guest-page .notice { line-height: 1.8; color: var(--ink); background: rgba(24, 22, 18, .46); border-radius: 3px; }
.guest-page .notice.error { color: var(--error); border-color: rgba(255, 219, 202, .6); }
.guest-page .capture-actions { margin: 0; padding: 0; }
.guest-page .capture-button {
  min-height: 62px;
  justify-content: center;
  padding: 15px 20px;
  gap: 12px;
  color: #3a3024;
  background: #f3e4c8;
  border: 1px solid #f3e4c8;
  border-radius: 3px;
}
.guest-page .capture-button:hover { background: #fff0d2; border-color: #fff0d2; }
.guest-page .capture-button > svg:first-child { width: 26px; height: 26px; }
.guest-page .capture-button strong { font-size: 21px; font-weight: 400; letter-spacing: .08em; }
.guest-page .capture-button .button-arrow { display: none; }
.guest-page .capture-secondary-actions { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.guest-page .capture-secondary-actions .album-button {
  min-height: 54px;
  margin: 0;
  padding: 12px 6px;
  gap: 8px;
  font-size: 17px;
  border-color: rgba(255, 242, 218, .65);
  border-radius: 3px;
  color: var(--ink);
  background: transparent;
}
.guest-page .album-button:hover { background: rgba(255, 242, 218, .12); }
.guest-page button:disabled { opacity: .5; cursor: default; }
.guest-page .privacy-note { margin-top: 17px; font-size: 13px; color: var(--muted); letter-spacing: 0; }
.guest-page .upload-guide { margin-top: 7px; color: var(--muted); font-size: 13px; text-align: center; }
.guest-page .upload-guide summary { display: list-item; width: max-content; margin-inline: auto; cursor: pointer; padding: 11px 10px; min-height: 44px; text-underline-offset: 4px; }
.guest-page .upload-guide summary:hover { color: var(--ink); }
.guest-page .capture-help { text-align: left; margin-top: 8px; padding: 12px 0; font-size: 14px; line-height: 1.9; border-top: 1px solid var(--line); color: var(--muted); }
.guest-page .capture-fallback { text-align: left; padding-bottom: 12px; font-size: 14px; line-height: 1.9; }
.guest-page .capture-fallback-actions { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 4px; }
.guest-page .capture-fallback-actions button { min-height: 44px; padding: 8px 0; color: var(--ink); background: transparent; text-decoration: underline; text-underline-offset: 5px; font-size: 16px; }
.guest-page .capture-fallback-actions button:hover { color: #fff; }
.guest-page .guest-footer { justify-content: center; margin-top: auto; padding: 24px 0 max(22px, env(safe-area-inset-bottom)); font-size: 14px; color: var(--muted); }
.guest-page .upload-section { margin-top: 28px; padding: 22px 0 0; }
.guest-page .section-heading h2 { font-size: 22px; font-weight: 400; }
.guest-page .section-heading > span { color: var(--muted); font-size: 14px; }
.guest-page .upload-item { gap: 12px; }
.guest-page .file-name { font-size: 16px; }
.guest-page .file-status, .guest-page .upload-hint { font-size: 14px; }
.guest-page .success-note { font-size: 16px; }
.guest-page .photo-thumb { background: rgba(255, 242, 218, .15); }
.guest-page .video-thumb, .guest-page .photo-fallback { color: var(--ink); }
.guest-page .item-retry { font-size: 16px; padding-inline: 12px; color: var(--ink); }
.guest-page .upload-item progress, .guest-page progress::-webkit-progress-bar { background: rgba(255, 242, 218, .25); }
.guest-page progress::-webkit-progress-value { background: #f3e4c8; }
.guest-page progress::-moz-progress-bar { background: #f3e4c8; }
.guest-page button:focus-visible, .guest-page a:focus-visible, .guest-page summary:focus-visible {
  outline: 2px solid #fff7e7;
  outline-offset: 5px;
}
@media (min-width: 900px) {
  .guest-page::before {
    background-image: linear-gradient(90deg, rgba(24, 22, 18, .04) 25%, rgba(24, 22, 18, .2) 43%, rgba(24, 22, 18, .92) 70%), url('/wedding-background.jpg');
    background-size: cover, auto 150%;
    background-position: center, left 30%;
  }
  .guest-page .guest-shell { width: calc(100% - 112px); max-width: 1240px; }
  .guest-page .site-header { text-align: left; padding-top: 30px; }
  .guest-page .event-name { font-size: 24px; }
  .guest-page #main-content { width: 400px; align-self: flex-end; margin-top: clamp(70px, 13svh, 150px); margin-right: 24px; }
  .guest-page .guest-intro { text-align: left; padding-bottom: 30px; }
  .guest-page .guest-intro h1 { font-size: 54px; letter-spacing: .02em; }
  .guest-page .intro-copy { font-size: 18px; margin-top: 22px; }
  .guest-page .guest-footer { align-self: flex-end; width: 400px; margin-right: 24px; padding-top: 38px; padding-bottom: 30px; }
}
@media (max-width: 360px) {
  .guest-page .guest-shell { width: calc(100% - 36px); }
  .guest-page .site-header { padding-top: 20px; }
  .guest-page .event-name { font-size: 17px; letter-spacing: 0; }
  .guest-page #main-content { margin-top: max(232px, calc(100svh - 516px)); }
  .guest-page .guest-intro { padding-bottom: 22px; }
  .guest-page .intro-copy { font-size: 15px; }
  .guest-page .capture-secondary-actions { gap: 10px; }
  .guest-page .capture-secondary-actions .album-button { font-size: 16px; gap: 6px; }
  .guest-page .privacy-note { font-size: 12px; }
}
