/* Play2Gether v17: additive styles, original six server themes untouched. */
#p2gPortalShell .p2g-v17-roles{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0 22px}
#p2gPortalShell .p2g-v17-roles>span{display:flex;align-items:center;gap:8px;padding:9px 12px;background:#121f3b;border:1px solid #36517b88;border-radius:12px;font-size:12px}
#p2gPortalShell .p2g-v17-roles img{width:24px;height:24px;object-fit:contain}
#p2gPortalShell .p2g-v17-roles small{color:#78ddf6;border-left:1px solid #ffffff29;padding-left:8px;font-weight:800}
#p2gPortalShell .p2g-v17-overview{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(270px,1fr);gap:18px;align-items:stretch;margin-bottom:18px}
#p2gPortalShell .p2g-v17-overview>div{min-width:0;border-radius:18px;background:linear-gradient(145deg,#101f40,#171633);border:1px solid #46649e60;padding:20px}
#p2gPortalShell .p2g-v17-overview h2{display:flex;flex-wrap:wrap;gap:9px;align-items:center;justify-content:space-between}
#p2gPortalShell #p2gDashCountdown{font-size:11px;color:#9ebff4;font-weight:650}
#p2gPortalShell .p2g-v17-overview .p2g-port-cards{grid-template-columns:repeat(3,minmax(0,1fr));margin:8px 0 0;gap:10px}
#p2gPortalShell .p2g-v17-overview .p2g-port-card{padding:14px}
#p2gPortalShell .p2g-v17-overview .p2g-port-card strong{font-size:27px}
#p2gPortalShell .p2g-v17-ratings{display:flex;flex-wrap:wrap;gap:7px;margin:15px 0 12px}
#p2gPortalShell .p2g-v17-ratings b{background:#172b4f;padding:6px 10px;border-radius:9px;font-size:12px;border:1px solid #5476a650}
#p2gPortalShell .p2g-v17-score .p2g-port-btn{margin:4px}
#p2gPortalShell .p2g-v17-graphs{display:grid;grid-template-columns:1.2fr 1fr;gap:18px}
#p2gPortalShell .p2g-v17-bars{max-height:235px;overflow:auto;scrollbar-color:#2d5c8e #09172d}
#p2gPortalShell .p2g-v17-bar{display:grid;grid-template-columns:minmax(52px,110px) minmax(0,1fr) 40px;gap:11px;align-items:center;font-size:11px;margin:9px 0;color:#c2d2e8}
#p2gPortalShell .p2g-v17-bar>div{height:11px;border-radius:7px;background:#1e3356;overflow:hidden}
#p2gPortalShell .p2g-v17-bar i{display:block;height:100%;background:linear-gradient(90deg,#05bff0,#8b55f3);border-radius:7px;min-width:0}
#p2gPortalShell .p2g-v17-bar b{text-align:right}
#p2gPortalShell .p2g-v17-availability{display:flex;justify-content:space-between;gap:8px;border-left:3px solid #1bddab;border-radius:5px;padding:9px 10px;margin:7px 0;background:#12213d;font-size:12px}
#p2gPortalShell .p2g-v17-availability.warn{border-color:#f6b747}#p2gPortalShell .p2g-v17-availability.danger{border-color:#ff5b7f}
#p2gPortalShell .p2g-v17-availability span{color:#b0c5df;text-align:right}
#p2gPortalShell .p2g-v17-locked{opacity:.38!important;filter:grayscale(1);cursor:not-allowed}
/* Teamchat: three-column Discord-like layout, larger click targets and clear unread state */
#p2gPortalShell .p2g-port-chat-layout{grid-template-columns:minmax(215px,265px) minmax(330px,1fr) minmax(210px,265px);gap:14px;align-items:start}
#p2gPortalShell .p2g-port-chat-layout>.p2g-port-panel{height:min(79vh,820px);min-height:600px;overflow:hidden}
#p2gPortalShell .p2g-port-chat-layout>.p2g-port-panel:first-child{display:flex;flex-direction:column}
#p2gPortalShell .p2g-port-chat-list{flex:1;max-height:none;overflow:auto;padding-right:3px}
#p2gPortalShell .p2g-port-chat-list .p2g-v17-room{display:flex;align-items:center;gap:11px;min-height:66px;padding:10px 12px;margin:8px 0;font-size:14px;border-radius:13px;position:relative}
#p2gPortalShell .p2g-v17-room-icon{width:44px;height:44px;flex:none;object-fit:cover;border-radius:13px;background:#071123;box-shadow:0 0 0 1px #6188b055}
#p2gPortalShell .p2g-v17-room-copy{display:flex;flex-direction:column;gap:5px;min-width:0;flex:1}
#p2gPortalShell .p2g-v17-room-copy strong{font-size:14px;font-weight:850;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#p2gPortalShell .p2g-v17-room-copy small{font-size:11px;color:#a7bbd5}
#p2gPortalShell .p2g-v17-room.has-new{border-color:#55dfff;background:linear-gradient(110deg,#143c62,#1e285d);box-shadow:inset 3px 0 #33dfff,0 0 11px #24a7ff30}
#p2gPortalShell .p2g-v17-room-badge{font-size:11px;background:#ea4872;color:#fff;min-width:21px;height:21px;line-height:21px;text-align:center;border-radius:20px;padding:0 4px}
#p2gPortalShell .p2g-v17-chat-top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:9px}
#p2gPortalShell .p2g-v17-chat-top h2{margin:0}
#p2gPortalShell .p2g-v17-chat-top input{background:#0a1930;border:1px solid #476da0;border-radius:10px;color:#fff;padding:9px 12px;font-size:12px;width:min(240px,100%)}
#p2gPortalShell .p2g-port-chat-pane{height:min(79vh,820px)}
#p2gPortalShell .p2g-v17-chat-sidebar{padding:16px;display:flex;flex-direction:column}
#p2gPortalShell .p2g-v17-member-scroll{overflow-y:auto;max-height:calc(79vh - 110px)}
#p2gPortalShell .p2g-v17-person{display:flex;align-items:center;gap:10px;width:100%;min-height:55px;text-align:left;padding:8px;background:transparent;border:0;border-radius:10px}
#p2gPortalShell .p2g-v17-person:hover{background:#ffffff11}
#p2gPortalShell .p2g-v17-person img{width:38px;height:38px;object-fit:cover;border-radius:50%;background:#061022}
#p2gPortalShell .p2g-v17-person strong,#p2gPortalShell .p2g-v17-person small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:150px}
#p2gPortalShell .p2g-v17-person strong{font-size:13px}#p2gPortalShell .p2g-v17-person small{font-size:11px;color:#95aec7}
#p2gPortalShell .p2g-v17-banner{height:120px;border-radius:13px;background-image:linear-gradient(120deg,#32104f,#17285a,#0c4a66);background-position:center;background-size:cover;border:1px solid #639ada55}
#p2gPortalShell .p2g-v17-dm-card{text-align:center;margin-top:-25px;position:relative}
#p2gPortalShell .p2g-v17-dm-avatar{width:84px;height:84px;object-fit:cover;border-radius:50%;border:5px solid #111b36;background:#0b1128}
#p2gPortalShell .p2g-v17-dm-card h3{margin-top:7px;overflow-wrap:anywhere}
#p2gPortalShell .p2g-v17-message{display:flex;gap:11px;align-items:flex-start;margin-bottom:14px;padding:11px;border-radius:15px;background:#132647;border:1px solid #4a7ea82e;max-width:100%;overflow-wrap:anywhere}
#p2gPortalShell .p2g-v17-message.mine{background:#1c3161;border-color:#5882bd4d}
#p2gPortalShell .p2g-v17-msg-avatar{width:35px;height:35px;flex:0 0 35px;border-radius:50%;object-fit:cover}
#p2gPortalShell .p2g-v17-msg-main{min-width:0;flex:1}
#p2gPortalShell .p2g-v17-msg-main header{display:flex;flex-wrap:wrap;align-items:center;gap:5px 10px;margin-bottom:6px}
#p2gPortalShell .p2g-v17-msg-main header strong{font-size:13px;color:#e0f3ff}#p2gPortalShell .p2g-v17-msg-main header small{font-size:10px;color:#8ba9cf}
#p2gPortalShell .p2g-v17-msg-text{white-space:normal;line-height:1.5;font-size:13px}
#p2gPortalShell .p2g-v17-quote{border-left:3px solid #5dd5e9;padding:6px 8px;background:#07183083;margin-bottom:8px;color:#addbf2;font-size:11px;max-height:75px;overflow:hidden}
#p2gPortalShell .p2g-v17-msg-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
#p2gPortalShell .p2g-v17-msg-actions button{background:#16375b;border:1px solid #3f6f9d;border-radius:7px;padding:4px 8px;font-size:10px;color:#cfe8ff}
#p2gPortalShell .p2g-v17-msg-actions button:hover{background:#275889}
#p2gPortalShell .p2g-v17-typing{font-size:12px;color:#7fe3f7;min-height:20px;padding:2px 0}
#p2gPortalShell #p2gReplyPreview:not([hidden]){display:flex;justify-content:space-between;align-items:center;gap:8px;border-left:3px solid #30d6e7;background:#182e55;border-radius:7px;padding:8px 12px;font-size:11px;margin:5px 0}
#p2gPortalShell #p2gReplyPreview button{background:transparent;border:0;font-size:22px;line-height:1}
/* Kalender */
#p2gPortalShell .p2g-v17-calday{cursor:pointer;transition:background .15s ease}
#p2gPortalShell .p2g-v17-calday:hover,#p2gPortalShell .p2g-v17-calday:focus-visible{outline:1px solid #8adaff;background:#1b3f68}
#p2gPortalShell .p2g-v17-calday.ok{border-bottom:3px solid #24b887}
#p2gPortalShell .p2g-v17-calday.warn{border-bottom:3px solid #dba93f}
#p2gPortalShell .p2g-v17-calday.danger{border-bottom:3px solid #f15f79}
#p2gPortalShell .p2g-v17-cal-extra{background:#111f3c;border:1px solid #38689a70;border-radius:12px;padding:13px;margin-top:15px}
#p2gPortalShell #p2gCalAvailable{font-size:14px;margin-bottom:10px}
#p2gPortalShell #p2gCalSelected{padding:9px 0;font-size:13px}
/* Settings and full slider track at 100% */
#p2gPortalShell #p2gPrefGlow{appearance:none;-webkit-appearance:none;width:100%;height:10px;cursor:pointer;border:0;border-radius:50px;outline-offset:6px;background:linear-gradient(90deg,#05cdeb 0%,#7866f9 var(--filled,70%),#31436a var(--filled,70%),#31436a 100%);padding:0;min-height:10px;margin-top:16px}
#p2gPortalShell #p2gPrefGlow::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:19px;height:19px;background:#edfaff;border:3px solid #4edcff;border-radius:50%;box-shadow:0 0 10px #47d8ec80}
#p2gPortalShell #p2gPrefGlow::-moz-range-thumb{width:15px;height:15px;background:#edfaff;border:3px solid #4edcff;border-radius:50%}
#p2gPortalShell .p2g-v17-designstatus{display:grid;gap:5px;margin:16px 0;padding:13px;border:1px solid #315e88;background:#0e2140;border-radius:12px}
#p2gPortalShell .p2g-v17-designstatus>span,#p2gPortalShell .p2g-v17-designstatus small{color:#99b9d3;font-size:12px}
#p2gPortalShell .p2g-v17-designstatus strong{font-size:17px}
/* First-use walkthrough */
#p2gPortalShell .p2g-v17-intro:not([hidden]){position:fixed;inset:0;z-index:50000;background:#040b1ddb;backdrop-filter:blur(10px);display:grid;place-items:center;padding:20px}
#p2gPortalShell .p2g-v17-tour-card{width:min(520px,100%);min-height:330px;display:flex;flex-direction:column;gap:12px;padding:30px;background:radial-gradient(circle at 90% 8%,#3841a555,transparent 55%),linear-gradient(145deg,#13294a,#0b142e);border:1px solid #55a2e6;border-radius:22px;box-shadow:0 28px 90px #000b}
#p2gPortalShell .p2g-v17-tour-card>small{color:#99d9ff;font-size:12px}
#p2gPortalShell .p2g-v17-tour-progress{height:5px;background:#38bfe9;border-radius:10px;transition:width .2s ease}
#p2gPortalShell .p2g-v17-tour-icon{font-size:44px;color:#78dbf9;margin:6px 0}
#p2gPortalShell .p2g-v17-tour-card p{flex:1;color:#d2e4f6;line-height:1.6}
#p2gPortalShell .p2g-v17-tour-card .p2g-port-actions{justify-content:flex-end}
#p2gPortalShell .p2g-v17-tour-card .p2g-port-actions button:first-child{margin-right:auto}
@media(max-width:1200px){#p2gPortalShell .p2g-port-chat-layout{grid-template-columns:235px minmax(0,1fr)}#p2gPortalShell .p2g-v17-chat-sidebar{grid-column:2;height:auto!important;min-height:0!important;max-height:310px}}
@media(max-width:800px){#p2gPortalShell .p2g-v17-overview,#p2gPortalShell .p2g-v17-graphs{grid-template-columns:1fr}}
@media(max-width:760px){#p2gPortalShell .p2g-port-chat-layout{grid-template-columns:1fr}#p2gPortalShell .p2g-port-chat-layout>.p2g-port-panel{height:auto;min-height:0}#p2gPortalShell .p2g-port-chat-list{max-height:260px}#p2gPortalShell .p2g-port-chat-pane{min-height:530px!important}#p2gPortalShell .p2g-v17-chat-sidebar{grid-column:auto;max-height:300px}#p2gPortalShell .p2g-v17-overview .p2g-port-cards{grid-template-columns:1fr 1fr}#p2gPortalShell .p2g-v17-overview .p2g-port-card:last-child{grid-column:1/-1}#p2gPortalShell .p2g-v17-roles{display:grid;grid-template-columns:1fr 1fr}#p2gPortalShell .p2g-v17-roles>span{align-items:flex-start;flex-direction:column}#p2gPortalShell .p2g-v17-roles small{border:0;padding:0}#p2gPortalShell .p2g-v17-availability{display:grid}#p2gPortalShell .p2g-v17-availability span{text-align:left}}
@media(prefers-reduced-motion:reduce){#p2gPortalShell .p2g-v17-calday,#p2gPortalShell .p2g-v17-tour-progress{transition:none}}

#p2gPortalShell .p2g-v17-alert{margin-top:9px;padding:11px 12px;background:#4b1c33;border-left:4px solid #ff6079;border-radius:7px;color:#ffd9e0;font-weight:700;font-size:12px}
#p2gPortalShell .p2g-v17-alert.mild{background:#3c3021;border-color:#e7aa4a;color:#ffe9bf}
#p2gPortalShell .p2g-v17-date-filters{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:460px){#p2gPortalShell .p2g-v17-date-filters{grid-template-columns:1fr}}

/* V18: echte Teamzuordnung getrennt von globaler Entwicklerberechtigung. */
#p2gPortalShell .p2g-v18-developer-access{width:100%;flex-basis:100%;display:flex;align-items:center;gap:8px;padding:10px 13px;border:1px solid #5bcaea8a;background:linear-gradient(115deg,#112e4a,#142144);border-radius:12px;color:#b6efff;font-size:13px;font-weight:750;letter-spacing:.01em}
#p2gPortalShell .p2g-v18-bio{margin:12px auto 17px;padding:11px 13px;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere;border-radius:11px;background:#0f213b;border:1px solid #6385b84d;color:#d2e5fa;font-size:12px;line-height:1.6;text-align:left}
#p2gPortalShell #p2gDialogFields .p2g-v18-bio{max-width:480px;font-size:13px}


/* V19: Die Einfuehrung ist eine kleine, nicht blockierende Fuehrung statt eines Modals. */
#p2gPortalShell .p2g-v17-intro:not([hidden]){
 position:fixed;inset:auto 17px auto auto;top:91px;z-index:45000;
 width:min(430px,calc(100vw - 34px));max-height:calc(100dvh - 110px);
 display:block;place-items:unset;padding:0;background:none;backdrop-filter:none;
 overflow:visible;pointer-events:none;
}
#p2gPortalShell .p2g-v17-tour-card{
 box-sizing:border-box;width:100%;min-height:0;max-height:calc(100dvh - 112px);
 overflow-y:auto;padding:18px 20px;gap:8px;border:1px solid #79d6ff;
 border-radius:17px;background:linear-gradient(135deg,#132b51f5,#10162ef7);
 box-shadow:0 16px 45px #000a,0 0 22px #1cc5ec2d;
 pointer-events:auto;
}
#p2gPortalShell .p2g-v17-tour-card>small{font-size:11px;font-weight:800;letter-spacing:.5px}
#p2gPortalShell .p2g-v17-tour-progress{height:4px;flex-shrink:0}
#p2gPortalShell .p2g-v17-tour-icon{display:none}
#p2gPortalShell .p2g-v17-tour-card h2{margin:4px 0 0;font-size:19px}
#p2gPortalShell .p2g-v17-tour-card p{margin:0;font-size:13px;line-height:1.5;flex:0 0 auto}
#p2gPortalShell .p2g-v19-tour-hint{display:block;padding:8px 10px;
 border:1px solid #33779b;background:#0c273e;color:#c1ebff;
 border-radius:9px;line-height:1.45;font-size:12px;letter-spacing:0;font-weight:550}
#p2gPortalShell .p2g-v19-tour-hint.tested{border-color:#28b98e;color:#b1f9db;background:#0b332d}
#p2gPortalShell .p2g-v17-tour-card .p2g-port-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:6px;justify-content:flex-end}
#p2gPortalShell .p2g-v17-tour-card .p2g-port-actions button{min-height:36px;padding:8px 11px;font-size:12px}
#p2gPortalShell .p2g-v19-tour-arrow{position:fixed;z-index:45001;
 pointer-events:none;color:#8bebff;font-size:32px;font-weight:900;
 line-height:32px;text-shadow:0 0 8px #03d9ff,0 0 21px #348cff;
 animation:p2g-v19-pointer 1.2s ease-in-out infinite alternate}
#p2gPortalShell .p2g-v19-tour-target{
 position:relative!important;isolation:isolate;
 outline:2px solid #83eaff!important;outline-offset:2px;
 border-color:#8bebff!important;
 box-shadow:0 0 0 5px #31dcff22,0 0 17px 4px #0dd8ff90!important;
 animation:p2g-v19-glow 1.4s ease-in-out infinite alternate!important;
}
@keyframes p2g-v19-pointer{from{opacity:.6;filter:brightness(.9)}to{opacity:1;filter:brightness(1.3)}}
@keyframes p2g-v19-glow{from{box-shadow:0 0 0 3px #31dcff18,0 0 10px #0dd8ff66}to{box-shadow:0 0 0 6px #31dcff33,0 0 24px #0dd8ffaa}}
@media(max-width:760px){
 #p2gPortalShell .p2g-v17-intro:not([hidden]){top:74px;right:8px;width:min(380px,calc(100vw - 16px));max-height:calc(100dvh - 85px)}
 #p2gPortalShell .p2g-v17-tour-card{padding:13px 15px;gap:7px;max-height:calc(100dvh - 100px)}
 #p2gPortalShell .p2g-v17-tour-card h2{font-size:16px;margin:0}
 #p2gPortalShell .p2g-v17-tour-card p{font-size:12px}
 #p2gPortalShell .p2g-v19-tour-hint{font-size:11px;padding:7px}
 #p2gPortalShell .p2g-v17-intro.p2g-v19-menu-open{top:auto;bottom:10px;right:8px;width:min(380px,calc(100vw - 16px))}
 #p2gPortalShell .p2g-v17-intro.p2g-v19-menu-open .p2g-v17-tour-card{max-height:min(34dvh,220px)}
}
@media(prefers-reduced-motion:reduce){#p2gPortalShell .p2g-v19-tour-arrow,#p2gPortalShell .p2g-v19-tour-target{animation:none!important}}

#p2gPortalShell .p2g-v17-intro.p2g-v19-tried .p2g-v17-tour-card p{display:none}
#p2gPortalShell .p2g-v17-intro.p2g-v19-tried .p2g-v19-tour-hint{padding:6px 9px}
