/* ============================================================
   Stillwell — shared styles
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Jost:wght@300;400;500&display=swap');

:root{
  --bg: #F6F1E6;
  --card: #FFFFFF;
  --ink: #3A332B;
  --soft: #8B7E6E;
  --moss: #5E6E52;
  --moss-deep: #46523C;
  --clay: #B5764B;
  --gold: #C9A24B;
  --line: #E4DCCB;
  --field: #F2EEE3;
  --chip: #EFE9D8;
}

*{ box-sizing:border-box; margin:0; padding:0; }

body{
  font-family:'Jost', sans-serif;
  background: var(--bg);
  color: var(--ink);
  display:flex;
  justify-content:center;
  padding: 0 16px 80px;
}
.page{ width:100%; max-width: 560px; }

/* ---------- top bar ---------- */
.topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding: 22px 4px;
}
.logo{
  font-family:'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration:none;
}
.logo span{ color: var(--gold); }
.topbar nav{ display:flex; gap:10px; }

/* ---------- buttons ---------- */
.btn{
  font-family:'Jost', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  border:none;
  cursor:pointer;
  border-radius: 999px;
  padding: 14px 24px;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition: box-shadow .15s ease, background .2s ease, border-color .2s ease;
}
.btn.primary{
  background: linear-gradient(135deg, var(--moss), var(--moss-deep));
  color:#fff;
  box-shadow: 0 6px 18px rgba(94,110,82,0.28);
}
.btn.primary:hover{ box-shadow: 0 8px 22px rgba(94,110,82,0.38); }
.btn.soft{ background: var(--chip); color: var(--moss-deep); }
.btn.soft:hover{ background:#E6DEC8; }
.btn.ghost{ background: var(--card); color: var(--ink); border:1px solid var(--line); }
.btn.ghost:hover{ border-color: var(--clay); color: var(--clay); }
.btn.sm{ padding: 10px 18px; font-size: .9rem; }
.btn.full{ width:100%; }
.btn:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

/* ---------- cards ---------- */
.card{
  background: var(--card);
  border-radius: 18px;
  padding: 26px 24px;
  margin-top: 18px;
  border: 1px solid var(--line);
}
.card h2{
  font-family:'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.card-head h2{ margin-bottom:0; }

.hero{
  background: linear-gradient(135deg, var(--moss), var(--moss-deep));
  border:none;
  color:#fff;
}
.hero h1{
  font-family:'Cormorant Garamond', serif;
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.25;
}
.hero p{ margin-top:10px; opacity:.85; font-size:.95rem; line-height:1.6; }
.hero .btn{ margin-top:18px; }

/* ---------- forms ---------- */
.fld{ display:block; margin-bottom:16px; }
.fld > span{
  display:block;
  font-size:.9rem;
  font-weight:500;
  margin-bottom:6px;
}
.fld input, .fld textarea{
  width:100%;
  background: var(--field);
  border:none;
  border-radius:12px;
  padding:13px 15px;
  font-size:1rem;
  font-family:'Jost', sans-serif;
  color: var(--ink);
  outline:none;
}
.fld textarea{ min-height:90px; resize:vertical; }
.fld .hint{
  display:block;
  font-size:.78rem;
  color: var(--soft);
  margin-top:5px;
  font-weight:400;
}
.err{
  color: var(--clay);
  font-size:.88rem;
  margin-bottom:14px;
}
.ok-toast{
  background: var(--chip);
  color: var(--moss-deep);
  border-radius:12px;
  padding:12px 16px;
  font-size:.9rem;
  margin-bottom:16px;
}

/* ---------- auth toggle ---------- */
.toggle-row{
  display:flex;
  background: var(--chip);
  border-radius:999px;
  padding:5px;
  gap:4px;
  margin-bottom:22px;
}
.toggle-row a{
  flex:1;
  text-align:center;
  padding:11px 0;
  border-radius:999px;
  font-weight:500;
  font-size:.95rem;
  color: var(--ink);
  text-decoration:none;
}
.toggle-row a.active{
  background: var(--card);
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* ---------- creator list ---------- */
.creator-row{
  display:flex;
  gap:14px;
  align-items:center;
  padding:14px 0;
  border-bottom:1px solid var(--line);
  text-decoration:none;
  color: var(--ink);
}
.creator-row:last-child{ border-bottom:none; }
.creator-row .meta{ flex:1; }
.creator-row .meta b{ font-weight:500; }
.creator-row .meta small{ display:block; font-size:.82rem; color:var(--soft); margin-top:2px; }
.creator-row .view{ color: var(--clay); font-size:.85rem; }

.avatar{
  width:48px; height:48px;
  border-radius:50%;
  background: var(--moss);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:'Cormorant Garamond', serif;
  font-size:1.3rem;
  flex-shrink:0;
}
.avatar.lg{ width:100px; height:100px; font-size:2.6rem; }
.avatar.md{ width:42px; height:42px; font-size:1.1rem; }

/* ---------- profile ---------- */
.profile-top{ position:relative; margin-top:4px; }
.banner{
  height:160px;
  border-radius:18px;
  background: linear-gradient(120deg, var(--moss), var(--soft) 55%, var(--gold));
}
.avatar-wrap{
  position:absolute;
  left:24px;
  bottom:-54px;
  width:108px; height:108px;
  border-radius:50%;
  background: var(--bg);
  padding:4px;
  box-shadow:0 4px 14px rgba(0,0,0,0.08);
}
.identity{ margin-top:66px; padding:0 4px; }
.identity .name{
  font-family:'Cormorant Garamond', serif;
  font-size:2rem;
  font-weight:600;
}
.identity .handle{
  margin-top:4px;
  font-size:.85rem;
  color:var(--soft);
  letter-spacing:.04em;
}

.goal{
  margin-bottom:20px;
  background: var(--field);
  border-radius:14px;
  padding:16px;
}
.goal-head{
  display:flex;
  justify-content:space-between;
  font-size:.9rem;
  margin-bottom:10px;
}
.goal-head b{ font-weight:500; }
.goal-head span{ color:var(--soft); }
.goal-head span b{ color:var(--ink); }
.goal-track{
  height:10px;
  background:#E6DEC8;
  border-radius:999px;
  overflow:hidden;
}
.goal-fill{
  height:100%;
  background: linear-gradient(90deg, var(--moss), var(--gold));
  border-radius:999px;
}

.bio{
  margin-top:20px;
  font-family:'Cormorant Garamond', serif;
  font-size:1.08rem;
  line-height:1.65;
  color:#5A5043;
  font-style:italic;
}
.tags{ margin-top:18px; display:flex; gap:8px; flex-wrap:wrap; }
.tag{
  background: var(--chip);
  color: var(--moss);
  font-size:.8rem;
  padding:6px 16px;
  border-radius:999px;
}
.no-pay{
  margin-top:12px;
  font-size:.82rem;
  color:var(--clay);
  text-align:center;
}

/* ---------- supporters ---------- */
.supporter{
  display:flex;
  gap:14px;
  padding:16px 0;
  border-bottom:1px solid var(--line);
}
.supporter:last-child{ border-bottom:none; }
.supporter .s-body{ flex:1; }
.supporter .s-line{ font-size:.95rem; }
.supporter .s-line b{ font-weight:500; }
.supporter .amt{ color:var(--clay); font-weight:500; }
.supporter .s-msg{
  margin-top:6px;
  background:var(--field);
  border-radius:0 12px 12px 12px;
  padding:10px 14px;
  font-size:.92rem;
  color:#5A5043;
}
.supporter .s-time{ margin-top:6px; font-size:.78rem; color:var(--soft); }

.empty{
  display:flex;
  align-items:center;
  gap:18px;
}
.empty .seed{ font-size:1.8rem; color:var(--gold); }
.empty .divider{ width:1px; height:38px; background:var(--line); }
.empty p{ font-size:.95rem; color:var(--soft); }

/* ---------- tip modal ---------- */
.overlay{
  position:fixed;
  inset:0;
  background:rgba(58,51,43,0.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:100;
  padding:16px;
}
.overlay.open{ display:flex; }
.modal{
  background:var(--card);
  border-radius:20px;
  width:100%;
  max-width:420px;
  max-height:90vh;
  overflow-y:auto;
  padding:26px 24px 28px;
}
.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:20px;
}
.modal-head h3{
  font-family:'Cormorant Garamond', serif;
  font-size:1.35rem;
  font-weight:600;
  line-height:1.3;
  padding-right:10px;
}
.close-btn{
  width:38px; height:38px;
  border-radius:50%;
  background:var(--chip);
  border:none;
  cursor:pointer;
  font-size:1rem;
  color:var(--ink);
  flex-shrink:0;
}
.close-btn:hover{ background:#E6DEC8; }

.section-label{ display:block; font-weight:500; margin-bottom:12px; }
.amount-row{ display:flex; gap:10px; margin-bottom:18px; }
.amount-opt{
  flex:1;
  padding:14px 0;
  border-radius:999px;
  border:1.5px solid var(--line);
  font-weight:600;
  font-size:1.05rem;
  background:var(--card);
  color:var(--ink);
  cursor:pointer;
  font-family:'Jost', sans-serif;
}
.amount-opt.active{ border-color:var(--moss); color:var(--moss); }

.custom-amount{
  display:flex;
  align-items:center;
  background:var(--field);
  border-radius:12px;
  padding:14px 16px;
  margin-bottom:14px;
  font-weight:600;
  font-size:1.1rem;
}
.custom-amount span{ margin-right:8px; color:var(--soft); }
.custom-amount input{
  border:none;
  background:transparent;
  outline:none;
  font-size:1.1rem;
  font-weight:600;
  font-family:'Jost', sans-serif;
  width:100%;
  color:var(--ink);
}
.modal input[type="text"], .modal textarea{
  width:100%;
  background:var(--field);
  border:none;
  border-radius:12px;
  padding:14px 16px;
  font-size:1rem;
  font-family:'Jost', sans-serif;
  color:var(--ink);
  outline:none;
  margin-bottom:14px;
  resize:vertical;
}
.modal textarea{ min-height:80px; }
.pay-options{ display:flex; gap:10px; }
.pay-note{
  margin-top:12px;
  font-size:.8rem;
  color:var(--soft);
  text-align:center;
  line-height:1.5;
}

/* ---------- dashboard stats ---------- */
.stats{
  color:var(--soft);
  font-size:.88rem;
  margin-top:8px;
}
.share-box{
  display:flex;
  gap:10px;
  align-items:center;
  background:var(--field);
  border-radius:12px;
  padding:12px 14px;
  margin-top:14px;
}
.share-box input{
  flex:1;
  border:none;
  background:transparent;
  outline:none;
  font-family:'Jost', sans-serif;
  font-size:.9rem;
  color:var(--ink);
}

footer{
  text-align:center;
  margin-top:32px;
  font-size:.78rem;
  color:var(--soft);
  letter-spacing:.05em;
}

@media (max-width:420px){
  .identity .name{ font-size:1.7rem; }
}
