/**
 * The timeline.
 *
 * @package FirstHand
 */

.fh__time {
	flex: 0 0 auto;
	min-height: var(--fh-time);
	max-height: 42vh;
	display: flex;
	flex-direction: column;
	padding: 10px 18px 14px;
	background: var(--fh-bg-2);
	border-top: 1px solid var(--fh-line);
}

.fh__time.is-empty {
	display: none;
}

.fh__time-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.fh__time-date {
	font-size: 13px;
	font-weight: 600;
}

.fh__time-now {
	font-family: var(--fh-mono);
	font-size: 13px;
	font-variant-numeric: tabular-nums;
	color: var(--fh-accent);
}

.fh__time-track {
	position: relative;
	height: 34px;
}

.fh__time-range {
	position: absolute;
	inset: 0;
	width: 100%;
	margin: 0;
	appearance: none;
	background: transparent;
	z-index: 2;
}

.fh__time-range::-webkit-slider-runnable-track {
	height: 3px;
	margin-top: 15px;
	background: var(--fh-line-2);
	border-radius: 2px;
}

.fh__time-range::-moz-range-track {
	height: 3px;
	background: var(--fh-line-2);
	border-radius: 2px;
}

.fh__time-range::-webkit-slider-thumb {
	appearance: none;
	width: 3px;
	height: 30px;
	margin-top: -13px;
	background: var(--fh-accent);
	border: 0;
	border-radius: 1px;
	cursor: ew-resize;
}

.fh__time-range::-moz-range-thumb {
	width: 3px;
	height: 30px;
	background: var(--fh-accent);
	border: 0;
	border-radius: 1px;
	cursor: ew-resize;
}

.fh__time-marks {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/*
 * Ticks sit above the track and take their own clicks, so a reader can jump
 * straight to a moment instead of hunting for it with the handle.
 */
.fh__time-mark {
	position: absolute;
	top: 4px;
	width: 9px;
	height: 9px;
	margin-left: -4px;
	padding: 0;
	background: var(--fh-known);
	border: 0;
	border-radius: 50%;
	pointer-events: auto;
	z-index: 3;
}

.fh__time-mark:hover {
	transform: scale(1.4);
}

.fh__time-mark.is-moment {
	top: 2px;
	width: 2px;
	height: 13px;
	margin-left: -1px;
	border-radius: 1px;
	background: var(--fh-ink-2);
}

.fh__time-mark.is-video {
	background: var(--fh-accent);
}

/* Playback ------------------------------------------------------------ */

.fh__time-controls {
	display: inline-flex;
	gap: 4px;
	margin-left: auto;
}

.fh__time-btn {
	min-width: 30px;
	height: 26px;
	padding: 0 8px;
	background: var(--fh-bg-3);
	border: 1px solid var(--fh-line-2);
	border-radius: 999px;
	color: var(--fh-ink);
	font-size: 12px;
	line-height: 1;
}

.fh__time-btn:hover {
	border-color: var(--fh-accent);
}

.fh__time-play {
	min-width: 40px;
}

.fh__time-play.is-playing {
	background: var(--fh-accent);
	border-color: var(--fh-accent);
	color: #12140f;
}

/* Placed by publication time or by date alone: hollow, because it is a stand-in. */
.fh__time-mark.is-standin {
	background: transparent;
	box-shadow: inset 0 0 0 2px currentColor;
}

/* Lanes --------------------------------------------------------------- */

.fh__lanes {
	flex: 0 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	margin-top: 6px;
}

.fh__lanes-bar {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 4px;
}

.fh__lanes-toggle,
.fh__lanes-btn {
	padding: 2px 8px;
	border: 1px solid var(--fh-line);
	border-radius: 6px;
	background: none;
	color: var(--fh-ink-2);
	font: inherit;
	font-size: 11px;
	cursor: pointer;
}

.fh__lanes-btn {
	min-width: 26px;
	font-family: var(--fh-mono);
}

.fh__lanes-zoom {
	display: inline-flex;
	gap: 2px;
}

.fh__lanes-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	padding: 2px 6px 2px 10px;
	font-size: 12px;
	color: var(--fh-ink);
	background: var(--fh-bg);
	border: 1px solid var(--fh-accent);
	border-radius: 999px;
}

.fh__lanes-body {
	position: relative;
	overflow: auto;
	min-height: 0;
	max-height: 30vh;
	border-top: 1px solid var(--fh-line);
}

.fh__lanes-empty {
	margin: 8px 0;
	font-size: 12px;
}

.fh__lane {
	display: grid;
	grid-template-columns: 120px 1fr;
	align-items: stretch;
	min-height: 22px;
	border-bottom: 1px solid var(--fh-line);
}

.fh__lane.is-selected,
.fh__lane.is-inset {
	background: color-mix(in srgb, var(--fh-accent) 10%, transparent);
}

.fh__lane-label {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 2px 6px 2px 0;
	border: 0;
	background: none;
	color: var(--fh-ink-2);
	font: inherit;
	font-size: 11px;
	text-align: left;
	cursor: pointer;
	overflow: hidden;
}

.fh__lane.is-event .fh__lane-label {
	font-family: var(--fh-mono);
	letter-spacing: 0.08em;
	color: var(--fh-ink-3);
	cursor: default;
}

.fh__lane-kind {
	flex: 0 0 auto;
	font-size: 11px;
	color: var(--fh-ink-3);
}

.fh__lane-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.fh__lane-track {
	position: relative;
	overflow: hidden;
	cursor: crosshair;
}

.fh__lane-span {
	position: absolute;
	top: 4px;
	height: 14px;
	min-width: 8px;
	box-sizing: border-box;
	border-radius: 3px;
	background: var(--fh-accent);
	opacity: 0.75;
	cursor: grab;
	touch-action: none;
}

.fh__lane-span.is-estimated {
	background: repeating-linear-gradient(90deg, var(--fh-accent) 0 6px, transparent 6px 9px);
	opacity: 0.6;
}

.fh__lane-span.is-pending {
	outline: 2px solid var(--fh-ink);
	opacity: 0.9;
}

.fh__lane.is-voice .fh__lane-span,
.fh__lane.is-audio .fh__lane-span {
	background: #5aa9ff;
}

.fh__lane-point {
	position: absolute;
	top: 6px;
	width: 10px;
	height: 10px;
	margin-left: -5px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--fh-known);
	cursor: pointer;
}

.fh__lane-dot {
	position: absolute;
	top: 6px;
	width: 10px;
	height: 10px;
	margin-left: -5px;
	padding: 0;
	border: 2px solid var(--fh-ink);
	border-radius: 50%;
	background: var(--fh-ink);
	cursor: pointer;
	z-index: 2;
}

.fh__lane-dot.is-proposed {
	background: var(--fh-bg);
}

.fh__lane-tick {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	margin-left: -1px;
	padding: 0;
	border: 0;
	background: var(--fh-ink-2);
	cursor: pointer;
}

.fh__lane-tick-label {
	position: absolute;
	left: 5px;
	top: 3px;
	font-size: 11px;
	color: var(--fh-ink-2);
	white-space: nowrap;
}

.fh__lane-t0 {
	position: absolute;
	top: 2px;
	margin-left: 4px;
	font-family: var(--fh-mono);
	font-size: 11px;
	color: var(--fh-accent);
	border-left: 2px solid var(--fh-accent);
	padding-left: 3px;
}

.fh__lanes-head {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 2px;
	margin-left: -1px;
	background: var(--fh-accent);
	pointer-events: none;
	z-index: 3;
}

.fh__lanes.is-closed .fh__lanes-body {
	display: none;
}

/* The clock, at home in the timeline ------------------------------------ */

.fh__time-head .fh__clock {
	padding: 0;
	background: none;
	border: 0;
	gap: 14px;
}

.fh__time-head .fh__clock-digits,
.fh__time-head .fh__clock-input {
	font-size: 20px;
}

.fh__time-head .fh__clock-rel {
	font-size: 11.5px;
}

.fh__lanes-order {
	padding: 2px 4px;
	font: inherit;
	font-size: 11px;
	color: var(--fh-ink-2);
	background: var(--fh-bg);
	border: 1px solid var(--fh-line);
	border-radius: 6px;
}

/* GPT timeline pass: compact NLE-style navigation ---------------------- */
.fh__time {
	padding: 6px 14px 8px;
}

.fh__time-head {
	gap: 8px;
	margin-bottom: 2px;
}

.fh__time-head .fh__clock {
	gap: 8px;
}

.fh__time-head .fh__clock-digits,
.fh__time-head .fh__clock-input {
	font-size: 18px;
}

.fh__time-track {
	height: 24px;
}

.fh__time-range::-webkit-slider-runnable-track {
	margin-top: 10px;
}

.fh__time-range::-webkit-slider-thumb {
	height: 22px;
	margin-top: -9px;
}

.fh__time-range::-moz-range-thumb {
	height: 22px;
}

.fh__lanes {
	margin-top: 2px;
}

.fh__lanes-bar {
	gap: 6px;
	min-height: 26px;
	margin-bottom: 2px;
}

.fh__lanes-toggle {
	padding: 2px 4px;
	border: 0;
	background: transparent;
	font-weight: 600;
	color: var(--fh-ink);
}

.fh__lanes-toggle:hover {
	color: var(--fh-accent);
}

.fh__lanes-btn.is-active,
.fh__lanes-snap.is-active {
	border-color: var(--fh-accent);
	color: var(--fh-accent);
	background: var(--fh-bg-3);
}

.fh__lanes-body {
	max-height: 28vh;
}

.fh__lanes-snapline {
	position: absolute;
	top: 0;
	bottom: 0;
	width: 1px;
	z-index: 5;
	background: var(--fh-accent);
	pointer-events: none;
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--fh-accent) 20%, transparent);
}

.fh__lanes-navigator {
	display: grid;
	grid-template-columns: 120px minmax(0, 1fr);
	align-items: center;
	min-height: 18px;
	margin-top: 2px;
	user-select: none;
}

.fh__lanes-nav-label {
	padding-right: 6px;
	font-family: var(--fh-mono);
	font-size: 11px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--fh-ink-3);
}

.fh__lanes-nav-track {
	position: relative;
	height: 10px;
	border: 1px solid var(--fh-line);
	border-radius: 4px;
	background: var(--fh-bg-3);
	cursor: pointer;
	overflow: visible;
}

.fh__lanes-nav-window {
	position: absolute;
	top: -2px;
	height: 12px;
	min-width: 12px;
	box-sizing: border-box;
	border: 1px solid var(--fh-accent);
	border-radius: 4px;
	background: color-mix(in srgb, var(--fh-accent) 18%, transparent);
	cursor: grab;
	touch-action: none;
}

.fh__lanes-nav-window:active {
	cursor: grabbing;
}

.fh__lanes-nav-window.is-full {
	top: -1px;
	height: 10px;
	opacity: 0.45;
}

.fh__lanes-nav-handle {
	position: absolute;
	top: -2px;
	bottom: -2px;
	width: 8px;
	cursor: ew-resize;
}

.fh__lanes-nav-handle.is-left { left: -4px; }
.fh__lanes-nav-handle.is-right { right: -4px; }

.fh__lanes.is-closed .fh__lanes-navigator {
	display: none;
}


/* GPT2 workbench: fewer visible controls, one visual language ------------ */
.fh__icon {
	display: inline-flex;
	width: 15px;
	height: 15px;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}
.fh__icon svg {
	width: 100%;
	height: 100%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.fh__clock-play .fh__icon svg path:first-child { fill: currentColor; stroke: none; }
.fh__clock-play.is-playing .fh__icon svg path { fill: currentColor; stroke: none; }

.fh__time {
	position: relative;
	min-height: 76px;
	max-height: 60vh;
	overflow: hidden;
}
.fh__time-resize {
	position: absolute;
	left: 0;
	right: 0;
	top: -3px;
	height: 8px;
	z-index: 8;
	cursor: ns-resize;
	touch-action: none;
}
.fh__time-resize::after {
	content: '';
	position: absolute;
	left: 50%;
	top: 3px;
	width: 34px;
	height: 2px;
	transform: translateX(-50%);
	border-radius: 2px;
	background: transparent;
}
.fh__time-resize:hover::after { background: var(--fh-line-2); }

.fh__time-head {
	justify-content: flex-start;
	min-height: 30px;
}
.fh__time-head .fh__clock {
	width: 100%;
	gap: 10px;
}
.fh__time-head .fh__clock-face {
	display: flex;
	align-items: baseline;
	gap: 8px;
	min-width: 0;
}
.fh__time-head .fh__clock-under {
	display: inline-flex;
	align-items: baseline;
	gap: 7px;
	min-width: 0;
}
.fh__time-head .fh__clock-date,
.fh__time-head .fh__clock-rel {
	white-space: nowrap;
}
.fh__clock-controls { margin-left: auto; }
.fh__clock-step { min-width: 32px; font-size: 10.5px; }
.fh__icon-btn { width: 28px; padding: 0; }
.fh__clock-more { position: relative; }
.fh__clock-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	z-index: 30;
	min-width: 190px;
	padding: 5px;
	background: var(--fh-glass);
	border: 1px solid var(--fh-line-2);
	border-radius: var(--fh-radius);
	box-shadow: var(--fh-shadow);
}
.fh__clock-menu-item,
.fh__lanes-menu-item {
	display: block;
	width: 100%;
	padding: 7px 9px;
	border: 0;
	border-radius: 5px;
	background: none;
	color: var(--fh-ink);
	font: inherit;
	font-size: 11px;
	text-align: left;
	cursor: pointer;
}
.fh__clock-menu-item:hover,
.fh__lanes-menu-item:hover { background: var(--fh-bg-3); }

.fh__lanes-bar { min-height: 24px; }
.fh__lanes-toggle {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 600;
}
.fh__lanes-toggle .fh__icon { width: 13px; height: 13px; }
.fh__lanes-help {
	font-size: 11px;
	color: var(--fh-ink-3);
	white-space: nowrap;
}
.fh__lanes-tools {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	margin-left: auto;
}
.fh__lanes-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 27px;
	height: 24px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 5px;
	background: none;
	color: var(--fh-ink-2);
	cursor: pointer;
}
.fh__lanes-icon-btn:hover { color: var(--fh-ink); background: var(--fh-bg-3); }
.fh__lanes-icon-btn.is-active { color: var(--fh-accent); background: var(--fh-accent-soft); }
.fh__lanes-menu-wrap { position: relative; }
.fh__lanes-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 5px);
	z-index: 28;
	width: 180px;
	padding: 5px;
	background: var(--fh-glass);
	border: 1px solid var(--fh-line-2);
	border-radius: var(--fh-radius);
	box-shadow: var(--fh-shadow);
}
.fh__lanes-menu-label {
	padding: 5px 8px 2px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--fh-ink-3);
}
.fh__lanes-menu .fh__lanes-order {
	width: calc(100% - 10px);
	margin: 3px 5px 5px;
	padding: 5px 6px;
}

@media (max-width: 860px) {
	.fh__lanes-help { display: none; }
	.fh__time-head .fh__clock-date { display: none; }
}


/* GPT3: tracks collapse gives the map its space back; Shift-drag range zoom. */
.fh__time.is-tracks-closed {
	height: auto !important;
	min-height: 0;
}
.fh__time.is-tracks-closed .fh__time-resize {
	display: none;
}
.fh__time-zoom-selection {
	position: absolute;
	top: 1px;
	bottom: 1px;
	z-index: 6;
	border: 1px solid var(--fh-accent);
	border-radius: 4px;
	background: color-mix(in srgb, var(--fh-accent) 18%, transparent);
	pointer-events: none;
}
.fh__time-zoom-selection[hidden] { display: none; }


/* GPT9: track-selection actions belong to the Tracks workbench --------- */
.fh__lanes-bar {
	flex-wrap: wrap;
}
.fh__lanes-bar .fh__multibar {
	min-width: 0;
}
.fh__lanes-bar .fh__multibar .fh__btn {
	min-height: 24px;
	padding-top: 2px;
	padding-bottom: 2px;
}
@media (max-width: 900px) {
	.fh__lanes-bar .fh__multibar {
		order: 3;
		width: 100%;
	}
}


/* GPT40 — timeline is context beneath the Evidence thumbnails. */
.fh__lower-dock > .fh__time {
	order: 2;
	border-top: 1px solid var(--fh-line-2);
	padding-top: 5px;
	padding-bottom: 6px;
	background: var(--fh-bg-2);
}

.fh__time-context-head {
	display: flex;
	align-items: baseline;
	gap: 7px;
	min-height: 16px;
	margin-bottom: 1px;
}

.fh__time-context-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--fh-ink-3);
}

.fh__time-context-note {
	font-size: 9.5px;
	color: var(--fh-ink-3);
}

.fh__time.is-tracks-closed {
	padding-bottom: 4px;
}

.fh__time.is-tracks-closed .fh__lanes {
	margin-top: 0;
}

.fh__time.is-tracks-closed .fh__lanes-bar {
	margin-top: 1px;
	margin-bottom: 0;
}

.fh__time.is-tracks-closed .fh__lanes-toggle {
	color: var(--fh-ink-2);
}

.fh__time.is-tracks-closed .fh__lanes-toggle:hover {
	color: var(--fh-accent);
}

@media (max-width: 760px) {
	.fh__time-context-note { display: none; }
}


/* When collapsed, the summary timeline gets one clear affordance: expand to align. */
.fh__lanes.is-closed .fh__multibar,
.fh__lanes.is-closed .fh__lanes-tools,
.fh__lanes.is-closed .fh__lanes-chip {
	display: none !important;
}

.fh__lanes.is-closed .fh__lanes-bar {
	min-height: 22px;
}

/* GPT41 — shared investigation time window --------------------------- */
.fh__time-window {
	position: absolute;
	top: 5px;
	bottom: 5px;
	z-index: 1;
	border: 1px solid var(--fh-accent);
	border-radius: 5px;
	background: color-mix(in srgb, var(--fh-accent) 20%, transparent);
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fh-accent) 12%, transparent);
	pointer-events: none;
}

.fh__time-window[hidden] {
	display: none;
}

.fh__time-window-controls {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
}

.fh__time-window-readout {
	min-height: 23px;
	padding: 2px 7px;
	border: 1px solid var(--fh-line);
	border-radius: 999px;
	background: transparent;
	color: var(--fh-ink-2);
	font: inherit;
	font-size: 9.5px;
	cursor: pointer;
}

.fh__time-window-readout:not(:disabled) {
	border-color: var(--fh-accent);
	color: var(--fh-ink);
}

.fh__time-window-readout:disabled {
	cursor: default;
	opacity: .72;
}

.fh__time-window-modes {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px;
	border: 1px solid var(--fh-line);
	border-radius: 999px;
	background: var(--fh-paper);
}

.fh__time-window-mode {
	min-height: 23px;
	padding: 2px 8px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--fh-ink-2);
	font: inherit;
	font-size: 9.5px;
	cursor: pointer;
}

.fh__time-window-mode.is-active {
	background: var(--fh-ink);
	color: var(--fh-paper);
}

.fh__time-window-mode:disabled {
	opacity: .55;
	cursor: default;
}

.fh__time-outside {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	color: var(--fh-ink-3);
	white-space: nowrap;
}

.fh__time-outside-range {
	width: 64px;
	accent-color: var(--fh-accent);
}

.fh__time-outside-value {
	min-width: 28px;
	font-family: var(--fh-mono);
	font-size: 11px;
	color: var(--fh-ink-2);
}

.fh__lane-window,
.fh__lane-window-selection {
	position: absolute;
	top: 1px;
	bottom: 1px;
	z-index: 0;
	border-left: 1px solid color-mix(in srgb, var(--fh-accent) 75%, transparent);
	border-right: 1px solid color-mix(in srgb, var(--fh-accent) 75%, transparent);
	background: color-mix(in srgb, var(--fh-accent) 12%, transparent);
	pointer-events: none;
}

.fh__lane-window-selection {
	z-index: 7;
	border: 1px solid var(--fh-accent);
	border-radius: 3px;
	background: color-mix(in srgb, var(--fh-accent) 22%, transparent);
}

.fh__lane-track > .fh__lane-span,
.fh__lane-track > .fh__lane-point,
.fh__lane-track > .fh__lane-dot,
.fh__lane-track > .fh__lane-tick,
.fh__lane-track > .fh__lane-t0 {
	z-index: 2;
}

@media (max-width: 860px) {
	.fh__time-window-controls { gap: 4px; }
	.fh__time-window-mode { padding-inline: 6px; }
	.fh__time-outside > span:first-child { display: none; }
	.fh__time-outside-range { width: 48px; }
}

/* GPT43 — Moment-driven camera Story follow --------------------------- */
.fh__story-follow-control {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
	font-size: 11px;
	color: var(--fh-ink-3);
	white-space: nowrap;
}

.fh__story-follow-label {
	font-weight: 600;
	color: var(--fh-ink-2);
}

.fh__story-follow-modes {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 2px;
	border: 1px solid var(--fh-line);
	border-radius: 999px;
	background: var(--fh-paper);
}

.fh__story-follow-mode {
	min-height: 23px;
	padding: 2px 8px;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--fh-ink-2);
	font: inherit;
	font-size: 9.5px;
	cursor: pointer;
}

.fh__story-follow-mode.is-active {
	background: var(--fh-ink);
	color: var(--fh-paper);
}

.fh__story-follow-status {
	max-width: 190px;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--fh-ink-2);
	font-family: var(--fh-mono);
	font-size: 11px;
}

@media (max-width: 980px) {
	.fh__story-follow-status { display: none; }
	.fh__story-follow-label { display: none; }
	.fh__story-follow-mode { padding-inline: 6px; }
}

/* GPT45 — one playback command bar, explicit range controls ------------ */
.fh__time-context-head {
	align-items: center;
	margin-bottom: 2px;
}

.fh__time-head {
	align-items: center;
	gap: 8px;
	margin-bottom: 1px;
}

.fh__time-head .fh__clock {
	flex: 0 0 auto;
}

.fh__timeline-tools {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	min-width: 0;
	margin-left: auto;
	font-size: 10.5px;
}

.fh__timeline-tool-btn,
.fh__time-window-readout,
.fh__time-window-mode,
.fh__story-follow-mode {
	height: 26px;
	min-height: 26px;
	padding: 0 8px;
	border: 1px solid var(--fh-line);
	border-radius: 6px;
	background: var(--fh-bg);
	color: var(--fh-ink-2);
	font: inherit;
	font-size: 10.5px;
	font-weight: 500;
	line-height: 24px;
	white-space: nowrap;
	cursor: pointer;
}

.fh__timeline-tool-btn:hover,
.fh__time-window-readout:not(:disabled):hover,
.fh__time-window-mode:hover,
.fh__story-follow-mode:hover {
	background: var(--fh-bg-3);
	color: var(--fh-ink);
}

.fh__time-window-readout:not(:disabled) {
	border-color: var(--fh-line);
	color: var(--fh-ink-2);
}

.fh__time-window-readout:disabled {
	opacity: .68;
}

.fh__time-window-modes,
.fh__story-follow-modes {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

.fh__time-window-modes[hidden] {
	display: none;
}

.fh__time-window-mode.is-active,
.fh__story-follow-mode.is-active {
	border-color: var(--fh-accent);
	background: var(--fh-accent-soft);
	color: var(--fh-accent);
}

.fh__story-follow-control {
	gap: 4px;
	font-size: 10.5px;
}

.fh__story-follow-label {
	font-size: 11px;
	font-weight: 600;
	color: var(--fh-ink-3);
}

.fh__story-follow-status {
	max-width: 150px;
	font-size: 9.5px;
}

.fh__time-outside-wrap {
	position: relative;
	display: inline-flex;
}

.fh__time-outside-pop {
	position: absolute;
	right: 0;
	bottom: calc(100% + 6px);
	z-index: 40;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	min-width: 190px;
	padding: 7px 9px;
	border: 1px solid var(--fh-line-2);
	border-radius: 7px;
	background: var(--fh-glass);
	box-shadow: var(--fh-shadow);
	color: var(--fh-ink-2);
	font-size: 11px;
	white-space: nowrap;
}

.fh__time-outside-pop[hidden] {
	display: none;
}

.fh__time-outside-pop .fh__time-outside-range {
	width: 72px;
}

.fh__time-track,
.fh__time-range {
	cursor: crosshair;
}

.fh__time-range::-webkit-slider-thumb {
	cursor: ew-resize;
}

.fh__time-range::-moz-range-thumb {
	cursor: ew-resize;
}

@media (max-width: 1120px) {
	.fh__story-follow-status { display: none; }
	.fh__timeline-tools { gap: 3px; }
	.fh__timeline-tool-btn,
	.fh__time-window-readout,
	.fh__time-window-mode,
	.fh__story-follow-mode { padding-inline: 6px; }
}

@media (max-width: 860px) {
	.fh__time-head { flex-wrap: wrap; }
	.fh__timeline-tools { width: 100%; margin-left: 0; }
	.fh__story-follow-label { display: inline; }
}
.fh__timeline-tool-btn:disabled {
	opacity: .55;
	cursor: default;
}


/* GPT46 — repair the unified playback row and make Pause a stable hit target. */
.fh__time-head .fh__clock {
	width: 100%;
	flex: 1 1 auto;
	min-width: 0;
}

.fh__time-head .fh__clock-controls {
	min-width: 0;
	margin-left: auto;
	flex-wrap: nowrap;
}

.fh__timeline-tools {
	flex: 0 1 auto;
	margin-left: 5px;
	padding-left: 6px;
	border-left: 1px solid var(--fh-line);
	font-family: inherit;
}

.fh__story-follow-status {
	font-family: inherit;
}

.fh__clock-play .fh__icon,
.fh__clock-play .fh__icon svg,
.fh__clock-play .fh__icon svg * {
	pointer-events: none;
}

@media (max-width: 1120px) {
	.fh__timeline-tools { margin-left: 3px; padding-left: 4px; }
}

@media (max-width: 860px) {
	.fh__time-head { flex-wrap: nowrap; }
	.fh__timeline-tools { width: auto; margin-left: 3px; }
}


/* GPT47 — one clear control language ----------------------------------- */
.fh__time-head .fh__clock {
	width: 100%;
	flex: 1 1 auto;
	min-width: 0;
}

.fh__time-head .fh__clock-controls {
	min-width: 0;
	margin-left: auto;
	gap: 4px;
	flex-wrap: nowrap;
	font-family: inherit;
}

/* Primary action: visually unmistakable and stable in one place. */
.fh__clock-play {
	min-width: 82px;
	height: 32px;
	padding: 0 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	border: 1px solid var(--fh-accent);
	border-radius: 7px;
	background: var(--fh-accent);
	color: #14181f;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .035em;
}

.fh__clock-play:hover,
.fh__clock-play.is-playing {
	background: var(--fh-accent);
	color: #14181f;
	filter: brightness(.96);
}

.fh__clock-play .fh__icon,
.fh__clock-play .fh__icon svg,
.fh__clock-play .fh__icon svg * {
	pointer-events: none;
}

.fh__clock-play-label { pointer-events: none; }

/* Clickable secondary actions all share the same button treatment. */
.fh__clock-step,
.fh__time-window-mode,
.fh__story-follow-mode,
.fh__timeline-mini-action,
.fh__icon-btn {
	height: 27px;
	min-height: 27px;
	padding: 0 8px;
	border: 1px solid var(--fh-line);
	border-radius: 6px;
	background: var(--fh-bg);
	color: var(--fh-ink-2);
	font-family: inherit;
	font-size: 10.5px;
	font-weight: 500;
	line-height: 25px;
	cursor: pointer;
}

.fh__clock-step:hover,
.fh__time-window-mode:hover,
.fh__story-follow-mode:hover,
.fh__timeline-mini-action:hover,
.fh__icon-btn:hover {
	background: var(--fh-bg-3);
	color: var(--fh-ink);
}

.fh__time-window-mode.is-active,
.fh__story-follow-mode.is-active {
	border-color: var(--fh-accent);
	background: var(--fh-accent-soft);
	color: var(--fh-accent);
	font-weight: 650;
}

.fh__timeline-mini-action[hidden] { display: none; }
.fh__timeline-mini-action { padding-inline: 6px; font-size: 9.5px; }

/* Inputs/selects look like inputs, not buttons. */
.fh__clock-speed,
.fh__timeline-select {
	height: 27px;
	padding: 2px 22px 2px 7px;
	border: 1px solid var(--fh-line-2, var(--fh-line));
	border-radius: 5px;
	background: var(--fh-paper);
	color: var(--fh-ink);
	font-family: inherit;
	font-size: 10.5px;
	font-weight: 500;
	cursor: pointer;
}

.fh__clock-speed:focus,
.fh__timeline-select:focus {
	outline: 2px solid color-mix(in srgb, var(--fh-accent) 30%, transparent);
	outline-offset: 1px;
}

.fh__timeline-select:disabled {
	opacity: .5;
	cursor: default;
}

.fh__time-outside-select { min-width: 60px; }

/* Labels/readouts are deliberately quiet and non-button-like. */
.fh__timeline-tools {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-width: 0;
	margin-left: 5px;
	padding-left: 7px;
	border-left: 1px solid var(--fh-line);
	font-family: inherit;
}

.fh__timeline-info,
.fh__timeline-setting,
.fh__story-follow-control {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}

.fh__timeline-label,
.fh__story-follow-label {
	font-family: inherit;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .025em;
	text-transform: uppercase;
	color: var(--fh-ink-3);
}

.fh__time-window-readout {
	height: auto;
	min-height: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--fh-ink-2);
	font-family: inherit;
	font-size: 10.5px;
	font-weight: 600;
	line-height: 1;
	cursor: default;
}

.fh__story-follow-status {
	max-width: 150px;
	overflow: hidden;
	text-overflow: ellipsis;
	color: var(--fh-ink-3);
	font-family: inherit;
	font-size: 9.5px;
	font-weight: 400;
	white-space: nowrap;
}

.fh__time-window-modes,
.fh__story-follow-modes {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 0;
	border: 0;
	background: none;
}

.fh__time-window-modes[hidden] { display: none; }

@media (max-width: 1180px) {
	.fh__clock-play { min-width: 70px; padding-inline: 9px; }
	.fh__story-follow-status { display: none; }
	.fh__timeline-tools { gap: 3px; padding-left: 4px; margin-left: 2px; }
	.fh__timeline-label { display: none; }
}

@media (max-width: 900px) {
	.fh__clock-play { min-width: 58px; }
	.fh__clock-play-label { display: none; }
	.fh__timeline-mini-action { display: none; }
}


/* GPT48 — simpler playback language ----------------------------------- */
.fh__timeline-selection-tools {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}

.fh__timeline-selection-tools[hidden] {
	display: none !important;
}

/* Story is a single on/off action; the active treatment communicates state. */
.fh__story-follow-control {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.fh__story-follow-mode {
	min-width: 48px;
}

/* With compressed-event playback removed, speed can stay compact. */
.fh__clock-speed {
	min-width: 58px;
	max-width: 68px;
	padding-right: 18px;
}

/* Outside-selection fading is intentionally a quiet 20% default now. */
.fh__time-outside-select,
.fh__timeline-setting {
	display: none !important;
}

@media (max-width: 900px) {
	.fh__timeline-mini-action { display: inline-flex; }
}
