* {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0f1115;
  color: #eaeaea;
}

header {
  padding: 12px;
  background: #151820;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  border-bottom: 1px solid #222;
}

header button {
  background: #1f2330;
  color: #fff;
  border: 1px solid #2a2f3d;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

header button.active {
  background: #3b82f6;
  border-color: #3b82f6;
}

main {
  padding: 16px;
  max-width: 720px;
  margin: auto;
}

h2 {
  margin-top: 24px;
  margin-bottom: 10px;
  font-size: 18px;
  border-bottom: 1px solid #222;
  padding-bottom: 6px;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

li {
  padding: 8px 10px;
  background: #151820;
  border: 1px solid #222;
  border-radius: 6px;
  margin-bottom: 6px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 10px;
}

label {
  cursor: pointer;
  -webkit-box-flex: 1;
      -ms-flex: 1;
          flex: 1;
}

input[type=checkbox] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.muted {
  opacity: 0.6;
  font-size: 12px;
  margin-top: 6px;
}

.levels {
  background: #151820;
  border: 1px solid #222;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 16px;
  font-size: 14px;
}

.levels div {
  margin-bottom: 4px;
}

.levels div:last-child {
  margin-bottom: 0;
}

.levels .sep {
  opacity: 0.5;
  margin: 0 6px;
}

.tasks {
  list-style: none;
  padding: 0;
}
.tasks .task {
  padding: 8px 0;
  border-bottom: 1px solid #222;
  position: relative;
}
.tasks .task .task-title {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 5px;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}
.tasks .task .task-title span {
  white-space: nowrap;
}
.tasks .task .task-desc {
  font-size: 13px;
  opacity: 0.75;
  margin: 0 30px 0 auto;
}

.task.done .task-title {
  text-decoration: line-through;
  opacity: 0.6;
}

.blueprints {
  list-style: none;
  padding: 0;
}

.blueprint {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  padding: 8px 10px;
  margin-bottom: 6px;
  background: #141414;
  border-radius: 6px;
}

.bp-main {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
}

.bp-title {
  font-weight: 600;
}

.bp-meta {
  font-size: 12px;
  opacity: 0.7;
}

.bp-controls {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  gap: 6px;
}

.bp-controls button {
  width: 32px;
  height: 28px;
}

#characterTabs {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 15px;
}

#characterTabs button {
  display: block;
  width: 100%;
  text-align: left;
}

#characterTabs button::before {
  content: attr(data-group);
  opacity: 0.6;
  margin-right: 6px;
}

.group-tabs {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.group-tabs button {
  padding: 6px 12px;
  border-radius: 6px;
  opacity: 0.7;
}

.group-tabs button.active {
  opacity: 1;
  font-weight: 600;
}

#characterTabs button {
  display: block;
  width: 100%;
  text-align: left;
}

.edit-btn {
  margin-left: 8px;
  font-size: 14px;
  cursor: pointer;
  opacity: 0.6;
}

.edit-btn:hover {
  opacity: 1;
}

.eye-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  opacity: 0.6;
  position: absolute;
  right: 0;
}

.eye-btn:hover {
  opacity: 1;
}

.task-input-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 6px;
}

.task-input-row button {
  padding: 4px 8px;
}

input.saved {
  border-color: #22c55e;
}