@font-face {
  font-family: "UnifrakturMaguntia";
  src: url("fonts/unifrakturmaguntia.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--page-background, #171329); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 50% 95%, #a5525f55 0%, transparent 58%),
    radial-gradient(ellipse at 12% 12%, #5d4d843d 0%, transparent 55%),
    radial-gradient(ellipse at 90% 28%, #4b385a36 0%, transparent 52%),
    linear-gradient(150deg, #252039, #171329 55%, #281b30);
}
main {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}
h1 {
  margin: 0;
  padding: .08em .12em .16em;
  font-family: "UnifrakturMaguntia", Georgia, serif;
  font-size: clamp(100px, 24vw, 340px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.045em;
  color: #f4c6a2;
  background: linear-gradient(165deg, #fff1db 12%, #edb69c 52%, #c785a9 90%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 24px #d695ad18);
  user-select: none;
}
html[data-custom-background] body { background: var(--page-background); }
html[data-custom-text] h1 {
  color: var(--letter-color);
  background: none;
  -webkit-text-fill-color: var(--letter-color);
  filter: none;
}
.palette { position: fixed; right: 24px; bottom: 24px; z-index: 1; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
.palette button { cursor: pointer; font: inherit; }
.palette-toggle {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid #ffffff24; border-radius: 50%;
  background: #24212bd9; color: #eee9e1; backdrop-filter: blur(16px);
  box-shadow: 0 3px 16px #00000015; transition: background .2s, transform .2s;
}
.palette-toggle:hover, .palette-toggle[aria-expanded="true"] { background: #3b3546; transform: translateY(-2px); }
.palette-toggle svg { width: 20px; height: 20px; }
.palette-panel {
  position: absolute; right: 0; bottom: 54px; width: min(272px, calc(100vw - 32px));
  padding: 18px; border: 1px solid #ffffff20; border-radius: 18px;
  background: #24212bf2; color: #eee9e1; backdrop-filter: blur(24px);
  box-shadow: 0 12px 48px #00000030; font-size: 12px;
}
.palette-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; font-size: 13px; }
.palette-reset { padding: 4px 0 4px 8px; border: 0; background: transparent; color: #aaa4b3; font-size: 11px !important; }
.palette-reset:hover { color: #fff; }
.palette-presets { display: flex; gap: 8px; margin-bottom: 16px; }
.preset { flex: 1; height: 36px; padding: 0; border: 1px solid #ffffff20; border-radius: 9px; color: var(--swatch-text); background: var(--swatch-bg); font-family: Georgia, serif !important; font-size: 16px !important; }
.preset[data-text="#f4c6a2"] { --swatch-text: #f4c6a2; --swatch-bg: #171329; }
.preset[data-text="#ece8df"] { --swatch-text: #ece8df; --swatch-bg: #242424; }
.preset[data-text="#343e36"] { --swatch-text: #343e36; --swatch-bg: #e7e9df; }
.preset[data-text="#e6efab"] { --swatch-text: #e6efab; --swatch-bg: #253c36; }
.preset[data-text="#573e68"] { --swatch-text: #573e68; --swatch-bg: #e9dff0; }
.preset:hover { box-shadow: 0 0 0 2px #ffffff50; }
.color-row { display: flex; align-items: center; gap: 12px; min-height: 42px; cursor: pointer; }
.color-row + .color-row { border-top: 1px solid #ffffff0d; }
.color-value { margin-left: auto; color: #aaa4b3; font-size: 10px; font-variant-numeric: tabular-nums; }
.color-row input { width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; overflow: hidden; background: transparent; cursor: pointer; }
.color-row input::-webkit-color-swatch-wrapper { padding: 0; }
.color-row input::-webkit-color-swatch { border: 1px solid #ffffff25; border-radius: 7px; }
.color-row input::-moz-color-swatch { border: 1px solid #ffffff25; border-radius: 7px; }
.palette :focus-visible { outline: 2px solid #eee9e1; outline-offset: 4px; }
@media (max-width: 480px) { .palette { right: 16px; bottom: 16px; } }
@media (prefers-reduced-motion: reduce) { .palette-toggle { transition: none; } }
@media (forced-colors: active) {
  h1 { background: none; -webkit-text-fill-color: CanvasText; }
}
