:root{
  --bg: #fff0f7;
  --card: #ffffff;
  --pink: #ff4da6;
  --pink2: #ff7ac7;
  --text: #2b2b2b;
  --muted: rgba(43,43,43,.65);
  --shadow: 0 10px 30px rgba(255, 77, 166, .18);
  --shadow2: 0 8px 20px rgba(0,0,0,.08);
  --radius: 22px;
}

*{ box-sizing:border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }

body{
  margin:0;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(255,77,166,.18), transparent 60%),
    radial-gradient(700px 400px at 85% 25%, rgba(255,122,199,.22), transparent 60%),
    radial-gradient(600px 380px at 40% 90%, rgba(255,77,166,.14), transparent 60%),
    var(--bg);
  color: var(--text);
}

body.locked {
  overflow: hidden;
}

/* Header */
.top{
  padding: 18px 16px 6px;
}

.brand{
  max-width: 980px;
  margin: 0 auto;
  background: rgba(255,255,255,.7);
  border: 1px solid rgba(255, 77, 166, .18);
  border-radius: var(--radius);
  padding: 14px 14px;
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: var(--shadow2);
  backdrop-filter: blur(10px);
}

.logo{
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(135deg, var(--pink), var(--pink2));
  color: white;
  box-shadow: var(--shadow);
}

.brand h2{
  margin:0;
  font-size: 18px;
  letter-spacing: .2px;
}

.brand p{
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Tiles */
.tiles{
  max-width: 980px;
  margin: 0 auto;
  padding: 14px 16px 24px;
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.tile{
  position: relative;
  background: rgba(255,255,255,.9);
  border: 1px solid rgba(255, 77, 166, .16);
  border-radius: var(--radius);
  padding: 16px 12px;
  min-height: 98px;
  cursor: pointer;
  box-shadow: var(--shadow2);
  transition: transform .14s ease, box-shadow .14s ease;
  overflow:hidden;
}

.tile:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(255, 77, 166, .16);
}

.tile:active{
  transform: translateY(0px) scale(.99);
}

.tile-num{
  font-size: 13px;
  color: rgba(43,43,43,.7);
}

.tile-emoji{
  font-size: 26px;
  margin-top: 10px;
}

.tile::after{
  content:"";
  position:absolute;
  inset:auto -40px -60px auto;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at 30% 30%, rgba(255,77,166,.28), transparent 60%);
  transform: rotate(25deg);
}

/* Modal */
.modal{
  position: fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(18, 0, 10, .45);
  padding: 16px;
}

.hidden{ display:none; }

.modal-card{
  width: min(520px, 100%);
  background: white;
  border-radius: 26px;
  padding: 18px 16px 14px;
  border: 1px solid rgba(255, 77, 166, .18);
  box-shadow: 0 22px 70px rgba(0,0,0,.22);
  position: relative;
  animation: pop .18s ease;
}

@keyframes pop{
  from{ transform: scale(.96); opacity: 0; }
  to{ transform: scale(1); opacity: 1; }
}

.modal-close{
  position:absolute;
  top: 10px;
  right: 10px;
  border: 0;
  background: rgba(255, 77, 166, .12);
  color: var(--pink);
  width: 38px;
  height: 38px;
  border-radius: 14px;
  cursor:pointer;
  font-size: 16px;
}

.modal-text{
  margin: 26px 8px 14px;
  font-size: 18px;
  line-height: 1.4;
}

/* Buttons */
.btn{
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 12px 14px;
  font-weight: 650;
  cursor:pointer;
  box-shadow: var(--shadow2);
}

.btn-primary{
  background: linear-gradient(135deg, var(--pink), var(--pink2));
  color: white;
}

.btn-secondary{
  background: rgba(255, 77, 166, .12);
  color: var(--pink);
}

/* Gate */
.gate{
  position: fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 16px;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(255,77,166,.25), transparent 60%),
    radial-gradient(700px 400px at 85% 25%, rgba(255,122,199,.28), transparent 60%),
    radial-gradient(600px 380px at 40% 90%, rgba(255,77,166,.20), transparent 60%),
    var(--bg);
  z-index: 50;
}

.gate-card{
  width: min(420px, 100%);
  background: rgba(255,255,255,.8);
  border-radius: 28px;
  border: 1px solid rgba(255, 77, 166, .18);
  padding: 20px 16px 16px;
  box-shadow: 0 26px 80px rgba(0,0,0,.14);
  text-align:center;
  backdrop-filter: blur(12px);
}

.sparkle{
  color: var(--pink);
  letter-spacing: 6px;
  margin-bottom: 6px;
}

.gate-title{
  margin: 0 0 6px;
  font-size: 26px;
}

.gate-sub{
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.gate-input{
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(255, 77, 166, .22);
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
  margin-bottom: 10px;
  background: rgba(255,255,255,.9);
}

.gate-error{
  margin: 10px 0 0;
  min-height: 18px;
  color: #d1005e;
  font-size: 13px;
}

.gate-hint{
  margin: 10px 0 0;
  color: rgba(43,43,43,.55);
  font-size: 12px;
}

.gate.hidden {
  display: none !important;
}

