/* ==========================================================================
   Enspyration - core styles
   Tokens - base - app chrome (top bar, drawer, menus) - shared components
   Page layouts live in pages.css.
   ========================================================================== */

:root {
  /* brand - sampled from the logo */
  --yellow: #eed82e;
  --yellow-hi: #f8e75e;
  --yellow-ink: #1d1b0c;
  --yellow-glow: rgba(238, 216, 46, 0.22);
  --charcoal: #434343;

  /* surfaces */
  --bg: #3b3b3b;
  --bg-deep: #313131;
  --bg-sunk: #2a2a2a;
  --surface-hi: #4c4c4c;
  --menu: #131313;
  --menu-hover: #242424;

  /* lines - the mockups are built from thin white rules */
  --line: rgba(255, 255, 255, 0.14);
  --line-mid: rgba(255, 255, 255, 0.32);
  --line-strong: rgba(255, 255, 255, 0.62);

  /* text */
  --ink: #f6f5f0;
  --ink-2: #d2d1cb;
  --ink-3: #afaea8;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.45);

  --font-display: 'Lilita One', 'Arial Rounded MT Bold', 'Arial Black', sans-serif;
  --font-body: 'Rubik', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --topbar-h: 64px;
  --gutter: 24px;
  --page-max: 1440px;
}

@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --topbar-h: 58px;
  }
}

/* ------------------------------------------------------------------ base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--topbar-h) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

img,
svg,
video,
audio {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

::selection {
  background: var(--yellow);
  color: var(--yellow-ink);
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--yellow);
  color: var(--yellow-ink);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: none;
}

.ico {
  width: 20px;
  height: 20px;
  flex: none;
}

/* --------------------------------------------------------------- top bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--topbar-h);
  padding: 0 var(--gutter);
  background: rgba(36, 36, 36, 0.88);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.topbar-logo {
  margin-right: auto;
  padding: 4px;
  border-radius: var(--radius-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
}

.topbar.show-logo .topbar-logo {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.topbar-logo img {
  height: 42px;
  width: auto;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 30vw);
  height: 40px;
  padding: 0 14px;
  background: var(--bg-sunk);
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search:focus-within {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-glow);
}

.search .ico {
  width: 18px;
  height: 18px;
  color: var(--ink-3);
}

.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: none;
  outline: none;
  font-size: 15px;
}

.topbar .search-toggle {
  display: none;
}

.acct {
  display: block;
  border-radius: 50%;
  margin-left: 4px;
}

.acct .avatar {
  transition: border-color 0.15s, transform 0.15s;
}

.acct:hover .avatar {
  border-color: var(--yellow);
  transform: scale(1.05);
}

@media (max-width: 720px) {
  .search {
    display: none;
  }

  .topbar .search-toggle {
    display: inline-grid;
  }

  .topbar.search-open .search {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
    box-shadow: var(--shadow);
  }
}

@media (max-width: 420px) {
  .topbar .make-btn span {
    display: none;
  }

  .topbar .make-btn {
    width: 40px;
    padding: 0;
  }

  .topbar-logo img {
    height: 34px;
  }
}

/* ---------------------------------------------------------------- drawer */
.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: min(320px, 86vw);
  background: var(--menu);
  border-right: 1.5px solid var(--line-strong);
  transform: translateX(-100%);
  visibility: hidden;
  transition: transform 0.25s ease, visibility 0s 0.25s;
  overflow-y: auto;
}

.drawer.is-open {
  transform: none;
  visibility: visible;
  transition: transform 0.25s ease;
}

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 14px 20px;
  border-bottom: 1.5px solid var(--line-strong);
}

.drawer-head img {
  width: 150px;
  height: auto;
}

.drawer-nav a,
.drawer-foot a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  font-family: var(--font-display);
  font-size: 24px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s, color 0.15s;
}

.drawer-nav a .ico,
.drawer-foot a .ico {
  width: 22px;
  height: 22px;
  color: var(--ink-3);
}

.drawer-nav a:hover,
.drawer-foot a:hover {
  background: var(--menu-hover);
}

.drawer a[aria-current='page'] {
  color: var(--yellow);
}

.drawer a[aria-current='page'] .ico {
  color: var(--yellow);
}

.drawer-foot {
  margin-top: auto;
  border-top: 1.5px solid var(--line-strong);
}

.drawer-foot a {
  border-bottom: 0;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn:active {
  transform: translateY(1px);
}

.btn .ico {
  width: 18px;
  height: 18px;
}

.btn .caret {
  width: 16px;
  height: 16px;
  margin-right: -4px;
  opacity: 0.8;
}

.btn-primary {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--yellow-ink);
}

.btn-primary:hover {
  background: var(--yellow-hi);
  border-color: var(--yellow-hi);
}

.btn-dark {
  background: var(--menu);
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn.is-on {
  border-color: var(--yellow);
  color: var(--yellow);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  transition: background 0.15s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.icon-btn .ico {
  width: 24px;
  height: 24px;
}

.menu-btn .ico {
  width: 28px;
  height: 28px;
  stroke-width: 2.6;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--yellow);
  font-weight: 600;
}

.text-btn:hover {
  text-decoration: underline;
}

/* ---------------------------------------------------------------- menus */
.dropdown {
  position: relative;
}

.menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  min-width: 200px;
  background: var(--menu);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: menu-in 0.14s ease;
}

.menu[hidden] {
  display: none;
}

.menu-right {
  left: auto;
  right: 0;
}

@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.menu-item:last-child {
  border-bottom: 0;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--menu-hover);
  color: var(--yellow);
  outline: none;
}

.menu-item[aria-checked='true'] {
  color: var(--yellow);
}

.menu-item .ico {
  width: 18px;
  height: 18px;
}

.menu-item .end {
  margin-left: auto;
  color: var(--ink-3);
}

.menu-item:hover .end {
  color: inherit;
}

.make-menu {
  min-width: 190px;
}

.make-menu .menu-item {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.make-menu .plus-ico {
  width: 16px;
  height: 16px;
  stroke-width: 3;
  color: var(--yellow);
}

/* sort / filter picker: "v | Newest" like the mockup */
.select-btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg-sunk);
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
}

.select-btn .ico {
  width: 30px;
  height: 100%;
  padding: 0 7px;
  border-right: 1.5px solid var(--line-mid);
  transition: transform 0.15s;
}

.select-btn[aria-expanded='true'] .ico {
  transform: scaleY(-1);
}

.select-val {
  padding: 0 12px 0 10px;
}

.select-btn:hover {
  border-color: var(--yellow);
}

/* --------------------------------------------------------- follow menu */
.follow-menu {
  width: min(340px, calc(100vw - 32px));
}

.follow-head {
  padding: 12px 14px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.follow-opt {
  align-items: flex-start;
  gap: 12px;
  padding: 13px 14px;
}

.follow-opt:hover,
.follow-opt:focus-visible,
.follow-opt[aria-checked='true'] {
  color: var(--ink);
}

.follow-opt .tick {
  display: grid;
  place-items: center;
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 2px solid var(--line-strong);
  border-radius: 6px;
  transition: background 0.15s, border-color 0.15s;
}

.follow-opt .tick .ico {
  width: 14px;
  height: 14px;
  stroke-width: 3.2;
  opacity: 0;
}

.follow-opt[aria-checked='true'] .tick {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--yellow-ink);
}

.follow-opt[aria-checked='true'] .tick .ico {
  opacity: 1;
}

.follow-opt:hover .tick {
  border-color: var(--yellow);
}

.follow-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.follow-copy small {
  display: block;
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
}

.follow-opt.is-included {
  cursor: default;
}

.follow-opt.is-included .tick {
  opacity: 0.55;
}

.follow-group {
  border-bottom: 1px solid var(--line);
  padding-bottom: 6px;
}

.follow-group-title {
  padding: 13px 14px 6px 46px;
}

.follow-group-title span {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

.follow-group-title small {
  display: block;
  margin-top: 3px;
  color: var(--ink-3);
  font-size: 13px;
}

.follow-opt-sm {
  padding: 7px 14px 7px 46px;
  border-bottom: 0;
}

.follow-opt-sm .follow-copy strong {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
}

.follow-opt-sm .follow-copy small {
  margin-top: 0;
  font-size: 12px;
}

/* ---------------------------------------------------------------- avatar */
.avatar {
  --h: 48;
  --size: 38px;
  position: relative;
  display: inline-grid;
  place-items: center;
  flex: none;
  width: var(--size);
  height: var(--size);
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: linear-gradient(145deg, hsl(var(--h) 52% 54%), hsl(var(--h) 48% 33%));
  color: #fff;
  font-family: var(--font-display);
  font-size: calc(var(--size) * 0.46);
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.avatar-xs { --size: 22px; border-width: 1.5px; }
.avatar-sm { --size: 32px; }
.avatar-md { --size: 38px; }
.avatar-lg { --size: 56px; }
.avatar-xl { --size: 120px; border-width: 3px; }

.bday-hat {
  position: absolute;
  top: -48%;
  left: -20%;
  width: 62%;
  height: auto;
  max-width: none;
  transform: rotate(-28deg);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
  pointer-events: none;
}

/* -------------------------------------------------------- post thumbnails */
.thumb {
  --h: 48;
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 90% at 12% 8%, hsl(var(--h) 60% 60% / 0.42), transparent 60%),
    linear-gradient(150deg, hsl(var(--h) 30% 36%), hsl(var(--h) 26% 19%));
  color: #fff;
  container-type: inline-size;
}

.thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1.5px);
  background-size: 14px 14px;
  pointer-events: none;
}

.cover-ico {
  width: 24%;
  max-width: 90px;
  height: auto;
  stroke-width: 1.5;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

.cover-play {
  display: grid;
  place-items: center;
  width: 24%;
  max-width: 96px;
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.32);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.cover-play .ico {
  width: 46%;
  height: auto;
  margin-left: 9%;
  stroke-width: 1.8;
}

.thumb-audio .cover-ico {
  width: 15%;
  transform: translateY(-62%);
}

.cover-wave {
  position: absolute;
  left: 9%;
  right: 9%;
  bottom: 20%;
  display: flex;
  align-items: center;
  gap: 1.1%;
  height: 34%;
}

.cover-wave i {
  flex: 1;
  height: var(--v);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.72);
}

.cover-page {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
  width: 60%;
  height: 74%;
  padding: 7% 7.5%;
  overflow: hidden;
  border-radius: 6px;
  background: #f4f1e6;
  color: #2a2a2a;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
  font-size: 12px;
  font-size: clamp(8px, 4.4cqi, 16px);
  transform: rotate(-2deg) translateY(4%);
}

.cover-page b {
  font-family: var(--font-display);
  font-size: 1.3em;
  font-weight: 400;
  line-height: 1.1;
}

.cover-page span {
  display: -webkit-box;
  overflow: hidden;
  color: #5a5a5a;
  line-height: 1.4;
  white-space: pre-line;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
}

.cover-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 28%;
  min-width: 60px;
  max-width: 130px;
  overflow: hidden;
  border-radius: 10px;
  background: #f4f1e6;
  color: #222;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  font-size: clamp(10px, 4cqi, 22px);
}

.cover-date small {
  width: 100%;
  padding: 0.25em 0;
  background: var(--yellow);
  color: var(--yellow-ink);
  font-size: 0.8em;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

.cover-date strong {
  padding: 0.1em 0 0.25em;
  font-family: var(--font-display);
  font-size: 2.6em;
  font-weight: 400;
  line-height: 1.1;
}

.thumb-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.thumb-badge .ico {
  width: 13px;
  height: 13px;
}

.thumb-dur {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 1;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.72);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 26px 22px;
}

.card {
  display: block;
  border-radius: var(--radius);
}

.card:focus-visible {
  outline-offset: 5px;
}

.card .thumb {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.card:hover .thumb {
  transform: translateY(-3px);
  border-color: var(--yellow);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.35);
}

.card-meta {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 2px 0;
}

.card-text {
  flex: 1;
  min-width: 0;
}

.card-title {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.card:hover .card-title {
  color: var(--yellow);
}

.card-sub {
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink-3);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-where {
  color: var(--ink-2);
}

.card-sub .dot {
  margin: 0 2px;
}

.card-age {
  padding-top: 1px;
  color: var(--ink-3);
  font-size: 13px;
  white-space: nowrap;
}

@media (max-width: 540px) {
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ----------------------------------------------------- folders / projects */
.folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 30px 26px;
}

.folder {
  display: block;
  border-radius: var(--radius);
}

.folder-box {
  position: relative;
  margin-top: 14px;
  padding: 14px;
  border: 2px solid var(--line-strong);
  border-radius: 4px var(--radius) var(--radius) var(--radius);
  background: var(--bg-deep);
  transition: border-color 0.15s, transform 0.18s ease, box-shadow 0.18s;
}

/* the folder tab */
.folder-box::before {
  content: '';
  position: absolute;
  left: -2px;
  bottom: calc(100% - 2px);
  width: 44%;
  height: 16px;
  border: 2px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: var(--bg-deep);
  transition: border-color 0.15s;
}

.folder:hover .folder-box,
.folder:hover .folder-box::before {
  border-color: var(--yellow);
}

.folder:hover .folder-box {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
}

.folder-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mini {
  --h: 48;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  background: linear-gradient(145deg, hsl(var(--h) 32% 40%), hsl(var(--h) 26% 24%));
  color: #fff;
}

.mini .ico {
  width: 38%;
  height: auto;
  stroke-width: 1.8;
}

.mini-empty {
  border-style: dashed;
  border-color: var(--line-mid);
  background: none;
}

.folder-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 2px 0;
}

.folder-name {
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 21px;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder:hover .folder-name {
  color: var(--yellow);
}

.folder-count {
  flex: none;
  color: var(--ink-3);
  font-size: 13px;
}

.folder-badge {
  position: absolute;
  top: -12px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px 2px 6px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--yellow-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.folder-badge .ico {
  width: 13px;
  height: 13px;
  stroke-width: 3;
}

/* "new folder" tile */
.folder-new {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  min-height: 160px;
  margin-top: 14px;
  border: 2px dashed var(--line-mid);
  border-radius: var(--radius);
  background: none;
  color: var(--ink-2);
  font-weight: 600;
  transition: border-color 0.15s, color 0.15s;
}

.folder-new .ico {
  width: 30px;
  height: 30px;
}

.folder-new:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* --------------------------------------------------- people / side panels */
.panel + .panel {
  border-top: 1.5px solid var(--line-strong);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 10px;
}

.panel-head h2 {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 26px;
}

.panel-head h2 .ico {
  width: 22px;
  height: 22px;
  color: var(--yellow);
}

.ico-fill {
  fill: currentColor;
}

.panel-hint {
  padding: 0 16px 8px;
  color: var(--ink-3);
  font-size: 13px;
}

.people {
  margin: 0;
  padding: 0 8px 10px;
  list-style: none;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 8px;
  border-radius: 10px;
  transition: background 0.15s;
}

.person:hover {
  background: rgba(255, 255, 255, 0.07);
}

.person:hover .person-name {
  color: var(--yellow);
}

.person-text {
  min-width: 0;
}

.person-name {
  display: block;
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.person small {
  display: block;
  color: var(--ink-3);
  font-size: 12px;
}

.more-link {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.02em;
  text-align: left;
  transition: color 0.15s;
}

.more-link:hover {
  color: var(--yellow);
}

.more-link .ico {
  width: 18px;
  height: 18px;
}

/* ------------------------------------------------------------ chips / misc */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px 0 4px;
  border: 1.5px solid var(--line-mid);
  border-radius: 999px;
  background: var(--bg-deep);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.15s;
}

.chip:hover {
  border-color: var(--yellow);
}

.chip .sep {
  width: 14px;
  height: 14px;
  color: var(--ink-3);
}

.chip .kind {
  color: var(--ink-3);
  font-weight: 400;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-top: 22px;
  color: var(--ink-2);
  font-size: 14px;
}

.crumbs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
}

.crumbs a:hover {
  color: var(--yellow);
}

.crumbs .sep {
  width: 15px;
  height: 15px;
  color: var(--ink-3);
}

.crumbs [aria-current] {
  color: var(--ink);
  font-weight: 600;
}

.empty {
  padding: 34px 22px;
  border: 1.5px dashed var(--line-mid);
  border-radius: var(--radius);
  color: var(--ink-2);
  text-align: center;
}

.empty h3 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 24px;
}

.empty p {
  max-width: 46ch;
  margin: 0 auto;
}

.empty .btn {
  margin-top: 16px;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title h2 {
  font-size: 32px;
}

.section-title .count {
  color: var(--ink-3);
  font-size: 14px;
}

.section-title p {
  color: var(--ink-3);
  font-size: 14px;
}

/* ----------------------------------------------------------------- forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.label {
  font-size: 14px;
  font-weight: 600;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: var(--bg-sunk);
  color: var(--ink);
  font-size: 15px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input,
.select {
  height: 44px;
}

.textarea {
  min-height: 200px;
  line-height: 1.55;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: #8c8b86;
}

.input:focus,
.textarea:focus,
.select:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow-glow);
  outline: none;
}

.input[aria-invalid='true'] {
  border-color: #ff8a7a;
}

.hint {
  color: var(--ink-3);
  font-size: 13px;
}

.error-text {
  color: #ffa494;
  font-size: 13px;
}

.select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d2d1cb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 18px;
}

.select option,
.select optgroup {
  background: var(--bg-deep);
}

/* toggle switch */
.switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  flex: none;
  width: 44px;
  height: 26px;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-sunk);
  transition: background 0.15s, border-color 0.15s;
}

.switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--ink-2);
  transition: transform 0.18s ease, background 0.15s;
}

.switch input:checked + .switch-track {
  background: var(--yellow);
  border-color: var(--yellow);
}

.switch input:checked + .switch-track::after {
  background: var(--yellow-ink);
  transform: translateX(18px);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.switch:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.45;
}

/* --------------------------------------------------------- toasts / modal */
.toasts {
  position: fixed;
  bottom: 24px;
  left: 50%;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--menu);
  box-shadow: var(--shadow);
  font-size: 14px;
  pointer-events: auto;
  animation: toast-in 0.25s ease;
}

.toast .ico {
  color: var(--yellow);
  fill: var(--yellow);
}

.toast button {
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--yellow);
  font-weight: 700;
}

.toast.is-leaving {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.modal {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--menu);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
}

.modal-body h2 {
  font-size: 28px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.cards > .empty,
.folders > .empty {
  grid-column: 1 / -1;
}

.bday-banner .bday-hat {
  position: static;
  width: 14px;
  transform: rotate(-12deg);
  filter: none;
}

html {
  scrollbar-gutter: stable;
}

/* ------------------------------------------------- uploaded images (backend) */
.avatar.has-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.thumb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb.has-img::after {
  display: none;
}

.thumb.has-img .cover-date {
  position: relative;
  z-index: 1;
}

.mini.mini-img {
  overflow: hidden;
  padding: 0;
}

.mini.mini-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.drawer-logout {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 22px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 20px;
  text-align: left;
  cursor: pointer;
}

.drawer-logout .ico {
  width: 22px;
  height: 22px;
  color: var(--ink-3);
}

.drawer-logout small {
  display: block;
  color: var(--ink-3);
  font-family: var(--font-body);
  font-size: 13px;
}

.drawer-logout:hover {
  background: var(--menu-hover);
  color: var(--ink);
}

.sim-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(238, 216, 46, 0.16);
  color: var(--yellow);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.optional {
  color: var(--ink-3);
  font-weight: 400;
}

.not-found {
  padding-top: 48px;
}

/* ------------------------------------------------------------------ NSFW */
/* NSFW posts only reach members 18+. Covers are blurred until clicked unless
 * the member turned that off in Settings. */
.nsfw-tag {
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border: 1.5px solid rgba(255, 138, 122, 0.75);
  border-radius: 999px;
  background: rgba(60, 14, 10, 0.55);
  color: #ffc2b8;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
  vertical-align: middle;
}

.thumb-nsfw {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
}

.thumb .nsfw-blur {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  filter: blur(22px) saturate(0.7);
  transform: scale(1.12);
}

.thumb.is-blurred::after {
  display: none;
}

.nsfw-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nsfw-veil .ico {
  width: 26px;
  height: 26px;
}

.mini.is-blurred img {
  filter: blur(8px);
  transform: scale(1.2);
}

.select[aria-invalid='true'] {
  border-color: #ff8a7a;
}

/* Terms / Privacy links at the bottom of the drawer */
.drawer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0;
  padding: 10px 22px 16px;
}

.drawer-foot .drawer-legal a {
  display: inline;
  padding: 0;
  color: var(--ink-3);
  font-family: var(--font-body);
  font-size: 13px;
}

.drawer-foot .drawer-legal a:hover {
  background: none;
  color: var(--ink);
  text-decoration: underline;
}
