/* Discord invitation: picture-first so new and young players get it at a glance. */
html body dialog.academy-community{box-sizing:border-box;position:fixed;inset:0;width:min(980px,calc(100vw - 28px));max-width:none;max-height:calc(100dvh - 24px);margin:auto;padding:42px 46px 38px;overflow:auto;border:1px solid #d4b97b;border-radius:26px;color:#f4e5c0;background:radial-gradient(ellipse at 18% 30%,#8a62b066,transparent 58%),linear-gradient(135deg,#382646,#20192e);box-shadow:inset 0 0 0 5px #22182f,inset 0 0 0 6px #ad8b6655,0 24px 70px #0009;font:14px/1.35 system-ui}
html body dialog.academy-community[open]{display:grid;grid-template-columns:.8fr 1.2fr;gap:36px;align-items:center}.academy-community::backdrop{background:#110d20bb;backdrop-filter:blur(5px)}
.academy-community :focus-visible{outline:2px solid #f1d79e;outline-offset:3px}
html body .academy-community .community-close{position:absolute;right:12px;top:10px;z-index:2;width:36px;height:36px;min-height:36px;padding:0;border:0;border-radius:50%;box-shadow:none;background:none;color:#e9d7f3;font:28px/1 system-ui;cursor:pointer}
html body .academy-community .community-close:hover{background:#ffffff14}
.community-keepsake{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:0;text-align:center;padding:18px 8px;border-radius:20px;background:radial-gradient(ellipse at 50% 45%,#c9a2f040,transparent 68%)}
.community-seal{display:inline-block;padding:6px 16px;border-radius:999px;background:linear-gradient(#f7dc95,#d1a74f);color:#3a2610;font:900 15px/1 Georgia,serif;letter-spacing:.08em;box-shadow:0 3px #7b5a26,0 6px 16px #0006;transform:rotate(-4deg)}
.community-hat{width:100%;max-width:340px;margin:4px 0 -6px;filter:drop-shadow(0 14px 14px #120a20);animation:community-float 4s ease-in-out infinite}.community-hat svg{display:block;width:100%;height:auto}
.community-keepsake>strong{font:700 26px Georgia,serif;color:#ffe8af}
.community-message{min-width:0;display:flex;flex-direction:column}
.community-message h2{font:700 clamp(28px,3.3vw,42px)/1.08 Georgia,serif;margin:0 0 24px;color:#ffe8af;text-shadow:0 3px #140c22}
.community-steps{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:22px;margin:0 0 26px;padding:0;counter-reset:step}
.community-steps li{position:relative;display:flex;flex-direction:column;align-items:center;gap:8px;text-align:center;counter-increment:step}
.community-steps li+li::before{content:'';position:absolute;left:-17px;top:35px;width:12px;height:12px;border-top:3px solid #d9b96c;border-right:3px solid #d9b96c;transform:rotate(45deg);opacity:.8}
.community-step-icon{position:relative;display:grid;place-items:center;width:74px;height:74px;border-radius:20px;background:linear-gradient(#4b3560,#2c2039);border:1px solid #c0a27188;box-shadow:inset 0 0 0 2px #24192f,0 4px #160f20;color:#f3e3bb}
.community-step-icon::after{content:counter(step);position:absolute;left:-8px;top:-8px;display:grid;place-items:center;width:24px;height:24px;border-radius:50%;background:linear-gradient(#f7dc95,#d1a74f);color:#3a2610;font:900 13px/1 system-ui;box-shadow:0 2px #7b5a26}
.community-step-icon svg{width:38px;height:38px}.community-step-discord{background:linear-gradient(#7d79f4,#4c50c9);color:#fff}.community-step-hat svg{width:62px;height:62px}
.community-steps b{font:700 15px/1.15 system-ui;color:#f1e2c4}
html body .academy-community a.community-join{display:flex;align-items:center;justify-content:center;gap:12px;min-height:74px;padding:12px 22px;border:2px solid #c9cbff;border-bottom:6px solid #33348a;border-radius:18px;background:linear-gradient(#7c78f6,#4d50cc);color:#fff;font:900 27px/1 system-ui;text-decoration:none;box-shadow:0 8px 26px #4d52cc66;cursor:pointer;transition:transform .15s,filter .15s;animation:community-pulse 2.6s ease-in-out infinite}
html body .academy-community a.community-join svg{width:34px;height:34px;flex:none}
html body .academy-community a.community-join:hover{transform:translateY(-2px);filter:brightness(1.1)}html body .academy-community a.community-join:active{transform:translateY(2px);border-bottom-width:3px}
.community-actions{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-top:14px}
html body .academy-community .community-redeem{margin:0;flex:1;min-width:0;font-size:13px;color:#d5c0e4}
html body .academy-community .community-redeem summary{display:inline-block;list-style:none;cursor:pointer;padding:6px 2px;background:none;border:0;box-shadow:none;color:#e6cf97;font:700 14px system-ui;text-decoration:underline;text-underline-offset:4px}
.community-redeem summary::-webkit-details-marker{display:none}
.community-redeem form{margin:0}.community-redeem label{display:block;margin:6px 0 5px;color:#cdb9dc;font-size:12px}.community-redeem form>div{display:flex;gap:8px}
.community-redeem input{min-width:0;width:100%;background:#171120;border:1px solid #ad8fc4;border-radius:10px;color:#f8e5b7;padding:9px 10px;font:15px system-ui}
html body .academy-community .community-redeem button,html body .academy-community .community-equip{cursor:pointer;white-space:nowrap;min-height:40px;padding:8px 16px;border:1px solid #c2a675;border-radius:11px;background:linear-gradient(#f2d48b,#c99a45);color:#3a2610;font:800 14px system-ui;box-shadow:0 3px #6f5122}
html body .academy-community .community-redeem button:disabled{opacity:.7;cursor:default}
html body .academy-community .community-later{flex:none;cursor:pointer;padding:6px 4px;min-height:0;border:0;background:none;box-shadow:none;color:#bfaecd;font:600 14px system-ui;text-decoration:underline;text-underline-offset:4px}
html body .academy-community .community-later:hover{color:#efe0f8}
.community-status:empty{display:none}.community-status{margin:10px 0 0;font-size:13px;color:#9be7cf}.community-equip{margin-top:8px}
.academy-community:has(.community-redeem[open]) .community-later{display:none}
@keyframes community-float{50%{transform:translateY(-7px) rotate(-2deg)}}
@keyframes community-pulse{0%,100%{box-shadow:0 8px 26px #4d52cc66}50%{box-shadow:0 8px 34px #7c78f6aa,0 0 0 4px #7c78f633}}
@media(max-height:500px){html body dialog.academy-community{width:min(820px,calc(100vw - 20px));max-height:calc(100dvh - 16px);padding:16px 22px;overflow:hidden}html body dialog.academy-community[open]{gap:18px;grid-template-columns:.62fr 1.38fr}.community-keepsake{padding:8px 4px}.community-hat{max-width:190px}.community-seal{font-size:12px;padding:5px 12px}.community-keepsake>strong{font-size:19px}.community-message h2{font-size:24px;margin:0 0 10px}.community-steps{gap:18px;margin:0 0 12px}.community-steps li{gap:5px}.community-steps li+li::before{top:20px;left:-14px;width:9px;height:9px}.community-step-icon{width:46px;height:46px;border-radius:13px}.community-step-icon svg{width:26px;height:26px}.community-step-hat svg{width:44px;height:44px}.community-step-icon::after{width:19px;height:19px;font-size:11px;left:-6px;top:-6px}.community-steps b{font-size:12px}html body .academy-community a.community-join{min-height:50px;font-size:19px;padding:8px 16px;border-radius:14px}html body .academy-community a.community-join svg{width:26px;height:26px}.community-actions{margin-top:6px}html body .academy-community .community-redeem summary,html body .academy-community .community-later{font-size:13px;padding:4px 2px}.community-redeem label{display:none}.community-redeem form{margin-top:4px}.community-redeem input{padding:7px 9px;font-size:14px}html body .academy-community .community-redeem button{min-height:36px;padding:6px 12px;font-size:13px}.academy-community:has(.community-redeem[open]) .community-steps{display:none}.community-status{margin:6px 0 0;font-size:12px}html body .academy-community .community-equip{min-height:32px;padding:5px 12px;margin-top:4px}}
@media(max-width:480px) and (orientation:portrait){html body dialog.academy-community[open]{grid-template-columns:1fr;gap:10px}.community-hat{max-width:150px}.community-steps{gap:12px}.community-step-icon{width:50px;height:50px}}
@media(prefers-reduced-motion:reduce){.community-hat,html body .academy-community a.community-join{animation:none;transition:none}}
