:root{
  --cream:#FFF8F0;
  --pink:#FF8FAB;
  --pink-deep:#E85D75;
  --blue:#8ECAE6;
  --blue-deep:#5FA8CC;
  --gold:#F5B942;
  --gold-deep:#B5790E;
  --plum:#3A2E39;
  --muted:#8B7E89;
  --white:#FFFFFF;
  --line:#F0E3E7;
  --good:#4FA37B;
  --bad:#E85D75;
}
*{box-sizing:border-box; margin:0; padding:0;}
html{ scroll-behavior:smooth; }
body{
  font-family:'Quicksand', sans-serif;
  color:var(--plum);
  background:var(--cream);
  min-height:100vh;
}
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; }
button{ font-family:inherit; }

/* ================= HEADER ================= */
header{
  background:var(--white);
  border-bottom:1px solid var(--line);
  position:sticky;
  top:0;
  z-index:50;
}
.header-top{
  max-width:1200px;
  margin:0 auto;
  padding:16px 24px 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.cube-logo{ width:38px; height:38px; flex-shrink:0; }
.brand-name{
  font-family:'Fredoka', sans-serif;
  font-weight:700;
  font-size:20px;
  color:var(--plum);
}
.brand-name span{ color:var(--pink-deep); }

.header-search{
  flex:1;
  max-width:420px;
  position:relative;
  display:none;
}
.header-search input{
  width:100%;
  padding:10px 16px 10px 40px;
  border-radius:999px;
  border:2px solid var(--line);
  background:var(--cream);
  font-family:'Quicksand', sans-serif;
  font-size:14px;
  font-weight:500;
  color:var(--plum);
  outline:none;
}
.header-search input:focus{ border-color:var(--pink); background:var(--white); }
.header-search svg{
  position:absolute; left:14px; top:50%; transform:translateY(-50%);
  width:16px; height:16px; color:var(--muted);
}

.header-actions{
  display:flex;
  align-items:center;
  gap:16px;
}
.icon-btn{
  width:38px; height:38px;
  border-radius:50%;
  border:none;
  background:var(--cream);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  color:var(--muted);
  position:relative;
}
.icon-btn:hover{ background:#FFEFE9; color:var(--pink-deep); }
.icon-btn svg{ width:18px; height:18px; }
.badge-dot{
  position:absolute; top:6px; right:7px;
  width:8px; height:8px; border-radius:50%;
  background:var(--pink-deep);
  border:2px solid var(--white);
}

.user-chip{
  display:flex; align-items:center; gap:9px;
  cursor:pointer;
  padding:5px 12px 5px 6px;
  border-radius:999px;
  border:1px solid var(--line);
  position:relative;
}
.user-chip:hover{ background:var(--cream); }
.avatar{
  width:30px; height:30px; border-radius:50%;
  background:linear-gradient(135deg, var(--pink), var(--blue));
  display:flex; align-items:center; justify-content:center;
  color:var(--white); font-family:'Fredoka', sans-serif; font-weight:600; font-size:13px;
}
.user-chip span{ font-size:14px; font-weight:600; }
.user-chip svg{ width:13px; height:13px; color:var(--muted); }

.user-menu{
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:0 16px 32px rgba(58,46,57,0.14);
  width:190px;
  padding:8px;
  display:none;
  z-index: 9999;
  opacity: 1;
}
.user-chip.open .user-menu{ display:block; }
.user-menu a{
  display:block;
  padding:9px 12px;
  border-radius:9px;
  font-size:14px;
  font-weight:600;
  color:var(--plum);
}
.user-menu a:hover{ background:var(--cream); }
.user-menu a.danger{ color:var(--pink-deep); }
.user-menu hr{ border:none; border-top:1px solid var(--line); margin:6px 0; }

/* ---- Nav menu row ---- */
nav.mainnav{
  border-top:1px solid var(--line);
}
.nav-inner{
  max-width:1200px;
  margin:0 auto;
  padding:0 24px;
  display:flex;
  align-items:center;
  gap:4px;
  /*overflow-x:auto;*/
}
.nav-item{ position:relative; }
.nav-link{
  display:flex; align-items:center; gap:5px;
  padding:14px 14px;
  font-size:14px;
  font-weight:600;
  color:var(--plum);
  white-space:nowrap;
  border-bottom:2.5px solid transparent;
}
.nav-link svg{ width:11px; height:11px; margin-top:1px; }
.nav-item:hover .nav-link, .nav-link.active{
  color:var(--pink-deep);
  border-bottom-color:var(--pink-deep);
}
.nav-link .chev{ transition:transform .15s ease; }
.nav-item.open .nav-link .chev{ transform:rotate(180deg); }
.dropdown{
  position:absolute;
  top:100%; left:0;
  background:var(--white);
  border:1px solid var(--line);
  border-radius:14px;
  box-shadow:0 18px 36px rgba(58,46,57,0.14);
  padding:10px;
  min-width:220px;
  display:none;
  grid-template-columns:1fr 1fr;
  gap:2px;
  z-index:60;
}
.nav-item:hover .dropdown, .nav-item.open .dropdown{ display:grid; }
.dropdown a{
  padding:8px 10px;
  border-radius:8px;
  font-size:13.5px;
  font-weight:500;
  color:var(--plum);
}
.dropdown a:hover{ background:var(--cream); color:var(--pink-deep); }

/* ================= MAIN ================= */
main{
  max-width:1140px;
  margin:0 auto;
  padding:40px 24px 80px;
}

.page-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:28px;
  flex-wrap:wrap;
}
.page-head h1{
  font-family:'Fredoka', sans-serif;
  font-weight:600;
  font-size:24px;
}
.page-head p{
  color:var(--muted);
  font-size:14.5px;
  margin-top:6px;
  max-width:480px;
}
.btn-ask{
  display:inline-flex; align-items:center; gap:8px;
  padding:12px 20px;
  border:none;
  border-radius:12px;
  background:linear-gradient(120deg, var(--pink-deep), var(--pink));
  color:var(--white);
  font-family:'Fredoka', sans-serif;
  font-weight:600;
  font-size:14.5px;
  cursor:pointer;
  box-shadow:0 10px 20px rgba(232,93,117,0.28);
  flex-shrink:0;
}
.btn-ask svg{ width:16px; height:16px; }
.btn-ask:hover{ transform:translateY(-1px); }

.toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:24px;
}

.filters{
  display:flex;
  gap:9px;
  flex-wrap:wrap;
  margin-bottom:26px;
}
.chip{
  padding:8px 16px;
  border-radius:999px;
  border:1.5px solid var(--line);
  background:var(--white);
  font-size:13.5px;
  font-weight:600;
  color:var(--muted);
  cursor:pointer;
}
.chip.active{
  background:var(--plum);
  border-color:var(--plum);
  color:var(--white);
}
.chip:hover:not(.active){ border-color:var(--pink); color:var(--pink-deep); }
.sort-wrap{ position:relative; }
.sort-wrap select{
  appearance:none;
  padding:9px 38px 9px 16px;
  border-radius:999px;
  border:1.5px solid var(--line);
  background:var(--white);
  font-family:'Quicksand', sans-serif;
  font-size:13.5px;
  font-weight:600;
  color:var(--plum);
  cursor:pointer;
  outline:none;
}
.sort-wrap svg{
  position:absolute; right:14px; top:50%; transform:translateY(-50%);
  width:12px; height:12px; color:var(--muted); pointer-events:none;
}
.name-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
  gap:16px;
}

.name-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:18px;
  padding:22px;
  position:relative;
  transition:box-shadow .15s ease, transform .15s ease;
}
.name-card:hover{ box-shadow:0 14px 28px rgba(58,46,57,0.08); transform:translateY(-1px); }
.heart-btn{
  position:absolute;
  top:16px; right:16px;
  width:34px; height:34px;
  border-radius:50%;
  border:none;
  background:#FFE0E7;
  color:var(--pink-deep);
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
}
.heart-btn svg{ width:16px; height:16px; }
/*.heart-btn:hover{ background:#FFE0E7; }*/
.gender-tag{
  display:inline-block;
  font-size:11px;
  font-weight:700;
  letter-spacing:0.4px;
  text-transform:uppercase;
  padding:4px 10px;
  border-radius:999px;
  margin-bottom:12px;
}
.tag-boy{ background:#E8F2FA; color:var(--blue-deep); }
.tag-girl{ background:#FFEFF2; color:var(--pink-deep); }
.tag-unisex{ background:#FFF6E3; color:var(--gold-deep); }

.name-card h3{
  font-family:'Fredoka', sans-serif;
  font-weight:600;
  font-size:24px;
  margin-bottom:6px;
  padding-right:30px;
}
.name-card .meaning{
  font-size:13.5px;
  color:var(--plum);
  line-height:1.5;
  margin-bottom:14px;
}
.name-card .meaning strong{ color:var(--muted); font-weight:700; }

.name-card .card-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-top:14px;
  border-top:1px solid var(--line);
  font-size:12.5px;
  color:var(--muted);
}
.name-card .origin{ font-weight:600; }
.name-card .view-link{ font-weight:700; color:var(--pink-deep); }
.name-card .view-link:hover{ text-decoration:underline; }

/* Empty state */
.empty-state{
  display:none;
  text-align:center;
  padding:70px 24px;
  background:var(--white);
  border:1px dashed var(--line);
  border-radius:20px;
}
.empty-state.show{ display:block; }
.empty-state .empty-icon{
  width:60px; height:60px; border-radius:16px;
  background:var(--cream);
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 18px;
}
.empty-state .empty-icon svg{ width:28px; height:28px; color:var(--pink-deep); }
.empty-state h3{ font-family:'Fredoka', sans-serif; font-weight:600; font-size:19px; margin-bottom:8px; }
.empty-state p{ color:var(--muted); font-size:14px; max-width:340px; margin:0 auto; }

@media (max-width:520px){
  .toolbar{ flex-direction:column; align-items:stretch; }
  .name-grid{ grid-template-columns:1fr; }
}

.qlist{ display:flex; flex-direction:column; gap:14px; }

.qcard{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:18px;
  padding:20px 22px;
  display:flex;
  gap:16px;
  transition:box-shadow .15s ease, transform .15s ease;
}
.qcard:hover{
  box-shadow:0 14px 28px rgba(58,46,57,0.08);
  transform:translateY(-1px);
}
.question-card{
    background:var(--white);
    border:1px solid var(--line);
    border-radius:20px;
    padding:26px 28px;
    display:flex;
    gap:18px;
    margin-bottom:26px;
  }
.vote{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  width:44px;
  flex-shrink:0;
  padding-top:2px;
}
.vote button{
  width:28px; height:28px;
  border-radius:8px;
  border:1px solid var(--line);
  background:var(--cream);
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  color:var(--muted);
}
.vote button:hover{ border-color:var(--pink); color:var(--pink-deep); }
.vote button svg{ width:13px; height:13px; }
.vote .count{
  font-family:'Fredoka', sans-serif;
  font-weight:600;
  font-size:14px;
  padding:2px 0;
}
.question-card h1{ font-family:'Fredoka', sans-serif; font-weight:600; font-size:23px; line-height:1.32; margin-bottom:14px; }
.question-card .body-text{ font-size:15px; line-height:1.65; color:var(--plum); margin-bottom:18px; }
.question-card .body-text p + p{ margin-top:12px; }

.qbody{ flex:1; min-width:0; }
.qtag{
  display:inline-block;
  font-size:11.5px;
  font-weight:700;
  letter-spacing:0.4px;
  text-transform:uppercase;
  padding:4px 10px;
  border-radius:999px;
  margin-bottom:9px;
}
.tag-boy{ background:#E8F2FA; color:var(--blue-deep); }
.tag-girl{ background:#FFEFF2; color:var(--pink-deep); }
.tag-meaning{ background:#FFF6E3; color:var(--gold-deep); }
.tag-tradition{ background:#EAF6EF; color:var(--good); }

.qbody h3{
  font-family:'Fredoka', sans-serif;
  font-weight:600;
  font-size:17.5px;
  line-height:1.35;
  margin-bottom:7px;
}
.qbody h3 a:hover{ color:var(--pink-deep); }
.qbody p.excerpt{
  color:var(--muted);
  font-size:14px;
  line-height:1.55;
  margin-bottom:14px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.qmeta{
  display:flex;
  align-items:center;
  gap:18px;
  flex-wrap:wrap;
  font-size:13px;
  color:var(--muted);
}
.qmeta .asker{
  display:flex; align-items:center; gap:7px;
  font-weight:600;
  color:var(--plum);
}
.qmeta .mini-avatar{
  width:22px; height:22px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  color:var(--white); font-family:'Fredoka', sans-serif; font-weight:600; font-size:10.5px;
}

.qmeta .stat{
  display:flex; align-items:center; gap:5px;
}
.qmeta .stat svg{ width:14px; height:14px; }
.qmeta .stat.answered{ color:var(--good); font-weight:700; }

.load-more{
  display:block;
  margin:32px auto 0;
  padding:12px 28px;
  border-radius:12px;
  border:1.5px solid var(--line);
  background:var(--white);
  font-weight:700;
  font-size:14px;
  color:var(--plum);
  cursor:pointer;
}
.load-more:hover{ border-color:var(--pink); color:var(--pink-deep); }

.breadcrumb{ font-size:13.5px; color:var(--muted); margin-bottom:18px; }
.breadcrumb a{ font-weight:700; color:var(--pink-deep); }

.page-head{ margin-bottom:28px; }
/*.page-head h1{ font-family:'Fredoka', sans-serif; font-weight:600; font-size:28px; }*/
.page-head p{ color:var(--muted); font-size:14.5px; margin-top:6px; }

.form-panel{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:20px;
  padding:30px 30px 32px;
}

.field{ margin-bottom:24px; }
.field-top{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:8px; }
.field label{ font-size:14px; font-weight:700; color:var(--plum); }
.field .optional{ font-size:12px; color:var(--muted); font-weight:600; }
.char-count{ font-size:12px; color:var(--muted); font-weight:600; }
.char-count.warn{ color:var(--gold-deep); }
.char-count.bad{ color:var(--bad); }

.field input[type="text"],
.field input,
.field select,
.field textarea{
  width:100%;
  padding:13px 16px;
  border-radius:14px;
  border:2px solid var(--line);
  background:#FFFCF9;
  font-family:'Quicksand', sans-serif;
  font-size:15px;
  font-weight:500;
  color:var(--plum);
  outline:none;
  transition:border-color .15s ease, background .15s ease;
}
.field textarea{ resize:vertical; min-height:140px; line-height:1.55; }
.field input::placeholder, .field textarea::placeholder{ color:#C9BCC2; }
.field input:focus, .field select:focus, .field textarea:focus{ border-color:var(--pink); background:var(--white); }
.field select{ cursor:pointer; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B7E89' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 16px center; background-size:15px; padding-right:44px; }

.field.invalid input, .field.invalid select, .field.invalid textarea{
  border-color:var(--bad);
  background:#FFF6F7;
}
.error-msg{
  display:none;
  align-items:center;
  gap:6px;
  font-size:12.5px;
  font-weight:600;
  color:var(--bad);
  margin-top:7px;
}
.error-msg svg{ width:14px; height:14px; flex-shrink:0; }
.field.invalid .error-msg{ display:flex; }

.hint{ font-size:12.5px; color:var(--muted); margin-top:7px; }

.tag-input-wrap{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  padding:9px 10px;
  border-radius:14px;
  border:2px solid var(--line);
  background:#FFFCF9;
}
.tag-input-wrap:focus-within{ border-color:var(--pink); background:var(--white); }
.tag-chip{
  display:flex; align-items:center; gap:6px;
  background:#FFEFF2;
  color:var(--pink-deep);
  font-size:13px;
  font-weight:700;
  padding:5px 6px 5px 12px;
  border-radius:999px;
}
.tag-chip button{
  width:16px; height:16px;
  border:none; background:rgba(232,93,117,0.18);
  border-radius:50%;
  color:var(--pink-deep);
  cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  font-size:11px;
  line-height:1;
}
.tag-input-wrap input{
  border:none; outline:none; background:none;
  flex:1; min-width:120px;
  padding:6px 4px;
  font-family:'Quicksand', sans-serif;
  font-size:14px;
  font-weight:500;
  color:var(--plum);
}

.actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:12px;
  margin-top:8px;
}
.btn-cancel{
  padding:13px 22px;
  border-radius:14px;
  border:1.5px solid var(--line);
  background:var(--white);
  font-weight:700;
  font-size:14.5px;
  color:var(--muted);
  cursor:pointer;
}
.btn-cancel:hover{ border-color:var(--pink); color:var(--pink-deep); }
.btn-submit{
  padding:13px 26px;
  border:none;
  border-radius:14px;
  background:linear-gradient(120deg, var(--pink-deep), var(--pink));
  color:var(--white);
  font-family:'Fredoka', sans-serif;
  font-weight:600;
  font-size:15px;
  cursor:pointer;
  box-shadow:0 10px 20px rgba(232,93,117,0.28);
}
.btn-submit:hover{ transform:translateY(-1px); }
.btn-submit:disabled{ cursor:default; opacity:0.75; transform:none; }
  .btn-submit{ display:inline-flex; align-items:center; justify-content:center; gap:9px; }
  .btn-submit .spinner{
    width:15px; height:15px;
    border-radius:50%;
    border:2px solid rgba(255,255,255,0.4);
    border-top-color:var(--white);
    display:none;
    animation:spin .7s linear infinite;
  }
  .btn-submit.loading .spinner{ display:inline-block; }
  @keyframes spin{ to{ transform:rotate(360deg); } }

  .submit-error-msg{
    display:none;
    align-items:center;
    gap:10px;
    background:#FFF6F7;
    border:1.5px solid #F6C6CD;
    color:var(--bad);
    font-size:13.5px;
    font-weight:600;
    padding:12px 16px;
    border-radius:12px;
    margin-top:18px;
  }
  .submit-error-msg.show{ display:flex; }
  .submit-error-msg svg{ width:18px; height:18px; flex-shrink:0; }

.form-error-banner{
  display:none;
  align-items:center;
  gap:10px;
  background:#FFF6F7;
  border:1.5px solid #F6C6CD;
  color:var(--bad);
  font-size:13.5px;
  font-weight:600;
  padding:12px 16px;
  border-radius:12px;
  margin-bottom:22px;
}
.form-error-banner.show{ display:flex; }
.form-error-banner svg{ width:18px; height:18px; flex-shrink:0; }

/* Success state */
.success-panel{ display:none; text-align:center; padding:56px 30px; }
.success-panel.show{ display:block; }
.form-panel.hidden{ display:none; }
.success-icon{
  width:64px; height:64px; border-radius:18px;
  background:#E6F4EC;
  display:flex; align-items:center; justify-content:center;
  margin:0 auto 20px;
}
.success-icon svg{ width:30px; height:30px; }
.success-panel h2{ font-family:'Fredoka', sans-serif; font-weight:600; font-size:20px; margin-bottom:8px; }
.success-panel p{ color:var(--muted); font-size:14.5px; margin-bottom:26px; }

/* ---- Answers ---- */
.answers-head{
  display:flex; align-items:baseline; justify-content:space-between;
  margin-bottom:16px;
}
.answers-head h2{ font-family:'Fredoka', sans-serif; font-weight:600; font-size:19px; }
.answers-head span{ font-size:13px; color:var(--muted); font-weight:600; }

.answer-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:18px;
  padding:20px 22px;
  display:flex;
  gap:16px;
  margin-bottom:14px;
}
.answer-card.best{ border-color:#BFE3CE; background:#F6FBF8; }
.answer-card .vote button{ width:26px; height:26px; }
.answer-card .vote .count{ font-size:14px; }

.answer-body{ flex:1; min-width:0; }
.best-badge{
  display:inline-flex; align-items:center; gap:6px;
  background:var(--good); color:var(--white);
  font-size:11px; font-weight:700; letter-spacing:0.3px; text-transform:uppercase;
  padding:4px 10px; border-radius:999px;
  margin-bottom:10px;
}
.best-badge svg{ width:11px; height:11px; }

.answer-top{ display:flex; align-items:center; gap:9px; margin-bottom:10px; font-size:13.5px; }
.answer-top .mini-avatar{ width:26px; height:26px; border-radius:50%; display:flex; align-items:center; justify-content:center; color:var(--white); font-family:'Fredoka', sans-serif; font-weight:600; font-size:11.5px; }
.answer-top .name{ font-weight:700; }
.answer-top .time{ color:var(--muted); }

.answer-text{ font-size:14.5px; line-height:1.6; color:var(--plum); }

/* ---- Reply form ---- */
.reply-panel{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:20px;
  padding:26px 28px 28px;
  margin-top:28px;
}
.reply-panel h2{ font-family:'Fredoka', sans-serif; font-weight:600; font-size:19px; margin-bottom:6px; }
.reply-panel > p.sub{ color:var(--muted); font-size:13.5px; margin-bottom:18px; }

.field{ margin-bottom:8px; }
.field-top{ display:flex; align-items:baseline; justify-content:space-between; margin-bottom:8px; }
.char-count{ font-size:12px; color:var(--muted); font-weight:600; }
.char-count.warn{ color:var(--gold-deep); }
.char-count.bad{ color:var(--bad); }

.field textarea{
  width:100%;
  padding:14px 16px;
  border-radius:14px;
  border:2px solid var(--line);
  background:#FFFCF9;
  font-family:'Quicksand', sans-serif;
  font-size:15px;
  font-weight:500;
  color:var(--plum);
  outline:none;
  resize:vertical;
  min-height:120px;
  line-height:1.55;
  transition:border-color .15s ease, background .15s ease;
}
.field textarea::placeholder{ color:#C9BCC2; }
.field textarea:focus{ border-color:var(--blue); background:var(--white); }
.field.invalid textarea{ border-color:var(--bad); background:#FFF6F7; }

.error-msg{
  display:none; align-items:center; gap:6px;
  font-size:12.5px; font-weight:600; color:var(--bad);
  margin-top:8px;
}
.error-msg svg{ width:14px; height:14px; flex-shrink:0; }
.field.invalid .error-msg{ display:flex; }

.reply-actions{
  display:flex; align-items:center; justify-content:space-between;
  margin-top:16px;
  flex-wrap:wrap;
  gap:12px;
}
.reply-hint{ font-size:12.5px; color:var(--muted); }
.btn-submit{
  padding:12px 24px;
  border:none;
  border-radius:14px;
  background:linear-gradient(120deg, var(--blue-deep), var(--blue));
  color:var(--white);
  font-family:'Fredoka', sans-serif;
  font-weight:600;
  font-size:14.5px;
  cursor:pointer;
  box-shadow:0 10px 20px rgba(95,168,204,0.3);
}
.btn-submit:hover{ transform:translateY(-1px); }

.posted-toast{
  display:none;
  align-items:center; gap:9px;
  background:#EAF6EF; color:var(--good);
  font-size:13.5px; font-weight:700;
  padding:11px 16px; border-radius:12px;
  margin-top:16px;
}
.posted-toast.show{ display:flex; }
.posted-toast svg{ width:16px; height:16px; }
/* Profile Section */
.layout{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:24px;
  align-items:start;
}

/* ---- Sidebar summary card ---- */
.summary-card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:20px;
  padding:28px 24px;
  text-align:center;
}
.big-avatar{
  width:88px; height:88px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--pink), var(--blue));
  display:flex; align-items:center; justify-content:center;
  color:var(--white);
  font-family:'Fredoka', sans-serif;
  font-weight:600;
  font-size:30px;
  margin:0 auto 14px;
  position:relative;
}
.avatar-edit{
  position:absolute;
  bottom:-2px; right:-2px;
  width:30px; height:30px;
  border-radius:50%;
  background:var(--white);
  border:2px solid var(--cream);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  color:var(--pink-deep);
  box-shadow:0 4px 10px rgba(58,46,57,0.14);
}
.avatar-edit svg{ width:14px; height:14px; }

.summary-card h2{ font-family:'Fredoka', sans-serif; font-weight:600; font-size:19px; margin-bottom:3px; }
.summary-card .member-since{ font-size:13px; color:var(--muted); margin-bottom:22px; }
.stat-row{
  display:flex;
  justify-content:space-between;
  padding:16px 4px;
  border-top:1px solid var(--line);
}
.stat-row:last-of-type{ border-bottom:1px solid var(--line); margin-bottom:20px; }
.stat-block h3{ font-family:'Fredoka', sans-serif; font-weight:600; font-size:20px; }
.stat-block p{ font-size:11.5px; color:var(--muted); font-weight:600; text-transform:uppercase; letter-spacing:0.3px; margin-top:2px; }

.sidebar-links{ display:flex; flex-direction:column; gap:6px; }
.sidebar-links a{
  display:flex; align-items:center; gap:10px;
  padding:11px 12px;
  border-radius:11px;
  font-size:14px;
  font-weight:600;
  color:var(--plum);
}
.sidebar-links a svg{ width:16px; height:16px; color:var(--muted); flex-shrink:0; }
.sidebar-links a:hover{ background:var(--cream); }
.sidebar-links a.danger{ color:var(--pink-deep); }
.sidebar-links a.danger svg{ color:var(--pink-deep); }

/* ---- Right form panel ---- */
.panel-stack{ display:flex; flex-direction:column; gap:20px; }

.form-panel h3{ font-family:'Fredoka', sans-serif; font-weight:600; font-size:18px; margin-bottom:4px; }
.form-panel > p.sub{ color:var(--muted); font-size:13.5px; margin-bottom:22px; }
.name-row{ display:flex; gap:14px; }
.name-row .field{ flex:1; }
.char-count{ font-size:12px; color:var(--muted); font-weight:600; text-align:right; margin-top:6px; }
.form-actions{ display:flex; justify-content:flex-end; gap:12px; margin-top:6px; }
.btn-secondary{
  padding:12px 20px;
  border-radius:13px;
  border:1.5px solid var(--line);
  background:var(--white);
  font-weight:700;
  font-size:14px;
  color:var(--muted);
  cursor:pointer;
}
.btn-secondary:hover{ border-color:var(--pink); color:var(--pink-deep); }
.btn-primary{
  padding:12px 24px;
  border:none;
  border-radius:13px;
  background:linear-gradient(120deg, var(--pink-deep), var(--pink));
  color:var(--white);
  font-family:'Fredoka', sans-serif;
  font-weight:600;
  font-size:14.5px;
  cursor:pointer;
  box-shadow:0 10px 20px rgba(232,93,117,0.28);
}
.btn-primary:hover{ transform:translateY(-1px); }

.saved-toast{
  display:none; align-items:center; gap:9px;
  background:#EAF6EF; color:var(--good);
  font-size:13.5px; font-weight:700;
  padding:11px 16px; border-radius:12px;
  margin-top:16px;
}
.saved-toast.show{ display:flex; }
.saved-toast svg{ width:16px; height:16px; }

/* Password row */
.password-row{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; flex-wrap:wrap;
}
.password-row .info p:first-child{ font-weight:700; font-size:14.5px; }
.password-row .info p:last-child{ font-size:13px; color:var(--muted); margin-top:2px; }

.btn-outline{
  padding:13px 24px;
  border-radius:14px;
  border:1.5px solid var(--line);
  background:var(--white);
  color:var(--plum);
  font-weight:700;
  font-size:14.5px;
  cursor:pointer;
}
.btn-outline:hover{ border-color:var(--pink); color:var(--pink-deep); }

.help-links{
  margin-top:34px;
  font-size:13px;
  color:var(--muted);
}
.help-links a{
  font-weight:700;
  color:var(--blue-deep);
}
.help-links a:hover{ text-decoration:underline; }

.toggle-visibility{
    position:absolute; right:14px; top:50%; transform:translateY(-50%);
    background:none; border:none; cursor:pointer; padding:4px;
    color:var(--muted); display:flex;
  }
  .toggle-visibility svg{ width:18px; height:18px; }
  .toggle-visibility:hover{ color:var(--blue-deep); }

  .strength{ margin-top:10px; }
  .strength-bars{ display:flex; gap:5px; margin-bottom:6px; }
  .strength-bars span{ height:5px; flex:1; border-radius:3px; background:var(--line); transition:background .2s ease; }
  .strength-label{ font-size:12.5px; color:var(--muted); font-weight:600; }

  .checklist{ list-style:none; margin:12px 0 0; display:flex; flex-direction:column; gap:6px; }
  .checklist li{ display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--muted); }
  .checklist li svg{ width:15px; height:15px; flex-shrink:0; color:var(--line); transition:color .15s ease; }
  .checklist li.met{ color:var(--good); }
  .checklist li.met svg{ color:var(--good); }

  .match-msg{ font-size:12.5px; font-weight:600; margin-top:7px; min-height:16px; }
  .match-msg.good{ color:var(--good); }
  .match-msg.bad{ color:var(--bad); }

  .divider-line{ height:1px; background:var(--line); margin:24px 0; }

.success-toast{
    display:none; align-items:center; gap:9px;
    background:#EAF6EF; color:var(--good);
    font-size:13.5px; font-weight:700;
    padding:11px 16px; border-radius:12px;
    margin-top:18px;
  }
  .success-toast.show{ display:flex; }
  .success-toast svg{ width:16px; height:16px; }
  .google-btn{
      display:inline-flex;
      align-items:center;
      gap:12px;
      padding:12px 24px;
      background:#fff;
      color:#3c4043;
      border:1px solid #dadce0;
      border-radius:6px;
      text-decoration:none;
      font-family:Arial,sans-serif;
      font-size:16px;
      font-weight:500;
      transition:.2s;
  }

  .google-btn:hover{
      background:#f8f9fa;
      box-shadow:0 1px 3px rgba(0,0,0,.2);
  }

  .google-btn img{
      width:20px;
      height:20px;
  }
  .heart-btn{
      position:absolute;
      top:16px; right:16px;
      width:32px; height:32px;
      border-radius:50%;
      border:none;
      background:#FFE0E7;
      color:var(--pink-deep);
      cursor:pointer;
      display:flex; align-items:center; justify-content:center;
      /*transition:background .15s ease, color .15s ease;*/
    }
    /*.heart-btn:hover{ background:#FFEFF2; color:var(--pink-deep); }*/
    .heart-btn svg{ width:15px; height:15px; }
    .heart-btn.liked{ background:#FFE0E7; color:var(--pink-deep); }
    .heart-btn.liked svg{ fill:currentColor; animation:heartPop .3s ease; }
    .heart-btn.loading{ opacity:0.55; pointer-events:none; }
    @keyframes heartPop{
      0%{ transform:scale(1); }
      45%{ transform:scale(1.28); }
      100%{ transform:scale(1); }
    }
    @media (prefers-reduced-motion: reduce){
      .heart-btn.liked svg{ animation:none; }
    }


@media (max-width:820px){
  .layout{ grid-template-columns:1fr; }
}
@media (max-width:520px){
  .name-row{ flex-direction:column; gap:0; }
  .form-panel{ padding:20px; }
  .form-actions{ flex-direction:column-reverse; }
  .btn-secondary, .btn-primary{ width:100%; text-align:center; }
}

@media (min-width:640px){
  .header-search{ display:block; }
}
@media (max-width:640px){
  .page-head{ flex-direction:column; }
  .qcard{ padding:16px; gap:12px; }
  .qmeta{ gap:12px; }
  .form-panel{ padding:22px; }
  .actions{ flex-direction:column-reverse; align-items:stretch; }
  .btn-cancel, .btn-submit{ width:100%; text-align:center; }
  .question-card{ padding:18px; gap:12px; }
  .reply-panel{ padding:20px; }
  .reply-actions{ flex-direction:column-reverse; align-items:stretch; }
  .btn-submit{ width:100%; }
}
@media (max-width:480px){
  .search-row{ flex-direction:column; }
  .search-row button{ padding:13px; }
  .tile{ width:52px; height:52px; font-size:24px; border-radius:13px; }
  .tile-row{ gap:10px; }
}
