/* Ring picker, "Tree slice gallery" (dark: web_default_avatar). Loaded only
   while the flag is on (templates/csrf_token.html). */
.ln-seal-ov, .ln-seal-toast {
    --sp-card: #FFFDF8; --sp-ink: #2B2420; --sp-mut: #7A6E66; --sp-line: rgba(43, 36, 32, .14);
    --sp-bg: #F5EFE6; --sp-btn: #2B2420; --sp-btn-ink: #FFFDF8; --sp-acc: #8A6A4E; --sp-scrim: rgba(28, 24, 22, .42);
}
.ln-seal-ov.is-dark, body.dark .ln-seal-toast {
    --sp-card: #221D27; --sp-ink: #F3ECDF; --sp-mut: #B5AA9E; --sp-line: rgba(243, 236, 223, .16);
    --sp-bg: #2C2631; --sp-btn: #F3ECDF; --sp-btn-ink: #221D27; --sp-acc: #C9B293; --sp-scrim: rgba(0, 0, 0, .55);
}
/* The modal <dialog> that holds the picker in the top layer: a bare,
   full-screen frame; the scrim and the card are .ln-seal-ov's. */
.ln-seal-dlg {
    position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
    margin: 0; padding: 0; border: 0; background: transparent; overflow: visible; color: inherit;
}
.ln-seal-dlg::backdrop { background: transparent; }
.ln-seal-ov {
    position: fixed; inset: 0; z-index: 10050; background: var(--sp-scrim);
    display: flex; align-items: center; justify-content: center; animation: lnSealFade .2s ease both;
}
.ln-seal-pk {
    background: var(--sp-card); color: var(--sp-ink); border-radius: 24px; width: min(620px, calc(100vw - 32px));
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25); padding: 24px 26px 20px; position: relative;
    font-family: "Avenir Next", Inter, system-ui, sans-serif; animation: lnSealIn .32s cubic-bezier(.2, .8, .2, 1) both;
}
.ln-seal-grab { width: 38px; height: 5px; border-radius: 3px; background: var(--sp-line); margin: 0 auto 10px; display: none; }
.ln-seal-h { display: flex; align-items: flex-start; gap: 12px; }
.ln-seal-h h2 {
    font-family: Palatino, "Palatino Linotype", "Songti TC", "Songti SC", Georgia, serif;
    font-weight: 400; font-size: 25px; line-height: 1.25; margin: 0; color: var(--sp-ink);
}
button.ln-seal-x {
    all: unset; cursor: pointer; margin-left: auto; width: 34px; height: 34px; flex: none; border-radius: 50%;
    display: grid; place-items: center; font-size: 20px; color: var(--sp-mut); background: var(--sp-bg);
}
.ln-seal-note { margin: 6px 0 0; font-size: 13.5px; color: var(--sp-mut); }
.ln-seal-st { position: relative; padding: 6px 0 0; }
.ln-seal-track {
    display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding: 8px calc(50% - 85px) 4px; cursor: grab; outline: none; overscroll-behavior-x: contain;
}
.ln-seal-track::-webkit-scrollbar { display: none; }
.ln-seal-track:focus-visible { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sp-acc) 45%, transparent) inset; border-radius: 18px; }
.ln-seal-slice {
    flex: none; width: 170px; height: 170px; scroll-snap-align: center; position: relative; cursor: pointer;
    transition: transform .12s linear, opacity .12s linear;
}
.ln-seal-slice .cut { position: absolute; inset: 0; }
.ln-seal-slice .cut svg { width: 100%; height: 100%; display: block; }
/* The old rings, fading where they stand while the new ones grow. */
.ln-seal-slice .ln-rings-old { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.ln-seal-slice .ln-rings-old svg { width: 100%; height: 100%; display: block; }
button.ln-seal-nav {
    all: unset; cursor: pointer; position: absolute; top: 84px; width: 38px; height: 38px; border-radius: 50%; z-index: 4;
    background: var(--sp-card); border: 1px solid var(--sp-line); display: grid; place-items: center; font-size: 18px;
    color: var(--sp-ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}
button.ln-seal-nav.prev { left: 2px; }
button.ln-seal-nav.next { right: 2px; }
button.ln-seal-nav:focus-visible, button.ln-seal-x:focus-visible, button.ln-seal-pill:focus-visible, button.ln-seal-lnk:focus-visible,
button.ln-seal-quiet:focus-visible, .ln-seal-sw button:focus-visible { outline: 2px solid var(--sp-acc, #8A6A4E); outline-offset: 2px; }
.ln-seal-cap { text-align: center; margin-top: 6px; min-height: 40px; }
.ln-seal-cap b {
    font-family: Palatino, "Palatino Linotype", "Songti TC", "Songti SC", Georgia, serif;
    font-weight: 400; font-size: 19px; display: block;
}
.ln-seal-cap span { font-size: 13px; color: var(--sp-mut); }
.ln-seal-dots { display: flex; justify-content: center; gap: 5px; margin-top: 6px; }
.ln-seal-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--sp-line); }
.ln-seal-dots i.on { background: var(--sp-ink); }
.ln-seal-hint { text-align: center; font-size: 12px; color: var(--sp-mut); margin-top: 2px; }
.ln-seal-l {
    font-size: 11px; letter-spacing: .13em; text-transform: uppercase; color: var(--sp-mut); font-weight: 600; margin: 14px 0 8px;
}
.ln-seal-sw { display: flex; gap: 10px; flex-wrap: wrap; }
.ln-seal-sw.seasons button {
    all: unset; cursor: pointer; transition: transform .2s; position: relative;
    width: auto; height: auto; padding: 6px 12px; border-radius: 999px; font-size: 13px; color: var(--sp-ink);
    display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 0 0 1px var(--sp-line) inset;
}
.ln-seal-sw.seasons button i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
/* Page CSS clears button box-shadows on :focus; the chosen season keeps its ring. */
.ln-seal-pk .ln-seal-sw.seasons button[aria-checked="true"],
.ln-seal-pk .ln-seal-sw.seasons button[aria-checked="true"]:focus { box-shadow: 0 0 0 2px var(--sp-acc) inset !important; font-weight: 600; }
.ln-seal-sw.seasons button:hover { transform: scale(1.04); }
.ln-seal-f { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.ln-seal-f .sp { flex: 1; }
button.ln-seal-pill {
    all: unset; cursor: pointer; padding: 10px 18px; border-radius: 999px; background: var(--sp-btn, #2B2420);
    color: var(--sp-btn-ink, #FFFDF8); font-size: 14.5px; font-weight: 600; white-space: nowrap; text-align: center;
}
button.ln-seal-pill.ghost { background: transparent; color: var(--sp-ink, #2B2420); box-shadow: 0 0 0 1px var(--sp-line, rgba(43, 36, 32, .14)) inset; }
button.ln-seal-pill[disabled] { opacity: .5; cursor: default; }
button.ln-seal-lnk, button.ln-seal-quiet {
    all: unset; cursor: pointer; font-size: 14px; color: var(--sp-mut, #7A6E66); text-decoration: underline;
    text-underline-offset: 3px; white-space: nowrap;
}
/* Settings > Profile: one quiet text link under the photo hint. The camera
   (photo upload) stays the primary action. Inherits the page theme. */
#sealSettingsSlot { margin-top: 6px; display: flex; justify-content: center; }
#sealSettingsSlot button.ln-seal-quiet { font-size: 12.5px; color: var(--text-color, #666); opacity: .6; }
#sealSettingsSlot button.ln-seal-quiet:hover { opacity: .85; }
img.ln-seal-tappable { cursor: pointer; }
/* A generated seal has its own deckled edge: no grey disc or round shadow behind it. */
img[src^="data:image/svg+xml"][src*="data-ln-default-avatar"] { background: transparent !important; box-shadow: none !important; border-radius: 0 !important; }
.ln-seal-toast {
    position: fixed; left: 50%; top: 18px; transform: translateX(-50%); z-index: 10060; background: var(--sp-btn);
    color: var(--sp-btn-ink); font-size: 13.5px; font-weight: 600; padding: 9px 14px; border-radius: 999px;
    white-space: nowrap; pointer-events: none; animation: lnSealFade .2s ease both;
}
@keyframes lnSealFade { from { opacity: 0; } }
@keyframes lnSealIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (max-width: 640px) {
    .ln-seal-ov { align-items: flex-end; }
    .ln-seal-pk { width: 100%; border-radius: 22px 22px 0 0; padding: 10px 18px 22px; animation-name: lnSealSheet; }
    .ln-seal-grab { display: block; }
    .ln-seal-h h2 { font-size: 22px; }
    .ln-seal-track { padding: 8px calc(50% - 75px) 4px; }
    .ln-seal-slice { width: 150px; height: 150px; }
    button.ln-seal-nav { top: 76px; }
    .ln-seal-f { gap: 8px; }
    .ln-seal-f button.ln-seal-pill { padding: 10px 13px; font-size: 13.5px; }
    /* A long "Use a photo instead" (de: "Stattdessen ein Foto verwenden") wraps
       onto two lines itself, so Cancel and Save never split across rows. */
    .ln-seal-f button.ln-seal-lnk { white-space: normal; flex: 1 1 0; min-width: 0; line-height: 1.35; }
}
@keyframes lnSealSheet { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .ln-seal-ov, .ln-seal-pk, .ln-seal-toast { animation-duration: .01s; }
    .ln-seal-slice, .ln-seal-sw button { transition: none; }
    .ln-seal-track { scroll-behavior: auto; }
}
