:root {
  --bg: #0d0814;
  --orange: #ff7a18;
  --purple: #7b2ff7;
  --green: #5ee05a;
  --red: #ff4d4d;
  --text: #f3e9ff;
  --muted: #b9a9cf;
  --card: #1d1229;
  --line: #3a2950;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  background: radial-gradient(ellipse at 50% 0%, #2b1442 0%, var(--bg) 60%) fixed, var(--bg);
}

.wrap { max-width: 480px; margin: 0 auto; padding: 22px 16px 48px; }
.wrap.wide { max-width: 760px; }

.logo {
  text-align: center; font-family: Creepster, cursive; font-size: 40px; line-height: 1.05;
  color: var(--orange); text-shadow: 0 0 14px #ff7a1888; letter-spacing: 1px; margin: 8px 0 0;
}
.tag { text-align: center; font-size: 14px; color: var(--muted); margin: 6px 0 20px; }
.announce { background: #24170a; border: 1px dashed #6b3a10; border-radius: 12px; padding: 10px 14px; margin: -8px 0 16px; text-align: center; font-size: 15px; }
h2 { font-family: Creepster, cursive; font-weight: 400; font-size: 32px; color: var(--orange); margin: 6px 0 4px; letter-spacing: 1px; }
h3 { margin: 0 0 10px; font-size: 18px; }
.hint { font-size: 14px; color: var(--muted); margin: 0 0 14px; }
.back { display: inline-block; color: var(--muted); text-decoration: none; font-size: 15px; padding: 6px 0; margin-bottom: 4px; }

/* Start tiles */
.tile {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: inherit; font: inherit; text-decoration: none;
  background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: 16px 14px; margin-bottom: 12px; cursor: pointer;
}
.tile .ic { font-size: 34px; flex: none; }
.tile .tx { min-width: 0; }
.tile .tx b { display: block; font-size: 18px; }
.tile .tx span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.tile .chk {
  margin-left: auto; flex: none; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-weight: 900;
}
.tile.done { border-color: #2f6b2c; }
.tile.done .chk { background: var(--green); border-color: var(--green); color: #062b05; }
.tile.closed { opacity: .85; }
.tile.closed .chk { border-color: transparent; }

/* Forms */
.lbl { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 2px; color: var(--muted); margin: 12px 0 6px; }
.inp {
  width: 100%; background: #0f0918; border: 2px solid var(--line); border-radius: 12px; padding: 13px 14px;
  color: var(--text); font: inherit; font-size: 16px; outline: none;
}
.inp:focus { border-color: var(--orange); }
.btn {
  display: block; width: 100%; background: var(--orange); color: #1a0b00; font: inherit; font-weight: 800; font-size: 17px;
  border: 0; border-radius: 14px; padding: 15px; margin-top: 14px; cursor: pointer; text-align: center; text-decoration: none;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn.secondary { background: #2a1d3a; color: var(--text); }
.btn.danger { background: #5a1414; color: #ffd6d6; }
.btn.small { display: inline-block; width: auto; font-size: 14px; padding: 9px 14px; margin: 0; border-radius: 10px; }

/* Suggestions + options */
.sugg { background: #140c1f; border: 1px solid var(--line); border-radius: 12px; margin: 6px 0 12px; overflow: hidden; }
.sugg button {
  display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: inherit; font: inherit; font-size: 15px; padding: 12px 14px; cursor: pointer;
}
.sugg button:last-child { border-bottom: 0; }
.sugg .new { color: var(--orange); font-weight: 600; }
.opt {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; color: inherit; font: inherit; font-size: 16px;
  background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 13px 14px; margin-bottom: 8px; cursor: pointer;
}
.opt .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #8d80a0; flex: none; }
.opt.sel { border-color: var(--orange); background: #2a160a; }
.opt.sel .dot { border-color: var(--orange); background: radial-gradient(var(--orange) 45%, transparent 50%); }
.opt small { color: var(--muted); }
.opt .em { font-size: 22px; }

/* Messages */
.msg { border-radius: 12px; padding: 12px 14px; font-size: 14px; margin: 10px 0; }
.msg.err { background: #3a0f14; border: 1px solid #7a2630; color: #ffd6da; }
.msg.info { background: #24170a; border: 1px dashed #6b3a10; }
.closedbox { text-align: center; padding: 30px 10px; }
.closedbox .big { font-size: 64px; }
.closedbox p { font-size: 17px; line-height: 1.5; }
.ok { text-align: center; margin-top: 30px; }
.ok .big { font-size: 72px; }
.ok p { color: var(--muted); font-size: 16px; line-height: 1.5; }
.ok b { color: var(--text); font-size: 19px; }

/* Ranking */
.rank-list { list-style: none; margin: 10px 0 0; padding: 0; }
.rank-list li {
  display: flex; align-items: center; gap: 12px; background: var(--card); border: 2px solid var(--line);
  border-radius: 14px; padding: 12px 14px; margin-bottom: 8px;
}
.rank-list .pl { font-family: Creepster, cursive; font-size: 26px; color: var(--orange); width: 38px; flex: none; }
.rank-list .nm { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rank-list .nm small { display: block; color: var(--muted); }
.rank-list .vt { font-weight: 800; font-size: 18px; flex: none; }
.rank-list li.first { border-color: var(--orange); background: #2a160a; box-shadow: 0 0 20px #ff7a1844; }

.hidden { display: none !important; }
