/* Red Protocol: shared styles for the interactive pages (playlist, awards).
   Builds on theme.css. */

code {
  font-family: var(--f-mono);
  font-size: 0.86em;
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 3px;
  word-break: break-all;
}

.small { font-size: 0.84rem; }
.muted { color: var(--muted); }

/* ---------- demo banner ---------- */

.demo-banner {
  position: relative;
  z-index: 30;
  padding: 9px var(--gutter-r) 9px var(--gutter);
  text-align: center;
  font-family: var(--f-type);
  font-size: 0.84rem;
  color: var(--paper-ink);
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
}

.demo-tag {
  display: inline-block;
  margin-right: 8px;
  padding: 1px 8px;
  font-family: var(--f-ui);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: #9b1a12;
  border: 1.5px solid #9b1a12;
}

.demo-hint { opacity: 0.75; }

/* ---------- page head ---------- */

.page-head {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 44px var(--gutter-r) 8px var(--gutter);
  display: grid;
  gap: 14px;
  justify-items: start;
}

.page-head > * { animation: rise 0.7s var(--ease) both; }
.page-head > *:nth-child(2) { animation-delay: 0.06s; }
.page-head > *:nth-child(3) { animation-delay: 0.12s; }
.page-head > *:nth-child(4) { animation-delay: 0.18s; }
.page-head > *:nth-child(5) { animation-delay: 0.24s; }
.page-head .label { margin: 0; }

.page-title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(2.3rem, 6.2vw, 4.4rem);
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background: linear-gradient(180deg, var(--silver-1) 0%, var(--silver-2) 48%, var(--silver-3) 52%, #e2ddd9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.6));
}

.red-word {
  position: relative;
  display: inline-block;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.32) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, #ff5a4f 0%, #e0141e 55%, #9c0a10 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 16px rgba(255, 30, 30, 0.45));
}

.honour {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 2px 0 0;
  padding: 9px 14px 9px 12px;
  max-width: 40rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text);
  background: var(--red-wash);
  border-left: 2px solid var(--red-hot);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.honour-mark { flex-shrink: 0; width: 15px; height: 14px; margin-top: 2px; color: var(--red-hot); }

.lede { margin: 0; max-width: 40rem; color: var(--muted); font-size: 1rem; }
.page-meta { margin: 0; font-size: 0.82rem; color: var(--dim); }

/* ---------- tokens ---------- */

/* vote tokens: remaining = lit wax seal, spent = empty ring */
.pips { display: inline-flex; gap: 6px; flex-shrink: 0; }

.pip {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1.5px solid var(--red-line);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}

.pip.on {
  border-color: #ff4a4a;
  background: radial-gradient(circle at 35% 30%, #ff8a7c, #d4121c 55%, #7a080d);
  box-shadow: 0 0 10px rgba(255, 30, 30, 0.6);
}

.pips-lg { gap: 10px; }
.pips-lg .pip { width: 24px; height: 24px; border-width: 2px; }

.closed-pill {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--warn);
  border: 1px solid rgba(240, 180, 90, 0.5);
  padding: 4px 8px;
}

.notices { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter-r) 0 var(--gutter); }
.notices > .notice { margin-top: 24px; }

.card, .notice {
  position: relative;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px;
}

.card h2, .notice h2 {
  margin: 0 0 16px;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.notice p, .admin-panel p { margin: 0 0 10px; color: var(--muted); }
.notice-error { border-color: var(--red-line); }
.admin-panel { border-style: dashed; border-color: var(--line); }
.device-id { display: flex; align-items: center; gap: 10px; margin: 6px 0 10px; }

/* ---------- form ---------- */

.field { display: grid; gap: 7px; min-width: 0; margin-bottom: 16px; }

.field > span {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.field em { font-style: normal; font-weight: 400; letter-spacing: 0.04em; text-transform: none; opacity: 0.8; }

input {
  width: 100%;
  font-family: var(--f-mono);
  font-size: 1rem;
  color: var(--text);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input::placeholder { color: #5c4c48; }
input:focus { outline: none; border-color: var(--red-hot); box-shadow: 0 0 0 3px rgba(255, 30, 30, 0.18), 0 0 18px -4px rgba(255, 30, 30, 0.5); }

.form-msg { min-height: 1.3em; margin: 10px 0 0; font-size: 0.88rem; color: var(--muted); }
.form-msg:empty { min-height: 0; margin: 0; }
.form-msg[data-kind="ok"] { color: var(--ok); }
.form-msg[data-kind="warn"] { color: var(--warn); }
.form-msg[data-kind="info"] { color: var(--red-hot); }

.empty {
  padding: 44px 16px;
  text-align: center;
  font-family: var(--f-type);
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- loading, toast, footer ---------- */

.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 48px 0; color: var(--muted); }
.loading[hidden] { display: none; }

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-top-color: var(--red-hot);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 18px 12px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  background: #140c0c;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red-hot);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8);
  transform: translate(-50%, 16px);
  opacity: 0;
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast[data-kind="warn"] { border-left-color: var(--warn); }

.site-foot {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px var(--gutter-r) max(40px, env(safe-area-inset-bottom, 0px)) var(--gutter);
  text-align: center;
}

.site-foot .label { margin: 0; font-size: 0.62rem; color: var(--dim); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes flash {
  0%, 30% { box-shadow: 0 0 0 2px var(--red-hot), 0 0 32px rgba(255, 30, 30, 0.45); }
  100% { box-shadow: 0 0 0 0 transparent; }
}


textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  font-family: var(--f-mono);
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea::placeholder { color: #5c4c48; }
textarea:focus { outline: none; border-color: var(--red-hot); box-shadow: 0 0 0 3px rgba(255, 30, 30, 0.18), 0 0 18px -4px rgba(255, 30, 30, 0.5); }

@media (max-width: 560px) {
  .page-head { padding-top: 32px; }
  .card { padding: 18px; }
}
