* { box-sizing: border-box; }
:root {
  --background: #f4f5f0;
  --foreground: #080a08;
  --panel: rgba(255,255,255,.92);
  --ink: #080a08;
  --muted: #616b5d;
  --line: rgba(8,10,8,.14);
  --green: #78d66d;
  --deep-green: #173d20;
  --acid: #b7ff78;
  --shadow: 0 24px 60px rgba(8,10,8,.16);
}
body {
  margin: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(224,231,221,.96)), var(--background);
  color: var(--foreground);
  font-family: Arial, Helvetica, sans-serif;
}
body::before {
  background-image: url("/kinoah2k-da.png");
  background-position: center top;
  background-repeat: no-repeat;
  background-size: min(1200px, 105vw) auto;
  content: "";
  inset: 0;
  opacity: .08;
  pointer-events: none;
  position: fixed;
  z-index: -1;
}
button, input { font: inherit; }
a { color: inherit; }
img { max-width: 100%; }
.app-shell, .admin-shell { margin: 0 auto; max-width: 1220px; min-height: 100vh; padding: clamp(12px, 2.2vw, 22px); }
.topbar, .admin-header { align-items: center; display: flex; gap: 10px; justify-content: space-between; margin: 0 auto 10px; }
.brand-lockup, .topbar-link, .secondary-link { align-items: center; display: inline-flex; text-decoration: none; }
.brand-lockup { gap: 10px; }
.brand-mark { background: var(--ink); color: var(--acid); display: grid; font-size: .82rem; font-weight: 950; height: 40px; place-items: center; width: 40px; }
.brand-lockup strong, .topbar-link { font-weight: 950; }
.topbar-link, .secondary-link { background: rgba(255,255,255,.72); border: 1px solid var(--line); min-height: 40px; padding: 0 14px; white-space: nowrap; }
.public-app { background: linear-gradient(90deg, rgba(255,255,255,.92), rgba(255,255,255,.78)), url("/kinoah2k-da.png"); background-position: center; background-size: cover; border: 1px solid var(--line); box-shadow: var(--shadow); min-height: calc(100svh - 72px); padding: clamp(14px, 2.4vw, 24px); }
.public-header { align-items: center; display: grid; gap: 16px; grid-template-columns: minmax(0,1fr) auto; margin-bottom: 16px; }
.public-header h1 { font-size: clamp(2.1rem, 5vw, 4.3rem); font-weight: 950; letter-spacing: 0; line-height: .9; margin: 4px 0 8px; text-transform: uppercase; }
.public-header p:last-child { color: var(--muted); margin: 0; }
.mini-counter { align-items: center; background: var(--ink); color: #f8fff3; display: grid; min-height: 94px; min-width: 118px; padding: 14px; text-align: center; }
.mini-counter strong { color: var(--acid); font-size: 3rem; font-weight: 950; line-height: .85; }
.mini-counter span { font-size: .78rem; font-weight: 950; text-transform: uppercase; }
.public-grid { align-items: start; display: grid; gap: 12px; grid-template-columns: minmax(300px,.88fr) minmax(0,1.12fr); }
.suggest-panel, .vote-section, .empty-state, .login-card, .qr-zone, .setup-note, .spotify-connect, .admin-card { background: var(--panel); border: 1px solid var(--line); box-shadow: 0 18px 45px rgba(8,10,8,.12); padding: clamp(14px, 2vw, 20px); }
.panel-heading { align-items: center; display: flex; gap: 12px; margin-bottom: 12px; }
.step-dot { background: var(--green); color: var(--ink); display: grid; flex: 0 0 auto; font-weight: 950; height: 38px; place-items: center; width: 38px; }
.eyebrow { color: var(--deep-green); font-size: .78rem; font-weight: 950; letter-spacing: 0; margin: 0; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
.suggest-panel h2, .vote-section h2, .qr-zone h2, .spotify-connect h2, .admin-header h1 { font-size: clamp(1.4rem, 3vw, 2.4rem); font-weight: 950; letter-spacing: 0; line-height: .95; margin: 0; text-transform: uppercase; }
.search-row, .playlist-form { display: grid; gap: 10px; grid-template-columns: minmax(0,1fr) auto; }
input { background: #fff; border: 1px solid var(--line); color: var(--ink); min-height: 48px; padding: 0 14px; width: 100%; }
input:focus { border-color: var(--green); outline: 3px solid rgba(120,214,109,.22); }
.primary-button, .secondary-button, .danger-button { align-items: center; border: 0; cursor: pointer; display: inline-flex; font-weight: 950; justify-content: center; min-height: 46px; padding: 0 18px; text-decoration: none; }
.primary-button { background: var(--green); color: var(--ink); width: 100%; }
.suggest-panel .primary-button { margin-top: 10px; }
.secondary-button { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.danger-button { background: #fff; border: 1px solid rgba(255,76,63,.38); color: #cc2419; }
button:disabled { cursor: not-allowed; opacity: .55; }
.result-list, .track-list { display: grid; gap: 8px; max-height: min(44svh, 430px); overflow: auto; padding-right: 4px; }
.result { align-items: center; background: #fff; border: 1px solid var(--line); cursor: pointer; display: grid; gap: 12px; grid-template-columns: 54px minmax(0,1fr); min-height: 70px; padding: 8px; text-align: left; width: 100%; }
.result.selected { border-color: var(--green); box-shadow: 0 0 0 3px rgba(120,214,109,.24); }
.result img, .cover-fallback { aspect-ratio: 1; height: 54px; object-fit: cover; width: 54px; }
.result strong, .result small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result strong, .track-info h3, .admin-card h2 { font-weight: 950; }
.result small, .track-info p, .track-info small, .admin-card p, .admin-card small, .form-message { color: var(--muted); }
.track-card, .admin-card { align-items: center; display: grid; gap: 12px; grid-template-columns: 44px 64px minmax(0,1fr) auto; padding: 10px; }
.rank { color: var(--deep-green); font-weight: 950; text-align: center; }
.cover { aspect-ratio: 1; background: #dfe7db; height: 64px; object-fit: cover; width: 64px; }
.track-info { min-width: 0; }
.track-info h3 { font-size: 1.05rem; line-height: 1.1; margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-info p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vote-button { background: var(--green); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); color: var(--ink); cursor: pointer; display: grid; font-weight: 950; gap: 2px; min-height: 58px; min-width: 104px; place-items: center; transition: transform .15s ease, box-shadow .15s ease; }
.vote-button:hover { box-shadow: 2px 2px 0 var(--ink); transform: translate(2px, 2px); }
.vote-button.voted { background: #ff4c3f; border-color: var(--ink); box-shadow: 4px 4px 0 var(--ink); color: #fff; }
.vote-button.voted:hover { background: #e63c31; box-shadow: 2px 2px 0 var(--ink); }
.vote-button strong { font-size: 1.08rem; line-height: 1; text-transform: uppercase; }
.vote-button span { color: var(--deep-green); font-size: .76rem; line-height: 1; }
.vote-button.voted span { color: rgba(255,255,255,.82); }
.empty-state { box-shadow: none; }
.admin-shell { max-width: 1120px; }
.login-card { display: grid; gap: 14px; margin: 15vh auto; max-width: 440px; }
.qr-zone, .spotify-connect { align-items: center; display: grid; gap: 18px; grid-template-columns: minmax(0,1fr) auto; margin-top: 14px; }
.qr-zone img { background: #f4f5f0; border: 1px solid var(--line); height: 156px; padding: 10px; width: 156px; }
.spotify-connect-actions { display: grid; gap: 10px; width: min(460px, 100%); }
.admin-list { display: grid; gap: 10px; margin-top: 14px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.admin-tabs a { background: rgba(255,255,255,.72); border: 1px solid var(--line); font-weight: 950; min-height: 42px; padding: 11px 14px; text-decoration: none; }
.admin-tabs a.active { background: var(--ink); color: var(--acid); }
.admin-card { grid-template-columns: 76px minmax(0,1fr) auto; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.admin-track-main audio { max-width: 460px; width: 100%; }
.status { color: var(--muted); display: inline-block; font-size: .72rem; font-weight: 950; margin-bottom: 6px; text-transform: uppercase; }
.status-approved, .status-sent, .spotify-link { color: #1b7d3e; }
.status-rejected { color: #cc2419; }
.spotify-link { font-weight: 950; }
@media (max-width: 980px) {
  .public-grid { grid-template-columns: 1fr; }
  .result-list, .track-list { max-height: none; overflow: visible; }
}
@media (max-width: 740px) {
  .app-shell, .admin-shell { padding: 14px; }
  .public-app { min-height: calc(100svh - 64px); padding: 12px; }
  .public-header { align-items: start; gap: 10px; grid-template-columns: minmax(0,1fr) auto; margin-bottom: 10px; }
  .public-header h1 { font-size: clamp(1.72rem, 9vw, 2.45rem); margin-bottom: 6px; }
  .public-header p:last-child { font-size: .95rem; line-height: 1.35; }
  .mini-counter { min-height: 68px; min-width: 76px; padding: 10px; }
  .mini-counter strong { font-size: 2.15rem; }
  .mini-counter span { font-size: .68rem; }
  .public-grid, .search-row, .playlist-form, .qr-zone, .spotify-connect, .admin-card { grid-template-columns: 1fr; }
  .suggest-panel, .vote-section, .empty-state, .login-card, .qr-zone, .setup-note, .spotify-connect { padding: 12px; }
  .step-dot { height: 32px; width: 32px; }
  .suggest-panel h2, .vote-section h2 { font-size: 1.3rem; }
  .track-card { align-items: start; gap: 10px; grid-template-columns: 32px 58px minmax(0,1fr); min-height: 0; padding: 10px; }
  .cover { height: 58px; width: 58px; }
  .track-card form { grid-column: 1 / -1; width: 100%; }
  .vote-button { min-height: 48px; width: 100%; }
  .admin-actions { display: grid; justify-content: stretch; }
  .admin-actions form, .admin-actions button, .secondary-link { width: 100%; }
  .qr-zone img { height: 132px; width: 132px; }
}
