/* Spec 434: "Your board game year" - the 9:16 slides (app, public link, demo), the year chips, the public link block
   and the guest page of a year link (.yl-page, in the landing's static frame with home-landing.css). */

.ys-page *,
.ys-page *::before,
.ys-page *::after,
.yl-page *,
.yl-page *::before,
.yl-page *::after {
    box-sizing: border-box;
}

/* Each part on its own block (UI guidelines), not divided by lines. */
.ys-block {
    margin: 0 0 1rem;
    padding: 1.1rem 1.1rem 1.2rem;
    background: var(--tt-area);
    border-top: 3px solid var(--tt-rule, var(--tt-line));
    color: var(--tt-ink);
    overflow-wrap: anywhere;
}

.ys-block h2 {
    font-family: var(--tt-font-display);
    font-size: clamp(1.15rem, 3.4vw, 1.4rem);
    margin: 0 0 0.6rem;
}

.ys-block p {
    margin: 0 0 0.75rem;
}

.ys-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
}

.ys-story {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem;
}

.ys-slides {
    width: 100%;
    display: grid;
    justify-items: center;
    gap: 1rem;
}

/* Rule 15: the 9:16 frame fits the screen height; the text scales with the frame's width. */
.ys-slide {
    container-type: inline-size;
    /* 16rem rather than 12rem leaves the dots and the share button on screen under the frame. */
    width: min(100%, calc((100dvh - 16rem) * 9 / 16));
    min-width: min(100%, 17rem);
    aspect-ratio: 9 / 16;
    display: flex;
    flex-direction: column;
    gap: 0.6em;
    padding: 1.4em 1.3em;
    overflow: hidden;
    background: var(--tt-area);
    border-top: 0.3em solid var(--tt-rule, var(--tt-line));
    color: var(--tt-ink);
    font-size: clamp(11px, 4.4cqi, 22px);
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ys-slide[hidden] {
    display: none;
}

.ys-kicker {
    margin: 0;
    color: var(--tt-accent);
    font-weight: 700;
    font-size: 0.8em;
    letter-spacing: 0.08em;
}

.ys-title {
    margin: 0 0 0.3em;
    font-family: var(--tt-font-display);
    font-size: 1.75em;
    line-height: 1.15;
    display: flex;
    align-items: center;
    gap: 0.3em;
}

.ys-body {
    display: flex;
    flex-direction: column;
    gap: 0.7em;
    flex: 1 1 auto;
    min-height: 0;
}

.ys-numbers {
    display: grid;
    gap: 0.6em;
}

.ys-numbers--four {
    grid-template-columns: 1fr 1fr;
}

.ys-number {
    display: grid;
    gap: 0.15em;
    padding: 0.7em 0.8em;
    background: var(--tt-field);
    border: 1px solid var(--tt-line);
}

.ys-number strong {
    font-family: var(--tt-font-display);
    font-size: 2.2em;
    line-height: 1.05;
}

.ys-numbers--four .ys-number strong {
    font-size: 1.6em;
}

.ys-number span {
    color: var(--tt-muted);
    font-size: 0.85em;
}

.ys-number small {
    color: var(--tt-accent);
    font-weight: 700;
    font-size: 0.8em;
}

.ys-note,
.ys-line {
    margin: 0;
    color: var(--tt-muted);
    font-size: 0.85em;
}

.ys-line {
    color: var(--tt-ink);
    font-size: 0.95em;
}

.ys-games {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.5em;
}

.ys-game {
    display: flex;
    align-items: center;
    gap: 0.6em;
    min-width: 0;
}

.ys-game .planner-game-thumb {
    width: 2.8em;
    height: 2.8em;
    flex: 0 0 2.8em;
    object-fit: contain;
    border: 1px solid var(--tt-line);
}

.ys-game .planner-game-thumb-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tt-box);
    color: var(--tt-ink);
    font-weight: 800;
    font-size: 0.85em;
}

.ys-game-text {
    display: grid;
    min-width: 0;
}

.ys-game-title {
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ys-rank {
    color: var(--tt-accent);
}

.ys-game-line {
    color: var(--tt-muted);
    font-size: 0.8em;
}

.ys-games--grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ys-games--grid .ys-game {
    flex-direction: column;
    align-items: flex-start;
}

.ys-games--grid .ys-game-title {
    font-size: 0.8em;
}

.ys-months {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-height: 8em;
    max-height: 60%;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 0.25em;
    align-items: end;
}

.ys-months li {
    height: 100%;
    display: grid;
    grid-template-rows: auto 1fr auto;
    justify-items: center;
    gap: 0.2em;
    font-size: 0.65em;
}

.ys-month-bar {
    align-self: end;
    width: 100%;
    height: var(--ys-bar);
    min-height: 2px;
    background: var(--tt-rule, var(--tt-line));
}

.ys-months li.is-busiest .ys-month-bar {
    background: var(--tt-accent);
}

.ys-month-name {
    color: var(--tt-muted);
}

.ys-people,
.ys-pro-list {
    margin: 0;
    padding-left: 1.2em;
    display: grid;
    gap: 0.3em;
}

.ys-person-name {
    font-weight: 700;
}

.ys-person-plays {
    color: var(--tt-muted);
    font-size: 0.85em;
}

.ys-big {
    margin: auto 0 0;
    font-family: var(--tt-font-display);
    font-size: 2.2em;
    font-weight: 800;
    color: var(--tt-accent);
    text-align: center;
}

.ys-logo {
    display: flex;
    justify-content: center;
    font-size: 16px;
}

.ys-pro-plans {
    align-self: flex-start;
    margin-top: auto;
}

/* Rule 14: previous, the dots, next. */
.ys-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
}

.ys-nav .game-card-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ys-dots {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.15rem;
}

.ys-dot {
    width: 28px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.ys-dot::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    transform: translate(-50%, -50%);
    border: 2px solid var(--tt-line);
    background: var(--tt-field);
}

.ys-dot.is-selected::before {
    border-color: var(--ui-accent, var(--tt-accent));
    background: var(--ui-accent, var(--tt-accent));
}

/* Rule 6: the year chips in the selected look of the UI guidelines. */
.ys-years {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ys-chip {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.3rem 0.9rem;
    border: 1px solid var(--tt-line);
    background: var(--tt-field);
    color: var(--tt-ink);
    font-weight: 700;
    text-decoration: none;
}

.ys-chip:hover {
    border-color: var(--ui-accent, var(--tt-accent));
    text-decoration: none;
}

.ys-chip.is-selected {
    border-color: var(--ui-accent, var(--tt-accent));
    background: var(--ui-accent-soft, var(--tt-accent-soft));
    color: var(--ui-text, var(--tt-ink));
}

.ys-link-url {
    width: 100%;
    margin: 0 0 0.75rem;
}

.ys-link .ys-actions,
.ys-empty .ys-actions {
    justify-content: flex-start;
}

/* Rule 8: the dashboard's "ready" block. */
.home-year-ready .home-summary-head {
    margin-bottom: 0.75rem;
}

/* Rules 20-22: the public page of a year link. */
.yl-page {
    width: min(760px, 100% - 2rem);
    margin-inline: auto;
    padding: 1rem 0 2rem;
    color: var(--tt-ink);
    line-height: 1.5;
}

.yl-page h1 {
    font-family: var(--tt-font-display);
    font-size: clamp(1.5rem, 5vw, 2.1rem);
    line-height: 1.2;
    margin: 0 0 1rem;
}

.yl-page .ys-slides {
    margin-bottom: 1rem;
}

.yl-page .ys-slide {
    width: min(100%, 26rem);
}

.yl-gains {
    margin: 0 0 1rem;
    padding-left: 1.2rem;
}

.yl-bgg {
    margin: 0 0 1rem;
}

.yl-topbar-actions {
    gap: 0.45rem;
}

.yl-pitch .gl-actions {
    margin-bottom: 0.25rem;
}

@media (max-width: 420px) {
    .yl-topbar .gl-topbar-login {
        display: none;
    }
}

/* Rule 7: the "Your year" button beside "Add play session" on the list of plays. */
.plays-page .plays-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.plays-page .plays-year-btn {
    width: auto;
    margin: 0;
}
