:root{
  --bg1:#f4efe8;
  --bg2:#efe6de;
  --text:#1b1b1f;
  --muted:rgba(27,27,31,0.65);
  --white:rgba(255,255,255,0.82);
  --border:rgba(0,0,0,0.08);
  --shadow: 0 10px 26px rgba(0,0,0,0.10);
  --shadow2: 0 14px 34px rgba(0,0,0,0.14);
  --radius:18px;
}

*{ box-sizing:border-box; }

html{
  height: 100%;
  overscroll-behavior-y: none;
}

body{
  margin:0;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);

  background:
    radial-gradient(900px 700px at 20% 10%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(900px 700px at 80% 30%, rgba(255,255,255,0.35), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
  background-color: var(--bg2);

  overflow-x: hidden;
}

.page{
  min-height: 100dvh;
  width:100%;
  max-width: 520px;
  margin:0 auto;
  padding: 34px 18px 18px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap: 18px;

  /* TÄMÄ KORJAA FOOTERIN ALLA NÄKYVÄN VALKOISEN */
  background:
    radial-gradient(900px 700px at 20% 10%, rgba(255,255,255,0.55), transparent 60%),
    radial-gradient(900px 700px at 80% 30%, rgba(255,255,255,0.35), transparent 55%),
    linear-gradient(180deg, var(--bg1), var(--bg2));
}

/* Profile */
.profile{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:10px;
  margin-top: 10px;
}

.hero-img{
  width: 100%;
  max-width: 220px;
  aspect-ratio: 1 / 1;
  border-radius: 28px;
  object-fit: cover;
  object-position: center 10%;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.name{
  margin: 4px 0 0;
  font-size: 28px;
  letter-spacing: 0.2px;
}

.bio{
  margin:0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.35;
}

/* Links */
.links{
  width:100%;
  display:flex;
  flex-direction:column;
  gap: 14px;
  margin-top: 6px;
}

.link{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  padding: 18px 16px;
  border-radius: var(--radius);
  text-decoration:none;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-weight: 700;
  font-size: 16px;
  transition: transform 140ms ease, box-shadow 180ms ease, background 180ms ease;
}

.link:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow2);
  background: rgba(255,255,255,0.92);
}

/* Small links */
.small-links{
  display:flex;
  justify-content:center;
  align-items:center;
  gap: 10px;
  margin-top: 6px;
  color: var(--muted);
}

.slink{
  color: var(--muted);
  text-decoration:none;
  font-weight: 700;
}

.slink:hover{
  color: rgba(27,27,31,0.85);
}

.dot{
  opacity:0.7;
}

/* Footer */
.footer{
  margin-top: auto;
  padding-top: 12px;
  color: rgba(27,27,31,0.55);
  font-size: 12px;
  text-align:center;
}

/* Mobile tweaks */
@media (max-width: 380px){
  .name{ font-size: 24px; }
  .link{ padding: 16px 14px; }
}

/* =========================
   18+ MODAL
   ========================= */

.modal{
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  z-index: 9999;
}

.modal.open{
  display: grid;
}

.modal-card{
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.10);
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.22);
  padding: 16px 16px 14px;
}

.modal-card h2{
  margin: 0 0 6px;
  font-size: 18px;
}

.modal-text{
  margin: 0 0 14px;
  color: rgba(0,0,0,0.72);
  line-height: 1.35;
}

.modal-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.mbtn{
  flex: 1 1 160px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.04);
  font-weight: 800;
  cursor: pointer;
}

.mbtn.yes{
  background: rgba(27,27,31,0.92);
  color: #fff;
  border-color: rgba(27,27,31,0.92);
}

.mbtn.no{
  background: rgba(255,255,255,0.9);
}

.modal-fine{
  margin: 10px 0 0;
  font-size: 12px;
  color: rgba(0,0,0,0.55);
}