/*
 * PC layout for canvas invitations (screens >= 768px), after chungdoi.com:
 * - opening screen fills the whole window: its background spreads edge to edge and the cover card is
 *   enlarged to the window height (desktop.js);
 * - the opened card is a 600px column, exactly the artboard width (canvas.js reads --cv-max-w), so no
 *   white side margins show (owner's choice, 2026-10-09, all templates incl. bh-06).
 * ch-* skins ship their own desktop layout; covers with special scaling (lc-18/29/41/48) keep theirs.
 * Switch off: ?wide=0 on a URL, or option dtc_iv_wide = off (see inc/invitation-motion.php).
 */
@media (min-width: 768px) {
	body.cv-body:not([class*="skin-ch-"]) .iv-page { max-width: 600px; --cv-max-w: 600; }
	body.cv-body:not([class*="skin-ch-"]):not(.skin-lc-18):not(.skin-lc-29):not(.skin-lc-41):not(.skin-lc-48) .iv-intro { max-width: none; }
	/* Fixed bars follow the column. */
	body.cv-body:not([class*="skin-ch-"]) .iv-demobar { max-width: 600px; }
	body.cv-body:not([class*="skin-ch-"]) .iv-music { right: max(16px, calc(50% - 284px)); }
	/* lc-41 / lc-48 keep their own 500px cover over the 600px opened card, whose white plaster first
	   section showed as 50px white strips each side. Until the invitation opens, the card behind is hidden
	   and the cover stands as a card on the page background (owner 2026-10-11; phones unchanged). */
	html.iv-locked:not(.iv-opened) body.skin-lc-41 .iv-page,
	html.iv-locked:not(.iv-opened) body.skin-lc-48 .iv-page { background: transparent; box-shadow: none; }
	html.iv-locked:not(.iv-opened) body.skin-lc-41 #iv-content,
	html.iv-locked:not(.iv-opened) body.skin-lc-48 #iv-content { visibility: hidden; }
	body.skin-lc-41 .iv-intro, body.skin-lc-48 .iv-intro { box-shadow: 0 24px 60px rgba(60, 30, 20, .22), 0 6px 16px rgba(60, 30, 20, .12); }
}
/* No jumping on arrival (PC and phones): the cover card waits hidden until its final size, shape and
   place are set (theme fit, ornament fit, PC enlarging, webfonts), then fades in once.
   Shown after 1.5s anyway if the script never runs. */
body.cv-body:not(.dk-ready) .iv-intro > .cv { opacity: 0; animation: dkShow 0s 1.5s forwards; }
body.cv-body .iv-intro > .cv { transition: opacity .45s ease; }
@keyframes dkShow { to { opacity: 1; } }
/* PC: on the live site (Cloudflare tunnel) desktop.js can arrive 3-5s after this stylesheet, so the 1.5s
   safety reveal showed the card at its raw size, then it was rescaled in view ("giật"). On PC wait for the
   script (it reveals as soon as the card is sized) and keep the safety net only for a script that never
   runs. Phones keep 1.5s (owner 2026-10-11: mobile is final). */
@media (min-width: 768px) {
	body.cv-body:not(.dk-ready) .iv-intro > .cv { animation-delay: 8s; }
}
/* All sizes - the cover background is handed to the whole opening screen (desktop.js), so the 420px
   canvas never shows as a strip of another shade. Photo backgrounds: blurred copy edge to edge. */
.dk-backdrop { position: absolute; inset: -40px; z-index: 0; pointer-events: none; background-position: center; background-size: cover; filter: blur(22px) brightness(.92); }
.iv-intro > .cv { position: relative; z-index: 1; }
/* Paper grain multiplied over the cream page (desktop.js TWEAKS.paper). */
.dk-paper { position: absolute; inset: 0; z-index: 0; pointer-events: none; background-repeat: repeat; background-position: center top; mix-blend-mode: multiply; }
/* Background bleed (desktop.js TWEAKS.bleed): section backgrounds painted edge to edge behind the card. */
.dk-bleed { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.dk-bleed__row { position: absolute; left: 0; right: 0; }
.dk-bleed__tex { position: absolute; inset: 0; background-position: center top; background-repeat: repeat; }
/* Repeated faint background picture down the whole opened card (desktop.js TWEAKS.tile, e.g. bh-06 castle). */
#iv-content.dk-tile::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background-image: var(--dk-tile); background-repeat: repeat-y; background-size: var(--dk-tile-w) auto; background-position: center var(--dk-tile-y); opacity: var(--dk-tile-o, .1); }
/* The cover's paper texture, now spread over the whole opening screen. */
.iv-intro .dk-hide { visibility: hidden; }
