/* ==========================================================================
   Squirrel (squirrel.aminachu.moe) — self-contained styles.
   Same design tokens as the hub; standalone so the subdomain needs no
   cross-origin assets.
   ========================================================================== */

:root {
  --c-primary: #9b4dca;
  --c-accent: #ec4899;
  --c-text: #241733;
  --c-body: #5b5366;
  --c-muted: #a98fbe;
  --c-muted-2: #6b5d7a;
  --c-bg: #fdf5fa;
  --c-border: #f0e3ee;
  --g-hero: linear-gradient(120deg, #8b5cf6, #c44ec6 55%, #ec4899);
  --g-cta: linear-gradient(135deg, #9b4dca, #ec4899);
  --g-avatar: linear-gradient(135deg, #c084fc, #ec4899);
  --stripe-pink: repeating-linear-gradient(135deg, #f3e3f1, #f3e3f1 12px, #ecd3ea 12px, #ecd3ea 24px);
  --f-head: 'Poppins', system-ui, sans-serif;
  --f-play: 'Baloo 2', 'Poppins', cursive;
  --f-body: 'Nunito', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
@keyframes amfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

body { min-height: 100vh; background: var(--c-bg); color: var(--c-text); font-family: var(--f-body); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

.sq-wrap { max-width: 640px; margin: 0 auto; }

/* Top bar */
.sq-topbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; }
.sq-back { display: inline-flex; align-items: center; gap: 9px; color: var(--c-primary); font-family: var(--f-head); font-weight: 800; font-size: 14px; }
.sq-back i { font-size: 12px; }
.sq-brand { display: flex; align-items: center; gap: 8px; font-family: var(--f-play); font-weight: 800; font-size: 19px; color: var(--c-primary); }
.sq-brand span { font-size: 17px; }

/* Member login/logout in the squirrel topbar (purple on light). */
.member-bar { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-head); }
.member-bar__login {
  display: inline-flex; align-items: center; gap: 7px; color: var(--c-primary); font-weight: 800; font-size: 14px;
  padding: 6px 14px; border: 1px solid var(--c-primary); border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.member-bar__login:hover { background: var(--c-primary); color: #fff; }
.member-bar__user { display: inline-flex; align-items: center; gap: 8px; color: var(--c-primary); font-weight: 700; font-size: 14px; }
.member-bar__avatar { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.member-bar__name { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-bar__logout-form { display: inline; margin: 0; }
.member-bar__logout { color: var(--c-primary); opacity: .7; background: none; border: 0; cursor: pointer; font-size: 15px; line-height: 1; }
.member-bar__logout:hover { opacity: 1; }

/* Collapsible comments per nut. */
.sq-comments { margin-top: 12px; }
.sq-comments > summary { cursor: pointer; color: var(--c-primary); font-weight: 800; font-size: 13px; list-style: none; display: inline-flex; align-items: center; gap: 7px; }
.sq-comments > summary::-webkit-details-marker { display: none; }
.sq-comments[open] > summary { margin-bottom: 4px; }
.sq-comments .cmt-section { margin-top: 8px; border-top: none; padding-top: 0; }
.sq-comments .cmt-section__title { font-size: 15px; margin-bottom: 12px; }

/* Comments (shared class names with the main site). */
.cmt-login { color: var(--c-muted-2); }
.cmt-login a { color: var(--c-primary); font-weight: 700; }
.cmt-form { margin-bottom: 18px; }
.cmt-form__input { width: 100%; border: 1px solid var(--c-border); border-radius: 12px; padding: 11px 13px; font: inherit; font-size: 14px; resize: vertical; background: #fff; }
.cmt-form__input:focus { outline: none; border-color: var(--c-primary); }
.cmt-form__actions { margin-top: 9px; }
.cmt-list { display: flex; flex-direction: column; gap: 16px; }
.cmt-compose { margin-top: 16px; }
.cmt-compose .cmt-form { margin-bottom: 0; }
.cmt__head { display: flex; align-items: center; gap: 9px; }
.cmt__avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.cmt__avatar--ph { display: inline-flex; align-items: center; justify-content: center; background: #f4e9f2; color: var(--c-primary); font-weight: 800; }
.cmt__name { font-weight: 700; }
.cmt__badge { font-size: 11px; font-weight: 800; color: var(--c-primary); background: rgba(155, 77, 202, .1); padding: 2px 8px; border-radius: 999px; }
.cmt__time { color: var(--c-muted-2); font-size: 13px; }
.cmt-asowner { font-size: 13px; font-weight: 700; color: var(--c-primary); margin: 0 0 8px; }
.cmt__body { margin: 6px 0 0 41px; line-height: 1.55; overflow-wrap: anywhere; }
.cmt__actions { display: flex; gap: 14px; align-items: center; margin: 7px 0 0 41px; }
.cmt__reply summary { cursor: pointer; color: var(--c-primary); font-weight: 700; font-size: 13px; list-style: none; }
.cmt__reply summary::-webkit-details-marker { display: none; }
.cmt__reply .cmt-form { margin: 10px 0 4px; }
.cmt__del button { background: none; border: 0; color: var(--c-muted-2); cursor: pointer; font: inherit; font-size: 13px; }
.cmt__del button:hover { color: #c0392b; }
.cmt__children { margin: 14px 0 0 26px; padding-left: 15px; border-left: 2px solid var(--c-border); display: flex; flex-direction: column; gap: 14px; }
.btn--sm, .cmt-form .btn { display: inline-flex; align-items: center; gap: 7px; background: var(--c-primary); color: #fff; font-family: var(--f-head); font-weight: 700; font-size: 13px; padding: 8px 14px; border-radius: 999px; border: 0; cursor: pointer; }

.sq-main { padding: 12px 20px 64px; }

/* Profile card */
.sq-profile { background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 12px 34px rgba(155,77,202,.12); margin-bottom: 22px; }
.sq-profile__banner { height: 130px; position: relative; background: var(--g-hero); background-size: cover; background-position: center; }
.sq-profile__deco { position: absolute; color: rgba(255,255,255,.55); animation: amfloat 5s ease-in-out infinite; }
/* padding-top clears the absolutely-positioned avatar (which overhangs the
   banner). This space used to be provided by the now-removed follow button. */
.sq-profile__body { position: relative; padding: 52px 26px 24px; }
.sq-profile__avatar { position: absolute; top: -44px; left: 26px; width: 88px; height: 88px; border-radius: 50%; background: var(--g-avatar); background-size: cover; background-position: center; border: 5px solid #fff; display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--f-play); font-weight: 800; font-size: 36px; box-shadow: 0 8px 22px rgba(155,77,202,.28); }
.sq-profile__name { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.sq-profile__name h1 { font-family: var(--f-head); font-size: 25px; font-weight: 800; }
.sq-profile__handle { font-size: 14px; color: var(--c-muted); font-weight: 700; }
.sq-profile__bio { font-size: 15px; color: var(--c-body); line-height: 1.6; margin-top: 12px; }
.sq-profile__meta { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 14px; font-size: 14px; color: var(--c-muted-2); }
.sq-profile__meta i { color: var(--c-primary); margin-right: 7px; }
.sq-profile__stats { display: flex; gap: 22px; margin-top: 14px; font-size: 14px; color: var(--c-muted-2); }
.sq-profile__stats strong { color: var(--c-text); font-family: var(--f-head); }

/* Tabs */
.sq-tabs { background: #fff; border-radius: 18px; padding: 6px; box-shadow: 0 8px 22px rgba(155,77,202,.08); margin-bottom: 22px; display: flex; gap: 4px; }
.sq-tab { flex: 1; text-align: center; padding: 11px 0; border-radius: 13px; color: var(--c-muted); font-family: var(--f-head); font-weight: 700; font-size: 14.5px; transition: background .15s ease, color .15s ease; }
.sq-tab.is-active { background: var(--g-cta); color: #fff; }

/* Compose (read-only) */
.sq-compose { background: #fff; border-radius: 20px; padding: 20px 22px; box-shadow: 0 8px 22px rgba(155,77,202,.10); margin-bottom: 22px; display: flex; gap: 14px; align-items: flex-start; }
.sq-compose__avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; background: var(--g-avatar); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--f-play); font-weight: 800; font-size: 18px; }
.sq-compose__body { flex: 1; }
.sq-compose__placeholder { color: #b29ec2; font-size: 16px; padding: 8px 0 14px; }
.sq-compose__bar { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--c-border); padding-top: 14px; }
.sq-compose__icons { display: flex; gap: 16px; color: var(--c-primary); font-size: 17px; }
.sq-compose__post { background: var(--g-cta); color: #fff; font-family: var(--f-head); font-weight: 700; font-size: 14px; padding: 9px 22px; border-radius: 999px; }

/* Feed */
.sq-feed { display: flex; flex-direction: column; gap: 16px; }
.sq-nut { background: #fff; border-radius: 20px; padding: 20px 22px; box-shadow: 0 6px 20px rgba(155,77,202,.08); }
.sq-nut__row { display: flex; gap: 14px; }
.sq-nut__avatar { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; background: var(--g-avatar); display: flex; align-items: center; justify-content: center; color: #fff; font-family: var(--f-play); font-weight: 800; font-size: 18px; }
.sq-nut__main { flex: 1; min-width: 0; }
.sq-nut__meta { display: flex; align-items: center; gap: 6px; font-size: 14.5px; }
.sq-nut__meta .name { font-family: var(--f-head); font-weight: 800; }
.sq-nut__meta .paw { color: var(--c-primary); font-size: 13px; }
.sq-nut__meta .handle { color: var(--c-muted); font-weight: 600; }
.sq-nut__text { font-size: 15.5px; line-height: 1.6; color: #2f2740; margin: 5px 0 0; white-space: pre-wrap; }
.sq-nut__media { margin-top: 12px; display: grid; grid-template-columns: 1fr; gap: 8px; }
.sq-nut__media--multi { grid-template-columns: 1fr 1fr; }
.sq-nut__img { display: block; height: 260px; border-radius: 16px; background: var(--stripe-pink); background-size: cover; background-position: center; }
.sq-nut__media--multi .sq-nut__img { height: 190px; }
.sq-nut__actions { display: flex; align-items: center; gap: 30px; margin-top: 14px; }
.sq-nut__action { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13.5px; color: var(--c-muted); background: none; }
.sq-nut__action--like.is-liked { color: var(--c-accent); }
.sq-nut__action--save { margin-left: auto; font-size: 15px; }
.sq-nut__action--save.is-saved { color: var(--c-primary); }
.sq-end { text-align: center; padding: 26px; color: var(--c-muted); font-weight: 700; font-size: 14px; }

@media (max-width: 520px) {
  .sq-nut__actions { gap: 18px; }
}
