.fr-thead {
  margin-bottom: 1.25rem;
  padding: 1.125rem 1.25rem;
  background: linear-gradient(180deg, var(--white) 0%, var(--bone) 100%);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 1px 0 var(--has-border-inset, #fffc),
    0 0 0 1px var(--stone-200),
    0 0 0 4px var(--ivory),
    0 0 0 5px var(--stone-200),
    0 8px 30px #0000000f;
}

.fr-thead__top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .375rem .5rem;
}

.fr-thead__title {
  flex: 1 1 20rem;
  min-width: 0;
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: .01em;
  color: var(--stone-900);
}

.fr-thead__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3125rem .75rem;
  margin-top: .625rem;
  font-size: .75rem;
  color: var(--stone-400);
}

.fr-thead__meta a {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--stone-500);
  transition: color var(--transition-fast);
}

.fr-thead__meta a:hover {
  color: var(--gold);
}

.fr-thead__fact {
  display: inline-flex;
  align-items: center;
  gap: .375rem;
}

.fr-thead__fact svg {
  width: .8125rem;
  height: .8125rem;
  opacity: .55;
  flex-shrink: 0;
}

.fr-thead__fact b {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--stone-600);
}

.fr-thead__acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: 1rem;
  padding-top: .875rem;
  border-top: 1px solid var(--stone-100);
}

.fr-iconbtn {
  display: inline-flex;
  align-items: center;
  gap: .4375rem;
  padding: .375rem .5rem;
  font-family: var(--font-body);
  font-size: .75rem;
  color: var(--stone-500);
  background: none;
  border: 0;
  border-radius: .25rem;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.fr-iconbtn:hover {
  color: var(--stone-900);
  background: color-mix(in srgb, var(--stone-200) 30%, transparent);
}

.fr-iconbtn svg {
  width: .875rem;
  height: .875rem;
  flex-shrink: 0;
}

.fr-iconbtn.is-on {
  color: var(--stone-900);
  background: color-mix(in srgb, var(--stone-200) 45%, transparent);
}

.fr-actgrp {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-right: auto;
}


.fr-actgrp > .fr-dis:hover {
  background: none;
}

.fr-toolrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.fr-toolrow__spacer {
  flex: 1 1 auto;
}

.fr-newline {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.5rem 0;
}

.fr-newline:before,
.fr-newline:after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgb(var(--gold-rgb) / .4));
}

.fr-newline:after {
  background: linear-gradient(90deg, rgb(var(--gold-rgb) / .4), transparent);
}

.fr-newline span {
  font-family: var(--font-heading);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gold);
}

.fr-msg {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  margin-bottom: 1.25rem;
  background: linear-gradient(180deg, var(--white) 0%, var(--bone) 100%);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 1px 0 var(--has-border-inset, #fffc),
    0 0 0 1px var(--stone-200),
    0 0 0 4px var(--ivory),
    0 0 0 5px var(--stone-200),
    0 8px 30px #0000000f;
  overflow: hidden;
}

.fr-msg__user {
  position: relative;
  padding: 1.25rem 1rem;
  text-align: center;
  background: linear-gradient(180deg, var(--ivory) 0%, var(--bone) 100%);
}

.fr-msg__user:after {
  content: "";
  position: absolute;
  top: 1rem;
  right: 0;
  bottom: 1rem;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--stone-300), transparent);
}

.fr-msg__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  margin: 0 auto .75rem;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--stone-600);
  background: linear-gradient(135deg, var(--stone-200), var(--stone-300));
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--stone-200);
}

.fr-msg__avatar img,
.fr-editor__avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 50%;
}

.fr-msg__avatar--gold {
  color: #1c1814;
  background: linear-gradient(135deg, #8b6914 0%, #e8c96a 100%);
  box-shadow: 0 0 0 3px var(--white),
    0 0 0 4px rgb(var(--gold-rgb) / .45),
    0 0 16px rgb(var(--gold-rgb) / .25);
}

.fr-msg__name {
  display: block;
  font-family: var(--font-heading);
  font-size: .9375rem;
  font-weight: 700;
  color: var(--stone-900);
  transition: color var(--transition-fast);
}

.fr-msg__name:hover {
  color: var(--gold);
}

.fr-msg__name--gold {
  color: var(--gold);
}

.fr-msg__rank {
  margin-top: .1875rem;
  font-size: .6875rem;
  color: var(--stone-400);
}

.fr-msg__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .25rem;
  margin-top: .625rem;
}

.fr-msg__stats {
  margin-top: .875rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--stone-200);
}

.fr-msg__stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  padding: .1875rem 0;
  font-size: .6875rem;
  color: var(--stone-400);
}

.fr-msg__stat > span::after {
  content: ':';
}

.fr-msg__stat b {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
  font-weight: 700;
  color: var(--stone-600);
}

.fr-msg__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.fr-msg__head {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--stone-100);
}

.fr-msg__date {
  font-family: var(--font-mono);
  font-size: .6875rem;
  color: var(--stone-400);
}

.fr-msg__num {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: .6875rem;
  font-weight: 700;
  color: var(--stone-300);
  transition: color var(--transition-fast);
}

.fr-msg__num:hover {
  color: var(--gold);
}

.fr-msg__more {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  color: var(--stone-400);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.fr-msg__more:hover {
  color: var(--stone-800);
  background: var(--ivory);
}

.fr-msg__more svg {
  width: .9375rem;
  height: .9375rem;
}

.fr-msg__content {
  flex: 1;
  padding: 1.125rem 1.25rem;
  font-size: .875rem;
  line-height: 1.65;
  color: var(--stone-700);
}

.fr-msg__content > *:first-child {
  margin-top: 0;
}

.fr-msg__content > *:last-child {
  margin-bottom: 0;
}

.fr-msg__content p {
  margin: 0 0 .875rem;
}

.fr-msg__content strong {
  font-weight: 700;
  color: var(--stone-900);
}

.fr-msg__content a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: rgb(var(--gold-rgb) / .35);
  text-underline-offset: .1875rem;
  transition: text-decoration-color var(--transition-fast);
}

.fr-msg__content a:hover {
  text-decoration-color: var(--gold);
}

.fr-msg__content ul,
.fr-msg__content ol {
  margin: 0 0 .875rem;
  padding-left: 1.125rem;
}

.fr-msg__content li {
  margin-bottom: .3125rem;
}

.fr-msg__content li::marker {
  color: var(--gold);
}

.fr-msg__img {
  display: block;
  max-width: 100%;
  margin: 0 0 .875rem;
  border-radius: var(--radius-md);
  box-shadow: 0 0 0 1px var(--stone-200), 0 4px 16px #00000014;
}

.fr-msg__content code {
  padding: .0625rem .3125rem;
  font-family: var(--font-mono);
  font-size: .8125rem;
  color: var(--stone-800);
  background: var(--ivory);
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px var(--stone-200);
}

.fr-quote {
  margin: 0 0 .875rem;
  padding: .75rem .875rem;
  background: linear-gradient(180deg, var(--ivory) 0%, var(--bone) 100%);
  border-left: 2px solid var(--gold);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  box-shadow: 0 0 0 1px var(--stone-200);
}

.fr-quote__head {
  display: flex;
  align-items: center;
  gap: .375rem;
  margin-bottom: .5rem;
  font-size: .75rem;
  color: var(--stone-400);
}

.fr-quote__head--link {
  color: var(--stone-500);
  font-family: var(--font-heading);
  font-weight: 600;
  transition: color var(--transition-fast);
}

.fr-quote__head--link:hover {
  color: var(--gold);
}

.fr-quote__head svg {
  width: .8125rem;
  height: .8125rem;
  color: var(--gold);
  opacity: .7;
  flex-shrink: 0;
}

.fr-quote__head a {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--stone-600);
  text-decoration: none;
}

.fr-quote__body {
  font-size: .8125rem;
  color: var(--stone-500);
}

.fr-quote__body p {
  margin: 0;
}

.fr-code {
  margin: 0 0 .75rem;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stone-200) 55%, transparent);
  overflow: hidden;
}

.fr-code__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .375rem .625rem;
  font-family: var(--font-heading);
  font-size: .5625rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--stone-400);
  background: color-mix(in srgb, var(--ivory) 70%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--stone-200) 45%, transparent);
}

.fr-code__copy {
  margin-left: auto;
  padding: 0;
  font-family: var(--font-body);
  font-size: .625rem;
  letter-spacing: 0;
  text-transform: none;
  color: var(--stone-400);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.fr-code__copy:hover {
  color: var(--gold);
}

.fr-code pre {
  margin: 0;
  padding: .625rem .75rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: .75rem;
  line-height: 1.6;
  color: var(--stone-700);
  background: var(--bone);
}

.fr-spoiler {
  margin: 0 0 .75rem;
  border-radius: var(--radius-sm);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--stone-200) 55%, transparent);
  overflow: hidden;
}

.fr-spoiler__btn {
  display: flex;
  align-items: center;
  gap: .4375rem;
  width: 100%;
  padding: .4375rem .625rem;
  font-family: var(--font-heading);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-align: left;
  color: var(--stone-600);
  background: color-mix(in srgb, var(--ivory) 70%, transparent);
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.fr-spoiler__btn:hover {
  color: var(--stone-900);
  background: var(--parchment);
}

.fr-spoiler__btn svg {
  width: .8125rem;
  height: .8125rem;
  color: var(--gold);
  flex-shrink: 0;
  transition: transform var(--transition-base);
}

.fr-spoiler.is-open .fr-spoiler__btn svg {
  transform: rotate(90deg);
}

.fr-spoiler__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s cubic-bezier(.16, 1, .3, 1);
}

.fr-spoiler.is-open .fr-spoiler__body {
  grid-template-rows: 1fr;
}

.fr-spoiler__inner {
  min-height: 0;
  overflow: hidden;
}

.fr-spoiler__inner p {
  margin: 0;
  padding: .75rem .875rem;
  font-size: .8125rem;
  color: var(--stone-600);
}

.fr-msg__sign {
  margin: .375rem 1.25rem 0;
  padding-top: .75rem;
  border-top: 1px dashed var(--stone-200);
  font-size: .75rem;
  font-style: italic;
  color: var(--stone-400);
}

.fr-msg__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1.25rem;
  margin-top: 1rem;
  border-top: 1px solid var(--stone-100);
}

.fr-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.fr-reaction--like {
  --rc: var(--gold);
}

.fr-reaction--fire {
  --rc: var(--red);
}

.fr-reaction--fun {
  --rc: color-mix(in srgb, var(--gold) 60%, var(--red));
}

.fr-reaction--help {
  --rc: var(--live, #4ea172);
}

.fr-reaction--meh {
  --rc: var(--stone-400);
}

.fr-reaction--angry {
  --rc: var(--red);
}

.fr-reaction--dislike {
  --rc: color-mix(in srgb, var(--red) 65%, var(--stone-500));
}

.fr-react {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  background: none;
  border: 0;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.fr-react:hover {
  background: color-mix(in srgb, var(--stone-200) 30%, transparent);
}

.fr-react.is-on {
  background: color-mix(in srgb, var(--rc) 12%, transparent);
}

.fr-react__btn {
  display: inline-flex;
  align-items: center;
  gap: .4375rem;
  padding: .375rem .6875rem;
  font-family: var(--font-body);
  font-size: .75rem;
  color: var(--stone-500);
  background: none;
  border: 0;
  border-radius: calc(var(--radius-md) - 1px);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.fr-react__btn svg,
.fr-react__btn img {
  width: 1.375rem;
  height: 1.375rem;
  flex-shrink: 0;
}

.fr-react__btn:hover {
  color: var(--stone-800);
}

.fr-react__btn.is-on {
  color: var(--rc);
}

.fr-react__btn.is-on svg {
  fill: color-mix(in srgb, var(--rc) 22%, transparent);
}

.fr-react__count {
  display: flex;
  align-items: center;
  padding: 0 .5rem 0 0;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-variant-numeric: tabular-nums;
  color: var(--stone-500);
  background: none;
  border: 0;
}

.fr-react.is-on .fr-react__count {
  color: var(--rc);
}

.fr-react__picker {
  position: absolute;
  bottom: calc(100% + .5rem);
  left: -.5rem;
  z-index: 30;
  display: flex;
  align-items: stretch;
  gap: .125rem;
  padding: .5rem;
  background: linear-gradient(180deg, var(--white) 0%, var(--bone) 100%);
  border-radius: .875rem;
  box-shadow: inset 0 1px 0 var(--has-border-inset, #fff),
    0 0 0 1px var(--stone-200),
    0 12px 28px #00000026;
}

.fr-react__picker:before {
  content: "";
  position: absolute;
  right: 0;
  bottom: -.5rem;
  left: 0;
  height: .5rem;
}

.fr-react__opt {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: .1875rem;
  min-width: 3.5rem;
  padding: .375rem .5rem .3125rem;
  color: var(--rc);
  background: none;
  border: none;
  border-radius: .625rem;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.fr-react__opt:hover {
  background: color-mix(in srgb, var(--rc) 12%, transparent);
}

.fr-react__opt svg,
.fr-react__opt img {
  width: 1.75rem;
  height: 1.75rem;
  transition: transform .2s cubic-bezier(.16, 1, .3, 1);
}

.fr-react__opt:hover svg,
.fr-react__opt:hover img {
  transform: translateY(-.0625rem) scale(1.12);
}

.fr-react__tip {
  font-family: var(--font-body);
  font-size: .625rem;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--stone-500);
  transition: color var(--transition-fast);
}

.fr-react__opt:hover .fr-react__tip {
  color: var(--rc);
}

.fr-reactors {
  display: flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  font-size: .6875rem;
  color: var(--stone-400);
}

.fr-reactors__icons {
  display: flex;
  flex-shrink: 0;
}

.fr-reactors__icons i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: -.25rem;
  color: var(--rc);
  background: none;
  border-radius: 50%;
}

.fr-reactors__icons i:first-child {
  margin-left: 0;
}

.fr-reactors__icons svg,
.fr-reactors__icons img {
  width: 1.25rem;
  height: 1.25rem;
}

.fr-reactors a {
  color: var(--stone-500);
  font-weight: 600;
  transition: color var(--transition-fast);
}

.fr-reactors a:hover {
  color: var(--gold);
}

.fr-msg__sign {
  margin: 1rem 1.25rem 0;
  padding-top: .75rem;
  font-size: .75rem;
  line-height: 1.6;
  color: var(--stone-400);
  border-top: 1px dashed var(--stone-200);
}

.fr-msg__sign a {
  color: var(--stone-500);
}

.fr-msg__content--clamped {
  position: relative;
  max-height: 38.75rem;
  overflow: hidden;
}

.fr-msg__content--clamped:after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 5.5rem;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--white) 0%, transparent) 0%,
    var(--white) 88%);
  pointer-events: none;
}

.fr-msg__expand {
  display: flex;
  align-items: center;
  gap: .375rem;
  margin: .625rem auto 0;
  padding: .375rem .875rem;
  font-family: var(--font-heading);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--stone-500);
  background: linear-gradient(180deg, var(--white) 0%, var(--ivory) 100%);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}

.fr-msg__expand:hover {
  color: var(--gold);
  border-color: rgb(var(--gold-rgb) / .4);
}

.fr-msg__acts {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
}

.fr-msg__act {
  padding: .3125rem .5rem;
  font-family: var(--font-body);
  font-size: .75rem;
  color: var(--stone-400);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.fr-msg__act:hover {
  color: var(--gold);
  background: var(--ivory);
}

.fr-editor {
  margin-top: 1.75rem;
  background: linear-gradient(180deg, var(--white) 0%, var(--bone) 100%);
  border-radius: var(--radius-xl);
  box-shadow: inset 0 1px 0 var(--has-border-inset, #fffc),
    0 0 0 1px var(--stone-200),
    0 0 0 4px var(--ivory),
    0 0 0 5px var(--stone-200),
    0 8px 30px #0000000f;
  overflow: hidden;
}

.fr-editor__head {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .875rem 1.25rem;
  background: linear-gradient(180deg, var(--ivory) 0%, transparent 100%);
  border-bottom: 1px solid var(--stone-200);
}

.fr-editor__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: .6875rem;
  font-weight: 700;
  color: #1c1814;
  background: linear-gradient(135deg, #8b6914 0%, #e8c96a 100%);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--stone-200);
}

.fr-editor__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: .8125rem;
  font-weight: 700;
  color: var(--stone-800);
}

.fr-editor__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .125rem;
  padding: .5rem .75rem;
  border-bottom: 1px solid var(--stone-100);
}

.fr-tool {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  color: var(--stone-500);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast);
}

.fr-tool:hover {
  color: var(--stone-900);
  background: var(--ivory);
}

.fr-tool svg {
  width: .9375rem;
  height: .9375rem;
}

.fr-editor__div {
  width: 1px;
  height: 1.125rem;
  margin: 0 .375rem;
  background: var(--stone-200);
}

.fr-editor__area {
  display: block;
  width: 100%;
  min-height: 9rem;
  padding: 1rem 1.25rem;
  font-family: var(--font-body);
  font-size: .875rem;
  line-height: 1.65;
  color: var(--stone-800);
  background: none;
  border: none;
  resize: vertical;
}

.fr-editor__area::placeholder {
  color: var(--stone-300);
}

.fr-editor__area:focus {
  outline: none;
}

.fr-editor__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--stone-100);
}

.fr-editor__hint {
  font-family: var(--font-mono);
  font-size: .6875rem;
  color: var(--stone-400);
}

.fr-editor__spacer {
  flex: 1 1 auto;
}

.fr-editor__foot .g-btn[disabled] {
  opacity: .45;
  pointer-events: none;
}

[data-theme="dark"] .fr-thead,
[data-theme="dark"] .fr-msg,
[data-theme="dark"] .fr-editor {
  background: linear-gradient(180deg, var(--bone) 0%, var(--white) 100%);
  box-shadow: inset 0 1px 0 #ffffff08,
    0 0 0 1px var(--stone-200),
    0 0 0 4px var(--ivory),
    0 0 0 5px var(--stone-200),
    0 8px 30px #0003;
}

[data-theme="dark"] .fr-thead__acts,
[data-theme="dark"] .fr-msg__head,
[data-theme="dark"] .fr-msg__foot,
[data-theme="dark"] .fr-editor__toolbar,
[data-theme="dark"] .fr-editor__foot {
  border-color: var(--stone-200);
}

[data-theme="dark"] .fr-msg__user {
  background: var(--ivory);
}

[data-theme="dark"] .fr-msg__user:after,
[data-theme="dark"] .fr-msg__stats,
[data-theme="dark"] .fr-msg__sign {
  border-color: var(--stone-300);
}

[data-theme="dark"] .fr-msg__user:after {
  background: linear-gradient(180deg, transparent, #ffffff29, transparent);
}

[data-theme="dark"] .fr-msg__avatar,
[data-theme="dark"] .fr-editor__avatar {
  box-shadow: 0 0 0 3px var(--white), 0 0 0 4px var(--stone-300);
}

[data-theme="dark"] .fr-react__picker {
  background: linear-gradient(180deg, var(--parchment) 0%, var(--ivory) 100%);
  box-shadow: inset 0 1px 0 #ffffff0f,
    0 0 0 1px var(--stone-300),
    0 12px 28px #00000059;
}

[data-theme="dark"] .fr-msg__expand {
  background: linear-gradient(180deg, var(--parchment) 0%, var(--ivory) 100%);
  border-color: var(--stone-300);
}

[data-theme="dark"] .fr-iconbtn:hover,
[data-theme="dark"] .fr-iconbtn.is-on {
  background: color-mix(in srgb, var(--stone-300) 22%, transparent);
}

[data-theme="dark"] .fr-react:hover {
  background: color-mix(in srgb, var(--stone-300) 25%, transparent);
}



[data-theme="dark"] .fr-quote,
[data-theme="dark"] .fr-code__head,
[data-theme="dark"] .fr-spoiler__btn {
  background: var(--parchment);
}

[data-theme="dark"] .fr-code pre {
  background: var(--ivory);
}

[data-theme="dark"] .fr-msg__content code {
  background: var(--parchment);
  box-shadow: 0 0 0 1px var(--stone-300);
}

[data-theme="dark"] .fr-msg__act:hover,
[data-theme="dark"] .fr-tool:hover,
[data-theme="dark"] .fr-msg__more:hover {
  background: var(--parchment);
}

@media (max-width: 56rem) {
  .fr-msg {
    grid-template-columns: minmax(0, 1fr);
  }

  .fr-msg__user {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--stone-200);
  }

  .fr-msg__user:after {
    display: none;
  }

  .fr-msg__avatar {
    width: 2.5rem;
    height: 2.5rem;
    margin: 0;
    font-size: .8125rem;
    box-shadow: 0 0 0 2px var(--white), 0 0 0 3px var(--stone-200);
  }

  .fr-msg__ident {
    min-width: 0;
  }

  .fr-msg__tags {
    justify-content: flex-start;
    margin: 0 0 0 auto;
  }

  .fr-msg__stats {
    display: none;
  }

  .fr-msg__content,
  .fr-msg__head,
  .fr-msg__foot {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .fr-msg__sign {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

@media (max-width: 40rem) {
  .fr-thead {
    padding: 1rem;
  }

  .fr-msg__user {
    flex-wrap: wrap;
    row-gap: .375rem;
  }

  .fr-msg__ident {
    flex: 1 1 auto;
  }

  .fr-msg__tags {
    flex: 1 0 100%;
    margin: 0;
  }

  .fr-msg__head {
    flex-wrap: wrap;
    gap: .375rem .625rem;
  }

  .fr-thead__acts {
    gap: .375rem;
  }

  .fr-actgrp {
    width: 100%;
    margin-right: 0;
  }

  .fr-actgrp > .fr-iconbtn {
    justify-content: center;
  }

  .fr-thead__acts > .fr-iconbtn,
  .fr-thead__acts > .g-btn {
    flex: 1 1 calc(50% - .1875rem);
    justify-content: center;
  }

  .fr-thead__title {
    font-size: 1.125rem;
  }

  .fr-msg__acts {
    width: 100%;
    margin-left: 0;
  }

  .fr-editor__area {
    padding: .875rem 1rem;
  }
}

@media (max-width: 30rem) {
  .fr-actgrp {
    grid-template-columns: 1fr;
  }

  .fr-thead__acts > .fr-iconbtn,
  .fr-thead__acts > .g-btn {
    flex: 1 1 100%;
  }
}

/* новое сообщение появляется плавно, ещё не подтверждённое — приглушено */

@keyframes frMsgAppear {
  from { opacity: 0; transform: translateY(.75rem); }
  to { opacity: 1; transform: none; }
}

.fr-msg.is-appearing {
  animation: frMsgAppear .38s cubic-bezier(.16, 1, .3, 1);
}

.fr-msg.is-optimistic {
  opacity: .62;
}

.fr-msg.is-optimistic .fr-msg__content {
  color: var(--stone-500);
}

@media (prefers-reduced-motion: reduce) {
  .fr-msg.is-appearing {
    animation: none;
  }
}

.fr-iconbtn--danger {
  color: var(--red);
}

.fr-iconbtn--danger:hover {
  color: var(--red);
  background: color-mix(in srgb, var(--red) 12%, transparent);
}
