/*
  Cambia los colores principales aqui.
  La paleta usa crema, rosa suave, amarillo mantequilla y verde suave.
*/
:root {
  --cream: #fff8ec;
  --paper: #fffdf8;
  --paper-warm: #fff3df;
  --rose: #f8cfd8;
  --rose-deep: #a95f70;
  --butter: #ffe8a7;
  --butter-soft: #fff4cf;
  --mint: #d5ead1;
  --mint-deep: #6f9b79;
  --ink: #4f4541;
  --muted: #80736c;
  --line: #efdccc;
  --shadow: 0 18px 50px rgba(118, 83, 67, 0.12);
  --soft-shadow: 0 10px 24px rgba(118, 83, 67, 0.1);
  --radius: 24px;
  --radius-small: 16px;
  --max-read: 68ch;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--cream);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgba(248, 207, 216, 0.45), transparent 30rem),
    radial-gradient(circle at 100% 12rem, rgba(213, 234, 209, 0.55), transparent 26rem),
    linear-gradient(180deg, var(--cream), #fffaf2 42%, #fff7eb);
  font-family: "Nunito", "Quicksand", "Hiragino Sans", "Yu Gothic", "Apple SD Gothic Neo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.hidden {
  display: none !important;
}

.fade-in,
.page.is-active,
.fade-item {
  animation: fadeIn 360ms ease both;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(100%, 430px);
  padding: 28px;
  border: 1px solid rgba(239, 220, 204, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.decor-row {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 4px;
}

/* Cambia estos PNG por tus estrellas, flores, gatos o cintas en /assets. */
.decor-png {
  width: 58px;
  height: 58px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(118, 83, 67, 0.12));
}

.decor-star {
  transform: rotate(-9deg);
}

.decor-ribbon {
  width: 68px;
  height: 68px;
}

.decor-flower {
  transform: rotate(8deg);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

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

h1 {
  font-size: clamp(2rem, 9vw, 3rem);
}

h2 {
  font-size: clamp(1.45rem, 7vw, 2.2rem);
}

h3 {
  font-size: 1.08rem;
}

.soft-copy {
  margin: 14px 0 24px;
  color: var(--muted);
}

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

.soft-form label,
.search-box span,
.select-box span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.soft-form input,
.soft-form select,
.soft-form textarea,
.search-box input,
.select-box select,
.reader-password {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffaf2;
  color: var(--ink);
  outline: none;
  padding: 0 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.soft-form textarea {
  min-height: 220px;
  border-radius: var(--radius-small);
  padding: 14px 16px;
  resize: vertical;
}

.soft-form input[type="file"] {
  padding: 12px 16px;
}

.soft-form input:focus,
.soft-form select:focus,
.soft-form textarea:focus,
.search-box input:focus,
.select-box select:focus,
.reader-password:focus {
  border-color: var(--rose-deep);
  box-shadow: 0 0 0 4px rgba(248, 207, 216, 0.45);
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--rose-deep);
  font-size: 0.9rem;
}

.autosave-status {
  min-height: 22px;
  margin: 0;
  color: var(--mint-deep);
  font-size: 0.9rem;
  font-weight: 800;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 2px 0 2px;
}

.format-button,
.tone-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.95);
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.format-button {
  min-width: 36px;
  padding: 0 12px;
}

.tone-button {
  font-size: 0.82rem;
}

.tone-rose { background: rgba(248, 207, 216, 0.55); }
.tone-blue { background: rgba(205, 220, 255, 0.6); }
.tone-green { background: rgba(213, 234, 209, 0.6); }
.tone-gold { background: rgba(255, 236, 179, 0.72); }

.format-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.primary-button,
.ghost-button,
.mini-button,
.favorite-button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.primary-button {
  padding: 0 18px;
  background: linear-gradient(135deg, var(--rose), var(--butter));
  color: #5d4038;
  font-weight: 900;
  box-shadow: var(--soft-shadow);
}

.ghost-button,
.mini-button {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.78);
  color: var(--ink);
  font-weight: 800;
}

.primary-button:hover,
.ghost-button:hover,
.mini-button:hover,
.favorite-button:hover,
.tab-button:hover {
  transform: translateY(-1px);
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 92px;
}

.app-shell.reader-mode {
  padding-bottom: 0;
}

.app-shell.reader-mode .tabbar {
  display: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(239, 220, 204, 0.68);
  background: rgba(255, 248, 236, 0.82);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 950;
}

.brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.content-shell {
  width: min(100%, 960px);
  margin: 0 auto;
  padding: 20px 16px 34px;
}

.page {
  display: none;
}

.page.is-active {
  display: block;
}

.section-heading {
  margin: 8px 0 16px;
}

.section-heading.compact {
  margin-top: 0;
}

.library-heading {
  display: grid;
  gap: 12px;
}

.latest-slot,
.stats-panel,
.library-panel,
.profile-card,
.reader-lock,
.reader-article {
  border: 1px solid rgba(239, 220, 204, 0.9);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--soft-shadow);
}

.latest-slot {
  padding: 16px;
}

.stats-panel {
  margin-top: 18px;
  padding: 16px;
}

.library-panel {
  margin-top: 18px;
  padding: 16px;
}

.latest-card,
.profile-card {
  position: relative;
  overflow: hidden;
}

.latest-card {
  display: grid;
  gap: 14px;
}

.latest-card::after,
.profile-card::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: rgba(213, 234, 209, 0.35);
  pointer-events: none;
}

.post-cover {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  object-fit: contain;
  padding: 12px;
  background: var(--butter-soft);
}

.post-card {
  display: grid;
  gap: 12px;
  min-height: 100%;
  padding: 14px;
  border: 1px solid rgba(239, 220, 204, 0.95);
  border-radius: var(--radius-small);
  background: rgba(255, 253, 248, 0.84);
  box-shadow: 0 8px 20px rgba(118, 83, 67, 0.08);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.post-card:hover {
  transform: translateY(-2px);
  border-color: rgba(248, 207, 216, 0.95);
  box-shadow: 0 12px 26px rgba(118, 83, 67, 0.12);
}

.post-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.post-card-body {
  min-width: 0;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.post-excerpt {
  margin: 8px 0 0;
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(248, 207, 216, 0.9);
  border-radius: 999px;
  background: rgba(255, 244, 207, 0.62);
  color: #72564e;
  font-size: 0.78rem;
  font-weight: 850;
}

.card-actions,
.reader-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.checkbox-row input {
  width: auto;
  min-height: auto;
}

.favorite-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 118px;
  padding: 0 12px;
  border: 1px solid rgba(239, 220, 204, 0.95);
  background: #fffaf2;
  color: var(--ink);
  font-weight: 900;
}

.favorite-button img {
  width: 20px;
  height: 20px;
}

.favorite-button.is-favorite {
  border-color: rgba(169, 95, 112, 0.34);
  background: rgba(248, 207, 216, 0.58);
}

.controls {
  display: grid;
  gap: 12px;
  margin: 16px 0;
}

.stats-grid {
  display: grid;
  gap: 12px;
}

.stat-card {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 244, 207, 0.46);
  box-shadow: 0 8px 18px rgba(118, 83, 67, 0.06);
}

.stat-label {
  margin: 0;
  color: var(--rose-deep);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.stat-value {
  color: var(--ink);
  font-size: 1.28rem;
  font-weight: 950;
  line-height: 1.2;
}

.stat-note {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.search-box,
.select-box {
  display: grid;
  gap: 6px;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.82);
}

.segmented-control button {
  min-width: 0;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.segmented-control button.is-selected {
  background: var(--mint);
  color: #415f49;
  box-shadow: 0 6px 14px rgba(111, 155, 121, 0.18);
}

.post-grid {
  display: grid;
  gap: 12px;
}

.empty-state {
  margin: 18px 0 0;
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-small);
  background: rgba(255, 244, 207, 0.46);
  color: var(--muted);
  text-align: center;
}

.profile-card {
  padding: 18px;
}

.profile-hero {
  display: grid;
  gap: 14px;
}

.profile-avatar {
  width: 106px;
  height: 106px;
  padding: 14px;
  border-radius: 34px;
  background: var(--paper-warm);
  object-fit: contain;
}

.profile-facts {
  display: grid;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.profile-facts li {
  padding: 10px 12px;
  border-radius: var(--radius-small);
  background: rgba(213, 234, 209, 0.34);
  color: #496150;
  font-weight: 800;
}

.profile-posts {
  margin-top: 18px;
}

.reader-lock,
.reader-article {
  padding: 18px;
}

.reader-lock {
  display: grid;
  gap: 14px;
}

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

.reader-article {
  max-width: calc(var(--max-read) + 44px);
  margin: 0 auto;
}

.reader-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
}

.reader-heading h1 {
  font-size: clamp(2rem, 10vw, 3.8rem);
}

.reader-body {
  max-width: var(--max-read);
  margin: 0 auto;
  font-size: 1.04rem;
  line-height: 1.82;
}

.reader-body p {
  margin: 0 0 1.2em;
  white-space: pre-wrap;
}

.reader-body strong {
  font-weight: 900;
}

.reader-body em {
  font-style: italic;
}

.reader-divider {
  width: 100%;
  height: 0;
  margin: 1.8em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.text-color-rosa { color: var(--rose-deep); }
.text-color-azul { color: #5875b4; }
.text-color-verde { color: #5f8a68; }
.text-color-dorado { color: #9a7a2d; }

.reader-body h2 {
  margin: 1.7em 0 0.6em;
  font-size: 1.45rem;
}

.reader-image {
  margin: 1.8em auto;
}

.reader-image img {
  width: 100%;
  max-height: 460px;
  border-radius: 22px;
  object-fit: cover;
  background: var(--paper-warm);
  box-shadow: var(--soft-shadow);
}

.reader-image figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

.reader-quote {
  margin: 1.5em 0;
  padding: 14px 16px;
  border-left: 4px solid var(--rose);
  border-radius: var(--radius-small);
  background: rgba(255, 244, 207, 0.48);
  color: #6d5a54;
}

.tabbar {
  position: fixed;
  right: 12px;
  bottom: 12px;
  left: 12px;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(239, 220, 204, 0.9);
  border-radius: 28px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.tab-button {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease;
}

.tab-button img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.tab-button span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab-button.is-active {
  background: rgba(248, 207, 216, 0.54);
  color: #70404b;
}

noscript {
  display: block;
  margin: 24px;
  padding: 16px;
  border-radius: 16px;
  background: var(--paper);
}

@media (min-width: 720px) {
  .content-shell {
    padding: 30px 24px 56px;
  }

  .app-shell {
    padding-bottom: 42px;
  }

  .topbar {
    padding-inline: 24px;
  }

  .latest-card,
  .profile-hero {
    grid-template-columns: auto 1fr;
    align-items: start;
  }

  .library-heading {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .controls {
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 210px);
    align-items: end;
  }

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

  .segmented-control {
    grid-column: 1 / -1;
  }

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

  .tabbar {
    right: 24px;
    bottom: 22px;
    left: 50%;
    width: min(440px, calc(100% - 48px));
    transform: translateX(-50%);
  }
}

@media (min-width: 940px) {
  .controls {
    grid-template-columns: minmax(260px, 1fr) minmax(180px, 220px) minmax(260px, 300px);
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .segmented-control {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}


.theme-toggle {
  min-width: 128px;
  white-space: nowrap;
}

body[data-theme="night"] {
  --cream: #0f1218;
  --paper: #161b24;
  --paper-warm: #202634;
  --rose: #b46b7e;
  --rose-deep: #f2b5c6;
  --butter: #b89d58;
  --butter-soft: #2b2f3b;
  --mint: #26352c;
  --mint-deep: #9fd1ad;
  --ink: #f4eee8;
  --muted: #c7bab0;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --soft-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  color-scheme: dark;
  background:
    radial-gradient(circle at 0 0, rgba(180, 107, 126, 0.18), transparent 30rem),
    radial-gradient(circle at 100% 12rem, rgba(159, 209, 173, 0.1), transparent 26rem),
    linear-gradient(180deg, #0d1016, #141822 42%, #0d1014);
}

body[data-theme="night"] .login-card,
body[data-theme="night"] .latest-slot,
body[data-theme="night"] .library-panel,
body[data-theme="night"] .profile-card,
body[data-theme="night"] .reader-lock,
body[data-theme="night"] .reader-article {
  background: rgba(22, 27, 36, 0.92);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="night"] .topbar {
  background: rgba(13, 16, 22, 0.82);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="night"] .soft-form input,
body[data-theme="night"] .soft-form select,
body[data-theme="night"] .soft-form textarea,
body[data-theme="night"] .search-box input,
body[data-theme="night"] .select-box select,
body[data-theme="night"] .reader-password {
  background: rgba(13, 16, 22, 0.92);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-theme="night"] .soft-form input:focus,
body[data-theme="night"] .soft-form select:focus,
body[data-theme="night"] .soft-form textarea:focus,
body[data-theme="night"] .search-box input:focus,
body[data-theme="night"] .select-box select:focus,
body[data-theme="night"] .reader-password:focus {
  box-shadow: 0 0 0 4px rgba(180, 107, 126, 0.22);
}

body[data-theme="night"] .ghost-button,
body[data-theme="night"] .mini-button,
body[data-theme="night"] .favorite-button {
  background: rgba(22, 27, 36, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

body[data-theme="night"] .primary-button {
  color: #24181d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

body[data-theme="night"] .post-card {
  background: rgba(18, 22, 30, 0.88);
  border-color: rgba(255, 255, 255, 0.1);
}

body[data-theme="night"] .post-card:hover {
  border-color: rgba(242, 181, 198, 0.45);
}

body[data-theme="night"] .tag {
  background: rgba(43, 47, 59, 0.95);
  border-color: rgba(242, 181, 198, 0.22);
  color: #f2e8eb;
}

body[data-theme="night"] .empty-state {
  background: rgba(43, 47, 59, 0.6);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--muted);
}

body[data-theme="night"] .stat-card {
  background: rgba(43, 47, 59, 0.82);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

body[data-theme="night"] .stat-label {
  color: #f2b5c6;
}

body[data-theme="night"] .stat-value {
  color: var(--ink);
}

body[data-theme="night"] .stat-note {
  color: var(--muted);
}

body[data-theme="night"] .reader-quote {
  background: rgba(43, 47, 59, 0.95);
  border-left-color: var(--rose);
  color: var(--ink);
}

body[data-theme="night"] .reader-divider {
  border-top-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="night"] .text-color-rosa { color: #f0bcc9; }
body[data-theme="night"] .text-color-azul { color: #a9bbf2; }
body[data-theme="night"] .text-color-verde { color: #abd0b2; }
body[data-theme="night"] .text-color-dorado { color: #e4c97f; }

body[data-theme="night"] .segmented-control {
  background: rgba(13, 16, 22, 0.84);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="night"] .segmented-control button {
  color: var(--muted);
}

body[data-theme="night"] .segmented-control button.is-selected {
  background: rgba(159, 209, 173, 0.18);
  color: #e3f2e8;
}

body[data-theme="night"] .tabbar {
  background: rgba(13, 16, 22, 0.94);
  border-color: rgba(255, 255, 255, 0.12);
}

body[data-theme="night"] .tab-button {
  color: var(--muted);
}

body[data-theme="night"] .tab-button.is-active {
  background: rgba(180, 107, 126, 0.22);
  color: #fff0f4;
}

body[data-theme="night"] .profile-facts li {
  background: rgba(159, 209, 173, 0.14);
  color: #dff0e5;
}

body[data-theme="night"] .post-cover,
body[data-theme="night"] .profile-avatar {
  background: rgba(43, 47, 59, 0.95);
}

body[data-theme="night"] .reader-image img {
  background: rgba(43, 47, 59, 0.6);
}

body[data-theme="night"] .decor-png,
body[data-theme="night"] .brand-mark {
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.2)) brightness(0.95) saturate(0.9);
}



body[data-theme="sakura"] {
  --cream: #fff7fb;
  --paper: #fffdfd;
  --paper-warm: #ffeef7;
  --rose: #f4b8cf;
  --rose-deep: #a35372;
  --butter: #ffe1ec;
  --butter-soft: #fff5fa;
  --mint: #dcefdc;
  --mint-deep: #6f9b79;
  --ink: #54464e;
  --muted: #8b7782;
  --line: #efd7e2;
  --shadow: 0 18px 50px rgba(127, 80, 104, 0.12);
  --soft-shadow: 0 10px 24px rgba(127, 80, 104, 0.1);
  color-scheme: light;
  background:
    radial-gradient(circle at 0 0, rgba(244, 184, 207, 0.34), transparent 30rem),
    radial-gradient(circle at 100% 12rem, rgba(220, 239, 220, 0.55), transparent 26rem),
    linear-gradient(180deg, #fff8fc, #fffaf8 42%, #fff6fb);
}

body[data-theme="rose"] {
  --cream: #fff7f5;
  --paper: #fffdfc;
  --paper-warm: #ffeae6;
  --rose: #eea0b7;
  --rose-deep: #8e4460;
  --butter: #ffd9c5;
  --butter-soft: #fff1eb;
  --mint: #dde8df;
  --mint-deep: #6f8f74;
  --ink: #59484e;
  --muted: #917c84;
  --line: #eed8db;
  --shadow: 0 18px 50px rgba(143, 82, 104, 0.12);
  --soft-shadow: 0 10px 24px rgba(143, 82, 104, 0.1);
  color-scheme: light;
  background:
    radial-gradient(circle at 0 0, rgba(238, 160, 183, 0.28), transparent 30rem),
    radial-gradient(circle at 100% 12rem, rgba(255, 217, 197, 0.4), transparent 26rem),
    linear-gradient(180deg, #fff8f8, #fffaf6 42%, #fff5f5);
}

body[data-theme="blue"] {
  --cream: #f5f8ff;
  --paper: #fbfcff;
  --paper-warm: #eaf2ff;
  --rose: #9ab7df;
  --rose-deep: #48648f;
  --butter: #d9e7ff;
  --butter-soft: #f0f5ff;
  --mint: #d9ecf0;
  --mint-deep: #5e8897;
  --ink: #46505d;
  --muted: #6f7a86;
  --line: #d6e0f0;
  --shadow: 0 18px 50px rgba(92, 116, 154, 0.12);
  --soft-shadow: 0 10px 24px rgba(92, 116, 154, 0.1);
  color-scheme: light;
  background:
    radial-gradient(circle at 0 0, rgba(154, 183, 223, 0.28), transparent 30rem),
    radial-gradient(circle at 100% 12rem, rgba(217, 236, 240, 0.6), transparent 26rem),
    linear-gradient(180deg, #f7faff, #f9fbff 42%, #f2f7ff);
}

body[data-theme="gothic"] {
  --cream: #0f1016;
  --paper: #171721;
  --paper-warm: #23232f;
  --rose: #8d76a3;
  --rose-deep: #e0c5ef;
  --butter: #6f678f;
  --butter-soft: #252534;
  --mint: #29303c;
  --mint-deep: #bcc8d7;
  --ink: #f5f1ff;
  --muted: #c6bed0;
  --line: rgba(255, 255, 255, 0.12);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.36);
  --soft-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  color-scheme: dark;
  background:
    radial-gradient(circle at 0 0, rgba(141, 118, 163, 0.18), transparent 30rem),
    radial-gradient(circle at 100% 12rem, rgba(189, 136, 172, 0.12), transparent 26rem),
    linear-gradient(180deg, #0d0e14, #141520 42%, #0c0d12);
}

body[data-theme="sakura"] .text-color-rosa { color: #b9608a; }
body[data-theme="sakura"] .text-color-azul { color: #6379b2; }
body[data-theme="sakura"] .text-color-verde { color: #62876e; }
body[data-theme="sakura"] .text-color-dorado { color: #9e7b2e; }

body[data-theme="rose"] .text-color-rosa { color: #be5a79; }
body[data-theme="rose"] .text-color-azul { color: #5f78a8; }
body[data-theme="rose"] .text-color-verde { color: #62816c; }
body[data-theme="rose"] .text-color-dorado { color: #a0792e; }

body[data-theme="blue"] .text-color-rosa { color: #b472a0; }
body[data-theme="blue"] .text-color-azul { color: #476bb0; }
body[data-theme="blue"] .text-color-verde { color: #628a78; }
body[data-theme="blue"] .text-color-dorado { color: #a3813b; }

body[data-theme="gothic"] .text-color-rosa { color: #d8b6e4; }
body[data-theme="gothic"] .text-color-azul { color: #b9c8ee; }
body[data-theme="gothic"] .text-color-verde { color: #b5d0ba; }
body[data-theme="gothic"] .text-color-dorado { color: #e3cf94; }

body[data-theme="sakura"] .decor-png,
body[data-theme="rose"] .decor-png,
body[data-theme="blue"] .decor-png,
body[data-theme="gothic"] .decor-png,
body[data-theme="sakura"] .brand-mark,
body[data-theme="rose"] .brand-mark,
body[data-theme="blue"] .brand-mark,
body[data-theme="gothic"] .brand-mark {
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.12));
}

body[data-theme="gothic"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.12);
}


@media (max-width: 520px) {
  .editor-toolbar {
    gap: 6px;
  }

  .tone-button {
    min-width: 0;
    padding: 0 10px;
  }

  .format-hint {
    font-size: 0.76rem;
  }
}
