:root {
  --bg: #1a0033;
  --bg-2: #2d0052;
  --card: #ffffff10;
  --card-border: #ffffff22;
  --accent: #ff2a9d;
  --accent-2: #ffd84a;
  --text: #ffffff;
  --muted: #ffffff99;
  --error: #ff5e7e;
  --ok: #5dffaa;
  --shadow: 0 8px 24px #00000055;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.hero {
  text-align: center;
  padding: 32px 0 16px;
}
.hero h1 {
  font-size: 2.4rem;
  line-height: 1.05;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.hero .accent { color: var(--accent); }
.lead { color: var(--muted); margin: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 16px;
}
.topbar .hi { color: var(--muted); margin-right: 4px; }

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 0 0 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}
.card.mine {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent)33, var(--shadow);
}
.card h2 {
  margin: 0 0 12px;
  font-size: 1.3rem;
}
.card .kicker {
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 600;
}
.card .hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

label {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin: 12px 0 6px;
}
input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 14px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: #00000033;
  color: var(--text);
  font-size: 1rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent)33;
}

.btn-primary {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #1a0033;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: transform .1s;
}
.btn-primary:active { transform: scale(0.98); }

.error {
  background: #ff5e7e22;
  border: 1px solid var(--error);
  color: var(--error);
  padding: 10px 12px;
  border-radius: 8px;
  margin: 0 0 12px;
  font-size: 0.9rem;
}

.section-title {
  margin: 24px 4px 12px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.queue {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.qitem {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px;
}
.qitem.is-mine {
  border-color: var(--accent);
  background: var(--accent)15;
}
.qitem .pos {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-2);
  min-width: 24px;
  text-align: center;
}
.qbody {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.qbody strong {
  font-size: 1rem;
}
.qbody .title {
  color: var(--muted);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty {
  text-align: center;
  color: var(--muted);
  padding: 24px;
  background: var(--card);
  border: 1px dashed var(--card-border);
  border-radius: var(--radius);
}

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.link-muted {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
}
.link-muted:hover { color: var(--text); }

/* Admin */
.admin-row {
  cursor: grab;
}
.admin-row.sortable-ghost { opacity: 0.4; }
.admin-row.sortable-chosen { cursor: grabbing; }
.admin-row .drag {
  color: var(--muted);
  font-size: 1.4rem;
  letter-spacing: -0.1em;
  user-select: none;
  touch-action: none;
}
.admin-row .actions {
  display: flex;
  gap: 6px;
}
.btn-sung, .btn-del {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: #00000033;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-sung { color: var(--ok); }
.btn-del  { color: var(--error); }
.btn-sung:active, .btn-del:active { transform: scale(0.94); }

/* Tabs */
.tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 20px;
  background: #00000033;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}
.tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: background .15s, color .15s;
}
.tab.is-active {
  background: var(--accent);
  color: #1a0033;
  font-weight: 700;
}

/* Saludos */
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: #00000033;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color .15s, box-shadow .15s;
}
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent)33;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  padding: 10px 12px;
  background: #00000033;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
}
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.check span { font-size: 0.95rem; }

.greetings {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.greeting {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.greeting.is-anon {
  border-style: dashed;
  background: #ff2a9d10;
}
.greeting .msg {
  margin: 0 0 8px;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.45;
}
.greeting .author {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-style: italic;
}
.greeting .anon { color: var(--accent); font-weight: 600; }
.greeting .anon-tag {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--accent);
  background: var(--accent)20;
  padding: 2px 6px;
  border-radius: 4px;
  font-style: normal;
}
.greeting-del {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  font-size: 0.9rem;
}
