.webgift-modal { display:none; position:fixed; inset:0; z-index:10020; padding:24px; align-items:center; justify-content:center; }
.webgift-modal.open { display:flex; }
.webgift-backdrop { position:absolute; inset:0; z-index:0; background:rgba(4,8,14,.78); backdrop-filter:blur(8px); }
.webgift-dialog { position:relative; width:min(1060px,100%); max-height:calc(100dvh - 48px); overflow:auto; color:var(--modern-text,#f3f6f8); background:var(--modern-surface,#0b141e); border:1px solid var(--modern-line-strong,#42617a); border-radius:6px; padding:24px; box-shadow:0 20px 90px #0009; }
.webgift-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.webgift-dialog { z-index:1; isolation:isolate; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) { width:min(1840px,calc(100vw - 48px)); height:calc(100dvh - 48px); }
.webgift-dialog-head h2 { margin:0; font-size:23px; color:var(--modern-gold,#f4c86f); }
.webgift-dialog-head button { border:1px solid #aa8650; border-radius:8px; color:inherit; background:#202c39; padding:8px 16px; cursor:pointer; }
.webgift-header-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.webgift-nightfall-logo { display:none; pointer-events:none; }
.webgift-dialog-head [data-web-gifts-refresh] { border-color:var(--modern-line-strong,#42617a); }
@media(max-width:600px) { .webgift-modal { padding:8px; } .webgift-dialog { padding:12px; max-height:calc(100dvh - 16px); } }
@media(max-width:600px) { .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) { width:100%; height:calc(100dvh - 16px); } }
body.webgift-modal-open { overflow:hidden; }
.webgift-dialog .webgift-shell { border:0; background:transparent; padding:0; }
.webgift-dialog .webgift-shell > h2 { display:none; }
.skin-reborn .webgift-dialog { --modern-surface:var(--skin-ground,#10181e); --modern-surface-raised:var(--skin-panel,#171f26); --modern-text:var(--skin-ink,#e9e6de); --modern-gold:var(--skin-gold,#dfb970); --modern-muted:var(--skin-muted,#b2b7c0); --modern-border:var(--skin-line,#35404a); }
.skin-reborn .webgift-dialog h2,.skin-reborn .webgift-dialog h3,.skin-reborn .webgift-dialog h4 { font-family:'Reborn Serif Thai',Georgia,serif; font-weight:500; }
.webgift-body > .webgift-button { color:#201b12; background:var(--modern-gold,#dfb970); border-color:var(--modern-gold,#dfb970); }
.webgift-body > .webgift-button:hover:not(:disabled) { color:#201b12; background:#edcf97; }
@media(min-width:921px) {
  body.skin-reborn.design-modern-command-center.layout-cohesive-v1 .top-nav:has([data-nav-item="Daily"]) { gap:4px; width:100%; min-width:0; }
  body.skin-reborn.design-modern-command-center.layout-cohesive-v1 .top-nav:has([data-nav-item="Daily"]) .nav-tab { min-width:0; width:auto; flex:0 0 auto; padding:13px 7px; }
  body.skin-reborn.design-modern-command-center.layout-cohesive-v1 .top-nav:has([data-nav-item="Daily"]) .nav-tab span { overflow:visible; text-overflow:clip; white-space:nowrap; }
}

/* Selected Nightfall concept. Decoration and typography apply only to Daily. */
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) {
  padding:16px 32px;
  background-color:#0b1520;
  background-image:none;
}
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"])::before { content:""; position:absolute; z-index:-1; inset:0 0 auto; height:290px; background:url("assets/nightfall-header-r1.png") center 25%/cover no-repeat; pointer-events:none; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-dialog-head { margin-bottom:10px; align-items:flex-start; min-height:50px; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-dialog-head h2 { font-size:40px; line-height:1.18; color:#e5c186; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-header-actions { padding-top:2px; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-nightfall-logo { display:block; position:absolute; top:101px; right:32px; width:216px; height:auto; opacity:.78; filter:grayscale(1) brightness(1.65); }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-note { font-size:.83rem; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-tabs { margin:14px 0 22px; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-tabs .webgift-button { min-height:45px; padding:9px 18px; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-message:empty { min-height:0; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-message:not(:has(button)):not(:has(span:not(:empty))) { display:none; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-daily-header { margin-top:0; margin-bottom:10px; min-height:75px; align-items:flex-end; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-daily-header h3 { font-size:27px; line-height:1.25; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-daily-progress { margin:6px 0 4px; line-height:1.5; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-premium-chooser { max-width:240px; width:240px; }
.webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-premium-hint { background:rgba(16,27,44,.84); padding:9px 12px; margin-bottom:14px!important; }
@media(max-width:900px) {
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) { padding:22px; background-size:auto 300px; background-position:right top; }
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"])::before { background-position:60% 40%; }
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-nightfall-logo { width:160px; right:22px; }
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-dialog-head h2 { font-size:32px; }
}
@media(max-width:600px) {
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) { padding:14px; }
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-nightfall-logo { display:none; }
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-dialog-head h2 { font-size:26px; }
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-header-actions { flex-direction:column; align-items:flex-end; }
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-dialog-head button { font-size:12px; padding:7px 10px; }
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-tabs { margin:16px 0 20px; }
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-premium-chooser { width:100%; max-width:none; }
 .webgift-dialog:has(.webgift-tabs > button:first-child[aria-current="page"]) .webgift-daily-header { align-items:stretch; min-height:0; }
}
