/* Escape Verse - The December Dilemma (family advent calendar). Everything lives under #nx-advent. */
#nx-advent { --na-green: #1F6B4A; --na-red: #C8102E; --na-gold: #E8B84A; --na-cream: #FFF8EC; --na-ink: #2B2420;
  position: fixed; inset: 0; z-index: 99995; display: none; overflow: hidden; color: var(--na-ink); font-family: 'Manrope', system-ui, sans-serif; }
#nx-advent.is-open { display: block; }
#nx-advent button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; box-shadow: none; text-transform: none; letter-spacing: normal; border-radius: 0; min-height: 0; line-height: inherit; }
#nx-advent img { max-width: none; }
.na-bg { position: absolute; inset: -20px; background: center / cover no-repeat; filter: blur(3px) saturate(1.05); transform: scale(1.04); }
#nx-advent::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(20,40,60,.15), rgba(10,30,45,.55)); pointer-events: none; }
.na-snow { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.na-snow i { position: absolute; top: -10px; width: 8px; height: 8px; border-radius: 50%; background: #fff; filter: blur(.5px); animation: naSnow linear infinite; }
@keyframes naSnow { to { top: 105%; margin-left: 40px; } }
.na-wrap { position: relative; z-index: 3; height: 100%; display: grid; grid-template-columns: auto minmax(280px, 380px); justify-content: center; align-items: center; gap: clamp(20px, 4vw, 60px); padding: 3vh 24px; }
.na-cal { position: relative; height: 94vh; aspect-ratio: 3 / 4; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 6px rgba(255,255,255,.18); }
.na-cal > img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; }
.na-doors { position: absolute; inset: 0; perspective: 900px; }
#nx-advent .na-door { position: absolute; border-radius: 6px; transform-style: preserve-3d; -webkit-tap-highlight-color: transparent; }
.na-inside { position: absolute; inset: 4%; border-radius: 6px; background: radial-gradient(circle at 50% 45%, #FFE9A8 0, #E8B84A 45%, #9C6A1A 100%); box-shadow: inset 0 4px 14px rgba(80,40,0,.6); display: grid; place-items: center; opacity: 0; transition: opacity .2s .1s; }
.na-star { font-size: clamp(16px, 3vh, 34px); color: #fff; text-shadow: 0 0 10px #fff3, 0 2px 0 #b07a1a; transform: scale(0); transition: transform .5s cubic-bezier(.3,1.6,.5,1) .2s; }
.na-flap { position: absolute; inset: 0; border-radius: 6px; transform-origin: 0 50%; transition: transform .6s cubic-bezier(.5,0,.2,1), box-shadow .3s, filter .3s; backface-visibility: hidden; box-shadow: 0 0 0 rgba(0,0,0,0); }
@media (hover: hover) { #nx-advent .na-door:not(.locked):hover .na-flap { transform: rotateY(-14deg); box-shadow: 6px 4px 14px rgba(0,0,0,.35); } }
#nx-advent .na-door.opening .na-flap, #nx-advent .na-door.done .na-flap { transform: rotateY(-108deg); box-shadow: 10px 4px 20px rgba(0,0,0,.4); }
#nx-advent .na-door.opening .na-inside, #nx-advent .na-door.done .na-inside { opacity: 1; }
#nx-advent .na-door.done .na-star { transform: scale(1); }
#nx-advent .na-door.locked .na-flap { filter: saturate(.7) brightness(.85); }
#nx-advent .na-door.locked::after { content: ''; position: absolute; right: 6%; bottom: 8%; width: 18%; aspect-ratio: 1; border-radius: 50%; background: rgba(43,36,32,.55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4'%3E%3Crect x='5' y='11' width='14' height='10' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / 60% no-repeat; }

.na-side { color: #fff; text-shadow: 0 2px 12px rgba(0,0,0,.35); }
.na-kick { margin: 0 0 10px; font: 600 15px/1 'Fredoka', 'Manrope', sans-serif; color: #FFE6A6; }
.na-side h2 { margin: 0 0 16px; color: #fff !important; font: 700 clamp(34px, 3.6vw, 52px)/1 'Fredoka', 'Manrope', sans-serif !important; text-transform: none !important; }
.na-lede { margin: 0 0 26px; font: 500 16px/1.6 'Manrope', sans-serif; color: rgba(255,255,255,.92); }
.na-prog { margin-bottom: 26px; }
.na-bar { height: 12px; border-radius: 12px; background: rgba(255,255,255,.25); overflow: hidden; }
.na-bar i { display: block; height: 100%; width: 0; border-radius: 12px; background: linear-gradient(90deg, var(--na-gold), #FFE6A6); transition: width .8s cubic-bezier(.3,1.4,.5,1); }
.na-prog p { margin: 10px 0 0; font: 600 15px/1 'Manrope', sans-serif; }
.na-prog b { font: 700 22px/1 'Fredoka', sans-serif; color: #FFE6A6; }
.na-tools { display: flex; flex-wrap: wrap; gap: 10px; }
#nx-advent .na-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 40px; background: var(--na-red); color: #fff; font: 600 16px/1 'Fredoka', 'Manrope', sans-serif; box-shadow: 0 4px 0 #8a0b20; transition: transform .15s, box-shadow .15s; text-shadow: none; }
#nx-advent .na-btn:hover { transform: translateY(-2px); }
#nx-advent .na-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #8a0b20; }
#nx-advent .na-btn.ghost { background: rgba(255,255,255,.92); color: var(--na-ink); box-shadow: 0 4px 0 rgba(0,0,0,.18); }
#nx-advent .na-btn.small { padding: 9px 16px; font-size: 14px; }

/* puzzle card */
.na-modal { position: absolute; inset: 0; z-index: 10; display: none; align-items: center; justify-content: center; padding: 16px; background: rgba(15,30,40,.45); backdrop-filter: blur(2px); }
.na-modal.is-on { display: flex; }
.na-card { position: relative; width: min(560px, 100%); max-height: 94vh; overflow: auto; padding: clamp(22px, 4vw, 38px); border-radius: 26px; background: var(--na-cream); box-shadow: 0 30px 80px rgba(0,0,0,.35), inset 0 0 0 3px #fff, inset 0 0 0 7px #F1E3C6; animation: naIn .45s cubic-bezier(.3,1.5,.5,1); text-align: center; }
@keyframes naIn { from { transform: scale(.7) rotate(-3deg); opacity: 0; } }
.na-card.wobble { animation: naWob .4s; }
@keyframes naWob { 25% { transform: rotate(-2deg); } 75% { transform: rotate(2deg); } }
#nx-advent .na-x { position: absolute; right: 14px; top: 12px; width: 40px; height: 40px; border-radius: 50%; background: #F1E3C6; color: var(--na-ink); font-size: 24px; line-height: 40px; }
.na-day { display: inline-block; margin: 0 0 12px; padding: 7px 16px; border-radius: 30px; background: var(--na-green); color: #fff; font: 600 14px/1 'Fredoka', sans-serif; }
.na-card h3 { margin: 0 0 22px; color: var(--na-ink) !important; font: 600 clamp(21px, 2.4vw, 28px)/1.25 'Fredoka', 'Manrope', sans-serif !important; text-transform: none !important; }
.na-opts { display: grid; gap: 10px; }
.na-opts.num { grid-template-columns: repeat(4, 1fr); }
.na-opts.row { grid-template-columns: repeat(auto-fit, minmax(60px, 1fr)); }
#nx-advent .na-opt { padding: 16px 18px; border-radius: 16px; background: #fff; color: var(--na-ink); font: 600 18px/1.2 'Fredoka', 'Manrope', sans-serif; box-shadow: 0 4px 0 #E4D3B0; transition: transform .15s, background .2s; }
#nx-advent .na-opt.big { font-size: clamp(30px, 5vw, 42px); padding: 12px; }
#nx-advent .na-opt:hover { transform: translateY(-2px); }
#nx-advent .na-opt.yes { background: #DDF3E5; box-shadow: 0 4px 0 #8CCBA5; }
#nx-advent .na-opt.no { background: #FBE1E4; color: #a33; opacity: .7; }
.na-seq { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; font-size: clamp(30px, 5vw, 44px); }
.na-seq .q { width: 1.2em; border-radius: 12px; background: #fff; color: var(--na-red); font: 700 .8em/1.4 'Fredoka', sans-serif; box-shadow: inset 0 0 0 3px #F1E3C6; }
.na-scatter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 22px; padding: 14px; border-radius: 18px; background: #fff; font-size: clamp(26px, 4.4vw, 38px); box-shadow: inset 0 0 0 3px #F1E3C6; }
.na-grid { display: grid; gap: 4px; padding: 10px; border-radius: 18px; background: #E9F4FB; }
#nx-advent .na-cell { aspect-ratio: 1; font-size: clamp(20px, 3.6vw, 30px); border-radius: 10px; transition: transform .15s, background .2s; }
#nx-advent .na-cell:hover { background: rgba(255,255,255,.7); }
#nx-advent .na-cell.yes { background: var(--na-gold); transform: scale(1.2); }
#nx-advent .na-cell.no { opacity: .3; }
.na-slots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.na-slots span { width: clamp(30px, 6vw, 46px); height: clamp(40px, 7vw, 56px); border-radius: 10px; background: #fff; box-shadow: inset 0 -4px 0 #E4D3B0; display: grid; place-items: center; font: 700 clamp(20px, 3.4vw, 30px)/1 'Fredoka', sans-serif; color: var(--na-green); }
.na-slots.yes span { background: #DDF3E5; }
.na-tiles { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
#nx-advent .na-tile { width: clamp(38px, 7vw, 52px); height: clamp(38px, 7vw, 52px); border-radius: 12px; background: var(--na-red); color: #fff; font: 700 clamp(20px, 3.4vw, 28px)/1 'Fredoka', sans-serif; box-shadow: 0 4px 0 #8a0b20; transition: transform .15s, opacity .2s; }
#nx-advent .na-tile.used { opacity: .25; transform: scale(.9); }
.na-row { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }
.na-mem { display: grid; gap: 8px; }
#nx-advent .na-mcard { position: relative; aspect-ratio: 1; perspective: 600px; }
.na-mcard .b, .na-mcard .f { position: absolute; inset: 0; border-radius: 14px; display: grid; place-items: center; backface-visibility: hidden; transition: transform .45s; }
.na-mcard .b { background: var(--na-green) repeating-linear-gradient(45deg, rgba(255,255,255,.08) 0 8px, transparent 8px 16px); box-shadow: 0 4px 0 #134a33; }
.na-mcard .f { background: #fff; font-size: clamp(26px, 5vw, 40px); transform: rotateY(180deg); box-shadow: 0 4px 0 #E4D3B0; }
.na-mcard.up .b { transform: rotateY(-180deg); }
.na-mcard.up .f { transform: rotateY(0); }
.na-mcard.got .f { background: #FFF1C9; }
.na-win { padding: 10px 0; }
.na-bigstar { display: block; font-size: 80px; line-height: 1; color: var(--na-gold); text-shadow: 0 4px 0 #b07a1a; animation: naStar .7s cubic-bezier(.3,1.6,.5,1); }
@keyframes naStar { from { transform: scale(0) rotate(-90deg); } }
.na-win h3 { margin: 12px 0 8px !important; }
.na-win p { margin: 0; font: 500 16px/1.5 'Manrope', sans-serif; }
.na-confetti { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.na-toast { position: absolute; z-index: 30; left: 50%; bottom: 30px; transform: translate(-50%, 20px); opacity: 0; padding: 14px 22px; border-radius: 30px; background: var(--na-cream); color: var(--na-ink); font: 600 16px/1.3 'Fredoka', sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.3); transition: .4s; }
.na-toast.in { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px), (orientation: portrait) {
  .na-wrap { grid-template-columns: 1fr; align-content: start; justify-items: center; gap: 14px; padding: 14px 12px; overflow: auto; }
  .na-side { order: -1; text-align: center; max-width: 520px; }
  .na-side h2 { font-size: 30px !important; margin-bottom: 8px; }
  .na-lede { font-size: 14px; margin-bottom: 12px; }
  .na-prog { margin-bottom: 12px; }
  .na-tools { justify-content: center; }
  .na-cal { height: auto; width: min(100%, 520px); }
  .na-opts.num { grid-template-columns: repeat(2, 1fr); }
}

/* match the main site: Oswald capitals for headings and labels, square red buttons */
.na-kick, .na-side h2, .na-card h3, .na-day, .na-prog b, .na-win h3 { font-family: 'Oswald', sans-serif !important; text-transform: uppercase !important; font-weight: 600 !important; }
.na-kick { color: #FFE6A6; font-weight: 500 !important; }
.na-side h2 { font-size: clamp(38px, 4vw, 60px) !important; line-height: .98 !important; }
.na-card h3 { font-size: clamp(22px, 2.4vw, 30px) !important; line-height: 1.1 !important; }
.na-day { border-radius: 0; padding: 7px 12px; font-weight: 500 !important; }
#nx-advent .na-btn { border-radius: 0; box-shadow: none; padding: 15px 24px; background: #D3122F; font: 500 16px/1 'Oswald', sans-serif; text-transform: uppercase; }
#nx-advent .na-btn:hover { background: #9e0c22; transform: none; }
#nx-advent .na-btn:active { transform: none; box-shadow: none; }
#nx-advent .na-btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.6); }
#nx-advent .na-btn.ghost:hover { background: rgba(255,255,255,.1); }
.na-card #nx-advent .na-btn.ghost, #nx-advent .na-card .na-btn.ghost { color: var(--na-ink); border-color: rgba(43,36,32,.35); }
#nx-advent .na-opt { font-family: 'Manrope', sans-serif; font-weight: 600; }
.na-toast { font-family: 'Manrope', sans-serif; border-radius: 0; }

/* ===== v2 escape-room puzzles ===== */
.na-card.wide { width: min(760px, 100%); }
.na-msg { margin: 0 0 24px; }
.na-msg-t { margin: 0 0 10px; font: 500 15px/1 'Oswald', sans-serif; text-transform: uppercase; color: #FFE6A6; }
.na-boxes { display: flex; flex-wrap: wrap; gap: 10px 14px; }
.na-word { display: flex; gap: 3px; }
.na-boxes i { width: 22px; height: 28px; display: grid; place-items: center; border-radius: 4px; background: rgba(255,255,255,.18); border-bottom: 2px solid rgba(255,255,255,.5); font: 600 16px/1 'Oswald', sans-serif; font-style: normal; color: #fff; transition: background .4s; }
.na-boxes i.got { background: #FFE6A6; color: #2B2420; border-color: #E8B84A; animation: naPop .5s ease; }
@keyframes naPop { 50% { transform: scale(1.25); } }
.na-msg.in-card { margin: 4px 0 16px; }
.na-msg.in-card .na-msg-t { color: #1F6B4A; }
.na-msg.in-card .na-boxes { justify-content: center; }
.na-msg.in-card .na-boxes i { background: #fff; color: #2B2420; border-bottom-color: #E4D3B0; box-shadow: inset 0 0 0 1px #F1E3C6; }
.na-msg.in-card .na-boxes i.got { background: #FFF1C9; }
.na-star { font-family: 'Oswald', sans-serif; font-weight: 600; }

.na-show { margin: -6px 0 20px; }
.na-code { display: inline-block; padding: 14px 22px; border-radius: 12px; background: #2B2420; color: #FFE6A6; font: 500 clamp(22px, 3.4vw, 32px)/1.2 'Oswald', sans-serif; box-shadow: inset 0 0 0 3px #4a3d33; }
.na-mirror { display: inline-block; transform: scaleX(-1); padding: 12px 22px; border-radius: 12px; background: linear-gradient(135deg, #dfe9ef, #ffffff 45%, #cfdbe3); color: #2B2420; font: 600 clamp(26px, 4vw, 38px)/1 'Oswald', sans-serif; box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.na-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.na-key span { padding: 6px 10px; border-radius: 8px; background: #fff; box-shadow: 0 3px 0 #E4D3B0; font: 600 16px/1 'Manrope', sans-serif; }
.na-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#nx-advent .na-in { flex: 1; min-width: 180px; max-width: 320px; padding: 14px 16px; border: 2px solid #E4D3B0; border-radius: 0; background: #fff; color: #2B2420; font: 600 22px/1 'Oswald', sans-serif; text-transform: uppercase; text-align: center; outline: none; }
#nx-advent .na-in:focus { border-color: #1F6B4A; }
.na-form.yes .na-in { border-color: #2FA84F; background: #E6F6EA; }
.na-clues { margin: -6px auto 18px; padding: 0; max-width: 440px; list-style: none; text-align: left; }
.na-clues li { padding: 10px 14px; margin-bottom: 8px; border-radius: 10px; background: #fff; box-shadow: 0 3px 0 #E4D3B0; font: 500 15px/1.45 'Manrope', sans-serif; }
.na-lock { display: flex; justify-content: center; gap: 10px; margin: 4px 0 8px; }
.na-dial { display: flex; flex-direction: column; align-items: center; gap: 4px; }
#nx-advent .na-dial button { width: 56px; height: 30px; color: #8c7a63; font-size: 16px; border-radius: 6px; }
#nx-advent .na-dial button:hover { background: rgba(0,0,0,.05); color: #2B2420; }
.na-dial .num { width: 56px; height: 70px; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(#3a2f28, #241c17); color: #FFE6A6; font: 600 38px/1 'Oswald', sans-serif; box-shadow: inset 0 6px 12px rgba(0,0,0,.6); cursor: pointer; }
.na-dial.sel .num { box-shadow: inset 0 6px 12px rgba(0,0,0,.6), 0 0 0 3px #E8B84A; }
.na-lock.yes .num { color: #8EF0A8; }
.na-opts.big .na-opt { font-size: 28px; }
#nx-advent .na-btn.ghost.dark { color: #2B2420; border-color: rgba(43,36,32,.35); }
#nx-advent .na-btn.ghost.dark:hover { background: rgba(43,36,32,.06); }
.na-tip { margin: 10px 0 0; font: 500 14px/1.4 'Manrope', sans-serif; color: #7a6a58; }

.na-pic { position: relative; width: 100%; max-height: 62vh; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #2B2420 center / cover no-repeat; box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.na-grid3 { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 2px; background: #2B2420; }
#nx-advent .na-piece { width: 100%; height: 100%; border-radius: 0; transition: transform .25s ease; }
#nx-advent .na-piece:hover { filter: brightness(1.08); }
.na-piece.done { animation: naGlow 1s ease; }
.na-grid3.rot { gap: 2px; }
@keyframes naGlow { 50% { filter: brightness(1.25); } }
.na-gap { background: #2B2420; }

.na-lights { position: relative; display: flex; justify-content: center; gap: clamp(18px, 5vw, 46px); padding: 30px 10px 20px; margin-bottom: 4px; }
.na-wire { position: absolute; left: 0; right: 0; top: 10px; width: 100%; height: 40px; }
.na-wire path { fill: none; stroke: #2B2420; stroke-width: 3; }
#nx-advent .na-bulb { position: relative; width: clamp(46px, 9vw, 64px); aspect-ratio: .72; border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%; background: color-mix(in srgb, var(--c) 45%, #3a3330); box-shadow: inset 0 -6px 12px rgba(0,0,0,.35); transition: background .1s, box-shadow .1s, transform .1s; }
#nx-advent .na-bulb::before { content: ''; position: absolute; left: 50%; top: -10px; width: 40%; height: 14px; transform: translateX(-50%); background: #5b524b; border-radius: 3px; }
#nx-advent .na-bulb.on { background: var(--c); box-shadow: 0 0 22px 6px var(--c), inset 0 -4px 10px rgba(255,255,255,.45); transform: scale(1.08); }

.na-maze { position: relative; display: grid; width: min(420px, 100%); aspect-ratio: 1; margin: 0 auto; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 0 0 4px #2B2420; }
.na-cell { display: grid; place-items: center; font-size: clamp(16px, 4vw, 28px); }
.na-cell.wall { background: repeating-linear-gradient(45deg, #b3261e 0 8px, #9a1f19 8px 16px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.na-cell.path { background: #F7FBFD; }
.na-sleigh { position: absolute; display: grid; place-items: center; font-size: clamp(18px, 4.4vw, 30px); transition: left .15s, top .15s; }
.na-maze.bump { animation: naWob .25s; }
.na-pad { display: grid; grid-template-columns: repeat(4, 54px); gap: 8px; justify-content: center; margin-top: 14px; }
#nx-advent .na-pad button { height: 48px; border-radius: 0; background: #2B2420; color: #fff; font-size: 18px; }
#nx-advent .na-pad button:active { background: #1F6B4A; }

.na-pic.hid { margin-bottom: 4px; }
#nx-advent .na-hid { position: absolute; width: 44px; height: 44px; display: grid; place-items: center; font: 600 22px/1 'Oswald', sans-serif; color: rgba(255,255,255,.42); text-shadow: 0 0 2px rgba(0,0,0,.25); mix-blend-mode: soft-light; border-radius: 50%; }
#nx-advent .na-hid.seen { mix-blend-mode: normal; color: #fff; box-shadow: 0 0 0 3px #E8B84A, 0 0 16px rgba(232,184,74,.8); background: rgba(43,36,32,.35); }

.na-final-l { margin: -8px 0 12px; font: 500 15px/1.5 'Manrope', sans-serif; }
#nx-advent .na-spot { position: absolute; border-radius: 30%; }
.na-foundkey { position: absolute; left: 70%; top: 70%; font-size: 48px; transform: translate(-50%, -50%) scale(0); transition: transform .7s cubic-bezier(.3,1.6,.5,1); filter: drop-shadow(0 0 12px #FFE6A6); }
.na-pic.final.found .na-foundkey { transform: translate(-50%, -80%) scale(1); }
.na-letter { display: grid; place-items: center; width: 90px; height: 90px; margin: 0 auto; border-radius: 12px; background: #FFE6A6; color: #2B2420; font: 600 58px/1 'Oswald', sans-serif; box-shadow: 0 6px 0 #E8B84A; animation: naStar .7s cubic-bezier(.3,1.6,.5,1); }
.na-mem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 420px; margin: 0 auto; }
@media (max-width: 900px), (orientation: portrait) {
  .na-boxes i { width: 18px; height: 24px; font-size: 13px; }
  .na-boxes { gap: 8px 10px; justify-content: center; }
  .na-msg-t { text-align: center; }
  .na-pad { grid-template-columns: repeat(4, 48px); }
}

/* ===== story rooms ===== */
.na-room { position: absolute; inset: 0; z-index: 8; background: #0E2233; opacity: 0; transition: opacity .4s; overflow: hidden; }
.na-room.in { opacity: 1; }
.na-rstage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); overflow: hidden; border-radius: 0; }
.na-rbg { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; display: block; -webkit-user-drag: none; user-select: none; }
.na-rspots { position: absolute; inset: 0; }
#nx-advent .na-rspot { position: absolute; border-radius: 12px; -webkit-tap-highlight-color: transparent; }
.na-rglow { position: absolute; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%) scale(.3); border-radius: 50%; pointer-events: none; opacity: 0; mix-blend-mode: screen; background: radial-gradient(circle, rgba(255,240,190,.95) 0, rgba(255,210,120,.5) 30%, transparent 65%); }
.na-rglow.go { animation: naRglow 1.6s ease-out; }
@keyframes naRglow { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 25% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); } }
.na-room.leaving .na-rstage { transition: transform 1.4s cubic-bezier(.6,0,.2,1), filter 1.4s; transform: translate(-50%, -50%) scale(2.2); filter: brightness(2.2) blur(3px); }
.na-rtop, .na-rbottom { position: absolute; z-index: 3; left: 0; right: 0; display: flex; align-items: center; gap: 14px; padding: 14px clamp(12px, 2.4vw, 30px); pointer-events: none; }
.na-rtop > *, .na-rbottom > button, .na-rbag { pointer-events: auto; }
.na-rtop { top: 0; justify-content: space-between; background: linear-gradient(to bottom, rgba(10,24,38,.75), transparent); }
.na-rbottom { bottom: 0; align-items: flex-end; background: linear-gradient(to top, rgba(10,24,38,.8), transparent); }
#nx-advent .na-rbtn { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 1px solid rgba(255,255,255,.45); border-radius: 22px; color: #fff; background: rgba(10,24,38,.45); font: 500 15px/1 'Oswald', sans-serif; text-transform: uppercase; }
#nx-advent .na-rbtn.round { width: 42px; padding: 0; justify-content: center; border-radius: 50%; }
#nx-advent .na-rbtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.na-rtitle { text-align: center; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.5); }
.na-rtitle span { display: block; color: #FFE6A6; font: 500 13px/1 'Oswald', sans-serif; text-transform: uppercase; }
.na-rtitle b { font: 600 clamp(18px, 2.2vw, 26px)/1.1 'Oswald', sans-serif; text-transform: uppercase; }
.na-rsay { flex: 1; min-width: 0; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.8); transition: opacity .8s, transform .8s; pointer-events: none; }
.na-rsay h4 { margin: 0 0 4px; color: #FFE6A6 !important; font: 500 clamp(15px, 1.5vw, 20px)/1.2 'Oswald', sans-serif !important; text-transform: uppercase; }
.na-rsay p { margin: 0; font: 500 clamp(13px, 1.25vw, 16px)/1.5 'Manrope', sans-serif; }
.na-rsay.in { animation: naIn .45s ease; }
.na-rsay.out { opacity: 0; transform: translateY(6px); }
.na-rbag { display: flex; gap: 8px; }
#nx-advent .na-rslot { width: clamp(48px, 5vw, 64px); aspect-ratio: 1; border-radius: 12px; border: 2px solid rgba(255,255,255,.5); background: rgba(255,248,236,.9); display: grid; place-items: center; font-size: clamp(24px, 2.6vw, 34px); box-shadow: 0 4px 12px rgba(0,0,0,.25); }
#nx-advent .na-rslot[aria-hidden] { background: rgba(255,255,255,.15); border-style: dashed; }
#nx-advent .na-rslot.new { animation: naPop .6s ease; border-color: #E8B84A; }
.na-rlog { position: absolute; z-index: 4; left: clamp(12px, 2.4vw, 30px); bottom: 74px; width: min(460px, 88vw); max-height: 50vh; overflow: auto; padding: 16px 20px; border-radius: 14px; background: #FFF8EC; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.na-rlog[hidden] { display: none; }
.na-rlog > div { padding: 10px 0; border-bottom: 1px solid #F1E3C6; }
.na-rlog h4 { margin: 0 0 4px; color: #1F6B4A; font: 500 15px/1.2 'Oswald', sans-serif; text-transform: uppercase; }
.na-rlog p { margin: 0; color: #2B2420; font: 500 14px/1.5 'Manrope', sans-serif; }
.na-paper { padding: 22px 26px; margin: 4px 0 6px; text-align: left; background: linear-gradient(160deg, #fffaf0, #f3e6c9); box-shadow: inset 0 0 40px rgba(180,140,80,.25), 0 6px 16px rgba(0,0,0,.12); color: #2B2420; font: 500 16px/1.6 'Manrope', sans-serif; transform: rotate(-.6deg); }
.na-paper p { margin: 0 0 10px; }
.na-paper .sig { text-align: right; font: 600 22px/1 'Oswald', sans-serif; color: #1F6B4A; margin: 6px 0 0; }
.na-signword { text-align: center; margin: 12px 0 !important; font: 600 46px/1 'Oswald', sans-serif !important; color: #1F6B4A; }
.na-tomorrow { margin-top: 14px !important; font: 600 20px/1.2 'Oswald', sans-serif !important; color: #C8102E; text-transform: uppercase; }
.na-player { margin: -12px 0 22px; color: rgba(255,255,255,.85); font: 500 15px/1.4 'Manrope', sans-serif; }
.na-player b { color: #FFE6A6; }
#nx-advent .na-link { color: #fff; text-decoration: underline; text-underline-offset: 3px; font: 500 14px/1 'Manrope', sans-serif; margin-left: 6px; }
/* upright phones: a tall picture across the top that swipes sideways, story and bag below */
.na-rpan { position: absolute; inset: 0; }
.na-peek { display: none; }
.na-room.port .na-rpan { inset: auto; left: 0; right: 0; top: 80px; height: var(--rh); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.na-room.port .na-rpan::-webkit-scrollbar { display: none; }
.na-room.port .na-rstage { position: relative; left: 0; top: 0; transform: none; }
.na-room.port.leaving .na-rstage { transform: scale(2.2); }
#nx-advent .na-room.port .na-peek { display: flex; position: absolute; z-index: 4; top: calc(80px + var(--rh) / 2); width: 36px; height: 36px; margin-top: -18px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(10,24,38,.6); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); opacity: 0; pointer-events: none; transition: opacity .3s; }
#nx-advent .na-room.port .na-peek.on { opacity: 1; pointer-events: auto; }
.na-peek.l { left: 8px; } .na-peek.r { right: 8px; }
.na-peek svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.na-room.port .na-rbottom { top: calc(80px + var(--rh) + 18px); bottom: auto; flex-wrap: wrap; background: none; }
.na-room.port .na-rsay { order: -1; flex-basis: 100%; }
.na-room.port .na-rsay.out { opacity: .6; transform: none; }
.na-room.port .na-rbag { margin-left: auto; }
.na-room.port .na-rtop { background: none; }
.na-room.port .na-rbtn span { display: none; }
.na-room.port #nx-advent .na-rbtn, .na-room.port .na-rbtn:not(.round) { width: 42px; padding: 0; justify-content: center; }
#nx-advent { overflow: clip; }
@media (max-height: 520px) and (orientation: landscape) {
  .na-rtop { padding: 6px 12px; }
  #nx-advent .na-rbtn { height: 32px; padding: 0 10px; font-size: 12px; }
  #nx-advent .na-rbtn.round { width: 32px; }
  .na-rtitle span { font-size: 10px; } .na-rtitle b { font-size: 15px; }
  .na-rbottom { padding: 6px 12px 8px; }
  .na-rsay h4 { font-size: 12px !important; } .na-rsay p { font-size: 11px; }
  #nx-advent .na-rslot { width: 40px; }
}

/* ===== story rooms v3: things that move ===== */
.na-rscene { position: absolute; inset: 0; transition: opacity .45s; }
.na-rscene.fade { opacity: 0; }
.na-rscene > img.na-rbg { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: cover; }
.na-layer { position: absolute; opacity: 0; transition: opacity 1s ease; pointer-events: none; background-repeat: no-repeat;
  -webkit-mask-image: radial-gradient(ellipse 60% 62% at 50% 45%, #000 70%, transparent 100%); mask-image: radial-gradient(ellipse 60% 62% at 50% 45%, #000 70%, transparent 100%); }
.na-layer.on { opacity: 1; }
.na-rdark { position: absolute; inset: 0; z-index: 4; pointer-events: none; transition: opacity 1s ease;
  background: radial-gradient(ellipse 22% 34% at 11% 72%, rgba(8,12,34,.25), rgba(8,12,34,.86) 100%); }
.na-rdark.off { opacity: 0; }
.na-rscene .na-piece { position: absolute; z-index: 3; pointer-events: none; background-repeat: no-repeat; border-radius: 8px; }
.na-piece.wig { animation: naWig .6s ease; }
@keyframes naWig { 20% { transform: rotate(-3deg) scale(1.03); } 45% { transform: rotate(2.5deg) scale(1.03); } 70% { transform: rotate(-1.5deg); } 100% { transform: none; } }
.na-piece.lift { transition: transform .8s cubic-bezier(.3,1.4,.5,1), filter .8s; transform-origin: 20% 100%; }
.na-piece.lift.go { transform: translate(-8%, -55%) rotate(-14deg); filter: drop-shadow(0 18px 14px rgba(0,0,0,.35)); }
.na-sitem { position: absolute; z-index: 5; height: auto !important; opacity: 0; transform: scale(.4); pointer-events: none; cursor: pointer; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)); transition: opacity .5s, transform .6s cubic-bezier(.3,1.6,.5,1); }
.na-sitem.on { opacity: 1; transform: none; pointer-events: auto; animation: naBob 1.8s ease-in-out infinite; }
.na-sitem.on::after { content: ''; }
/* an item painted into the picture: the tap target is there, the icon is not */
.na-sitem.baked, .na-sitem.baked.on, .na-sitem.baked.took { opacity: 0 !important; animation: none; filter: none; }
.na-sitem.took { opacity: 0; transform: translateY(-60%) scale(1.4); transition: .5s; }
@keyframes naBob { 50% { margin-top: -.6%; filter: drop-shadow(0 4px 6px rgba(0,0,0,.35)) drop-shadow(0 0 10px rgba(255,230,140,.95)); } }
.na-prop { position: absolute; z-index: 3; height: auto !important; pointer-events: none; transform-origin: 50% 100%; transition: transform .6s cubic-bezier(.3,1.4,.5,1), opacity .5s; filter: drop-shadow(0 6px 6px rgba(0,30,60,.25)); }
.na-prop.gone { opacity: 0; }
.na-puff { position: absolute; z-index: 4; pointer-events: none; height: 14%; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.95), rgba(255,255,255,0) 70%); animation: naPuff .9s ease-out forwards; }
@keyframes naPuff { from { opacity: 1; transform: scale(.6); } to { opacity: 0; transform: translateY(-40%) scale(1.5); } }
/* Holly's door */
.na-mouse { position: absolute; z-index: 3; pointer-events: none; aspect-ratio: 360 / 267; }
.na-mouse img { position: absolute; height: auto !important; }
.na-mouse .frame { inset: 0; width: 100% !important; }
.na-mouse .door { left: 31.5%; top: 16.9%; width: 36.8% !important; transform-origin: 100% 50%; transition: transform .9s cubic-bezier(.5,0,.2,1); }
.na-mouse .mouse { left: 33%; bottom: 6%; width: 34% !important; transform: translateY(30%) scale(.5); opacity: 0; transition: transform .8s .5s cubic-bezier(.3,1.6,.5,1), opacity .4s .5s; }
.na-mouse.open .door { transform: perspective(300px) rotateY(-75deg); }
.na-mouse.open .mouse { transform: translateY(0) scale(1); opacity: 1; animation: naMouse 2.4s 1.4s ease-in-out infinite; }
@keyframes naMouse { 50% { transform: rotate(-4deg); } }
/* Pip */
.na-elf { position: absolute; z-index: 4; height: auto !important; opacity: 0; transform: translateX(40%) scale(.9); transition: opacity .35s, transform .45s cubic-bezier(.3,1.5,.5,1); pointer-events: none; }
.na-elf.flip { transform: scaleX(-1) translateX(40%) scale(.9); }
.na-elf.out { opacity: 1; transform: none; pointer-events: auto; cursor: pointer; }
.na-elf.flip.out { transform: scaleX(-1); }
.na-elf.caught { animation: naCaught .6s ease; }
@keyframes naCaught { 40% { transform: scale(1.25) rotate(-6deg); } }
/* the way back, in the picture */
#nx-advent .na-rback { position: absolute; z-index: 6; left: 2%; top: 14%; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 20px; background: rgba(10,24,38,.6); color: #fff; font: 500 14px/1 'Oswald', sans-serif; text-transform: uppercase; }
#nx-advent .na-rback svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
/* bag */
#nx-advent .na-rslot img { width: 74%; height: 74% !important; object-fit: contain; pointer-events: none; }
#nx-advent .na-rslot { touch-action: none; }
#nx-advent .na-rslot.lifted img { opacity: .3; }
.na-ghost { position: fixed; z-index: 100000; width: 70px; height: auto !important; transform: translate(-50%, -50%) rotate(-8deg); pointer-events: none; filter: drop-shadow(0 10px 12px rgba(0,0,0,.4)); }
/* map + picture padlock */
.na-mapview img { width: 100% !important; height: auto !important; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.na-lock.sym { gap: clamp(8px, 2vw, 16px); }
#nx-advent .na-symdial { width: clamp(64px, 12vw, 86px); height: clamp(78px, 14vw, 100px); border-radius: 12px; background: linear-gradient(#3a2f28, #241c17); box-shadow: inset 0 6px 12px rgba(0,0,0,.6), 0 4px 0 #120d0a; font-size: clamp(30px, 6vw, 44px); }
#nx-advent .na-symdial.spin { animation: naSpin .3s ease; }
@keyframes naSpin { 0% { transform: rotateX(0); } 50% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.na-lock.sym.yes .na-symdial { box-shadow: inset 0 6px 12px rgba(0,0,0,.6), 0 0 0 3px #4caf50; }
/* bag items always fit inside their slot */
#nx-advent .na-rslot { position: relative; overflow: hidden; }
#nx-advent .na-rslot img { width: auto !important; height: auto !important; max-width: 72% !important; max-height: 72% !important; object-fit: contain; }
/* touching something makes it glow softly; nothing peels off the picture */
.na-piece.wig { animation: naShine .7s ease; transform: none !important; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 55%, transparent 100%); }
@keyframes naShine { 0% { filter: brightness(1); opacity: 0; } 35% { filter: brightness(1.45) saturate(1.15); opacity: 1; } 100% { filter: brightness(1); opacity: 0; } }
/* mouse door: just the little arch, toned to the room */
.na-mouse { aspect-ratio: 205 / 266; filter: brightness(.8) saturate(.85) drop-shadow(0 3px 3px rgba(40,20,10,.45)); }
.na-mouse .door { left: 17.8%; top: 16.9%; width: 64.5% !important; }
.na-mouse .mouse { left: 12%; width: 76% !important; bottom: 4%; }
.na-mouse.open .mouse { filter: brightness(1.15); }
/* the lifted pillow floats up and away */
.na-piece.lift.go { transform: translate(-6%, -70%) rotate(-12deg); opacity: 0; transition: transform 1s cubic-bezier(.3,1.2,.5,1), opacity .6s .5s, filter .8s; }
.na-rtools { display: flex; gap: 8px; }
#nx-advent .na-rsnd svg .b { fill: currentColor; stroke: none; }
#nx-advent .na-rsnd svg .w1, #nx-advent .na-rsnd svg .w2 { opacity: 0; }
#nx-advent .na-rsnd.is-on svg .w1, #nx-advent .na-rsnd.is-on svg .w2 { opacity: 1; }
#nx-advent .na-rsnd.is-on svg .x { opacity: 0; }
#nx-advent .na-rsnd.is-on { border-color: #FFE6A6; }
/* bag images are pinned inside the slot so tall things like keys can never overflow */
#nx-advent .na-rslot img { position: absolute; left: 14%; top: 14%; width: 72% !important; height: 72% !important; max-width: none !important; max-height: none !important; object-fit: contain; }
/* phones on their side: calendar and panel side by side, both fitting the screen */
@media (orientation: landscape) and (max-height: 520px) {
  .na-wrap { grid-template-columns: auto minmax(220px, 320px) !important; align-items: center; justify-items: start; gap: 18px; padding: 8px 16px; overflow: hidden; }
  .na-cal { height: calc(100vh - 16px) !important; width: auto !important; border-radius: 14px; }
  .na-side { order: 0 !important; text-align: left !important; }
  .na-side h2 { font-size: 26px !important; margin-bottom: 6px !important; }
  .na-kick { font-size: 12px; margin-bottom: 6px; }
  .na-lede { font-size: 12px !important; line-height: 1.45; margin-bottom: 8px !important; }
  .na-player { font-size: 12px; margin: 0 0 8px !important; }
  .na-msg { margin-bottom: 8px; } .na-msg-t { font-size: 11px; text-align: left !important; margin-bottom: 5px; }
  .na-boxes { justify-content: flex-start !important; gap: 5px 7px !important; }
  .na-boxes i { width: 14px !important; height: 18px !important; font-size: 11px !important; }
  .na-prog { margin-bottom: 10px; } .na-prog p { font-size: 12px; margin-top: 5px; } .na-bar { height: 8px; }
  .na-tools { justify-content: flex-start !important; gap: 6px; }
  #nx-advent .na-tools .na-btn { padding: 9px 12px; font-size: 12px; }
}
/* gate padlock: the map sits beside the picture dials so nobody has to remember it */
.na-symwrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 22px; align-items: center; text-align: left; }
.na-symwrap.nomap { grid-template-columns: 1fr; text-align: center; }
.na-symmap { margin: 0; }
.na-symmap img { display: block; width: 100% !important; height: auto !important; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.na-symmap figcaption { margin-top: 8px; font: 500 13px/1.35 'Manrope', sans-serif; color: rgba(43,36,32,.7); text-align: center; }
.na-symside .na-final-l { margin: 0 0 14px; }
.na-symside .na-row { justify-content: flex-start; }
.na-symwrap.nomap .na-symside .na-row { justify-content: center; }
.na-symside .na-lock.sym { justify-content: flex-start; margin: 0 0 16px; }
.na-symwrap.nomap .na-lock.sym { justify-content: center; }
#nx-advent .na-symdial { position: relative; width: clamp(56px, 7vw, 74px); height: clamp(70px, 8.6vw, 92px); padding: 0; border-radius: 12px; background: radial-gradient(ellipse at 50% 40%, #FBF0D6, #EAD3A4 75%, #D9BC85); box-shadow: inset 0 0 0 2px #C9A66B, inset 0 -8px 14px rgba(120,80,30,.25), 0 4px 0 #B08A4F; overflow: hidden; }
#nx-advent .na-symdial img { position: absolute; left: 14%; top: 12%; width: 72% !important; height: 76% !important; object-fit: contain; pointer-events: none; }
.na-lock.sym.yes .na-symdial { box-shadow: inset 0 0 0 2px #C9A66B, 0 0 0 3px #4caf50, 0 4px 0 #B08A4F; }
@media (max-width: 640px) {
  .na-symwrap { grid-template-columns: 1fr; gap: 14px; text-align: center; }
  .na-symside .na-row, .na-symside .na-lock.sym { justify-content: center; }
  #nx-advent .na-symdial { width: 64px; height: 80px; }
}
/* cards on a phone on its side: fit the short screen */
@media (orientation: landscape) and (max-height: 520px) {
  .na-card { max-height: calc(100vh - 16px); padding: 14px 20px 16px; border-radius: 18px; }
  .na-modal { padding: 8px; }
  .na-card h3 { font-size: 18px !important; margin-bottom: 8px !important; }
  .na-day { margin-bottom: 6px; padding: 5px 12px; font-size: 12px; }
  #nx-advent .na-x { width: 32px; height: 32px; line-height: 32px; font-size: 20px; right: 10px; top: 8px; }
  .na-mapview img { width: auto !important; max-width: 100% !important; max-height: calc(100vh - 150px) !important; margin: 0 auto; display: block; }
  .na-card .na-final-l { font-size: 13px; margin: 8px 0 !important; }
  .na-card.wide { width: min(820px, 100%); }
  .na-symwrap { grid-template-columns: 1.2fr 1fr; gap: 16px; text-align: left; }
  .na-symmap img { max-height: calc(100vh - 120px); width: auto !important; max-width: 100% !important; }
  .na-symmap figcaption { font-size: 11px; margin-top: 4px; }
  .na-symside .na-row, .na-symside .na-lock.sym { justify-content: flex-start; }
  #nx-advent .na-symdial { width: 54px; height: 68px; }
}
/* ready cut layers carry their own soft edge, so no extra mask */
.na-layer.cut { -webkit-mask-image: none !important; mask-image: none !important; }
/* Pip pops in and out quickly */
.na-layer.na-elfl { transition: opacity .28s ease; }
/* clock puzzle */
.na-clockpz { width: min(240px, 60vw); margin: 0 auto 6px; }
.na-clockpz svg { display: block; width: 100%; height: auto; }
.na-clockpz .rim { fill: #C9A66B; } .na-clockpz .face { fill: #FFFBF1; }
.na-clockpz .ticks line { stroke: #8a7a66; stroke-width: 1.4; } .na-clockpz .nums text { font: 600 17px 'Fredoka', sans-serif; fill: var(--na-ink); text-anchor: middle; }
.na-clockpz .hh, .na-clockpz .mh { stroke: var(--na-ink); stroke-linecap: round; transform-origin: 100px 100px; transition: transform .35s cubic-bezier(.3,1.5,.5,1); cursor: pointer; pointer-events: stroke; }
.na-clockpz .hh { stroke-width: 7; } .na-clockpz .mh { stroke-width: 4.5; stroke: #B5122B; }
.na-clockpz .pin { fill: var(--na-ink); }
.na-clockpz.yes .face { fill: #E6F6EA; transition: fill .4s; }
/* balance puzzle */
.na-weigh { position: relative; height: 120px; margin: 4px auto 14px; width: min(340px, 90%); }
.na-weigh::before { content: ''; position: absolute; left: 50%; top: 22px; bottom: 0; width: 10px; margin-left: -5px; border-radius: 4px; background: linear-gradient(#C9A66B, #8C6A36); }
.na-weigh::after { content: ''; position: absolute; left: 50%; bottom: 0; width: 120px; height: 12px; margin-left: -60px; border-radius: 8px; background: #8C6A36; }
.na-beam { position: absolute; left: 0; right: 0; top: 16px; height: 8px; border-radius: 4px; background: #B48A4A; transition: transform .45s cubic-bezier(.3,1.4,.5,1); }
.na-beam .pan { position: absolute; top: 8px; width: 96px; height: 54px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 6px; border-radius: 0 0 50px 50px; background: linear-gradient(#E9CC8E, #C9A05A); font: 600 18px 'Fredoka', sans-serif; color: var(--na-ink); }
.na-beam .pan.l { left: -14px; } .na-beam .pan.r { right: -14px; }
.na-weigh.yes .na-beam { box-shadow: 0 0 0 3px #4caf50; }
.na-parcels { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
#nx-advent .na-parcel { width: calc(46px * var(--s)); height: calc(40px * var(--s)); border-radius: 8px; background: linear-gradient(135deg, #C8553D, #9E3A2A); box-shadow: inset 0 0 0 3px rgba(255,255,255,.15), 0 4px 0 #6d2a1d; position: relative; transition: transform .2s; }
#nx-advent .na-parcel::before, #nx-advent .na-parcel::after { content: ''; position: absolute; background: #F2C14E; }
#nx-advent .na-parcel::before { left: 46%; top: 0; bottom: 0; width: 8%; } #nx-advent .na-parcel::after { top: 44%; left: 0; right: 0; height: 12%; }
#nx-advent .na-parcel i { position: absolute; right: -6px; top: -8px; z-index: 1; min-width: 24px; height: 24px; border-radius: 12px; background: #fff; color: var(--na-ink); font: 600 13px/24px 'Fredoka', sans-serif; font-style: normal; box-shadow: 0 2px 5px rgba(0,0,0,.2); }
#nx-advent .na-parcel.on { transform: translateY(-6px); box-shadow: 0 0 0 3px #4caf50, 0 4px 0 #6d2a1d; }
/* colour dials */
.na-lock.dials .na-symdial i { position: absolute; left: 18%; top: 16%; width: 64%; height: 68%; border-radius: 50%; box-shadow: inset 0 -6px 10px rgba(0,0,0,.25), inset 0 4px 8px rgba(255,255,255,.4), 0 2px 4px rgba(0,0,0,.2); }
/* mazes can carry their own look and pieces */
.na-maze .na-sleigh img, .na-maze .goal img { width: 80% !important; height: 80% !important; object-fit: contain; display: block; margin: 10% auto 0; }
.na-maze.ice { background: linear-gradient(160deg, #DCEEFB, #B9D8EE); }
.na-maze.ice .na-cell.path { background: transparent; }
.na-maze.ice .na-cell.wall { background: radial-gradient(ellipse at 50% 35%, #FFFFFF, #E4EFF7 60%, #C5D9E8); border-radius: 40% 45% 30% 35%; box-shadow: inset 0 -3px 0 rgba(120,150,180,.35); }
@media (orientation: landscape) and (max-height: 520px) {
  .na-maze { width: min(420px, calc(100vh - 150px)) !important; }
  .na-card .na-pad { margin-top: 8px; }
  .na-clockpz { width: min(200px, calc(100vh - 230px)); }
}
.na-maze img { max-width: 100%; max-height: 100%; }
#nx-advent .na-maze .na-cell { aspect-ratio: auto; min-width: 0; min-height: 0; }
@media (orientation: landscape) and (max-height: 520px) {
  .na-maze { width: min(420px, calc(100vh - 190px)) !important; }
  .na-clockpz { width: min(200px, calc(100vh - 265px)); }
  .na-card .na-row { margin-top: 10px; }
}
/* order puzzle */
.na-ordered { display: flex; justify-content: center; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; counter-reset: ord; flex-wrap: wrap; }
.na-ordered li { counter-increment: ord; min-width: 70px; height: 44px; padding: 0 10px; display: grid; place-items: center; border-radius: 10px; background: #fff; box-shadow: inset 0 0 0 2px #E4D3B0; font: 600 15px/1 'Fredoka', sans-serif; color: var(--na-ink); position: relative; }
.na-ordered li:empty::before { content: counter(ord); color: #C9B48A; }
#nx-advent .na-opt.used { opacity: .35; }
/* memory cards can show pictures */
#nx-advent .na-mcard .f img { position: absolute; left: 10%; top: 10%; width: 80% !important; height: 80% !important; max-width: none; object-fit: contain; pointer-events: none; filter: drop-shadow(0 2px 3px rgba(60,40,20,.28)); }
/* faint marks painted on a scene */
.na-mark { position: absolute; z-index: 2; pointer-events: none; font-family: 'Fredoka', sans-serif; font-weight: 600; line-height: 1; opacity: .78; text-shadow: 0 1px 2px rgba(0,0,0,.25); mix-blend-mode: soft-light; }
.na-mark.chalk { font-family: 'Rubik Dirt', 'Fredoka', sans-serif; font-weight: 400; mix-blend-mode: normal; opacity: .82; text-shadow: none; letter-spacing: 0; }
.na-mark.stitch { font-family: 'Fredoka', sans-serif; font-weight: 600; mix-blend-mode: multiply; opacity: .95; text-shadow: none; }
.na-mark.new { animation: naMarkIn .7s ease both; }
@keyframes naMarkIn { from { opacity: 0; filter: blur(3px); } }
.na-mark.gone { opacity: 0 !important; transition: opacity .5s; }
.na-mark.etch { mix-blend-mode: multiply; opacity: .72; text-shadow: none; font-family: 'Fredoka', sans-serif; font-weight: 600; }
@media (orientation: landscape) and (max-height: 520px) {
  .na-mem { width: min(100%, calc((100vh - 130px) * 4 / 3)) !important; margin: 0 auto; gap: 6px !important; }
}
/* the next door glows and gently breathes; the panel offers it too */
#nx-advent .na-door.next::before { content: ''; position: absolute; inset: -5%; border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 2px rgba(255,214,120,.95), 0 0 18px 6px rgba(255,200,90,.55); animation: naNext 2.4s ease-in-out infinite; z-index: 3; }
@keyframes naNext { 50% { box-shadow: 0 0 0 2px rgba(255,214,120,.5), 0 0 26px 10px rgba(255,200,90,.3); } }
.na-next { margin: -8px 0 18px; }
.na-next[hidden] { display: none; }
#nx-advent .na-next .na-btn { display: inline-flex; align-items: center; gap: 10px; }
#nx-advent .na-next .na-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
@media (hover: hover) { #nx-advent .na-next .na-btn:hover svg { transform: translateX(4px); } }
@media (orientation: landscape) and (max-height: 520px) { .na-next { margin: 0 0 8px; } #nx-advent .na-next .na-btn { padding: 9px 14px; font-size: 13px; } }
@media (max-width: 900px), (orientation: portrait) { .na-next { text-align: center; } }
/* phones upright: a simple column so nothing in the panel can slide under the calendar */
@media (max-width: 900px) and (orientation: portrait) {
  .na-wrap { display: flex !important; flex-direction: column; align-items: center; justify-content: flex-start; }
  .na-side, .na-cal { flex: 0 0 auto; }
}
/* glow sits on the door itself so the 3D flap cannot hide it */
#nx-advent .na-door.next::before { content: none; }
#nx-advent .na-door.next { animation: naNextD 2.4s ease-in-out infinite; z-index: 2; }
@keyframes naNextD { 0%, 100% { box-shadow: 0 0 0 3px rgba(255,220,130,1), 0 0 22px 8px rgba(255,200,90,.7); } 50% { box-shadow: 0 0 0 3px rgba(255,220,130,.55), 0 0 34px 14px rgba(255,200,90,.35); } }
@media (orientation: landscape) and (max-height: 520px) { .na-next { text-align: left !important; } }
/* ice palace sunbeam */
.na-sunbeam { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; overflow: visible; }
.na-sunbeam polyline { fill: none; stroke: rgba(255,236,170,.85); stroke-width: 7; vector-effect: non-scaling-stroke; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(255,220,120,.9)) drop-shadow(0 0 22px rgba(255,210,110,.6)); mix-blend-mode: screen; animation: naBeam 2.6s ease-in-out infinite; }
@keyframes naBeam { 50% { stroke: rgba(255,240,190,.65); } }
/* bell tune card */
.na-tune { display: flex; justify-content: center; align-items: flex-end; gap: 12px; margin: 6px 0 4px; }
.na-tbell { display: grid; justify-items: center; gap: 6px; }
.na-tbell svg { width: calc(64px * var(--s)); height: auto; fill: #D9A93A; filter: drop-shadow(0 3px 0 #9C6A1A); }
.na-tbell b { font: 600 18px/1 'Oswald', sans-serif; color: var(--na-ink); }
/* hidden-number pictures keep their shape: never cropped by the height cap */
.na-pic.hid { width: min(100%, calc(56vh * var(--r, 1.6))); }
@media (orientation: landscape) and (max-height: 520px) {
  .na-pic.hid { width: min(100%, calc((100vh - 120px) * var(--r, 1.6))); }
  .na-card .na-tip { margin: 6px 0; font-size: 12px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .na-card:has(.na-pic.hid) { display: grid; grid-template-columns: auto 1fr; column-gap: 20px; align-items: center; width: min(820px, 100%); }
  .na-card:has(.na-pic.hid) > .na-day, .na-card:has(.na-pic.hid) > h3 { grid-column: 1 / -1; justify-self: center; }
  .na-card:has(.na-pic.hid) > .na-pic.hid { grid-column: 1; grid-row: 3 / span 3; width: calc(100vh - 130px); }
  .na-card:has(.na-pic.hid) > .na-tip, .na-card:has(.na-pic.hid) > .na-lock, .na-card:has(.na-pic.hid) > .na-row { grid-column: 2; }
}
/* sky maze: clouds to weave between */
.na-maze.sky { background: linear-gradient(180deg, #13284A, #2A4B7C); }
.na-maze.sky .na-cell.path { background: transparent; }
.na-maze.sky .na-cell.wall { background: radial-gradient(ellipse at 50% 60%, #FFFFFF, #DCE6F2 55%, rgba(200,214,232,.85) 75%, transparent 76%); box-shadow: none; }
.na-final-msg { margin: 14px 0 !important; font: 600 clamp(18px, 3vw, 26px)/1.3 'Oswald', sans-serif !important; color: #1F6B4A; text-transform: uppercase; }
.na-bigkey { display: block; width: 110px !important; height: auto !important; margin: 0 auto 10px; filter: drop-shadow(0 8px 14px rgba(150,100,20,.45)); animation: naPop .8s ease; }
#nx-advent .na-sitem[data-sitem="bigkey"].on { filter: drop-shadow(0 0 10px rgba(255,210,110,.95)) drop-shadow(0 4px 6px rgba(0,0,0,.35)); }
/* the who-is-playing card: name, then the grown ups' optional present */
.na-form.two { flex-direction: column; align-items: stretch; max-width: 360px; margin: 0 auto; }
.na-form.two .na-in { width: 100%; }
.na-form.two .na-btn { align-self: center; margin-top: 6px; }
.na-gl { font: 500 13px/1.45 'Manrope', sans-serif; color: #6B5B4B; text-align: left; margin: 8px 2px -2px; }
#nx-advent .na-form.two .na-in { max-width: none; } #nx-advent .na-form.two .na-in[name="gift"] { font: 600 18px/1.2 'Manrope', sans-serif; text-transform: none; }
.na-when { margin: 12px 0 0; color: rgba(255,255,255,.75); font: 500 14px/1.5 'Manrope', sans-serif; }
#nx-advent .na-when .na-link { margin-left: 2px; color: #FFE6A6; }
/* logged in, WordPress puts its admin bar over the top of the page: hide it while a game is open */
body:has(#nx-advent.is-open) #wpadminbar { display: none !important; }

/* no double-tap zoom inside the game */
:where(#nx-advent, #nx-advent *) { touch-action: manipulation; }
