/* ─── RYSC — Raise Your Score — Main Stylesheet ─────────────────────────── */
:root {
  --teal:   #1FA896;
  --td:     #177A6E;
  --tl:     #EBF8F6;
  --gold:   #F0A500;
  --gd:     #C98C00;
  --gl:     #FFFBF0;
  --bg:     #F9FAFA;
  --card:   #FFFFFF;
  --text:   #1C2321;
  --muted:  #8A9896;
  --border: #E8EDED;
  --danger: #D94F4F;
  --sh:     0 2px 10px rgba(0,0,0,.06);
  --sh2:    0 8px 32px rgba(0,0,0,.10);
  --r:      10px;
  --nh:     56px;
  --f:      -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--f); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
nav {
  background: var(--teal);
  height: var(--nh);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.nav-logo {
  font-weight: 900; font-size: 1.5rem; color: #fff;
  letter-spacing: .04em; text-decoration: none;
}
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a {
  color: #fff; text-decoration: none; font-weight: 600;
  font-size: .88rem; letter-spacing: .06em; text-transform: uppercase;
  opacity: .9; transition: opacity .15s;
}
.nav-links a:hover { opacity: 1; text-decoration: none; }
.nav-notif { position: relative; }
.nav-notif-dot {
  position: absolute; top: -3px; right: -3px;
  width: 8px; height: 8px;
  background: var(--gold); border-radius: 50%; border: 2px solid var(--teal);
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
.wrap      { max-width: 680px; margin: 0 auto; padding: 36px 20px; }
.wrap-wide { max-width: 920px; margin: 0 auto; padding: 36px 20px; }
.pst { font-weight: 900; font-size: 1.4rem; letter-spacing: -.01em; margin-bottom: 6px; }
.pss { color: var(--muted); font-size: .88rem; margin-bottom: 24px; }
.sl  { font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.bc  { font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: 20px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.bc a { color: var(--teal); }
.bc span { opacity: .4; }
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.tm      { color: var(--muted); font-size: .84rem; }
.text-muted  { color: var(--muted); }
.mt-4  { margin-top: 4px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mt-24 { margin-top: 24px; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f); font-weight: 700; font-size: .8rem;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 10px 22px; border-radius: 50px;
  cursor: pointer; border: none; transition: all .18s; white-space: nowrap;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-teal  { background: var(--teal); color: #fff; }
.btn-teal:hover  { background: var(--td); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(31,168,150,.3); }
.btn-gold  { background: var(--gold); color: #fff; }
.btn-gold:hover  { background: var(--gd); }
.btn-outline { background: transparent; color: var(--teal); border: 2px solid var(--teal); padding: 8px 20px; }
.btn-outline:hover { background: var(--tl); }
.btn-white { background: #fff; color: var(--td); }
.btn-white:hover { background: var(--tl); }
.btn-ghost-white { background: rgba(255,255,255,.15); color: #fff; border: 2px solid rgba(255,255,255,.4); padding: 8px 20px; }
.btn-ghost-white:hover { background: rgba(255,255,255,.25); }
.btn-sm { padding: 7px 14px; font-size: .74rem; }
.btn-ghost {
  display: inline-flex; align-items: center;
  font-family: var(--f); font-weight: 700; font-size: .78rem;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 9px 18px; border-radius: 50px;
  cursor: pointer; border: 2px solid var(--border); background: transparent;
  color: var(--muted); transition: all .15s; text-decoration: none;
}
.btn-ghost:hover { border-color: var(--muted); color: var(--text); text-decoration: none; }
.btn-danger {
  display: inline-flex; align-items: center;
  font-family: var(--f); font-weight: 700; font-size: .78rem;
  letter-spacing: .07em; text-transform: uppercase;
  padding: 9px 18px; border-radius: 50px;
  cursor: pointer; border: 2px solid var(--danger); background: transparent;
  color: var(--danger); transition: all .15s;
}
.btn-danger:hover { background: var(--danger); color: #fff; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.fg { margin-bottom: 16px; }
.fl {
  display: block; font-size: .72rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 5px;
}
.fl-hint { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .72rem; }
.fi, .fta, .fs {
  width: 100%; padding: 10px 14px;
  border: 2px solid var(--border); border-radius: var(--r);
  font-family: var(--f); font-size: .93rem; color: var(--text);
  outline: none; transition: border-color .15s; background: #fff;
}
.fi:focus, .fta:focus, .fs:focus { border-color: var(--teal); }
.fta { resize: vertical; min-height: 90px; }
.fs {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238A9896'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px;
}
.fs:disabled { opacity: .38; cursor: not-allowed; }
.form-select { /* alias */ }
.form-textarea { width: 100%; padding: 10px 14px; border: 2px solid var(--border); border-radius: var(--r); font-family: var(--f); font-size: .93rem; color: var(--text); outline: none; resize: vertical; min-height: 100px; background: #fff; transition: border-color .15s; }
.form-textarea:focus { border-color: var(--teal); }
.char-count { text-align: right; font-size: .73rem; color: var(--muted); margin-top: 3px; }
.filter-select {
  padding: 7px 28px 7px 12px; border: 2px solid var(--border); border-radius: 50px;
  font-family: var(--f); font-size: .76rem; font-weight: 700; color: var(--text);
  background: #fff; outline: none; cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238A9896'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  letter-spacing: .04em; transition: border-color .15s;
}
.filter-select:focus { border-color: var(--teal); }

/* ── Alerts ───────────────────────────────────────────────────────────────── */
.alert { padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; font-size: .88rem; font-weight: 600; }
.alert-error { background: #FFF0F0; border: 1.5px solid #FFCCCC; color: var(--danger); }
.alert-ok    { background: #EEFAF7; border: 1.5px solid #B0E8DF; color: var(--td); }

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(150deg, var(--teal) 0%, #158A7A 100%);
  min-height: calc(100vh - var(--nh));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 60px 24px;
}
.hero-tag {
  display: inline-block; background: rgba(255,255,255,.15); color: rgba(255,255,255,.9);
  padding: 5px 16px; border-radius: 50px;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 { font-weight: 900; font-size: clamp(2.6rem,8vw,5rem); color: #fff; line-height: 1.0; margin-bottom: 18px; }
.hero h1 span { opacity: .65; }
.hero p { font-size: 1.08rem; color: rgba(255,255,255,.8); max-width: 420px; line-height: 1.65; margin-bottom: 36px; }
.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.hero-stats { display: flex; gap: 40px; margin-top: 56px; flex-wrap: wrap; justify-content: center; }
.hero-stat-num   { font-weight: 900; font-size: 2rem; color: #fff; }
.hero-stat-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.55); margin-top: 3px; }

/* ── Explore ──────────────────────────────────────────────────────────────── */
.explore-hero { text-align: center; margin-bottom: 28px; }
.explore-hero h2 { font-weight: 900; font-size: 2rem; margin-bottom: 4px; }
.search-row { display: flex; gap: 10px; margin-bottom: 28px; align-items: center; flex-wrap: wrap; }
.search-wrap { flex: 1; position: relative; min-width: 200px; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-input {
  width: 100%; padding: 12px 16px 12px 38px;
  border: 2px solid var(--border); border-radius: 50px;
  font-family: var(--f); font-size: .93rem; background: #fff; color: var(--text);
  outline: none; transition: border-color .15s;
}
.search-input:focus { border-color: var(--teal); }
.search-input::placeholder { color: var(--muted); }
.toggle-pill { display: flex; background: #fff; border: 2px solid var(--border); border-radius: 50px; overflow: hidden; }
.toggle-pill span {
  padding: 10px 14px; cursor: pointer; color: var(--muted); transition: all .15s;
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.toggle-pill span.active { background: var(--teal); color: #fff; }
.teal-bar {
  background: var(--teal); color: #fff; border-radius: var(--r); padding: 14px 20px;
  margin-bottom: 8px; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  transition: background .15s, transform .1s; font-weight: 700; font-size: .9rem;
  letter-spacing: .06em; text-transform: uppercase; text-decoration: none; user-select: none;
}
.teal-bar:hover { background: var(--td); transform: translateX(4px); text-decoration: none; color: #fff; }

/* ── Achievement Cards ────────────────────────────────────────────────────── */
.ac { border-radius: var(--r); overflow: hidden; margin-bottom: 12px; border: 1.5px solid var(--border); background: var(--card); box-shadow: var(--sh); transition: box-shadow .15s; }
.ac:hover { box-shadow: var(--sh2); }
.ach { padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; }
.ach.t { background: var(--teal); }
.ach.g { background: var(--gold); }
.achn { font-weight: 800; font-size: .93rem; letter-spacing: .06em; text-transform: uppercase; color: #fff; }
.achp { font-weight: 900; font-size: 1rem; color: #fff; white-space: nowrap; }
.acb  { padding: 16px 20px 18px; }
.acf  { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); margin-top: 10px; gap: 8px; flex-wrap: wrap; }
.type-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px; border-radius: 50px; margin-bottom: 10px; }
.type-badge.ms { background: #E8F4FD; color: #2980B9; }
.type-badge.cl { background: #EEF8EE; color: #27AE60; }
.type-badge.st { background: var(--tl); color: var(--td); }

/* ── Achievement Page ────────────────────────────────────────────────────── */
.ach-page-card { border-radius: var(--r); overflow: hidden; border: 1.5px solid var(--border); background: var(--card); box-shadow: var(--sh2); margin-bottom: 24px; }
.ach-page-header { padding: 16px 22px; display: flex; justify-content: space-between; align-items: center; }
.ach-page-name { font-weight: 900; font-size: 1.25rem; letter-spacing: .04em; text-transform: uppercase; color: #fff; }
.ach-page-pts  { font-weight: 900; font-size: 1.1rem; color: #fff; }
.ach-page-body { padding: 22px; }
.ach-page-desc { font-size: .96rem; color: var(--muted); line-height: 1.65; margin-bottom: 20px; }
.ach-story     { font-size: .95rem; color: var(--text); line-height: 1.72; margin-bottom: 10px; }
.ach-date      { font-size: .85rem; font-weight: 700; margin-bottom: 12px; }
.banner { width: 100%; height: 200px; overflow: hidden; background: linear-gradient(135deg, var(--teal), var(--td)); }
.banner img { width: 100%; height: 100%; object-fit: cover; }

/* ── Masonry Images ──────────────────────────────────────────────────────── */
.masonry { display: grid; gap: 4px; overflow: hidden; border-radius: 8px; margin-bottom: 18px; }
.masonry.n1 { grid-template-columns: 1fr; }
.masonry.n2 { grid-template-columns: 1fr 1fr; }
.masonry.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.masonry-img { overflow: hidden; cursor: pointer; background: var(--tl); transition: opacity .15s; }
.masonry-img:hover { opacity: .88; }
.masonry-img img   { width: 100%; height: 100%; object-fit: cover; display: block; }
.masonry.n1 .masonry-img { height: 240px; }
.masonry.n2 .masonry-img { height: 180px; }
.masonry.n3 .masonry-img:first-child { grid-row: span 2; height: 200px; }
.masonry.n3 .masonry-img:not(:first-child) { height: 97px; }

/* ── Social Bar ──────────────────────────────────────────────────────────── */
.social-bar { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-top: 1px solid var(--border); background: #FAFCFB; flex-wrap: wrap; }
.like-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f); font-weight: 700; font-size: .8rem; letter-spacing: .05em;
  padding: 7px 14px; border-radius: 50px; cursor: pointer;
  border: 2px solid var(--border); background: transparent; color: var(--muted);
  transition: all .18s;
}
.like-btn:hover { border-color: #E0727A; color: #E0727A; background: #FFF5F6; }
.like-btn.liked { border-color: #E0727A; color: #E0727A; background: #FFF5F6; }
.like-heart { display: inline-block; transition: transform .15s; }
.like-btn.liked .like-heart { animation: hpop .3s cubic-bezier(.34,1.56,.64,1); }
@keyframes hpop { 0%{transform:scale(1)} 50%{transform:scale(1.55)} 100%{transform:scale(1)} }
.share-btn {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--f); font-weight: 700; font-size: .8rem; letter-spacing: .05em;
  padding: 7px 14px; border-radius: 50px; cursor: pointer;
  border: 2px solid var(--border); background: transparent; color: var(--muted);
  transition: all .18s; position: relative;
}
.share-btn:hover { border-color: var(--teal); color: var(--teal); background: var(--tl); }
.share-dropdown {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 0;
  background: #fff; border: 1.5px solid var(--border); border-radius: 10px;
  box-shadow: var(--sh2); min-width: 180px; overflow: hidden; z-index: 50;
}
.share-dropdown.open { display: block; }
.share-opt { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-size: .86rem; font-weight: 600; cursor: pointer; transition: background .1s; white-space: nowrap; }
.share-opt:hover { background: var(--bg); }
.share-copied {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 0;
  background: var(--teal); color: #fff; font-size: .78rem; font-weight: 700;
  padding: 6px 14px; border-radius: 8px; white-space: nowrap; pointer-events: none;
}
.share-copied.show { display: block; animation: fup .2s ease; }
@keyframes fup { from{opacity:0;transform:translateY(4px)} to{opacity:1;transform:translateY(0)} }
.liked-by { font-size: .8rem; color: var(--muted); }

/* ── Milestone ───────────────────────────────────────────────────────────── */
.milestone-current {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--tl); border: 1.5px solid var(--teal); border-radius: var(--r);
  padding: 10px 14px; margin-top: 8px;
}
.milestone-current-text { font-size: .88rem; color: var(--td); font-weight: 600; }
.milestone-pts-badge { background: var(--teal); color: #fff; font-weight: 800; font-size: .82rem; padding: 3px 10px; border-radius: 50px; }

/* ── Checklist ───────────────────────────────────────────────────────────── */
.checklist-wrap { border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; margin: 12px 0; }
.checklist-header { background: #F0FAF9; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.checklist-header-text { font-weight: 700; font-size: .82rem; color: var(--td); }
.checklist-progress-text { font-size: .78rem; color: var(--muted); }
.progress-bar-wrap { height: 4px; background: var(--border); border-radius: 2px; margin-bottom: 8px; }
.progress-bar-fill { height: 100%; background: var(--teal); border-radius: 2px; transition: width .3s; }
.checklist-body { padding: 8px 0; }
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; transition: background .1s; cursor: pointer; }
.checklist-item:hover { background: var(--bg); }
.checklist-item input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--teal); cursor: pointer; flex-shrink: 0; pointer-events: none; }
.checklist-item-label { flex: 1; font-size: .88rem; color: var(--text); }
.checklist-item-label.done { text-decoration: line-through; color: var(--muted); }
.checklist-item-pts { font-size: .78rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.checklist-item-pts.done { color: var(--teal); }
.checklist-footer { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; background: #F9FAFA; }
.checklist-total { font-weight: 800; font-size: .84rem; color: var(--teal); }
.checklist-complete-badge { display: inline-flex; align-items: center; gap: 4px; background: var(--gold); color: #fff; font-weight: 800; font-size: .72rem; letter-spacing: .06em; padding: 3px 10px; border-radius: 50px; }

/* ── Profile ─────────────────────────────────────────────────────────────── */
.profile-header-card { background: var(--card); border: 1.5px solid var(--border); border-radius: 16px; padding: 24px; margin-bottom: 24px; box-shadow: var(--sh); }
.profile-top { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 16px; }
.avatar { width: 78px; height: 78px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 1.7rem; color: #fff; flex-shrink: 0; box-shadow: 0 4px 14px rgba(31,168,150,.25); }
.profile-info { flex: 1; }
.profile-name   { font-weight: 900; font-size: 1.4rem; letter-spacing: -.01em; }
.profile-handle { color: var(--teal); font-size: .92rem; font-weight: 600; margin: 2px 0 6px; }
.profile-bio    { color: var(--muted); font-size: .87rem; line-height: 1.55; }
.profile-action-btns { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.profile-stats-row { display: flex; gap: 20px; flex-wrap: wrap; padding-top: 14px; border-top: 1px solid var(--border); }
.profile-stat      { text-align: center; }
.profile-stat-num  { font-weight: 900; font-size: 1.25rem; }
.profile-stat-num.gold { color: var(--gold); }
.profile-stat-label { font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }

/* Follow button */
.fol-btn {
  font-family: var(--f); font-weight: 700; font-size: .78rem; letter-spacing: .07em; text-transform: uppercase;
  padding: 9px 20px; border-radius: 50px; cursor: pointer; transition: all .15s;
  border: 2px solid var(--teal); color: var(--teal); background: transparent;
}
.fol-btn:hover { background: var(--teal); color: #fff; }
.fol-btn.following { background: var(--teal); color: #fff; }
.fol-btn.following:hover { background: var(--danger); border-color: var(--danger); }

/* Three dots */
.three-dots-wrap { position: relative; }
.three-dots-btn  { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--border); background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--muted); transition: all .15s; font-family: var(--f); }
.three-dots-btn:hover { border-color: var(--muted); }
.dots-menu { display: none; position: absolute; right: 0; top: 44px; background: #fff; border: 1.5px solid var(--border); border-radius: 10px; box-shadow: var(--sh2); z-index: 50; min-width: 190px; overflow: hidden; }
.dots-menu.open { display: block; }
.dots-menu-item { padding: 11px 18px; font-size: .86rem; font-weight: 600; cursor: pointer; transition: background .1s; white-space: nowrap; }
.dots-menu-item:hover { background: var(--bg); }
.dots-menu-item.danger { color: var(--danger); }
.dots-menu-item.danger:hover { background: #FFF0F0; }

/* ── Featured Achievements ───────────────────────────────────────────────── */
.featured-title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.featured-title { font-weight: 800; font-size: .84rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.featured-hint  { font-size: .73rem; color: var(--muted); font-style: italic; }
.featured-list  { display: flex; flex-direction: column; gap: 10px; }
.featured-card {
  border-radius: var(--r); overflow: hidden; border: 2px solid var(--gold);
  background: var(--gl); cursor: pointer; transition: box-shadow .15s, transform .12s;
}
.featured-card:hover  { box-shadow: 0 4px 18px rgba(240,165,0,.22); transform: translateY(-1px); }
.featured-card.dragging { opacity: .45; }
.featured-card-head   { background: var(--gold); padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; }
.featured-card-name   { font-weight: 800; font-size: .85rem; letter-spacing: .05em; text-transform: uppercase; color: #fff; }
.featured-card-pts    { font-size: .8rem; font-weight: 700; color: rgba(255,255,255,.88); }
.featured-photos { background: var(--tl); }
.featured-photos .masonry { margin-bottom: 0; border-radius: 0; gap: 3px; }
.featured-photos .masonry.n1 .masonry-img { height: 160px; }
.featured-photos .masonry.n2 .masonry-img { height: 120px; }
.featured-photos .masonry.n3 .masonry-img:first-child { height: 130px; }
.featured-photos .masonry.n3 .masonry-img:not(:first-child) { height: 62px; }
.featured-card-body { padding: 10px 14px 12px; font-size: .85rem; color: var(--text); line-height: 1.5; display: flex; align-items: flex-start; gap: 8px; }
.featured-drag-handle { color: rgba(200,150,0,.5); font-size: 1.1rem; cursor: grab; flex-shrink: 0; margin-top: 1px; }
.featured-text  { flex: 1; }
.featured-card-date { font-size: .75rem; color: var(--muted); font-style: italic; margin-top: 4px; }

/* ── Completed List ──────────────────────────────────────────────────────── */
.completed-title   { font-weight: 800; font-size: .84rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.completed-filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.completed-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: var(--card); border: 1.5px solid var(--border);
  border-radius: var(--r); margin-bottom: 6px; text-decoration: none; color: var(--text);
  transition: background .12s, border-color .12s;
}
.completed-row:hover { background: var(--gl); border-color: var(--gold); text-decoration: none; color: var(--text); }
.completed-row-left { display: flex; align-items: center; gap: 10px; }
.completed-star { color: var(--gold); }
.completed-name { font-weight: 700; font-size: .87rem; letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.completed-meta { font-size: .74rem; color: var(--muted); margin-top: 1px; }
.completed-pts  { font-weight: 700; font-size: .84rem; color: var(--gold); }
.checklist-mini { font-size: .72rem; color: var(--teal); font-weight: 700; background: var(--tl); padding: 2px 7px; border-radius: 50px; white-space: nowrap; }
.milestone-mini { font-size: .72rem; color: #2980B9; font-weight: 700; background: #E8F4FD; padding: 2px 7px; border-radius: 50px; white-space: nowrap; }

/* ── Notifications ───────────────────────────────────────────────────────── */
.notif-controls  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.notif-clear-all {
  font-family: var(--f); font-weight: 700; font-size: .76rem; letter-spacing: .07em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 50px; cursor: pointer;
  border: 2px solid var(--border); background: transparent; color: var(--muted);
  transition: all .15s;
}
.notif-clear-all:hover { border-color: var(--danger); color: var(--danger); }
.notif-item {
  display: flex; align-items: flex-start; gap: 12px;
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--r);
  padding: 13px 16px; transition: opacity .25s, max-height .3s, margin .25s, padding .25s, border-width .25s;
  overflow: hidden;
}
.notif-item.unread { border-left: 3px solid var(--teal); }
.notif-item.dismissing { opacity: 0; max-height: 0 !important; padding-top: 0; padding-bottom: 0; margin: 0; border-width: 0; }
.notif-list { display: flex; flex-direction: column; gap: 8px; }
.notif-icon   { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.notif-body   { flex: 1; }
.notif-text   { font-size: .88rem; line-height: 1.55; }
.nlink        { color: var(--teal); font-weight: 700; cursor: pointer; }
.nlink:hover  { text-decoration: underline; }
.nlink.gold   { color: var(--gd); }
.notif-time   { font-size: .73rem; color: var(--muted); margin-top: 3px; }
.notif-unread-dot { width: 8px; height: 8px; background: var(--teal); border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.notif-dismiss {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 1rem; padding: 0 0 0 4px; line-height: 1; transition: color .12s;
  font-family: var(--f); flex-shrink: 0; margin-top: 1px;
}
.notif-dismiss:hover { color: var(--danger); }
.notif-empty { text-align: center; padding: 48px 20px; color: var(--muted); font-size: .9rem; font-style: italic; }

/* ── User Cards (Explore) ────────────────────────────────────────────────── */
.user-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 14px 16px; margin-bottom: 8px; transition: box-shadow .12s; }
.user-card:hover { box-shadow: var(--sh); }
.user-card-avatar { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; color: #fff; flex-shrink: 0; }
.user-card-name   { font-weight: 700; font-size: .93rem; }
.user-card-handle { font-size: .78rem; color: var(--teal); font-weight: 600; }
.user-card-actions { display: flex; align-items: center; gap: 8px; }
.fol-sm {
  font-family: var(--f); font-weight: 700; font-size: .73rem; letter-spacing: .07em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 50px; cursor: pointer; transition: all .15s;
  border: 2px solid var(--teal); color: var(--teal); background: transparent;
}
.fol-sm:hover { background: var(--teal); color: #fff; }
.fol-sm.following { background: var(--teal); color: #fff; }
.fol-sm.following:hover { background: var(--danger); border-color: var(--danger); }

/* ── Auth ────────────────────────────────────────────────────────────────── */
.auth-wrap  { display: flex; align-items: center; justify-content: center; min-height: calc(100vh - var(--nh)); padding: 24px; }
.auth-card  { background: var(--card); border: 1.5px solid var(--border); border-radius: 16px; padding: 32px; width: 100%; max-width: 420px; box-shadow: var(--sh2); }
.auth-logo  { text-align: center; margin-bottom: 24px; }
.auth-logo a { font-weight: 900; font-size: 2rem; color: var(--teal); text-decoration: none; }
.auth-tabs  { display: flex; background: var(--bg); border: 2px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 24px; }
.auth-tab   { flex: 1; padding: 10px; text-align: center; font-weight: 700; font-size: .84rem; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; color: var(--muted); transition: all .15s; border: none; background: transparent; font-family: var(--f); }
.auth-tab.active { background: var(--teal); color: #fff; }
.auth-form.hidden { display: none; }

/* ── Modals ──────────────────────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 16px; padding: 28px; max-width: 500px; width: 100%; box-shadow: var(--sh2); max-height: 90vh; overflow-y: auto; }
.modal-title { font-weight: 900; font-size: 1.2rem; margin-bottom: 4px; }
.modal-sub   { color: var(--muted); font-size: .84rem; margin-bottom: 22px; }
.modal-btns  { display: flex; gap: 8px; margin-top: 20px; justify-content: flex-end; flex-wrap: wrap; }

/* Image upload slots */
.img-upload-slots { display: flex; gap: 8px; margin-top: 8px; }
.img-slot         { width: 90px; height: 72px; border-radius: 8px; overflow: hidden; position: relative; }
.img-slot img     { width: 100%; height: 100%; object-fit: cover; }
.img-slot-empty   { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px dashed var(--border); border-radius: 8px; cursor: pointer; color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; transition: all .15s; gap: 3px; }
.img-slot-empty:hover  { border-color: var(--teal); color: var(--teal); background: var(--tl); }
.img-slot-empty .plus  { font-size: 1.3rem; line-height: 1; }
.img-slot-replace      { position: absolute; bottom: 4px; right: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: .65rem; padding: 2px 6px; border-radius: 4px; cursor: pointer; }

/* Lightbox */
.lightbox       { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 300; align-items: center; justify-content: center; padding: 20px; }
.lightbox.open  { display: flex; }
.lightbox-inner { position: relative; }
.lightbox-img   { max-width: 90vw; max-height: 85vh; border-radius: 8px; display: block; }
.lightbox-close { position: absolute; top: -14px; right: -14px; background: #fff; border: none; border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: .95rem; font-weight: 900; box-shadow: var(--sh2); }

/* ── Admin ───────────────────────────────────────────────────────────────── */
.admin-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.admin-tile {
  background: #fff; border: 2px solid var(--border); border-radius: 14px;
  padding: 28px 16px; text-align: center; cursor: pointer; transition: all .18s;
  font-weight: 700; font-size: .9rem; color: var(--text); text-decoration: none;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.admin-tile:hover { border-color: var(--teal); color: var(--teal); box-shadow: var(--sh2); transform: translateY(-2px); text-decoration: none; }
.tile-icon { font-size: 1.6rem; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.admin-table th { background: var(--teal); color: #fff; padding: 10px 14px; text-align: left; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; }
.admin-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.admin-table tr:hover td { background: var(--bg); }
.btn-admin-sm  { font-family: var(--f); font-weight: 700; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; padding: 4px 12px; border-radius: 50px; border: 1.5px solid rgba(255,255,255,.5); color: #fff; background: transparent; cursor: pointer; transition: all .15s; }
.btn-admin-sm:hover { background: rgba(255,255,255,.2); }
.btn-admin-edit { font-family: var(--f); font-weight: 700; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: 4px 11px; border-radius: 50px; border: 2px solid var(--teal); color: var(--teal); background: transparent; cursor: pointer; transition: all .15s; }
.btn-admin-edit:hover { background: var(--teal); color: #fff; }

/* Category tree */
.cat-block { margin-bottom: 18px; }
.cat-header { background: var(--teal); color: #fff; padding: 11px 16px; border-radius: var(--r); font-weight: 800; font-size: .87rem; letter-spacing: .07em; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; margin-bottom: 6px; }
.cat-header:hover { background: var(--td); }
.cat-arrow { font-size: .75rem; opacity: .75; display: inline-block; transition: transform .2s; }
.cat-arrow.open { transform: rotate(90deg); }
.cat-body  { overflow: hidden; transition: max-height .25s ease; }
.subcat-block { margin-left: 16px; margin-bottom: 8px; }
.subcat-header { background: #22B5A6; color: #fff; padding: 9px 14px; border-radius: var(--r); font-weight: 700; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 5px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; user-select: none; }
.subcat-header:hover { background: var(--td); }
.subcat-body { overflow: hidden; transition: max-height .2s ease; }
.ach-list  { margin-left: 16px; }
.ach-row   { display: flex; align-items: center; gap: 8px; padding: 9px 13px; background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); margin-bottom: 5px; }
.ach-row:hover { border-color: var(--teal); }
.drag-handle { color: var(--muted); cursor: grab; font-size: .95rem; }
.ach-row-name { flex: 1; font-weight: 700; font-size: .84rem; letter-spacing: .04em; text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.ach-row-pts  { font-size: .78rem; color: var(--muted); font-weight: 700; min-width: 60px; text-align: right; }

/* Type toggle (add/edit) */
.type-toggle { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.type-btn {
  flex: 1; padding: 10px 12px; border-radius: var(--r); border: 2px solid var(--border);
  background: #fff; font-family: var(--f); font-weight: 700; font-size: .8rem;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
  cursor: pointer; transition: all .15s; text-align: center; min-width: 80px;
}
.type-btn:hover { border-color: var(--teal); color: var(--teal); }
.type-btn.active { background: var(--teal); border-color: var(--teal); color: #fff; }
.type-btn-desc { display: block; font-size: .68rem; font-weight: 400; letter-spacing: 0; text-transform: none; opacity: .8; margin-top: 3px; }

/* Item builder */
.item-builder { border: 1.5px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 8px; }
.item-builder-head { background: #F0FAF9; padding: 10px 14px; font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--td); border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; }
.item-builder-row  { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--border); background: #fff; }
.item-builder-row:last-child { border-bottom: none; }
.item-label-input  { flex: 1; padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 6px; font-family: var(--f); font-size: .88rem; outline: none; }
.item-label-input:focus { border-color: var(--teal); }
.item-pts-input    { width: 72px; padding: 7px 8px; border: 1.5px solid var(--border); border-radius: 6px; font-family: var(--f); font-size: .88rem; text-align: right; outline: none; }
.item-pts-input:focus { border-color: var(--teal); }
.item-remove { color: var(--muted); cursor: pointer; font-size: 1rem; transition: color .12s; background: none; border: none; font-family: var(--f); }
.item-remove:hover { color: var(--danger); }
.item-add-btn { display: flex; align-items: center; gap: 6px; padding: 9px 14px; font-size: .8rem; font-weight: 700; color: var(--teal); cursor: pointer; background: #F8FDFC; border: none; border-top: 1px solid var(--border); width: 100%; font-family: var(--f); transition: background .12s; text-transform: uppercase; letter-spacing: .07em; }
.item-add-btn:hover { background: var(--tl); }

/* Upload zone */
.upload-zone { display: block; border: 2px dashed var(--border); border-radius: var(--r); overflow: hidden; cursor: pointer; transition: all .15s; }
.upload-zone:hover { border-color: var(--teal); background: var(--tl); }
.upload-zone-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; height: 140px; }

/* OG Preview */
.og-preview { background: #18191a; border-radius: 8px; overflow: hidden; margin-top: 10px; border: 1.5px solid #333; }
.og-img     { width: 100%; height: 90px; background: linear-gradient(135deg,#1FA896,#0D7A6C); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.35); font-size: .82rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; overflow: hidden; }
.og-info    { padding: 8px 12px; background: #1c1e21; }
.og-domain  { font-size: .68rem; color: #888; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.og-title   { font-size: .84rem; color: #e4e6ea; font-weight: 700; margin-bottom: 2px; }
.og-desc    { font-size: .75rem; color: #888; line-height: 1.4; }

/* Settings */
.settings-card { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 22px; margin-bottom: 14px; }
.settings-card-title { font-weight: 800; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 16px; }
.r2-section { background: #F0F8F7; border: 1.5px solid #C0E8E4; border-radius: var(--r); padding: 18px; margin-top: 12px; }
.r2-title   { font-weight: 800; font-size: .76rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: 14px; }
.toggle-switch { display: flex; align-items: center; gap: 12px; }
.toggle-label  { font-size: .9rem; font-weight: 600; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--border); border-radius: 24px; cursor: pointer; transition: background .2s; }
.slider::before { content:''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 4px rgba(0,0,0,.2); }
input:checked + .slider { background: var(--teal); }
input:checked + .slider::before { transform: translateX(20px); }
.code-area { width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: var(--r); font-family: 'Courier New',monospace; font-size: .82rem; color: var(--text); outline: none; resize: vertical; min-height: 100px; background: #F5F8F7; transition: border-color .15s; }
.code-area:focus { border-color: var(--teal); }

/* Tab bar */
.tab-bar { display: flex; background: var(--bg); border: 2px solid var(--border); border-radius: var(--r); overflow: hidden; margin-bottom: 24px; }
.tab-btn  { flex: 1; padding: 11px; text-align: center; font-weight: 700; font-size: .84rem; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; color: var(--muted); transition: all .15s; border: none; background: transparent; font-family: var(--f); }
.tab-btn.active { background: var(--teal); color: #fff; }

/* Import/Export */
.ie-grid  { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 28px; }
.ie-card  { background: #fff; border: 1.5px solid var(--border); border-radius: var(--r); padding: 24px; text-align: center; }
.drop-zone       { display: block; border: 2px dashed var(--border); border-radius: var(--r); padding: 20px; cursor: pointer; transition: all .15s; margin-bottom: 10px; }
.drop-zone:hover { border-color: var(--teal); background: var(--tl); }
.drop-zone-inner { display: flex; flex-direction: column; align-items: center; }
.drop-zone input { display: none; }
.format-ref       { background: #F0F8F7; border: 1.5px solid #C0E8E4; border-radius: var(--r); padding: 18px; }
.format-ref-title { font-weight: 800; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }
.ref-table { width: 100%; border-collapse: collapse; font-size: .78rem; }
.ref-table th { background: var(--teal); color: #fff; padding: 7px 10px; text-align: left; font-weight: 700; letter-spacing: .05em; }
.ref-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); color: var(--muted); }

/* Danger zone */
.danger-zone { border: 2px solid #F5CCCC; background: #FFF0F0; border-radius: var(--r); padding: 18px 20px; margin-top: 28px; }
.danger-zone-title { font-weight: 800; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--danger); margin-bottom: 8px; }
.danger-zone-desc  { font-size: .84rem; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }

/* Footer */
.site-footer   { border-top: 1px solid var(--border); padding: 24px; margin-top: 60px; }
.footer-inner  { max-width: 920px; margin: 0 auto; display: flex; gap: 12px; align-items: center; }
.footer-logo   { font-weight: 900; color: var(--teal); }
.footer-tagline { font-size: .82rem; color: var(--muted); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .admin-grid { grid-template-columns: repeat(2,1fr); }
  .ie-grid    { grid-template-columns: 1fr; }
  nav { padding: 0 16px; }
  .wrap, .wrap-wide { padding: 24px 16px; }
  .hero h1 { font-size: 2.4rem; }
  .type-toggle { flex-direction: column; }
  .profile-top { flex-direction: column; }
  .profile-action-btns { margin-top: 8px; flex-wrap: wrap; }
}
