:root {
  --bg: #fdf6ec;
  --card: #ffffff;
  --accent: #ff7a59;
  --accent2: #4c9aff;
  --text: #2e2a26;
  --muted: #8a817c;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; background: var(--accent); color: #fff;
}
header h1 { margin: 0; font-size: 1.4rem; }
.yt-status { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
main { max-width: 820px; margin: 24px auto; padding: 0 16px; }
.card {
  background: var(--card); border-radius: 14px; padding: 20px;
  margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.card h2 { margin-top: 0; }
.mode-toggle { display: flex; gap: 20px; margin-bottom: 12px; flex-wrap: wrap; }
textarea, input, select {
  width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 1rem; font-family: inherit;
}
.options {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 14px 0;
}
.options label { font-size: .85rem; color: var(--muted); display: flex; flex-direction: column; gap: 4px; }
.btn {
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 12px 20px; font-size: 1rem; cursor: pointer; font-weight: 600;
}
.btn:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 8px 14px; font-size: .85rem; }
.msg { color: var(--muted); min-height: 1.2em; }
.hint { color: var(--muted); font-size: .85rem; }
.row { display: flex; gap: 10px; margin-top: 10px; }
#progress-bar { height: 10px; background: #eee; border-radius: 6px; overflow: hidden; margin: 10px 0; }
#progress-fill { height: 100%; width: 0; background: var(--accent2); transition: width .4s; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-top: 12px; }
.tile { border: 1px solid #eee; border-radius: 10px; overflow: hidden; font-size: .8rem; }
.tile img { width: 100%; display: block; background: #eee; aspect-ratio: 16/9; object-fit: cover; }
.tile .meta { padding: 8px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: .7rem; background: #eee; }
.badge.READY, .badge.UPLOADED { background: #d6f5d6; }
.badge.BLOCKED, .badge.FAILED, .badge.UPLOAD_FAILED { background: #ffd6d6; }
footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 20px; }
