:root {
  color-scheme: light;
  --canvas: #f8f8f2;
  --surface: #ffffff;
  --surface-soft: #f0f3eb;
  --ink: #203b30;
  --muted: #69766d;
  --line: #dce2d8;
  --green: #245e4a;
  --green-hover: #174b39;
  --green-soft: #e6eee3;
  --orange: #b65428;
  --orange-soft: #fff0df;
  --danger: #a63c30;
  --danger-soft: #fff2ef;
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 28px #243b3010;
  --ease-state: cubic-bezier(.2, .8, .2, 1);
  --ease-enter: cubic-bezier(.16, 1, .3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--canvas);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
body:has(dialog[open]) { overflow: hidden; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, a, input, label { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--green); text-underline-offset: 4px; }
a:hover { color: var(--green-hover); }
button:disabled { cursor: wait; opacity: .55; }
:focus-visible { outline: 3px solid #c46630; outline-offset: 4px; }
main:focus { outline: none; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 20px; line-height: 1.4; letter-spacing: -.4px; }
h3 { font-size: 18px; line-height: 1.5; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, "Cascadia Code", "SFMono-Regular", monospace; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; border: 0; }
.page-shell, .header-inner { width: min(1200px, calc(100% - 80px)); margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 10; padding: 8px 16px; background: white; border-radius: var(--radius-sm); transform: translateY(-200%); }
.skip-link:focus { transform: translateY(0); }
.site-header { background: #ffffffb8; border-bottom: 1px solid var(--line); }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-size: 24px; font-weight: 800; line-height: 1.1; letter-spacing: -.8px; }
.brand-light { font-weight: 450; }
.brand-caption { display: block; font-size: 10px; letter-spacing: 1.5px; font-weight: 500; margin-top: 7px; color: var(--muted); }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px 14px 14px 4px; background: var(--green); color: #fff9de; font-size: 22px; letter-spacing: -1px; }
.brand-mark span { transform: translateY(-2px); }
.header-actions, .session-area { display: flex; align-items: center; gap: 20px; min-width: 0; }
.session-area { gap: 12px; font-size: 13px; flex-wrap: wrap; justify-content: flex-end; }
.account-name { max-width: 200px; overflow-wrap: anywhere; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 10px 20px; min-height: 44px; font-weight: 600; font-size: 14px; text-decoration: none; line-height: 1.5; transition: background-color 120ms var(--ease-state), border-color 120ms var(--ease-state), transform 120ms var(--ease-state); }
.primary { background: var(--green); color: white; }
.primary:hover { background: var(--green-hover); color: white; }
.secondary { background: var(--surface); color: var(--green); border-color: var(--line); }
.secondary:hover { background: var(--green-soft); border-color: #bccbbc; }
.button:active { transform: translateY(1px); }
.quiet-button { border: 0; padding: 6px; background: transparent; color: var(--muted); min-height: 36px; font-size: 13px; }
.quiet-button:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.text-link { text-decoration: none; white-space: nowrap; font-weight: 600; }
.share-button { flex-shrink: 0; }
.share-button > [aria-hidden] { font-size: 20px; line-height: 1; font-weight: 400; }
.intro { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: 60px 0 44px; }
.intro > div:first-child { min-width: 0; flex: 1; }
.eyebrow { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); letter-spacing: 1px; margin-bottom: 12px; }
.tiny-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
h1 { font-size: clamp(30px, 3.5vw, 44px); font-weight: 700; line-height: 1.35; letter-spacing: -1.5px; }
.accent-word { color: var(--green); }
.accent-word > span { color: var(--orange); }
.intro-copy { color: var(--muted); margin-top: 12px; font-size: 14px; }
.intro-note { display: flex; align-items: center; gap: 16px; padding: 16px 24px; border-left: 1px solid var(--line); color: var(--muted); font-size: 12px; flex: 0 1 240px; }
.intro-note strong { color: var(--ink); font-weight: 500; }
.note-icon { color: var(--orange); font-size: 46px; line-height: 1; }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 0; border-block: 1px solid var(--line); }
.tabs { display: flex; gap: 8px; }
.tab { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); border: 0; border-radius: var(--radius-sm); background: transparent; padding: 10px 18px; font-size: 14px; min-height: 44px; font-weight: 500; white-space: nowrap; transition: background-color 120ms var(--ease-state), color 120ms var(--ease-state); }
.tab:hover { background: var(--surface-soft); }
.tab[aria-selected="true"] { background: var(--green-soft); color: var(--green); font-weight: 650; }
.tab-dot { width: 5px; height: 5px; background: currentColor; border-radius: 50%; opacity: .55; }
.search-form { position: relative; display: flex; align-items: center; width: 352px; max-width: 100%; }
.search-form input { width: 100%; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 64px 10px 40px; height: 44px; font-size: 13px; color: var(--ink); }
input::placeholder { color: #7a857e; opacity: 1; }
input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
.search-icon { width: 18px; height: 18px; position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search-submit { position: absolute; right: 4px; top: 4px; min-height: 36px; border: 0; border-radius: 5px; background: var(--surface-soft); color: var(--green); font-size: 12px; padding: 6px 12px; }
.search-submit:hover { background: var(--green-soft); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 0 20px; }
.section-heading h2 { font-size: 16px; }
.section-heading p { margin-top: 4px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.meme-card { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-align: left; min-width: 0; color: var(--ink); box-shadow: 0 2px 4px #203b3003; transition: border-color 120ms var(--ease-state), box-shadow 160ms var(--ease-state), transform 160ms var(--ease-state); animation: enter-card 420ms var(--ease-enter) both; }
.meme-card:hover { transform: translateY(-3px); border-color: #a6bba9; box-shadow: var(--shadow); }
.meme-card:active { transform: translateY(-1px); }
.meme-card:nth-child(4n + 2), .submission:nth-child(4n + 2) { animation-delay: 35ms; }
.meme-card:nth-child(4n + 3), .submission:nth-child(4n + 3) { animation-delay: 70ms; }
.meme-card:nth-child(4n + 4), .submission:nth-child(4n + 4) { animation-delay: 105ms; }
.card-image { width: 100%; aspect-ratio: 1; display: grid; place-items: center; background: #f1f2eb; padding: 20px; border-radius: 15px 15px 0 0; }
.card-image img { display: block; width: 100%; height: 100%; max-height: 240px; object-fit: contain; border-radius: 4px; }
.card-image-error { color: var(--muted); font-size: 13px; text-align: center; }
.card-meta { padding: 16px; display: grid; gap: 4px; width: 100%; }
.card-title { font-size: 15px; font-weight: 650; overflow-wrap: anywhere; }
.card-name { color: var(--muted); overflow-wrap: anywhere; font-size: 11px; }
.card-uploader { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--muted); border-top: 1px solid #eff1eb; padding-top: 12px; margin-top: 8px; overflow-wrap: anywhere; }
.card-arrow { color: var(--green); font-size: 16px; }
.state-box { display: flex; align-items: center; flex-direction: column; text-align: center; background: #ffffff85; border: 1px dashed #ced8c9; border-radius: var(--radius); padding: 48px 24px; gap: 8px; min-height: 280px; justify-content: center; }
.state-box p { color: var(--muted); font-size: 14px; max-width: 40ch; overflow-wrap: anywhere; }
.state-box h3 { font-size: 17px; }
.state-box .button { margin-top: 16px; }
.status-symbol { display: grid; place-items: center; font-size: 28px; width: 56px; height: 56px; border-radius: 18px; background: var(--green-soft); color: var(--green); margin-bottom: 8px; }
.state-box.is-error .status-symbol { background: var(--orange-soft); color: var(--orange); }
.load-more-wrap { display: flex; justify-content: center; margin-top: 32px; min-height: 44px; }
.notice { padding: 14px 16px; border: 1px solid #c6d8c4; background: var(--green-soft); color: var(--green); border-radius: var(--radius-sm); font-size: 14px; overflow-wrap: anywhere; margin-bottom: 16px; }
.notice p { margin-top: 6px; }
.notice.error { color: var(--danger); background: var(--danger-soft); border-color: #ecc9c1; }
.notice.warning { color: #8d4b20; background: var(--orange-soft); border-color: #ead4b8; }
.submission-list { display: grid; gap: 12px; }
.submission { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 16px 32px; padding: 24px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); animation: enter-card 420ms var(--ease-enter) both; }
.submission h3 { font-size: 16px; overflow-wrap: anywhere; }
.submission .mono, .submission-details { overflow-wrap: anywhere; }
.submission-details { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.submission-end { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.submission-end a { font-size: 12px; }
.submission .notice { grid-column: 1 / -1; margin-bottom: 0; font-size: 13px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--green-soft); color: var(--green); border-radius: 6px; font-size: 11px; font-weight: 600; max-width: 240px; overflow-wrap: anywhere; }
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.badge.pending { color: #8c591d; background: #fff1da; }
.badge.failed { color: var(--danger); background: var(--danger-soft); }
.badge.unknown { background: var(--surface-soft); color: var(--muted); }
.site-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; border-top: 1px solid var(--line); margin-top: 56px; padding-block: 24px 32px; color: var(--muted); font-size: 12px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--green); text-decoration: underline; }
.footer-face { font-size: 17px; margin-right: 8px; vertical-align: -1px; }
dialog { color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; max-width: calc(100% - 32px); max-height: calc(100dvh - 48px); background: var(--canvas); box-shadow: 0 28px 100px #10291e33; }
dialog[open] { animation: enter-dialog 260ms var(--ease-enter) both; }
dialog::backdrop { background: #122b2369; backdrop-filter: blur(4px); }
.upload-dialog { width: 640px; }
.image-dialog { width: 720px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.dialog-heading .eyebrow { font-size: 11px; margin-bottom: 4px; }
.dialog-heading h2 { overflow-wrap: anywhere; }
.icon-button { display: grid; place-items: center; flex-shrink: 0; width: 36px; height: 36px; color: var(--muted); border: 1px solid var(--line); background: var(--surface); border-radius: 50%; font-size: 25px; line-height: 1; }
.icon-button:hover { background: var(--green-soft); color: var(--green); }
.compact { border: none; background: transparent; padding: 32px 16px; min-height: 280px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset:disabled { opacity: .65; }
.drop-zone { position: relative; display: grid; place-items: center; min-height: 208px; border: 1.5px dashed #b4c6b2; border-radius: var(--radius); background: var(--green-soft); padding: 20px; cursor: pointer; transition: background-color 120ms var(--ease-state), border-color 120ms var(--ease-state); }
.drop-zone:hover, .drop-zone.dragging { background: #dae7d5; border-color: var(--green); }
.drop-zone:focus-within { outline: 3px solid #c46630; outline-offset: 4px; }
.drop-zone strong { display: block; font-size: 14px; margin-top: 8px; font-weight: 550; }
#drop-placeholder { text-align: center; }
#file-help { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.upload-symbol { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 1px solid #b6c8b3; border-radius: 12px; color: var(--green); font-size: 25px; }
.file-preview { max-width: 100%; height: 180px; object-fit: contain; border-radius: var(--radius-sm); }
.replace-file { font-size: 11px; color: var(--green); padding-top: 8px; }
.file-summary { margin-top: 8px; overflow-wrap: anywhere; min-height: 21px; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field > label { font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field-required { font-size: 10px; color: var(--muted); font-weight: 400; }
.field input { width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #cbd5c7; border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font-size: 14px; }
.field-help { font-size: 11px; color: var(--muted); }
#contribution-email { margin-top: 20px; overflow-wrap: anywhere; }
.consent { display: flex; align-items: flex-start; gap: 10px; font-size: 12px; color: var(--muted); margin-block: 24px; cursor: pointer; }
.consent input { accent-color: var(--green); width: 17px; height: 17px; margin: 2px 0 0; flex-shrink: 0; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid var(--line); }
.image-stage { display: grid; place-items: center; min-height: 180px; padding: 24px; border-radius: var(--radius); background: var(--surface-soft); }
.image-stage img { max-width: 100%; max-height: 55dvh; object-fit: contain; }
.image-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; }
.image-meta > div { min-width: 0; overflow-wrap: anywhere; }
.image-meta .button { flex-shrink: 0; }
.source-page { max-width: 760px; padding-block: 64px; min-height: 65dvh; }
.source-page h1 { font-size: 32px; margin-bottom: 28px; }
.source-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.source-card > p + p { margin-top: 16px; }
.source-address { overflow-wrap: anywhere; }
.source-address { margin-top: 16px; }
.back-link { display: inline-block; margin-bottom: 32px; font-size: 14px; }
@keyframes enter-card { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes enter-dialog { from { opacity: 0; transform: translateY(12px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 1000px) {
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .intro-note { padding-inline: 20px 0; }
}
@media (max-width: 760px) {
  .page-shell, .header-inner { width: calc(100% - 40px); }
  .header-inner { min-height: 80px; gap: 16px; flex-wrap: wrap; padding-block: 16px; }
  .brand { font-size: 21px; gap: 10px; }
  .brand-mark { width: 40px; height: 40px; font-size: 20px; }
  .header-actions { gap: 12px; }
  .session-area { gap: 8px; }
  .account-name { max-width: 120px; font-size: 11px; }
  .intro { padding: 40px 0 32px; }
  .intro-note { display: none; }
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .workspace-bar { gap: 16px; flex-wrap: wrap; }
  .search-form { width: 100%; }
  .tabs { gap: 4px; }
  .tab { padding: 10px 16px; }
  .submission { padding: 20px; gap: 12px 16px; }
  dialog { padding: 24px; }
}
@media (max-width: 480px) {
  .page-shell, .header-inner { width: calc(100% - 32px); }
  .header-inner { align-items: flex-start; }
  .header-actions { flex-wrap: wrap-reverse; justify-content: flex-end; max-width: 54%; gap: 8px; }
  .session-area { font-size: 11px; }
  .session-area .small { font-size: 10px; }
  .share-button { padding: 8px 12px; min-height: 40px; font-size: 12px; }
  .brand-caption { font-size: 9px; letter-spacing: 2px; }
  .intro { padding-block: 32px; }
  h1 { font-size: 29px; letter-spacing: -1px; }
  .intro-copy { font-size: 12px; }
  .eyebrow { font-size: 10px; }
  .card-image { padding: 12px; }
  .card-meta { padding: 12px; }
  .card-title { font-size: 13px; }
  .card-name, .card-uploader { font-size: 10px; }
  .card-uploader { align-items: flex-start; }
  .gallery-grid { gap: 12px; }
  .site-footer { margin-top: 32px; font-size: 11px; }
  dialog { padding: 20px; border-radius: 20px; max-height: calc(100dvh - 24px); }
  .dialog-heading { gap: 12px; }
  .form-row { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .submission { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .submission-end { flex-direction: row; justify-content: space-between; align-items: center; }
  .image-meta { flex-wrap: wrap; }
  .form-footer > .small { font-size: 11px; }
  .state-box { padding: 32px 20px; }
  .source-card { padding: 24px; }
}
@media (max-width: 340px) {
  .brand { font-size: 18px; gap: 8px; }
  .brand-mark { width: 32px; height: 36px; font-size: 17px; }
  .gallery-grid { grid-template-columns: minmax(0, 1fr); }
  h1 { font-size: 25px; }
  .form-footer { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
