main.flex-grow {
  padding-top: 1rem;
}

article {
  margin-top: 2rem;
}

html {
  --et-scale: 1;
}

html[data-et-size="0"] { --et-scale: 0.9; }
html[data-et-size="2"] { --et-scale: 1.15; }
html[data-et-size="3"] { --et-scale: 1.3; }

article {
  font-size: calc(1rem * var(--et-scale));
}

article p {
  font-size: calc(1.05rem * var(--et-scale));
}

article h1 {
  font-size: calc(2.25rem * var(--et-scale));
}

article h2 {
  font-size: calc(1.5rem * var(--et-scale));
}

article h3 {
  font-size: calc(1.15rem * var(--et-scale));
}

html[data-et-font="sans"] article,
html[data-et-font="sans"] article h1,
html[data-et-font="sans"] article h2,
html[data-et-font="sans"] article h3,
html[data-et-font="sans"] article blockquote,
html[data-et-font="sans"] article .font-serif {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-et-font="sans"] article {
  line-height: 1.7;
}

main,
article {
  transition: background-color 0.5s ease, color 0.5s ease;
}

html[data-et-theme="candle"] main {
  background-color: #17110e;
}

html[data-et-theme="candle"] article {
  background-color: #211812;
  color: #eadfce;
}

html[data-et-theme="candle"] article h1,
html[data-et-theme="candle"] article h2 {
  color: #f6ebd8;
}

html[data-et-theme="candle"] article h3 {
  color: #d8c8ae;
}

html[data-et-theme="candle"] article h2 {
  border-bottom-color: #4a3a2e;
}

html[data-et-theme="candle"] article h2::after {
  background: #f06a98;
}

html[data-et-theme="candle"] article [class*="text-stone"]:not(a) {
  color: #d8c8ae;
}

html[data-et-theme="candle"] article .no-sell {
  background-color: #2c2018;
  border-left-color: #f06a98;
}

html[data-et-theme="candle"] article table,
html[data-et-theme="candle"] article .austen-table {
  background-color: transparent;
  color: inherit;
}

html[data-et-theme="candle"] article th {
  background-color: #2c2018;
  color: #f0e4d0;
  border-color: #4a3a2e;
}

html[data-et-theme="candle"] article td {
  border-color: #3a2c22;
}

html[data-et-theme="candle"] article thead th {
  border-top-color: #6b5a3e;
  border-bottom-color: #6b5a3e;
}

html[data-et-theme="candle"] article table caption,
html[data-et-theme="candle"] table.wordlist th {
  color: #b3a391;
}

html[data-et-theme="candle"] table.wordlist td:first-child {
  color: #d8c8ae;
}

html[data-et-theme="candle"] table.wordlist td,
html[data-et-theme="candle"] table.wordlist th {
  border-color: #4a3a2e;
}

html[data-et-theme="candle"] article .article-date,
html[data-et-theme="candle"] article figcaption,
html[data-et-theme="candle"] article .newspaper-float figcaption {
  color: #b3a391;
}

html[data-et-theme="candle"] article blockquote {
  background-color: #2c2018;
  color: #e6d9c4;
  border-left-color: #f06a98;
}

html[data-et-theme="candle"] article hr {
  background-color: #4a3a2e;
}

html[data-et-theme="candle"] article p a,
html[data-et-theme="candle"] article li a,
html[data-et-theme="candle"] article blockquote a,
html[data-et-theme="candle"] article figcaption a,
html[data-et-theme="candle"] article .article-date a,
html[data-et-theme="candle"] article aside a {
  color: #f5a3c0 !important;
}

html[data-et-theme="candle"] article .newspaper-float img,
html[data-et-theme="candle"] article .newspaper-float-right img {
  background: #2c2018;
  border-color: #8a7650;
  filter: sepia(12%) brightness(0.92);
}

html[data-et-theme="candle"] article .full-width-figure img,
html[data-et-theme="candle"] article .video-play img {
  filter: brightness(0.9);
}

html[data-et-theme="candle"] article .video-frame {
  box-shadow: 0 0 0 5px #211812, 0 0 0 6px #8a7650;
}

html[data-et-theme="candle"] article .cta-box {
  background-color: #2c2018;
  border-color: #6b5a3e;
  border-top-color: #f06a98;
  color: #eadfce;
}

html[data-et-theme="candle"] article .cta-box p {
  color: #f6ebd8;
}

html[data-et-theme="candle"] article aside p,
html[data-et-theme="candle"] article aside .text-stone-700 {
  color: #d8c8ae;
}

html[data-et-theme="candle"] article aside p.uppercase {
  color: #f5a3c0 !important;
}

html[data-et-theme="candle"] article > .mt-10.border-t {
  border-top-color: #4a3a2e;
}

html[data-et-theme="candle"] article > .mt-10 p.uppercase {
  color: #f5a3c0;
}

html[data-et-theme="candle"] article > .mt-10 a.block.group {
  background-color: #2c2018;
  border-color: #6b5a3e;
}

html[data-et-theme="candle"] article > .mt-10 a.block.group:hover {
  background-color: #35271e;
  border-color: #f06a98;
}

html[data-et-theme="candle"] article > .mt-10 a.block.group p {
  color: #f0e4d0 !important;
}

html[data-et-theme="candle"] article > .mt-10 a.block.group:hover p {
  color: #f5a3c0 !important;
}

html[data-et-theme="candle"] article > .mt-10 a.block.group span {
  color: #f5a3c0;
}

html[data-et-theme="candle"] article > .mt-10 > a.inline-block {
  color: #f5a3c0;
  border-bottom-color: #f06a98;
}

html[data-et-theme="candle"] article > .mt-10 > a.inline-block:hover {
  color: #fff;
  border-bottom-color: #fff;
}

html[data-et-theme="candle"] .table-scroll-wrapper {
  background-color: transparent;
  border-color: #4a3a2e;
}

html[data-et-theme="candle"] .toc,
html[data-et-theme="candle"] .cs-widget {
  background-color: #2c2018;
  border-color: #6b5a3e;
}

html[data-et-theme="candle"] .toc p {
  color: #b3a391;
}

html[data-et-theme="candle"] .toc a:hover {
  color: #fff;
}

html[data-et-theme="candle"] .cs-tab,
html[data-et-theme="candle"] .cs-copy {
  background: #3a2b21;
  color: #f0e4d0;
  border-color: #6b5a3e;
}

html[data-et-theme="candle"] .cs-tab:hover {
  background-color: #4a382b;
}

html[data-et-theme="candle"] .cs-tab[aria-pressed="true"],
html[data-et-theme="candle"] .cs-copy:hover,
html[data-et-theme="candle"] .cs-copy.is-done {
  background-color: #d6336c;
  border-color: #d6336c;
  color: #fff;
}

html[data-et-theme="candle"] .cs-panel h3 {
  color: #f0e4d0;
}

html[data-et-theme="candle"] .cs-panel + .cs-panel,
html[data-et-theme="candle"] .cs-item {
  border-color: #4a3a2e;
}

html[data-et-theme="candle"] .cs-phrase {
  background-color: #3a2b21;
  color: #f0e4d0;
}

html[data-et-theme="candle"] .update-note {
  background-color: #2c2018;
  border-left-color: #f06a98;
}

html[data-et-theme="candle"] .update-note strong {
  color: #f5a3c0;
}

.et-fab {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 45;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #d3bf94;
  border-radius: 9999px;
  background: #fffdf8;
  color: #3a2f2a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.et-fab {
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.et-fab.et-away {
  opacity: 0;
  transform: translateY(1rem);
  pointer-events: none;
}

@media (max-width: 767px) {
  .et-fab {
    left: 0;
    bottom: 0.75rem;
    width: 1.6rem;
    height: 2.9rem;
    border-left: none;
    border-radius: 0 6px 6px 0;
    font-size: 0.8rem;
    box-shadow: 2px 0 8px rgba(43, 34, 51, 0.18);
  }

  .et-fab.et-away {
    transform: translateX(-100%);
  }

  .book-widget-container {
    opacity: 0.8;
  }

  .book-widget-container:hover,
  .book-widget-container:focus-visible {
    opacity: 1;
  }
}

@media (max-width: 1023px) {
  .book-widget-container {
    right: 2.5rem;
  }
}

.et-fab:hover {
  border-color: #b81f58;
}

.et-fab:focus-visible,
.et-panel button:focus-visible {
  outline: 3px solid #b81f58;
  outline-offset: 2px;
}

.et-panel {
  position: fixed;
  left: 1rem;
  bottom: 4.5rem;
  z-index: 45;
  width: 15.5rem;
  padding: 1rem;
  border: 1px solid #d3bf94;
  border-top: 3px solid #d6336c;
  background: #fffdf8;
  color: #3a2f2a;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.22);
}

.et-panel[hidden] {
  display: none;
}

.et-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.et-row:last-child {
  margin-bottom: 0;
}

.et-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b5d55;
}

.et-panel button {
  min-height: 2.25rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid #b9a88a;
  border-radius: 0.25rem;
  background: #fff;
  color: #3a2f2a;
  font: inherit;
  cursor: pointer;
}

.et-panel button[aria-pressed="true"] {
  border-color: #b81f58;
  background: #b81f58;
  color: #fff;
}

.et-panel button:disabled {
  opacity: 0.4;
  cursor: default;
}

.et-seg {
  display: flex;
  gap: 0.25rem;
}

.et-candle {
  width: 100%;
  justify-content: center;
  gap: 0.5rem;
  display: flex;
  align-items: center;
}

.et-candle-icon {
  width: 0.9rem;
  height: 1.45rem;
  flex: none;
  overflow: visible;
}

.et-wax {
  fill: #f6ead0;
  stroke: #b9a88a;
  stroke-width: 1;
}

.et-wick {
  fill: none;
  stroke: #5a4636;
  stroke-width: 1.2;
  stroke-linecap: round;
}

.et-flame {
  fill: #ffa733;
  stroke: #e8590c;
  stroke-width: 0.6;
  transform-box: fill-box;
  transform-origin: 50% 100%;
}

.et-glow {
  position: fixed;
  inset: 0;
  z-index: 44;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at var(--et-x, 2rem) var(--et-y, 100%), rgba(255, 176, 72, 0.55) 0%, rgba(255, 140, 40, 0.22) 30%, rgba(255, 140, 40, 0) 65%);
}

.et-glow.et-play {
  animation: et-glow 1.9s ease-out forwards;
}

.et-flame.et-play {
  animation: et-flicker 0.28s ease-in-out 6;
}

@keyframes et-glow {
  0% { opacity: 0; }
  18% { opacity: 1; }
  32% { opacity: 0.72; }
  46% { opacity: 0.95; }
  62% { opacity: 0.6; }
  100% { opacity: 0; }
}

@keyframes et-flicker {
  0%, 100% { transform: scale(1, 1) rotate(0deg); }
  30% { transform: scale(0.92, 1.12) rotate(-4deg); }
  65% { transform: scale(1.06, 0.94) rotate(3deg); }
}

html[data-et-theme="candle"] .et-fab,
html[data-et-theme="candle"] .et-panel {
  background: #2c2018;
  color: #f0e4d0;
  border-color: #6b5a3e;
}

html[data-et-theme="candle"] .et-label {
  color: #b3a391;
}

html[data-et-theme="candle"] .et-panel button {
  background: #3a2b21;
  color: #f0e4d0;
  border-color: #6b5a3e;
}

html[data-et-theme="candle"] .et-panel button[aria-pressed="true"] {
  background: #d6336c;
  border-color: #d6336c;
  color: #fff;
}

@media (prefers-reduced-motion: reduce) {
  main,
  article {
    transition: none;
  }

  .et-fab {
    transition: none;
  }

  .et-glow,
  .et-flame.et-play {
    animation: none;
  }
}


@media (max-width: 767px) {
  .et-panel {
    left: 0.75rem;
    bottom: 4.25rem;
    max-width: calc(100vw - 1.5rem);
  }
}
