:root{
  --bg: #6d6d70;
  --card: rgba(255,255,255,0.06);
  --card2: rgba(255, 255, 255, 0.09);
  --text: rgba(255,255,255,0.92);
  --muted: rgba(255,255,255,0.68);
  --line: rgba(255,255,255,0.10);
  --accent: #a9c7ff;
  --accent2: #c8ffd8;

  --r: 12px;
  --shadow: 0 20px 60px rgba(0,0,0,0.45);
}

*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin: 0;
  font-family: 'Josefin sans';
  color: var(--text);
  background:
    radial-gradient(1200px 900px at 20% 0%, rgba(169,199,255,0.18), transparent 55%),
    radial-gradient(1000px 700px at 90% 10%, rgba(200,255,216,0.14), transparent 55%),
    var(--bg);
}
button { font-family: inherit; }

.wrap{
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 4px 14px;
}

.top{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  gap: 14px;
  margin: 10px 0 14px;
}

h1{
  margin:0;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.sub{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.card{
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,0.03));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow:hidden;
}

.grid{
  display:grid;
  gap: 6px;
  padding: 4px;
  background:
    linear-gradient(
      135deg,
      hsl(0 60% 75%),
      hsl(45 60% 75%),
      hsl(90 55% 70%),
      hsl(180 55% 70%),
      hsl(220 55% 75%),
      hsl(280 55% 75%)
    );
}

.cell{
    position:relative;
    width: 100%;
    min-height: 74px;
    border-radius: 14px;
    border: 1px solid var(--line);
    color: rgba(15, 18, 25, 0.92);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.35);
    padding: 2px;
    text-align: center;
    line-height: 1.25;
    font-size: 12px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 120ms ease, background 160ms ease, border-color 160ms ease;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cell__text{
  padding: 6px 2px 2px;
}

.cell.checked .cell__name{
  color: rgba(15, 18, 25, 0.82);
}

.cell__name{
  margin-top: auto;
  padding: 6px 8px 8px;
  font-size: 10px;
  line-height: 1.1;
  color: rgba(15, 18, 25, 0.70);
  border-top: 1px solid rgba(0,0,0,0.06);
}

.cell:active{ transform: scale(0.99); }

.cell.checked{
  background: rgba(255,255,255,0.1);
  border-color: transparent;
  box-shadow:
    0 0 1px 1px rgba(40, 60, 120, 0.35),
    0 0 1px 2px rgba(40, 60, 120, 0.15),
    inset 0 0 2px 2px rgba(255, 255, 255, 0.45);
  font-weight: 500;
}

.cell.checked::after{
  content:"";
  position:absolute;
  inset: 0;
  border-radius: 14px;
  pointer-events:none;
}

.ghost, .primary{
  border-radius: 999px;
  padding: 10px 12px;
  font-size: 13px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
  color: var(--text);
}

.primary{
  border-color: rgba(169,199,255,0.35);
  background: rgba(169,199,255,0.16);
}

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(10,12,16,0.85);
  backdrop-filter: blur(10px);
  color: var(--text);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events:none;
  transition: opacity 180ms ease, transform 180ms ease;
  font-size: 13px;
}

.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.modal{
  position: fixed;
  inset: 0;
  display: none;
}
.modal.show{ display:block; }
.modal__backdrop{
  position:absolute; inset:0;
  background: rgba(0,0,0,0.55);
}
.modal__panel{
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  width: min(92vw, 420px);
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: rgba(14,16,22,0.92);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
  padding: 16px;
}
.modal__text{ color: var(--muted); margin: 8px 0 14px; font-size: 13px; }

.foot{ margin-top: 12px; text-align:center; }
.tiny{ color: var(--muted); font-size: 12px; }

@media (max-width: 420px){
  h1{ font-size: 18px; }
  .cell{ min-height: 78px; }
}