:root {
  color-scheme: dark;
  --bg: #121212;
  --card: #1e1e1e;
  --text: #9a9a9a;
  --muted: #9a9a9a;
  --line: #333;
  --accent: #3d7eff;
  --danger: #ff6b6b;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
}

.wrap {
  width: min(28rem, 100%);
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.wrap-picker {
  padding: 0.75rem 1rem 1rem;
}

.wrap-picker .note { margin: 0 0 0.4rem; }

h1 {
  margin: 0 0 1rem;
  font-size: 1.8rem;
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.who { margin: 0; color: var(--muted); }

.card, .tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.25rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 1rem;
}

input {
  width: 100%;
  padding: 0.9rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #161616;
  color: var(--text);
  font-size: 1.1rem;
}

button {
  width: 100%;
  min-height: 3.2rem;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
}

button.secondary {
  background: #2a2a2a;
  color: var(--text);
}

.error { margin: 0; color: var(--danger); }

.tiles {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.tile h2 { margin: 0 0 0.35rem; font-size: 1.35rem; }
.tile p { margin: 0; color: var(--muted); }
.tile-muted { opacity: 0.75; }

.actions { margin: 0 0 0.75rem; }

a { color: var(--accent); text-decoration: none; }

.back { margin: 0 0 0.75rem; }

.tile-link { display: block; color: inherit; }
.tile-num {
  margin: 0.15rem 0 0.35rem;
  font-size: 1.7rem;
  font-weight: 700;
}

.muted { color: var(--muted); }

.stats {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}

.btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.btn-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.2rem;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}

.btn-link.disabled {
  background: #2a2a2a;
  color: var(--muted);
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tabs a {
  flex: 1;
  text-align: center;
  padding: 0.7rem 0.4rem;
  border-radius: 10px;
  background: #2a2a2a;
  color: var(--text);
}

.tabs a.active { background: var(--accent); color: #fff; }

.list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
}

.list li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.note {
  margin: 0 0 0.85rem;
  color: var(--muted);
}

canvas { width: 100% !important; }

.picker-form { margin-top: 0.25rem; }

.picker-title {
  margin: 0 0 0.4rem;
  font-size: 1.35rem;
  text-align: center;
}

.wheel-label {
  margin: 0.55rem 0 0.2rem;
  text-align: center;
}

.wheels {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.15rem;
  height: calc(44px * 3);
  margin: 0 auto 0.25rem;
  overflow: hidden;
}

.wheels::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.wheel-col {
  width: 2.8rem;
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-padding-top: 44px;
  scroll-padding-bottom: 44px;
  overscroll-behavior: contain;
  scrollbar-width: none;
}

.wheel-col::-webkit-scrollbar { display: none; }

.wheel-item {
  height: 44px;
  line-height: 44px;
  text-align: center;
  font-size: 1.55rem;
  font-weight: 600;
  scroll-snap-align: start;
}

.wheel-comma {
  display: flex;
  align-items: center;
  font-size: 1.6rem;
  padding-bottom: 0.1rem;
}

.picker-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.btn-square {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.4rem;
  border-radius: 14px;
  background: #2a2a2a;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  border: 0;
}

.btn-square.primary {
  background: var(--accent);
  color: #d4d4d4;
}

.field-label {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

.field-label input,
.field-label select {
  padding: 0.65rem 0.75rem;
  font-size: 1.05rem;
}

select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #161616;
  color: var(--text);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 1.15rem) calc(50% - 0.15rem),
    calc(100% - 0.75rem) calc(50% - 0.15rem);
  background-size: 0.4rem 0.4rem, 0.4rem 0.4rem;
  background-repeat: no-repeat;
}
