/*
 * VZR Christmas v2, refreshed: HOME page skin for the gaming layer (hero, status card, chat, command card, quest log).
 * The lobby board is in xmas2-board.css, the two charts in xmas2-charts.css. Loaded after xmas2-base.css.
 */

/* ---------- hero frame ---------- */
body.g2.xmas2 .hero-command.g2-hero {
  background:
    radial-gradient(60% 90% at 50% 0, rgba(var(--g2-glow), .30), transparent 72%),
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 80px),
    linear-gradient(90deg, rgba(8, 12, 34, .84), rgba(10, 15, 40, .62) 50%, rgba(8, 12, 34, .84));
  box-shadow: inset 0 0 0 1px rgba(190, 224, 255, .10), inset 0 0 44px rgba(var(--g2-glow), .18), 0 20px 46px rgba(0, 0, 0, .6), 0 0 0 1px rgba(0, 0, 0, .55);
}
body.g2.xmas2 .hero-command.g2-hero::after {
  background: linear-gradient(140deg, #fff0c4 0, #b9965a 16%, #6479ad 34%, #cde7ff 50%, #6479ad 66%, #b9965a 84%, #fff0c4 100%);
}
body.g2.xmas2 .g2-hero-sky::before {
  content: ""; position: absolute; left: 26px; right: 26px; top: 0; height: 5px; border-radius: 0 0 6px 6px; background: var(--xm-candy); opacity: .95;
}
body.g2.xmas2 .g2-stars { filter: hue-rotate(-30deg) brightness(1.1); }

/* ---------- title column: Santa hat on the portal badge, icy glow on the words ---------- */
/* the winter wordmark (tools/make_wordmark.py) is 900 x 150, the live one 900 x 121: same lettering, room for the icicles. Glow as strong as the live violet one. */
body.g2.xmas2 .g2-wordmark { aspect-ratio: 900 / 150; height: auto; max-height: none; object-fit: contain; filter: drop-shadow(0 4px 18px rgba(var(--g2-glow), .8)) drop-shadow(0 0 3px rgba(190, 226, 255, .55)) drop-shadow(0 2px 0 rgba(0, 0, 0, .6)); }
body.g2.xmas2 .g2-title-sub { color: #ffe4a8; }
body.g2.xmas2 .g2-title-sub::before, body.g2.xmas2 .g2-title-sub::after { background: linear-gradient(90deg, transparent, #cde7ff); }
body.g2.xmas2 .g2-badge {
  position: relative; overflow: visible; border: 3px solid transparent; border-radius: 999px;
  background: linear-gradient(180deg, #b01a33, #650d1f) padding-box, repeating-linear-gradient(-45deg, #e3203f 0 6px, #fff8f2 6px 12px) border-box;
  color: #fff6e4; box-shadow: 0 8px 22px rgba(217, 38, 63, .36), 0 0 0 1px rgba(0, 0, 0, .35); text-shadow: 0 1px 2px #0008;
}
body.g2.xmas2 .g2-hero-copy > .g2-badge { margin-top: 28px; }   /* room for the hat, so it never sits on the subtitle */
body.g2.xmas2 .g2-badge span { color: #fff1b8; text-shadow: 0 0 10px #ffd870; }
body.g2.xmas2 .g2-badge::before {
  content: ""; position: absolute; left: -12px; top: -27px; width: 46px; height: 38px; pointer-events: none;
  background: url("art/santa-hat.svg") no-repeat center / contain; transform: rotate(-16deg); transform-origin: 20% 90%;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .45));
}
body.g2.xmas2 .home-pitch { color: #f7f0e4; }
body.g2.xmas2 .home-board-note { color: var(--xm-ice); }
body.g2.xmas2 .home-board-note::after { color: var(--xm-gold); }

/* ---------- "How to join" card ---------- */
body.g2.xmas2 .g2-qcard {
  border-color: rgba(241, 206, 134, .45);
  background: linear-gradient(180deg, rgba(34, 46, 102, .9), rgba(12, 17, 44, .94));
  box-shadow: inset 0 0 0 1px rgba(190, 224, 255, .08), inset 0 0 26px rgba(120, 180, 255, .08), 0 6px 14px rgba(0, 0, 0, .4);
}
body.g2.xmas2 .g2-qmark, body.g2.xmas2 .g2-qcard .g2-qmark {
  color: #fff0c4; border-color: #e1be78; text-shadow: 0 0 12px rgba(255, 210, 63, .9), 0 2px 0 #3a0912;
  background: radial-gradient(circle at 35% 30%, #d9263f, #5c0b1a); box-shadow: 0 0 18px rgba(255, 90, 110, .4), inset 0 0 8px rgba(0, 0, 0, .7);
}
body.g2.xmas2 .g2-quest.is-notice .g2-qmark {
  color: #eaf6ff; border-color: #a9d6ff; text-shadow: 0 0 14px rgba(170, 214, 255, .9), 0 2px 0 #08173a;
  background: radial-gradient(circle at 35% 30%, #35508f, #0d1840); box-shadow: 0 0 18px rgba(130, 190, 255, .35), inset 0 0 8px rgba(0, 0, 0, .8);
}
body.g2.xmas2 .g2-objectives li::before { border-color: #e1be78; background: linear-gradient(180deg, #b01a33, #5c0b1a); color: #fff0c4; }
body.g2.xmas2 .g2-qcard h3, body.g2.xmas2 .g2-objectives b { color: #ffe0a0; }
body.g2.xmas2 .g2-qfoot { border-top-color: rgba(169, 214, 255, .25); color: #cfdcee; }

/* ---------- lobby status card: snow on the top edge ---------- */
body.g2.xmas2 .g2-unit {
  border-color: rgba(169, 214, 255, .55);
  background: linear-gradient(180deg, rgba(30, 42, 96, .94), rgba(8, 12, 34, .96));
  box-shadow: inset 0 0 0 1px rgba(190, 224, 255, .10), inset 0 0 28px rgba(110, 170, 250, .14), 0 10px 22px rgba(0, 0, 0, .55);
}
body.g2.xmas2 .g2-unit::before {
  content: ""; position: absolute; left: 6px; right: 6px; top: -9px; height: 16px; z-index: 1; pointer-events: none;
  background: url("art/snowcap.svg") repeat-x 0 0 / 120px 16px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .35));
}
body.g2.xmas2 .g2-unit-host { color: #cfe0f6; }
/* the two bars: a lit glass track that stands out from the card, glossy fills, labels that stay readable on any fill */
body.g2.xmas2 .g2-unit-bar {
  height: 23px; border-radius: 7px; border-color: #9ccbff;
  background: linear-gradient(180deg, #223584 0, #16246a 55%, #0f1a52 100%);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .08), 0 0 0 1px rgba(6, 10, 38, .95), 0 0 12px rgba(110, 170, 250, .35);
}
body.g2.xmas2 .g2-unit-fill { border-radius: 6px 0 0 6px; }
body.g2.xmas2 .g2-unit-hp:not([data-level="low"]):not([data-level="high"]) .g2-unit-fill {
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .16) 0 5px, rgba(255, 255, 255, 0) 5px 10px),
    linear-gradient(180deg, #a9f2cf 0, #35bd82 36%, #12815a 100%);
  box-shadow: 0 0 10px rgba(80, 220, 170, .5), inset 0 -2px 3px rgba(0, 60, 40, .35);
}
body.g2.xmas2 .g2-unit-mp:not([data-level="soon"]):not([data-level="urgent"]):not([data-level="idle"]) .g2-unit-fill {
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, .14) 0 5px, rgba(255, 255, 255, 0) 5px 10px),
    linear-gradient(180deg, #e8f7ff 0, #6dbcf8 36%, #2c70d8 100%);
  box-shadow: 0 0 10px rgba(110, 190, 255, .55), inset 0 -2px 3px rgba(10, 40, 110, .35);
}
body.g2.xmas2 .g2-unit-hp::after {
  background: repeating-linear-gradient(90deg, transparent 0, transparent calc(100% / var(--segs, 12) - 3px), rgba(12, 20, 62, .96) calc(100% / var(--segs, 12) - 3px), rgba(12, 20, 62, .96) calc(100% / var(--segs, 12)));
}
body.g2.xmas2 .g2-unit-bar-label { text-shadow: 0 1px 0 rgba(3, 10, 34, .95), 0 0 4px rgba(3, 10, 34, .95), 0 0 8px rgba(3, 10, 34, .7); }
body.g2.xmas2 .g2-unit-bar-label .k, body.g2.xmas2 .g2-unit-bar-label .v { color: #fff; }
body.g2.xmas2 .g2-upkeep { border-color: #52c78a; background: linear-gradient(180deg, rgba(20, 78, 52, .95), rgba(8, 40, 28, .95)); color: #bff7d8; }
body.g2.xmas2 .g2-unit-food { border-top-color: rgba(169, 214, 255, .2); }
body.g2.xmas2 .g2-unit-phase { background: linear-gradient(180deg, rgba(var(--pc-rgb), .34), rgba(var(--pc-rgb), .12)), #080d28; }

/* ---------- tip strip ---------- */
body.g2.xmas2 .g2-tipbar { border-top-color: rgba(241, 206, 134, .4); background: linear-gradient(180deg, rgba(6, 9, 26, .6), rgba(6, 9, 26, .92)); }
body.g2.xmas2 .g2-tipbar-src { color: #bcd8f6; border-bottom-color: rgba(188, 216, 246, .55); }
body.g2.xmas2 .g2-tipbar-btn { border-color: rgba(241, 206, 134, .5); background: linear-gradient(180deg, #243166, #101738); }
body.g2.xmas2 .g2-tipbar-timer { background: linear-gradient(90deg, var(--xm-red), #ffd23f); }

/* ---------- lobby chat ---------- */
body.g2.xmas2 .mk-chat-head { border-bottom-color: rgba(169, 214, 255, .26); }
body.g2.xmas2 .mk-fs-btn { border-color: rgba(241, 206, 134, .5); background: linear-gradient(180deg, #243166, #101738); border-radius: 999px; }
body.g2.xmas2 .mk-chat-log {
  border-color: rgba(169, 214, 255, .3); background: linear-gradient(180deg, rgba(14, 22, 58, .94), rgba(8, 13, 38, .96));
  box-shadow: inset 0 0 0 1px rgba(190, 224, 255, .08), inset 0 8px 20px rgba(0, 0, 0, .45); scrollbar-color: #3c63a8 #0b1230;
}
body.g2.xmas2 .mk-msg { --src: #ff9fb0; }
body.g2.xmas2 .mk-msg[data-source="browser"] { --src: #4fd1c5; }
body.g2.xmas2 .mk-msg[data-source="phone"] { --src: #f08cff; }
body.g2.xmas2 .mk-msg:has(.mk-who.lobby) { --src: #7ebff1; }
body.g2.xmas2 .mk-msg:has(.mk-who.bot) { --src: #6ff59d; }
body.g2.xmas2 .mk-who.lobby { color: #7ebff1; }
body.g2.xmas2 .mk-when { color: #8fa4c4; }
body.g2.xmas2 .mk-txt { color: #e8eef7; }
body.g2.xmas2 .mk-typing { color: #a9c6e6; }
body.g2.xmas2 .mk-gate-note { border-color: rgba(241, 206, 134, .5); background: linear-gradient(180deg, #1d2756, #0f1636); color: #dbe6f4; }
body.g2.xmas2 .mk-chat.is-verified:not(.is-connected) .mk-gate-note { color: #bdf0cf; border-color: #3f8a5c; }
body.g2.xmas2 .mk-compose input { border-color: rgba(241, 206, 134, .5); background: #070b22; }
body.g2.xmas2 .mk-emoji-btn { border-color: rgba(241, 206, 134, .5); background: linear-gradient(180deg, #243166, #101738); }
body.g2.xmas2 .mk-emoji-panel { border-color: rgba(241, 206, 134, .5); background: linear-gradient(180deg, #17214d, #0a0f2a); }
body.g2.xmas2 .mk-connected-list { border-color: rgba(169, 214, 255, .3); background: linear-gradient(180deg, #0e1536, #070b22); }
body.g2.xmas2 .mk-connected-nick { color: #ffb3c0; }
body.g2.xmas2 .mi-chat.is-fullscreen { background: linear-gradient(180deg, #1e2a5a 0, #080c22 220px); }
body.g2.xmas2 .saved-pop p, body.g2.xmas2 .lobby-hold-pop .lobby-hold-note { background: var(--g2-frame); color: #fff0c4; }

/* ---------- command card: wrapped gifts ---------- */
body.g2.xmas2 .g2-cmdgrid { background: linear-gradient(180deg, #0e1536, #070b22); border-color: rgba(169, 214, 255, .3); box-shadow: inset 0 3px 14px rgba(0, 0, 0, .75), inset 0 0 0 1px rgba(190, 224, 255, .06); }
body.g2.xmas2 .g2-cmd-face {
  background:
    radial-gradient(circle at 35% 22%, rgba(255, 255, 255, .22), transparent 52%) padding-box,
    linear-gradient(180deg, #3d5aa4, #15214f 72%) padding-box,
    linear-gradient(145deg, #fff0c4, #8b6b3a 45%, #e8c685) border-box;
}
body.g2.xmas2 .g2-cmd-face:not(.is-portrait)::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 43%, rgba(227, 32, 63, .30) 43% 57%, transparent 57%),
    linear-gradient(0deg, transparent 43%, rgba(227, 32, 63, .26) 43% 57%, transparent 57%);
}
body.g2.xmas2 .g2-cmd-face .g2-ico { position: relative; z-index: 1; }
body.g2.xmas2 .g2-cmd-hint span { color: var(--xm-gold); }

/* ---------- quest log ---------- */
body.g2.xmas2 .g2-quests {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), transparent 90px) padding-box,
    linear-gradient(180deg, #1c2858, #0d1336) padding-box,
    linear-gradient(140deg, #fff0c4 0, #b9965a 20%, #6479ad 40%, #cde7ff 60%, #fff0c4 100%) border-box;
}
body.g2.xmas2 .g2-quest {
  border-color: rgba(241, 206, 134, .45); background: linear-gradient(180deg, #243166, #111839);
  box-shadow: inset 0 0 0 1px rgba(190, 224, 255, .08), inset 0 0 26px rgba(120, 180, 255, .08), 0 6px 14px rgba(0, 0, 0, .4);
}
body.g2.xmas2 .g2-quest p { color: #e4ecf8; }
body.g2.xmas2 .g2-quest h4 { color: #ffe0a0; }

/* ---------- alert banner keeps its red; add a little frost ---------- */
body.g2.xmas2 .g2-alert { border-color: #ff8a9a; }

/* Phone: the lobby card and the command card stay on the page, the same winter objects as on a wide screen. */
body.g2.xmas2 .g2-cmdpanel { display: flex; }
@media (max-width: 800px) {
  body.g2.xmas2 #g2Unit { display: grid !important; }
  body.g2.xmas2 .g2-cmdgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
