@font-face { font-family: "Kanit"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/kanit-thai-500-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B,U+200B-200D,U+25CC; }
@font-face { font-family: "Kanit"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/kanit-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Kanit"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/kanit-thai-700-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B,U+200B-200D,U+25CC; }
@font-face { font-family: "Kanit"; font-style: normal; font-weight: 700; font-display: swap; src: url("/static/fonts/kanit-latin-700-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Noto Sans Thai"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/noto-sans-thai-thai-400-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B,U+200B-200D,U+25CC; }
@font-face { font-family: "Noto Sans Thai"; font-style: normal; font-weight: 400; font-display: swap; src: url("/static/fonts/noto-sans-thai-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Noto Sans Thai"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/noto-sans-thai-thai-500-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B,U+200B-200D,U+25CC; }
@font-face { font-family: "Noto Sans Thai"; font-style: normal; font-weight: 500; font-display: swap; src: url("/static/fonts/noto-sans-thai-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Noto Sans Thai"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/noto-sans-thai-thai-600-normal.woff2") format("woff2"); unicode-range: U+0E01-0E5B,U+200B-200D,U+25CC; }
@font-face { font-family: "Noto Sans Thai"; font-style: normal; font-weight: 600; font-display: swap; src: url("/static/fonts/noto-sans-thai-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  --accent: #ffd23f;
  --ink: #1b1a17;
  --muted: #4a463e;
  --bg: #fbf7f0;
  --card: #fff;
  --danger: #b3261e;
  --shadow: 4px 4px 0 var(--ink);
  --display: "Kanit", "Noto Sans Thai", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* header */
.site-header { border-bottom: 2px solid var(--ink); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 16px; padding-bottom: 16px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 26px; }
.logo-mark { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 2px solid var(--ink); border-radius: 10px; background: var(--accent); box-shadow: 3px 3px 0 var(--ink); }
.site-header nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; font-weight: 500; margin-left: auto; }
.site-header nav a { text-decoration: none; padding: 10px 0; }
.site-header nav a:hover { text-decoration: underline; }
.nav-cta { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; font-family: var(--display); font-weight: 500; background: var(--accent); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); text-decoration: none; }
.nav-cta:hover { text-decoration: none; transform: translate(1px, 1px); box-shadow: 2px 2px 0 var(--ink); }

/* buttons + search */
.search { display: flex; flex-wrap: wrap; gap: 12px; max-width: 760px; }
.search input { flex: 1 1 320px; min-width: 0; height: 56px; padding: 0 20px; font: inherit; font-size: 18px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 14px; box-shadow: var(--shadow); }
.search button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px; font-family: var(--display); font-weight: 500; font-size: 17px; color: #fff; background: var(--ink); border: 2px solid var(--ink); border-radius: 12px; text-decoration: none; cursor: pointer; }
.search button { height: 56px; font-size: 18px; border-radius: 14px; }
.btn:hover, .search button:hover { background: #000; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 15px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn-ghost:hover { background: var(--accent); }
.btn-block { width: 100%; }

.draft { background: #fff3cd; color: #664d03; text-align: center; padding: 8px 16px; border-bottom: 1px solid #ecd68a; }
main { min-height: 60vh; }
.page { padding-top: 32px; padding-bottom: 64px; }
h1 { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.25; margin: 8px 0 12px; }
h2 { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.3; margin: 32px 0 12px; }
h3 { font-family: var(--display); font-weight: 500; }
.meta { color: var(--muted); margin-top: 0; }
.center { text-align: center; padding: 48px 0; }
.prose { max-width: 720px; }
.prose a, p a, .note a, .empty a { text-decoration: underline; text-underline-offset: 3px; }

/* hero */
.hero { padding: 32px 0 24px; }
.hero h1 { max-width: 840px; margin: 0; font-size: clamp(36px, 6vw, 64px); line-height: 1.2; text-wrap: balance; }
.pill { display: inline-block; margin: 0 8px; padding: 0 14px; background: var(--accent); border: 2px solid var(--ink); border-radius: 12px; }
.hero > p { margin: 20px 0 0; max-width: 620px; font-size: 20px; color: var(--muted); text-wrap: pretty; }
.hero .search { margin-top: 32px; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 28px 0 0; }
.chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; font-weight: 500; text-decoration: none; background: #fff; border: 2px solid var(--ink); border-radius: 999px; }
.chips a.on, .chips a:hover { background: var(--accent); }
.meme .chips { margin-top: 12px; }

/* grid + cards */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.section-head h2 { margin: 0; }
.section-head span { font-size: 15px; color: var(--muted); }
.grid { margin-top: 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 24px; }
.card { display: flex; flex-direction: column; overflow: hidden; background: var(--card); border: 2px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); }
.card-img { position: relative; display: block; background: #efe9dc; aspect-ratio: 1 / 1; border-bottom: 2px solid var(--ink); }
.card-img img, .card-img video { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 16px; flex: 1; justify-content: space-between; }
.card-body h3 { margin: 0; font-size: 18px; line-height: 1.4; }
.card-body h3 a { text-decoration: none; }
.card-body h3 a:hover { text-decoration: underline; }
.by { font-size: 14px; color: var(--muted); }
.more { text-align: center; margin: 32px 0 0; }
.empty { color: var(--muted); text-align: center; padding: 32px 0; }

.pager { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 32px 0 0; }
.pager a, .pager .current { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 2px solid var(--ink); border-radius: 12px; text-decoration: none; background: #fff; }
.pager .current { background: var(--accent); font-weight: 600; }

/* meme page */
.meme figure { margin: 0 0 16px; background: #efe9dc; border: 2px solid var(--ink); border-radius: 16px; overflow: hidden; text-align: center; box-shadow: var(--shadow); }
.meme figure img { max-height: 70vh; width: auto; margin: 0 auto; display: block; }
.actions { margin: 20px 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 16px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.note { color: var(--muted); font-size: 14px; }

/* creators band (full width) */
.band { background: var(--accent); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
.band-row { display: flex; flex-wrap: wrap; align-items: center; gap: 48px; padding-top: 72px; padding-bottom: 72px; }
.band-copy { flex: 1 1 420px; min-width: 0; }
.band-copy h2 { margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1.25; text-wrap: balance; }
.band-copy p { margin: 16px 0 0; max-width: 480px; font-size: 18px; text-wrap: pretty; }
.band-copy .btn { margin-top: 28px; min-height: 52px; font-size: 18px; border-radius: 14px; }
.perks { flex: 1 1 360px; min-width: 0; margin: 0; padding: 0; list-style: none; display: grid; gap: 16px; }
.perks li { padding: 20px; background: #fff; border: 2px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); }
.perks strong { display: block; font-family: var(--display); font-weight: 500; font-size: 20px; }
.perks span { display: block; margin-top: 4px; color: var(--muted); }

/* forms */
.form { max-width: 640px; }
.field { margin: 0 0 16px; border: 0; padding: 0; }
.field > label, fieldset legend { display: block; font-weight: 600; margin-bottom: 4px; padding: 0; }
fieldset label { display: block; font-weight: 400; }
.form input[type="text"], .form input[type="email"], .form input[type="url"], .form input[type="password"], .form textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--ink); border-radius: 12px; font: inherit; background: #fff;
}
.err { color: var(--danger); margin: 4px 0 0; font-size: 14px; }
.narrow { max-width: 420px; margin-inline: auto; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0 0 20px; }
.kv dt { font-weight: 600; }
.kv dd { margin: 0; }
.muted { color: #666; font-size: 14px; }

/* list page rhythm */
.page > h1 + .search { margin-top: 20px; }
.search + .meta { margin: 16px 0 0; }
.page > .search + .meta + .grid { margin-top: 20px; }
.results { margin: 8px 0 0; padding-left: 20px; }
.notice p { margin: 0 0 6px; }
.notice .hint { margin-top: 8px; }
.notice { margin: 0 0 16px; }

/* video */
.badge { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 0 10px; font-size: 13px; font-weight: 600; color: #fff; background: var(--ink); border-radius: 999px; }
.meme figure video { display: block; width: 100%; height: auto; max-height: 70vh; background: #000; }

/* upload, my files, admin */
.form-page { max-width: 640px; }
.form select, .form input[type="file"] { width: 100%; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; font: inherit; background: #fff; }
.hint { margin: 4px 0 0; font-size: 14px; color: var(--muted); }
.notice { padding: 12px 16px; background: #fff; border: 2px solid var(--ink); border-left: 8px solid var(--accent); border-radius: 12px; }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #fde8e6; }
.quota { margin: 16px 0 24px; }
.quota p { margin: 0 0 6px; }
.quota progress { width: 100%; max-width: 420px; height: 14px; accent-color: var(--ink); }
.files { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.file { display: flex; gap: 16px; padding: 12px; background: #fff; border: 2px solid var(--ink); border-radius: 16px; box-shadow: var(--shadow); }
.file-img { position: relative; flex: 0 0 120px; width: 120px; height: 120px; overflow: hidden; border: 2px solid var(--ink); border-radius: 12px; background: #efe9dc; }
.file-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blur img { filter: blur(18px); transform: scale(1.1); }
.file-body { flex: 1; min-width: 0; }
.file-body h2 { margin: 0 0 4px; font-size: 20px; overflow-wrap: anywhere; }
.file-body p { margin: 0 0 6px; overflow-wrap: anywhere; }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.file-actions form { margin: 0; }
.status { display: inline-block; padding: 0 10px; border: 2px solid var(--ink); border-radius: 999px; font-size: 14px; font-weight: 600; background: #fff; }
.status-approved { background: #c9f2d5; }
.status-rejected { background: #fde2df; }
.status-pending, .status-needs_review { background: var(--accent); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px; text-decoration: none; background: #fff; font-weight: 500; }
.tabs a.on { background: var(--accent); }

/* footer */
.site-footer { color: var(--muted); font-size: 14px; }
.site-footer .wrap { padding-top: 40px; padding-bottom: 40px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-bottom: 8px; font-size: 15px; font-weight: 500; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--ink); }
.site-footer nav a:hover { text-decoration: underline; }

:focus-visible { outline: 3px solid #0b5cad; outline-offset: 2px; }
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .header-row { gap: 8px; padding-top: 12px; padding-bottom: 12px; }
  .logo { font-size: 22px; }
  .logo-mark { width: 34px; height: 34px; border-radius: 9px; }
  .logo { order: 1; }
  .nav-cta { order: 2; min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 10px; box-shadow: 2px 2px 0 var(--ink); }
  .site-header nav { order: 3; width: 100%; margin-left: 0; flex-wrap: nowrap; justify-content: space-between; gap: 12px; padding: 2px 0 0; white-space: nowrap; }
  .site-header nav a { padding: 6px 0; font-size: 15px; }
  .nav-wide { display: none; }
  .page { padding-top: 20px; padding-bottom: 40px; }
  .hero { padding: 8px 0 16px; }
  .hero h1 { font-size: 34px; }
  .pill { margin: 0 4px; padding: 0 10px; border-radius: 10px; }
  .hero > p { margin-top: 12px; font-size: 16px; }
  .hero .search { margin-top: 20px; }
  .search { flex-wrap: nowrap; gap: 8px; }
  .search input { flex: 1 1 0; height: 48px; padding: 0 14px; font-size: 16px; border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); }
  .search button { height: 48px; padding: 0 16px; font-size: 16px; border-radius: 12px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 18px -16px 0; padding: 2px 16px 8px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips a { min-height: 40px; padding: 0 14px; white-space: nowrap; font-size: 15px; }
  .meme .chips, .hero .chips { flex-wrap: nowrap; }
  h1 { font-size: 26px; }
  h2 { font-size: 24px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
  .card { border-radius: 12px; box-shadow: 3px 3px 0 var(--ink); }
  .card-body { padding: 10px; gap: 6px; }
  .card-body h3 { font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .by { font-size: 12px; }
  .card .btn { min-height: 38px; padding: 0 8px; font-size: 14px; border-radius: 10px; }
  .card .btn svg { width: 16px; height: 16px; }
  .section-head span { display: none; }
  .band-row { padding-top: 40px; padding-bottom: 40px; gap: 24px; }
  .band-copy p { font-size: 16px; }
  .perks li { padding: 14px; }
  .site-footer .wrap { padding-top: 24px; padding-bottom: 24px; }
  .file { gap: 12px; padding: 10px; }
  .file-img { flex-basis: 88px; width: 88px; height: 88px; }
  .file-body h2 { font-size: 17px; }
}
@media (max-width: 360px) {
  .logo { font-size: 19px; gap: 8px; }
  .logo-mark { width: 30px; height: 30px; }
  .nav-cta { padding: 0 10px; font-size: 14px; }
  .site-header nav a { font-size: 14px; }
}

.edit-img { max-width: 240px; max-height: 240px; border-radius: 10px; display: block; }

/* upload drop zone: a transparent native file input covers a styled box, so click and
   drag-and-drop work without JavaScript; :valid on the required input means a file was chosen */
.drop { position: relative; display: flex; align-items: center; justify-content: center; min-height: 220px; padding: 28px 20px; text-align: center; background: #fffdf6; border-radius: 20px; transition: background .15s; border: 3px dashed var(--ink); }
.drop:hover { background-color: #fff3bf; }
.drop:has(.drop-input:focus-visible) { box-shadow: 0 0 0 3px var(--accent), 0 0 0 5px var(--ink); }
.drop-input { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; font-size: 0; }
.drop-empty, .drop-done { display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.drop strong { font-family: var(--display); font-weight: 600; font-size: 22px; line-height: 1.3; }
.drop-sub { color: var(--muted); }
.drop-icon { display: inline-flex; align-items: center; justify-content: center; width: 60px; height: 60px; margin-bottom: 4px; background: var(--accent); border: 2px solid var(--ink); border-radius: 18px; box-shadow: 3px 3px 0 var(--ink); }
.drop-btn { display: inline-flex; align-items: center; min-height: 46px; padding: 0 24px; font-family: var(--display); font-weight: 500; font-size: 17px; color: #fff; background: var(--ink); border-radius: 12px; }
.drop:hover .drop-btn { background: #3a372f; }
.drop-done { display: none; }
.drop:has(.drop-input:valid) { background-color: #e9f7e4; }
.drop:has(.drop-input:valid) .drop-empty { display: none; }
.drop:has(.drop-input:valid) .drop-done { display: flex; }
.drop-icon-ok { background: #7ed67a; }
@media (max-width: 480px) { .drop { min-height: 190px; } .drop strong { font-size: 19px; } }
