@font-face {
  font-family: 'Playfair Display';
  src: url("../fonts/PlayfairDisplay-VariableFont.c3bdb0c89e93.woff2") format('woff2-variations');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair';
  src: url("../fonts/Playfair-VariableFont.adb74e24f9da.woff2") format('woff2-variations');
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Playfair';
  src: url("../fonts/Playfair-Italic-VariableFont.9b5038467123.woff2") format('woff2-variations');
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "brush_script_mtitalic";
  src: local("Brush Script MT"), url("../fonts/brush_script-webfont.36536d86f411.woff2") format("woff2"),
    url("../fonts/brush_script-webfont.4f8ea69a32e2.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Charlottenburg";
  src: url("../fonts/Charlottenburg_W-Circles.88cc6cf5f945.woff2") format("woff2");
  font-display: swap;
}


:root {
  /* Brand Colors */
  --lynkmi-blue: #9fa2ff;
  --lynkmi-dark-blue: #6666ff;

  /* Component-specific Colors */
  --like-color: #ff2b3c;
  --repost-color: #4CAF50;

  /* Semantic Colors */
  --text-primary: #000;
  --text-secondary: #444;
  --text-tertiary: #666;
  --text-quaternary: #888;
  --text-placeholder: #aaa;
  --text-disabled: #bbb;
  --text-inverted: #fff;
  --text-link-visited: #999;
  --text-error: orangered;
  --text-error-strong: rgb(159, 0, 0);
  --text-success: #fff;
  --text-accent: var(--lynkmi-blue);
  --text-accent-dark: var(--lynkmi-dark-blue);
  --text-privacy-heading: #34495e;


  --bg-primary: #fff;
  --bg-secondary: #f5f5f5;
  --bg-accent: var(--lynkmi-blue);
  --bg-accent-dark: var(--lynkmi-dark-blue);
  --bg-disabled: #bbb;
  --bg-error: rgba(231, 76, 60, 0.05);
  --bg-error-strong: #fdd;
  --bg-success: #9ac27d;
  --bg-success-hover: #7eb268;
  --bg-danger-hover: #d32f2f;
  --bg-warning: orange;
  --bg-highlight: #e9ecef;

  --bg-membership-active: #f0f7ff;
  --border-membership-active: #c2e0ff;


  --border-primary: #aaa;
  --border-secondary: #bbb;
  --border-tertiary: #ccc;
  --border-quaternary: #eee;
  --border-accent: var(--lynkmi-blue);
  --border-accent-dark: var(--lynkmi-dark-blue);
  --border-error: #e74c3c;

  /* Icons */
  --icon-color-liked: var(--like-color);
  --icon-color-reposted: var(--repost-color);
  --icon-color-unselected: var(--text-placeholder);
  --icon-color-settings: var(--text-quaternary);

  /* Overlays & Misc */
  --modal-backdrop: rgba(255, 255, 255, 0.1);
  --modal-backdrop-darker: rgba(0, 0, 0, 0.2);
}

/*
* Override browser autofill styles for both light and dark modes.
* The long transition delay is a hack to prevent the browser's
* default yellow/blue background from appearing on autofilled inputs.
*/
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  transition: background-color 600000s 0s, color 600000s 0s;
  -webkit-text-fill-color: var(--text-primary) !important;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: #fff;
    --text-secondary: #ddd;
    --text-tertiary: #aaa;
    --text-quaternary: #777;
    --text-link-visited: #aaa;
    --bg-primary: #121212;
    --bg-secondary: #242424;
    --border-primary: #ccc;
    --icon-color-settings: #aaa;
    --bg-membership-active: #242444;
    --border-membership-active: var(--lynkmi-blue);
  }

  .followed-tag {
    font-weight: 600 !important;
  }

  /* Auth pages (signup, login, etc) */
  .login-title,
  .login-label,
  .login-label-confirm-pw,
  .signup-link,
  .login-link {
    color: var(--text-primary);
  }

  .signup-container input,
  .login-container input,
  .password-reset-container input,
  .password-reset-container-2 input,
  .waitlist-container input {
    color: var(--text-primary);
    background: var(--bg-primary);
  }
}

/* Tribute.js @mention autocomplete styling */
.tribute-container {
  border: 1px solid var(--border-primary) !important;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-family: inherit;
  max-height: 200px;
  overflow-y: auto;
  padding: 8px;
  background: var(--bg-primary);
  margin-top: 4px !important;
  /* hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
  }
  
.tribute-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
  }

.tribute-container ul {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--bg-primary) !important;
}
.tribute-container li {
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.1s ease;
  color: var(--text-primary) !important;
  background: transparent !important;
}
.tribute-container li.highlight,
.tribute-container li:hover {
  background: var(--bg-accent) !important;
  color: var(--bg-primary) !important;
}
.tribute-container li span {
  font-weight: normal;
  color: inherit !important;
}

/* Prevent @username from breaking across lines */
.description a[href*="/@"],
.comment_content a[href*="/@"],
.lynk_item_description a[href*="/@"] {
  white-space: nowrap;
}

body {
  margin: 0 auto;
  max-width: 98vw;
  line-height: 1.6;
  font-size: 20px;
  color: var(--text-secondary);
  padding: 0 0;
  font-family: "Playfair", serif;
  font-weight: 300;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: var(--bg-primary);
}

p {
  line-height: 1.2;
}

p > a {
  text-decoration: underline;
}

p > a:hover {
  text-decoration: none;
}

.header {
  text-align: right;
}


h1 {
  font-family: "Charlottenburg", serif;
  font-size: clamp(3rem, 5vw + 2rem, 5rem);
  line-height: 1;
  font-weight: 100;
}

h2,
h3 {
  font-family: "Playfair Display", serif;
  line-height: 1.2;
}

h2 {
  padding: 0;
  margin-bottom: 0;
}

h3 {
  margin-bottom: 4px;
}

a {
  text-decoration: none;
  text-underline-position: under !important;
  text-decoration-color: var(--text-placeholder);
}

a:link {
  color: var(--text-secondary);
  text-decoration-color: var(--text-placeholder);
}

a:visited {
  color: var(--text-tertiary);
}

a:visited:hover {
  color: var(--text-primary);
  text-decoration: none;
}

a.no-visited-style:visited {
  color: inherit;
}


a:hover {
  text-decoration: none;
  color: var(--text-primary);
  text-decoration: underline;
  text-decoration-skip: ink;
}

a:active {
  color: var(--text-primary);
  text-decoration: none;
}

.single-tag-container {
  color: var(--text-inverted) !important;
  font-size: 16px;
  text-decoration: none;
  background-color: var(--bg-accent);
  border-radius: 4px;
  white-space: nowrap;
  display: flex;
  flex-direction: row;
  gap: 0px;
}

.tag {
  color: var(--bg-primary) !important;
  font-size: 18px;
  text-decoration: none;
  padding: 0px 10px;
  border-radius: 4px;
  white-space: nowrap;
  display: inline-flex;
  border: 1px solid transparent;
  line-height: 1.6;
  /* height: 28px; */
  box-sizing: border-box;
  align-items: center;
  /* transform: translateY(-1px); */
  font-weight: 500;
  font-family: "Playfair", serif;
}

.tag:visited {
  color: var(--text-inverted);
}
.tag:hover {
  background-color: var(--bg-accent-dark);
  text-decoration: none !important;
}
.tag a:link {
  color: var(--text-inverted);
}

.add-tag-btn, .remove-tag-btn {
  background: none;
  border: 1px solid var(--border-secondary);
  color: var(--text-placeholder);
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
  padding: 0 8px;
}

.add-tag-btn:hover,
.remove-tag-btn:hover {
  color: var(--text-primary);
  border-color: var(--text-primary);
}

.add-tag-container {
  display: flex;
  flex-direction: row;
  gap: 4px;
  min-width: 200px;
}

.save-tags-btn {
  background: none;
  border: 1px solid var(--border-accent);
  color: var(--text-accent);
  border-radius: 8px;
  cursor: pointer;
  font-size: 1em;
  padding: 0 8px;
}

.tag-container.remove-mode .tag {
  pointer-events: none;
  cursor: default;
  text-decoration: none;
}

.delete-tag {
  padding: 0 8px;
  border-left: 1px solid var(--text-inverted);
  cursor: pointer;
  display: inline-flex;
  line-height: 1.6;
  box-sizing: border-box;
  align-items: center;
}

.tag-container.remove-mode .delete-tag:hover {
  color: var(--text-accent);
  background-color: var(--bg-primary);
  border-radius: 0 4px 4px 0;
  box-shadow: inset 0 1px 0 0 var(--border-accent) ,
              inset -1px 0 0 0 var(--border-accent),
              inset 0 -1px 0 0 var(--border-accent);
  border-left: 1px solid var(--border-accent);
}


.lynk {
  font-family: "Playfair Display";
  display: flex;
  flex-direction: column;
  padding: 6px 8px 5px 8px;
    border-radius: 8px;
}

ul {
  list-style-type: none;
  margin: 0px;
  padding: 0px;
}

ul#sorty {
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
} 

.tag-container {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.time {
  color: var(--text-primary);
  padding: 0px 4px;
  margin-right: 12px;
  margin-left: 4px;
  border-radius: 4px;
  font-size: 14px;
}

.title-container {
  line-height: 1.2;
}

.title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 4px;
  font-weight: 600;
}

.title a.editable-title {
  font-weight: 600;
}

.base_url {
  font-size: 12pt;
  font-weight: 300;
  color: var(--text-quaternary);
  display: inline;
}

.base_url a {
  color: var(--text-quaternary);
}

.base_url a:hover {
  color: var(--text-accent);
}

.edit-lynk-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  color: var(--text-placeholder);
  
}

.edit-link,
.delete-link {
  font-weight: 300;
  font-size: 12pt;
  color: var(--text-placeholder);
}

.edit-link:visited, .edit-link:link,
.delete-link:visited, .delete-link:link {
  color: var(--text-placeholder);
}

.edit-link:hover,
.delete-link:hover {
  color: var(--text-primary);
}

.lynk-title {
  font-weight: 600;
  word-break: break-word;
  overflow-wrap: break-word;
  /* color: var(--text-primary); */
}

a.lynk-title:link {
  color: var(--text-secondary) !important;
}

a.lynk-title:visited {
  color: var(--text-tertiary);
}

a.lynk-title:hover {
  color: var(--text-primary) !important;
  text-decoration: none !important;
}

a.lynk-title:visited:hover {
  color: var(--text-primary) !important;
  text-decoration: none !important;
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 85vh;
}

.footer {
  text-align: center;
}

#qr-code {
  text-align: center;
  margin-bottom: 10px;
}

#view-count {
  text-align: center;
  margin-top: -10px;
  margin-bottom: 10px;
  color: var(--text-quaternary);
}

.followed-tag {
  background-color: var(--bg-accent) !important;
  border-color: var(--border-accent);
}
.followed-tag:hover {
  background-color: var(--bg-accent-dark) !important;
  border-color: var(--border-accent-dark);
}

.unfollowed-tag {
  color: var(--text-accent) !important;
  background-color: var(--bg-primary) !important;
  border-color: var(--border-accent);
}
.unfollowed-tag:hover {
  color: var(--text-accent-dark) !important;
  border-color: var(--border-accent-dark);
}

.rss-tag {
  color: var(--text-tertiary) !important;
  background-color: var(--bg-primary) !important;
  /* border-color: var(--border-accent); */
}

.rss-tag:hover {
  color: var(--text-primary) !important;
  /* border-color: var(--border-accent-dark); */
}

.general-button {
  padding: 8px;
  font-size: 18px;
}

.primary-button {
  background-color: var(--bg-accent) !important;
}

.primary-button:hover {
  background-color: var(--bg-accent-dark) !important;
}

.secondary-button {
  color: var(--text-accent) !important;
  background-color: var(--bg-primary) !important;
  border: solid var(--border-accent) 1px;
}

.secondary-button:hover {
  color: var(--text-accent-dark) !important;
  background-color: var(--bg-primary) !important;
  border: solid var(--border-accent-dark) 1px;
}



.active {
  text-decoration: underline;
  color: var(--text-primary) !important;
}

.wrapper {
  max-width: 650px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  flex:1;
}

.wrapper_about {
  max-width: min(650px, 94vw) !important;
  padding: 0 8px !important;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.content {
  flex-grow: 1;
  margin-bottom: 100px;
}

a.btn {
  color: var(--text-inverted);
  border-radius: 8px;
  background-color: var(--bg-accent);
  padding: 4px 14px 4px 14px;
  text-decoration: none;
  font-weight: 700;
}

a.btn:hover {
  background-color: var(--bg-accent-dark);
}

.buttons {
  order: 3;
  font-size: 20px;
  gap: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.buttons a {
  display: flex;
  align-items: center;
}

.buttons i {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  top: 1px; /* Adjust this value as needed */
}

.logosmall {
  color: var(--text-tertiary);
  font-size: 32px;
  font-family: "brush_script_mtitalic", cursive;
  margin-top: -5px;
  order: 1;
}

.logosmall > a {
  text-decoration: inherit;
}

.logosmall_permalynk {
  color: var(--text-tertiary);
  font-size: 32px;
  font-family: "brush_script_mtitalic", cursive;
  margin-top: -5px;
}

.logosmall_permalynk>a {
  color: inherit;
  text-decoration: inherit;
}

.container {
  display: grid;
  grid-template-columns: 50px 300px 60px;
  grid-template-rows: 40px 40px 40px 30px;
  gap: 12px 8px;
  align-self: center;
}

.add-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 460px;
  margin: 0 auto; /* This centers the container horizontally */
  width: 100%; /* This ensures the container takes full width on smaller screens */
}

.add-line {
  display: flex;
  flex-direction: row;
  min-height: 40px;
  align-items: stretch;
}

.add-field-title {
  text-align: center;
  min-width: 60px;
  align-self: center;
}

.add-field-fill {
  flex-grow: 1;
}

.add-button-line {
  display: flex;
  flex-direction: row-reverse;
}

.add-button-line input {
  min-height: 40px;
  min-width: 80px;
}



.field-title {
  grid-column: 1 / 2;
  place-self: center;
}

.field-fill {
  grid-column: 2 / 4;
  place-self: stretch;
}

.form-submit {
  grid-area: 4 / 3 / 5 / 4;
}

.row-1 {
  grid-row: 1 / 2;
}
.row-2 {
  grid-row: 2 / 3;
}
.row-3 {
  grid-row: 3 / 4;
}
.row-4 {
  grid-row: 4 / 5;
}
.row-5 {
  grid-row: 5 / 6;
}
.row-6 {
  grid-row: 6 / 7;
}
.row-7 {
  grid-row: 7 / 8;
}
.row-8 {
  grid-row: 8 / 9;
}
.row-9 {
  grid-row: 9 / 10;
}
.row-10 {
  grid-row: 10 / 11;
}
.row-11 {
  grid-row: 11 / 12;
}
.row-12 {
  grid-row: 12 / 13;
}
.row-13 {
  grid-row: 13 / 14;
}

#add-lynk-form {
  padding: 8px;
  background-color: transparent !important;
}

#add-lynk-form input[type="text"] {
  height: 100%;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box; /* Firefox, other Gecko */
  box-sizing: border-box; /* Opera/IE 8+ */
  outline: none;
  background-color: transparent !important;
  color: var(--text-primary) !important;
}

#add-lynk-form input[type="text"]:focus {
  border: 2px solid var(--border-accent);
  outline: none;
  padding: 7px;
}



#add-lynk-form span {
  height: 100%;
  width: 100%;
}

input[type="submit"] {
  border-radius: 8px;
  border: none;
  background-color: var(--bg-accent);
  color: var(--bg-primary);
  cursor: pointer;
}

input[type="submit"]:hover {
  background-color: var(--bg-accent-dark);
}

input[type="submit"]:disabled {
  background-color: var(--bg-disabled);
  cursor: default;
}

.login-container {
  display: grid;
  grid-template-columns: 1fr 3fr 1fr;
  grid-template-rows: 20px 40px 20px 40px 40px;
  gap: 12px 8px;
  max-width: 500px;
}

.locked-out {
  max-width: 660px;
}

.password-reset-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 20px 40px 20px 40px 30px;
  gap: 12px 8px;
  min-width: 400px;
  max-width: 600px;
  margin: 0 auto;
}

.password-reset-container-2 {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  grid-template-rows: 20px 40px 30px;
  gap: 12px 8px;
  min-width: 400px;
  max-width: 600px;
  margin: 0 auto;
}

.password-reset-done-container {
  max-width: 600px;
}

.signup-container {
  display: grid;
  grid-template-columns: 1fr 2fr 2fr;
  grid-template-rows: 20px 40px 20px 40px 20px 40px 20px 40px 20px 40px 40px;
  gap: 12px 8px;
}

.invalid-input {
  border: 1px solid var(--border-error) !important;
  background-color: var(--bg-error) !important;
}

.login-label {
  grid-column: 1 / 2;
  place-self: center start;
}

.login-label-confirm-pw {
  grid-column: 1 / 3;
  place-self: center start;
}

.waitlist-link {
  grid-column: 2 / 4;
  place-self: center end;
}

.login-error {
  grid-column: 2 / 4;
  place-self: center end;
  color: var(--text-error);
}

.login-field {
  grid-column: 1 / 4;
  place-self: stretch;
}

.login-submit {
  grid-area: 5 / 3 / 6 / 4;
  place-self: stretch;
  line-height: 0px;
  font-size: 20px;
  cursor: pointer;
}

.login-submit:hover {
  background-color: var(--bg-accent-dark);
}

.reset-submit {
  grid-area: 3 / 3 / 4 / 4;
  place-self: stretch;
  line-height: 0px;
}

.signup-submit {
  grid-column: 1 / 4;
  align-self: end;
  place-self: stretch;
  line-height: 0px;
  font-size: 20px;
  cursor: pointer;
}

.signup-submit:hover {
  background-color: var(--bg-accent-dark);
}

.signup-link {
  grid-column: 1 / 4;
  place-self: center;
  text-align: center;
}

.login-link {
  font-size: 14px;
  grid-area: 8 / 1 / 9 / 4;
  place-self: center;
}

.login-container input {
  height: 100%;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box; /* Firefox, other Gecko */
  box-sizing: border-box; /* Opera/IE 8+ */
  font-size: 16px;
  outline: none;
}

.login-container input:focus {
  border: 2px solid var(--border-accent);
  outline: none;
  padding: 7px;
}

.signup-container input {
  height: 100%;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box; /* Firefox, other Gecko */
  box-sizing: border-box; /* Opera/IE 8+ */
  font-size: 16px;
  outline: none;
}

.signup-container input:focus {
  border: 2px solid var(--border-accent);
  outline: none;
  padding: 7px;
}

.password-reset-container input {
  height: 100%;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  -webkit-box-sizing: border-box;
  /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box;
  /* Firefox, other Gecko */
  box-sizing: border-box;
  /* Opera/IE 8+ */
  font-size: 16px;
  outline: none;
}

.password-reset-container input:focus {
  border: 2px solid var(--border-accent);
  outline: none;
  padding: 7px;
}

.password-reset-container-2 input {
  height: 100%;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  -webkit-box-sizing: border-box;
  /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box;
  /* Firefox, other Gecko */
  box-sizing: border-box;
  /* Opera/IE 8+ */
  font-size: 16px;
  outline: none;
}

.password-reset-container-2 input:focus {
  border: 2px solid var(--border-accent);
  outline: none;
  padding: 7px;
}


.login-title {
  text-align: center;
  margin: 20px;
  padding-top: 60px;
}

.errors {
  grid-column: 1 / 4;
  place-self: center;
  text-align: center;
}

.errorlist {
    background-color: var(--bg-error-strong);
    color: var(--text-error-strong);
    padding: 0 12px;
    border-radius: 8px;
}

button {
  font-family: "Playfair", serif;
  border-radius: 8px;
  border: none;
  background-color: var(--bg-accent);
  color: var(--bg-primary);
  font-weight: 500;
}

.tag_name_container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.follower_count {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}

.fixy {
  flex-basis: 80px;
  flex-grow: 0;
  flex-shrink: 0;
}

.page-heading {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

h1 .profilename {
  font-family: "Charlottenburg", serif;
  font-weight: 100;
}

.profile_tag_list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 40px;
}

.profile_tag_list a {
  white-space: nowrap;
  padding-bottom: 0px;
}

button:disabled {
  background-color: var(--bg-disabled);
}

.top-boi {
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  margin-bottom: 24px;
  column-gap: 12px;
  row-gap: 8px;
  max-width: 94vw;
}

.top-boi h1 {
  margin-block-start: 0;
  margin-block-end: 0;
}

.top-boi a:hover {
  color: var(--text-accent);
  text-decoration: none;
}

.top_boi_permalynk a:hover {
  color: var(--text-accent);
    text-decoration: none;
}

@media (max-width: 650px) {
  .centrepiece {
    order: 4 !important;
    text-align: center;
    width: 100%;
  }
}

.centrepiece {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
  order: 2;
}


/* 1. Default: everything fits on one line */
.top_boi_permalynk {
  margin-top: 12px;
  margin-bottom: 24px;
  display: grid;
  /* single source of truth */
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "logosmall_permalynk centrepiece_permalynk buttons_permalynk";
  align-items: center;
  column-gap: 12px;
  row-gap: 8px;
  width: 100%;
  max-width: 94vw;
}

.logosmall_permalynk {
  grid-area: logosmall_permalynk;
}

.buttons_permalynk {
  grid-area: buttons_permalynk;
  white-space: nowrap;
  justify-self: end;
}

/* sticks to the right edge */
.centrepiece_permalynk {
  grid-area: centrepiece_permalynk;
  justify-self: center;
  display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

/* 2. “stack” → likes drops to its own centred line */
.top_boi_permalynk.stack {
  grid-template-columns: auto auto;
  /* only two cells now  */
  grid-template-areas:
    "logosmall_permalynk buttons_permalynk"
    /* row 1 */
    "centrepiece_permalynk centrepiece_permalynk";
  /* row 2 – centred automatically */
}

.tag-centrepiece {
  order: 5;
  text-align: center;
  width: 100%;
  margin-top: 20px;
}


.bio {
  order: 6;
  text-align: center;
  width: 100%;
}

.bio > a {
  word-break: break-all;
  text-decoration: underline;
  text-decoration-color: var(--text-placeholder);
}

.bio > a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.bio > a.internal-link:hover {
  color: var(--text-accent) !important;
}

.profile-links-section {
  order: 7;
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.profile-link {
  color: var(--text-secondary) !important;
  text-decoration: underline;
  text-decoration-color: var(--text-placeholder);
  font-size: 18px;
}

.profile-link:hover {
  color: var(--text-primary) !important;
  text-decoration: none;
}

.profile-link:visited {
  color: var(--text-tertiary);
}

.profile-link:visited:hover {
  color: var(--text-primary) !important;
}

.profile-link-separator {
  color: var(--text-quaternary);
  text-decoration: none;
}

.profile-centrepiece {
  order: 5;
  text-align: center;
  width: 100%;
  margin-top: 20px;
}

.profile-search-container {
  order: 2;
  text-align: center;
  display: flex;
  justify-content: center;
}

@media (max-width: 500px) {
  .profile-search-container {
    order: 4 !important;
    width: 100%;
  }

  .profile-search-container .search-form-inline {
    width: 100%;
  }
}

.description {
  font-family: "Playfair", serif;
  font-weight: 300;
  margin: 6px 0 2px 0px;
  line-height: 1.2;
  color: var(--text-tertiary);
}

.description > a {
  word-break: break-all;
  text-decoration: underline;
  text-decoration-color: var(--text-placeholder);
}

.description > a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.description > a.internal-link:hover {
  color: var(--text-accent) !important;
}

.lynk_item_description {
  font-family: "Playfair", serif;
  font-weight: 300;
  margin: 6px 0 2px 2px;
  line-height: 1.2;
  font-style: italic;
  color: var(--text-tertiary);
}

.lynk_item_description > a {
  word-break: break-all;
  text-decoration: underline;
  text-decoration-color: var(--text-placeholder);
}

.lynk_item_description > a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.lynk_item_description > a.internal-link:hover {
  color: var(--text-accent) !important;
}


.tag_description {
  font-family: "Playfair", serif;
  font-weight: 300;
  margin: 6px auto 2px;
  line-height: 1.2;
  max-width: 650px;
  text-align: center;
}

.tag_description > a {
  word-break: break-all;
  text-decoration: underline;
  text-decoration-color: var(--text-placeholder);
}

.tag_description > a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.tag_description > a.internal-link:hover {
  color: var(--text-accent) !important;
}



.mono input[type="text"] {
  font-family: monospace;
}

.mono input[type="email"] {
  font-family: monospace;
}

.mono {
  font-family: monospace;
}

.selection {
  line-height: 1.3;
}

div.timestamp {
  font-size: 16px;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  row-gap: 0;
  column-gap: 4px;
  white-space: nowrap;
  color: var(--text-quaternary);
}

span.timestamp {
    /* font-size: 16px; */
    white-space: nowrap;
    color: var(--text-quaternary);
}

.timestamp > a {
  color: var(--text-quaternary) !important;
}

.timestamp>a:hover {
  color: var(--text-accent) !important;
}


.notif-timestamp {
  font-size: 14px;
  color: var(--text-quaternary);
}

#id_content {
  /* width: 90%; */
  padding: 10px;
}

.submit-button {
  padding: 8px;
  margin: 8px 8px 8px 0px;
}

.comment {
  margin-bottom: 18px;
}

.comment-header {
  color: var(--text-quaternary);
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
}

.comment_author {
  font-family: "Playfair Display";
  font-size: 20px;
  font-weight: 600;
  color: var(--text-secondary) !important;
}

a.comment_author {
  text-decoration: none !important;
}

a.comment_author:hover {
  text-decoration: none !important;
  color: var(--text-accent) !important;
}

a.comment_author:visited:hover {
  text-decoration: none !important;
}

.comment_content {
  line-height: 1.2;
  color: var(--text-tertiary);
}

.comment_content > a {
  word-break: break-all;
  text-decoration: underline;
  text-decoration-color: var(--text-placeholder);
}

.comment_content > a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.comment_content > a.internal-link:hover {
  color: var(--text-accent) !important;
}

/* Styles for links inside comment paragraphs (after tex-linebreak processing) */
.comment-para a {
  word-break: break-all !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  text-decoration: underline;
  text-decoration-color: var(--text-placeholder);
}

.comment-para a:hover {
  color: var(--text-primary);
  text-decoration: none;
}

/* But keep @mentions from breaking */
.comment-para a[href*="/@"] {
  white-space: nowrap !important;
}

/* Internal links in comment paragraphs */
.comment-para a.internal-link {
  text-decoration: underline;
  text-decoration-color: var(--text-accent) !important;
  text-decoration-thickness: 3px !important;
  text-underline-position: under;
}

.comment-para a.internal-link:hover {
  text-decoration: none !important;
  color: var(--text-accent);
}

.comment-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
}

.comment-button-container {
  /* width: 90%; */
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.submit-button {
  padding: 8px 16px;
  margin: 0;
}

/*
TODO: Hide logo and sign up on other pages on small devices
*/


blockquote {
  margin: 0;
  padding: 0;
  position: relative;
}

blockquote p:first-of-type:before {
  content: '\201c';
  position: absolute;
  left: -.5em;
}

blockquote p:last-of-type:after {
  content: '\201d';
  position: absolute;
}

blockquote footer {
  position: relative;
}

blockquote footer:before {
  content: '~';
  position: absolute;
  left: -.6em;
}

.about > p {
  margin-top: 8px;
  margin-bottom: 36px;
}

.about > h1 {
  margin-bottom: 0;
}



.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--modal-backdrop);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  pointer-events: auto;
}

.modal-content {
  position: relative;
  cursor: default;
  margin: 94px 40px auto auto;
  padding: 24px;
  width: 500px;
  background-color: var(--bg-primary);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  border: 1px;
  overflow-y: auto;
  max-height: calc(90vh - 100px);
  min-margin: 8px;  /* Ensures at least 8px margin all around */
  pointer-events: auto;
  touch-action: manipulation;
  z-index: 1001;
}

/* Only make it responsive when viewport gets too small */
@media screen and (max-width: 628px) {
  .modal-content {
    width: calc(100% - 64px);  /* Full width minus 8px on each side */
    margin: 94px 8px auto 8px;  /* At least 8px on all sides */
  }
}

.notifications {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--text-quaternary);
}

.notification {
  display: flex;
  flex-direction: column;
  gap: 0px;
  align-items: flex-start;
  line-height: 1.2;
}

.notification a {
  font-weight: 600;
  color: var(--text-tertiary);
  text-decoration: underline;
  text-decoration-color: var(--text-accent);
}

.notification a:hover {
  color: var(--text-accent);
  text-decoration: none;
}

.notif-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  margin-top: -6px;
  font-weight: 700;
  font-size: 20px;
  gap: 8px;
}

.notif-count-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.notifCount {
  cursor: pointer;
  z-index: 2;
}

.clearNotifs {

}

.close-btn {
  /* color: var(--text-placeholder); */
  cursor: pointer;
  float: right;
}

.close-btn:hover,
.close-btn:focus {
  color: var(--text-primary);
}




.commentInput textarea {
  /* These properties were moved to .commentInput to ensure identical styling
     with the ::after pseudo-element for correct auto-sizing. */
}

.commentInput {
  /* easy way to plop the elements on top of each other and have them both sized based on the tallest one's height */
  display: grid;
  font-family: "Playfair", serif;
  font-size: 18px;
}

.commentInput::after {
  /* Note the weird space! Needed to preventy jumpy behavior */
  content: attr(data-replicated-value) " ";

  /* This is how textarea text behaves */
  white-space: pre-wrap;

  /* Hidden from view, clicks, and screen readers */
  visibility: hidden;
}
.commentInput > textarea {
  /* You could leave this, but after a user resizes, then it ruins the auto sizing */
  resize: none;

  /* Firefox shows scrollbar on growth, you can hide like this. */
  overflow: hidden;
}
.commentInput > textarea,
.commentInput::after {
  /* Identical styling required!! */
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  -webkit-box-sizing: border-box;
  /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box;
  /* Firefox, other Gecko */
  box-sizing: border-box;
  /* Opera/IE 8+ */
  outline-color: var(--border-accent);
  background-color: var(--bg-primary);
  color: var(--text-primary);

  padding: 0.5rem;
  font: inherit;

  /* Place on top of each other */
  grid-area: 1 / 1 / 2 / 2;

  /* Prevent long URLs from expanding textarea width, but keep words intact */
  word-break: break-word;
  overflow-wrap: break-word;
}


.centered-container {
  width: 90vw;
  max-width: 500px;
}


.waitlist-container {
  display: flex;
  flex-direction: column;
  row-gap: 8px;
  width: 100%;
  align-items: stretch;

}

.waitlist-submit {
  align-self: stretch;
}

.waitlist-container input {
  height: 100%;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box; /* Firefox, other Gecko */
  box-sizing: border-box; /* Opera/IE 8+ */
  font-size: 16px;
  outline: none;
}

.waitlist-container input:focus {
  border: 2px solid var(--border-accent);
  outline: none;
  padding: 7px;
}


.waitlist-container button {
  height: 100%;
  width: 100%;
  padding: 6px;
  border-radius: 8px;
  font-size: 16px;
  font-family: monospace;

}

[contenteditable="true"] {
  outline: 2px dotted var(--like-color);
  border-radius: 4px;
  padding: 4px;
  caret-color: var(--like-color);
}

input {
  font-family: "Playfair", serif;
  font-weight: 300;
  font-size: 18px;
}

#id_description {
  font-style: italic;
}

#id_description::placeholder {
  font-style: italic;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple,
.select2-container .select2-dropdown .select2-results__option,
.select2-search__field {
  font-family: "Playfair", serif !important;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.15;
  /* background-color: var(--bg-primary) !important; */
}



.select2-results__option {
  margin: 4px;
  border-radius: 4px;
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    border-radius: 8px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border-radius: 8px;
}

.select2-dropdown {
    border-radius: 8px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
  padding-left: 8px;
  padding-right: 8px;
  color: var(--bg-primary);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
  margin-left: 8px;
  margin-top: 8px;
  background-color: var(--bg-accent);
  border: 1px solid var(--border-accent);
}

.select2-container .select2-search--inline .select2-search__field {
  margin-top: 8px;
  margin-left: 8px;
  height: 20px;
  color: var(--text-primary) !important;
}

.select2-container--default .select2-results__option--selected {
  background-color: var(--bg-accent) !important;
  color: var(--bg-primary);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  border-right: 1px solid var(--bg-primary);
  color: var(--bg-primary);
  padding: 0 6px;
  border-radius: 0;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: var(--text-accent);
  background-color: var(--bg-primary);
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border: solid var(--border-accent) 1px;
    outline-style: solid;
    outline-color: var(--border-accent);
    outline-width: 1px;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: var(--bg-accent);
    color: var(--bg-primary);
}

select2-results__option select2-results__option--selectable select2-results__option--highlighted

.select2-container {
  min-width: 300px !important;
  /* Adjust this value as needed */
}

.select2-container .select2-selection--multiple {
  min-width: 300px;
  /* This should match the container's min-width */
  background-color: var(--bg-primary) !important;
}

.select2-dropdown {
  min-width: 300px;
  /* This ensures the dropdown is at least as wide as the container */
  background-color: var(--bg-primary) !important;
}

/* Inserting this collapsed row between two flex items will make 
 * the flex item that comes after it break to a new row */
.break {
  flex-basis: 100%;
  height: 0;
}

.button-container {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: stretch;
    vertical-align: top;
    gap: 4px;
}

.button-container button {
    flex: 0 0 auto;
}

.button-container button:last-child {
    margin-right: 0;
}

/* Lynk add form hidden fields */
/* Base CSS that works everywhere */
.add-line.add-title-input,
.add-line.add-tags-input, 
.add-line.add-description-input,
.add-button-line.add-post-button {
  display: none;
}

/* Modern browsers get the :has() behavior */
@supports (selector(:has(*))) {
  .add-container:has(#id_url:not(:placeholder-shown)) .add-line,
  .add-container:has(#id_url:not(:placeholder-shown)) .add-button-line {
    display: flex;
  }
}

.buttons a[title="Settings"],
.buttons_permalynk a[title="Settings"] {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-top: 2px;
    -webkit-mask-image: url("gear.c4f8df1fb2a2.svg");
    mask-image: url("gear.c4f8df1fb2a2.svg");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    background-color: var(--icon-color-settings);
    cursor: pointer;
}

.buttons a[title="Settings"]:hover,
.buttons_permalynk a[title="Settings"]:hover {
    background-color: var(--text-primary);
}

.like-btn, .repost-btn {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    cursor: pointer;
    position: relative;
    top: 2px;
    flex-shrink: 0;
    -webkit-mask-size: cover;
    mask-size: cover;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* Like Button Styles */
.liked-class {
    -webkit-mask-image: url("heart-filled.cd0e202d4842.svg");
    mask-image: url("heart-filled.cd0e202d4842.svg");
    background-color: var(--icon-color-liked);
    opacity: 0.9;
}

.unliked-class {
    -webkit-mask-image: url("heart-outline.23fdd2b2ab10.svg");
    mask-image: url("heart-outline.23fdd2b2ab10.svg");
    background-color: var(--icon-color-unselected);
    opacity: 0.7;
}

.unliked-class:hover {
  background-color: var(--icon-color-liked);
  opacity: 1;
}

.like-count {
  color: var(--icon-color-unselected);
}
/* When parent has liked-class, make count red */
.liked-class+.like-count {
  color: var(--icon-color-liked);
  /* Same red as the heart icon */
}

.show-notes-section {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  margin-top: 36px;
  margin-bottom: 4px;
}

.show-notes-section h3 {
  margin-top: 0;
}

#generate-show-notes {
  font-size: 18px;
  border-radius: 4px;
  padding: 2px 8px 2px 8px;
}

#generate-show-notes:hover {
  background-color: var(--bg-accent-dark);
}

.delete-show-notes {
  color: var(--text-disabled);
  cursor: pointer;
}

#bookmarkletText {
  margin: 0;
}

.follower-count-text {
    cursor: default;
}

.has-followers {
    cursor: pointer;
}

.has-followers:hover {
    text-decoration: underline;
}

.followers-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.follower-item {
    padding: 4px 0;
}

.follower-item:hover {
  background-color: var(--bg-secondary);
}

.follower-item a {
    color: inherit;
    text-decoration: none;
}

.follower-item a:hover {
    text-decoration: underline;
}

#followersModal {
    position: absolute;
    background: none;
    width: auto;
    height: auto;
    top: auto;
    left: auto;
}

#followersModal .followers-modal-content {
    position: absolute;
    margin: 0;
    width: 200px;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-quaternary);
    z-index: 1000;
}

#followersModal .followers-close-btn {
  font-size: 24px;
  margin: -10px -10px 0 0;
  opacity: 1 !important;
}

.dimmed {
  opacity: 0.3;
}

.follower-count-text.active {
  font-weight: 600;
}



.followers-modal-content {
  position: relative;
  margin: 0;
  padding: 20px;
  width: 200px;
  background-color: var(--bg-primary);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  border: 1px solid var(--border-quaternary);
  overflow-y: auto;
  max-height: calc(90vh - 100px);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 8px;
}

.followers-close-btn {
  color: var(--text-placeholder);
  font-size: 24px;
  cursor: pointer;
  float: right;
  line-height: 1;
  margin-top: -8px;
}

.follower_count {
  position: relative;
  /* Add this to make it a positioning context for the modal */
}



.repost-btn {
    -webkit-mask-image: url("repeat.78698af5513c.svg");
    mask-image: url("repeat.78698af5513c.svg");
}

.reposted-class {
    background-color: var(--icon-color-reposted);
    opacity: 0.9;
}

.unreposted-class {
    background-color: var(--icon-color-unselected);
    opacity: 0.7;
}

.unreposted-class:hover {
    background-color: var(--icon-color-reposted);
    opacity: 1;
}

.repost-count {
    color: var(--icon-color-unselected);
}
/* When parent has reposted-class, make count green */
.reposted-class+.repost-count {
  color: var(--icon-color-reposted);
  /* Same green as the repost icon */
}

.repost-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-backdrop-darker);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px); /* Safari support */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    pointer-events: auto;
    min-margin: 8px;
}

.repost-modal-content {
    background: var(--bg-primary);
    padding: 24px;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: auto;
    touch-action: manipulation;
    z-index: 1001;
    color: var(--text-primary);
}

.repost-modal-content h2,
.repost-modal-content h3 {
    color: var(--text-primary);
}

.repost-modal-content h3 img {
    filter: brightness(0) saturate(100%) invert(var(--text-invert-amount, 0));
}

@media (prefers-color-scheme: dark) {
    .repost-modal {
        background: rgba(255, 255, 255, 0.05);
    }

    .repost-modal-content h3 img {
        filter: brightness(0) saturate(100%) invert(1);
    }
}

@media screen and (max-width: 564px) {
  .repost-modal-content {
    width: calc(100% - 64px);
    /* Full width minus 8px on each side */
    /* margin: 94px 8px auto 8px; */
    /* At least 8px on all sides */
  }
}

.repost-form-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

/* Each input line */
.repost-title-container,
/* .repost-tag-container, */
.repost-description-container {
    display: flex;
    flex-direction: row;
    min-height: 40px;
    align-items: stretch;
}

/* Input fields */
.repost-title,
.repost-modal-content input {
    width: 100%;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--border-primary);
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    outline-color: var(--border-accent);
    min-height: 40px;
    color: var(--text-primary);
    background: var(--bg-primary);
}

input.repost-title:hover {
    color: var(--text-primary);
}

.repost-title::selection {
    background-color: var(--border-accent);
    color: var(--text-inverted);
}

/* Buttons container */
.repost-modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.repost-modal-buttons button {
    min-height: 40px;
    min-width: 80px;
}

/* Select2 container styles */
.repost-modal-content .select2-container {
    width: 100% !important;
    display: block;
    min-height: 40px;
}

.repost-modal-content .select2-container .select2-selection--multiple {
    min-height: 40px !important;
    height: auto;
    display: flex;
    align-items: center;
}

.repost-modal-content .select2-container--default .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
}

.repost-description-container input {
  font-style: italic;
}

.repost-description-container input::placeholder {
  font-style: italic;
}


.repost-modal-content .select2-container--default .select2-selection--multiple .select2-selection__choice {
    margin-top: 6px;
}

.repost-modal-content h3 {
  text-align: center;
  margin-bottom: 12px;
  margin-top: 12px;
}

.repost-modal-content h3 img {
  position: relative;
  top: 2px;
}

.repost-modal-content .select2-container--default .select2-selection--multiple .select2-search__field {
    margin-top: 4px;
}

.repost-tag-container {
    display: flex;
    flex-direction: row;
    min-height: 40px;
    align-items: stretch;
    width: 100%;
}

.repost-tag-container .select2-container {
    flex: 1;
    min-width: 0; /* This prevents flex items from overflowing */
}

.repost-tag-container .select2-selection {
    height: 100%;
    overflow: hidden;
}

#loading {
    color: var(--text-quaternary);
    padding: 20px;
    text-align: center;
}

.privacy-policy {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.privacy-policy h1 {
    color: var(--text-accent);
    border-bottom: 2px solid var(--border-quaternary);
    padding-bottom: 10px;
}

.privacy-policy h2 {
    color: var(--text-privacy-heading);
    margin-top: 30px;
}

.privacy-policy .last-updated {
    color: var(--text-tertiary);
    font-style: italic;
    margin-bottom: 30px;
}

.extension-banner {
    width: 100%;
    background-color: var(--bg-accent-dark);
    color: var(--text-inverted);
    border-bottom: 1px solid var(--bg-highlight);
    padding: 12px 0; /* Changed to only vertical padding */
    text-align: center;
    position: relative;
    display: none;
    margin: 0;
    /* Add these properties for full width */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
}

.banner-content {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 20px;
    font-weight: 600;
    padding: 0 12px; /* Add horizontal padding here instead */
}

.banner-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.banner-link {
    color: var(--text-inverted) !important;
    text-decoration: underline;
    font-weight: 800;
}

.extension-banner .banner-link:hover {
    text-decoration: none;
    color: var(--text-inverted) !important;
}

.extension-banner .banner-link:visited {
    color: var(--text-inverted) !important;
}

.banner-dismiss {
    background: none;
    border: none;
    color: var(--text-inverted);
    cursor: pointer;
    font-size: 20px;
    padding: 0 6px;
    line-height: 1;
}

.banner-dismiss:hover {
    color: var(--text-primary);
}

strike {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

#buy-button {
  background-color: var(--bg-accent);
  color: var(--text-inverted);
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
}

#buy-button:hover {
  background-color: var(--bg-accent-dark);
  text-decoration: none;
}

.settings-section-title {
  margin-top: 36px;
  /* margin-bottom: -12px; */
}

.settings-section-text {
  margin-top: 4px;
  /* margin-bottom: 12px; */
}

.invite-list {
  list-style-type: none;
  padding-left: 12px;
}

h4 {
  margin: 8px 0 0 0;
  color: var(--text-tertiary);
}

.member-list {
  text-align: center;
}

.member-list-title {
  text-align: center;
  margin-bottom: 0 !important;
}

.active-member-badge {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-left: 4px;
  position: relative;
  top: -1px;
  -webkit-mask-image: url("heart-filled.cd0e202d4842.svg");
  mask-image: url("heart-filled.cd0e202d4842.svg");
  -webkit-mask-size: cover;
  mask-size: cover;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  background-color: var(--icon-color-liked);
  opacity: 0.9;
}

.comment-edit-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  /* width: 90%; */
}

/* Comment editing styles - updated to match regular comment box */
.comment-edit-form {
    margin: 10px 0;
    width: 100%;
    
}

/* Match the edit textarea to the regular comment input */
.edit-comment-textarea {
    width: 100%;
    box-sizing: border-box; /* Include padding and border in the width */
    min-height: 100px;
    font-family: "Playfair", serif;
    font-size: 18px;
    padding: 8px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    background-color: var(--bg-primary);
    resize: vertical;
    outline-color: var(--border-accent);
    color: var(--text-primary);
}

/* Match the button container alignment with the comment form */
.comment-edit-buttons {
    display: flex;
    justify-content: flex-end; /* Align buttons to the right */
    gap: 10px;
}

.save-comment-button,
.cancel-comment-button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
}

.save-comment-button {
    background-color: var(--bg-success); /* Match the green Save button */
    color: var(--text-success);
}

.save-comment-button:hover {
    background-color: var(--bg-success-hover);
}

.cancel-comment-button {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    color: var(--text-tertiary);
}

.cancel-comment-button:hover {
    background-color: var(--bg-danger-hover);
    color: var(--text-inverted);
}

/* Ensure the edit textarea has the same auto-resize behavior */
.comment-edit-form {
    display: grid;
}

.comment-edit-form::after {
    content: attr(data-replicated-value) " ";
    white-space: pre-wrap;
    visibility: hidden;
}

.comment-edit-form > textarea {
    resize: none;
    overflow: hidden;
    overflow-y: auto;
      /* Enable native scrollbar */
}

.comment-edit-form > textarea,
.comment-edit-form::after {
    grid-area: 1 / 1 / 2 / 2;
    padding: 10px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
}

.comment {
  width: 100%;
}

.edit-comment-textarea {
  scrollbar-color: rgba(0, 0, 0, 0) transparent;
}

.katex {
  font-size: 1em;
}

.katex-display {
  font-size: 1.25em;
  margin-bottom: 0;
  margin-top: 0;
}

.comments-section .katex-display {
  margin-bottom: 12px;
  margin-top: 12px;
}

/* Revenue Tracker Styles */
.revenue-tracker {
    margin: 32px 0 96px;
    text-align: center;
}

.revenue-amount {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.revenue-scale {
    margin: 0 auto;
    max-width: 90%;
}

.scale-container {
    position: relative;
    height: 40px;
}

.scale-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--border-tertiary);
    top: 50%;
    transform: translateY(-50%);
}

.scale-markers {
    position: relative;
    width: 100%;
    height: 100%;
}

.marker {
    position: absolute;
    top: 100%;
    transform: translateX(-50%);
    font-size: 1rem;
    color: var(--text-tertiary);
    z-index: -1;
}

.marker:before {
    content: '';
    position: absolute;
    height: 8px;
    width: 2px;
    background-color: var(--border-tertiary);
    top: -20px;
    left: 50%;
}

.current-marker {
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--bg-accent-dark);
    border-radius: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

mark {
  background-color: var(--bg-warning);
  color: var(--text-inverted);
  border-radius: 2px;
  font-weight: 400;
  text-decoration-color: var(--text-inverted);
}

a:hover mark {
  text-decoration-line: underline;
  text-decoration-color: var(--text-inverted);
}

.search-form-inline {
  flex-grow: 1;
  flex-shrink: 1;
  display: flex;
  flex-direction: row;
  min-width: 0;
  max-width: 400px;
}

.search-input-inline {
  flex-grow: 1;
  flex-shrink: 1;
  border-radius: 8px;
  border: 1px solid var(--border-primary);
  padding: 4px 12px;
  outline: none;
  min-width: 0;
  background-color: transparent;
  color: var(--text-primary);
}

.search-input-inline:focus {
  border: 2px solid var(--border-accent);
  outline: none;
  padding: 3px 11px;
}

/* Apply styles when screen width is 400px or less */
@media (max-width: 400px) { 
  .search-input-inline {
    min-width: 0px;
    max-width: 100%;
  }

  .search-form-inline {
      min-width: 0;
      width: 100%;
    }

}

#invite-code-display {
  cursor: pointer;
  text-decoration: underline;
  color: var(--text-accent);
}

#invite-code-display:hover {
  color: var(--text-accent-dark);
}


strong {
  font-weight: 700;
}

.add-block {
  margin-top: 12px;
  margin-bottom: 24px;
  padding: 8px;
  text-align: center;
}


.membership-status-active {
  padding: 4px 24px;
  border-radius: 5px;
  margin: 12px 0;
  background-color: var(--bg-membership-active);
  border: 1px solid var(--border-membership-active);
  border-radius: 8px;
}


.lynks-container[data-sortable="true"] .lynk-item {
  cursor: grab;
  transition: background-color 0.2s ease;
}

.lynks-container[data-sortable="true"] .lynk-item:hover {
  background-color: var(--bg-secondary);
}

/* SortableJS classes */
.sortable-ghost {
  opacity: 0.4;
  background-color: var(--bg-secondary);
}

.sortable-drag {
  cursor: grabbing !important;
  opacity: 1 !important;
  background: var(--bg-secondary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Force grabbing cursor everywhere during drag */
body.sortable-dragging * {
  cursor: grabbing !important;
}

.sort-controls {
  color: var(--text-tertiary);
  margin-top: 10px;
}

.sort-controls a {
  color: var(--text-secondary);
  text-decoration: none;
}

.sort-controls a:hover {
  text-decoration: underline;
}

.pagination {
  padding: 0 8px;
}

.comments-section {
  padding: 0 8px;
}

.comments-container {
  margin-top: 40px;
}

a:link.comment-action {
  color: var(--text-quaternary);
}

a:visited.comment-action {
  color: var(--text-quaternary);
}

.mention {
  color: var(--text-accent);
  font-weight: 700;
  text-decoration: none !important;
}

.mention:link {
  color: var(--text-accent);
}

.mention:visited {
  color: var(--text-accent);
}

.mention:hover {
  color: var(--text-accent-dark) !important;
  text-decoration: underline;
}

.comment_content>.mention {
  text-decoration: none;
}

.comment_content>.mention:hover {
  text-decoration: underline;
}

.internal-link {
  font-weight: 600;
  text-decoration-color: var(--text-accent) !important;
  text-decoration-thickness: 3px !important;
  text-underline-position: under;
}


.internal-link:link {
  font-weight: 600;
}

.internal-link:visited {
  color: var(--text-secondary);
}

.internal-link:hover {
  text-decoration: none !important;
  color: var(--text-accent);
}


/* Backlinks Section */
.backlinks-section {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
  line-height: 1.2;
}

.backlinks-section h3 {
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.backlinks-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.backlinks-section li {
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.backlinks-section li a {
  color: var(--text-secondary);
  text-decoration: underline;
  font-weight: 600;
  text-decoration-color: var(--text-accent) !important;
  text-decoration-thickness: 3px !important;
  text-underline-position: under;
}

.backlinks-section li a:hover {
  color: var(--text-accent);
  text-decoration: none;
}

/* Style all links to lynkmi.com as internal links */
a[href^="https://lynkmi.com"]:not(.tag):not(.mention),
a[href^="http://lynkmi.com"]:not(.tag):not(.mention),
a[href^="https://www.lynkmi.com"]:not(.tag):not(.mention),
a[href^="http://www.lynkmi.com"]:not(.tag):not(.mention) {
  font-weight: 600;
  text-decoration-color: var(--text-accent) !important;
  text-decoration-thickness: 3px !important;
  text-underline-position: under;
}

a[href^="https://lynkmi.com"]:hover:not(.tag):not(.mention),
a[href^="http://lynkmi.com"]:hover:not(.tag):not(.mention),
a[href^="https://www.lynkmi.com"]:hover:not(.tag):not(.mention),
a[href^="http://www.lynkmi.com"]:hover:not(.tag):not(.mention) {
  text-decoration: none !important;
  color: var(--text-accent) !important;
}