@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("/assets/fonts/fredoka-latin-wght-normal.woff2") format("woff2-variations");
}

@font-face {
  font-family: "Pacifico";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/assets/fonts/pacifico-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Poppins";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/assets/fonts/poppins-latin-400-normal.woff2") format("woff2");
}

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

:root {
  color-scheme: light;
  --bg: #f4f1f5;
  --home-bg: #f4f1f5;
  --surface: #faf8fb;
  --border: #d4cdd8;
  --border-light: #e4dee7;
  --text: #514a54;
  --text-muted: #706875;
  --text-faint: #9a919e;
  --accent: #76687e;
  --accent-hover: #625669;
  --accent-light: #ebe6ee;
  --link: #6d5f75;
  --link-hover: #594e60;
  --danger: #c0392b;
  --danger-bg: #fdf2f1;
  --code-bg: #eee9f1;
  --blockquote-bg: #f7f4f8;
  --tab-active: #76687e;
  --nav-bg: #dfd8e3;
  --nav-link: #665b6d;
  --topnav-text: #514a54;
  --button-primary: #76687e;
  --button-primary-hover: #625669;
  --display-accent: #76687e;
  --display-soft: #ebe6ee;
  --display-surface: #faf8fb;
  --display-text: #514a54;
  --display-border: #d4cdd8;
  --font: "Fredoka", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --radius: 10px;
  --radius-lg: 20px;
  --radius-pill: 50px;
  --max-w: 1150px;
  --shadow-pink: none;
  --shadow-sm: none;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17121d;
  --home-bg: #17121d;
  --surface: #221a2a;
  --border: #44394d;
  --border-light: #302738;
  --text: #e9e2ec;
  --text-muted: #aca0b2;
  --text-faint: #746a7a;
  --accent: #a28dae;
  --accent-hover: #8e789b;
  --accent-light: #2c2333;
  --link: #ad96ba;
  --link-hover: #c3b0cc;
  --danger: #ff668e;
  --danger-bg: #3b0b20;
  --code-bg: #1f1826;
  --blockquote-bg: #261d2d;
  --nav-bg: #31263a;
  --nav-link: #b3a1bc;
  --topnav-text: #e9e2ec;
  --button-primary: #927ca0;
  --button-primary-hover: #806b8e;
  --display-accent: #806d89;
  --display-soft: #efe8f1;
  --display-surface: #fcfafc;
  --display-text: #3f3943;
  --display-border: #d9d1dc;
  --shadow-pink: none;
  --shadow-sm: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #17121d;
    --home-bg: #17121d;
    --surface: #221a2a;
    --border: #44394d;
    --border-light: #302738;
    --text: #e9e2ec;
    --text-muted: #aca0b2;
    --text-faint: #746a7a;
    --accent: #a28dae;
    --accent-hover: #8e789b;
    --accent-light: #2c2333;
    --link: #ad96ba;
    --link-hover: #c3b0cc;
    --danger: #ff668e;
    --danger-bg: #3b0b20;
    --code-bg: #1f1826;
    --blockquote-bg: #261d2d;
    --nav-bg: #31263a;
    --nav-link: #b3a1bc;
    --topnav-text: #e9e2ec;
    --button-primary: #927ca0;
    --button-primary-hover: #806b8e;
    --display-accent: #806d89;
    --display-soft: #efe8f1;
    --display-surface: #fcfafc;
    --display-text: #3f3943;
    --display-border: #d9d1dc;
    --shadow-pink: none;
    --shadow-sm: none;
  }
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent) 66%, transparent) transparent;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 66%, transparent);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent) 86%, transparent);
  background-clip: padding-box;
}

body {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: url("https://file.garden/Z0ycTKooXlCeCaIt/Atabook/Layout4/BG");
  background-repeat: repeat;
  background-attachment: scroll;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1;
}

body.studio {
  background-image: none;
}

body.home-page {
  background-color: var(--home-bg);
  background-image: none;
}

body.profile-page {
  background-color: var(--bg);
  background-image: none;
}

body,
body *,
body *::before,
body *::after {
  box-shadow: none;
  text-shadow: none;
}

button,
input,
textarea {
  font: inherit;
}
button,
a,
input,
textarea {
  -webkit-tap-highlight-color: rgba(142, 114, 173, 0.16);
}
a {
  color: var(--link);
}
[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;
}

#app,
#topnav,
#footnav,
#toast {
  position: relative;
  z-index: 1;
}

#metadata-page-background {
  position: absolute;
  inset: 42px 0 0;
  z-index: 0;
  pointer-events: none;
}

/* Exact lavune.cc navigation */
#topnav {
  position: sticky;
  top: 0;
  z-index: 200;
  padding: 0 1rem;
  background: var(--nav-bg);
}

#topnav-inner {
  max-width: var(--max-w);
  height: 42px;
  display: flex;
  align-items: center;
  margin: 0 auto;
}

#topnav .brand {
  display: inline-flex;
  align-items: center;
  margin-right: 20px;
  border: 0;
  background: none;
  color: var(--topnav-text, #fff);
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  text-decoration: none;
}

#topnav a,
#topnav button.nav-link {
  height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 0;
  background: none;
  color: var(--topnav-text, #fff);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.15s;
}

#topnav a:hover,
#topnav button.nav-link:hover {
  color: var(--topnav-text, #fff);
}

#topnav a:focus-visible,
#topnav button:focus-visible {
  outline: 2px solid var(--topnav-text, #fff);
  outline-offset: -3px;
}

.nav-sep {
  margin: 0 2px;
  color: var(--topnav-text, #fff);
  font-size: 12px;
  opacity: 0.5;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.signup-btn,
.login-btn {
  height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--topnav-text, #fff);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition:
    color 0.15s,
    background 0.15s;
}

.signup-btn:hover,
.login-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--topnav-text, #fff);
}

.login-btn [data-auth-username] {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Accounts */
.auth-dialog {
  width: min(520px, calc(100vw - 24px));
  max-width: none;
  max-height: min(760px, calc(100dvh - 24px));
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 22px;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.auth-dialog::backdrop {
  background: rgba(34, 21, 48, 0.58);
  backdrop-filter: blur(3px);
}

.auth-card {
  position: relative;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: none;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 25px;
  line-height: 1;
}

.auth-close:hover {
  background: var(--accent-light);
  color: var(--accent-hover);
}
.auth-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.auth-header {
  padding-right: 28px;
}
.auth-header h1 {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 25px;
  line-height: 1.2;
}

.auth-header p {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.auth-header .auth-kicker {
  margin-bottom: 5px;
  color: var(--accent-hover);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 22px 0 18px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.auth-tabs button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.auth-tabs button.active {
  background: var(--surface);
  color: var(--accent-hover);
}
.auth-tabs button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.auth-form {
  display: grid;
  gap: 8px;
}
.auth-form label {
  margin-top: 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: none;
}
.auth-form small {
  margin: -2px 0 2px;
  color: var(--text-faint);
  font-size: 11.5px;
  line-height: 1.4;
}
.auth-error {
  margin-top: 5px;
  padding: 9px 11px;
  border-left: 3px solid var(--danger);
  border-radius: 8px;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.4;
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}
.acct-view .auth-header {
  margin-bottom: 20px;
}
.auth-state {
  padding: 24px 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.auth-list {
  max-height: 390px;
  display: grid;
  gap: 8px;
  overflow-y: auto;
  list-style: none;
}

.auth-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.auth-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.auth-title {
  overflow: hidden;
  color: var(--link);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-title:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
.auth-meta {
  overflow: hidden;
  color: var(--text-faint);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}
.acct-logout {
  width: 100%;
  margin-top: 18px;
}

#theme-toggle {
  height: 42px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--nav-link);
  cursor: pointer;
  font-size: 16px;
}

#theme-toggle:hover {
  color: #fff;
}

.theme-heart::before {
  content: var(--theme-light-emoji, "💜");
  width: 1.25em;
  height: 1.25em;
  display: grid;
  place-items: center;
  background-image: var(--theme-light-image, none);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  font-size: 16px;
  line-height: 1;
  text-align: center;
}

[data-theme="dark"] .theme-heart::before {
  content: var(--theme-dark-emoji, "💜");
  background-image: var(--theme-dark-image, none);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-heart::before {
    content: var(--theme-dark-emoji, "💜");
    background-image: var(--theme-dark-image, none);
  }
}

/* Main lavune.cc column */
#app {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 16px 60px;
}

.edit-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13.5px;
}

.required {
  max-width: 520px;
  margin: 54px auto;
  padding: 34px 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.required h1 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.25;
}

.required p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.required-acts {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

/* Editor */
.editor-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
}

.edit-view-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  -webkit-overflow-scrolling: touch;
}

.edit-view-tab {
  height: 40px;
  flex: 0 0 auto;
  padding: 0 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  transition:
    color 0.12s,
    border-color 0.12s,
    background 0.12s;
}

.edit-view-tab:hover {
  background: rgba(142, 114, 173, 0.06);
  color: var(--text);
}

.edit-view-tab.active {
  border-bottom-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
}

.edit-view-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

.char-count {
  display: none;
  margin-left: auto;
  color: var(--text-faint);
  font-size: 11px;
  white-space: nowrap;
}

.char-count.near-limit {
  display: inline;
  color: var(--danger);
}
.pane {
  display: none;
}
.pane.active {
  display: block;
}
.editor-col {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.editor-ta {
  width: 100%;
  min-height: 360px;
  display: block;
  padding: 14px 16px;
  border: 0;
  outline: 0;
  resize: vertical;
  background: var(--surface);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  tab-size: 4;
}

.editor-ta.split {
  min-height: 500px;
  resize: none;
}

.editor-invisible-wrapper {
  position: relative;
  width: 100%;
  min-width: 0;
}

.editor-invisible-wrapper > textarea {
  position: relative;
  z-index: 1;
  display: block;
}

textarea[data-editor-invisible-markers] {
  font-family:
    system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu,
    Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  font-size: 16px;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 24px;
  tab-size: 8;
}

.editor-invisible-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.editor-invisible-overlay[hidden] {
  display: none;
}

.editor-invisible-overlay-content {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: transparent;
  overflow-wrap: break-word;
  pointer-events: none;
  white-space: pre-wrap;
  word-break: normal;
}

.editor-invisible-marker {
  display: inline;
  color: #ff0000;
  font: inherit;
  line-height: inherit;
  text-shadow: none;
}

.editor-ta::placeholder {
  color: var(--text-faint);
  opacity: 0.9;
}
.editor-ta:focus {
  box-shadow: none;
}

.preview-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bg);
}

.demo-page-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.demo-topnav {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: var(--nav-bg);
  color: var(--topnav-text);
  font-size: 12px;
  font-weight: 600;
}

.demo-topnav strong {
  margin-right: 10px;
  font-size: 15px;
  font-weight: 900;
}
.demo-topnav span:nth-of-type(even) {
  opacity: 0.5;
}
.demo-theme-toggle {
  margin-left: auto;
  opacity: 1 !important;
}
.demo-app {
  position: relative;
  padding: 28px 0 60px;
}
.full-preview {
  width: 100%;
  background: transparent;
}
.demo-footer {
  padding: 0;
}
.demo-acts {
  pointer-events: none;
}

.demo-owner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #6c757d;
  font-size: 12px;
  line-height: 1.25;
}

.safety-flag {
  width: fit-content;
  margin: 0 0 10px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  color: var(--accent-hover);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.safety-warn {
  max-width: 620px;
  margin: 28px auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
  text-align: center;
}

.safety-warn h1 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.25;
}
.safety-warn p {
  margin-bottom: 18px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Collapsible metadata editor */
.meta-sec {
  border-top: 1px solid var(--border-light);
}

.meta-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
}

.meta-toggle:hover {
  color: var(--accent);
}
.meta-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.meta-toggle > span:first-child {
  flex: 1;
}
.meta-arrow {
  color: var(--text-faint);
  transition: transform 0.15s ease;
}
.meta-toggle[aria-expanded="true"] .meta-arrow {
  transform: rotate(90deg);
}

.metadata-body {
  padding: 14px 16px 16px;
  background: var(--surface);
}
.metadata-intro {
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.5;
}
.metadata-intro code {
  font-family: var(--mono);
  font-size: 12px;
}
.meta-groups {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.metadata-pill {
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.metadata-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.metadata-pill:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.metadata-input {
  width: 100%;
  min-height: 165px;
  margin-top: 10px;
  padding: 12px 13px;
  resize: vertical;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  outline: none;
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
}

.metadata-input:focus {
  border-color: var(--accent);
  box-shadow: none;
}
.metadata-input::placeholder {
  color: var(--text-faint);
}
.metadata-help {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 8px;
  color: var(--text-faint);
  font-size: 11.5px;
  line-height: 1.4;
}

.paste-music-editor {
  padding: 18px 24px 20px;
  border-top: 1px solid var(--border-light);
  background: color-mix(in srgb, var(--surface) 92%, var(--accent));
}

.paste-music-editor-head,
.paste-music-editor-fields,
.paste-music-range-row {
  display: flex;
  align-items: center;
}

.paste-music-editor-head {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 13px;
}

.paste-music-editor-head h2 {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.paste-music-editor-head p,
.paste-music-help {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 11.5px;
  line-height: 1.45;
}

.paste-music-note {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  color: var(--accent-hover);
  font-size: 10px;
  font-weight: 750;
}

.paste-music-editor-fields {
  align-items: flex-end;
  gap: 12px;
}

.paste-music-editor-fields > label {
  min-width: 0;
  flex: 1 1 auto;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
}

.paste-music-editor-fields > label > span:first-child {
  display: block;
  margin-bottom: 6px;
}

.paste-music-editor-fields .field-input {
  width: 100%;
}

.paste-music-editor-fields .paste-music-volume-editor {
  flex: 0 0 210px;
}

.paste-music-range-row {
  min-height: 38px;
  gap: 9px;
  padding: 0 11px;
  border: 1.5px solid var(--border);
  border-bottom: 2.5px solid var(--accent);
  border-radius: 12px 12px 6px 6px;
  background: var(--surface);
}

.paste-music-range-row input {
  width: 100%;
  accent-color: var(--accent);
}

.paste-music-range-row output {
  min-width: 34px;
  color: var(--text-muted);
  font-size: 11px;
  text-align: right;
}

.paste-music-help {
  margin-bottom: 0;
}

#metadata-character-count {
  white-space: nowrap;
}

.preview-body.md-body {
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 0;
  background: transparent;
}

/* The original lavune.cc settings row */
.settings-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 24px;
  border-top: 1px solid transparent;
  background: transparent;
}

.actions-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.settings-right {
  display: flex;
  gap: 6px;
  position: relative;
}
.setting {
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.setting label,
.field-prefix,
.setting small {
  display: none;
}
.field-inline {
  display: block;
}

.field-input {
  width: 210px;
  height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-bottom: 2.5px solid var(--accent);
  border-radius: 12px 12px 6px 6px;
  outline: 0;
  background: var(--surface);
  color: var(--text-muted);
  font:
    600 15px "Nunito",
    "Segoe UI",
    sans-serif;
}

.field-input::placeholder {
  color: var(--text-faint);
}
.field-input:focus {
  border-color: var(--accent);
  box-shadow: none;
}
.field-select {
  width: 150px;
  cursor: pointer;
}

/* Buttons */
.btn {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 20px;
  border: 1.5px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}

.btn-primary {
  border-color: transparent;
  background: var(--button-primary);
  color: #fff;
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--button-primary-hover);
}
.btn-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--bg);
  color: var(--accent);
}
.btn-danger {
  border-color: transparent;
  background: var(--danger);
  color: #fff;
}
.btn-danger:hover {
  opacity: 0.88;
}
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
.btn-sm {
  min-height: 30px;
  padding: 5px 14px;
  font-size: 12.5px;
}
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Messages */
.alert {
  display: none;
  margin: 10px 16px;
  padding: 10px 14px;
  border-left: 3px solid;
  border-radius: var(--radius);
  font-size: 13.5px;
  line-height: 1.4;
}

.alert:not([hidden]) {
  display: block;
}
.alert-error {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}
.alert-success {
  border-color: #6f9b78;
  background: #eef7f0;
  color: #416d4a;
}
[data-theme="dark"] .alert-success {
  background: #17271c;
  color: #9bc7a4;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .alert-success {
    background: #17271c;
    color: #9bc7a4;
  }
}

/* Paste view */
#paste-canvas.metadata-outer-background-canvas {
  min-height: calc(100vh - 130px);
}

.preview-paste-canvas.metadata-outer-background-canvas {
  min-height: 420px;
}

@supports (height: 100dvh) {
  #paste-canvas.metadata-outer-background-canvas {
    min-height: calc(100dvh - 130px);
  }
}

#entry-inner,
.preview-inner {
  position: relative;
  min-height: 80px;
  overflow: visible;
  padding: 28px 32px;
  border-radius: 0;
  background: var(--surface);
}

#edit-code-banner {
  margin: 0 0 10px;
  text-align: left;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
}

#edit-code-copy {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: copy;
}

#edit-code-copy code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent-hover);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

#edit-code-copy:hover code,
#edit-code-copy:focus-visible code {
  color: var(--accent);
}
#edit-code-copy:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
#edit-code-copy-status {
  margin-left: 5px;
  color: var(--text-faint);
  font-size: 11px;
}

#safety-page-flag {
  width: fit-content;
  margin: 0 0 10px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  color: var(--accent-hover);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

#safety-warning {
  max-width: 620px;
  margin: 28px auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: none;
  text-align: center;
}

#safety-warning h1 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.25;
}
#safety-warning p {
  margin-bottom: 18px;
  color: var(--text-muted);
  line-height: 1.55;
}

#paste-content.meta-active a,
#preview-output.meta-active a {
  color: var(--metadata-link-color, var(--link));
}

#paste-content.meta-active .text-color a,
#paste-content.meta-active .text-color a:hover,
#preview-output.meta-active .text-color a,
#preview-output.meta-active .text-color a:hover {
  color: inherit;
}

#paste-content.meta-active li::marker,
#preview-output.meta-active li::marker {
  color: var(--metadata-bullet-color, currentColor);
}

.blur-media img:not(.media-shown) {
  filter: blur(18px);
  cursor: pointer;
  user-select: none;
}

.blur-media img {
  transition: filter 0.18s ease;
}

.view-footer {
  display: flex;
  clear: both;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.view-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.paste-music {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.paste-music[hidden] {
  display: none;
}

.paste-music-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.paste-music-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.paste-music-volume {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.paste-music-volume input {
  width: clamp(64px, 20vw, 90px);
  margin: 0;
  accent-color: var(--accent);
}

.paste-music-volume output {
  min-width: 31px;
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1;
  text-align: right;
}

.paste-music-volume input:disabled + output {
  opacity: 0.55;
}

.view-side {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

#view-dates,
#view-owner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #6c757d;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.25;
}

#view-owner,
.view-side .demo-owner {
  align-items: flex-end;
  text-align: right;
}

#view-owner a {
  color: var(--paste-owner-link-color, var(--link));
  font-weight: 700;
  text-decoration: none;
}

#view-owner a:hover {
  color: var(--paste-owner-link-color, var(--link-hover));
  text-decoration: underline;
}
#preview-owner-name {
  color: var(--paste-owner-link-color, var(--link));
  font-weight: 700;
}

@media (max-width: 560px) {
  .view-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .view-side {
    grid-row: 1;
    grid-column: 2;
    width: auto;
    margin-left: 0;
    justify-self: end;
  }
}

/* Rendered Markdown copied from the former lavune.cc frontend */
.md-body {
  min-width: 0;
  overflow-wrap: break-word;
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  word-break: normal;
}

/* Let CONTENT_TEXT_SHADOW_* reach rendered Markdown children despite the global shadow reset. */
.md-body.meta-active *,
.md-body.meta-active *::before,
.md-body.meta-active *::after {
  text-shadow: inherit;
}

.md-body h1,
.md-body h2,
.md-body h3,
.md-body h4,
.md-body h5,
.md-body h6 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: inherit;
  font-weight: 500;
  line-height: 1.2;
}

.md-body h1 {
  font-size: 2.5rem;
}
.md-body h2 {
  font-size: 2rem;
}
.md-body h3 {
  font-size: 1.75rem;
}
.md-body h4 {
  font-size: 1.5rem;
}
.md-body h5 {
  font-size: 1.25rem;
}
.md-body h6 {
  font-size: 1rem;
}
.md-body p {
  margin: 0 0 1rem;
}
.md-body p:last-child {
  margin-bottom: 0;
}
.md-body a {
  color: var(--link);
  text-decoration: none;
}
.md-body a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}
.md-body .text-color a,
.md-body .text-color a:hover {
  color: inherit;
}
.md-body strong {
  font-weight: 700;
}
.md-body em {
  font-style: italic;
}
.md-body del {
  text-decoration: line-through;
  opacity: 0.7;
}
.md-body ul,
.md-body ol {
  margin: 0 0 1rem;
  padding-left: 2rem;
}
.md-body ul ul,
.md-body ul ol,
.md-body ol ul,
.md-body ol ol {
  margin-bottom: 0;
}
.md-body blockquote {
  margin: 0 0 1rem;
  padding: 0.5rem 1rem;
  border-left: 3px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--blockquote-bg);
  color: var(--text-muted);
}

.md-body blockquote p:last-child {
  margin-bottom: 0;
}
.md-body hr {
  margin: 1rem 0;
  border: 0;
  border-top: 1px solid var(--border);
}
.md-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0;
  vertical-align: middle;
}
.md-body code {
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--accent-hover);
  font-family: var(--mono);
  font-size: 87.5%;
}

.md-body pre {
  display: block;
  overflow: auto;
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--code-bg);
  -webkit-overflow-scrolling: touch;
}

.md-body pre code {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}
.md-body table {
  width: 100%;
  display: block;
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 1rem;
  border-collapse: collapse;
}
.md-body th,
.md-body td {
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border-light);
  vertical-align: top;
}
.md-body th {
  background: var(--bg);
  font-weight: 600;
}
.md-body input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}
.md-body .md-mark {
  padding: 0 0.12em;
  background: #ffe78c;
  color: #2d2335;
}

.md-body .md-spoiler {
  padding: 0 0.18em;
  border-radius: 3px;
  outline: none;
  background: var(--text);
  color: transparent;
  cursor: pointer;
  text-shadow: none;
}

.md-body .md-spoiler:hover,
.md-body .md-spoiler:focus-visible,
.md-body .md-spoiler.spoiler-open {
  background: var(--code-bg);
  color: inherit;
  text-shadow: inherit;
}

.md-body .md-underline {
  text-decoration-line: underline;
}
.md-body .line-solid {
  text-decoration-style: solid;
}
.md-body .line-double {
  text-decoration-style: double;
}
.md-body .line-dotted {
  text-decoration-style: dotted;
}
.md-body .line-dashed {
  text-decoration-style: dashed;
}
.md-body .line-wavy {
  text-decoration-style: wavy;
}
.md-body .line-strike {
  text-decoration-line: line-through;
}
.md-body .line-overline {
  text-decoration-line: overline;
}
.md-body .line-both {
  text-decoration-line: underline line-through;
}
.md-body .align-center {
  text-align: center;
}
.md-body .align-right {
  text-align: right;
}
.md-body .align-line {
  display: block;
}

.md-body .md-toc {
  margin: 0 0 1rem;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: var(--code-bg);
}

.md-body .md-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.md-body .md-toc li {
  margin: 3px 0;
}
.md-body .toc-2 {
  padding-left: 1rem;
}
.md-body .toc-3 {
  padding-left: 2rem;
}
.md-body .toc-4 {
  padding-left: 3rem;
}
.md-body .toc-5 {
  padding-left: 4rem;
}
.md-body .toc-6 {
  padding-left: 5rem;
}

.md-body .callout {
  margin: 0 0 1rem;
  padding: 12px 14px;
  border-left: 4px solid var(--accent);
  background: var(--accent-light);
}

.md-body .callout-title {
  margin-bottom: 5px;
  font-weight: 700;
}
.md-body .callout-body > :last-child {
  margin-bottom: 0;
}
.md-body .callout-info {
  border-left-color: #4d91d9;
}
.md-body .callout-note {
  border-left-color: var(--accent);
}
.md-body .callout-warn {
  border-left-color: #d59430;
}
.md-body .callout-danger {
  border-left-color: var(--danger);
}
.md-body .callout-green {
  border-left-color: #5c9d65;
  color: #4c8b55;
}

.md-body img.md-image-left {
  float: left;
  margin: 0 20px 0 0;
}
.md-body img.md-image-right {
  float: right;
  margin: 0 0 0 20px;
}
.md-body .float-clear {
  clear: both;
}
.profile-bio.md-body::after,
.mini-bio.md-body::after,
.demo-bio.md-body::after {
  display: table;
  clear: both;
  content: "";
}
.empty-state {
  color: var(--text-muted);
  font-size: 13px;
}

/* Profiles and account dashboard */
#account-page,
#profile-page,
#admin-page {
  width: min(100%, 1000px);
  margin: 0 auto;
}

.page-alert {
  margin: 0 0 16px;
}

.dash-head {
  margin: 4px 0 24px;
  text-align: center;
}

.dash-head h1 {
  color: var(--accent-hover);
  font-family: "Pacifico", "Fredoka", cursive;
  font-size: clamp(2.5rem, 7vw, 3.6rem);
  font-weight: 400;
  line-height: 1.15;
  transform: rotate(-1.5deg);
}

.dash-head p {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.5;
}

.admin-link {
  margin-top: 10px;
}

.dash-load {
  padding: 70px 20px;
  color: var(--text-muted);
  font-size: 14px;
  text-align: center;
}

#account-guest h2 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 24px;
  line-height: 1.25;
}

.account-page {
  display: grid;
  gap: 16px;
}

.dashboard-card,
.profile-card,
.paste-section {
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
}

.dashboard-card {
  overflow: hidden;
}
.dash-body {
  padding: 24px;
}
.two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.dash-sec-head,
.profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.dash-sec-head h2,
.profile-head h2,
.profile-title h2 {
  color: var(--text);
  font-size: 18px;
  font-weight: 750;
  line-height: 1.25;
}

.dash-kicker {
  margin-bottom: 4px;
  color: var(--accent-hover);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.count-bubble {
  min-width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 800;
}

.count-text {
  margin-left: 4px;
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 600;
}

.dash-empty,
.inline-empty {
  padding: 22px 14px;
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.profile-banner {
  position: relative;
  z-index: 0;
  overflow: hidden;
  background: var(--accent-light);
}

.profile-banner::after {
  content: none;
}

.profile-banner img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acct-banner {
  height: 148px;
}
.profile-demo {
  position: relative;
  overflow: hidden;
}
.acct-identity {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding: 0 24px 19px;
}

.acct-page-img {
  position: absolute;
  right: 22px;
  bottom: 14px;
  z-index: 3;
  width: 88px;
  height: 104px;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
}

.profile-demo.has-page-img .acct-identity {
  padding-right: 132px;
}

.acct-identity h2 {
  margin-bottom: 2px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.2;
}

.acct-user {
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.25;
}

.acct-status {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 5px;
  overflow: hidden;
  color: var(--accent-hover);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-path {
  color: var(--link);
  font-size: 12.5px;
  line-height: 1.35;
}

.acct-identity a {
  color: var(--link);
  font-size: 12.5px;
  text-decoration: none;
}

.acct-identity a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

.profile-avatar {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid var(--surface);
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent-hover);
  font-weight: 800;
}

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

.acct-avatar {
  width: 88px;
  height: 88px;
  margin-top: -42px;
  font-size: 30px;
}

.profile-prefs .dash-body {
  border-top: 1px solid var(--border-light);
}
.profile-switch {
  display: flex;
  gap: 6px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg);
}
.profile-switch button {
  min-width: 82px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}
.profile-switch button[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-hover);
}
.profile-switch button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.profile-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.profile-field {
  min-width: 0;
  display: grid;
  gap: 7px;
}

.profile-field > span,
.img-url > span {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.img-url {
  display: grid;
  gap: 7px;
}

.profile-field input,
.profile-field textarea,
.friend-search input {
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  outline: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.profile-field input {
  height: 44px;
  padding: 0 13px;
}
.profile-field textarea {
  min-height: 104px;
  padding: 11px 13px;
  resize: vertical;
  line-height: 1.5;
}
.profile-field input:focus,
.profile-field textarea:focus,
.friend-search input:focus {
  border-color: var(--accent);
  box-shadow: none;
}

.profile-field small {
  color: var(--text-faint);
  font-size: 11.5px;
  line-height: 1.4;
}

.profile-field .float-opt {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  background: var(--bg);
  cursor: pointer;
}

.profile-field .float-opt input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--accent);
}

.float-opt > span {
  display: grid;
  gap: 2px;
}

.float-opt strong {
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.25;
}

.profile-field .float-opt input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.name-field,
.bio-field,
.links-field {
  grid-column: 1 / -1;
}
.bio-field small {
  text-align: right;
}
.bio-help {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.bio-help > :last-child {
  flex: 0 0 auto;
  text-align: right;
}
.save-profile {
  width: fit-content;
}
.color-prefs {
  min-width: 0;
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
}

.color-prefs > legend {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
}

.color-prefs > p {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.color-mode {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--bg);
}

.color-mode > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--accent-hover);
}

.color-mode h3 {
  font-size: 13px;
  font-weight: 750;
}
.color-mode header span {
  font-size: 17px;
}
.profile-colors {
  display: grid;
  gap: 7px;
}
.color-control {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(74px, 1fr) 34px 78px;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.color-control input[type="color"] {
  width: 34px;
  height: 30px;
  padding: 2px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  cursor: pointer;
}

.color-control input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-control input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 5px;
}
.color-control input[type="color"]::-moz-color-swatch {
  border: 0;
  border-radius: 5px;
}
.color-control input[type="color"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.color-control .color-hex {
  width: 78px;
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 10.5px;
  text-align: left;
}
.color-control .color-hex:focus {
  border-color: var(--accent);
  box-shadow: none;
}
.color-control .color-hex[aria-invalid="true"] {
  border-color: var(--danger);
}

.demo-sec {
  margin-top: 16px;
}
.demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.demo-head h3 {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}
.demo-head p {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 11.5px;
  line-height: 1.4;
}
.demo-modes {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
}
.demo-modes button {
  min-width: 54px;
  padding: 5px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 700;
}
.demo-modes button[aria-pressed="true"] {
  background: var(--accent-light);
  color: var(--accent-hover);
}
.demo-modes button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-preview-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 12px;
}

.theme-preview-choice {
  min-width: 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.theme-preview-choice:hover {
  border-color: var(--accent);
}

.theme-preview-choice[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-light);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 17%, transparent);
}

.theme-preview-choice:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.theme-preview-image {
  --theme-thumb-background: #f4f1f5;
  --theme-thumb-surface: #faf8fb;
  --theme-thumb-text: #514a54;
  --theme-thumb-accent: #76687e;
  --theme-thumb-navigation: #dfd8e3;
  --theme-thumb-paste-card: #f0ecf2;
  position: relative;
  width: 112px;
  height: 70px;
  display: block;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--theme-thumb-text) 18%, transparent);
  border-radius: 9px;
  background: var(--theme-thumb-background);
}

.theme-preview-nav {
  position: absolute;
  inset: 0 0 auto;
  height: 13px;
  background: var(--theme-thumb-navigation);
}

.theme-preview-card {
  position: absolute;
  inset: 20px 8px 7px;
  border-radius: 7px;
  background: var(--theme-thumb-surface);
}

.theme-preview-avatar {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--theme-thumb-accent);
}

.theme-preview-lines {
  position: absolute;
  top: 8px;
  left: 27px;
  width: 39px;
  height: 12px;
  border-radius: 2px;
  background:
    linear-gradient(var(--theme-thumb-text), var(--theme-thumb-text)) 0 0 / 32px 3px no-repeat,
    linear-gradient(color-mix(in srgb, var(--theme-thumb-text) 46%, transparent), color-mix(in srgb, var(--theme-thumb-text) 46%, transparent)) 0 8px / 39px 2px no-repeat;
}

.theme-preview-button {
  position: absolute;
  right: 7px;
  bottom: 6px;
  width: 27px;
  height: 8px;
  border-radius: 4px;
  background: var(--theme-thumb-accent);
}

.theme-preview-card::after {
  position: absolute;
  right: 7px;
  bottom: 18px;
  left: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--theme-thumb-paste-card);
  content: "";
}

.theme-preview-caption {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.theme-preview-caption strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-preview-caption small {
  color: var(--text-faint);
  font-size: 10px;
}

.demo-view {
  --preview-background: #f4f1f5;
  --preview-surface: #faf8fb;
  --preview-text: #514a54;
  --preview-muted: #706875;
  --preview-faint: #9a919e;
  --preview-border: #e4dee7;
  --preview-accent: #76687e;
  --preview-accent-soft: #ebe6ee;
  --preview-navigation: #dfd8e3;
  --preview-navigation-text: #514a54;
  --preview-paste-button: #76687e;
  --preview-paste-button-text: #faf8fb;
  --preview-friend-button: #f0ecf2;
  --preview-friend-button-text: #514a54;
  --preview-category-button: #f0ecf2;
  --preview-category-button-text: #514a54;
  --preview-paste-card: #f0ecf2;
  --preview-paste-card-text: #514a54;
  --preview-link-panel: #ebe6ee;
  --preview-link-button: #f7f4f8;
  --preview-link-button-text: #514a54;
  width: min(100%, 540px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--preview-background);
}
.demo-nav {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 12px;
  background: var(--preview-navigation);
  color: var(--preview-navigation-text);
  font-size: 9px;
}
.demo-nav strong {
  font-size: 12px;
}
.demo-page {
  max-height: 390px;
  padding: 14px;
  overflow: auto;
  background: var(--preview-background);
  color: var(--preview-text);
}
.demo-card {
  overflow: hidden;
  border: 1px solid var(--preview-border);
  border-radius: 12px;
  background: var(--preview-surface);
}
.demo-banner {
  position: relative;
  height: 76px;
  overflow: hidden;
  background: var(--preview-navigation);
}
.demo-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.demo-body {
  padding: 0 15px 15px;
}
.demo-avatar {
  position: relative;
  z-index: 2;
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: -27px;
  overflow: hidden;
  border: 3px solid var(--preview-surface);
  border-radius: 50%;
  background: var(--preview-accent-soft);
  color: var(--preview-accent);
  font-size: 19px;
  font-weight: 800;
}
.demo-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.demo-name-box {
  margin-top: 5px;
}
.demo-name-box > h4 {
  color: var(--preview-text);
  font-size: 15px;
  font-weight: 750;
}
.demo-user-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 2px;
  color: var(--preview-muted);
  font-size: 8.5px;
  line-height: 1.2;
}
.profile-badges.demo-badges {
  --badge-surface: var(--preview-surface);
  --badge-text: var(--preview-text);
  --badge-accent: var(--preview-accent);
  gap: 3px;
}
.demo-badges .profile-badge {
  padding: 2px 5px;
  font-size: 7px;
}
.demo-bio.md-body {
  margin-top: 5px;
  overflow: hidden;
  color: var(--preview-muted);
  font-size: 10.5px;
  line-height: 1.45;
}
.demo-bio.md-body h1,
.demo-bio.md-body h2,
.demo-bio.md-body h3,
.demo-bio.md-body h4,
.demo-bio.md-body h5,
.demo-bio.md-body h6 {
  margin-bottom: 4px;
  font-size: 12px;
}
.demo-bio.md-body p {
  margin-bottom: 5px;
}
.demo-bio.md-body img {
  max-width: 100%;
}
.demo-bio.is-empty {
  color: var(--preview-faint);
  font-style: italic;
}
.demo-links-box {
  margin-top: 8px;
  padding: 7px;
  border: 1px solid var(--preview-border);
  border-radius: 8px;
  background: var(--preview-link-panel);
}
.demo-links-box > strong {
  display: block;
  margin-bottom: 5px;
  color: var(--preview-link-button-text);
  font-size: 8px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.demo-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}
.demo-link {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  overflow: hidden;
  border: 1px solid var(--preview-border);
  border-radius: 6px;
  background: var(--preview-link-button);
  color: var(--preview-link-button-text);
  font-size: 8.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.demo-link > span {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  font-size: 7px;
  font-weight: 800;
}
.demo-link > span img {
  width: 12px;
  height: 12px;
  object-fit: contain;
}
.demo-sec-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--preview-text);
  font-size: 9.5px;
}
.demo-friend {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--preview-friend-button);
  color: var(--preview-friend-button-text);
  font-weight: 700;
}
.demo-cat {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--preview-category-button);
  color: var(--preview-category-button-text);
  font-weight: 700;
}
.demo-paste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  padding: 9px;
  border: 1px solid var(--preview-border);
  border-radius: 8px;
  background: var(--preview-paste-card);
  color: var(--preview-paste-card-text);
  font-size: 9px;
}
.demo-paste > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.demo-paste > div > span {
  color: var(--preview-paste-card-text);
}
.demo-btn {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 6px;
  background: var(--preview-paste-button);
  color: var(--preview-paste-button-text);
  font-weight: 750;
}

.profile-btns {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.people-list {
  display: grid;
  gap: 8px;
}
.person-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 13px;
  background: var(--bg);
}

.person-info {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.person-info:hover strong {
  color: var(--link);
}
.person-avatar {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent-hover);
  font-size: 15px;
  font-weight: 800;
}

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

.person-name {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.person-name strong {
  overflow: hidden;
  font-size: 13.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.person-name small {
  color: var(--text-faint);
  font-size: 10.5px;
  line-height: 1.25;
}
.person-acts {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.friends-head {
  align-items: flex-end;
}
.friend-search {
  display: flex;
  align-items: center;
  gap: 7px;
}
.friend-search input {
  width: 180px;
  height: 36px;
  padding: 0 11px;
  font-size: 13px;
}
.friend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.friend-card {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--border-light);
  border-radius: 13px;
  background: var(--bg);
}

.friend-del-btn {
  padding: 5px;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 10.5px;
}
.friend-del-btn:hover {
  color: var(--danger);
}
.friend-del-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Profile paste categories */
.category-head {
  align-items: flex-end;
}
.cat-form {
  display: flex;
  align-items: center;
  gap: 7px;
}
.cat-form input {
  width: min(260px, 42vw);
  height: 36px;
  padding: 0 11px;
  font-size: 13px;
}
.category-help {
  margin: -2px 0 13px;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.5;
}
.cat-edit-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.cat-edit {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 14px;
  background: var(--bg);
}
.cat-edit-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.cat-name-field {
  min-width: 0;
  flex: 1;
}
.cat-name-field > span {
  display: block;
  margin-bottom: 5px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
}
.cat-name-field input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
}
.cat-count {
  flex: 0 0 auto;
  padding-bottom: 9px;
  color: var(--text-faint);
  font-size: 10.5px;
}
.cat-picker {
  max-height: 205px;
  display: grid;
  gap: 5px;
  margin-top: 11px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  border-radius: 11px;
  background: var(--surface);
}
.cat-option {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}
.cat-option:hover {
  background: var(--accent-light);
}
.cat-option input {
  flex: 0 0 auto;
  accent-color: var(--accent);
}
.cat-option > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}
.cat-option strong,
.cat-option small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-option strong {
  font-size: 12px;
}
.cat-option small {
  color: var(--text-faint);
  font-family: var(--mono);
  font-size: 9.5px;
}
.cat-edit-acts {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.order-btn {
  min-width: 32px;
  padding-inline: 8px;
}
.cat-empty {
  padding: 10px;
  color: var(--text-faint);
  font-size: 11px;
}

/* Public profile directory */
.profile-dir {
  width: min(880px, calc(100% - 32px));
  margin: 56px auto;
}

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

.home-guestbook {
  height: 760px;
  margin-top: 28px;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: var(--surface);
  box-shadow: none;
}

.home-guestbook iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.mini-profile {
  min-width: 0;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--mini-accent) 24%, var(--mini-surface));
  border-radius: 22px;
  background: var(--mini-surface);
  color: var(--mini-text);
  box-shadow: none;
}

.mini-banner {
  position: relative;
  height: 132px;
  overflow: hidden;
  background: var(--mini-navigation);
}

.mini-banner::after {
  content: none;
}

.mini-banner img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mini-body {
  position: relative;
  padding: 0 22px 22px;
}

.mini-avatar {
  --surface: var(--mini-surface);
  --accent-light: color-mix(in srgb, var(--mini-accent) 16%, var(--mini-surface));
  --accent-hover: var(--mini-accent);
  width: 86px;
  height: 86px;
  margin-top: -43px;
  font-size: 29px;
}

.mini-name-row {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.mini-name-row > div {
  min-width: 0;
}
.mini-name-row h2 {
  overflow: hidden;
  color: var(--mini-text);
  font-size: 22px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-user-row {
  --badge-surface: var(--mini-surface);
  --badge-text: var(--mini-text);
  --badge-accent: var(--mini-accent);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 3px;
  color: color-mix(in srgb, var(--mini-text) 62%, var(--mini-surface));
  font-size: 12px;
  line-height: 1.3;
}

.mini-status {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  overflow: hidden;
  color: var(--mini-accent);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-status span,
.profile-status span {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
}

.mini-count {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--mini-accent) 13%, var(--mini-surface));
  color: var(--mini-accent);
  font-size: 10.5px;
  font-weight: 800;
}

.mini-bio {
  min-height: 58px;
  display: -webkit-box;
  margin-top: 13px;
  overflow: hidden;
  color: color-mix(in srgb, var(--mini-text) 72%, var(--mini-surface));
  font-size: 13px;
  line-height: 1.48;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.mini-bio.bio-images {
  display: block;
  min-height: 0;
  overflow: visible;
  -webkit-line-clamp: unset;
}

.mini-bio.bio-images p {
  margin-bottom: 7px;
}
.mini-bio.bio-images p:last-child {
  margin-bottom: 0;
}
.mini-bio.bio-images h1,
.mini-bio.bio-images h2,
.mini-bio.bio-images h3,
.mini-bio.bio-images h4,
.mini-bio.bio-images h5,
.mini-bio.bio-images h6 {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.mini-bio.bio-images img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: none;
  display: inline;
  margin: 0;
  vertical-align: -0.15em;
}

.mini-bio.bio-images ul,
.mini-bio.bio-images ol {
  margin-bottom: 7px;
  padding-left: 18px;
}

.mini-body.has-card-image .mini-bio {
  padding-right: 122px;
}

.mini-card-img {
  position: absolute;
  right: 20px;
  bottom: 10px;
  width: 108px;
  height: 132px;
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
}

.mini-open {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 15px;
  padding: 7px 15px;
  border-radius: var(--radius-pill);
  background: var(--mini-button);
  color: var(--mini-button-text);
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.mini-open:hover {
  color: var(--mini-button-text);
  filter: brightness(0.94);
}

.mini-open:focus-visible {
  outline: 2px solid var(--mini-accent);
  outline-offset: 3px;
}

/* Public profile */
.profile-card {
  --profile-page-image-size: clamp(220px, 28vw, 280px);
  position: relative;
  overflow: hidden;
}
.profile-cover {
  height: 210px;
}
.profile-body {
  padding: 0 30px 28px;
}
.profile-card.has-page-img .profile-body {
  min-height: 200px;
  padding-right: calc(var(--profile-page-image-size) + 50px);
}

.profile-art {
  position: absolute;
  right: 24px;
  bottom: 18px;
  z-index: 3;
  width: var(--profile-page-image-size);
  height: var(--profile-page-image-size);
  object-fit: contain;
  object-position: center bottom;
  pointer-events: none;
}

.floats {
  transform-origin: center bottom;
  animation: softFloat 3.8s ease-in-out infinite;
}

@keyframes softFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-7px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .floats {
    animation: none !important;
  }
}

.profile-top {
  min-height: 66px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.profile-photo {
  width: 168px;
  height: 168px;
  margin-top: -84px;
  font-size: 52px;
}

.profile-info,
.profile-copy {
  min-width: 0;
}

.profile-card.has-links .profile-info {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(210px, 260px);
  align-items: start;
  gap: 24px;
}

.links-panel {
  min-width: 0;
  margin-top: -76px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--profile-link-panel, var(--bg));
}

.links-panel .dash-kicker {
  margin-bottom: 9px;
  color: var(--profile-link-button-text, var(--text));
}

.profile-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profile-link {
  min-width: 0;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--profile-link-button, var(--profile-friend-button, var(--surface)));
  color: var(--profile-link-button-text, var(--profile-friend-button-text, var(--text)));
  font-size: 12px;
  font-weight: 750;
  text-decoration: none;
}

.profile-link:hover {
  border-color: var(--accent);
}

.profile-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.link-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: transparent;
  color: var(--profile-link-button-text, var(--text));
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.link-icon img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.link-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-acts {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
  padding-top: 14px;
}

.profile-acts .btn {
  border-color: var(--accent);
  background: transparent;
  color: var(--accent-hover);
}
.profile-acts .btn:hover {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-hover);
}

.name-block {
  margin-top: 3px;
}

.name-block h1 {
  color: var(--text);
  font-size: 28px;
  font-weight: 750;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.user-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.profile-status {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0 0;
  padding: 5px 9px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border));
  border-radius: var(--radius-pill);
  background: var(--accent-light);
  color: var(--accent-hover);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-status {
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  color: var(--preview-accent);
  font-size: 7px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.username {
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.profile-badges {
  --badge-surface: var(--surface);
  --badge-text: var(--text);
  --badge-accent: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.profile-badge {
  padding: 3px 7px;
  border: 1px solid;
  border-radius: var(--radius-pill);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.035em;
  line-height: 1;
}

.badge-owner {
  border-color: color-mix(in srgb, #b67f18 62%, var(--badge-surface));
  background: color-mix(in srgb, #e5b94f 16%, var(--badge-surface));
  color: color-mix(in srgb, #a46d08 74%, var(--badge-text));
}

.badge-admin {
  border-color: color-mix(in srgb, var(--badge-accent) 62%, var(--badge-surface));
  background: color-mix(in srgb, var(--badge-accent) 14%, var(--badge-surface));
  color: color-mix(in srgb, var(--badge-accent) 72%, var(--badge-text));
}

.profile-bio {
  max-width: 660px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  white-space: normal;
}

.profile-bio.is-empty {
  color: var(--text-faint);
  font-style: italic;
}
.profile-bio.is-empty {
  white-space: pre-wrap;
}
.profile-bio img {
  max-width: 100%;
}

.profile-music {
  display: flex;
  align-items: center;
  margin-top: 14px;
}

.profile-music-toggle {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 13px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--profile-category-button, var(--bg));
  color: var(--profile-category-button-text, var(--text));
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
}

.profile-music-toggle:hover {
  filter: brightness(0.95);
}

.profile-music-toggle[aria-pressed="true"] {
  background: var(--profile-paste-button, var(--accent));
  color: var(--profile-paste-button-text, var(--surface));
}

.profile-music-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.profile-music-toggle:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

.profile-music-icon {
  font-size: 15px;
  line-height: 1;
}

.friends-box {
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

.profile-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.profile-title span {
  color: var(--text-faint);
  font-size: 12px;
  font-weight: 700;
}
.friend-list {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.public-friend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px 6px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--profile-friend-button, var(--bg));
  color: var(--profile-friend-button-text, var(--text));
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
}

.public-friend .person-avatar {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  font-size: 11px;
}
.public-friend:hover {
  border-color: var(--accent);
  color: var(--profile-friend-button-text, var(--text));
}
.inline-empty {
  padding: 13px;
  text-align: left;
}
.paste-section {
  margin-top: 16px;
  padding: 24px;
}
.cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -3px 0 15px;
}
.cat-tab {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--profile-category-button, var(--bg));
  color: var(--profile-category-button-text, var(--text-muted));
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
}
.cat-tab:hover {
  border-color: var(--accent);
  color: var(--profile-category-button-text, var(--text-muted));
}
.cat-tab.active {
  border-color: var(--accent);
  background: var(--profile-category-button, var(--bg));
  color: var(--profile-category-button-text, var(--text-muted));
}
.cat-tab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.paste-entry {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--profile-paste-card, var(--bg));
  color: var(--profile-paste-card-text, var(--text));
}

.paste-head {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.paste-identity {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.paste-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  color: var(--profile-paste-card-text, var(--text));
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paste-favicon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  border-radius: 4px;
  object-fit: contain;
}

.paste-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.paste-title:hover {
  color: var(--profile-paste-card-text, var(--text));
  text-decoration: underline;
}
.paste-path {
  overflow: hidden;
  margin-top: 4px;
  color: var(--profile-paste-card-text, var(--accent-hover));
  font-family: var(--mono);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.entry-note {
  max-width: 48%;
  flex: 0 1 auto;
  margin: 0 0 0 auto;
  overflow-wrap: anywhere;
  color: var(--profile-paste-card-text, var(--text-muted));
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
  white-space: normal;
}
.note-editor {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
}
.note-editor .field-input {
  min-width: 0;
  height: 32px;
  flex: 1 1 auto;
  padding: 6px 9px;
  font-size: 11px;
}
.note-editor .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.paste-meta {
  margin-top: 14px;
  color: var(--profile-paste-card-text, var(--text-faint));
  font-size: 10.5px;
  line-height: 1.45;
}
.paste-open {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 13px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--profile-paste-button, var(--accent));
  color: var(--profile-paste-button-text, var(--surface));
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.paste-open:hover {
  color: var(--profile-paste-button-text, var(--surface));
  opacity: 0.9;
  text-decoration: none;
}
.paste-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 13px;
}

.reset-request {
  font-size: 10.5px;
}

.reset-dialog {
  width: min(440px, calc(100vw - 24px));
  max-width: none;
  margin: auto;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.reset-dialog::backdrop {
  background: rgba(34, 21, 48, 0.62);
  backdrop-filter: blur(3px);
}

.reset-card {
  padding: 26px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.reset-card h2 {
  margin: 3px 0 8px;
  color: var(--text);
  font-size: 22px;
}

.reset-card > p:not(.dash-kicker) {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.reset-value {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 18px 0 11px;
  padding: 11px 12px 11px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.reset-value > span {
  color: var(--text);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.reset-warning {
  color: var(--text-faint) !important;
  font-size: 11.5px !important;
}
.reset-done {
  width: 100%;
  margin-top: 18px;
}

.reset-privacy {
  margin: -5px 0 16px;
  padding: 11px 13px;
  border: 1px solid var(--border-light);
  border-radius: 11px;
  background: var(--accent-light);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
}

.reset-list {
  display: grid;
  gap: 9px;
}
.reset-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 13px;
  background: var(--bg);
}
.reset-info {
  min-width: 0;
}
.reset-info > a {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reset-info > a:hover {
  color: var(--link);
  text-decoration: underline;
}
.reset-info p {
  margin-top: 4px;
  color: var(--text-faint);
  font-size: 10.5px;
  line-height: 1.45;
}
.reset-info p a {
  color: var(--link);
  text-decoration: none;
}
.reset-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 820px) {
  .friend-grid,
  .cat-edit-list,
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .mini-grid {
    grid-template-columns: 1fr;
  }
  .home-guestbook {
    height: 680px;
    margin-top: 20px;
    border-radius: 18px;
  }
  .two-column {
    grid-template-columns: 1fr;
  }
  .mode-grid {
    grid-template-columns: 1fr;
  }
  .friends-head,
  .category-head {
    align-items: stretch;
    flex-direction: column;
  }
  .friend-search input {
    width: 100%;
  }
  .profile-cover {
    height: 190px;
  }
  .profile-body {
    padding: 0 24px 24px;
  }
  .profile-card.has-page-img .profile-body {
    min-height: 0;
    padding-right: 24px;
  }
  .profile-card.has-links .profile-info {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .links-panel {
    width: min(100%, 420px);
    margin-top: 0;
  }
  .profile-art {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(230px, calc(100% - 48px));
    height: 230px;
    margin: -8px 24px 24px auto;
  }
  .profile-photo {
    width: 132px;
    height: 132px;
    margin-top: -66px;
    font-size: 44px;
  }
  .profile-top {
    min-height: 62px;
  }
  .profile-acts {
    padding-top: 12px;
  }
  .name-block h1 {
    font-size: 26px;
  }
  .reset-row {
    align-items: stretch;
    flex-direction: column;
  }
  .reset-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .dash-body,
  .paste-section {
    padding: 20px 18px;
  }
  .acct-identity {
    padding-right: 20px;
    padding-left: 20px;
  }
  .profile-demo.has-page-img .acct-identity {
    padding-right: 110px;
  }
  .acct-page-img {
    right: 16px;
    width: 76px;
    height: 92px;
  }
  .mini-card-img {
    right: 16px;
    width: 96px;
    height: 118px;
  }
  .mini-body.has-card-image .mini-bio {
    padding-right: 106px;
  }
  .friend-grid,
  .cat-edit-list {
    grid-template-columns: 1fr;
  }
  .profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .profile-top {
    align-items: flex-start;
  }
  .profile-acts {
    max-width: none;
    padding-bottom: 5px;
  }
  .profile-acts .btn {
    padding-right: 12px;
    padding-left: 12px;
  }
}

/* How page */
#how-page {
  max-width: 880px;
  margin: 0 auto;
}
.how-hero {
  max-width: 430px;
  margin: 30px auto 22px;
  padding: 12px 16px 8px;
  text-align: center;
}

.how-title {
  margin: 0;
  color: var(--accent-hover);
  font-family: "Pacifico", "Fredoka", cursive;
  font-size: clamp(2.75rem, 7vw, 3.6rem);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1;
  transform: rotate(-1.5deg);
}

.how-sub {
  position: relative;
  width: fit-content;
  margin: 15px auto 4px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.055em;
  line-height: 1.2;
}

/* How page */
.how-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 8px;
}
.how-section {
  overflow-x: auto;
  padding: 26px 28px;
  border: 1.5px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: none;
}

.how-sec-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px dashed var(--border);
}

.how-section h2 {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.how-section p {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.6;
}
.meta-ref-intro {
  margin-bottom: 16px;
}
.meta-ref-intro code {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--accent-hover);
  font-family: var(--mono);
  font-size: 12px;
}

.meta-ref-group {
  overflow-x: auto;
  overflow-y: hidden;
  margin-top: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}

.meta-ref-group h3 {
  margin: 0;
  padding: 10px 13px;
  border-bottom: 1px solid var(--border);
  background: var(--accent-light);
  color: var(--accent-hover);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.045em;
}

.meta-ref-group .ref-table {
  border: 0;
  border-radius: 0;
}

.meta-ref-table {
  min-width: 760px;
}
.meta-ref-table td:nth-child(2) {
  border-right: 1px solid var(--border-light);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: 12px;
}

.meta-ref-table th:first-child {
  width: 31%;
}
.meta-ref-table th:nth-child(2) {
  width: 27%;
}
.ref-table {
  width: 100%;
  min-width: 520px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  border-collapse: separate;
  border-spacing: 0;
}

.ref-table th {
  padding: 9px 14px;
  border-bottom: 1.5px solid var(--border);
  background: var(--accent-light);
  color: var(--link-hover);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: left;
  text-transform: uppercase;
}

.ref-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  vertical-align: top;
}

.ref-table tr:last-child td {
  border-bottom: 0;
}
.ref-table td:first-child {
  border-right: 1px solid var(--border-light);
  background: var(--code-bg);
  color: var(--link);
  font-family: var(--mono);
  font-size: 12px;
  white-space: pre-wrap;
}

[data-theme="dark"] .ref-table th {
  background: #281b36;
  color: var(--accent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ref-table th {
    background: #281b36;
    color: var(--accent);
  }
}

/* Original lavune.cc footer navigation */
#footnav {
  padding: 20px 16px 10px;
  color: var(--text-faint);
  font-size: 13px;
  text-align: center;
}

#footnav a,
#footnav button.fnav-link {
  padding: 2px 6px;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  text-decoration: none;
}

#footnav .sep {
  color: var(--text);
}

/* Original lavune.cc toast treatment */
#toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 700;
  padding: 10px 20px;
  border: 1px solid rgba(181, 140, 255, 0.25);
  border-radius: var(--radius-pill);
  background: #211330;
  box-shadow: none;
  color: #eadbff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.22s,
    transform 0.22s;
}

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

@media (max-width: 700px) {
  .settings-row {
    gap: 12px;
  }
  .settings-right {
    min-width: 0;
    flex: 1;
  }
  .setting {
    min-width: 0;
    flex: 1;
  }
  .field-input {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 600px) {
  #topnav {
    padding: 0 6px;
  }
  #topnav-inner {
    height: 42px;
    min-height: 42px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  #topnav-inner::-webkit-scrollbar {
    display: none;
  }
  #topnav .brand {
    flex: 0 0 auto;
    margin-right: 7px;
    font-size: 14px;
  }
  #topnav button.nav-link,
  #topnav a.nav-link {
    height: 42px;
    display: inline-flex !important;
    flex: 0 0 auto;
    padding: 0 5px;
    font-size: 11.5px;
  }
  .nav-sep {
    display: inline !important;
    flex: 0 0 auto;
    margin: 0;
    font-size: 10px;
  }
  .nav-actions {
    flex: 0 0 auto;
    gap: 2px;
    margin-left: 7px;
  }
  .signup-btn,
  .login-btn,
  #topnav a.login-btn {
    height: 42px;
    min-height: 42px;
    padding: 4px 6px;
    font-size: 11.5px;
  }
  .login-btn [data-auth-username] {
    max-width: 76px;
  }
  #theme-toggle {
    height: 42px;
    padding: 0 6px;
    font-size: 15px;
  }
  .auth-card {
    padding: 28px 24px 24px;
  }
  #app {
    padding: 22px 14px calc(60px + env(safe-area-inset-bottom));
  }
  .required {
    margin: 30px auto;
    padding: 28px 20px;
  }
  .editor-card {
    border-radius: var(--radius-lg);
  }
  .editor-ta,
  .editor-ta.split {
    min-height: 440px;
    resize: vertical;
  }
  .settings-row {
    padding: 16px;
  }
  #entry-inner,
  .preview-inner {
    overflow-x: clip;
    overflow-y: visible;
    padding: 24px 22px;
  }
  .view-footer {
    flex-direction: row;
    align-items: flex-start;
  }
  .view-actions {
    width: auto;
  }
  .view-actions .btn {
    flex: 0 0 auto;
    min-width: 0;
  }
  .md-body {
    font-size: 16px;
  }
  .md-body h1 {
    font-size: 2.25rem;
  }
  .md-body h2 {
    font-size: 1.85rem;
  }
  .md-body h3 {
    font-size: 1.55rem;
  }
  .md-body ul,
  .md-body ol {
    padding-left: 1.75rem;
  }
  .how-section {
    padding: 22px 20px;
    border-radius: 18px;
  }
  .how-hero {
    margin: 22px auto 20px;
    padding: 10px 14px 7px;
  }
  .how-title {
    font-size: 3rem;
  }
  #toast {
    right: 12px;
    bottom: 64px;
    left: 12px;
    text-align: center;
  }
  #footnav {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 460px) {
  .settings-row {
    flex-direction: column;
  }
  .settings-right {
    width: 100%;
    flex-direction: row;
  }
  .actions-left {
    width: auto;
  }
  .bio-help {
    gap: 8px;
  }
  .demo-head {
    align-items: center;
  }
}

@media (max-width: 420px) {
  .view-actions .btn {
    flex: 0 0 auto;
  }
}

/* Per-profile full-page background image */
body.has-bg {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.has-bg #app {
  min-height: calc(100vh - 42px);
}

.demo-page.has-profile-bg {
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (max-width: 760px) {
  body.has-bg {
    background-attachment: scroll;
  }
}

/* Seth home-card sparkle decoration */
#home-profile-seth {
  position: relative;
  overflow: visible;
  z-index: 2;
}

#home-profile-seth .mini-banner {
  border-radius: 21px 21px 0 0;
}

.mini-sparkle {
  position: absolute;
  top: -38px;
  right: -36px;
  z-index: 8;
  width: 122px;
  height: 122px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: none;
  transform-origin: center;
  animation: sethCardSparkleFloat 5.4s ease-in-out infinite;
}

@keyframes sethCardSparkleFloat {
  0%,
  100% {
    transform: translateY(0) rotate(-8deg);
  }
  50% {
    transform: translateY(-8px) rotate(-2deg);
  }
}

@media (max-width: 680px) {
  .mini-sparkle {
    top: -28px;
    right: -24px;
    width: 104px;
    height: 104px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mini-sparkle {
    animation: none !important;
    transform: rotate(-8deg);
  }
}

/* Retired homepage bottom-right sparkle: defensive removal */
.deco-sparkle,
img.deco-sparkle,
img[src="/assets/decor/sparkle.png"],
img[src^="/assets/decor/sparkle.png?"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  animation: none !important;
}

/* Homepage Atabook composition, corrected placement */
.profile-dir {
  position: relative;
  isolation: isolate;
  width: min(1020px, calc(100% - 40px));
  margin: 56px auto;
}

.mini-grid {
  position: relative;
  z-index: 4;
}

.guestbook-wrap {
  position: relative;
  margin-top: 32px;
  min-height: 770px;
  padding: 8px 250px 30px 0;
}

.home-guestbook {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 740px;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 22px;
  background: #000;
  box-shadow: none;
}

.home-guestbook iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.about-note {
  position: absolute;
  top: 42px;
  right: -2px;
  z-index: 5;
  width: 252px;
  margin-top: 0;
  padding: 25px 20px 22px;
  border: 1px solid var(--display-border);
  border-radius: 20px;
  background: var(--display-surface);
  color: var(--display-text);
  box-shadow: none;
  transform: rotate(2deg);
  transform-origin: top center;
}

.about-note h2 {
  margin: 0 0 14px;
  color: var(--display-accent);
  font:
    400 32px/1.02 "Pacifico",
    cursive;
  text-align: center;
}

.about-note p {
  margin: 0 0 10px;
  font-family: "Poppins", sans-serif;
  font-size: 11.15px;
  line-height: 1.46;
}

.about-note p:last-child {
  margin-bottom: 0;
}

.home-deco {
  position: absolute;
  z-index: 7;
  display: block;
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: none;
}

@keyframes homeDecoFloatBurst {
  0%,
  100% {
    transform: translateY(0px) rotate(-12deg);
  }
  50% {
    transform: translateY(-8px) rotate(-9deg);
  }
}

@keyframes homeDecoFloatExclamation {
  0%,
  100% {
    transform: translateY(0px) rotate(-10deg);
  }
  50% {
    transform: translateY(-10px) rotate(-14deg);
  }
}

@keyframes homeDecoFloatBow {
  0%,
  100% {
    transform: translateY(0px) rotate(5deg);
  }
  50% {
    transform: translateY(-7px) rotate(8deg);
  }
}

.deco-burst {
  top: -42px;
  left: -44px;
  width: 92px;
  transform: rotate(-12deg);
  animation: homeDecoFloatBurst 5.8s ease-in-out infinite;
}

.deco-bang {
  top: 150px;
  left: -44px;
  width: 82px;
  transform: rotate(-10deg);
  animation: homeDecoFloatExclamation 5.2s ease-in-out infinite;
}

.home-deco-bow {
  top: -38px;
  right: -18px;
  width: 88px;
  transform: rotate(5deg);
  animation: homeDecoFloatBow 5.5s ease-in-out infinite;
}

[data-theme="dark"] .about-note {
  border-color: #44394d;
  background: #221a2a;
  color: #e9e2ec;
  box-shadow: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .about-note {
    border-color: #44394d;
    background: #221a2a;
    color: #e9e2ec;
    box-shadow: none;
  }
}

@media (max-width: 900px) {
  .profile-dir {
    width: min(880px, calc(100% - 32px));
  }

  .guestbook-wrap {
    min-height: 0;
    padding: 12px 0 20px;
  }

  .home-guestbook {
    height: 690px;
  }

  .about-note {
    position: relative;
    top: auto;
    right: auto;
    width: min(360px, calc(100% - 20px));
    margin: 14px 0 0 auto;
    transform: rotate(-1.5deg);
  }

  .deco-burst {
    top: -30px;
    left: -18px;
    width: 78px;
  }

  .deco-bang {
    top: 118px;
    left: -18px;
    width: 70px;
  }
}

@media (max-width: 680px) {
  .profile-dir {
    margin-top: 30px;
  }

  .mini-grid {
    grid-template-columns: 1fr;
  }

  .guestbook-wrap {
    margin-top: 20px;
    padding-top: 8px;
  }

  .home-guestbook {
    height: 660px;
    border-radius: 18px;
  }

  .about-note {
    width: min(100%, 332px);
    padding: 24px 18px 22px;
  }

  .about-note h2 {
    font-size: 29px;
  }
  .about-note p {
    font-size: 11.2px;
  }

  .deco-burst {
    top: -24px;
    left: -10px;
    width: 68px;
  }

  .deco-bang {
    top: 96px;
    left: -10px;
    width: 60px;
  }

  .home-deco-bow {
    top: -32px;
    right: -8px;
    width: 72px;
  }
}

@media (max-width: 430px) {
  .about-note {
    width: 100%;
    justify-self: stretch;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deco-burst,
  .deco-bang,
  .home-deco-bow {
    animation: none !important;
  }
}

/* Public paste directory */
.home-main {
  width: min(100%, 1080px) !important;
  padding: 32px 18px 68px;
}

.home-title {
  width: min(100%, 1000px);
  margin: 0 auto;
  color: var(--display-accent);
  font-family: "Pacifico", cursive;
  font-size: 52px;
  font-weight: 400;
  line-height: 1.2;
}

.owner-avatar {
  position: relative;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 34%, var(--border));
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent-hover);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

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

.home-owner .owner-avatar {
  width: 20px;
  height: 20px;
  font-size: 8.5px;
}

.home-card-seth .owner-avatar {
  border-color: color-mix(in srgb, var(--accent) 30%, #8163b8);
  background: color-mix(in srgb, var(--accent) 58%, #8163b8);
  color: #ffffff;
}

.home-main .home-list {
  width: 100%;
  max-width: 1000px;
  margin: 10px auto 0;
  padding: 24px;
  box-shadow: none;
}

.home-main .home-head {
  align-items: flex-end;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border-light);
}

.home-main .home-head h2 {
  color: var(--display-accent);
  font-size: clamp(1.25rem, 4vw, 1.65rem);
}

.home-main .home-head .dash-kicker {
  color: var(--display-accent);
}

.sort-note {
  color: var(--text-faint);
  font-size: 10.5px;
  line-height: 1.4;
  text-align: right;
}

.home-card {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--profile-paste-button, var(--accent)) 35%, var(--border));
  background: var(--home-bg);
  color: var(--text);
  box-shadow: none;
  transition:
    transform 170ms ease,
    border-color 170ms ease;
}

.home-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--profile-paste-button, var(--accent));
  content: "";
}

.home-card:hover {
  border-color: color-mix(in srgb, var(--profile-paste-button, var(--accent)) 62%, var(--border));
  box-shadow: none;
  transform: translateY(-3px);
}

.home-card-top,
.home-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-card-top {
  margin-bottom: 13px;
}

.home-owner {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--profile-paste-card-text, var(--text-muted));
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.home-owner:hover {
  color: var(--profile-paste-card-text, var(--text));
  text-decoration: underline;
}

.home-date {
  color: var(--profile-paste-card-text, var(--text-faint));
  font-size: 10px;
  line-height: 1.35;
  text-align: right;
}

.home-main .paste-head {
  display: block;
}

.home-main .paste-title {
  display: flex;
  align-items: flex-start;
  font-size: 18px;
  line-height: 1.3;
}

.home-main .paste-title-text {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: initial;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-main .paste-path {
  margin-top: 5px;
  font-size: 10.5px;
}

.home-main .entry-note {
  max-width: none;
  margin: 10px 0 0;
  padding-top: 9px;
  border-top: 1px dashed
    color-mix(in srgb, var(--profile-paste-card-text, var(--text)) 18%, transparent);
  font-size: 11.5px;
  line-height: 1.5;
  text-align: left;
}

.home-card-foot {
  justify-content: flex-start;
  margin-top: auto;
  padding-top: 14px;
}

.home-main .paste-open {
  gap: 7px;
  margin-top: 0;
  padding: 7px 11px;
  border-radius: 10px;
  transition:
    opacity 150ms ease,
    transform 150ms ease;
}

.home-main .paste-open:hover {
  opacity: 1;
  transform: translateX(2px);
}

.home-main .dash-empty {
  margin: 4px 0 0;
  padding: 48px 20px;
  border: 1px dashed var(--border);
  border-radius: 17px;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.pager {
  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 22px auto 0;
}

.page-arrow {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid color-mix(in srgb, var(--display-accent) 48%, var(--border));
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--display-accent);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease;
}

.page-arrow span {
  display: block;
  transform: translateY(-1px);
}

.page-arrow:hover:not(:disabled) {
  border-color: var(--display-accent);
  background: var(--display-accent);
  color: var(--display-surface);
}

.page-arrow:focus-visible {
  outline: 2px solid var(--display-accent);
  outline-offset: 2px;
}

.page-arrow:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

.page-status {
  min-width: 76px;
  padding: 0 2px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

.page-status strong {
  color: var(--display-accent);
  font-size: 13px;
  font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
  .home-card,
  .page-arrow,
  .home-main .paste-open {
    transition: none !important;
  }

  .home-card:hover,
  .home-main .paste-open:hover {
    transform: none !important;
  }
}

/* Site-matched 404 page */
.not-found-page {
  width: min(100%, 920px);
  min-height: calc(100vh - 42px);
  display: grid;
  place-items: center;
  margin: 0 auto;
  padding: clamp(28px, 7vw, 72px) 18px;
}

.not-found-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 38px;
  overflow: hidden;
  padding: clamp(34px, 6vw, 58px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: color-mix(in srgb, var(--surface) 92%, var(--accent-light));
  box-shadow: none;
}

.not-found-card::before,
.not-found-card::after {
  position: absolute;
  z-index: -1;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  content: "";
  pointer-events: none;
}

.not-found-card::before {
  width: 245px;
  height: 245px;
  top: -150px;
  right: 78px;
}

.not-found-card::after {
  width: 110px;
  height: 110px;
  right: -35px;
  bottom: -42px;
}

.not-found-copy {
  min-width: 0;
}

.not-found-copy .dash-kicker {
  margin-bottom: 10px;
  color: var(--accent);
}

.not-found-copy h1 {
  margin: 0;
  color: var(--accent);
  font-family: "Pacifico", "Fredoka", cursive;
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 400;
  line-height: 1.05;
  transform: rotate(-1deg);
  transform-origin: left center;
}

.missing-desc {
  max-width: 540px;
  margin-top: 17px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.missing-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.not-found-home {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid color-mix(in srgb, var(--button-primary) 72%, var(--border));
  border-radius: 12px;
  background: var(--button-primary);
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: none;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.not-found-home:hover {
  background: var(--button-primary-hover);
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
}

.not-found-home:focus-visible,
.missing-user:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 36%, transparent);
  outline-offset: 3px;
}

.missing-users {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.missing-user {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 750;
  text-decoration: none;
  box-shadow: none;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.missing-user:hover {
  border-color: var(--accent);
  color: var(--text);
  text-decoration: none;
  transform: translateY(-1px);
}

.missing-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: none;
}

.missing-seth .missing-dot {
  background: color-mix(in srgb, var(--accent) 58%, #8163b8);
}

.missing-badge {
  width: 154px;
  min-height: 154px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, var(--border));
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
  box-shadow: none;
}

.missing-badge strong {
  color: var(--accent);
  font-size: clamp(2.65rem, 7vw, 3.45rem);
  font-weight: 800;
  line-height: 1;
}

.missing-badge span {
  margin-top: 7px;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.07em;
  line-height: 1.35;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .not-found-card {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .missing-badge {
    width: auto;
    min-height: 0;
    flex-direction: row;
    justify-self: start;
    gap: 10px;
    border-radius: 18px;
  }

  .missing-badge strong {
    font-size: 2.1rem;
  }

  .missing-badge span {
    margin-top: 0;
    text-align: left;
  }
}

@media (max-width: 520px) {
  .not-found-page {
    min-height: calc(100vh - 42px);
    align-items: start;
    padding: 18px 10px 46px;
  }

  .not-found-card {
    gap: 24px;
    padding: 29px 22px;
    border-radius: 22px;
  }

  .not-found-copy h1 {
    font-size: clamp(2.8rem, 15vw, 3.7rem);
  }

  .not-found-home {
    width: 100%;
  }

  .missing-users {
    align-items: stretch;
  }

  .missing-user {
    flex: 1 1 110px;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .not-found-home,
  .missing-user {
    transition: none !important;
  }

  .not-found-home:hover,
  .missing-user:hover {
    transform: none !important;
  }
}

/* About */
body.about-page {
  background-color: var(--home-bg);
  background-image: none;
}

#what-page {
  width: 100%;
}

.about-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 16px 48px;
}

.what-card {
  position: relative;
  width: 350px;
  margin: 0;
  border-radius: 8px;
  background: var(--display-soft);
  transition: 0.3s ease-in-out;
}

.what-card > svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.what-card figcaption {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: center;
  overflow: visible;
  padding-bottom: 24px;
  border-radius: 8px;
  background: var(--display-surface);
  color: var(--display-text);
  font-family: "Poppins", sans-serif;
}

.what-card figcaption > span {
  width: 100%;
  display: block;
}

.what-card figcaption span:nth-child(1) {
  position: relative;
  top: -25px;
  left: 10px;
  color: var(--display-text);
  font-family: "Pacifico", cursive;
  font-size: 30px;
}

.what-card figcaption span:nth-child(2) {
  position: absolute;
  top: 14px;
  left: 50%;
  color: var(--display-accent);
  filter: url("#what-outline");
  font-family: "Pacifico", cursive;
  font-size: 52px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  transform: translateX(-50%) rotate(-2deg);
}

.what-card figcaption span:nth-child(3) {
  height: auto;
  padding: 100px 20px 20px;
  overflow-y: visible;
  color: inherit;
  cursor: text;
  font-family: "Poppins", sans-serif;
  font-size: 0.75em;
  line-height: 1.6;
  text-align: left;
}

[data-theme="dark"] .what-card figcaption {
  background: #221a2a;
  color: #e9e2ec;
}

[data-theme="dark"] .what-card figcaption span:nth-child(1) {
  color: #e9e2ec;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .what-card figcaption {
    background: #221a2a;
    color: #e9e2ec;
  }

  :root:not([data-theme="light"]) .what-card figcaption span:nth-child(1) {
    color: #e9e2ec;
  }
}

/* Focused phone layout */
@media (max-width: 600px) {
  body {
    font-size: 14px;
  }

  #topnav {
    padding: 0 10px;
  }

  #topnav-inner {
    height: 50px;
    min-height: 50px;
    gap: 2px;
  }

  #topnav .brand {
    margin-right: 9px;
  }

  #topnav button.nav-link,
  #topnav a.nav-link {
    height: 50px;
    min-height: 44px;
    padding: 0 8px;
    font-size: 12px;
  }

  .nav-actions {
    margin-left: auto;
  }

  #theme-toggle {
    width: 42px;
    height: 50px;
    padding: 0;
  }

  #metadata-page-background {
    inset: 50px 0 0;
  }

  #app {
    padding: 18px 10px calc(44px + env(safe-area-inset-bottom));
  }

  .editor-card {
    border-radius: 16px;
  }

  .edit-view-tab {
    min-height: 44px;
    padding: 0 12px;
  }

  .editor-ta,
  .editor-ta.split {
    min-height: 56vh;
    padding: 14px;
  }

  .metadata-body {
    padding: 14px;
  }

  .metadata-help {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .settings-row {
    align-items: stretch;
    flex-direction: column;
    padding: 14px;
  }

  .actions-left,
  .settings-right,
  .setting {
    width: 100%;
  }

  .actions-left .btn {
    min-height: 44px;
  }

  .settings-right {
    flex-direction: column;
  }

  .paste-music-editor {
    padding: 14px;
  }

  .paste-music-editor-head,
  .paste-music-editor-fields {
    align-items: stretch;
    flex-direction: column;
  }

  .paste-music-editor-fields .paste-music-volume-editor {
    flex-basis: auto;
  }

  .theme-preview-picker {
    grid-template-columns: 1fr;
  }

  .field-inline,
  .field-input {
    width: 100%;
    min-width: 0;
  }

  .profile-form,
  .mode-grid {
    grid-template-columns: 1fr;
  }

  .profile-field,
  .name-field,
  .bio-field,
  .links-field,
  .color-prefs {
    grid-column: 1;
  }

  .color-control {
    grid-template-columns: minmax(0, 1fr) 36px 76px;
  }

  .meta-ref-group h3 {
    position: sticky;
    left: 0;
  }

  #entry-inner,
  .preview-inner {
    padding: 20px 16px;
    border-radius: 0;
  }

  .demo-app {
    padding: 20px 10px 44px;
  }

  .view-footer {
    padding: 0 4px;
  }

  .md-body {
    font-size: 15px;
    line-height: 1.65;
  }

  .md-body h1 {
    font-size: 2rem;
  }

  .md-body h2 {
    font-size: 1.65rem;
  }

  .md-body h3 {
    font-size: 1.4rem;
  }

  .md-body pre,
  .md-body table {
    max-width: 100%;
    overflow-x: auto;
  }

  .home-main {
    padding: 12px 8px 40px !important;
  }

  .home-title {
    width: calc(100% - 20px);
    margin-right: auto;
    margin-left: auto;
    font-size: 38px;
  }

  .home-main .home-list {
    width: calc(100% - 20px);
    margin: 6px auto 0;
    padding: 15px 12px;
    border-radius: 16px;
  }

  .home-main .home-head,
  .profile-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 12px;
  }

  .sort-note {
    max-width: none;
    text-align: left;
  }

  .home-main .profile-grid,
  #profile-page .profile-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .home-card,
  .paste-entry {
    width: calc(100% - 10px);
    margin-right: auto;
    margin-left: auto;
    padding: 11px;
    border-radius: 13px;
  }

  .home-card-top {
    align-items: flex-start;
    margin-bottom: 9px;
  }

  .home-date {
    max-width: 48%;
  }

  .home-main .paste-title {
    font-size: 16px;
  }

  .paste-title-text {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .paste-favicon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
  }

  .entry-note {
    max-width: 44%;
  }

  .home-main .entry-note {
    max-width: none;
    margin-top: 8px;
    padding-top: 7px;
    font-size: 11px;
  }

  .pager {
    gap: 7px;
    margin-top: 15px;
  }

  .page-arrow {
    width: 40px;
    height: 40px;
  }

  .profile-cover {
    height: 126px;
  }

  .profile-card {
    width: calc(100% - 20px);
    margin-right: auto;
    margin-left: auto;
    border-radius: 18px;
  }

  .profile-body {
    padding: 0 14px 15px;
  }

  .profile-card.has-page-img .profile-body {
    padding-right: 14px;
  }

  .profile-card.has-page-img .name-block {
    width: 48%;
    min-height: 78px;
  }

  .profile-photo {
    width: 88px;
    height: 88px;
    margin-top: -44px;
    border-width: 3px;
    font-size: 30px;
  }

  .profile-top {
    min-height: 43px;
  }

  .name-block h1 {
    font-size: 22px;
  }

  .profile-bio {
    margin-top: 8px;
    font-size: 12.75px;
    line-height: 1.5;
  }

  .links-panel {
    width: 100%;
    padding: 9px;
    border-radius: 14px;
  }

  .profile-links {
    grid-template-columns: 1fr;
  }

  .profile-link {
    min-height: 42px;
    padding: 6px 8px;
  }

  .profile-art {
    position: absolute;
    top: 88px;
    right: 14px;
    bottom: auto;
    width: min(154px, 42vw);
    height: min(154px, 42vw);
    margin: 0;
  }

  #profile-page .paste-section {
    width: calc(100% - 20px);
    margin: 10px auto 0;
    padding: 15px 12px;
    border-radius: 16px;
  }

  .cat-tab {
    min-height: 38px;
    padding: 6px 10px;
  }

  .not-found-page {
    padding: 12px 8px 36px;
  }

  .not-found-card {
    width: calc(100% - 20px);
    margin-right: auto;
    margin-left: auto;
    padding: 22px 16px;
    border-radius: 19px;
  }

  .about-wrap {
    padding: 60px 0 48px;
  }

  .what-card {
    width: min(300px, calc(100% - 20px));
  }

  .what-card figcaption span:nth-child(2) {
    font-size: 38px;
  }
}

@media (max-width: 380px) {
  #topnav {
    padding: 0 6px;
  }

  #topnav .brand {
    margin-right: 5px;
  }

  #topnav button.nav-link,
  #topnav a.nav-link {
    padding: 0 6px;
    font-size: 11.5px;
  }

  .home-card-top {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .home-date {
    max-width: none;
    text-align: left;
  }
}
