/* Frag Stellio als Liquid Glass wie bei Apple (Wunsch Leandro 19.11.2026), App und Startseite.
   Aufbau wie Apples Material:
   - fast klares Glas: wenig Toenung, Unschaerfe + mehr Farbsaettigung, dahinter bleibt die Seite erkennbar
   - Lichtbrechung am Rand (nur Chrome/Edge: js/frag-glas-r20.js legt den SVG-Filter #lg-refract an)
   - Lichtkante oben links hell, unten rechts schwaecher, innen ein weiches Leuchten am Rand
   - Glanzlicht folgt der Maus (--mx/--my aus frag-glas-r20.js)
   - erscheint als Material: waechst aus der Ecke des Knopfs (unten rechts), statt nur einzublenden
   - kein blauer Schimmer, kein zweiter Kasten im Eingabefeld */
.sh-panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .05)), rgba(247, 242, 234, .1) !important;
  -webkit-backdrop-filter: blur(10px) saturate(180%) brightness(1.02);
  backdrop-filter: blur(10px) saturate(180%) brightness(1.02);
  border: 0 !important;
  box-shadow:
    inset 1.5px 1.5px 0 rgba(255, 255, 255, .9),
    inset -1px -1px 0 rgba(255, 255, 255, .35),
    inset 0 0 0 1px rgba(255, 255, 255, .22),
    inset 0 18px 26px -18px rgba(255, 255, 255, .75),
    inset 0 -16px 26px -18px rgba(255, 255, 255, .5),
    0 34px 80px -24px rgba(48, 41, 35, .38),
    0 3px 10px rgba(48, 41, 35, .08) !important;
  isolation: isolate;
  transform-origin: 100% 100%;
  transition: opacity 240ms cubic-bezier(.2, .9, .25, 1), transform 380ms cubic-bezier(.2, .9, .25, 1) !important;
}
.sh-panel:not(.is-open) { transform: scale(.94) translateY(10px) !important; }
.sh-panel.is-open { transform: none !important; }
html.lg-refract .sh-panel {
  -webkit-backdrop-filter: blur(9px) saturate(180%) brightness(1.02) url(#lg-refract);
  backdrop-filter: blur(9px) saturate(180%) brightness(1.02) url(#lg-refract);
}
/* Glanzlicht, das der Maus folgt */
.sh-panel::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 0;
  background: radial-gradient(260px circle at var(--mx, 18%) var(--my, 0%), rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 65%);
  mix-blend-mode: soft-light; opacity: .9; transition: opacity .3s;
}
/* feine Lichtkante als Verlauf rund um den Rand */
.sh-panel::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 0;
  background: linear-gradient(140deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .2) 30%, rgba(255, 255, 255, .05) 60%, rgba(255, 255, 255, .6));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.sh-panel > * { position: relative; z-index: 1; }

/* Inhalt: lesbar auf Glas (Apple "Vibrancy": etwas kraeftiger statt grau), kein Glas auf Glas */
.sh-head { background: transparent !important; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0 !important; box-shadow: 0 1px 0 rgba(255, 255, 255, .5) !important; }
.sh-title { color: #241E19 !important; }
.sh-sub { color: #5E5248 !important; font-weight: 500; }
.sh-log::before { display: none; }
.sh-msg.is-bot { background: rgba(255, 255, 255, .86) !important; border: 0 !important; box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 8px 20px -14px rgba(48, 41, 35, .35) !important; }
.sh-chip { background: rgba(255, 255, 255, .8) !important; border: 0 !important; box-shadow: 0 1px 0 #fff inset, 0 6px 14px -10px rgba(48, 41, 35, .4) !important; }
.sh-chip:hover { background: #fff !important; }
.sh-chips-wrap::before, .sh-chips-wrap::after { display: none !important; }
.sh-input { border-radius: 999px !important; background: rgba(255, 255, 255, .86) !important; border: 0 !important;
  box-shadow: 0 1px 0 #fff inset, 0 8px 20px -14px rgba(48, 41, 35, .45) !important; }
.sh-input:focus-within { box-shadow: 0 0 0 2px rgba(138, 119, 101, .14), 0 8px 20px -14px rgba(48, 41, 35, .45) !important; }
.sh-panel .sh-textarea, .sh-panel .sh-textarea:focus, .sh-panel .sh-textarea:focus-visible { outline: none !important; border: 0 !important; box-shadow: none !important; background: transparent !important; border-radius: 0 !important; }
.sh-foot { color: #5E5248 !important; }

/* Am Handy: Blatt von unten, waechst von unten */
@media (max-width: 640px) { .sh-panel { transform-origin: 50% 100%; } }
/* Weniger Transparenz gewuenscht oder kein Glas im Browser: fast deckend, gut lesbar */
@media (prefers-reduced-transparency: reduce) {
  .sh-panel { background: #FBF8F2 !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .sh-panel::after { display: none; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sh-panel { background: rgba(251, 248, 242, .97) !important; }
}
@media (prefers-reduced-motion: reduce) {
  .sh-panel, .sh-panel:not(.is-open) { transform: none !important; transition: opacity 200ms ease !important; }
}

/* Handy (Wunsch Leandro 24.11.2026): keine ganze Seite, sondern ein schwebendes Glas-Blatt
   in der unteren Haelfte - oben bleibt die Seite sichtbar, wie in der Handy-Ansicht am Computer. */
@media (max-width: 640px) {
  .sh-panel {
    left: 10px !important; right: 10px !important; width: auto !important;
    bottom: calc(10px + env(safe-area-inset-bottom)) !important;
    top: auto !important; height: auto !important;
    max-height: min(60vh, 520px) !important; max-height: min(60dvh, 520px) !important;
    border-radius: 28px !important; border-bottom: 0 !important;
    display: flex; flex-direction: column;
  }
  .sh-panel .sh-log { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
  .sh-panel .sh-input { padding-bottom: 12px; }
}
