.watch-page {
    width: min(1800px, calc(100% - 48px));
    max-width: none;
    padding-block: 24px 70px;
    direction: rtl;
}

.watch-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        450px;
    align-items: start;
    gap: 24px;
}

.watch-main {
    min-width: 0;
    grid-column: 1;
}

.recommendation-rail {
    min-width: 0;
    grid-column: 2;
}

.video-rail-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-bottom: 15px; padding: 5px; border: 1px solid #dde3eb; border-radius: 14px; background: #f4f6f9; box-shadow: 0 8px 24px rgba(27,47,77,.05); }
.video-rail-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 10px; border: 0; border-radius: 10px; background: transparent; color: #687386; font-size: .8rem; font-weight: 800; cursor: pointer; transition: background-color .18s ease, color .18s ease, box-shadow .18s ease; }
.video-rail-tab:hover { color: var(--primary-text); }.video-rail-tab.active { background: #fff; color: var(--brand-color); box-shadow: 0 2px 9px rgba(27,47,77,.1); }.video-rail-tab span { color: #7357d9; }
.video-tutor-panel {
    width: 100%;
    min-width: 0;
    height: clamp(560px, 68vh, 700px);
    min-height: 0;
    overflow: hidden;
    border: 1px solid #dce3ed;
    border-radius: 18px;
    background: #fbfcfe;
    box-shadow: 0 16px 40px rgba(27,47,77,.08);
}
.video-tutor-panel:not([hidden]):not(.focus-mode) {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
}
.video-tutor-panel:not(.focus-mode) .video-tutor-introduction {
    min-height: 48px;
    padding: 10px 12px 9px 96px;
    text-align: right;
}
.video-tutor-panel:not(.focus-mode) .video-tutor-mark,
.video-tutor-panel:not(.focus-mode) .video-tutor-status,
.video-tutor-panel:not(.focus-mode) .video-tutor-introduction p {
    display: none;
}
.video-tutor-panel:not(.focus-mode) .video-tutor-introduction h2 {
    margin: 0;
    font-size: .88rem;
    line-height: 1.55;
}
.video-tutor-panel:not(.focus-mode) .video-tutor-expand {
    top: 8px;
    left: 9px;
    min-height: 30px;
    padding: 4px 8px;
    font-size: .64rem;
}
.video-tutor-panel.focus-mode { position: fixed; inset: 0; z-index: 2000; display: flex !important; width: 100%; height: 100dvh; min-height: 0; flex-direction: column; overflow: hidden; border: 0; border-radius: 0; background: #f7f9fc; box-shadow: none; }
body.video-tutor-focus-open { overflow: hidden; }
.video-tutor-panel.focus-mode .video-tutor-introduction { padding-block: 18px 16px; }
.video-tutor-panel.focus-mode .video-tutor-mark { width: 42px; height: 42px; margin-bottom: 7px; border-radius: 13px; }
.video-tutor-panel.focus-mode .video-tutor-introduction h2 { margin-block: 7px 4px; }
.video-tutor-panel.focus-mode .video-tutor-context,
.video-tutor-panel.focus-mode .video-tutor-messages,
.video-tutor-panel.focus-mode .video-tutor-form,
.video-tutor-panel.focus-mode .video-tutor-note { width: min(900px, calc(100% - 32px)); margin-inline: auto; }
.video-tutor-panel.focus-mode .video-tutor-context { margin-block: 16px 0; }
.video-tutor-panel.focus-mode .video-tutor-messages { min-height: 240px; max-height: none; flex: 1; margin-block: 8px; padding-block: 16px; }
.video-tutor-panel.focus-mode .video-tutor-message { max-width: min(76%, 680px); font-size: .85rem; }
.video-tutor-panel.focus-mode .video-tutor-form { margin-block: 0 9px; }
.video-tutor-panel.focus-mode .video-tutor-form textarea { min-height: 64px; font-size: .84rem; }
.video-tutor-panel.focus-mode .video-tutor-note { margin-block-end: 14px; }
.video-tutor-introduction { position: relative; padding: 22px 22px 18px; border-bottom: 1px solid #e5eaf1; background: radial-gradient(circle at 10% 5%,#e0eaff 0,transparent 40%),linear-gradient(145deg,#fff,#f3f7ff); text-align: center; }
.video-tutor-expand { position: absolute; top: 13px; left: 13px; display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 6px 10px; border: 1px solid #d7dfeb; border-radius: 10px; background: rgba(255,255,255,.9); color: #536177; font: inherit; font-size: .68rem; font-weight: 800; cursor: pointer; box-shadow: 0 5px 14px rgba(27,47,77,.08); transition: border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease; }.video-tutor-expand:hover { border-color: #9bb0ce; color: #2563eb; transform: translateY(-1px); box-shadow: 0 7px 18px rgba(27,47,77,.12); }.video-tutor-expand:focus-visible { outline: 3px solid rgba(37,99,235,.18); outline-offset: 2px; }.video-tutor-expand[aria-pressed="true"] { border-color: #b9c8de; background: #eef4ff; color: #2563eb; }
.video-tutor-mark { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 15px; background: #2563eb; color: #fff; font-size: 1.25rem; box-shadow: 0 10px 24px rgba(37,99,235,.22); }.video-tutor-status { display: inline-flex; padding: 4px 8px; border-radius: 7px; background: #eef2f7; color: #6f7a8b; font-size: .68rem; font-weight: 800; }.video-tutor-introduction h2 { margin: 10px 0 7px; font-size: 1.12rem; line-height: 1.65; }.video-tutor-introduction p { max-width: 350px; margin: 0 auto; color: #647084; font-size: .8rem; line-height: 1.9; }
.video-tutor-context {
    display: grid;
    min-width: 0;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: baseline;
    gap: 7px;
    margin: 6px 15px 4px;
    padding: 6px 9px;
    border: 1px solid #e0e6ef;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 5px 15px rgba(27,47,77,.04);
}
.video-tutor-context small { color: #7b8696; font-size: .62rem; white-space: nowrap; }
.video-tutor-context strong { min-width: 0; overflow: hidden; font-size: .75rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.video-tutor-messages {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    gap: 10px;
    margin: 0 15px 10px;
    padding: 10px 2px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}
.video-tutor-message {
    box-sizing: border-box;
    width: fit-content;
    min-width: 0;
    max-width: 88%;
    flex: 0 0 auto;
    padding: 10px 13px;
    border-radius: 14px;
    font-size: .8rem;
    line-height: 1.9;
    direction: rtl;
    unicode-bidi: plaintext;
    text-align: start;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
    box-shadow: 0 4px 12px rgba(27,47,77,.06);
}
.video-tutor-message.assistant { align-self: flex-start; border: 1px solid #dce3ed; border-end-start-radius: 5px; background: #fff; color: #4d596d; }
.video-tutor-message.user { align-self: flex-end; border-end-end-radius: 5px; background: linear-gradient(145deg,#22c55e,#15803d); color: #fff; box-shadow: 0 7px 18px rgba(22,163,74,.22); }
.video-tutor-form {
    display: flex;
    min-width: 0;
    flex: 0 0 auto;
    align-items: stretch;
    gap: 8px;
    margin: 0 15px 9px;
    padding-top: 2px;
}
.video-tutor-form textarea { box-sizing: border-box; min-width: 0; min-height: 58px; flex: 1 1 auto; resize: none; padding: 11px 12px; border: 1px solid #cbd5e1; border-radius: 12px; background: #fff; color: #263044; font: inherit; font-size: .78rem; line-height: 1.7; transition: border-color .18s ease, box-shadow .18s ease; }
.video-tutor-form textarea::placeholder { color: #94a3b8; }
.video-tutor-form textarea:focus { border-color: #16a34a; outline: none; box-shadow: 0 0 0 3px rgba(22,163,74,.13); }
.video-tutor-form button { min-width: 64px; flex: 0 0 auto; align-self: stretch; padding: 0 14px; border: 0; border-radius: 12px; background: #16a34a; color: #fff; font-size: .78rem; font-weight: 800; cursor: pointer; box-shadow: 0 7px 16px rgba(22,163,74,.2); transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.video-tutor-form button:hover { background: #15803d; transform: translateY(-1px); box-shadow: 0 9px 20px rgba(22,163,74,.25); }
.video-tutor-form button:disabled { background: #c5cedb; cursor: wait; box-shadow: none; transform: none; }
.video-tutor-note { min-width: 0; margin: 0 15px 15px; color: #8992a0; font-size: .65rem; line-height: 1.7; text-align: center; }
.video-detail-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Video player */

.player-frame {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 14px;
    background: #000000;
    box-shadow:
        0 4px 18px rgba(0, 0, 0, 0.12);
}

.video-player {
    display: block;
    width: 100%;
    max-height: 78vh;
    aspect-ratio: 16 / 9;
    border: 0;
    background: #000000;
    object-fit: contain;
}

.video-player-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #ffffff;
    background: #111111;
    opacity: 1;
    pointer-events: none;
    transition: opacity 240ms ease, visibility 240ms ease;
}

.video-player-loading.is-ready {
    visibility: hidden;
    opacity: 0;
}

.video-player-loading > img,
.video-player-loading-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-player-loading > img {
    object-fit: cover;
    opacity: 0.55;
}

.video-player-loading-shade {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.72));
}

.video-player-loading-content {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
}

.video-player-loading-content strong {
    font-size: 0.95rem;
}

.video-player-loading-content small {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.video-player-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid rgba(255, 255, 255, 0.32);
    border-block-start-color: #ffffff;
    border-radius: 50%;
    animation: video-player-spin 800ms linear infinite;
}

.video-player-external-link {
    display: inline-flex;
    margin-block-start: 10px;
    color: #4f6fdb;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
}

.video-player-external-link:hover,
.video-player-external-link:focus-visible {
    text-decoration: underline;
}

@keyframes video-player-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .video-player-loading {
        transition: none;
    }

    .video-player-spinner {
        animation: none;
    }
}

.video-information {
    padding-block-start: 16px;
}

.watch-title {
    margin: 0 0 15px;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    line-height: 1.5;
    text-align: right;
    overflow-wrap: anywhere;
}

/* Creator and video actions */

.watch-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.channel-summary {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
}

.channel-avatar,
.comment-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--brand-color);
    color: #ffffff;
    font-weight: 700;
}

.channel-avatar {
    width: 46px;
    height: 46px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
}

.reply-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
}

.channel-avatar img,
.comment-avatar img,
.reply-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
    object-position: center;
}

.channel-information {
    min-width: 0;
}

.channel-information strong,
.channel-information small {
    display: block;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.channel-information small {
    margin-block-start: 4px;
    color: var(--secondary-text);
    font-size: 0.78rem;
}

.video-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 9px;
}

.action-form,
.comment-like-form {
    margin: 0;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 40px;
    padding: 8px 15px;
    border: 0;
    border-radius: 20px;
    background: var(--soft-surface);
    color: var(--primary-text);
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition:
        background-color 150ms ease,
        color 150ms ease;
}

.action-button:hover {
    background: var(--hover-color);
}

.action-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.action-button[aria-pressed="true"] {
    background: #fde7ef;
    color: #c2185b;
}

.action-icon {
    font-size: 1.05rem;
}

.action-divider {
    width: 1px;
    height: 20px;
    background: #d0d0d0;
}

.share-status {
    color: var(--secondary-text);
    font-size: 0.8rem;
}

/* Description */

.description-box {
    margin-block-start: 17px;
    padding: 15px;
    border-radius: 12px;
    background: var(--soft-surface);
}

.description-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 13px;
    margin: 0 0 10px;
    font-size: 0.87rem;
}

.description-body {
    margin: 0;
    line-height: 1.9;
    text-align: start;
    overflow-wrap: anywhere;
}

/* Comments */

.comments-section {
    margin-block-start: 34px;
    transition: opacity 150ms ease;
}

.comments-section[aria-busy="true"],
.recommendations-section[aria-busy="true"] {
    pointer-events: none;
    opacity: 0.55;
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-block-end: 25px;
}

.comments-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sort-form label {
    font-size: 0.87rem;
    font-weight: 600;
}

.sort-form select {
    min-height: 39px;
    padding: 7px 11px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    outline: 0;
    background: #ffffff;
    color: var(--primary-text);
    cursor: pointer;
}

.sort-form select:focus {
    border-color: var(--brand-color);
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* New comment */

.comment-composer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-block-end: 30px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    font-size: 0.88rem;
}

.reply-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.8rem;
}

.comment-compose-body {
    min-width: 0;
    flex: 1;
}

.comment-compose-body > label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.comment-compose-body textarea,
.reply-composer textarea {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 9px 5px;
    border: 0;
    border-block-end: 1px solid #909090;
    border-radius: 0;
    outline: 0;
    background: transparent;
    color: var(--primary-text);
    line-height: 1.7;
    text-align: start;
    resize: vertical;
}

/*
 * While the textarea is empty, force its Persian
 * placeholder to start from the right.
 */
.comment-compose-body textarea:placeholder-shown,
.reply-composer textarea:placeholder-shown {
    direction: rtl;
    text-align: right;
}

.comment-compose-body textarea::placeholder,
.reply-composer textarea::placeholder {
    direction: rtl;
    color: var(--secondary-text);
    text-align: right;
    opacity: 1;
}

.comment-compose-body textarea:focus,
.reply-composer textarea:focus {
    border-block-end: 2px solid var(--primary-text);
}

.comment-form-errors {
    margin-block-start: 8px;
    color: #b91c1c;
    font-size: 0.8rem;
}

.comment-form-errors p {
    margin: 0;
}

.composer-actions {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    margin-block-start: 10px;
}

.text-button,
.primary-button {
    min-height: 36px;
    padding: 7px 15px;
    border: 0;
    border-radius: 18px;
    cursor: pointer;
    font-weight: 600;
}

.text-button {
    background: transparent;
    color: var(--primary-text);
}

.text-button:hover {
    background: var(--soft-surface);
}

.primary-button {
    background: var(--brand-color);
    color: #ffffff;
}

.primary-button:hover {
    background: #1d4ed8;
}

.login-message {
    padding: 15px;
    border-radius: 11px;
    background: var(--soft-surface);
}

.login-message a {
    color: var(--brand-color);
    font-weight: 600;
}

/* Comment list */

.comment-list {
    display: flex;
    flex-direction: column;
}

.comment {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-block: 16px;
}

.comment + .comment {
    border-block-start: 1px solid #eeeeee;
}

.comment-content {
    min-width: 0;
    flex: 1;
}

.comment-author-line {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-author-line strong {
    font-size: 0.88rem;
}

.comment-author-line small {
    color: var(--secondary-text);
    font-size: 0.75rem;
}

.comment-text {
    display: block;
    width: 100%;
    margin: 7px 0 9px;
    line-height: 1.75;
    text-align: right;
    overflow-wrap: anywhere;
    word-break: break-word;
    unicode-bidi: plaintext;
}

.comment-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.comment-like-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 5px 10px;
    border: 0;
    border-radius: 17px;
    background: transparent;
    color: #444444;
    cursor: pointer;
}

.comment-like-button:hover {
    background: var(--soft-surface);
}

.comment-like-button[aria-pressed="true"] {
    color: #c2185b;
}

.comment-like-button:disabled {
    cursor: wait;
    opacity: 0.6;
}

/* Replies */

.reply-composer {
    position: relative;
}

.reply-composer > summary {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 17px;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.reply-composer > summary::-webkit-details-marker,
.replies-toggle::-webkit-details-marker {
    display: none;
}

.reply-composer > summary:hover {
    background: var(--soft-surface);
}

.reply-composer > form {
    width: min(620px, 72vw);
    margin-block-start: 10px;
}

.reply-thread {
    margin-block-start: 10px;
}

.replies-toggle {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 18px;
    color: #065fd4;
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.replies-toggle::before {
    margin-inline-end: 7px;
    content: "⌄";
}

.reply-thread[open] > .replies-toggle::before {
    content: "⌃";
}

.replies-toggle:hover {
    background: #def1ff;
}

.reply-list {
    margin-block-start: 5px;
    margin-inline-start: 8px;
}

.reply {
    padding-block-start: 13px;
    padding-block-end: 6px;
}

.reply-list .comment + .comment {
    border-block-start: 0;
}

.guest-like-count,
.comment-login-link {
    color: var(--secondary-text);
    font-size: 0.84rem;
}

.comment-login-link {
    font-weight: 600;
}

/* Empty comments */

.empty-comments {
    padding: 38px 15px;
    color: var(--secondary-text);
    text-align: center;
}

.empty-comments h3 {
    margin: 0 0 7px;
    color: var(--primary-text);
}

.empty-comments p {
    margin: 0;
}

/* Recommendations */

.recommendations-section {
    transition: opacity 150ms ease;
}

.category-chips {
    display: flex;
    gap: 8px;
    margin-block-end: 15px;
    padding-block-end: 4px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.category-chip {
    display: inline-flex;
    align-items: center;
    min-height: 35px;
    padding: 7px 12px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: var(--soft-surface);
    font-size: 0.84rem;
    font-weight: 600;
    white-space: nowrap;
}

.category-chip:hover {
    background: var(--hover-color);
}

.category-chip.active {
    background: var(--primary-text);
    color: #ffffff;
}

.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-card {
    display: grid;
    grid-template-columns:
        168px
        minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
}

.recommendation-thumbnail {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 9px;
    background: #e5e5e5;
}

.recommendation-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 180ms ease;
}

.recommendation-card:hover .recommendation-thumbnail img {
    transform: scale(1.025);
}

.recommendation-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--secondary-text);
    font-size: 0.77rem;
}

.recommendation-duration {
    position: absolute;
    inset-inline-end: 4px;
    inset-block-end: 4px;
    padding: 3px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.82);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
}

.recommendation-information {
    min-width: 0;
}

.recommendation-information h2 {
    display: -webkit-box;
    margin: 1px 0 7px;
    overflow: hidden;
    font-size: 0.9rem;
    line-height: 1.45;
    text-align: right;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.recommendation-information p {
    margin: 3px 0;
    color: var(--secondary-text);
    font-size: 0.76rem;
    line-height: 1.4;
    text-align: right;
}

.empty-recommendations {
    padding: 22px;
    border-radius: 10px;
    background: var(--soft-surface);
    color: var(--secondary-text);
    text-align: center;
}

.empty-recommendations p {
    margin: 0;
    line-height: 1.7;
}

/* Toast */

.video-toast {
    position: fixed;
    inset-inline-start: 50%;
    inset-block-end: 25px;
    z-index: 2000;
    max-width: min(420px, calc(100% - 30px));
    padding: 11px 18px;
    border-radius: 8px;
    background: rgba(15, 15, 15, 0.92);
    color: #ffffff;
    text-align: center;
    transform: translateX(-50%);
}

/* Responsive */

@media (max-width: 1150px) {
    .watch-grid {
        grid-template-columns:
            minmax(0, 1fr)
            380px;
    }

    .recommendation-card {
        grid-template-columns:
            145px
            minmax(0, 1fr);
    }
}

@media (max-width: 950px) {
    .watch-grid {
        grid-template-columns: 1fr;
    }

    .watch-main,
    .recommendation-rail {
        grid-column: 1;
    }

    .recommendation-rail {
        margin-block-start: 18px;
    }

    .recommendation-card {
        grid-template-columns:
            220px
            minmax(0, 1fr);
    }

    .video-tutor-panel:not(.focus-mode) {
        height: clamp(540px, 70vh, 680px);
    }
}

@media (max-width: 700px) {
    .watch-page {
        width: 100%;
        padding-block-start: 0;
    }

    .player-frame {
        border-radius: 0;
        box-shadow: none;
    }

    .video-information,
    .comments-section,
    .recommendation-rail {
        margin-inline: 14px;
    }

    .watch-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .comments-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }

    .video-actions {
        width: 100%;
    }

    .reply-composer > form {
        width: calc(100vw - 95px);
    }

    .recommendation-card {
        grid-template-columns:
            165px
            minmax(0, 1fr);
    }

    .video-tutor-panel:not(.focus-mode) {
        height: clamp(520px, 72dvh, 650px);
    }

    .video-tutor-panel:not(.focus-mode) .video-tutor-introduction {
        padding-inline: 12px 92px;
    }

    .video-tutor-context,
    .video-tutor-messages,
    .video-tutor-form,
    .video-tutor-note {
        margin-inline: 12px;
    }
}

@media (max-width: 480px) {
    .watch-title {
        font-size: 1.2rem;
    }

    .action-button {
        padding-inline: 12px;
    }

    .comment {
        gap: 9px;
    }

    .comment-avatar {
        width: 34px;
        height: 34px;
        font-size: 0.8rem;
    }

    .recommendation-card {
        grid-template-columns:
            145px
            minmax(0, 1fr);
    }

    .recommendation-information h2 {
        font-size: 0.83rem;
    }

    .recommendation-information p {
        font-size: 0.7rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .video-tutor-expand,
    .comments-section,
    .recommendations-section,
    .action-button,
    .recommendation-thumbnail img {
        transition: none;
    }
}
