:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #666;
  --paper: #f7f7f2;
  --panel: rgba(255, 255, 255, 0.9);
  --hot: #ff5a36;
  --acid: #d9ff43;
  --blue: #1768ac;
  --yellow: #fff3b0;
  --green: #37b66d;
  --shadow: 4px 4px 0 #171717;
  --thin-shadow: 2px 2px 0 #171717;
  --panel-radius: 0;
  --control-radius: 0;
  --text-outline: #fff;
  font-family: "Manrope", Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 8%, rgba(217, 255, 67, 0.3), transparent 24rem),
    linear-gradient(90deg, rgba(23, 23, 23, 0.06) 1px, transparent 1px),
    linear-gradient(rgba(23, 23, 23, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 28px 28px, 28px 28px, auto;
  overflow-x: hidden;
}

body.theme-limewire {
  --ink: #222;
  --muted: #666;
  --paper: #f4f4f4;
  --panel: rgba(255, 255, 255, 0.97);
  --hot: #2d7f2d;
  --acid: #8dc63f;
  --blue: #1b4f9c;
  --yellow: #dcebd5;
  --green: #74ad2b;
  --panel-radius: 3px;
  --control-radius: 2px;
  --shadow: 2px 2px 0 #999;
  --thin-shadow: 1px 1px 0 #aaa;
  background:
    linear-gradient(#fff 0 2.2rem, #d5d5d5 2.2rem 2.35rem, transparent 2.35rem),
    repeating-linear-gradient(0deg, #ececec 0 2px, #f7f7f7 2px 4px);
}

body.theme-limewire h1,
body.theme-limewire h2,
body.theme-limewire h3 {
  color: #2d7f2d;
}

body.theme-limewire button,
body.theme-limewire nav a {
  border-radius: 2px;
  background: linear-gradient(#fff, #d8d8d8);
  color: #222;
}

body.theme-xp {
  --ink: #10294f;
  --muted: #42618a;
  --paper: #eef5ff;
  --panel: rgba(255, 255, 255, 0.96);
  --hot: #2d6fc0;
  --acid: #8bc34a;
  --blue: #1759a6;
  --yellow: #fff2b8;
  --green: #70ad35;
  --shadow: 3px 3px 0 #6d86a8;
  --thin-shadow: 2px 2px 0 #8ca1bd;
  --panel-radius: 6px;
  --control-radius: 4px;
  background: linear-gradient(#6ca9e8 0 2.5rem, #dcecff 2.5rem 2.7rem, #eef5ff 2.7rem);
}

body.theme-xp .site-header {
  background: linear-gradient(#3d91e8, #1555a2);
  color: #fff;
  border-bottom: 2px solid #0d3974;
}

body.theme-xp .brand,
body.theme-xp nav a {
  color: #fff;
}

body.theme-xp .brand-mark {
  color: #10294f;
  border-color: #10294f;
  box-shadow: 3px 3px 0 #10294f;
}

body.theme-xp button,
body.theme-xp nav a {
  border-radius: 4px;
  background: linear-gradient(#fff, #c9d9ec);
  color: #10294f;
  border-color: #5279a8;
}

body.theme-afterdark {
  color: #fff8ff;
  --ink: #fff8ff;
  --muted: #d7cae9;
  --paper: #191027;
  --panel: rgba(32, 18, 53, 0.94);
  --hot: #ff4db8;
  --acid: #d9ff43;
  --blue: #62d2ff;
  --yellow: #fff06a;
  --green: #64ffd8;
  --shadow: 8px 8px 0 #000;
  --thin-shadow: 4px 4px 0 #000;
  --panel-radius: 8px;
  --control-radius: 6px;
  --text-outline: #10091b;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 77, 184, 0.28) 0 9rem, transparent 9.2rem),
    radial-gradient(circle at 80% 10%, rgba(98, 210, 255, 0.26) 0 7rem, transparent 7.2rem),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    #10091b;
  background-size: auto, auto, 30px 30px, 30px 30px, auto;
}

body.theme-monochrome {
  color-scheme: light;
  --ink: #000;
  --muted: #555;
  --paper: #fff;
  --panel: rgba(255, 255, 255, 0.96);
  --panel-radius: 0;
  --control-radius: 0;
  --hot: #000;
  --acid: #000;
  --blue: #000;
  --yellow: #fff;
  --green: #fff;
  --shadow: 2px 2px 0 #000;
  --thin-shadow: 1px 1px 0 #000;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.07) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.07) 1px, transparent 1px),
    #fff;
  background-size: 24px 24px;
}

body.theme-monochrome nav a.active,
body.theme-monochrome .auth-tabs button.active,
body.theme-monochrome .edit-tabs button,
body.theme-monochrome .message-friend-list button.active {
  color: #aaa;
}

body.theme-monochrome button {
  color: #aaa;
}

body.theme-pirate {
  color-scheme: light;
  --ink: #222;
  --muted: #666;
  --paper: #fff;
  --panel: rgba(255, 255, 255, 0.98);
  --hot: #b5121b;
  --acid: #d71920;
  --blue: #b5121b;
  --yellow: #ededed;
  --green: #d71920;
  --shadow: 3px 3px 0 #999;
  --thin-shadow: 2px 2px 0 #999;
  background:
    repeating-linear-gradient(0deg, #ededed 0 2px, #fff 2px 4px);
}

body.theme-pirate h1,
body.theme-pirate h2,
body.theme-pirate h3 {
  color: #b5121b;
}

body.theme-pirate button,
body.theme-pirate nav a {
  border-radius: 0;
  background: #222;
  color: #fff;
}

body.theme-ra1n {
  --ink: #111;
  --muted: #444;
  --paper: #f5f5f5;
  --panel: rgba(255, 255, 255, 0.96);
  --hot: #111;
  --acid: #b7ff00;
  --blue: #111;
  --yellow: #fff;
  --green: #b7ff00;
  --shadow: 4px 4px 0 #111;
  --thin-shadow: 2px 2px 0 #111;
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(17, 17, 17, 0.08) 1px, transparent 1px),
    #f5f5f5;
  background-size: 22px 22px;
}

body.theme-terminal {
  color-scheme: dark;
  --ink: #46ff42;
  --muted: #a0d8a0;
  --paper: #061006;
  --panel: rgba(8, 24, 8, 0.97);
  --hot: #46ff42;
  --acid: #d7ff48;
  --blue: #46ff42;
  --yellow: #0d240d;
  --green: #d7ff48;
  --shadow: 3px 3px 0 #000;
  --thin-shadow: 1px 1px 0 #000;
  --text-outline: #030803;
  background:
    repeating-linear-gradient(0deg, rgba(70, 255, 66, 0.05) 0 1px, transparent 1px 4px),
    #030803;
}

body.profile-mode {
  background: #050805;
}

body.profile-mode .status-strip {
  display: none;
}

body[data-current-view="profile"] .status-strip {
  display: none;
}

body.profile-mode .page-shell {
  width: 100%;
  margin: 0;
}

body[data-current-view="profile"] .page-shell {
  width: 100%;
  margin: 0;
}

body.profile-mode .app-view {
  min-height: 100vh;
}

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

button,
input,
select,
textarea,
nav a {
  border-radius: var(--control-radius);
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.hidden {
  display: none !important;
}

.static {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 10;
  opacity: 0.12;
  mix-blend-mode: multiply;
  background-image:
    repeating-radial-gradient(circle at 0 0, transparent 0 3px, rgba(255, 255, 255, 0.7) 3px 4px),
    repeating-linear-gradient(0deg, transparent 0 2px, rgba(24, 15, 43, 0.18) 2px 3px);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--ink);
  background: rgba(247, 247, 242, 0.94);
  box-shadow: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: #180f2b;
  text-decoration: none;
  font-size: clamp(1.4rem, 4vw, 2.25rem);
  font-weight: 950;
  text-transform: lowercase;
}

.brand-mark {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 3px solid #180f2b;
  border-radius: 999px;
  background: #fff;
  box-shadow: 3px 3px 0 #180f2b;
  font-size: 0.78rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

nav a,
.badge-row span,
.section-title span {
  border: 2px solid #180f2b;
  background: rgba(255, 255, 255, 0.82);
  color: #180f2b;
  box-shadow: 2px 2px 0 #180f2b;
  text-decoration: none;
}

nav a {
  padding: 0.42rem 0.62rem;
  font-weight: 850;
  text-transform: lowercase;
}

.settings-nav {
  display: inline-grid;
  width: 2.15rem;
  min-height: 2.15rem;
  padding: 0;
  place-items: center;
  font-size: 1.25rem;
  line-height: 1;
  text-transform: none;
}

.nav-count {
  display: inline-grid;
  min-width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.18rem;
  place-items: center;
  border-radius: 999px;
  background: var(--hot);
  color: #fff;
  font-size: 0.72rem;
  line-height: 1;
}

nav a.active {
  background: #180f2b;
  color: #fff;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 1.1rem auto 3rem;
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3rem;
  margin-bottom: 1rem;
  border: 3px dashed var(--ink);
  padding: 0.62rem 0.85rem;
  background: var(--yellow);
  box-shadow: var(--thin-shadow);
  overflow: hidden;
}

.status-strip.hidden {
  display: none;
}

.status-strip p {
  margin: 0;
  color: #180f2b;
  font-weight: 850;
  white-space: nowrap;
  animation: slide-text 18s linear infinite;
}

.blink {
  flex: 0 0 auto;
  padding: 0.18rem 0.35rem;
  border: 2px solid #180f2b;
  background: var(--hot);
  color: #fff;
  font-weight: 950;
  animation: blink 1s step-end infinite;
}

.panel {
  position: relative;
  border: 1px solid var(--ink);
  border-radius: var(--panel-radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-screen {
  display: grid;
  min-height: calc(100vh - 9rem);
  place-items: center;
}

.auth-card {
  width: min(100%, 34rem);
  padding: clamp(1rem, 4vw, 2rem);
}

.auth-copy {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

.home-tagline {
  margin: 0.25rem 0 0.7rem;
  color: var(--hot);
  font-size: clamp(1.1rem, 2vw, 1.6rem);
  font-weight: 900;
  text-transform: lowercase;
}

.hero-board .home-tagline {
  margin-top: 0.35rem;
}

.auth-tabs,
.edit-tabs,
.css-presets,
.css-gallery,
.sticker-picker,
.sticker-tray,
.message-friend-list,
.activity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.auth-tabs,
.edit-tabs {
  margin: 0 0 0.85rem;
}

.auth-tabs button.active,
.edit-tabs button.active,
.sticker-picker button.active,
.message-friend-list button.active {
  background: var(--ink);
  color: var(--paper);
}

.profile-grid,
.lower-grid,
.content-columns,
.home-grid,
.dashboard-grid,
.edit-grid,
.people-grid,
.flipbook-grid {
  display: grid;
  gap: 1rem;
}

.app-view {
  min-height: calc(100vh - 9rem);
}

.home-grid {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.dashboard-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 1rem;
}

.dashboard-grid .wide {
  grid-column: 1 / -1;
}

.edit-grid,
.people-grid,
.flipbook-grid {
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  align-items: start;
}

.profile-grid {
  grid-template-columns: 320px minmax(0, 1fr);
  align-items: start;
}

.content-columns {
  grid-template-columns: minmax(0, 0.9fr) minmax(300px, 1.1fr);
  margin-top: 1rem;
}

.lower-grid {
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1fr) minmax(320px, 1.15fr);
  align-items: start;
  margin-top: 1rem;
}

.sidebar,
.customize,
.css-editor,
.home-panel,
.people,
.page-maker,
.friends,
.messages,
.bulletins,
.flipbook-composer,
.flipbooks {
  padding: 1rem;
}

.torn::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: -18px;
  left: -3px;
  height: 18px;
  background:
    linear-gradient(135deg, var(--panel) 0 50%, transparent 51%) 0 0 / 26px 18px repeat-x,
    linear-gradient(225deg, var(--panel) 0 50%, transparent 51%) 13px 0 / 26px 18px repeat-x;
  filter: drop-shadow(3px 3px 0 rgba(24, 15, 43, 0.35));
}

.profile-card {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.profile-card > div:last-child {
  min-width: 0;
}

.profile-card h1 {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: clamp(1.65rem, 5vw, 3.4rem);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(280px, 600px);
}

.settings-panel {
  padding: 1rem;
}

.settings-note {
  color: var(--muted);
  line-height: 1.5;
}

.email-settings {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
}

.email-settings details {
  border: 1px solid var(--ink);
  padding: 0.65rem;
}

.email-settings summary {
  cursor: pointer;
  font-weight: 950;
}

.email-change-flow {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.75rem;
}

.avatar {
  display: grid;
  width: 6rem;
  aspect-ratio: 1;
  place-items: center;
  border: 3px solid var(--ink);
  background:
    linear-gradient(135deg, var(--hot) 0 25%, var(--yellow) 25% 50%, var(--green) 50% 75%, var(--blue) 75%),
    var(--paper);
  box-shadow: var(--thin-shadow);
  transform: rotate(-2deg);
  overflow: hidden;
  position: relative;
}

.avatar span {
  display: grid;
  width: 4.3rem;
  aspect-ratio: 1;
  place-items: center;
  border: 3px solid #180f2b;
  border-radius: 999px;
  background: #fff;
  color: #180f2b;
  font-size: 2.7rem;
  font-weight: 950;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transform-origin: center;
}

.photo-settings {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--ink);
}

.photo-settings h3 {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.photo-loops-icon {
  position: relative;
  display: inline-block;
  width: 2.15rem;
  height: 1.8rem;
  flex: 0 0 auto;
}

.photo-loops-icon i {
  position: absolute;
  width: 1.05rem;
  height: 0.85rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  box-shadow: 2px 2px 0 var(--ink);
  transform: rotate(-8deg);
}

.photo-loops-icon i:nth-child(1) { left: 0.05rem; top: 0.45rem; background: var(--hot); }
.photo-loops-icon i:nth-child(2) { left: 0.48rem; top: 0.2rem; background: var(--yellow); transform: rotate(5deg); }
.photo-loops-icon i:nth-child(3) { left: 0.9rem; top: 0.52rem; background: var(--blue); transform: rotate(13deg); }

.photo-loops-icon b {
  position: absolute;
  right: 0.05rem;
  top: 0.05rem;
  width: 0.48rem;
  height: 0.48rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0.05rem 0.26rem 0 -0.08rem var(--paper), 0.05rem 0.26rem 0 -0.02rem var(--ink);
}

.photo-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.7rem;
}

.photo-upload-row input[type="file"] {
  max-width: 100%;
  font: inherit;
}

.photo-filter-control {
  display: grid;
  gap: 0.35rem;
  max-width: 20rem;
  margin-top: 0.75rem;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.2rem, 1fr));
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.photo-option {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.35rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: var(--thin-shadow);
}

.photo-option-card {
  display: grid;
  gap: 5px;
  justify-items: stretch;
}

.photo-remove {
  min-height: 26px;
  padding: 3px 7px;
  font-size: 11px;
}

.crop-editor {
  display: grid;
  grid-template-columns: 96px minmax(150px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
  padding: 10px;
  border: 1px dashed currentColor;
}

.crop-preview {
  width: 96px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid currentColor;
}

.crop-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.crop-controls {
  display: grid;
  gap: 6px;
}

.crop-controls input {
  width: 100%;
}

@media (max-width: 560px) {
  .crop-editor {
    grid-template-columns: 96px 1fr;
  }
  .crop-editor > button {
    grid-column: 1 / -1;
  }
}

.account-security {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px dashed currentColor;
}

.visual-editor {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px dashed currentColor;
}

.editor-help {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: .9rem;
}

.visual-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.visual-editor-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.visual-editor-grid input[type="color"] {
  width: 100%;
  min-height: 42px;
  padding: 3px;
}

.visual-editor-actions {
  margin-top: 12px;
}

.visual-css-reference {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid currentColor;
}

.visual-css-reference > strong {
  display: block;
  margin-bottom: 8px;
  font-size: .78rem;
  text-transform: uppercase;
}

.visual-css-table {
  display: grid;
  border: 1px solid currentColor;
}

.visual-css-table [role="row"] {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 8px;
  padding: 7px 8px;
  border-bottom: 1px solid currentColor;
  font-size: .76rem;
}

.visual-css-table [role="row"]:last-child {
  border-bottom: 0;
}

.visual-css-table code {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: .72rem;
}

@media (max-width: 560px) {
  .visual-editor-grid {
    grid-template-columns: 1fr;
  }
}

.stack-form {
  display: grid;
  gap: 10px;
}

.danger-zone {
  margin-top: 18px;
}

.danger-zone summary {
  cursor: pointer;
  font-weight: 700;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(240px, .8fr) minmax(420px, 1.2fr);
  gap: 16px;
}

.service-status,
.stats-grid {
  display: grid;
  gap: 8px;
}

.service-pill,
.stat-item {
  border: 1px solid currentColor;
  padding: 9px 10px;
}

.service-pill.ok {
  color: #237a3b;
}

.service-pill.note {
  color: #735c17;
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.stat-item strong,
.stat-item span {
  display: block;
}

.stat-item strong {
  font-size: 24px;
}

.stat-item span {
  font-size: 12px;
}

@media (max-width: 760px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.photo-option img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.photo-option.selected {
  outline: 3px solid var(--acid);
}

.avatar-filter-flash { filter: saturate(1.5) contrast(1.08) brightness(1.08); }
.avatar-filter-faded { filter: saturate(0.65) contrast(0.9) brightness(1.08); }
.avatar-filter-sepia { filter: sepia(0.75) saturate(1.15) contrast(1.05); }
.avatar-filter-noir { filter: grayscale(1) contrast(1.35); }
.avatar-filter-polaroid { filter: sepia(0.25) saturate(1.25) contrast(1.08) brightness(1.08); }

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 0.98;
}

h1 {
  font-size: clamp(2.3rem, 8vw, 4.9rem);
  text-shadow: 3px 3px 0 var(--acid);
}

h2 {
  font-size: clamp(1.35rem, 3vw, 2.25rem);
}

h3 {
  margin-top: 1rem;
  font-size: 1.15rem;
}

h1,
h2,
h3,
.eyebrow,
.home-tagline {
  -webkit-text-stroke: 2px var(--text-outline);
  paint-order: stroke fill;
}

.eyebrow {
  margin: 0 0 0.34rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.mood {
  margin: 0.35rem 0 0;
  font-size: 1rem;
}

.mini-player,
.facts div,
input,
select,
textarea,
.person-card,
.bulletin-card,
.message,
.empty-state {
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.hashtag,
.hashtag-result h3 {
  font-weight: 900;
}

.hashtag {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hashtag-results {
  display: grid;
  gap: 8px;
  margin: 12px 0;
}

.hashtag-result-heading {
  margin: 0;
  color: var(--muted);
  font-weight: 900;
}

.hashtag-result {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.hashtag-result h3,
.hashtag-result p {
  margin: 0;
}

.hashtag-result small {
  color: var(--muted);
}

.mini-player {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
  padding: 0.7rem;
}

.mention {
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.icon-button {
  width: 3.1rem;
  height: 3.1rem;
  border: 2px solid var(--ink);
  background: var(--hot);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 var(--ink);
}

.equalizer {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 2rem;
}

.equalizer span {
  width: 5px;
  height: 45%;
  background: var(--blue);
  animation: bounce 0.75s ease-in-out infinite alternate;
}

.equalizer span:nth-child(2) {
  height: 78%;
  animation-delay: 0.1s;
}

.equalizer span:nth-child(3) {
  height: 55%;
  animation-delay: 0.2s;
}

.equalizer span:nth-child(4) {
  height: 88%;
  animation-delay: 0.3s;
}

.facts {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
}

.facts div {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem;
}

.facts dt,
.facts dd {
  margin: 0;
}

.facts dt {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.facts dd {
  text-align: right;
  font-weight: 800;
}

.button-stack,
.people-list,
.bulletin-list,
.flipbook-feed,
.thread,
.css-gallery,
form {
  display: grid;
  gap: 0.65rem;
}

button {
  border: 2px solid var(--ink);
  background: var(--acid);
  color: var(--ink);
  font-weight: 950;
  padding: 0.64rem 0.78rem;
  box-shadow: 3px 3px 0 var(--ink);
}

.button-stack button {
  -webkit-text-stroke: 1.6px var(--text-outline);
  paint-order: stroke fill;
}

.button-stack button:nth-child(1) {
  background: var(--green);
}

.button-stack button:nth-child(2) {
  background: var(--yellow);
}

.button-stack #logoutButton,
.danger {
  background: var(--hot);
  color: #fff;
}

/* Bright theme accents need dark ink; white becomes low-contrast on neon actions. */
body:not(.theme-limewire):not(.theme-xp):not(.theme-afterdark):not(.theme-monochrome):not(.theme-pirate):not(.theme-ra1n):not(.theme-terminal) .danger,
body:not(.theme-limewire):not(.theme-xp):not(.theme-afterdark):not(.theme-monochrome):not(.theme-pirate):not(.theme-ra1n):not(.theme-terminal) .button-stack #logoutButton {
  color: #171717;
}

body.theme-afterdark .danger,
body.theme-afterdark .button-stack #logoutButton {
  color: #10091b;
}

body.theme-terminal .danger,
body.theme-terminal .button-stack #logoutButton {
  color: #061006;
}

button:hover,
button:focus-visible,
.swatch:hover,
.swatch:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--ink);
}

.hero-board {
  min-height: 20rem;
  padding: clamp(1rem, 4vw, 2rem);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.7) 50%, transparent 50%) 0 0 / 18px 18px,
    linear-gradient(var(--paper), var(--paper));
}

.hero-board h2 {
  max-width: 14ch;
  font-size: clamp(2.2rem, 7vw, 5.8rem);
  text-transform: lowercase;
  text-shadow:
    4px 4px 0 var(--acid),
    8px 8px 0 rgba(47, 116, 255, 0.28);
}

.tape {
  position: absolute;
  z-index: 1;
  width: 7rem;
  height: 2rem;
  border: 2px solid rgba(24, 15, 43, 0.3);
  background: rgba(255, 240, 106, 0.78);
}

.tape-one {
  top: -0.8rem;
  left: 8%;
  transform: rotate(-8deg);
}

.tape-two {
  right: 9%;
  bottom: 1.8rem;
  transform: rotate(7deg);
}

.badge-row,
.section-title,
.form-actions,
.person-actions,
.comment-form,
.message-form,
.mini-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.badge-row span,
.section-title span {
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.section-title {
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.65rem;
  outline: none;
}

.code-box {
  min-height: 13rem;
  background: #160f23;
  color: #d9ff43;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.35;
  text-transform: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 3px var(--acid);
}

fieldset {
  margin: 0;
  padding: 0.65rem;
  border: 2px dashed var(--ink);
}

legend {
  padding: 0 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
}

.swatches {
  display: flex;
  gap: 0.55rem;
}

.swatch {
  width: 3rem;
  aspect-ratio: 1;
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.swatch[data-theme="sticker"] {
  background: linear-gradient(135deg, #ff3d93, #fff06a 50%, #3bffc4);
}

.swatch[data-theme="limewire"] {
  background: linear-gradient(135deg, #98ff00, #ff5c00 50%, #00a6a6);
}

.swatch[data-theme="afterdark"] {
  background: linear-gradient(135deg, #10091b, #ff4db8 52%, #62d2ff);
}

.swatch[data-theme="monochrome"] {
  background: linear-gradient(135deg, #fff 0 48%, #000 49% 100%);
}

.swatch[data-theme="pirate"] {
  background: linear-gradient(135deg, #111 0 52%, #ff7a00 53% 100%);
}

.swatch[data-theme="ra1n"] {
  background: linear-gradient(135deg, #fff 0 52%, #b7ff00 53% 100%);
}

.swatch[data-theme="terminal"] {
  background: linear-gradient(135deg, #030803 0 52%, #46ff42 53% 100%);
}

.swatch.active {
  outline: 4px solid var(--acid);
  outline-offset: 3px;
}

.person-card,
.bulletin-card,
.flipbook-card,
.message,
.empty-state {
  padding: 0.75rem;
  box-shadow: 3px 3px 0 var(--ink);
}

.person-card {
  display: grid;
  gap: 0.45rem;
}

.person-card > strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-safebar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem clamp(0.8rem, 3vw, 1.5rem);
  border-bottom: 3px solid #180f2b;
  background: linear-gradient(90deg, #c7ff3d, #3bffc4);
  color: #180f2b;
  box-shadow: 0 5px 0 rgba(24, 15, 43, 0.28);
}

.profile-page-canvas,
.profile-page-frame {
  display: block;
  width: 100%;
  min-height: calc(100vh - 4.3rem);
  background: #fff;
  color: #180f2b;
}

body.profile-mode .profile-page-canvas {
  width: 100vw;
  min-height: 100vh;
}

.profile-page-frame.compact {
  min-height: 22rem;
  max-height: 28rem;
  border: 3px solid var(--ink);
  box-shadow: inset 0 0 0 5px rgba(24, 15, 43, 0.08);
  overflow: auto;
}

.profile-page-frame.compact .profile-page {
  min-height: 22rem;
}

.edit-panel {
  display: grid;
  gap: 0.65rem;
}

.css-presets {
  margin-bottom: 0.65rem;
}

.sample-css-menu {
  margin-bottom: 0.8rem;
  border: 1px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 88%, var(--yellow));
}

.sample-css-menu summary {
  cursor: pointer;
  padding: 0.65rem 0.75rem;
  font-weight: 950;
  list-style-position: inside;
}

.sample-css-menu[open] summary {
  border-bottom: 1px solid var(--ink);
}

.sample-css-menu .css-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.75rem;
  margin: 0;
}

.theme-card,
.activity-item,
.sticker-pill {
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 0.55rem;
  box-shadow: 3px 3px 0 var(--ink);
}

.theme-card,
.activity-item {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.activity-item.unread {
  border-color: var(--hot);
  box-shadow: 3px 3px 0 var(--hot);
  font-weight: 850;
}

.notifications-page {
  max-width: 52rem;
  padding: 1rem;
}

.activity-list {
  display: grid;
}

.sticker-picker {
  align-items: stretch;
}

.sticker-tray {
  min-height: 3rem;
}

.message-friend-list {
  margin-bottom: 0.8rem;
}

.messenger-layout {
  display: grid;
  grid-template-columns: minmax(13rem, 0.32fr) minmax(0, 1fr);
  min-height: 32rem;
  border: 2px solid var(--ink);
}

.message-sidebar {
  min-width: 0;
  padding: 0.8rem;
  border-right: 2px solid var(--ink);
  background: var(--paper);
}

.message-sidebar .section-title {
  margin-bottom: 0.7rem;
}

.message-friend-list {
  display: grid;
  gap: 0.45rem;
  max-height: 24rem;
  overflow: auto;
}

.message-friend-list button {
  width: 100%;
  text-align: left;
}

.message-conversation {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  background: var(--panel);
}

.conversation-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-bottom: 2px solid var(--ink);
}

.conversation-header span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.message-conversation .thread {
  max-height: none;
  min-height: 18rem;
  padding: 1rem;
}

.message-conversation .message-form {
  margin: 0;
  padding: 0.8rem;
  border-top: 2px solid var(--ink);
}

.message-friend-list button {
  flex: 1 1 12rem;
}

.person-card strong,
.bulletin-card strong {
  font-size: 1.02rem;
}

.meta,
.comment,
.message small {
  color: var(--muted);
  font-size: 0.82rem;
}

.bulletin-card {
  display: grid;
  gap: 0.55rem;
}

.poll-maker {
  display: grid;
  gap: 0.55rem;
  border: 2px dashed var(--ink);
  padding: 0.7rem;
}

.poll-maker summary {
  cursor: pointer;
  font-weight: 950;
}

.bulletin-poll {
  display: grid;
  gap: 0.45rem;
  padding: 0.7rem;
  border: 2px solid var(--ink);
  background: var(--paper);
}

.poll-option {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.45rem 0.6rem;
  text-align: left;
}

.poll-option[aria-pressed="true"] {
  background: var(--green);
}

.flipbook-composer {
  align-self: start;
}

.frame-meter {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  border: 2px dashed var(--ink);
  padding: 0.55rem;
  background: var(--yellow);
  color: #180f2b;
  font-size: 0.84rem;
  font-weight: 950;
  text-transform: uppercase;
}

.flipbook-preview,
.flipbook-player {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid var(--ink);
  background: #12091f;
  box-shadow: var(--thin-shadow);
}

.flipbook-preview {
  min-height: 18rem;
}

.flipbook-preview img,
.flipbook-preview video,
.flipbook-player img,
.flipbook-player video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.flipbook-card {
  display: grid;
  gap: 0.7rem;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
}

.flipbook-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.flipbook-card h3 {
  margin: 0;
}

.flipbook-card p {
  margin: 0;
  line-height: 1.4;
}

.flipbook-player {
  aspect-ratio: 9 / 12;
  max-height: 34rem;
}

.compact-feed {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-feed .flipbook-card:nth-child(n + 3) {
  display: none;
}

.compact-feed .flipbook-player {
  max-height: 18rem;
}

.bulletin-card p {
  margin: 0;
  line-height: 1.42;
}

.comments {
  display: grid;
  gap: 0.35rem;
}

.comment {
  border-left: 4px solid var(--hot);
  padding-left: 0.45rem;
}

.comment-form,
.message-form,
.mini-form {
  flex-wrap: nowrap;
}

.comment-form input,
.message-form input,
.mini-form input {
  min-width: 0;
}

.thread {
  max-height: 24rem;
  overflow: auto;
  padding: 0.25rem;
}

.message {
  width: fit-content;
  max-width: 86%;
}

.message.mine {
  justify-self: end;
  background: var(--yellow);
  color: #180f2b;
}

.message p {
  margin: 0.2rem 0 0;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  max-width: min(24rem, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  border: 3px solid var(--ink);
  background: var(--acid);
  color: #180f2b;
  box-shadow: var(--thin-shadow);
  font-weight: 950;
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes slide-text {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-110%);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.verification-notice {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  margin-top: 0.85rem;
  padding: 0.7rem;
  border: 2px dashed var(--ink);
  background: #fff06a;
  font-size: 0.85rem;
}

.verification-notice a {
  color: inherit;
  font-weight: 800;
}

.loops-grid {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.6fr);
  gap: 1rem;
  align-items: start;
}

.loop-directory,
.loop-room {
  min-width: 0;
}

.loop-card {
  display: grid;
  gap: 0.35rem;
  padding: 0.75rem 0;
  border-bottom: 2px dashed var(--ink);
}

.loop-card:last-child {
  border-bottom: 0;
}

.loop-rings-directory {
  margin: 12px 0;
  border-top: 1px dashed currentColor;
  border-bottom: 1px dashed currentColor;
  padding: 10px 0;
}

.loop-rings-directory summary {
  cursor: pointer;
  font-weight: 800;
}

.loop-ring-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px dotted currentColor;
}

.loop-ring-row:last-child {
  border-bottom: 0;
}

.loop-card p,
.loop-description {
  margin: 0;
}

.loop-member-admin {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ink);
}

.loop-member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.45rem;
}

.loop-member-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loop-create {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 3px solid var(--ink);
}

.loop-create summary {
  cursor: pointer;
  font-weight: 800;
}

.loop-create form {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.loop-room .thread {
  min-height: 18rem;
  max-height: 34rem;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .loops-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes bounce {
  to {
    height: 20%;
  }
}

@media (max-width: 1040px) {
  .profile-grid,
  .lower-grid,
  .content-columns,
  .home-grid,
  .dashboard-grid,
  .edit-grid,
  .people-grid,
  .flipbook-grid,
  .compact-feed {
    grid-template-columns: 1fr;
  }

  .dashboard-grid .wide {
    grid-column: auto;
  }

  .sidebar {
    order: 2;
  }

  .main-profile {
    order: 1;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: relative;
    align-items: flex-start;
    flex-direction: column;
  }

  nav {
    justify-content: flex-start;
  }

  nav a {
    flex: 1 1 auto;
    text-align: center;
  }

  .page-shell {
    width: min(100% - 1rem, 42rem);
    margin-top: 0.75rem;
  }

  .panel {
    box-shadow: 5px 5px 0 var(--ink);
  }

  .profile-card,
  .mini-player,
  .comment-form,
  .message-form,
  .mini-form {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .messenger-layout {
    grid-template-columns: 1fr;
  }

  .message-sidebar {
    border-right: 0;
    border-bottom: 2px solid var(--ink);
  }

  .message-friend-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 12rem;
  }

  .hero-board {
    min-height: 16rem;
  }

  .hero-board h2 {
    font-size: clamp(2rem, 14vw, 4rem);
  }
}

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

  .status-strip p {
    white-space: normal;
    transform: none;
  }
}
