/* 2026 additions on top of layout.css (2024 base) */

:root {
	--blue: #6e8fbf;   /* page background (rough: 全体の背景の色) */
	--beige: #e1c7ac; /* the stage's back wall in mv.webp */
	--wood: #7b4a2b;
	--curtain: #c9502c;
	--teal: #3f8a7c;
	--stage-w: min(100vw, 1920px); /* the hero (mv.webp, 1920x1320): actual size on a 1920 screen */
	--stage-h: calc(var(--stage-w) * .6875);
	--head: 0px; /* header height when it sits above the stage (narrow screens) */
}

html { scroll-behavior: smooth; }
html.lenis { scroll-behavior: auto; } /* Lenis (final.js) does the smoothing, anchors included */
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* 2021's floral tile (near-white), multiplied onto the blue */
body { background: url(../images/bg.gif) var(--blue); background-blend-mode: multiply; border: 0; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.video { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; box-shadow: 0 0 20px rgba(0, 0, 0, .3); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
article section .video { width: 95%; max-width: 800px; margin: 2em auto 0; }

/*-----------
header: a bar with the brand logos on the left and the language switcher on the right (as in past years)
-----------*/
header { position: static; display: flex; flex-direction: row; justify-content: space-between; align-items: center; gap: 12px; max-width: none; padding: 10px 16px; }
header .h_logo { flex-wrap: nowrap; max-width: 360px; width: 60%; }
/* white glow, so the colour logos read on the night sky */
header .h_logo p img { filter: drop-shadow(0 0 2px #fff) drop-shadow(0 0 4px #fff) drop-shadow(0 0 8px rgba(255, 255, 255, .8)); }
/* language switcher (link look comes from layout.css) */
header .lang { display: flex; flex: none; }
header .lang .active { font-size: 1.3em; line-height: 1; padding: 4px 10px; margin-left: 10px; border: 1px solid #59131b; background: #59131b; color: #fff; }
/* dark red instead of layout.css's brown */
header .lang a { border-color: #59131b; color: #59131b; }

.page { position: relative; z-index: 0; overflow-x: clip; }

/* falling snow (the PSD's snow layer, tiled at two sizes) down the whole page, scrolling with it: over the sky, gutters and stage, behind the content panel */
/* ponytail: animated background-position repaints every frame — move to transformed layers if it janks */
.page::after {
	content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
	background: url(../images/2026/snow.png) 0 0 / 1500px 1001px, url(../images/2026/snow.png) 300px 200px / 900px 601px;
	opacity: .85; animation: snow 50s linear infinite;
}
/* each layer moves a whole number of its own tiles, so the loop is seamless */
@keyframes snow { to { background-position: 0 2002px, 300px 1402px; } }
@keyframes snow-sp { to { background-position: 0 934px, 300px 1040px; } } /* phones: smaller tiles */
@media (prefers-reduced-motion: reduce) { .page::after { animation: none; } }

/*-----------
mainvisual: #mv wraps the hero image (stage, photo and logo in one) and the panel, which starts behind the stage
-----------*/
#mv { position: relative; background: none; width: var(--stage-w); margin: 0 auto; }
/* night sky (2021's header art) across the top of the page, fading into the page blue; scrolls with the page */
.page::before {
	content: ""; position: absolute; z-index: -1; top: 0; left: 0; width: 100%; height: calc(var(--head) + var(--stage-h));
	background: url(../images/2026/sky.jpg) center top / max(100%, 1934px) auto no-repeat;
	-webkit-mask-image: linear-gradient(#000 min(35%, 210px), transparent min(100%, 600px));
	mask-image: linear-gradient(#000 min(35%, 210px), transparent min(100%, 600px));
}
#mv img { border-radius: 0; }
/* over the top of the panel, which shows through the soft bottom edge of the stage's wall */
.stage_frame { position: relative; z-index: 1; display: block; width: 100%; height: auto; pointer-events: none; }

/* the ribbon logo: over the stage's top left corner, where it sits in the original illustration */
#mv .mv_logo { position: absolute; z-index: 2; left: calc(var(--stage-w) * .045); top: calc(var(--stage-w) * .15); width: calc(var(--stage-w) * .38); margin: 0; transform: rotate(-16deg); animation: mv-logo 1.5s .6s ease both; }
.mv_logo img { display: block; width: 100%; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .35)); }
@keyframes mv-logo { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mv_logo { animation: none; } }

/* loading: a white screen over everything, fading out on window load (the script at the top of page.html) */
body::after { content: ""; position: fixed; z-index: 1000; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity .8s ease; }
html.loading body::after { opacity: 1; transition: none; }
html.loading .mv_logo { animation: none; opacity: 0; } /* the logo's fade starts once the screen lifts */

/*-----------
content panel: as wide as the stage between its posts (.7365 of mv.webp), starting .3234 up behind the stage (the image's last .0833 is its own beige strip, fading out), ending on a wooden floor as wide as the posts
-----------*/
.panel {
	position: relative; text-align: center; /* no z-index: the logo has to rise above the stage */
	width: calc(var(--stage-w) * .7365); margin: calc(var(--stage-w) * -.3234) auto 0; padding: calc(var(--stage-w) * .3333) 40px 7em;
	/* plaster grain (references/texture.jpg, high-passed so it tiles) multiplied over the beige */
	background: var(--beige) url(../images/2026/texture.webp) top center / 750px; background-blend-mode: multiply;
}
.panel::after { content: ""; position: absolute; left: -4.8%; right: -4.8%; top: 100%; height: 18px; background: var(--wood); border-radius: 9px; }
.panel article { width: auto; text-align: left; }
.panel #about { padding-top: 0; }
hr.star { display: none; }

.panel > * { max-width: 1020px; margin-left: auto; margin-right: auto; } /* keep the text column readable on wide screens */

/* tighter rhythm than 2024 (which had 10em above and below every section) */
article section.day_section { margin-top: 4em; padding-bottom: 5em; }
article section.inner:nth-child(n+2) { margin-top: 4em; }
/* the panel sits inside #mv now: undo layout.css's "#mv .inner" (1200px wide hero box) on the day sub-sections */
#mv section.inner { width: 100%; height: auto; padding: 0; }
#mv section.inner:nth-child(n+2) { padding-top: 3em; }

/* the tree stands in front of the floor, its tip over the panel */
.finale { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 44% 1fr; column-gap: 2%; align-items: end; width: min(700px, 94%); margin: -70px auto 0; }
.finale img { border-radius: 0; }
/* equal side columns keep the tree in the middle; its trunk is .038 right of the image's centre, so it is pulled back by that much */
.finale_tree { width: 100%; transform: translateX(-3.8%); }
/* widths are of the 26% side column. The two are sized so they match from head to hem (the boy's hat is much taller than the girl's crown) */
.finale_girl { width: 65.4%; justify-self: end; transform: translateY(4%); } /* the last 6.5% of her image is a faint sheer hem: lowered so the solid dress stands near the boy's line */
.finale_boy { width: 56.2%; justify-self: start; }

.sns { margin-top: 2em; }
footer .credit { color: #fff; text-align: center; padding-top: 1em; font-size: .9em; }
footer .copy { color: #fff; text-align: center; padding: .4em 0 2em; }

/*-----------
day sections: one icon rule for all days (icons are 2024 placeholders)
-----------*/
/* :is(#ids) so these beat layout.css's 2024 article section#day_XXXX rules */
article section:is(#day_1201, #day_1204, #day_1208, #day_1211, #day_1215, #day_1218, #day_1222, #day_1225) { background: none; padding-top: 0; scroll-margin-top: 20px; } /* no day icons (layout.css has 2024 ones on some of these ids) */

/*-----------
advent calendar: a window of doors under the intro (like 2024's schedule).
final.js clones it into .is-dock, a bar along the bottom that slides in once this one is scrolled past.
-----------*/
.advent {
	margin: 4em auto 0; padding: 18px 20px 20px;
	background: #f1e0cd; border: 6px solid var(--wood); border-radius: 12px; box-shadow: 0 0 20px rgba(0, 0, 0, .3);
}
/* the handwritten heading (references/1FB688D0….PNG, cropped to the lettering) */
.advent_ttl { margin: 0 0 12px; }
.advent_ttl img { display: block; width: min(260px, 62%); height: auto; margin: 0 auto; border-radius: 0; }
.advent ol { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 14px; margin: 0; padding: 0; }
.advent li { margin: 0; list-style: none; }

.door { display: block; line-height: 1.4; color: #5f2628; text-align: center; text-decoration: none !important; }
.door_pic { position: relative; display: block; aspect-ratio: 2 / 1; border-radius: 6px; }
.door_pic img { display: block; width: 100%; border-radius: 6px; }
.door_cap { display: block; margin-top: 6px; }

/* date (top left) and door number (bottom right corner), as on 2024's thumbnails but in text; sized off the picture's width */
.door_pic { container-type: inline-size; }
.door_date, .door_no { position: absolute; z-index: 2; color: #fff; font: italic 500 15cqw/1 "Cormorant Garamond", Georgia, serif; pointer-events: none; }
.door_date { font-variant-numeric: lining-nums; top: 3cqw; left: 4cqw; text-shadow: 0 0 4px rgba(0, 0, 0, .6); }
.door_no { right: 0; bottom: 0; width: 30cqw; height: 30cqw; display: grid; place-items: center; padding: 10cqw 0 0 10cqw; box-sizing: border-box; font-variant-numeric: lining-nums; background: #1c5448; clip-path: polygon(100% 0, 100% 100%, 0 100%); border-bottom-right-radius: 6px; }
li:nth-child(even) > .door .door_no { background: #a3241b; }

/* the flap: stands in for the picture on locked doors only */
.door_pic::after {
	content: "";
	position: absolute; inset: 0;
	background: var(--curtain); border: 2px dashed rgba(255, 255, 255, .5); border-radius: 6px;
	z-index: 1; /* under the date and door number, which stay as on open doors */
}
a.door .door_pic::after { display: none; }

.door.is-locked { cursor: default; }
a.door:hover .door_pic img { opacity: .85; }

/* the dock: pictures only */
.page { padding-bottom: 76px; }
.advent.is-dock {
	position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; margin: 0;
	padding: 8px; background: var(--beige); border-width: 4px 0 0; border-radius: 10px 10px 0 0;
	transform: translateY(calc(100% + 24px)); transition: transform .5s ease;
}
.advent.is-dock.is-shown { transform: none; }
.is-dock .advent_ttl, .is-dock .door_cap { display: none; }
.is-dock ol { display: flex; gap: 8px; width: fit-content; max-width: 100%; margin: 0 auto; overflow-x: auto; scroll-snap-type: x mandatory; }
.is-dock li { flex: 0 0 96px; scroll-snap-align: center; }
.is-dock .is-current .door_pic { outline: 3px solid var(--teal); outline-offset: -3px; }

@media screen and (min-width: 769px) {
	body { font-size: 13px; }
}

/* room beside the star: the header lies over the sky in the stage's top corners, so the stage starts at the top of the page */
@media screen and (min-width: 900px) {
	header { position: absolute; z-index: 4; top: 0; left: 0; right: 0; }
}
@media screen and (max-width: 899px) {
	:root { --head: 56px; }
	header { box-sizing: border-box; height: var(--head); }
}

@media screen and (max-width: 768px) {
	header { padding: 8px; }
	header .lang a, header .lang .active { margin-left: 4px; padding: 4px 6px; }
	.page::after { background-size: 700px 467px, 420px 280px; animation-name: snow-sp; }
	.panel { padding-left: 12px; padding-right: 12px; padding-bottom: 5em; }
	.panel::after { height: 12px; border-radius: 0; }
	.finale { margin-top: -40px; }

	/* the phone hero (mv_sp.webp, 1170x1678): the photo runs the stage's full width and fades out at the bottom, onto the panel */
	:root { --stage-h: calc(var(--stage-w) * 1.434); }
	.panel { width: calc(var(--stage-w) * .904); margin-top: calc(var(--stage-w) * -.1); padding-top: calc(var(--stage-w) * .2); }
	/* level, across the bottom of the photo */
	#mv .mv_logo { left: calc(var(--stage-w) * .07); top: calc(var(--stage-w) * 1.08); width: calc(var(--stage-w) * .86); transform: none; }
	/* the 11/30 teaser's phone hero (mv_first_sp.webp) is the stage (top .76 of the width) over a long plain beige wall:
	   the panel starts right under the stage and covers the wall, the logo sits at its top */
	#mv.teaser .panel { z-index: 1; margin-top: calc(var(--stage-w) * -.674); padding-top: calc(var(--stage-w) * .43); }
	#mv.teaser .mv_logo { top: calc(var(--stage-w) * .775); }

	.advent { padding: 12px; }
	.advent:not(.is-dock) ol { grid-template-columns: 1fr 1fr; gap: 12px 10px; }

	/* the dock on phones: a floating card clear of the screen edges (and the browser's bottom bar), with doors big enough to tap and swipe */
	.page { padding-bottom: 130px; }
	.advent.is-dock { left: 10px; right: 10px; bottom: 12px; padding: 8px; border-width: 4px; border-radius: 12px; box-shadow: 0 4px 16px rgba(0, 0, 0, .45); }
	.is-dock li { flex-basis: 34vw; } /* two and a half doors showing: the cut-off one says "swipe" */
}

/* photo grids: two across, or four across (.four) with portrait-cropped thumbs; the lightbox shows the whole photo */
article .btn + h5.min_ttl { margin-top: 5em; } /* a second block after the first one's button (12/25: survey, then campaign) */
article h5.min_ttl + .img_box { margin-top: 2em; margin-bottom: 2em; } /* an image right under a small heading (12/25 survey and campaign) */
article section .img_box.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1em; }
article section .img_box.gallery.four { grid-template-columns: repeat(4, 1fr); margin-top: 1.5em; }
.img_box.gallery.four img { aspect-ratio: 5 / 7; object-fit: cover; }
@media (max-width: 768px) { article section .img_box.gallery.four { grid-template-columns: repeat(2, 1fr); } }

/* placeholders (2024 assets standing in): darkened and labelled. Remove the .ph class when the real asset lands */
.ph { position: relative; display: block; container-type: inline-size; }
.ph img, .ph iframe { filter: brightness(.3); }
.ph::before { content: "PLACEHOLDER"; position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 9cqw; letter-spacing: .1em; pointer-events: none; }
