/* JAV247 — watch page (single video). Layout: research/02-single-video.md */

.watch-content { gap: 20px; max-width: 1560px; }
.watch-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 36px 28px; width: 100%; min-width: 0; }
.watch-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.watch-related { flex: 1 1 320px; min-width: 0; max-width: 100%; display: flex; flex-direction: column; gap: 16px; }
@media (min-width: 1180px) { .watch-related { max-width: 340px; } }
.watch-related__title { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.related-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 18px 14px; }
@media (min-width: 1180px) { .related-grid { grid-template-columns: minmax(0, 1fr); } }
.watch-related .video-card { gap: 9px; }
.watch-related .video-card__thumb { border-radius: 11px; }
.watch-related .video-card__title { font-size: 13.5px; }

/* player */
.player-shell {
	position: relative; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: #000 var(--poster, none) center / cover no-repeat;
	box-shadow: 0 0 0 1px var(--line), 0 40px 80px -40px rgba(0, 0, 0, .9);
}
.player { position: absolute; inset: 0; width: 100%; height: 100%; }
.player-empty, .player-note { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-dim); background: rgba(11, 12, 16, .78); text-align: center; padding: 20px; }
.player-empty i { font-size: 40px; color: var(--muted); }
.player .art-video-player { --art-theme: var(--accent); font-family: var(--font); }
.art-video-player .art-control i { font-size: 16px; }

/* title + toolbar */
.watch-title { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.watch-title h1 { font-weight: 800; font-size: clamp(21px, 2.4vw, 29px); line-height: 1.2; letter-spacing: -.03em; overflow-wrap: anywhere; }
.watch-stats { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; color: var(--muted); font-size: 14px; font-weight: 600; }
.watch-stats i { margin-right: 7px; font-size: 13px; }
.pill { padding: 2px 9px; border-radius: 6px; background: var(--gold); color: #1a1405; font-size: 11.5px; font-weight: 800; }
.watch-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; }
.reaction { display: inline-flex; height: 40px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); overflow: hidden; }
.reaction__btn { display: inline-flex; align-items: center; gap: 8px; padding: 0 16px; border: 0; background: transparent; font-weight: 700; font-size: 13px; color: var(--text-dim); transition: background .15s, color .15s; }
.reaction__btn + .reaction__btn { border-left: 1px solid var(--line); }
.reaction__btn:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.reaction__btn.is-active { color: var(--accent); }
.reaction__btn:disabled { opacity: .6; cursor: progress; }
.watch-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.watch-action {
	display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong);
	background: var(--surface); font-weight: 700; font-size: 13px; color: var(--text-dim); white-space: nowrap; transition: border-color .15s, color .15s, background .15s;
}
.watch-action:hover { border-color: var(--accent); color: #fff; }
.watch-action[aria-expanded="true"], .watch-action.is-active { border-color: var(--accent); color: var(--accent); background: color-mix(in srgb, var(--accent) 08%, transparent); }

.action-panel { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.action-panel[hidden] { display: none; }
.action-panel--inline { margin-top: 12px; }
.share-field { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 13px; color: var(--text-dim); }
.share-input { display: flex; gap: 8px; align-items: stretch; }
.share-panel { gap: 12px; }
.share-row { display: flex; align-items: center; gap: 14px; }
.share-row > label { flex: 0 0 92px; font-weight: 700; font-size: 13px; color: var(--text-dim); }
.share-row .share-input { flex: 1; min-width: 0; }
.share-input input { flex: 1; min-width: 0; height: 40px; text-overflow: ellipsis; font: 500 13px/1 ui-monospace, SFMono-Regular, Menlo, monospace !important; }
.copy-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 88px; height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; color: var(--text-dim); font-weight: 700; font-size: 13px; transition: border-color .15s, color .15s; }
.copy-btn:hover { border-color: var(--accent); color: #fff; }
@media (max-width: 640px) {
	.action-panel { padding: 14px; border-radius: 14px; }
	.share-row { flex-direction: column; align-items: stretch; gap: 6px; }
	.share-row > label { flex: none; }
	.share-input input, .copy-btn { height: 38px; }
	.copy-btn { min-width: 38px; padding: 0 12px; }
}
.action-panel input[type="text"], .action-panel textarea, .comment-form-comment textarea, .comment-form input[type="text"], .comment-form input[type="email"] {
	width: 100%; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--ink); color: var(--text); font: 500 14px/1.5 var(--font); resize: vertical;
}
.action-panel input:focus, .action-panel textarea:focus, .comment-form textarea:focus, .comment-form input:focus { outline: 0; border-color: var(--accent); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }

/* meta */
.watch-meta { display: flex; flex-direction: column; padding: 6px 22px; border-radius: 20px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.watch-detail { display: flex; align-items: flex-start; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); min-width: 0; flex-wrap: wrap; }
.watch-detail:last-child { border-bottom: 0; }
.watch-detail > strong { flex: 0 0 110px; color: var(--muted); font-weight: 700; font-size: 13px; padding-top: 7px; }
.watch-detail > *:not(strong) { flex: 1 1 260px; min-width: 0; }
.watch-detail--text { align-items: flex-start; }
.watch-actors { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.actor-chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 14px 4px 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; font-size: 14px; transition: border-color .15s; }
.actor-chip:hover { border-color: var(--accent); }
.actor-chip__img { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: var(--surface-2); }
.actor-chip__img img { width: 100%; height: 100%; object-fit: cover; }
.link-btn { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 13px; padding: 6px 8px; }
.link-btn:hover, .link-btn[aria-expanded="true"] { color: var(--accent); }
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.tag-chip { --hue: 220; padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: 13px; color: var(--text-dim); transition: border-color .15s, color .15s; }
.tag-chip:hover { border-color: var(--accent); color: #fff; }
.tag-chip.is-category { background: hsl(var(--hue) 50% 14%); border-color: hsl(var(--hue) 60% 40% / .4); color: hsl(var(--hue) 90% 82%); }
.inline-link { font-weight: 700; padding-top: 6px; }
.inline-link:hover { color: var(--accent); }
.watch-detail time { color: var(--text-dim); }
.watch-detail > span { padding-top: 6px; color: var(--text-dim); font-weight: 600; font-size: 14px; }

/* tabs */
.watch-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); }
.watch-tab { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--muted); font-weight: 800; font-size: 14.5px; }
.watch-tab:hover { color: #fff; }
.watch-tab[aria-selected="true"] { color: #fff; border-bottom-color: var(--accent); }
.watch-tab__count { padding: 1px 8px; border-radius: 999px; background: var(--surface-2); font-size: 12px; font-weight: 700; }
.watch-pane[hidden] { display: none; }

/* comments */
.comments { display: flex; flex-direction: column; gap: 22px; }
.comments .section-heading { margin: 0; }
.comments .section-heading h2 { font-size: 20px; }
.comment-thread { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.comment-thread .children { list-style: none; display: flex; flex-direction: column; gap: 16px; margin: 14px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.comment-card { position: relative; min-width: 0; padding-left: 52px; }
.comment-avatar { position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.comment-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.comment-head strong { font-weight: 700; font-size: 14px; }
.comment-head time { color: var(--muted); font-size: 12px; font-weight: 600; }
.comment-body { margin-top: 5px; color: var(--text-dim); line-height: 1.55; overflow-wrap: anywhere; }
.comment-body p { margin: 0 0 8px; }
.comment-pending { margin: 4px 0 0; color: var(--gold); font-size: 13px; font-weight: 600; }
.comment-actions a { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.comment-actions a:hover { color: var(--accent); }
.comments-empty { color: var(--muted); }
.comment-respond { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.comment-reply-title { font-weight: 800; font-size: 16px; }
.comment-reply-title small a { color: var(--muted); font-size: 12px; margin-left: 10px; }
.comment-form { display: flex; flex-direction: column; gap: 12px; }
.comment-form p { margin: 0; }
.comment-form label { display: block; margin-bottom: 4px; font-weight: 700; font-size: 13px; color: var(--text-dim); }
.comment-form .form-submit { margin-top: 4px; }
.comment-form .btn { cursor: pointer; border: 0; }
.logged-in-as, .comment-notes { color: var(--muted); font-size: 13px; }
.logged-in-as a { color: var(--text-dim); text-decoration: underline; }

@media (max-width: 640px) {
	.player-shell { border-radius: 12px; margin: 0 -4px; }
	.watch-meta { padding: 2px 16px; }
	.watch-detail { gap: 6px; }
	.watch-detail > strong { flex-basis: 100%; padding-top: 0; }
	.watch-actions { margin-left: 0; width: 100%; }
	.watch-action span { display: none; }
	.watch-action { padding: 0; width: 44px; justify-content: center; flex: 0 0 auto; }
}

/* Narrow players: drop the optional controls so fullscreen stays reachable. */
@media (max-width: 640px) {
	.art-control-back10, .art-control-fwd10, .art-control-pip, .art-control-playbackRate { display: none !important; }
}

/* Servers: one button per source; the active one is the one playing */
.player--embed { border: 0; background: #000; }
.player--embed[hidden], .player[hidden] { display: none; }
.servers { display: flex; align-items: flex-start; gap: 12px 16px; margin-top: 14px; }
.servers__label { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 40px; color: var(--muted); font-size: 13px; font-weight: 700; }
.servers__list { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.server {
	display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px 0 12px;
	border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface);
	color: var(--text-dim); font-weight: 700; font-size: 14px; white-space: nowrap;
	transition: border-color .15s, color .15s, background .15s, transform .15s var(--ease);
}
.server i { font-size: 15px; color: var(--muted); transition: color .15s; }
.server:hover { border-color: var(--muted); color: #fff; }
.server:active { transform: scale(.97); }
.server.is-active { border-color: transparent; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 10px 22px -12px color-mix(in srgb, var(--accent) 80%, transparent); }
.server.is-active i { color: #fff; }
@media (max-width: 640px) {
	/* One compact, swipeable row: label + small chips, no wrapping into a tall stack */
	.servers { align-items: center; gap: 10px; margin-top: 10px; }
	.servers__label { height: 32px; font-size: 12px; gap: 6px; }
	.servers__list {
		flex: 1; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: none;
		margin-right: calc(var(--gutter, 12px) * -1); padding-right: var(--gutter, 12px);
	}
	.servers__list::-webkit-scrollbar { display: none; }
	.server { flex: none; height: 32px; gap: 6px; padding: 0 12px 0 9px; border-radius: 16px; font-size: 13px; }
	.server i { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { .server { transition: none; } }
