/* Auswahl-Popup: dieselben Farben, Radien und Bewegungen wie bei Besuchen. */
html.theme-picker-open { overflow: hidden; scrollbar-gutter: stable; }
.theme-picker {
  position: fixed;
  inset: 0;
  width: min(960px, calc(100% - 48px));
  max-width: none;
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: #123c35;
  background: #f5ead4;
  overflow: hidden;
  font-family: Figtree, Arial, sans-serif;
}
.theme-picker[open] { display: flex; flex-direction: column; animation: picker-in 260ms cubic-bezier(.2,.7,.3,1); }
.theme-picker::backdrop { background: rgb(8 29 29 / 72%); backdrop-filter: blur(5px); animation: picker-shade-in 260ms ease; }
.theme-picker.is-closing { animation: picker-out 180ms ease forwards; pointer-events: none; }
.theme-picker.is-closing::backdrop { animation: picker-shade-out 180ms ease forwards; }
.theme-picker-head { flex: 0 0 auto; padding: 28px 40px 20px; border-bottom: 1px solid rgb(18 60 53 / 14%); }
.theme-picker-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; font-size: 20px; font-weight: 600; letter-spacing: -.04em; }
.theme-picker-brand .brand-mark { width: 32px; height: 32px; background: #123c35; }
.theme-picker-brand .icon { width: 20px; height: 20px; }
.theme-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.theme-picker-heading h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.035em; }
.theme-picker-heading h2:focus { outline: none; }
.theme-picker-close { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; padding: 12px; border: 0; border-radius: 50%; color: inherit; background: transparent; }
.theme-picker-close:hover { background: rgb(18 60 53 / 8%); }
.theme-picker-scroll { min-height: 0; width: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 24px 40px 40px; scroll-padding: 16px; }
.picker-selected { display: grid; grid-template-columns: 90px minmax(0,1fr); align-items: center; gap: 18px; padding: 14px; margin-bottom: 26px; border-radius: 20px; background: var(--selected-color, #a9e4cd); color: #123c35; }
.picker-selected > img { width: 90px; height: 98px; object-fit: cover; border-radius: 12px; }
.picker-selected h3 { font-size: 23px; line-height: 1.25; margin-bottom: 7px; }
.picker-selected p { font-size: 15px; line-height: 1.5; }
.picker-selected [data-picker-meta] { display: block; margin-top: 9px; font-size: 13px; }
.picker-list-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; }
.picker-list-heading > p { font-size: 16px; font-weight: 550; }
.picker-list-heading > span { font-size: 13px; }
.picker-lessons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; list-style: none; padding: 0; margin: 0; }
.picker-lessons > li { min-width: 0; }
.picker-lesson { display: flex; align-items: flex-start; gap: 12px; width: 100%; height: 100%; min-height: 128px; padding: 18px 16px; border: 1px solid rgb(18 60 53 / 24%); border-radius: 20px; background: rgb(255 255 255 / 38%); color: #123c35; transition: background 180ms, border-color 180ms; }
.picker-lesson:hover { background: rgb(255 255 255 / 70%); border-color: #123c35; }
.picker-lesson[aria-current=step] { border: 2px solid #123c35; padding: 17px 15px; background: #e2ecdf; }
.picker-lesson-number { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; margin-top: 1px; border-radius: 50%; background: #123c35; color: #fff; font-size: 13px; font-weight: 600; }
.picker-lesson-copy { flex: 1 1 auto; min-width: 0; }
.picker-lesson-copy h4 { font-size: 19px; font-weight: 600; line-height: 1.3; letter-spacing: -.025em; }
.picker-lesson-copy > p { margin-top: 7px; font-size: 14px; line-height: 1.5; }
.picker-lesson-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; margin-top: 12px; font-size: 12px; }
.picker-lesson-status { font-weight: 600; }
.picker-lesson > .icon { width: 18px; height: 18px; margin-top: 6px; }
.picker-empty { font-size: 16px; padding-block: 20px; }
.picker-loading { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 180px; font-size: 16px; }
.picker-loading > span { width: 20px; height: 20px; border: 2px solid rgb(18 60 53 / 20%); border-top-color: #123c35; border-radius: 50%; animation: picker-spin .8s linear infinite; }
.picker-error { padding-block: 24px; }
.picker-error p { font-size: 16px; line-height: 1.6; margin-bottom: 24px; }
.picker-error > a { display: inline-flex; min-height: 48px; align-items: center; margin-left: 16px; }
.theme-picker .button { min-height: 48px; background: #123c35; border-color: #123c35; }
.picker-auth { max-width: 520px; margin-inline: auto; padding-bottom: 4px; }
.picker-auth-back { min-height: 48px; margin-bottom: 20px; font-size: 14px; }
.picker-auth .member-form h3 { font-size: 25px; }
.theme-picker :focus-visible { outline-color: #087ab4; outline-offset: 3px; }
@keyframes picker-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
@keyframes picker-out { to { opacity: 0; transform: translateY(16px); } }
@keyframes picker-shade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes picker-shade-out { to { opacity: 0; } }
@keyframes picker-spin { to { transform: rotate(360deg); } }
@media (max-width: 700px) {
  html.theme-picker-open { scrollbar-gutter: auto; }
  .theme-picker { width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .theme-picker-head { padding: max(14px,env(safe-area-inset-top)) 20px 14px; }
  .theme-picker-brand { font-size: 17px; margin-bottom: 12px; }
  .theme-picker-brand .brand-mark { width: 26px; height: 26px; border-radius: 7px; }
  .theme-picker-brand .icon { width: 17px; height: 17px; }
  .theme-picker-heading h2 { font-size: 27px; }
  .theme-picker-scroll { padding: 20px 20px max(28px,env(safe-area-inset-bottom)); }
  .picker-selected { grid-template-columns: 64px minmax(0,1fr); align-items: start; gap: 13px; padding: 14px; margin-bottom: 22px; border-radius: 16px; }
  .picker-selected > img { width: 64px; height: 80px; border-radius: 9px; }
  .picker-selected h3 { font-size: 20px; }
  .picker-selected p { font-size: 14px; }
  .picker-selected [data-picker-meta] { font-size: 12px; }
  .picker-list-heading > p { font-size: 15px; }
  .picker-lessons { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .picker-lesson { min-height: 112px; padding: 17px 14px; gap: 11px; border-radius: 16px; }
  .picker-lesson[aria-current=step] { padding: 16px 13px; }
  .picker-lesson-copy h4 { font-size: 19px; }
  .picker-auth .member-form h3 { font-size: 23px; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .theme-picker-brand { display: none; }
  .theme-picker-head { padding-block: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .theme-picker[open], .theme-picker::backdrop, .theme-picker.is-closing, .theme-picker.is-closing::backdrop, .picker-loading > span { animation: none; }
}
