/* Christmas layer v2 (see christmas.js). Everything is scoped to html.xmas / html.xm-*, so removing the class removes the look. */
.xm-garland{position:fixed;left:0;right:0;top:0;z-index:49;height:72px;pointer-events:none;overflow:hidden;animation:xmIn .8s ease both;transition:opacity .35s}
.xm-garland.xm-away{opacity:0}
.xm-svg{display:block}
.xm-b0{animation:xmTw 2.6s ease-in-out infinite}.xm-b1{animation:xmTw 3.3s ease-in-out infinite}.xm-b2{animation:xmTw 2.9s ease-in-out infinite}.xm-b3{animation:xmTw 3.7s ease-in-out infinite}
@keyframes xmTw{0%,100%{opacity:1}50%{opacity:.5}}
@keyframes xmIn{from{opacity:0;transform:translateY(-12px)}}
.xm-swing{transform-origin:0 0;animation:xmSw 4.2s ease-in-out infinite alternate}
@keyframes xmSw{from{transform:rotate(-5deg)}to{transform:rotate(5deg)}}
.xm-snow{position:fixed;left:0;top:0;z-index:60;pointer-events:none}
.xm-toggle{position:fixed;right:14px;bottom:14px;z-index:70;width:42px;height:42px;display:grid;place-items:center;padding:0;border-radius:50%;background:var(--bg2,#151517);border:1px solid var(--line,#28282c);color:#9fb6c9;cursor:pointer;transition:color .15s,border-color .15s}
.xm-toggle:hover{color:#fff;border-color:#4a5a68}.xm-toggle[aria-pressed=true]{color:#cfe8ff;border-color:#3b5266}
@media(max-width:1100px){.xm-toggle{bottom:calc(74px + env(safe-area-inset-bottom,0px));right:12px;width:40px;height:40px}}

/* santa hat on the logo (colour follows the site design) */
html.xm-hat .logo{position:relative;overflow:visible}
html.xm-hat .logo::before{content:"";position:absolute;left:-13px;top:-15px;width:30px;height:27px;pointer-events:none;transform:rotate(-16deg);background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 54'%3E%3Cpath d='M8 40C10 18 24 4 44 6c-6 6-4 14 2 22 4 5 7 9 8 12z' fill='%23c62828'/%3E%3Cpath d='M8 40C12 22 24 10 40 8c-8 8-9 20-4 32z' fill='%23e53935' opacity='.55'/%3E%3Crect x='4' y='36' width='54' height='13' rx='6.5' fill='%23f5f7fa'/%3E%3Ccircle cx='46' cy='7' r='6.5' fill='%23f5f7fa'/%3E%3C/svg%3E") no-repeat center/contain}
html.xm-hat body.site-ge-anime .logo::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 54'%3E%3Cpath d='M8 40C10 18 24 4 44 6c-6 6-4 14 2 22 4 5 7 9 8 12z' fill='%23d6497f'/%3E%3Cpath d='M8 40C12 22 24 10 40 8c-8 8-9 20-4 32z' fill='%23f48fb1' opacity='.55'/%3E%3Crect x='4' y='36' width='54' height='13' rx='6.5' fill='%23f5f7fa'/%3E%3Ccircle cx='46' cy='7' r='6.5' fill='%23f5f7fa'/%3E%3C/svg%3E")}
html.xm-hat body.site-en-anime .logo::before{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 54'%3E%3Cpath d='M8 40C10 18 24 4 44 6c-6 6-4 14 2 22 4 5 7 9 8 12z' fill='%232f78b7'/%3E%3Cpath d='M8 40C12 22 24 10 40 8c-8 8-9 20-4 32z' fill='%236db3ea' opacity='.55'/%3E%3Crect x='4' y='36' width='54' height='13' rx='6.5' fill='%23f5f7fa'/%3E%3Ccircle cx='46' cy='7' r='6.5' fill='%23f5f7fa'/%3E%3C/svg%3E")}
html.xmas .top{border-bottom-color:#4b1b1f}
html.xmas body.site-ge-anime .top{border-bottom-color:#4a2330}
html.xmas body.site-en-anime .top{border-bottom-color:#1f3a42}

/* snow on poster cards: the white cap follows the rounded corners of the picture */
html.xm-cards .grid>.card::before,html.xm-cards .rail .card::before{content:"";position:absolute;left:0;right:0;top:0;height:12px;z-index:3;pointer-events:none;border-radius:var(--r,6px) var(--r,6px) 0 0;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='12' viewBox='0 0 36 12'%3E%3Cpath d='M0 0h36v5c-3 0-4 4-7 4s-4-3-7-3-4 6-8 6-5-5-9-5-3 3-5 3z' fill='%23f4f8fc'/%3E%3C/svg%3E") repeat-x top left/36px 12px;opacity:.95}

/* snow drift along the bottom of the home banner */
html.xm-hero .hero::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:20px;z-index:4;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='20' viewBox='0 0 120 20'%3E%3Cpath d='M0 20V10c10-8 20-8 30 0s20 8 30 0 20-8 30 0 20 6 30 0v10z' fill='%230e0e10'/%3E%3Cpath d='M0 20v-5c10-7 20-7 30 0s20 7 30 0 20-7 30 0 20 5 30 0v5z' fill='%23eef3f8' opacity='.9'/%3E%3C/svg%3E") repeat-x bottom left/120px 20px}

/* snow bank on the footer + greeting (text comes from Admin -> Settings -> New Year design) */
html.xm-foot .foot{position:relative;margin-top:26px;border-top-color:transparent}
html.xm-foot .foot::before{content:"";position:absolute;left:0;right:0;top:-17px;height:18px;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='18' viewBox='0 0 120 18'%3E%3Cpath d='M0 18V9c10-8 20-8 30 0s20 8 30 0 20-8 30 0 20 6 30 0v9z' fill='%23eef3f8'/%3E%3C/svg%3E") repeat-x bottom left/120px 18px}
html.xm-foot .foot .wrap::after{content:var(--xm-greet,"");display:block;margin-top:12px;color:#d7e6f4;font-weight:600;letter-spacing:.01em}

@media(max-width:700px){html.xm-hat .logo::before{width:24px;height:21px;left:-6px;top:-7px}.xm-garland{height:52px}}
@media(prefers-reduced-motion:reduce){.xm-b0,.xm-b1,.xm-b2,.xm-b3,.xm-swing,.xm-garland{animation:none}}
