:root {
  --ink: #0b0b0c;
  --bg: #f4f4f2;
  --card: #fff;
  --line: #e6e6e2;
  --muted: #8a8a85;
  --accent: #e87d0d;
  --discord: #5865f2;
  --green: #2e9e5b;
  --red: #b4442a;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.logo { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; background: #0b0b0c; color: #fff; border-radius: 11px; font-weight: 700; font-size: 10px; letter-spacing: .02em; }
.av-img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #ddd; }
.av-fallback { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #0b0b0c; color: #fff; font-size: 12px; font-weight: 600; }

/* --- Header --- */
header { position: sticky; top: 0; z-index: 20; background: rgba(244,244,242,.82); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.bar { max-width: 1180px; margin: 0 auto; padding: 13px 28px; display: flex; align-items: center; gap: 14px; }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 14px; }
.who-name { font-weight: 550; }
.navlink { font-size: 13.5px; color: var(--muted); padding: 6px 10px; border-radius: 8px; }
.navlink:hover, .navlink.on { color: var(--ink); background: #eaeae6; }
.logout { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; }
.logout:hover { border-color: #c9c9c3; }

/* --- Hero --- */
.hero { max-width: 1180px; margin: 0 auto; padding: 48px 28px 6px; text-align: center; }
.hero h1 { font-size: 34px; font-weight: 680; letter-spacing: -.03em; }
.hero p { color: var(--muted); margin: 12px auto 0; max-width: 48ch; line-height: 1.55; font-size: 15px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }

/* --- Buttons --- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 11px; font-size: 14px; font-weight: 550; cursor: pointer; border: 1px solid transparent; transition: transform .12s, background .14s, border-color .14s; }
.btn:hover { transform: translateY(-1px); }
.btn-dark { background: #0b0b0c; color: #fff; }
.btn-dark:hover { background: var(--accent); }
.btn-outline { background: #fff; border-color: var(--line); color: #3a3a37; }
.btn-outline:hover { border-color: #c9c9c3; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--ink); }
.btn-danger { background: #fbe9e4; color: var(--red); }
.btn-danger:hover { background: #f6dbd3; }
.btn[disabled] { opacity: .5; cursor: default; transform: none; }

/* --- Tabs --- */
.tabs { max-width: 1180px; margin: 30px auto 0; padding: 0 28px; display: flex; gap: 8px; align-items: center; }
.tab { font-size: 13.5px; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; color: #4a4a47; }
.tab:hover { border-color: #c9c9c3; }
.tab.on { background: #0b0b0c; color: #fff; border-color: #0b0b0c; }

/* --- Grid + tiles --- */
main { max-width: 1180px; margin: 0 auto; padding: 26px 28px 90px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; cursor: pointer; transition: transform .14s, box-shadow .14s, border-color .14s; }
.tile:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.07); border-color: #d8d8d2; }
.tile-top { display: flex; align-items: center; gap: 10px; }
.tile-cat { font-size: 11px; color: #5a5a56; background: #f0f0ec; padding: 4px 9px; border-radius: 6px; white-space: nowrap; }
.tile-badges { margin-left: auto; display: flex; gap: 6px; }
.badge { font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.badge-free { background: #e5f4ea; color: var(--green); }
.badge-private { background: #efefec; color: var(--muted); }
.badge-wip { background: #fdf1e3; color: var(--accent); }
.tile h3 { font-size: 16.5px; font-weight: 630; letter-spacing: -.01em; margin: 13px 0 0; }
.tile-desc { color: #575753; font-size: 13px; line-height: 1.5; margin: 7px 0 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-maker { display: flex; align-items: center; gap: 8px; margin-top: 15px; font-size: 12.5px; color: var(--muted); }
.tile-maker .av-img, .tile-maker .av-fallback { width: 24px; height: 24px; }
.tile-foot { display: flex; align-items: center; gap: 8px; margin-top: 15px; }
.dl-btn { flex: 1; justify-content: center; }
.tile-dls { font-size: 11.5px; color: var(--muted); }

/* Drag-to-Blender chip (dashed) */
.drag-chip {
  display: flex; align-items: center; gap: 10px;
  margin-top: 9px; padding: 10px 13px;
  border: 2px dashed #cfcfc9; border-radius: 11px;
  background: #fafaf8; color: #55524d;
  cursor: grab; user-select: none; font-size: 12px; line-height: 1.25;
  transition: border-color .14s, background .14s, transform .1s;
}
.drag-chip:hover { border-color: var(--accent); background: #fdf6ee; }
.drag-chip:active { cursor: grabbing; transform: scale(.99); }
.drag-chip strong { color: var(--ink); font-size: 12.5px; letter-spacing: .04em; }
.drag-chip .drag-sub { color: var(--muted); }
.drag-chip .drag-grip { font-size: 15px; color: #b8b8b2; flex: 0 0 auto; }
.drag-chip.is-disabled { opacity: .45; cursor: default; }
.drag-chip.is-disabled:hover { border-color: #cfcfc9; background: #fafaf8; }
.drag-chip-lg { margin-top: 0; flex: 1; padding: 11px 15px; }

.empty { text-align: center; color: var(--muted); padding: 70px 0; }
.count { font-size: 13px; color: var(--muted); margin: 4px 0 16px; }

/* --- Pill switch --- */
.pill { display: flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; }
.pill input { display: none; }
.pill .track { width: 42px; height: 24px; border-radius: 999px; background: #d6d6d1; position: relative; transition: background .16s; flex: 0 0 auto; }
.pill .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .16s; }
.pill input:checked + .track { background: var(--green); }
.pill input:checked + .track::after { transform: translateX(18px); }
.pill .pill-label { font-size: 13.5px; }
.pill .pill-sub { font-size: 12px; color: var(--muted); }

/* --- Modal --- */
.backdrop { position: fixed; inset: 0; background: rgba(11,11,12,.5); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 40px 20px; overflow-y: auto; }
.modal { background: var(--card); border-radius: 20px; max-width: 640px; width: 100%; box-shadow: 0 30px 80px rgba(0,0,0,.25); position: relative; animation: pop .16s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.modal-x { position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 9px; border: none; background: #f0f0ec; color: #555; font-size: 18px; cursor: pointer; z-index: 2; }
.modal-x:hover { background: #e4e4df; }
.modal-body { padding: 26px 28px 28px; }
.shot { width: 100%; border-radius: 14px; border: 1px solid var(--line); margin-bottom: 20px; display: block; background: #f0f0ec; }
.shot-empty { width: 100%; aspect-ratio: 16/9; border-radius: 14px; border: 1px dashed var(--line); margin-bottom: 20px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; background: #fafaf8; }
.modal h2 { font-size: 23px; font-weight: 660; letter-spacing: -.02em; }
.modal-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--muted); }
.modal-desc { margin-top: 16px; line-height: 1.6; font-size: 14.5px; color: #33332f; white-space: pre-wrap; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.owner-actions { display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* --- Feedback --- */
.fb { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 18px; }
.fb-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.fb-tab { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: #555; }
.fb-tab.on { background: #0b0b0c; color: #fff; border-color: #0b0b0c; }
.fb-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.fb-form textarea { width: 100%; min-height: 62px; resize: vertical; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; font: inherit; font-size: 14px; outline: none; }
.fb-form textarea:focus { border-color: #bdbdb7; }
.fb-list { display: flex; flex-direction: column; gap: 12px; }
.fb-item { display: flex; gap: 10px; }
.fb-item .av-img, .fb-item .av-fallback { width: 30px; height: 30px; flex: 0 0 auto; }
.fb-item .fb-main { flex: 1; }
.fb-item .fb-who { font-size: 13px; font-weight: 550; }
.fb-item .fb-time { font-size: 11.5px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.fb-item .fb-body { font-size: 13.5px; line-height: 1.5; color: #3a3a37; margin-top: 2px; white-space: pre-wrap; }
.fb-empty { font-size: 13px; color: var(--muted); padding: 8px 0; }

/* --- Upload / edit form --- */
.form-row { margin-top: 16px; }
.form-row label.lbl { display: block; font-size: 13px; font-weight: 550; margin-bottom: 6px; }
.form-row input[type=text], .form-row select, .form-row textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 11px; font: inherit; font-size: 14px; outline: none; background: #fff; }
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: #bdbdb7; }
.dropzone { border: 2px dashed var(--line); border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); font-size: 14px; cursor: pointer; transition: border-color .14s, background .14s; }
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: #fdf6ee; color: #55524d; }
.dropzone strong { color: var(--ink); }
.dropzone.has-file { border-style: solid; border-color: var(--green); background: #f2faf5; color: #2c6a45; }
.pill-group { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; padding: 15px; background: #faf9f7; border: 1px solid var(--line); border-radius: 13px; }
.progress { height: 8px; border-radius: 999px; background: #eaeae6; overflow: hidden; margin-top: 14px; display: none; }
.progress.on { display: block; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s; }
.form-err { color: var(--red); font-size: 13px; margin-top: 12px; background: #fbe9e4; border-radius: 9px; padding: 9px 12px; display: none; }
.form-err.on { display: block; }

/* --- Dashboard --- */
.dash-tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 22px 0 16px; }
.dash-tools input, .dash-tools select { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-size: 13.5px; background: #fff; outline: none; }
.dash-stat { margin-left: auto; font-size: 13px; color: var(--muted); }
table.dash { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; font-size: 13.5px; }
table.dash th, table.dash td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
table.dash th { font-size: 12px; color: var(--muted); font-weight: 600; cursor: pointer; user-select: none; background: #faf9f7; }
table.dash tr:last-child td { border-bottom: none; }
table.dash .maker-cell { display: flex; align-items: center; gap: 8px; }
table.dash .maker-cell .av-img, table.dash .maker-cell .av-fallback { width: 24px; height: 24px; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 6px; background: #f0f0ec; color: #5a5a56; }
