/* XMAS · shared page rhythm, reading surfaces and screening frames */
html[data-theme=xmas] {
    --xmas-section-space: clamp(3.25rem, 6vw, 6rem);
    --xmas-page-gutter: clamp(1rem, 3.2vw, 2rem);
    --xmas-film-edge: color-mix(in srgb, var(--am) 45%, transparent);
    --xmas-film-shadow: 0 18px 36px color-mix(in srgb, var(--bg) 42%, transparent);
    scroll-padding-top: calc(6.5rem + env(safe-area-inset-top, 0px));
}

html[data-theme=xmas].live-on {
    scroll-padding-top: calc(9.75rem + env(safe-area-inset-top, 0px));
}

html[data-theme=xmas] :is(.ff-wrap, .ff-aw, .ff-legacy main.ff-content-page) {
    padding-inline: var(--xmas-page-gutter);
}

html[data-theme=xmas] .ff-sec + .ff-sec {
    padding-block-start: var(--xmas-section-space);
}

html[data-theme=xmas] :is(.ff-sh, .ff-page-intro, .ff-screening-intro) {
    row-gap: clamp(.875rem, 2.2vw, 1.5rem);
}

html[data-theme=xmas] :is(.ff-page-opening, .ff-page-intro, .ff-screening-intro, .ff-error-page) h1 {
    text-wrap: balance;
    overflow-wrap: anywhere;
}

html[data-theme=xmas] :is(.ff-card, .ff-story-slide, .ff-event-story, .ff-film-card, .ff-job-offer) h3 {
    text-wrap: pretty;
    overflow-wrap: anywhere;
}

html[data-theme=xmas] :is(.ff-prose, .ff-broadcast-copy, .ff-content-page) :is(p, li, dd) {
    text-wrap: pretty;
}

html[data-theme=xmas] .ff-prose :where(a:not(.ff-btn)) {
    text-decoration: underline;
    text-decoration-color: color-mix(in srgb, currentColor 55%, transparent);
    text-underline-offset: .22em;
}

html[data-theme=xmas] :is(.ff-fi, .ff-lbl input, .ff-lbl select, .ff-lbl textarea, .tips-field-v1070 input, .tips-field-v1070 textarea):focus-visible {
    outline: 2px solid var(--am);
    outline-offset: 3px;
}

html[data-theme=xmas] .ff-broadcast-layout {
    border-color: var(--xmas-film-edge);
    background: linear-gradient(123deg, color-mix(in srgb, var(--panel-raised) 88%, transparent), var(--bg) 74%);
    gap: clamp(1.25rem, 3vw, 2.5rem);
    padding: clamp(1rem, 3vw, 2.25rem);
    box-shadow: var(--xmas-film-shadow);
}

html[data-theme=xmas] :is(.ff-projection-frame, .ff-library-feature, .ff-release-section > .ff-youtube-screen, .ff-youtube-live-player) {
    border: 1px solid var(--xmas-film-edge);
    border-radius: var(--radius-panel);
    background: var(--panel);
    overflow: hidden;
    box-shadow: var(--xmas-film-shadow);
}

html[data-theme=xmas] .ff-library-feature figcaption {
    padding: .75rem 1rem;
    border-block-start: 1px solid var(--ln);
}

html[data-theme=xmas] .ff-youtube-idle {
    background:
        linear-gradient(180deg, color-mix(in srgb, var(--bg) 55%, transparent), color-mix(in srgb, var(--bg) 92%, transparent)),
        url('/assets/xmas/market-night.webp') center 58% / cover;
}

html[data-theme=xmas] .ff-youtube-live-message {
    gap: .75rem 1rem;
    padding: 1rem;
    background: linear-gradient(145deg, var(--panel-raised), var(--panel) 70%);
}

html[data-theme=xmas] .ff-youtube-live-player .ff-media-panel {
    border: 0;
}

html[data-theme=xmas] .ff-youtube-live-message p {
    line-height: 1.45;
}

html[data-theme=xmas] .tips-main-grid-v1070 {
    align-items: start;
}

html[data-theme=xmas] .tips-podium-grid-v1070 {
    list-style: none;
    padding: 0;
}

html[data-theme=xmas] .tips-podium-v1070.rank-1:first-child {
    border-color: var(--xmas-film-edge);
    background: linear-gradient(145deg, color-mix(in srgb, var(--am) 12%, var(--panel-raised)), var(--panel) 68%);
}

html[data-theme=xmas] .tips-podium-v1070 strong,
html[data-theme=xmas] .tips-message-top-v1070 span {
    overflow-wrap: anywhere;
}

html[data-theme=xmas] .ff-support-source {
    color: var(--gn);
    font-weight: 700;
}

html[data-theme=xmas] .ff-support-source[data-source=YouTube] {
    color: var(--rd);
}

html[data-theme=xmas] .ff-youtube-support {
    padding-block: clamp(2rem, 4vw, 3.5rem);
}

html[data-theme=xmas] .ff-youtube-support-actions {
    margin-block: 1rem 1.5rem;
}

html[data-theme=xmas] .ff-youtube-support-feed {
    padding: clamp(1rem, 3vw, 1.75rem);
    border-color: var(--xmas-film-edge);
}

html[data-theme=xmas] .ff-youtube-support-feed-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    flex-wrap: wrap;
    gap: 1rem;
    padding-block-end: 1rem;
    border-block-end: 1px solid var(--ln);
}

html[data-theme=xmas] .ff-youtube-support-feed-head h3 {
    margin: 0 0 .25rem;
    color: var(--tx);
}

html[data-theme=xmas] .ff-youtube-support-feed-head h3 i {
    margin-inline-end: .4rem;
    color: var(--rd);
}

html[data-theme=xmas] .ff-youtube-support-feed-head p,
html[data-theme=xmas] .ff-youtube-support-filter {
    margin: 0;
}

html[data-theme=xmas] .ff-youtube-support-feed [hidden] {
    display: none;
}

html[data-theme=xmas] .ff-youtube-support-status {
    margin: 1rem 0 0;
}

html[data-theme=xmas] .ff-youtube-support-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: .75rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

html[data-theme=xmas] .ff-youtube-support-event {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, auto);
    gap: .75rem;
    padding: .875rem;
    border: 1px solid var(--ln);
    border-radius: var(--radius-control);
    background: color-mix(in srgb, var(--bg) 78%, var(--panel-raised));
    overflow-wrap: anywhere;
}

html[data-theme=xmas] :is(.ff-youtube-support-event-copy, .ff-youtube-support-event-meta) {
    display: grid;
    align-content: start;
    gap: .18rem;
    min-width: 0;
}

html[data-theme=xmas] .ff-youtube-support-event-meta {
    text-align: end;
    font-variant-numeric: tabular-nums;
}

html[data-theme=xmas] .ff-youtube-support-event-type {
    color: var(--am);
    font-weight: 700;
}

html[data-theme=xmas] .ff-youtube-support-event strong {
    color: var(--tx);
}

html[data-theme=xmas] .ff-youtube-support-event time {
    font-size: .8rem;
}

html[data-theme=xmas] .ff-youtube-support-note {
    margin: 1rem 0 0;
}

html[data-theme=xmas] #ff-live .ff-btn {
    flex-shrink: 0;
    min-height: 34px;
    padding-block: .3rem;
    white-space: nowrap;
}

html[data-theme=xmas] #ff-live .m {
    min-width: 0;
}

/* News detail */
html[data-theme=xmas] .ff-story-header {
    padding-block-end: clamp(1.25rem, 3vw, 2rem);
    margin-block-end: clamp(1.5rem, 4vw, 2.75rem);
    border-bottom: 1px solid var(--ln);
}

.ff-story-header .ff-h1 {
    max-width: 25ch;
    margin: 0 0 .65rem;
    color: var(--tx);
    font: 700 clamp(1.85rem, 4.3vw, 3.55rem)/1.12 var(--hd);
    text-wrap: balance;
    overflow-wrap: anywhere;
}

.ff-bc .ff-story-category { color: var(--am); }

.ff-story-lead {
    max-width: 62ch;
    margin: 0 0 1.35rem;
    color: var(--mu);
    font-size: clamp(1rem, 1.8vw, 1.22rem);
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.ff-story-header .ff-article-figure { margin-block-end: 1.15rem; }

.ff-story-header .ff-hero-img {
    padding: 0;
    overflow: hidden;
    border-color: var(--ln);
    border-radius: var(--radius-panel);
}

.ff-story-header .ff-hero-img .ff-media { border-radius: inherit; }

.ff-story-byline {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    margin-block-end: 1.15rem;
    overflow-wrap: anywhere;
}

.ff-story-initial {
    display: grid;
    flex: 0 0 2.75rem;
    place-items: center;
    aspect-ratio: 1;
    border-radius: 50%;
    border: 1px solid var(--ln);
    background: var(--glass-fill);
    color: var(--am);
    font: 700 1.2rem var(--hd);
}

.ff-story-byline p { margin: 0; font-size: .95rem; }
.ff-story-byline a { color: var(--am); font-weight: 700; text-underline-offset: .2em; text-decoration: underline; }

.ff-story-dates {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem .9rem;
    margin-block-start: .22rem;
    color: var(--mu);
    font-size: .82rem;
    line-height: 1.5;
}

.ff-story-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-block-end: .75rem;
}

:is(.ff-story-action, .ff-story-google) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .5rem .73rem;
    min-height: 44px;
    max-width: 100%;
    border: 1px solid var(--ln);
    border-radius: 8px;
    background: var(--glass-fill);
    color: var(--tx);
    cursor: pointer;
    font: 650 .82rem/1.35 var(--bd);
    text-align: start;
    overflow-wrap: anywhere;
}

:is(.ff-story-action, .ff-story-google) .ic { flex-shrink: 0; color: var(--am); }
:is(.ff-story-action, .ff-story-google):hover { border-color: var(--am); text-decoration: none; }
:is(.ff-story-action, .ff-story-google):focus-visible { outline: 2px solid var(--am); outline-offset: 3px; }
.ff-story-action[hidden], .ff-story-action-status[hidden] { display: none; }
.ff-story-action[aria-pressed=true] { border-color: var(--am); color: var(--am); }
.ff-story-action[aria-pressed=true] .ic { fill: currentColor; }
.ff-story-action[aria-disabled=true] { cursor: wait; }
.ff-story-action-status { margin: 0 0 .75rem; color: var(--mu); font-size: .85rem; }
.ff-story-google { width: 100%; justify-content: flex-start; }
.ff-story-google > span:last-child { margin-inline-start: auto; }

.ff-story-discussion { margin-block: 2rem; }
.ff-story-discussion h2 { margin: 0 0 1rem; }
.ff-story-discussion .ffe-community-widget { min-height: 0; }
.ff-story-discussion .ffe-community-comments { margin-block-end: 1rem; }

@media (max-width: 650px) {
    html[data-theme=xmas] { --xmas-section-space: clamp(2.25rem, 8vw, 3.5rem); }
    html[data-theme=xmas] .ff-broadcast-layout { gap: 1rem; }
    html[data-theme=xmas] .ff-youtube-live-message .ff-btn { width: 100%; justify-content: center; }
    html[data-theme=xmas] .ff-youtube-support-filter { width: 100%; }
    html[data-theme=xmas] :is(.ff-foot-group summary, #ff-tabs a) { min-height: 44px; }
}

@media (max-width: 380px) {
    html[data-theme=xmas] #ff-live { gap: .4rem; padding-inline: .5rem; }
    html[data-theme=xmas] #ff-live .t { gap: .35rem; letter-spacing: .04em; }
    html[data-theme=xmas] #ff-live .ff-btn { padding-inline: .6rem; }
}
