* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #faf7f2; color: #1a1d22; }
a { color: #1661a6; text-decoration: none; }
a:hover { text-decoration: underline; }

/* reset bar — always visible at top */
#reset-bar { background: #ffe8d1; border-bottom: 1px solid #e6caa3; padding: 8px 16px; text-align: center; }
#reset-bar button { background: #fff; border: 1px solid #c4a16c; color: #8a5a1a; padding: 6px 14px; border-radius: 20px; cursor: pointer; font-size: 0.9em; }
#reset-bar button:hover { background: #fff8ee; }

header { padding: 14px 24px; background: #2d3036; color: #fff; display: flex; justify-content: space-between; align-items: center; }
header h1 { margin: 0; font-size: 18px; font-weight: 500; }
header nav a { color: #fff; margin-left: 18px; opacity: 0.85; }
header nav a:hover { opacity: 1; }
main { max-width: 900px; margin: 24px auto; padding: 0 20px; }
h2 { font-weight: 500; margin-top: 28px; }
.muted { color: #888; font-size: 0.9em; }
.welcome { font-size: 1.05em; color: #4a4d52; line-height: 1.5; }
.empty { padding: 24px; color: #888; text-align: center; background: #fff; border-radius: 8px; border: 1px dashed #ddd; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-top: 18px; }
.tile { background: #fff; border-radius: 12px; padding: 22px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); border: 1px solid #e8e4dc; display: block; transition: transform 0.12s ease, box-shadow 0.12s ease; }
.tile:hover { transform: translateY(-2px); text-decoration: none; box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.tile .emoji { font-size: 32px; margin-bottom: 6px; display: block; }
.tile .label { font-weight: 600; color: #1a1d22; font-size: 1.05em; }
.tile .sub { font-size: 0.85em; color: #777; margin-top: 3px; }

button, .btn { font: inherit; padding: 8px 14px; border: 1px solid #c4c9d0; background: #fff; border-radius: 6px; cursor: pointer; color: #1a1d22; }
button:hover, .btn:hover { background: #f0f2f5; }
button.primary, .btn.primary { background: #1661a6; color: #fff; border-color: #1557a0; }
button.primary:hover, .btn.primary:hover { background: #125287; }
.btn.sm { padding: 4px 10px; font-size: 0.85em; }
.pill { display: inline-block; padding: 2px 8px; font-size: 0.8em; border-radius: 100px; background: #e8e4dc; }
.pill.ok { background: #d4edda; color: #155724; }

table.bib { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; border: 1px solid #e8e4dc; }
table.bib th, table.bib td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #eef0f3; vertical-align: top; font-size: 0.92em; }
table.bib th { background: #f5f1e9; font-weight: 600; font-size: 0.85em; }
table.bib tr:last-child td { border-bottom: none; }
.pod-btn { background: transparent; border: 1px solid #c4c9d0; font-size: 18px; padding: 4px 10px; cursor: pointer; }
.pod-btn:hover { background: #f0f2f5; }
.trash-btn { background: transparent; border: 1px solid #c4c9d0; font-size: 16px; padding: 4px 8px; cursor: pointer; opacity: 0.6; }
.trash-btn:hover { background: #fbecec; border-color: #c0392b; opacity: 1; }
.trash-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.upload-row { margin: 16px 0; padding: 14px; background: #fff; border: 1px solid #e8e4dc; border-radius: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upload-row input[type=text] { padding: 6px 10px; border: 1px solid #c4c9d0; border-radius: 4px; font: inherit; }

.podcasts { list-style: none; padding: 0; }
.pc { background: #fff; padding: 16px; margin-bottom: 12px; border-radius: 8px; border: 1px solid #e8e4dc; }
.pc-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.pc-name { font-weight: 600; }
.pc-meta { color: #888; font-size: 0.85em; }
.pc audio { width: 100%; }

.src-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: #fff; margin-bottom: 4px; border-radius: 4px; cursor: pointer; border: 1px solid #eef0f3; }
.src-row:hover { background: #f5f1e9; }
.src-row .title { flex-grow: 1; }
.form-group { margin: 18px 0; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; }
.length-opts label { display: inline-flex; gap: 6px; align-items: center; margin-right: 16px; font-weight: normal; }
textarea.custom { width: 100%; min-height: 80px; padding: 10px; border: 1px solid #c4c9d0; border-radius: 6px; font: inherit; }

.banner { padding: 12px 16px; background: #e8e4dc; border-radius: 6px; margin: 10px 0; }
.banner.ok { background: #d4edda; color: #155724; }
.banner.err { background: #f8d7da; color: #721c24; }
.banner.working { background: #fff3cd; color: #856404; }
code { background: #f5f1e9; padding: 2px 6px; border-radius: 3px; font-size: 0.9em; }
