/* Konto im neuen Design: Login-Wand, Konto-Menü, Login-Dialog und Kontobereich im Dashboard.
   Logik in account.js. Eigenständig, damit es auch auf Seiten ohne jjm-design.css funktioniert. */

/* Pflicht-Login: Seiten mit <html data-jjm-gate> zeigen ihren Inhalt erst nach geprüfter Session. */
html[data-jjm-gate]:not([data-jjm-auth]) body > *:not(dialog):not(.account-toast) { visibility: hidden; }
html[data-jjm-gate][data-jjm-auth="none"] body > *:not(.jjm-wall):not(dialog):not(.account-toast) { display: none !important; }
html[data-jjm-gate][data-jjm-auth="none"] body { background: #fff8ed; }

.jjm-wall {
  --w-blue: #2b4ec5;
  --w-ink: #25221f;
  --w-muted: #6b625a;
  --w-line: #e7ddd0;
  --w-yellow: #ffc93c;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 48px;
  color: var(--w-ink);
  background: radial-gradient(circle at 50% 0, #e7edff 0, rgba(231, 237, 255, 0) 55%), #fff8ed;
  font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: center;
}
.jjm-wall-top { width: min(1120px, 100%); min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.jjm-wall-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--w-ink); font-weight: 900; font-size: 1.05rem; text-decoration: none; }
.jjm-wall-brand > span:last-child span { color: var(--w-blue); }
.jjm-wall-mark { width: 38px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 12px; color: var(--w-yellow); background: var(--w-blue); font-weight: 900; }
.jjm-wall-close { color: var(--w-muted); font-weight: 900; font-size: .88rem; text-decoration: none; }
.jjm-wall-close:hover, .jjm-wall-close:focus-visible { color: var(--w-blue); }
.jjm-wall-card { width: min(560px, 100%); margin-top: 24px; padding: 40px 40px 32px; border: 1px solid var(--w-line); border-radius: 34px; background: #fff; box-shadow: 0 24px 70px rgba(30, 39, 75, .14); }
.jjm-wall-mascot { width: 132px; height: auto; margin: -6px auto 10px; display: block; }
.jjm-wall-kicker { margin: 0 0 8px; color: var(--w-blue); font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.jjm-wall h1 { margin: 0; font-size: clamp(1.7rem, 4.6vw, 2.35rem); line-height: 1.12; font-weight: 900; letter-spacing: -.02em; }
.jjm-wall h1:focus { outline: none; }
.jjm-wall-copy { max-width: 430px; margin: 14px auto 0; color: var(--w-muted); font-weight: 700; line-height: 1.55; }
.jjm-wall-status { margin: 12px auto 0; color: var(--w-blue); font-weight: 900; font-size: .92rem; }
.jjm-wall-status:empty { display: none; }
.jjm-wall-login { margin: 24px auto 0; display: grid; justify-items: center; gap: 10px; }
.jjm-wall-privacy { max-width: 430px; margin: 22px auto 0; color: var(--w-muted); font-size: .82rem; line-height: 1.55; }
.jjm-wall-privacy a, .jjm-wall-links a { color: var(--w-blue); font-weight: 900; }
.jjm-wall-links { margin: 14px 0 0; font-size: .9rem; }

/* Google-Bereich (Login-Wand und Onboarding) */
.gis-host { min-height: 44px; display: flex; justify-content: center; align-items: center; }
.gis-host:empty { min-height: 0; }
.gis-host[hidden] { display: none; }
.account-google { width: min(390px, 100%); min-height: 56px; border: 1px solid #d7d7d7; border-radius: 14px; color: #323232; background: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .09); font: inherit; font-weight: 900; cursor: pointer; }
.account-google span { margin-right: 10px; color: #4285f4; }
.account-google[hidden] { display: none; }
.account-hint { max-width: 390px; margin: 4px auto 0; color: #6b625a; font-size: .86rem; font-weight: 700; line-height: 1.5; }
.account-hint[hidden] { display: none; }

/* Onboarding: Login-Schritt */
.onboarding-login { display: grid; justify-items: center; gap: 10px; }
.onboarding-card > p.onboarding-privacy { margin: 16px auto 0; color: #6b625a; font-size: .82rem; font-weight: 700; }
.onboarding-privacy a { color: #2b4ec5; font-weight: 900; }

/* Konto-Menü in der neuen Kopfzeile */
[data-login-link][hidden] { display: none !important; }
.account-slot { display: none; }
.account-slot.is-on { display: flex; align-items: center; }
.dashboard-links .account-slot, .site-header .account-slot { margin-left: 4px; }
.account-btn { border: 2px solid #25221f; background: #ffc93c; color: #25221f; font: inherit; font-weight: 900; border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.account-btn-lg { padding: 12px 18px; font-size: 1rem; }
.account-menu { position: relative; }
.account-menu summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 10px 4px 4px; border: 1px solid #e7ddd0; border-radius: 999px; background: #fff; cursor: pointer; font-weight: 900; font-size: .88rem; color: #25221f; }
.account-menu summary::-webkit-details-marker { display: none; }
.account-menu summary:focus-visible { outline: 3px solid #2b4ec5; outline-offset: 2px; }
.account-ava { width: 32px; height: 32px; flex: none; border-radius: 50%; background: #2b4ec5; color: #ffc93c; display: grid; place-items: center; font-weight: 900; }
.account-name { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-drop { position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; padding: 10px; border: 1px solid #e7ddd0; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgba(30, 39, 75, .18); z-index: 60; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.account-drop p { margin: 2px 8px 8px; font-size: .8rem; color: #6b625a; word-break: break-all; }
.account-drop button, .account-drop a { display: block; width: 100%; border: 0; background: transparent; color: #25221f !important; text-align: left; padding: 10px 12px; border-radius: 12px; font: inherit; font-size: .9rem; font-weight: 800; cursor: pointer; text-decoration: none; }
.account-drop button:hover, .account-drop a:hover, .account-drop button:focus-visible, .account-drop a:focus-visible { background: #fff8ed; color: #2b4ec5 !important; }
.account-drop [data-account-del] { color: #c2412a !important; }
@media (max-width: 760px) {
  .account-name { display: none; }
  .account-menu summary { padding: 4px; }
}

/* Login- und Zustimmungsdialog */
#jjm-login-dialog { width: min(460px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 28px; color: #25221f; background: #fff; box-shadow: 0 30px 80px rgba(16, 29, 80, .3); font-family: "Nunito", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif; }
#jjm-login-dialog::backdrop { background: rgba(16, 29, 80, .45); }
#jjm-login-dialog form { margin: 0; padding: 28px 26px 22px; }
#jjm-login-dialog h2 { margin: 0 0 8px; font-size: 1.4rem; font-weight: 900; }
#jjm-login-dialog p { margin: 0; color: #6b625a; font-weight: 700; line-height: 1.5; }
#jjm-login-dialog .gis-host { margin: 16px 0; }
#jjm-login-dialog .account-hint { margin: 10px 0 0; }
.account-consent { margin-top: 14px; padding: 14px 16px; border: 1px solid #e7ddd0; border-radius: 16px; background: #fff8ed; text-align: left; }
.account-consent[hidden] { display: none; }
.account-consent ul { margin: 0 0 10px; padding-left: 1.2rem; color: #25221f; font-size: .9rem; font-weight: 700; }
.account-consent p, .account-privacy { margin-top: 10px !important; font-size: .86rem; line-height: 1.5; }
.account-consent a, .account-privacy a { color: #2b4ec5; font-weight: 900; }
#jjm-login-dialog .reset-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
#jjm-login-dialog .reset-dialog-actions button { min-height: 46px; padding: 0 18px; border: 1px solid #e7ddd0; border-radius: 999px; background: #fff; color: #25221f; font: inherit; font-weight: 900; cursor: pointer; }
#jjm-login-dialog .reset-dialog-actions [data-login-go] { border-color: #2b4ec5; background: #2b4ec5; color: #fff; }
#jjm-login-dialog .reset-dialog-actions [data-login-go][hidden] { display: none; }

.account-toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: #25221f; color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 800; z-index: 1000; max-width: min(90vw, 420px); text-align: center; font-family: "Nunito", ui-rounded, system-ui, sans-serif; }
.account-toast[hidden] { display: none; }

.jjm-goal-celebration { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 18px; background: rgba(255, 248, 237, .96); font-family: "Nunito", ui-rounded, system-ui, sans-serif; }
.jjm-goal-celebration[hidden] { display: none; }
.jjm-goal-celebration > div { width: min(100%, 430px); border: 2px solid #e7ddd0; border-radius: 30px; padding: 28px; background: #fff; box-shadow: 0 28px 80px rgba(16, 29, 80, .2); text-align: center; }
.jjm-goal-celebration img { width: 150px; height: 150px; object-fit: contain; }
.jjm-goal-celebration p { margin: 4px 0; color: #13867b; font-size: .78rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.jjm-goal-celebration h2 { margin: 0 0 7px; color: #25221f; font-size: 1.7rem; }
.jjm-goal-celebration strong { display: block; margin-bottom: 20px; color: #6b625a; }
.jjm-goal-celebration button { min-height: 48px; border: 0; border-radius: 999px; padding: 0 22px; color: white; background: #2b4ec5; font: inherit; font-weight: 900; cursor: pointer; }

/* Kontobereich im Dashboard */
.account-panel { margin-top: 34px; padding: 26px 28px; border: 1px solid #e7ddd0; border-radius: 28px; background: #fff; }
.account-panel[hidden] { display: none; }
.account-panel h2 { margin: 0 0 14px; font-size: 1.3rem; font-weight: 900; }
.account-panel-mail { display: flex; align-items: center; gap: 12px; margin: 0; }
.account-panel-mail .account-ava { width: 44px; height: 44px; font-size: 1.1rem; }
.account-panel-mail strong, .account-panel-mail small { display: block; }
.account-panel-mail small { color: #6b625a; font-weight: 700; word-break: break-all; }
.account-panel-note { margin: 12px 0 0; color: #6b625a; font-weight: 700; }
.account-panel-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin-top: 18px; }
.account-panel-actions button { min-height: 44px; padding: 0 18px; border: 1px solid #e7ddd0; border-radius: 999px; background: #fff; color: #25221f; font: inherit; font-weight: 900; cursor: pointer; }
.account-panel-actions .account-panel-del { color: #c2412a; }
.account-panel-actions a { color: #2b4ec5; font-weight: 900; font-size: .9rem; }

@media (max-width: 560px) {
  .jjm-wall-top { min-height: 64px; }
  .jjm-wall-card { margin-top: 8px; padding: 28px 20px 24px; border-radius: 25px; }
  .jjm-wall-mascot { width: 108px; }
  .account-panel { padding: 22px 18px; }
}
